Dimming 16 1W LEDS

I'm doing a project where I want to dim 16 LED individually. I've done some tests with shiftpwm library, 595 chip and simple 5mm LEDs (they use about 20mA). It works great. Now I need to do the same, but with 1W LEDs (300mA and 3.4-3.6 Volts).

As fas as I understand I have two possibilities:

  1. Stick with 595 chips, and for every LED make some circuit with one or two transistors (or transistor and MOSFET) like this one. Here I have a question - will PWM still work if I connect those crcuits in place of just LED+resistor?
  2. Use few TLC5940 with paralleled outputs. Each of them outputs 60mA on <3.6V, that means I will have to use 5 output pins to drive one LED. Of course this means I would have to set all pins connected to one LED to the same value, but on the other hand, I'll save some time on Arduino by not having to use software PWM, as TLC5940 provides it.

So my question is whether all my assumptions are correct and which variant is better/simplier/cheaper?

TLC5940 data sheet reprint :

• Drive Capability (Constant-Current Sink)
– 0 mA to 60 mA (VCC < 3.6 V)
– 0 mA to 120 mA (VCC > 3.6 V)

where VCC is Supply Voltage, not LED's forward drop voltage. I will vote for 3 TLC chip, instead of mess around with 16 / 32 transistors

Magician:
TLC5940 data sheet reprint :

• Drive Capability (Constant-Current Sink)
– 0 mA to 60 mA (VCC < 3.6 V)
– 0 mA to 120 mA (VCC > 3.6 V)

where VCC is Supply Voltage, not LED's forward drop voltage. I will vote for 3 TLC chip, instead of mess around with 16 / 32 transistors

Oh, so it means that if I'll power TLC5940 with 5V together with Arduino (or just Atmega328 chip as I'm planning) it will give me 120mA per output pin and I'll need just 3 pins per one 300mA LED?

Yes, 3 pins can provide up to 360 mA, if you power IC by 5V.
There is one more things you have to consider, power source for IC and power source for LED have to be different, arduino can't supply 0.3 x 16 = 4.8 A for led's.
Select power supply for leds with output voltage 5 V or even less, as you have to keep an eye on power dissipation in IC:
P = N x Io x Vo = 16 x 0.120 x ( 5 - 3.5 ) = 2.88 W
Vo - is voltage at the output of IC, it's 5 V of source minus forward drop voltage of led. It make sense to lower it as much as possible, in order do decrease power

Don't forget to add FAT capacitors (a couple 1000s µF at least) on the LED supply voltage. Especially if you lower your supply voltage to the point that it barely works and you think about having it lined up like a chain (one board + CAP ... long wire... next board + CAP ... long wire...).

You also need to consider the power disspation of the TLC5940s. Let's suppose you drive 4 LEDs per device, using 12 pins. At full power that's 12 * 100mA = 1.2A per device. The LEDs drop around 3.5v, so if you are using a 5v supply then the TLC5940 drops about 1.5v. The power dissipated by the TLC5940 will be 1.5 * 1.2 = 1.8 watts. This is within the power rating of the TLC5940 in a well ventilated area at 25C, but above the rating at 70C. So I suggest you use stick-on heatsinks and make sure you have good air circulation around them.

Alternatively, stick with your 595s and use a transistor and two resistors to drive each LED. This will be substantially cheaper, given the price of TLC5940s.

THanks everyone for answers! :slight_smile:

I already have received my 1W LEDs and decided to use TLC5940. Connected everything using old PC power supply, that fits my needs perfectly - it gives 5V (for arduino and TLC5940) and 3.3V (exactly was is needed for LEDs).

Questions:

  1. I have connected 3 outputs of TLC5940 to LED, and changed resistor from 2k (as described in library wiki) to 333 so tlc should give me about 350mA per 3 channels. Now when I set those channels to 0 brightness LED is still glowing a little bit. Why and how can I change that?

  2. I'm making LED to start glowing with fade and then turn off also with fade. But it looks like it reacts to brightness levels no uniformly. It starts shining quite bright very quickly and then brightness gets up not so quick. The same goes when led is going to be off. Is it a problem with TLC5940 or LEDs? Why brightness is increasing not linearly?

