Driving LEDs with constant voltage

I have some 7-segment displays I'd like to drive from a uP output...the
segments have a common cathode.
5 volt digital outputs from the uP are available, and the red LED
segments have a forward voltage of around 2.something volts.
Current-limiting resistor networks are annoying..so I was thinking of
just connecting the display cathodes to one output per digit through a
TL431 with its REF and anode connected to give 2.5, basically using it
as a zener to drop the voltage, and switch those outputs to scan the
multiplexed digits.
Reply to
bitrex
Loading thread data ...
Den torsdag den 21. juli 2016 kl. 00.28.51 UTC+2 skrev bitrex:
constant current and scan the segments too?
Reply to
Lasse Langwadt Christensen
Plain old LEDs don't like constant voltage -- if you find a detailed enough data sheet you'll see that the "something" in 2.something volts is very temperature sensitive, and that the current is very voltage sensitive. The "something" will also vary from diode to diode.
So if you don't mind something that won't light up at cold because there's not enough voltage, and will make the whole circuit severely unhappy at hot because there's way too much current -- sure! Go for it!
Personally, I'd just accept the eight resistors needed in a multiplexed LED display as the cost of doing business, and decide to be happy.
--
Tim Wescott 
Wescott Design Services 
 Click to see the full signature
Reply to
Tim Wescott
What would be the way to do constant current for a segment? Since all the segments are connected to a common cathode the required current is going to be different, depending on how many segments are illuminated...
Reply to
bitrex
But you can scan both the cathodes and the anodes so each LED is driven separately. Then a single current source does the job. Considering how many transistors it would take to switch the current it seems like it would be easier to have a current source for each digit or each segment (whichever is less).
--

Rick C
Reply to
rickman
Ah, right, that's a good idea.
The TL431 + transistor makes a good current source, I could use a uC pin per digit connected to "Vin" in the following schematic to enable/disable it:
formatting link
Reply to
bitrex
The current source solution will probably work since the digits are common cathode, but I think I'll try constant voltage just for fun...I wonder how cold/hot it'll have to get before the display starts malfunctioning.
Reply to
bitrex
LEDs are pretty resistive in the normal lit region. I've driven them pretty close to "voltage mode"[*] and it worked quite well.
[*
] 3.something volt LEDs with a 10-ohm series resistor, mainly because I was chicken.
It's not that bad. Really. Light output won't be very stable but it works.
Resistors require more headroom, too.
Reply to
krw
It'll work with common-anode parts, as well. Just use the other sex. Try constant voltage. You might be surprised.
Reply to
krw
Since the uP knows what combination of segments are going to be lit, just use PWM to regulate the average current. If only "1" is displayed, use a low duty cycle, if "8" is displayed, the PWM duty cycle would be close to 100 %.
Reply to
upsidedown
I did that once, but it was with 74LS on the breadboard. So, no big deal for output current; the I_OH is roughly a 100 ohm resistor to begin with.
formatting link
(The ribbon leaving on the right side, wraps under and goes to the 8 digit matrix. It's just wired between a pair of 74LS374s. Or maybe they were 273s, I forget.)
A digit was pretty "hot" (over 20mA DC, I think) if the matrix scanning routine froze, and intensity varied somewhat with the number of segments-per-digit lit. Don't think I would recommend it for production.
I'd recommend it even less with CMOS. For an MCU, you may quite easily exceed the current-per-pin, or per-IO-bank, or per-supply-pin rating (usually something like 50 or 100mA, so not even a half dozen LEDs at rated current). It's really quite desirable, and easy, to plop in a proper driver (like a ULNx thingy, but also, you need a high-side one), or an LED driver proper, which can be SPI or I2C and offload a lot of activity (like doing the matrix scan automatically).
TL431 is kind of slow, so don't expect it to respond within a microsecond. You may see some "drool" or shadows between characters, unless you reserve enough dead time for things to settle first. Keep that in mind, if you want to use it like this. Even with the speed issue, it's probably better than a 2.5V zener (which won't be "2.5V" at most currents!).
Tim
--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
 Click to see the full signature
Reply to
Tim Williams
My concern there is that if the uP locks up due to a software error, the outputs could latch HIGH, and if a bootloader is being used to launch the firmware there's very likely enough time between the watchdog timer resetting the uP and the code restarting for the segments to be damaged...
Reply to
bitrex
The problem when I was testing it last night is that when connecting it up, the LED immediately starts drawing too much current, and the TL431 anode voltage doesn't ever rise high enough for it to drop into regulation...
Reply to
bitrex
CV led drive works reasonably well, but you've got to get the voltage about right. Most LEDs are fairly ohmic at reasonable operating currents. The ohmic and the junction drop components have opposite tempcos.
uP CMOS ports have impedances, too, approaching constant-current away from the rails.
--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin
Just connect some LEDs to power supplies and see.
People here theorize a lot and don't experiment enough.
--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin
A better gadget would be a negative voltage regulator, LM337 maybe, pulling the common cathode down towards ground. Adjust the cathode voltage until things look nice.
--
John Larkin         Highland Technology, Inc 

lunatic fringe electronics
 Click to see the full signature
Reply to
John Larkin
While this might be an issue during system development, I do not understand why a product delivered to the customer would have such software or hardware bugs. _Period_.
Reply to
upsidedown
Yes, development was mainly my concern. LED displays aren't that expensive but I'm not made of money (and time) here...
Reply to
bitrex
Interesting. I think I have a few of those in TO-92, will give it a try
Reply to
bitrex
Sadly, there are a couple pieces of music production hardware I've used that run embedded Linux internally, and still have showstopper bugs in them, multiple known ways you can crash the hardware from the UI, and still haven't been fixed ~5 years and three or four software revisions later.
It's kind of criminal that products with bugs like this were even made available for sale...
Reply to
bitrex

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.