I have been watching the projects that make lighted signs with acrylic and RGB LED strips. Lot’s of red, green and blue signs.
Want to have a different color? Maybe jazz it up a little with flashing lights? Change color on the fly?
Here’s a way to use that Arduino that’s gathering dust in your shop after you upgraded to the X-controller.
It just takes a few hardware components and a little Arduino programming to liven up that sign you just made.
First a few notes about the circuitry. I am assuming an RGB LED strip that takes +12 VDC on one connection, then you turn the LEDs on by grounding the appropriate connection (ground blue to get the blue LEDs to turn on, etc.).
Also, take note that the maximum current for the transistors used is 200mA. My LEDs draw about 5mA each, so each transistor can drive a maximum 40 LEDs. To be conservative, with a 300 LED per 5 meter stip, this circuit would drive about 0.5 meters. If you are using a strip that is 150 LEDS per 5 meters then you could drive about 1 meter of that strip. If you need to drive a longer strip then you will have to upgrade the NPN transistors to a unit that can handle more current.
Programming the Arduino is not difficult. The easy way to do it is to use the Arduino PWM pins to vary the intensity of each color of LED. Using the PWM pins you can use various combinations to get a multitude of colors and you don’t have to bit bang a port to get PWM.
Here is an example of a simple program:
/**********************************************************************
- Program to exercise an RGB LED strip without controller chip.
*********************************************************************/
#define RGB_Red 9
#define RGB_Green 10
#define RGB_Blue 11
void setup()
{
pinMode(RGB_Red, OUTPUT);
pinMode(RGB_Green, OUTPUT);
pinMode(RGB_Blue, OUTPUT);
} /* setup */
void loop()
{
/* turn all the LEDs off */
analogWrite(RGB_Red, 0);
analogWrite(RGB_Green, 0);
analogWrite(RGB_Blue, 0);
/* turn all the LEDs on half intensity */
analogWrite(RGB_Red, 128);
analogWrite(RGB_Green, 128);
analogWrite(RGB_Blue, 128);
/* turn all the LEDs on full intensity */
analogWrite(RGB_Red, 255);
analogWrite(RGB_Green, 255);
analogWrite(RGB_Blue, 255);
} /* loop */
And here is the hardware: