Go Down

Topic: 2.3" 16 segment common anode LEDs, HT16K33 and ULN2803 (Read 1 time) previous topic - next topic


To calculate R1:

Supply is 12V. ULN chip will probably drop around 1.5V. Segments with 2 or 4 leds will drop 6V. Decimal points only have one led so will only drop 3V. So R1 will need to drop (12-1.5-6) or (12-1.5-3).

Current for segments with 1 or 2 leds will be, lets say, 20mA. Segments with 4 leds will need 40mA.

To calculate R1, divide the required voltage drop by the required current.

So for example the segments with 4 leds, R1 = (12-1.5-6)/0.040 = 112 ohms, so maybe 120R.


Thanks again for the help. I've made the suggested changes to the drawing.

The display specs list 20mA per LED for blue LEDs and 18ma for red, so I'll use 19ma for the calculation:

R2 = (12 - 1.5 - 6) / (.019 * 4) = 60R (4 LED segments)

R1 = (12 - 1.5 - 6) / (.019 * 2) = 120R (2 LED segments)

From the HT16K33 datasheet, the refresh rate is 11.4ms or 88Hz. Does that affect the values of the resistors? Should they be lower for multiplexed displays?

Is the NDP-6020P a good choice for the MOSFET?

If this looks correct, once the issue will pulling the gate to 12v is resolved (maybe a transistor?), I'll breadboard the circuit.


Maybe just a blocking diode in series with the connection from the display driver Cx on the HT16K33, to the resistor, R3, and +12v to the gate of the MOSFET in series with a 10k resistor.


This may be useful.

R2 = (12 - 1.5 - 6) / (.019 * 4) = 60R (4 LED segments)
No, it's a pair of LEDs in series, in parallel with another pair of LEDs in series. LEDs in series have the same current flowing through both of them, so the above should be .019 * 2, not .019 * 4


I see, so 120R for both 2 and 4 LED segments. The decimal point will not be used.

Attached is an updated schematic based on the Youtube video. Hopefully it is good enough to breadboard the circuit. The example load in the video is 25W.

With all 10, 4 LED segments and 6, 2 LED segments lit, total current drain is 400mA at 6v, which is 2.4W, so it seems like a smaller MOSFET can be used such as the NTR1P02T1G, rated at 1 amp, 20v. Also, it is probably best to use a 9v supply, recalculating resistor values.

Please let me know what you think about this. Thanks again for the help.

EDIT: I just noticed that nowhere is +12v connected to the display.


so 120R for both 2 and 4 LED segments.
No. Sorry, I hoped by pointing out what was wrong with one calculation you would realise the other is also wrong.


Please post your schematics so they can be viewed in the post, like above. Its a 2-step process: Attach the file as you have done and post. Then copy the address of the attachment, modify the post, click insert image and paste in the copied address.


I don't think that will work. The extra transistor will logically invert the signal from the COM pins.

in your previous working circuit, the COM pins on the HT chip go low to sink current from the common cathode of each digit in turn of your 0.8" displays, turning that digit on. The other COM pins go high at the same time to switch the other digits off.

In the circuit above, when a COM pin goes low, the npn transistor will switch off, which will in turn switch the MOSFET off.


R2 = (12 - 1.5 - 6) / (.019 * 2) = 120R (4 LED segments)
R1 = (12 - 1.5 -6) / .019 = 240R (2 segments)

I found this on an EE site, so maybe just a diode will work because the potential is 12v - 5v, well within range.
"A P channel FET is easier to switch as the gate voltage only has to range from the power voltage to around 10 V less for most FETs." Does this look like it will work?


I think I'm looking at this wrong. The row lines go high when selected, and the Darlingtons on the cathodes of the LEDs ground them since they invert the signal.

The COM lines go low when selected, so a transistor SHOULD invert the signal to turn on the MOSFET. The source side of the MOSFET should go to 12v, and the drain to the anode. The above drawing is wrong.

The issue is switching on the MOSFET when the COM lines go low.

Is this correct?


Series resistors look ok now.

Yes, sounds like you understand the switching issue now.

I have another suggestion. An equivalent to the ULN2803 chips is UDN2981/2984. These are high-side drivers and could replace the MOSFETs. They have a high voltage drop, like ULN, but with 12V supply that's not a serious issue. But the problem is they are not inverting. ULN is inverting: a high signal on an input pulls the output low allowing it to sink current. Because you are running common anode displays with a chip designed for common cathode displays, you need inverting drivers on both high (anode) and low (cathode) sides of the display.

You could use 74hc04 hex inverters to invert the COM signals before sending them to the UDN chip to drive the anodes.


Would this be easier with common cathode displays, and a non-inverting Darlington array? If not, I'll update the schematic with a 74HC04 between the HT16K33 and the 2N3904.  Thanks again.


I can't think of a non-inverting Darlington driver either, so you might need inverters for that idea too.

For driving the MOSFETs, use 74hc07 rather than 74hc04. The '07 is non-inverting and has open-collector outputs which are ok up to 30V.

If it were my project, I might consider abandoning the HT chip in favour of 2x tpic6b595 shift registers per digit. But that would be 12 chips and a lot of series resistors. This would not be multiplexed.

Or 2x tpic6b595 and 1x tpic6b595 driving high-side MOSFETs for the anodes. But then you have to perform multiplexing in your Arduino sketch.


This shows how to connect a p-channel MOSFET.

Go Up