TL431 constant current source for LED from 5V

So, the total current from the +5 is twice the desired current?

Reply to
John S
Loading thread data ...

if there's onlt one led, yes. In general (n+1)/n times the total desired current.

--+-------+----+----+----+ | | | | | [P] V\ V\ V\ V\ | T\ T\ T\ T\ |---. | | | | | | | | | | \| | |/ |/ |/ |/ |-+-|----|----|----| ... .. |>. |>. |>. | | | | | [=] [=] [=] [=] [=] | | | | | --+-------+----+----+----+ [=] equal emitter degeneration resistors, eg 10 ohms [P] current setting resistor, eg: 330 ohms. I've drawn NPNs but the PNP circuit is the same with all the polarities reversed, there's

--
umop apisdn
Reply to
Jasen Betts

Did you see Phil Hobb's circuit which is similar but uses a pair of resistors as a voltage divider to set the base voltage? The emitter resistor then sets the current. Pick the right values for all three and it compensates nicely for temperature. I figure I can use the base pull up resistor as an enable input to blank the LED. His drawing uses a PNP while I changed the circuit to an NPN because the LEDs get power from 5 volts and the control signal is from a 3 volt device. This lets the control signal be ground referenced rather than Vcc.

His circuit is a bit sensitive to the accuracy of the base drive

That's nearly half the range I'm trying to compensate for over temperature. Maybe this is not an issue. I will be picking the

Or I can just use an LDO with a low voltage reference pin as a current drive instead of the TL431. The TL431 has too high voltage on the reference pin, but there are plenty of devices out there that will work. Then an NTC thermistor with two resistors do the job of temperature compensation and Bob's your uncle. They often have an enable pin to turn off the LED. One semi for $0.40, a $0.10 thermistor and two resistors. That's not bad.

--

Rick
Reply to
rickman

Not exactly true; the only ways to compensate a base-emitter voltage are all temperature-inconstant, EXCEPT for those that end up with a multiple of the Si bandgap voltage (the TLV431 value, 1.25V, is not a free parameter, it's determined by some physics).

The simple current mirror swamps the Vbe temperature sensitivity with a high voltage source (+5 in this case) so the resistor voltage drop is much larger than the Vbe drop. It isn't zero tempco, but close. Once you pull the base up higher (even with emitter resistors) the thermal drift just gets worse, not better.

There's more ways, of course. You could use a +12V supply,

+12 to program resistor to PNP emitter, PNP base to +5V, PNP collector to LED anode (LED cathode to ground). That swamps the Vbe with 12V-5V = 7V, and gets you to one resistor and one transistor. The main power waste is in the resistor, the transistor can stay cool.

If you want to switch that, you'd use a CMOS output to drive the base,

+5 when you want the LED on, GND when you want it off...
Reply to
whit3rd

The point is not to make a constant current, it's to make a current that compensates for the variation of LED quantum efficiency vs temperature. 'Tain't rocket science--the collector current of a BJT with no emitter degeneration goes up by 9%/K, so if you add 8kT (`200 mV) worth of degeneration, you get down to 1%/K, which is the desired amount.

Some dorking will be required to get the slope right, but it isn't a precision application, so it won't have to be adjusted unit-by-unit.

Adding a voltage reference to make the 200 mV supply-independent is another bell and/or whistle that might be worthwhile.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

Once you start getting into adding voltage reference territory I'd just use a 40 cent microcontroller that has a temperature sensor on die, with the required current vs. temperature curves stored in EEPROM. Most uC temperature sensors are good to +/-5 degrees C or so I think. Interpolate.

Just use an RC filter with a big capacitor to smooth the DAC PWM and a transistor current source with sense resistor feeding the AD input and I think the uC could stay in power down mode most of the time.

The whole program could probably fit into 512 bytes of Flash or less.

Reply to
bitrex

Sure, there are lots of ways to do it. But one ten-cent TL431 can drive all the LEDs.

Cheers

Phil Hobbs

Reply to
Phil Hobbs

I think one of the advantages of uC approach is that it is easily adaptable to different LEDs should production requirements change. Just digitize a new set of curves. No changing components

Reply to
bitrex

And one of the nice things about the single transistor approach is that you can be sure that there'll be transistors for awhile. ;)

Also the flexibility you talk about only applies if all the LED colours behave the same way--otherwise you need extra parts.

Cheers

Phil Hobbs

Reply to
Phil Hobbs

The reason why I wouldn't use an MCU for this is that an MCU is a PITA in production compared to soldering a few resistors on the board. If it is already on the board doing something else it would be easily pressed into PWM service. But I would never add an MCU for this, at least not until the quantities got well above the 10K range. Even then I'm not sure it would be cost effective.

--

Rick
Reply to
rickman

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.