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

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

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.

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.

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

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 :

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.

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.

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.

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.

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.

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); }

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.