jarik:

  1. I have connected 3 outputs of TLC5940 to LED, and changed resistor from 2k (as described in library wiki) to 333 so tlc should give me about 350mA per 3 channels. Now when I set those channels to 0 brightness LED is still glowing a little bit. Why and how can I change that?

Do you have a 100nF ceramic decoupling capacitor connected across the Vcc and Gnd pins of the TLC5940?

3.3v may too low a voltage to drive the LEDs from. The TLC5940 needs around 1v or more on its output pins to sink 120mA (see fig. 5 on the datasheet), so the minimum supply voltage you need is 1v + the voltage drop of the LEDs.

jarik:
2) I'm making LED to start glowing with fade and then turn off also with fade. But it looks like it reacts to brightness levels no uniformly. It starts shining quite bright very quickly and then brightness gets up not so quick. The same goes when led is going to be off. Is it a problem with TLC5940 or LEDs? Why brightness is increasing not linearly?

The eye does not respond to brightness in a linear fashion. You need to fade the LEDs in a non-linear fashion in order to give the appearance of linearity.

Does 100nF stands for mikroF or pikoF?

dc42:
The eye does not respond to brightness in a linear fashion. You need to fade the LEDs in a non-linear fashion in order to give the appearance of linearity.

Maybe you know the name for this effect so I could google for it, or even a link to some solutions...?

Does 100nF stands for mikroF or pikoF?

nF stands for nano Farads or ten to the minius 9.
100nF is the same as 0.1uF (micro Farads)

Maybe you know the name for this effect so I could google for it, or even a link to some solutions.

See:-

Grumpy_Mike:

Maybe you know the name for this effect so I could google for it, or even a link to some solutions.

See:-
Gamma correction - Wikipedia

someone really should forward this link to all those chinese LED fixture companies. Damn.

Thanks to you guys I have some working prototype now! :slight_smile:

I also have one question I need your further help. I have 5pcs of TLC5940 for 20 1W LEDs. I'm planning to use 4 pins of TLC5940 for driving one LED. According to my calculations if I'll use resistor with 520 Ohm TLC will give 75mA on each pin, that will total to 300mA for each LED.

Now I'm unsure how to calculate power dissipation. Because what was written by dc42 and what is written in datasheet seems to me different. I'm using 5V power supply for circuit and 3.3V for LEDs. If I understand it correctly, it is written in Equation 7 in datasheet that power dissipation is how many watts TLC uses itself plus how many watts LEDs are using (I'm not using dot correction and those other things :)). This gives me about 4W, whereas TLC5940 can handle about 2.5W in temperatures under 25C. Can somebody confirm that I'm counting it correctly?

And what do you think about using RAM heatsinks on TLC5940? Will they help dissipate more heat?

jarik:
Now I'm unsure how to calculate power dissipation. Because what was written by dc42 and what is written in datasheet seems to me different. I'm using 5V power supply for circuit and 3.3V for LEDs. If I understand it correctly, it is written in Equation 7 in datasheet that power dissipation is how many watts TLC uses itself plus how many watts LEDs are using (I'm not using dot correction and those other things :)). This gives me about 4W, whereas TLC5940 can handle about 2.5W in temperatures under 25C. Can somebody confirm that I'm counting it correctly?

The calculation I gave ignores the current taken by the TLC5940 itself (the Vcc * Icc term in equation 7). Icc is about 60mA worst case. So you need to add 60ma * 5v = 0.3W to the calculation I gave. I also assumed that you were not using dot correction. In equation 7, Vout is the voltage actually appearing at the output pins when they are on (i.e. LED supply voltage - LED forward voltage drop), not the supply voltage. There is a minimum Vout that you need to get the required current - see Fig 5 on the datasheet.

jarik:
And what do you think about using RAM heatsinks on TLC5940? Will they help dissipate more heat?

Glue-on DIP heatsinks might fit better, see http://parts.digikey.com/1/parts-kws/dip-heatsink.