Driving RGB LED Strip Using Arduino

by Utsource in Circuits > Arduino

1772 Views, 4 Favorites, 0 Comments

Driving RGB LED Strip Using Arduino

Screenshot_20191010-090959__01.jpg
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.

Things You Need for This

Km5Zu-2RIncAUweU7uG7IhyWPySZ0SqIgAI0-vk9w7767_IkthCPCcsirj2GGmXF4IdQDg8UVpHVLVM6CXnzFsG1hnAdSkK7BIhIOtEldXoZiDsvzsPo-6o0rD6Mda7UyOE=w456-h323-nc.png
images(83).jpg
images(81).jpg
images(80).jpg

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

Connections

FKYQMU9JIDGEES1.LARGE.jpg
FSCV7EAJIDGEES8.LARGE.jpg
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.

Code

Screenshot_20191010-090942__04.jpg

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);
}

Testing

Screenshot_20191010-090841__01.jpg
Screenshot_20191010-090846__01.jpg
Screenshot_20191010-090900__01.jpg
Screenshot_20191010-090959__01.jpg
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.