Go Down

Topic: Controlling 12~ RGB LEDs with an Arduino (Read 1 time) previous topic - next topic

bimbambom

Hello everyone,
I've seen this project: http://www.youtube.com/watch?v=qmPJBrVtgsQ 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.

Magician

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.

bimbambom

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


bimbambom


I'd use some of these http://www.ti.com/lit/ds/symlink/tlc5940.pdf

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.

Chagrin

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.

bimbambom

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?

Magician

Quote
320mA*5V = 1600mW which is less than the power rating for the PDIP version (http://www.sparkfun.com/products/10136 this is PDIP right?)

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;

bimbambom

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!

funkyguy4000

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.
Accelerate to 88 miles per hour.

Magician

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

bimbambom


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.

I did note this library but never bothered to check it's website, they have a useful explanation about the power dissipation.


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

Grumpy_Mike

Quote
if I do need more power I'll just use 12V

No you won't.
Power and voltage are two different things.

abrookfield


Quote
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?
www.reeftopper.com

macegr

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.  XD
Unique RGB LED Modules and Arduino shields: http://www.macetech.com/store

Go Up