Go Down

Topic: TLC5940 + high current (Read 18683 times)previous topic - next topic

yopla

Apr 02, 2009, 07:30 pm
Hello, I thought the TLC5940 could drive each channel at 120mA, ended burning two chips before looking at the power dissipation equation in the datasheet and realizing that won't work if I want all my led strips on at the same time.

Now I'm looking to use transistors (TIP120) to switch the 120mA current. Here was my plan : TLC5940 OUTx to base of TIP120 and pull-up resistor (10K) :

Code: [Select]
`        5v      12v        |       |        10k    LEDs (120mA)        |      /OUTx ---------||               \                v                |                GND`

The problem is that I'm not able to completly light-off the LEDs when I set OUTx to 4095. There's a remaining voltage of 0.1v between the base and the emitter which is sufficent to let the current go through the transistor.

I use an IREF resistor of 1.8K (=> 20mA draw) and I'm not willing to draw more current (burning + consumption issues).

Does anyone know how I could solve this problem ?

Thanks for your answers.

big_mark_h

#1
Apr 03, 2009, 10:26 am
If you want to run multiple LEDs in series from each OUTx pin, this document from Texas Instruments might help. It gives details on using a MOSFET to accomodate higher LED supply voltages, and LEDs in series.

Grumpy_Mike

#2
Apr 03, 2009, 10:48 am
Quote
when I set OUTx to 4095. There's a remaining voltage of 0.1v between the base and the emitter which is sufficent to let the current go through the transistor.

4095 is normally the maximum brightness not the minimum one. You get this inversion because you are using a transistor and that inverts the signal and that is your problem. You are always going to get this with the way the circuit operates, you don't see it in normal operation because it is only one clock pulse away from being full on and you don't notice it is not full on. Here you do notice it is not full off.
I am not sure if there is any way round this with the setup you have.

yopla

#3
Apr 03, 2009, 03:10 pm
@big_mark_h

I have seen this document. But with their setup the high current still goes through the TLC, which means that it will burn the TLC. The document wants to accomodate the chip with higher _voltage_ levels (which implies a higher number of leds in series). But not with higher _currents_. Or do I miss something ?

In my setup I have only 12V, for strips of 3 leds in series at 20mA and I need to draw a current for 6 stripes in parallel (120mA). So that won't help since I'm stuck with 12V.

@grumpy_mike

Thanks for the explanation. I didn't think about that. Grrr.

I thought about the following solution, but I'm not sure if it will work, but maybe someone more experienced knows :

Use four (what remains in my hands) TLC5940 in parallel drawing 30mA currents. All corresponding inputs of the TLCs are connected together aswell as all corresponding output pins.

Code: [Select]
`        12V -------------------------                |   |   |   |   |   |                V   V   V   V   V   V                |   |   |   |   |   |                V   V   V   V   V   V                |   |   |   |   |   |                V   V   V   V   V   VTLC1 OUTx --\   |   |   |   |   |   |TLC2 OUTx ---\__|___|___|___|___|___|TLC3 OUTx ---/TLC4 OUTx --/`

Do you think that would work ?

