4″ 7-segment/One digit, two supplies/02. Why it needs 12 volts
One digit, two supplies · 02 of 15

Why it needs 12 volts

A segment this size is not one small LED, and the numbers on the board say so: a 75 ohm resistor in front of each one and a driver that sinks the current to ground. Five volts cannot feed that, which is why the board has a second power input.

What a segment's current passes through

On this board every segment is the same short path. The display's two anode pins are one wire, the common anode, and it is fed from the 12 V supply (through a switch, Q2, below). From there a segment's current goes through the LEDs inside the bar, through a resistor of its own (75 ohm for segments A to G, 510 ohm for the point), into one channel of U2, and from U2 to GND. U2 is the driver chip: it is the thing that switches the current, and a high on its input is what turns a segment on.

What the supply has to pay for
12 V rail, 4 in a row
What one segment is
Supply to the segments12 V
Spent in the LED
8 V
Spent in the driver
about 1 V
Left across 75 ohm
3 V
3 V left for the resistor: that is what sets the current. The current is that voltage divided by 75 ohm, and the LED voltage here is an assumption: the display’s was not measured. The point survives the guess. A 75 ohm resistor is small, so most of the rail has to be sitting across the display, and a 5 V rail does not have that much to give.

The display's own LED voltage was not measured, so the figure assumes one and says so: pick one LED or a string of four, and watch what is left for the resistor. What the board does tell us is the other two numbers. U2 uses about 1 V when it is on. And 75 ohm is a small resistor: at any current in the tens of milliamps it drops only a volt or two (20 mA across 75 ohm is 1.5 V). So with 1 V in the driver and a volt or two in the resistor, most of a 12 V rail must be sitting across the display itself. That is a lot more than one LED needs, and it is what several LEDs in a row in each bar would add up to.

That is the argument for the 12 V input, and it is an inference from those numbers rather than a reading. What holds either way: below the total a series string does not glow faintly, it does nothing, and a 5 V rail is under any total that has several LEDs in it.

The chip that decides is not the chip that drives

U1, the 74HC595, decides which segments are on. The datasheet rates it for a 2 to 6 V supply and about 6 mA out of one pin, which is an indicator LED on a breadboard and not a 4-inch bar.

So U1's eight outputs go to the eight inputs of U2, an ULN2803A. Each of its channels is a Darlington pair of transistors that sinks current to GND when its input is high, and each can take 500 mA absolute maximum. It needs at most 2.4 V on an input to sink 200 mA, so a 3.3 V high from U1 is enough. Because it sinks current and the segments' other end is the common anode, a 1 in your byte switches a segment on, which is what the table in the sketch assumes.

Three connections, and one of them bites

Two supplies and one ground
All three
Leave one out
12 V at Q2
12 V
Logic rail at U1
3.3 V or 5 V
Digit
lit
Twelve volts in through Q2, out through the segments and U2 to GND; the logic rail only runs U1. The 12 V never touches a microcontroller pin, and your board never supplies the current that makes a 4-inch bar glow. (This drawing assumes Q2 is on, which is the PWM pad’s job: chapter 4.)

Twelve volts and its ground on the two-pin header. Your board's 3.3 V or 5 V and its ground on the signal header. And those two grounds must be the same wire.

The 12 V does not go straight to the anode. It goes through Q2, a MOSFET that acts as a switch, and that switch is how the board dims. The drawing assumes it is on; how it is driven is in how the dimmer works, and what it does to a module you have not wired for PWM is in the PWM pad.

Leave out the 12 V and everything else works perfectly: bytes arrive, the latch fires, and the digit is dark. Leave out the logic rail and U1 cannot store the byte. Leave out the shared ground and you get the bad one, a circuit that half works, because a HIGH is a voltage measured against ground and the two halves no longer agree where zero is.

What to buy

Any 12 V supply. Barrel jacks, screw terminals and bare leads are all fine; what matters is that its negative lead ends up on the same ground as your microcontroller, which usually means a wire from the supply's ground to a GND pin on your board as well as to the module. The back of the board prints a suggestion for getting 12 V from a USB-C power source, which is the one to read if you do not have a 12 V adapter.

When it does not work

My 12 V supply is connected and it is still dark

Measure rather than look. Put the black probe on your board's GND, not the supply's, and the red probe on the module's 12V pin. Twelve volts there means the supply and the shared ground are good. If they are, the next suspect is the PWM pad: it ships open, and a new module with nothing on PWM is dark whatever you send.

Can I use a lower voltage, a 9 V battery for example?

The board is printed 12V and this book documents nothing else. How low a segment still lights depends on the display's own LED voltage, which was not measured here, and a small battery sags under load. Use a 12 V supply.

Is 12 V dangerous to my ESP32?

Only if it goes on the wrong header. The 12 V pin is on the separate two-pin header, away from the six-pin signal row, and nothing on the signal row is meant to go above your logic rail. Check which header you are in before the supply goes on.

Does a chain need a bigger supply?

It needs more current, not more volts. The 12 V is the same copper on both edges of every module, so a chain draws from one supply. The current of a lit digit was not measured here: size the supply from the numbers you see when you try it.

Where this goes next

Both edges carry the same eight connections. Which is which, and what the ten bare pads are for.

IN, OUT, and the arrow between them →

Edit this page — content/books/seg4/why-it-needs-12-volts.mdx

Community

Questions about this product

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

Ask a question ↗

4″ 7-Segment LED Display with 74HC595

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 →