I have some lovely large 7-segment LEDs which I salvaged from an old arcade machine.
They are 1.8" FEM-1801L0BGW (common cathode), the datasheet can be found at http://www.farnell.com/datasheets/99300.pdf
I'm using a 74HC595 + UDN2981 to drive current to the segment anodes, and a ULN2803 to selectively ground the cathode of each digit, and I attach a schematic below.
It all seems to be working, but I guess I'm just asking if anyone would mind casting a second pair of eyes over it and saying whether I'm doing anything wrong, or whether there's any improvements they could suggest? I've tried researching, but all the guides I find on the internet are for Common Anode displays (which, by all accounts, seems a little easier since you only have to worry about sinking current, not sinking AND sourcing).
I've noticed a little bit of "ghosting" (i.e. the segments displayed on one digit are being carried over a little onto the next), and I wondered if that's because the ULN2803 is not switching fast enough - should I add resistors to discharge any residual capacitance? (and, if so, what value/where should they be placed?!)
westgate:
I've noticed a little bit of "ghosting" (i.e. the segments displayed on one digit are being carried over a little onto the next), and I wondered if that's because the ULN2803 is not switching fast enough - should I add resistors to discharge any residual capacitance? (and, if so, what value/where should they be placed?!)
No, it is a mistake in the code which you have chosen not to reveal!
Ha ha - I'd convinced myself it was a hardware issue so tried to only include relevant information in the post. After reading your comment I reviewed the code and realised I didn't quite have the correct sequence of:
Deactivate previous digit -> Latch SR -> Update SR -> Release latch -> Activate new digit
So, all fixed now. Thanks for the nudge! (And I'm assuming that the hardware looks ok to you then
westgate:
I'm assuming that the hardware looks ok to you then
The series resistor for the decimal points should be higher than those for the other segments. The DP only has 2 diodes. Assuming each diode has forward voltage of 1.8V, the current flowing could be as high as ( 12 - 2 x 1.8 ) / 330 = 25mA, which may be too high and damage the leds, but will certainly make them much brighter than the other segments, which have 4 diodes where the current will be ( 12 - 4 x 1.8 ) / 330 = 14mA. You would get a more even brightness if you used 220R for the segments and 470R for the DP.
As a suggestion, you could replace the uln2803 with a tpic6b595. This would save a few Arduino pins because you could chain it to the 74hc595 so it uses the same clock, data & latch pins. However, to avoid ghosting of a hardware nature, you will also need to connect the OE pin of the tpic to an Arduino pin so that you can blank the digits for a brief instant while the latch pin is activated. If you make that pin a PWM pin, you can also dim your display.
@Paul__B I'm familiar with using MAX7219s directly to drive smaller 4-digit 7-segment displays - but I thought they were not appropriate for this project because of the higher voltage required for the LEDs....?
I see that I could use a MAX7219 just to drive the segment anodes (via the UDN2981) in place of the 74HC595, but, as I understand the datasheet, the DIG0-DIG7 pins can only sink <500mA @ 5V, so I'd still need to use the ULN2803 on the low side? So not sure what the gain of using the MAX7219 over the 74HC595 would be?
@PaulRB Good spot on the resistor for the decimal point. Yes, I know 330Ω was a bit on the high side, but I thought it better to be cautious initially! I do have some TPIC6B595s - but it never ocurred to me that these could be chained to the 74HC595, so that's definitely something I will investigate! Is there anything equivalent to the TPIC6B595 that can source current? (i.e. that could replace both the 74HC595 and the UDN2981 on the high side?)
westgate:
I see that I could use a MAX7219 just to drive the segment anodes (via the UDN2981) in place of the 74HC595, but, as I understand the datasheet, the DIG0-DIG7 pins can only sink <500mA @ 5V, so I'd still need to use the ULN2803 on the low side? So not sure what the gain of using the MAX7219 over the 74HC595 would be?
Eh? Just how much current do you want to drive into these displays?
According to the datasheet you cite, these displays are rated at 25 mA continuous per segment, 100 mA pulse at a one in ten duty cycle; you are multiplexing by five so that is just 50 mA.
Eight times 50 mA is 400 mA, easily within the quoted capability of the MAX7219. In fact, you should be using just 40 mA anyway which is actually the design figure for the MAX7219.
The "gain" is twofold; using two ICs instead of three (and only three control pins total) and having the MAX7219 do all of the multiplexing for you so you easily get a stable display. I'd call it a "no-brainer".
(Thanks for your ongoing patience and wisdom!) Sorry, my concern about using the MAX7219 digit0-7 pins to ground the cathodes was not about the current it could sink, but the voltage.
I've highlighted the line from the datasheet I'm concerned about... if I'm supplying 12V to the LEDs, surely that exceeds the V+ limit stated?
(If it's possible to use the MAX7219 to replace all the ICs I'm currently using, I agree it's a no-brainer!)
westgate:
Is there anything equivalent to the TPIC6B595 that can source current? (i.e. that could replace both the 74HC595 and the UDN2981 on the high side?)
Yes, there is MIC5891. I've never used one myself.