Oh and by the way knowing that all LEDs are the same should I still put a resistor in series on each strip or is it ok without (at least I'll put one in front of the OUTx connections to drop the remaining voltage and hence dissipate less power according to the equation) ?

Thanks.

yopla

#4
Apr 03, 2009, 03:34 pm
And I forgot to ask would the first idea work actually with in a PNP setting ? Collector to GND, emitter to LEDs and base to TLC OUTx without pull-up ?

yopla

#5
Apr 04, 2009, 10:18 pm
Regarding leds in parallel it seems safer to put resistors on each strip.

And for the PNP vs NPN you'd still need a pull up to be able to sink current in the base, but other than that wouldn't it work ?

Now back to the idea of TLCs in parallel,  I'm not sure I fully understand the power dissipation equation of the TLC5940 :

P = (Vcc * Icc) + (Vout * Imax * (DCn / 63) * d * n)

where

Vcc: device supply voltage
Icc: device supply current
Vout: TLC5940 OUTn voltage when driving LED current
Imax: LED current adjusted by IREF Resistor
DCn: maximum dot correction value for OUTn
n: numberof OUTn driving LED at the same time
d: duty cycle defined by BLANK pin or GSpwm value

I don't really understand what Vout stands for is it the voltage at the OUTn pin after the voltage drop of the LEDs or the voltage applied before the LEDs (12V) ?

I think it is the former and in my case by using resistors in series with the LED I have a max. remaining voltage of 2.5V at a given OUTn pin. Thus sinking 30mA when everyhting is on results in a power dissipation of :

Vcc = 5v
Icc = 60mA (max according to dsheet)
Vout = 2.5
Imax = 30ma
DCn = 63
N = 16
d = 100%

P = (5 * 60e-3) + (2.5 * 30e-3 * 1 * 1 * 16) = 1.5W

which is well below the max of 2.4W.

Actually I could even run them at 40ma (P = 1.9W) and use only three TLC in parallel to get to my 120ma but maybe I prefer to err on the safe side.

Can anyone confirm I'm using the right numbers ?

Grumpy_Mike

#6
Apr 06, 2009, 10:26 am

Quote
Regarding leds in parallel it seems safer to put resistors on each strip.

This chip will limit the current but in parallel there is no guarantee that they will share so a resistor would be prudent. Your circuit shows the LEDs in series, there would be no need for an LED like this.
Note that you can't use 12V unless you use the MOSFET like the application sheet showed as the absolute maximum Vcc is 6V with 5V working.

Quote
I don't really understand what Vout stands for is it the voltage at the OUTn pin after the voltage drop of the LEDs or the voltage applied before the LEDs (12V) ?

This is the voltage on the Vout pin, this is normally Vcc - Forward volts drop of the LED.
Note also that the 2533mW power dissipation is only if you can hold the case of the chip at 70C.

yopla

#7
Apr 06, 2009, 01:26 pm
The chip needs a Vcc of 5V, but the maximum allowed voltage at the OUTx pins is from -0.3V to 18V, thus I don't think there's a problem of using 12V for the LEDs.

For the power dissipitation actually the right number for me seems to be 1572@70° (dip package). So four chips seem needed for my 120ma. What do you mean by if you can keep it a 70°, you think it actually may raise a lot above this ?

Thanks.

P.S. Tried with two TLC @20ma in parallel to draw 40mA and seems to work.

Grumpy_Mike

#8
Apr 06, 2009, 01:47 pm
Quote
he maximum allowed voltage at the OUTx pins is from -0.3V to 18V,

Yes sorry didn't spot that.

Quote
thus I don't think there's a problem of using 12V for the LEDs.

Yes i would say so.

Quote
What do you mean by if you can keep it a 70°

Depending on how you mount it and what enclosure it is in you could exceed this, that's all.

rocketgeek

#9
Apr 10, 2009, 12:22 am
Another option is to use a P-channel mosfet on each channel. Source goes to +12V, drain to the LED/resistor combo, gate to the output of the 5940 with a pull-up. Ground the other side of the LED/resistor combo.

Since a P-channel mosfet is turned on by taking the gate-source voltage negative, and the 5940's outputs are active-low, this will turn on the mosfet when a direct-connected LED would turn on. And your LED will behave as you expect.

rocketgeek

#10
Apr 10, 2009, 12:46 am
Add a small resistor in series between the gate and the 5940 output pin -- enough to keep the current within spec assuming a momentary (tens of ns) dead short from the gate to +12V. I'll get to why in a sec.

Mosfets are turned on/off by adding/removing charge from the gate. The amount of charge required is called the gate charge, abbreviated Qg on datasheets, and generally measured in nano-coulombs (nC). Small power mosfets in the 20-30V range often have Qg of ~1 nC; Qg goes up with device size and voltage.

In order to keep the mosfet saturated and dissipating the minimum amount of heat, you want to get that charge on and off there are fast as humanly possible. The gate is a capacitor, so it can source/sink surprisingly large current peaks. Big mosfet drivers can often source and sink gate current of 2-3A for a few ns each cycle, and I've seen discrete power circuits to drive even larger gate currents still for switching really big mosfets. The pull-up resistor needs to be sized so that the current that it allows to flow into the gate during is as large as possible without burning the 5940 when they are all on full.

nemik

#11
Jul 01, 2009, 03:06 amLast Edit: Jul 01, 2009, 03:03 pm by nemik Reason: 1
rocketgeek:

Thanks for these tips. I'm in the exact same situation. I tried your suggestion using a J176 (http://www.fairchildsemi.com/pf/J1/J176.html) P-channel FET. Unfortunately, the LED just stays lit the entire time. Any other suggestions?

I'm really confused as to why a P-channel isn't working in this case though.

EDIT: nevermind, i'm dumb. forgot the 10k load resistor from drain to GND, works perfectly with it.

hcgilje

#12
Jul 09, 2009, 06:37 pm
Hi,
I have been trying to get the tlc5940 to work with high current leds in combination with a npn transistor and a constant current regulator, and have some issues, which makes me wonder if I am doing something wrong either on the hardware side or the software side (already posted a similar post in the tlc5940 library thread without any replies).

I had no problems getting the tlc to work with 16 normal eds and using the "basic use" sketch from the examples.
I want to use it for LEDs which draw more current than what the tlc5940 can handle, and after some research here in the forums I found two solutions, either using a mosfet or a NPN transistor.
I decided to go with the NPN solution.

I hooked up 5 high current leds (3W, drawing 700mA each) on the first five channels, and used normal leds for the rest of the channels.
I used a 10k pull-up resistor for each of the high current channels, each channel connected to a tip122 (through a 1k resistor) which again is connected to the led and a constant current regulator (LM317).
The Iref resistor is 2k (so about 20mA current from the tlc5940).
See the schematic for more details.
http://www.bek.no/~hc/downloads/powerled_schematic.png

As exected the values are reversed so 0 is on and 4095 is off.

I made an extremely simple sketch, first one with only turning on/off channel 0, the first of the high current leds.
The led turned on/off as expected. However, the other channels behaved strangely, going on and off more or less randomly (at least I haven´t found a logic to it yet), often many of them turning on/off at the same time.

When I expanded the sketch to turn on/off all the high current leds in a sequence, they behaved as expected, but again, now and then the other channels behaved strangely.

Today I hooked up 6 more, so a total of 11 leds, and this produced some very inconsistent results, so I don´t know where I am doing something wrong.

Here is the simple test code I used with the five leds:

Code: [Select]
`#include "Tlc5940.h"void setup(){  [shighlight]Tlc[/shighlight].init();// I added these two lines to see if it helped, but they didnt make a difference   [shighlight]Tlc[/shighlight].clear();   [shighlight]Tlc[/shighlight].update();}void loop(){  tlcflash(0);  tlcflash(1);    tlcflash(2);    tlcflash(3);    tlcflash(4);  }void tlcflash(int [shighlight]tlc[/shighlight]) {  [shighlight]Tlc[/shighlight].set([shighlight]tlc[/shighlight], 0);  [shighlight]Tlc[/shighlight].update();  delay(1000);  [shighlight]Tlc[/shighlight].set([shighlight]tlc[/shighlight], 4095);  [shighlight]Tlc[/shighlight].update();} `

thanks for any input.

hc

Grumpy_Mike

#13
Jul 09, 2009, 10:35 pm
If you remove some LEDs does the behavior change or does it remain the same for the same pins?

I suspect it changes, this sounds like a classic case of lack of decoupling on the power supply both to the chip and to your power LEDs. By this stage you are switching a lot of current and if your layout and decoupling is not up to scratch then this is the sort of behavior I would expect.

hcgilje

#14
Jul 09, 2009, 11:52 pm
I will check more tomorrow, but you are suggesting adding decoupling capacitors?

hc

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy