How much current it wants
A word at moderate brightness is tens of milliamps. The same board with every pixel on is more than ten times that, and three of them is past what a USB port will give you.
Two numbers set it
How much of the screen is lit, and the intensity register. Neither is obvious from the sketch, and together they span a factor of several hundred.
The datasheet's figure for one MAX7219 with everything lit is 330 mA typical, measured with the segment current set to 40 mA — which is what the resistor on a board like this one is chosen to give. Four chips is four times that. Three boards is twelve times.
At the other end, a chip doing nothing but running still takes about 8 mA, and a chip put into shutdown mode takes 150 µA with its data intact. That last number is why blanking the display in software is a real power saving on a battery project and not a cosmetic one.
Brightness is a duty cycle
setIntensity(5) does not dim the LEDs. It chops them: an internal pulse-width
modulator lights each segment for a fraction of every scan cycle, in sixteen
steps from 1/32 at level 0 to 31/32 at level 15. The peak current through a lit
LED is the same at every level — it is set by a resistor on the board, not by
your code — but the average is what your supply sees, and the average follows
the level almost exactly.
So brightness and power are the same control. Level 5 is about a third of level 15, and on a desk it is usually plenty.
When to use a separate supply
A rough guide, for one board:
| On screen | Intensity | Roughly |
|---|---|---|
| A word or a clock | 5 | tens of mA |
| A word or a clock | 15 | a hundred-odd mA |
| Full screen | 15 | approaching an amp |
The first row is free on any board's 5 V pin. The last row is not: a USB 2.0 port is specified for 500 mA, and asking for most of an amp through a dev board's regulator and a breadboard jumper produces a sag rather than a refusal.
If the project fills the screen, or chains more than two boards, give the displays their own 5 V supply and connect its ground to the microcontroller's ground. The signal wires still come from the microcontroller; only the power comes from somewhere else. Without the shared ground the signals have no reference and nothing works at all.
These figures are a model built from the datasheet's numbers, not measurements of this board. The shape is what matters: full screen at full brightness is a different kind of load from a line of text, and it is worth knowing which one you are building before the supply is chosen.
When it does not work
The 5 V rail sagged. A microcontroller browning out the instant an animation goes full-screen is the signature: the display is taking current the board's regulator was not sized for. Feed the matrix from its own 5 V supply and join the grounds.
Same cause, less severe. Anything sharing the 5 V rail — a servo, a second board, a radio transmitting — takes its current out of the same place. Separate supplies with a common ground fix it.
Every chained board draws its current through its neighbour's VCC pad and the jumper between them, so the voltage drops a little at each hop. Two boards is usually fine; past that, run 5 V and ground to each board from the supply rather than daisy-chaining power.
Yes, almost proportionally. The intensity register is a pulse-width modulator: level 15 lights each LED 31/32 of the time and level 0 lights it 1/32 of the time, so the average current follows it directly. It is the cheapest power saving available on this board.
How four chips on one wire each get their own instructions, and why there is a register whose job is to do nothing.
Sixteen bits at a time →Edit this page — content/books/matrix-32x8/how-much-current-it-wants.mdx
Questions about this product
See what other owners have asked, and read their solutions.
32x8 LED Matrix MAX7219, 3-Pack
Loading discussions…
Discuss this article
Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.