TLC5940 + high current

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) :

        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.

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.

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.

@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.

        12V -------------------------
                |   |   |   |   |   |
                V   V   V   V   V   V
                |   |   |   |   |   |
                V   V   V   V   V   V
                |   |   |   |   |   |
                V   V   V   V   V   V
TLC1 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.

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 ?

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 ?

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.

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.

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.

he maximum allowed voltage at the OUTx pins is from -0.3V to 18V,

Yes sorry didn't spot that.

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

Yes i would say so.

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.

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.

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.

rocketgeek:

Thanks for these tips. I'm in the exact same situation. I tried your suggestion using a J176 (Intelligent Power and Sensing Technologies | onsemi) 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.

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:

#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

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.

I will check more tomorrow, but you are suggesting adding decoupling capacitors?

hc

are suggesting adding decoupling capacitors?

That is one form yes, but also consider inductors and improving the layout.

http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

I assumed since the LM317 delivers constant current and the outputs of the tlc5940 delivers constant current I would be safe, but I will try with a capacitor between power and ground on the powersupply today.

I just saw this post from a few days ago:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1246438933/9#9

Basically it says "MUST have output caps with the LM317.

Their voltage fluctuates wildly without them."

hc

but I will try with a capacitor between power and ground on the powersupply today.

No not just one but a capacitor on every chip you use, actually on the chip plus a large capacitor across the supply. That is the absolute minimum, if you are switching large currents you might need more.

since the LM317 delivers constant current and the outputs of the tlc5940 delivers constant current I would be safe

No you are not, these devices only delver constant current on the macro scale not the micro scale. They need decoupling more than most to operate correctly.

Adding the capacitors to the lm317 did the trick, I use .1uF on the output voltage from each lm317, and also one across the power supply, but I guess I should increase this one to a larger capacitor.
So now I have 11 3w leds running from the tlc5940.

Thank you Grumpy_Mike!

hc

Hi guys - I'm trying to design a circuit to use the TLC5940 chip to fade groups of common anode RGB LEDs.

My question is whether you can use P-channel JFets to switch on the 'low' side rather than the 'high side'
I will get to what I mean by high and low, but first this is how I want my design to work

They will be in groups of 6 common anode LEDs - arranged in parallel into 3 channels (RGB). that means 6 RGB LEDs, each with a common power source (anode) and using the TLC to fade the three channels of linked cathodes.

There will be 5 separate collections of 6 common anode leds (30 LEDs in total) - with each group being in its own discrete light box, connected and controlled with cat5 cable.

So what I'm getting at is that this isn't a matrix type of question, as for each channel on the TLC chip (i will use 15 or the 16 in total) I will control a separate channel of colour.

As obviously I can't really run the TLC to sink 6x20ma - so 120ma per channel - so some mosfets swithing is in order, from an alternative power supply part of the circuit that I have already designed with the proper capacitors, regulator chip set-up etc.

I know that I could use N channels to switch after the load of the LEDs - however, I would like the use the apparently simpler way by keeping the greyscale fading doing what it is ment to do, rather than always thinking in reverse and having problems turning them fully off.

My question is whether its possible to use P channel FETs on the low side - after load rather than before load, perhaps with a resistor on the drain to keep things going in the right direction. I'm attatching a schemetic diagram with some questions posted on it.

If you guys could tell me if my stuff is flawed etc or what I'd have to do to make it work properly (i.e. I have a pull-up vs pull-down question on the diagram aswell)

& yeah - please just point out if there are any problems or any of the logic behind it - as I can't find good definitive answers. I just want to know before I breadboard this part and start blowing TLC chips. Also resistor values would be handy if you have any ideas aswell

Cheers guys, I really appreciate the input and help that you guys provide (but go easy on me - I'm not experienced at all in either electronics or code)