Offline
Newbie
Karma: 0
Posts: 13
|
 |
« on: June 08, 2012, 08:08:13 am » |
Hello everyone, I've seen this project: and I'd like to build something similar but be able to control each LED individually. Basically I'd like to control approximately 12 RGB LEDs(20mA each color, 60mA for a LED) using an Arduino and avoid multiplexing of any kind. What would be the cheapest/easiest way to get the job done? I'm planning on using a computer PSU to power it all. Thank you.
|
|
|
|
|
Logged
|
|
|
|
|
Montreal
Offline
Edison Member
Karma: 16
Posts: 2207
Per aspera ad astra.
|
 |
« Reply #1 on: June 08, 2012, 09:01:43 am » |
It looks like there is no brightness control, just on/off combination of colors. Should be pretty easy to do with 74HC595 and ULN2803 , as 36 digital pins required you need 5 pairs of chips (8x5 = 40) . For arduino-mega 74HC595 not necessary. http://www.elcojacobs.com/shiftpwm/ for more information.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 13
|
 |
« Reply #2 on: June 08, 2012, 10:58:41 am » |
Thank you, it's very useful. I am interested in brightness control, won't I be able to dim the LEDs by changing the PWM frequency somehow(Is it ven possible with the shift registers?)?
|
|
|
|
|
Logged
|
|
|
|
|
Yorkshire England
Offline
Sr. Member
Karma: 1
Posts: 253
Arduino good init
|
 |
« Reply #3 on: June 08, 2012, 12:13:32 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 13
|
 |
« Reply #4 on: June 08, 2012, 03:16:30 pm » |
Looks interesting but I can't figure out what current they can handle. The 60mA(For Vcc<3.6V) or 120mA(For Vcc>3.6V) refers to the current for one channel or all 16 channels? If the 120mA limit is for all channels it means I can only use 6(I need 20mA per channel) channels at the same time which won't be enough.
|
|
|
|
|
Logged
|
|
|
|
|
Dubuque, Iowa, USA
Offline
Edison Member
Karma: 13
Posts: 1541
|
 |
« Reply #5 on: June 08, 2012, 04:24:03 pm » |
That is 120ma per channel.
This is also an overall limit due to thermal dissipation which is listed in the second table on page 3. Without a complete description of your project it's impossible to say that you'll hit that limit, but if your LEDs are only 20ma it's pretty doubtful. Worst case scenario you just buy a second chip and offload some of the outputs to it.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 13
|
 |
« Reply #6 on: June 09, 2012, 07:50:21 am » |
Thank you for your reply. I'll be using a 5V power source and use all 16 channels. I'll add a ~2k ohm resistor on the IREF pin so I'd get 20mA output(According to Page 5, Table 1, Equation 3) on each channel. Assuming all 16 channels would be operating there's going to be at least 320mA. 320mA*5V = 1600mW which is less than the power rating for the PDIP version ( http://www.sparkfun.com/products/10136 this is PDIP right?) on the table you were referring to(At 25 deg C). Is my calculation correct? does it mean I'm in the clear?
|
|
|
|
|
Logged
|
|
|
|
|
Montreal
Offline
Edison Member
Karma: 16
Posts: 2207
Per aspera ad astra.
|
 |
« Reply #7 on: June 09, 2012, 08:09:39 am » |
Wrong, power dissipated in LED's as well, more than half for 5V . Correct formula: P = 20 * (5 - Vled-red) * Nled-red + 20*(5 - Vled-green) * Nled-green + 20*(5 - Vled-blue) * Nled-blue;
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 13
|
 |
« Reply #8 on: June 09, 2012, 10:43:55 am » |
That's even better. That means that if I use 2 LEDs(Each requires less than 2.5V of course) instead of 1 for each channel I can decrease the power dissipated on the TLC5940 substantially. Thanks everyone!
|
|
|
|
|
Logged
|
|
|
|
|
Wisconsin
Offline
God Member
Karma: 4
Posts: 994
I LOVE THIS STUFF!!!!
|
 |
« Reply #9 on: June 09, 2012, 10:48:27 am » |
Just an added bonus. The TLC5940 has a supporting library for the arduino. http://code.google.com/p/tlc5940arduino/It makes them super easy to use.
|
|
|
|
|
Logged
|
Accelerate to 88 miles per hour.
|
|
|
|
Montreal
Offline
Edison Member
Karma: 16
Posts: 2207
Per aspera ad astra.
|
 |
« Reply #10 on: June 09, 2012, 11:12:35 am » |
That means that if I use 2 LEDs(Each requires less than 2.5V of course) instead of 1 for each channel I can decrease the power dissipated Well, it's true, the problem only red led's fall in this category, may be green produced via old technology (low brightness). Blue require about 3 V, on some occasions up to 4V. If you need more leds, you could increase a voltage and stack 3 leds in series (for 12V) the same way RGB led strip made.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 13
|
 |
« Reply #11 on: June 09, 2012, 07:07:51 pm » |
I did note this library but never bothered to check it's website, they have a useful explanation about the power dissipation. That means that if I use 2 LEDs(Each requires less than 2.5V of course) instead of 1 for each channel I can decrease the power dissipated Well, it's true, the problem only red led's fall in this category, may be green produced via old technology (low brightness). Blue require about 3 V, on some occasions up to 4V. If you need more leds, you could increase a voltage and stack 3 leds in series (for 12V) the same way RGB led strip made. You're right about that, if I do need more power I'll just use 12V(Will be using a computer PSU anyway). Thanks again for your kind replies 
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25508
Solder is electric glue
|
 |
« Reply #12 on: June 10, 2012, 03:40:47 pm » |
if I do need more power I'll just use 12V No you won't. Power and voltage are two different things.
|
|
|
|
|
Logged
|
|
|
|
|
Atlanta
Offline
Full Member
Karma: 4
Posts: 128
|
 |
« Reply #13 on: June 11, 2012, 02:22:39 pm » |
if I do need more power I'll just use 12V No you won't. Power and voltage are two different things. if op uses common-anode and a drive transistor, might work though?
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay Area
Offline
Edison Member
Karma: 6
Posts: 1215
Arduino Ninja
|
 |
« Reply #14 on: June 14, 2012, 06:49:42 pm » |
If they need more light output power, they can add more LEDs in series, and then use a 12V supply to handle the increased forward voltage. I think that was the thought behind the statement. 
|
|
|
|
|
Logged
|
|
|
|
|
|