Lighting with 3 tlc5940's and 72 rgb LED's(Mostly Complete)

I am planning a LED lighting project for a room using 12 wall sconces with 5 rgb LEDs each. I am curious as to how this would be best accomplished.

My current plan is to have the 5 LEDs(in each sconce) wired in parallel, then using some PNP(2n3906) transistors attach them to one of 3 tlc5940(one for each color).

This seems tedious to me so I was wondering if anyone had a better plan? Also would a system be easier to build with rgb's with common cathodes or anodes?


For the wiring you might consider using one 5940 to drive all three colors in 5 physically consecutive sconces. Part of the reasoning is to keep the 5940s separate from each other. I have learned the hard way that the 5 lines that interconnect the 5940s radiate (400khz which is the pwm frequency in the 5940) and can generate "cross-talk" like interference which in turns causes very erratic behavior of the leds with no relation to you program.

Driving the 3 colors from the same 5940 is really transparent since all you're doing is specifying a point 0-47.

The 5940 is a current sink, therefore common anode would be best. Also, depending on the current draw of the leds, you might simplify things by connecting directly to the 5940 with transistors. If they are 25 ma or less, then the load will be under the max of 130 ma.

i think you can do this just fine. Be sure to design your PCB and/or switching transistor/FET so that you don't have any strange issues.

Ok here is a schematic of what I was thinking

Would this be ok with the tlc5940? Would it have enough power dissipation to run all the LEDS at once?


How far apart of the sconces? This is an important consideration in your design as you may hit limits on how the data can flow directly from the chip to the lights and or chip to chip - which may make the entire design moot. So I would test the distance you want to run to assure your chips / wires work properly at that distance.

This seems tedious to me so I was wondering if anyone had a better plan?

Yes - there is an easier way that is not so tedious. If you get LEDs with built in chips, such as the lpd6803 it makes for a great reduction in the wiring needed as they daisy chain so you only have 4 wires running from chip to chip (clock, data, 5v and ground). Most of these are pre-wired so you only need to splice wires - no soldering needed. Search the forum or internet for lpd6803. Also assure you get a power supply that can handle the load regardless of route.

Best of luck.

Would this be ok with the tlc5940?

No way will that work.

  1. You can't connect LEDs in parallel like this they won't share current.
  2. Look at the data sheet the TLC5940 can't provide enough current to drive all this.

I think I answered this in another thread this morning.

It my understanding that the 5940 can sink 120mA per channel. The LEDs I am using have a forward current or 20mA, would that not only be 100mA to sink? Also I was going to reduce the voltage going into the LEDs to around 2.5V. That way there is very little left the tlc has to worry about.

  1. of what Grumpy_Mike has already posted is very important.

Even if you set the TLC to run say 100mA per channel (which may be tolerable for the chip itself), there is absolutely no way for the chip to control how the current is shared among the leds!

The leds' parameters are not 100% identical, so there will be one that gets more current as it can tolerate and die. After that the 100mA must be spread among the 3 remaining leds and the game starts again. Whiz crackle pop. Magic smoke. The only condition that could be considered as safe with this setup is to limit the total current per channel to the maximum current that one led can take. But of course that way you don't get a lot of light.

All of this is avoided by wiring them in series. Of course you must supply a higher voltage to compensate for that. The maximum voltage of the TLC is in the datasheet.

Ok if I put a current limiting resistor behind each LED like this will it work?

No it will not work. The danger of cross posting is the information gets split up. The TLC chip is a constant current sink, you set the current with an external resistor for the whole chip. But there is a power dissipation limit, this means you wonn't get close to the 120mA current limit. You have 5 LEDs in parallel and while the 150R will allow a bit of current sharing but you will still fry the chip. No you can't reduce the voltage lower than 5v to mitigate against this. Please read the data sheet of this chip.

Ok how about a PNP transistor on each channel. Those transistors then turn on and off the leds.

I would obviously change my LEDs to common cathode ones, like these

By the way I have read the data sheet and understand the power dissipation formula.

I don't want to use any other products nor would I like to use any other chip because I got them free. With this in mind how would you go about powering 5 LEDs per channel?

In case you haven't already purchased your RGB leds, you can get 6pin ones on ebay. These are essentially 3 individual leds in one package. Search for "RGB 6pin". Then you can wire the individual leds in series and be done with this. That way you can run each channel at say 50mA and get lots of light nevertheless. Your power supply also would only have to supply 1/5th the current, but of course 5x the voltage + a bit to play with. There are NICE tunable (nominal voltage +- 10%) switch-mode power supplies out there. I have one of the "MeanWell" brand. Quite affordable.

If you go that way, the power supply would have to deliver at least: Vled x #leds + Vout(I).
The last number can be found in the datasheet of the TLC and will be about 1V, give or take.

Then there's the next issue, namely color balance... You may get away with dot correction or compensate that in software. Ideally you'd use one chip per color.

Ok with that suggestion you have increased the cost of the project from ~$20 to around ~$100. I would really like to do it with the cheaper LEDs. Would the PNP transistors work?

Yes a PNP transistor will work. You also need a resistor in th LED and one in the TLC5940 to act as a pull up / down.

Is this acceptable?

Yes that looks OK. I would check the power dissipation because those transistors will only do 625mW.

Each set of 5 LEDs will consume 83.3 mA. That 83.3 x 5 which is 418.5mW I think I will be ok.

No you calculate power dissipation by the current through the transistor times the voltage across the transistor when it is on.
This voltage is called Vsat or the saturation voltage and is shown in the data sheet as 0.4V so it is that which is multiplied by 83.3mA,, which is even better news.