32×8 matrix/Getting it lit/04. Three and a half volts
Getting it lit · 04 of 10

Three and a half volts

The listing says the board takes 3.3 V or 5 V signals. The MAX7219 datasheet says a HIGH starts at 3.5 V. Both are honest, and the gap between them is where an ESP32 lives.

What the datasheet says

The MAX7219's Electrical Characteristics table has two rows about the signal pins, and they are absolute numbers rather than fractions of the supply:

  • Logic High Input Voltage, VIH: 3.5 V minimum.
  • Logic Low Input Voltage, VIL: 0.8 V maximum.

An Arduino Uno puts out 5 V and clears the first with a volt and a half to spare. An ESP32, an ESP32-S3, a Pico or a Raspberry Pi puts out 3.3 V, which is 0.2 V below it.

The chip's HIGH starts at 3.5 V
3.3 V on DIN, CLK and CS
HIGH from the driving board3.3 V
Chip needs at least
3.5 V
On the wire
3.3 V
Margin
-0.2 V
Hysteresis
1 V typ
Inside the band where the chip promises nothing. 3.3 V is above LOW and below HIGH. In practice a real chip switches somewhere in here and a 3.3 V board usually drives this display fine — but “usually” is doing the work, and the failures show up as garbage on the screen after a wire gets longer or a board gets warmer. A 3.3 V to 5 V level shifter on DIN, CLK and CS moves it above the line.

Between 0.8 V and 3.5 V the chip is not promising anything. In a real part the switching point is somewhere in the middle of that band — the datasheet lists a typical 1 V of hysteresis, which is what stops it chattering — so 3.3 V gets read as a HIGH by nearly every chip nearly all of the time. That is why the 3.3 V examples in the Lonely Binary repository work, and why the listing's "3.3 V or 5 V SPI signal compatible" is a fair description of what happens.

It is not what the specification says, and the difference shows up as intermittence rather than failure. Long jumper wires, a board running warm, a particular chip from a particular batch: any of those can move it, and when it moves you get a screen of garbage rather than a blank one, because the clock and the data are still arriving, just not as sent.

What to do about it

If you are on a 5 V board — an Uno, a Nano, a Mega — there is nothing to do.

If you are on a 3.3 V board and it works, it works. Keep the three signal wires short, keep them away from anything switching hard, and be aware that this is the first thing to suspect if the display starts misbehaving later.

If you want it in specification, put a 3.3 V to 5 V level shifter in DIN, CLK and CS. All three are push-pull signals driven in one direction only, which is the easy case: any of the boards in the logic level converter pack will do it, and the clock speeds here are nowhere near the limit of even the slowest of them.

Only the three signal wires need shifting. VCC still goes to the 5 V rail and GND is shared as before.

Why the chain is not affected

A chained board is not driven by your microcontroller — it is driven by the DOUT pin of the board before it, and DOUT is a 5 V chip's output. The datasheet puts it at V+ minus one volt when sourcing a milliamp, so a second board sees a 4 V HIGH against the same 3.5 V threshold.

That is worth knowing because it narrows the search. If board one is readable and board two is not, the level shifting is not the problem; the jumper, the device count or the power is.

When it does not work

It worked on the breadboard and not once I lengthened the wires

Classic symptom of driving the chip below its logic threshold. Longer wires slow the edges and pick up more noise, and a signal that was only just being read as HIGH stops being read that way. Shorten them, or shift the levels.

One board in the chain is fine and the next shows rubbish

That one is not your problem. DOUT drives its output to within a volt of the 5 V supply, so the second board is being fed a clean 4 V HIGH by the first. If the first board is right and the second is wrong, look at the jumper between them, not at the logic level.

Do I really need a level shifter, or is this theoretical?

Both. Most ESP32 boards drive most MAX7219 modules without trouble, which is why so many tutorials say it is fine. It is still below the minimum on the datasheet, which means nothing is promising it and nothing is at fault when it stops. If the display matters, shift the levels; if it is a weekend project, try it first.

Can I power the board from 3.3 V instead, so the levels match?

No. The MAX7219's operating supply range is 4.0 to 5.5 V. Below that the chip is out of spec on the other side and the LEDs are visibly dim. Power from 5 V and fix the signals if they need fixing.

Where this goes next

Two hundred and fifty-six LEDs, four chips, and the difference between a rounding error and more than a USB port will give you.

How much current it wants

Edit this page — content/books/matrix-32x8/three-and-a-half-volts.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

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.

Browse Modules and blocks on the forum