Controlling a lot of RGB LEDs
MioTheGreat
Posts: 9
Hi all,
I've got 120 RGB LEDs that I'd like to be able to control. They're in groups of 6. Each group of 6 will be displaying the same color, so I've effectively got '20 lights'. Because they have a common pin, I can't really put them in series with each other, so I have to drive the whole thing at low voltage.
The TLC5940 has some sample code for the Propeller, which makes it appealing for me to use.
I was thinking that with a TLC5940, I could take each group of 6 and control 5 of them with it. It has 16 channels, so I figure that if I put each of the colors in the 6-RGB LED groups in parallel, and drive it at 120mA, I'll use 3 channels per group, and thus 15 channels for 5 groups.
So I have 20 groups of 6 RGB LEDs, being controlled by 4 TLC5940's 60 outputs.
The G and B LEDs have a Vf of 3.2, so I can control them without any issue from the TLC5940. But the red only has a Vf of 2V. So I would need a resistor (Probably 1/2W, I'll have to calculate the value and dissipation out later) on the output for the red segments, right?
Does anyone see a problem with this setup, other than the fact that I'm going to need a pretty beefy power supply for it all?
I've got 120 RGB LEDs that I'd like to be able to control. They're in groups of 6. Each group of 6 will be displaying the same color, so I've effectively got '20 lights'. Because they have a common pin, I can't really put them in series with each other, so I have to drive the whole thing at low voltage.
The TLC5940 has some sample code for the Propeller, which makes it appealing for me to use.
I was thinking that with a TLC5940, I could take each group of 6 and control 5 of them with it. It has 16 channels, so I figure that if I put each of the colors in the 6-RGB LED groups in parallel, and drive it at 120mA, I'll use 3 channels per group, and thus 15 channels for 5 groups.
So I have 20 groups of 6 RGB LEDs, being controlled by 4 TLC5940's 60 outputs.
The G and B LEDs have a Vf of 3.2, so I can control them without any issue from the TLC5940. But the red only has a Vf of 2V. So I would need a resistor (Probably 1/2W, I'll have to calculate the value and dissipation out later) on the output for the red segments, right?
Does anyone see a problem with this setup, other than the fact that I'm going to need a pretty beefy power supply for it all?
Comments
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
The TLC5940 is a current sink. My LEDs are common cathode. What was I thinking? Are there PWM driving constant current sources that work like the TLC5940?
Ugh. I'm going to need more hardware to drive these, right?
Maybe a PIC and a transistor array as an SPI slave to my propeller, with 3 current limitting resistors per LED. Let's see. That's 360 resistors. Ouch. Anyone have any better ideas?
Wait. I could do this:
Right?
So 3 transistors and 3 resistors per LED group. 60 resistors and 60 transistors, along with two dirt-cheap PICs taking in SPI commands from my Prop and putting out the right PWM signal for each channel. That's not TOO bad.....
On the other hand, this is a pretty stupid thing to do if one LED decides to heat up a little unevenly or something, draws more current than the others, and blows itself out. So that brings me back to 360 resistors. Ew.
Post Edited (MioTheGreat) : 6/27/2008 11:37:53 PM GMT
Reread the datasheet a couple more times.· Since the chip does act as a current source, I am not sure you would need a dropping resistor.· All the installations I have done had the resistor because it was integral to the RGB LED product I was using, but I did some test at lower voltages without LED and didn't experience problems.· Hmmm....I would probably read through a couple of the TI application notes to review their schematics.
Have you purchased your RGB LED product yet?· Sounds like you have since the said the LEDs are arranged in common Cathode form and you are sticking with that design constraint.· You may be able to put the transistor on the output of the TLC5940 to accomplish what you want, again check the application notes at TI's web site.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter
www.brilldea.com·- uOLED-IOC, RGB LEDs, TLC5940 driver PCB
www.tdswieter.com
One little spark of imagination is all it takes for an idea to explode
And it occurs to me that my original setup was a dumb idea anyway. It has the same problem: I'm relying on the LEDs to distribute the current evenly. That's too risky.
I believe i'll need 3 resistors per LED, or a 3 dedicated channels per LED no matter what I do.
So in the end, I'm going to have to use 360 resistors. I don't think I really have any other choice.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
The input to this circuit is a control current such as that from a current-sinking driver like the TLC5940. Assuming the transistors are adequately matched, the LEDs will each be sourced with a current equal to the control current, regardless of slight differences in their forward voltages. Remember also that the transistors are operating linearly (between fully on and fully off), so you will need to make sure the ones you choose are capable of the necessary power dissipaiton. To minimize power dissipation in the transistors, you might consider separate supplies for the Red and Green/Blue LEDs. It's cheaper to have an LM317 adjustable regulator output a low voltage than to have each transistor dissipate heat due to a large voltage drop.
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
Post Edited (Phil Pilgrim (PhiPi)) : 6/28/2008 5:54:27 PM GMT
So I think I've got two choices:
A) The current mirror you suggested, which gives 7 transistors per color, or 21 per group, plus the current sink.
Three transistors and 18 resistors per group, as well as 3 PWM outs per group (Probably a very simple program running on a $0.60 PIC as an SPI slave)
I'm thinking that it's just going to be easier and cheaper to deal with option B. The current mirror is definitely an interesting idea and would allow for greater control if I wanted to change something, but I don't think that's a problem I'm going to face.
Marty
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lunch cures all problems! have you had lunch?