Effect of using resistors w/ constant current LED driver? - Page 1
Forum section: electronics / projects

author: Starlord
author_rank: Frequent Contributor
timestamp: September 10, 2015, 10:00:06 am
content: I have a bunch of high power and 5mm LEDs I want to drive with the following chip:http://www.ti.com/lit/ds/symlink/tlc59116.pdfWhat I would like to do is set the constant current to 120mA to drive the high power LEDs, and then add some resistors for the 5mm LEDs to reduce the current to 20mA.The problem is, I believe if I stick a resistor on there that the constant current output will just peg itself at 5V trying to put out 120mA, and then what I will be left with is an LED being driven by a resistor. But an LED driven by a resistor isn't constant current, which means the current will vary depending on the voltage of the LED attached, which isn't really what I wanted.I just wanted to know if my intuition is correct on how this circuit will behave.I realize I could use a couple TLC59108's with different current settings, but using the single chip would be cheaper and more compact, and the resistors cost next to nothing to place. I also realize that I can't drive too many high powered LEDs at once with this chip without thermal issues.

author: max666
author_rank: Frequent Contributor
timestamp: September 10, 2015, 10:39:50 am
content: Yes, if you would put a resistor in series with the 5mm LED, the constant current output would just try to compensate until it gets 120 mA or until the supply limit is reached.But you could put a resistor parallel to the 5mm LED, so that 20 mA flow trough the LED and 100 mA through the parallel resistor, which would make the current source happy. The question is, would that make you happy?Do all of the LEDs have to be controlled individually?Otherwise you could parallel up, let's say 6 of the 20 mA, LEDs and put them on one current output (but I would also give every LED a small series resistor to help with current sharing among the 6 LEDs).Or you could set the TLC59116 to 20 mA output current and connect one of the 120 mA LEDs to 6 joined up 20 mA outputs. Or any combination of 6x20, 3x40, 2x60, 1x120.EDIT: Also just want to mention that the outputs of the TLC59116 are capable of switching up to 17 V, so again if not all of the LEDs need to be controlled individually then you could put some LEDs in series and save some pins.

author: Starlord
author_rank: Frequent Contributor
timestamp: September 10, 2015, 10:58:59 am
content: Yeah, I'm not down for wasting 100mA per LED in a battery controlled application, and the LEDs need to be individually controlled. :/ Also, I've only got a 5V supply.And yes, I could parallel outputs to increase the current, but I can't waste six outputs on a single LED; I have five or six high powered LEDs I want to drive.(Not all at once, one or two at a time and not constantly.)Well I guess I'm stuck using separate drivers, unless I decide I'm willing to live with some variance in the current when driving the small LEDs.

author: onlooker
author_rank: Frequent Contributor
timestamp: September 10, 2015, 12:08:48 pm
content: Tlc59116 can individually program the brightness of each OUT with PWM. That is, you should not need resistors when you want to mix 120mA LEDs with 20ma LEDs on the same driver IC.

author: Starlord
author_rank: Frequent Contributor
timestamp: September 10, 2015, 12:26:28 pm
content: Yes, but if I make a mistake in the code at some point then I'll blow up the LEDs. And not all LEDs may be rated to withstand 120mA even for short bursts.

author: onlooker
author_rank: Frequent Contributor
timestamp: September 10, 2015, 12:41:24 pm
content: Yes, there could be risk. But, the datasheet will tell the limit on burst current. My guess is that 120 ma pulsing for 20 ma continues is not that bad since I have read someone tested 2A pulsing on a 20ma LED w/o destroying it. Then, you need your own test (LEDs are cheap anyway).

author: ajb
author_rank: Super Contributor
timestamp: September 10, 2015, 02:18:08 pm
content: There are other drivers that allow you to set the current individually per channel, although off the top of my head I don't know of any that are I2C. If you don't mind using SPI (plus a couple of other pins), the TLC5940/59401 will do the job. It does 12-bit PWM and has IIRC 7-bit current adjustment, and the '5940 will allow you to store the current correction value into EEPROM if you're worried about accidentally frying an LED with a coding mistake.

author: Starlord
author_rank: Frequent Contributor
timestamp: September 10, 2015, 05:52:42 pm
content: No, it's gotta be I2C. And the 5940 isn't purely SPI either, it requires you to supply a grayscale clock.

author: Frant
author_rank: Regular Contributor
timestamp: September 10, 2015, 06:23:29 pm
content: How about the LTC3220?

author: Starlord
author_rank: Frequent Contributor
timestamp: September 10, 2015, 07:03:04 pm
content: The LTC3220 is over $5 in singles. I could get a couple of those TI chips for that.But I've got another question... I had considered using this chip to PWM a constant current driver:http://www.nxp.com/documents/data_sheet/PCA9685.pdfBut someone pointed out that the constant current drivers I was looking at could only be PWMed at up to 10MHz:http://www.diodes.com/_files/datasheets/BCR420UW6_BCR421UW6.pdfBut I'm wondering if there isn't an issue after all, because when I was tying to figure out how I might PWM the drivers myself, I realized that just because you have a resolution that requires a 25mhz clock, it doesn't mean your pin is going to ever be toggled at 25mhz. And it looks like that chip would actually toggle the pin at 1526hz at most.To put it another way, 1526 times a second, the pin goes high, and then maybe 1/4096th of 1/1526th of a second later (if the 12-bit brightness is set to 1) it goes low again, but it would stay low until the next 1/1526th of a second period comes around. So it really wouldn't be getting toggled that fast and my concern about burning up the transistor is unwarranted.Here's that thread:https://www.eevblog.com/forum/projects/using-an-inverter-w-an-led-driver-to-control-a-high-power-cc-led-driver/msg750254/#msg750254The other idea I had was to do this with the TLC59116 and use a cheap 6 port inverter so that when the thing powers up the outputs are low, as that's what the high power LED driver requires.Oops, the high power LED driver is limited to 10KHz not 10MHz, and the TLC59116 operates at 96KHz I guess? But the PCA9685 might still work?I wonder if there's any other chips like that. It's got 16 outputs and I only need 6 to drive the high powered LEDs. I'd think there'd be something cheaper with fewer outputs out there with the lower PWM frequency.

author: ajb
author_rank: Super Contributor
timestamp: September 10, 2015, 08:58:20 pm
content: You are correct that the PWM frequency is the clock frequency divided by the number of steps, that's why I was saying in the other thread that a higher resolution PWM gives a lower PWM frequency for a given clock frequency. You'll also want to watch out for minimum on and off times with your LED driver if those are specified.Another option, if you don't need that many channels, would be to gang several constant current outputs together. That may at least get you to the point where your per-channel current is within what your low power LEDs will tolerate at a limited duty cycle.

author: Starlord
author_rank: Frequent Contributor
timestamp: September 11, 2015, 05:57:08 am
content: Does anyone know how I can calculate the external resistor needed for a particular current with these?http://www.diodes.com/_files/datasheets/BCR420UW6_BCR421UW6.pdfThey have a graph on page 5 for the BCR421, which is the one I'll be using, but I can't figure out from that how to arbitrarily calculate current output for a particular external resistor with 5V on the enable pin.

author: onlooker
author_rank: Frequent Contributor
timestamp: September 11, 2015, 12:54:18 pm
content: The enable pin can take from 3.3V to 18V and the CC is independent of it.The device maintain about 1V on the Rext pin and the CC is calculated by I=1/R where R = Rint//Rext. Rint here is 95.You LED's forward voltage should be below Vsupply - 1.

author: Starlord
author_rank: Frequent Contributor
timestamp: September 11, 2015, 03:01:25 pm
content: Quote from: onlooker on September 11, 2015, 12:54:18 pmThe CC isn't independent, because if you look at the graphs they're of the output current versus the enable voltage, for fixed values of resistor.

author: onlooker
author_rank: Frequent Contributor
timestamp: September 11, 2015, 05:17:04 pm
content: "Independent" is in the view with an idealized forward voltage for the 2 involved diodes. In reality, around 5 V, the diodes has about 100R dynamic resistance, which is small comparing to the 1.5k in series for Ren. This dynamic resistance will be much smaller,when Ven, hence, the current is increased.That is, if you change Ven from 5V to 10V, voltage on Rext pin increases by about <0.35V or CC increases about <35%.