How to power an arduino controlled string of RGB LED’s from separate power source

arduinoledpower supply

I'm new to electronics and working on a hobby project that will have an arduino board running 5 separate strings of RGB LED's. I'll be using a PWM chip (TLC 5940) so I can independently control tho color's of each of the 5 strings of lights. My question is how do I power the LED's. I know they can't be powered from the arduino pins and I highly suspect that they can't be powered from the PWM chip.

I think what I'll have to do is run the PWM output to the base of a transistor and have the string of LED's powered through the transistor with an appropriate power source. Can someone please confirm that and if it is incorrect correct my mistake in layman's terms?

A couple other questions related to this:

1) Is there any "lag" with transistors? i.e. if I run PWM to the base of a transistor will the emitter of the transistor produce an identical source (but amplified)?

2) I saw in an answer to a previous question than I need to look into constant current for the LED's. I still need to do that research but what does a constant current device look like? Is it just an IC you can buy? Can someone provide a part number or link to a page that has one so I can more effectively research how to use them.

Best Answer

Simply power the LED driver (i.e., its VCC pin) with a battery (or other higher-current-capable source), since the Arduino pins are only capable of sourcing 50 mA.

  1. First of all, you won't even need a transistor, if you use a battery as I mentioned above. But to answer your question, if you were using a transistor: while there is lag, lag won't be significant enough to affect your application here.

  2. And secondly, the TLC5940 is a constant-current driver, so you're fine. A constant current source/sink is exactly that -- it ensures a constant current flows independent of power supply fluctuations/other conditions. Thus your LEDs will light up with constant brightness.

Finally, a clarification regarding PWM with the TLC5940: You don't use PWM of the Arduino pin to directly create PWM on the TLC5940 I/O pins; that's NOT how it works. Instead, the TLC5940 uses serial communication with Arduino -- so you would send it instructions from the Arduino (via SPI or bit-banging, for example; see this TLC5940 Arduino library), and the TLC5940 reads those instructions and performs PWM on the desired I/O pins as instructed.