Introduction: Driving RGB LED Strip Using Arduino
Hi Guys in this instructables we will make a circuit to run a 12V RGB led strip with arduino. As we kniw arduino can't enough power to run A RGB led strip so we need to amplify arduino's signal to to power the Led Strip by other source so we will be using TIP120 Transistor with arduino to amplify arduino's small power signal into a required power signal (12v) for the rgb led strip with a 12v power source & Transistor.
Step 1: Things You Need for This
For this instructables we will need following things :
TIP120:
12V ADAPTER:
ARDUINO UNO:
One 5m RGB Led strip
Mosfet irlzz4n or any equivalent or TIP 120 bjt or equivalent
3 potentiometer
Step 2: Connections
The schmatics is provided in image part of this step. Please follow the shown schmatics. It has 3 Transistors for each 3 pins of RGB led strip (1-1 each for red 'R' , Green 'G' , Blue 'B' ) and 3 potentiometer for controlling all three R , G & B pin light power.
Step 3: Code
The coding part is very easy please copy the following code & Upload it to arduino . :
void setup()
{
PinMode(9,1);
PinMode(10,1);
PinMode(11,1);
}
int a,b,c;
void loop()
{
a=digitalRead(A0);
b=digitalRead(A1);
c=digitalRead (A2);
analogWrite (9,a/4);
analogWrite (10,b/4);
analogWrite (11,c/4);
}
Step 4: Testing
After uploading the code you can turn any or all potentiometer to bring up the colors each potentiometer is responsible for Red,green,blue color independently and you can put different different values to all three potentiometer to get a desired color in RGB led strip and you Arduino based RGB led strip driver is ready to use. Decorate you home and have fun.