12V 7 segment LED display

Hi, I have been looking around for a nice solution to driving 3no. large 7 LED segment displays @ 12V and came across this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1212882269/15 - the last post in the thread is very neat so happy to have found a good solution I headed out to find some Allegro 6278EAT chips for the project..... only to find they are out of production :frowning:

I'm wondering if anyone can suggest an alterntive chip or an equally nice solution to the problem....

Try the TLC5916 or A6275.

Are the segments common anode or common cathode?

Hi, sorry, should have mentioned that... the displays are common cathode.

Thanks Chagrin, I will take a look at the 2 chips you mention.

Hi, looks like the TLC5916IN could be a good option as it can be driven by 3V3 and respects the http://arduino.cc/en/Tutorial/ShiftOut I think?.... which would be a great help :slight_smile: May I ask what other components I should get in the order to make this work?

Crossroads' question applies here; if your digits are common cathode then these chips won't work. Both chips (and the A6278) sink current.

I'm not aware of any chips in the same style as these that source current.

UDN2981 can control sourcing of current.

I Don't think I fully understand the current sink issues.... But learning all the time. Would I be right in thinking the TPIC6B595 could be a good option here?

Source is a positive output and sink is a negative output. As you mentioned your segments were common cathode (they all share a single, negative output) that would mean that the TLC5916 etc. would not work since all of their outputs are negative.

The TPIC6B595 and similar shift register chips would probably be your only option. However, unlike the TLC5916, the TPIC6B595 is not a constant current device so you will need to use a resistor on each output to limit current.

Here's a way to do it.
Need a High Voltage current sink such as a TPCI6B595 (or 7 discrete transistors, or a ULN2003, with Arduino providing the latching data function), and 3 NPN transistors (or 1 for every digit you have).
The current is provided from 12V thru a current limit resistor to each segment. All digit segment A are connected in parallel, all B's in parallel, etc.
So for digit1, you will control which segments are on by letting the segments be high and taking the common cathode low. Segments you want all have their anodes pulled low by the shift register.
Drive anodes, drive cathode.
Drive anodes, drive cathode.
Repeat for remaining digits.
Cycle thru quick enough to be flicker free.

Thanks for taking the time to explain Chagrin & CrossRoads, its very much appreciated.... and I am starting to understand a little better.

I can see how your circuit works CrossRoads, this might well be the way forward.

May I check my thinking with you on a couple of points?

  • Using a MEGA, I could simply use 3 X UDN2981 with a pin dedicated to each segment of each digit (prefer to use a shift register however so as to learn some more).

  • Could one use 3 x 74HC595 shift registers to control 3 x UDN2981 - perhaps a bit long winded but again it might be a simpler project for me in terms of learning :slight_smile:

point5:

  • Using a MEGA, I could simply use 3 X UDN2981 with a pin dedicated to each segment of each digit (prefer to use a shift register however so as to learn some more).

Yes, but in practice you'd find this difficult. It's a lot of wires to connect to the Mega and the code would be much larger and clumsier.

point5:

  • Could one use 3 x 74HC595 shift registers to control 3 x UDN2981 - perhaps a bit long winded but again it might be a simpler project for me in terms of learning :slight_smile:

That would work as well. I'd suggest using the TPIC6B595 or other shift register though so you could eliminate the need for the UDN2981 (the TPIC6B595 is 150ma per output where the 74HC595 is 6ma).

It may be easier to find and use discrete transistors than to hunt up display driver IC's.

For common cathode displays the segment drivers between the Arduino and the display may be a pair of transistors. The driver is a PNP with it's emitter to the display VCC, the collector to the display digit, and the base connected to the collector of the NPN pre-driver through a resistor. A 1 meg ohm resistor goes from the driver base to display VCC. The pre-driver emitter is grounded and the base goes to the Arduino output via a resistor. The value of the series resistors should be between 1-10k ohms depending on the desired collector current and transistor hfe. A current limiting resistor is placed between the display and the transistor, it's value based on the display forward drop, supply voltage and desired current limit. (VCC-VF/I).
The common cathode segment drivers may be NPN transistors, emitter to ground, collector to common cathode, base to Arduino output via a resistor (1-10k).
Transistors need to handle the desired current and voltage.

You could lose 1.6 to 1.8V across the PNP drive transistor
From the UDN2981 datasheet page 3, for instance,
Collector-Emitter Saturation Voltage

which could mean not all of the LEDs in a segment turning on.

With multiple segments and the NPN on the cathode, this could be a lot less drop. WIth N-channel MOSFET, even smaller.

I was assuming using a multiplex driver. The arduino can only drive up to 5v at 20ma per output. That's why you need external drivers for a 12v display. The anode driver which is connected to the 12v line would use a PNP transistor driven to saturation to control the 12v to the anodes of the display. The NPN predriver inverts the logic and protects the arduino from the 12v present needed to turn OFF the PNP transistor. The cathode drivers switch the display cathodes to ground and probably won't see more than 5v so they could be driven directly by the arduino unless more than 20ma of current is required. In a common anode display this might work, but in a common cathode display an NPN transistor would be needed driven by the arduino to handle more than one segment's current. The SEGMENT drivers have the current limiting resistors, the DIGIT drivers do not. I don't think you would have a problem with uneven lighting of the segments in a multiplexed scheme with external transistors handling the extra voltage/current. Those IC display drivers are bipolar transistors inside don't forget. (Some us darlington connected transistors to reduce the drive and you can use external discrete darlington transistors as well).

You probably do need to use a high enough driver VCC supply voltage to account for the emitter-collector sat voltage in both the anode and cathode drivers, the display forward voltage, and what's lost in the current limiting resistors. Also the current limiting resistors have to dissipate the required power.

There is a nice little Buck Mode Switcher that will handle 2A from Ebay @ http://www.ebay.com/itm/260858526297?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649#ht_2466wt_1168
It Will take 12 Vdc in and put out whatever lower voltage you might require. @ 98% Eff. and at a 2A load @ 5V the switcher losses would be about 200 Mw... 2% of 10 W (5V x 2A = 10W) = .2 W
This and a 5V shift register or two (74C595's) chain up nicely with 3 wires to whatever driver you might choose. The nice part is they only cost $1.94 so if you are worried about total power dissipation then use several,
they are certainly cheaper and easier to find than the High Current level translating drivers (12V outputs to 5V logic).

Doc

I think you've missed the point Docedison.

Large displays, such as

need 12V to drive the 5 & 6 LEDs in series that make up a segment.
(altho this sparkfun example is common anode, not common cathode).

So a 12V source needs to be controlled.
One way is to divert the current from segments to turn them off, as I drew up, and to let the current flow to turn them on.

Another way is to switch the voltage on and off at the anode using either as PNP transistor or a P-channel MOSFET.
P-channel transistors, such as those used in UDN2981, have a large voltage drop across them, so Source voltage of 12V + Vce needs to be available.
I don't know of P-channel mosfet arrays, thus you need individual parts - and an NPN transistor to drive the gate. The NPN base can go 0/5V to turn it on/off, allowing the P-channel gate to swing 0/12V to let it turn on & off.

Hi, I have now built a circuit based on the TPIC6B595 to drive the common cathode displays. The first attempt worked in that it displayed the numbers correctly but the resistors goot too hot when the segments were not on !!! Each digit, fully illuminated, drew about 125mA (each segment draws about 15mA when on) - when all the segments were off the current jumped right up to about 1.5A - lots of heat coming off those 100R resistors.

The next attempt was very similar but using the TPIC6B595 to switch 2N7000G mosfets - I guess the theory is right but something is wrong in my circuit because it just doesn't want to play.

I have seen some circuits with a 100nf ceramic cap across the TPIC6B595 (connected to VCC & GND?).... decoupling? and a resistor on the common cathode/anode line on the digits - I don't know if adding either of these will help?

This is what I have done.....

Yeah about 10 minutes after I posted that worthless reply I figured it out... I do apologize. You made a comment about resistors getting hot as well as drawing 1.5 A when all displays are off... Did you ever post a drawing of what you are doing/trying to do and have you checked your thinking about it... electronics equipment doesn't usually draw excessive current when quiescent, it is usually the other way around, that UDN29XX device has a good deal of open voltage across it but should drop to nearly 0 volts when on (Across the switch fet or transistor) the diodes and connection to Vsupply Led is for back EMF protection, diodes that are in effect across the load to Vsupply Led (They are for solenoids or relays usually) but should work well in your application. IMO

Doc

Your circuit is not correct. Try it like this.
TPIC6B595 can not drive high, need a pullup resistor to turn off the P-channel MOSFET that sources current into the anodes of the segment.
N-channel MOSFET is not the right part.