loading

None of us could deny the fact that we would love with to play with LED’s and lighting stuffs. I love to play with LED’s and create attractive lighting effects. This project was a result of such attempt where i created a stunning RGB light effects using the popular development platform Arduino Nano. Let’s see the circuit, code and instruction on building this project.

Step 1: MATERIALS REQUIRED FOR RGB LIGHT EFFECTS:

  • LED strip
  • Arduino Nano

  • Dupont wire connectors
  • Custom control board.

Step 2: PREPARING LED STRIPS:

Cut down the LED strips into 10 single pieces. Make sure you cut them into equal halves and care must be taken that you should cut only on the copper conduction plate in the strip. Making a wrong cut disrupts the electrical conductivity between the LED’s. After cutting down into separate strips connect it using a Dupont wire connector.

Step 3: DESIGNING CONTROL BOARD:

I have made a custom control board compatible used with Arduino Nano to produce the desired effect. The control board basically used to boost the incoming signal from Arduino and lights up the corresponding LED strips.

Step 4: CIRCUIT DIAGRAM OF CONTROL BOARD:

I have used a free Online circuit and PCB designing platform called as EasyEDA to develop my control board. It was pretty easy to use with large number of part libraries. Even you can order PCB board through it once you are done with your design. They offers great prices on custom PCB manufacturing.

This is the schematic of control board i have designed .

Here i have added 10 connection points for 10 LED strips. Separate pins from Arduino Nano was used to control the connection points thereby handles each RGB LED strip separately. Transistor Q1,Q2,Q3….Q10 acts as a switch for these LED strips for controlling 12V strips through 5V signal. And switch S1,S2..S4 was added to alternate the effect produced in the strip. The input of these switches goes into Arduino and it produces the programmed effect for corresponding switch press.

Step 5: DESIGNING THE PCB BOARD:

You can see the PCB layout in the following diagram:

Step 6: MAKE a SAMPLE:

Now I have completed designing the board all i have to do now is to produce the PCB i designed.

You can use EasyEDA custom PCB order page to do it or you can prepare on your own using the Gerber files produced. After complete the design of PCB, you can click the icon of Fabrication output above. Then you will access the page PCB order to download Gerber files of your PCB and send them to any manufacturer, it’s also a lot easier (and cheaper) to order it directly in EasyEDA. Here you can select the number of PCBs you want to order, how many copper layers you need, the PCB thickness, copper weight, and even the PCB color. After you have selected all of the options, click “Save to Cart” and complete you order, then you will get your PCBs a few days later.

Step 7: TAKE DELIVERY OF THE PCB:

When I received the PCBs, I am quite impressed with the quality, they are pretty nice.

Step 8: CONNECTIONS:

Connect the LED strips through the connection points in the board. Make sure that you are connected correctly because vast more connections will eventually increase the risk of getting shorted. Once connection is done all that left is programming your Arduino Nano.

Step 9: DOWNLOAD a PROGRAM:

Connect it to a 12 V power supply, download a program (Check the full code below) on the Arduino Nano and run it.

Press the button to switch flash mode. If you want, you can also customize or recreate my project with or without changes, here are my RGB light effects project files. Also you can access the Arduino Code, Required Components and other details of this LED Scroll bar by following the given link.

Step 10: CODE:

<p>int RGB1 =12;</p><p>int RGB2 =11;
int RGB3 =10; 
int RGB4 =9;
int RGB5 =8;
int RGB6 =7;
int RGB7 =6;
int RGB8 =5;
int RGB9 =4;
int RGB10 =3;
int key1 =A3;
int key2 =A2;
int key3 =A1;
int key4 =A0;
void setup()
{
  Serial.begin(9600);
  
  pinMode(RGB1, OUTPUT);
  pinMode(RGB2, OUTPUT);
  pinMode(RGB3, OUTPUT);
  pinMode(RGB4, OUTPUT);
  pinMode(RGB5, OUTPUT); 
  pinMode(RGB6, OUTPUT);
  pinMode(RGB7, OUTPUT);
  pinMode(RGB8, OUTPUT);
  pinMode(RGB9, OUTPUT);
  pinMode(RGB10, OUTPUT);
  
  pinMode(key1, INPUT_PULLUP);
  pinMode(key2, INPUT_PULLUP);
  pinMode(key3, INPUT_PULLUP);
  pinMode(key4, INPUT_PULLUP);
  
}
void loop()
{
  int key1Value = analogRead(key1);
  int key2Value = analogRead(key2);
  int key3Value = analogRead(key3);
  int key4Value = analogRead(key4);
  if (key1Value <= 100)  
  {
     delay(30);
     if (key1Value <= 100) 
     {
       digitalWrite(RGB5,HIGH);
       digitalWrite(RGB6, HIGH);
       delay(50);
       digitalWrite(RGB4, HIGH);
       digitalWrite(RGB7,HIGH);
       delay(50);
       digitalWrite(RGB3, HIGH);
       digitalWrite(RGB8, HIGH);
       delay(50);
       digitalWrite(RGB2,HIGH);
       digitalWrite(RGB9, HIGH);
       delay(50);
       digitalWrite(RGB1, HIGH);
       digitalWrite(RGB10, HIGH);
       delay(1000);
     }
     else
     {
        digitalWrite(RGB1, LOW);
        digitalWrite(RGB2, LOW);
        digitalWrite(RGB3, LOW);
        digitalWrite(RGB4, LOW); 
        digitalWrite(RGB5, LOW);
        digitalWrite(RGB6, LOW);
        digitalWrite(RGB7, LOW);
        digitalWrite(RGB8, LOW);
        digitalWrite(RGB9, LOW);
        digitalWrite(RGB10, LOW);
      }
  }  
 
  if (key2Value <= 100)  
  {
    digitalWrite(RGB1,HIGH);
    digitalWrite(RGB6, HIGH);
    delay(40);
    digitalWrite(RGB2, HIGH);
    digitalWrite(RGB7,HIGH);
    delay(40);
    digitalWrite(RGB3, HIGH);
    digitalWrite(RGB8, HIGH);
    delay(40);
    digitalWrite(RGB4,HIGH);
    digitalWrite(RGB9, HIGH);
    delay(40);
    digitalWrite(RGB5, HIGH);
    digitalWrite(RGB10, HIGH);
    delay(1000);
  }  
  else
  {
    digitalWrite(RGB1, LOW);
    digitalWrite(RGB2, LOW);
    digitalWrite(RGB3, LOW);
    digitalWrite(RGB4, LOW); 
    digitalWrite(RGB5, LOW);
    digitalWrite(RGB6, LOW);
    digitalWrite(RGB7, LOW); 
    digitalWrite(RGB8, LOW);
    digitalWrite(RGB9, LOW);
    digitalWrite(RGB10, LOW);
  }
  if (key3Value <= 100)  
  {
    digitalWrite(RGB1,HIGH);
    delay(90);
    digitalWrite(RGB1, LOW); 
    digitalWrite(RGB2, HIGH);
    delay(90);
    digitalWrite(RGB2, LOW);
    digitalWrite(RGB3, HIGH);
    delay(90);
    digitalWrite(RGB3, LOW);
    digitalWrite(RGB4, HIGH);
    delay(90);
    digitalWrite(RGB4, LOW); 
    digitalWrite(RGB5,HIGH);
    delay(90);
    digitalWrite(RGB5, LOW);
    digitalWrite(RGB6,HIGH);
    delay(90);
    digitalWrite(RGB6, LOW);
    digitalWrite(RGB7,HIGH);
    delay(90);
    digitalWrite(RGB7, LOW);
    digitalWrite(RGB8,HIGH);
    delay(90);
    digitalWrite(RGB8, LOW);
    digitalWrite(RGB9,HIGH);
    delay(90);
    digitalWrite(RGB9, LOW);
    digitalWrite(RGB10,HIGH);
    delay(1000);
  }  
  else
  {
    digitalWrite(RGB1, LOW); 
    digitalWrite(RGB2, LOW);
    digitalWrite(RGB3, LOW);
    digitalWrite(RGB4, LOW);
    digitalWrite(RGB5, LOW);
    digitalWrite(RGB6, LOW);
    digitalWrite(RGB7, LOW);
    digitalWrite(RGB8, LOW);
    digitalWrite(RGB9, LOW);
    digitalWrite(RGB10, LOW);
  }
  if (key4Value <= 100)  
  {
    digitalWrite(RGB1,HIGH);
    delay(50);
    digitalWrite(RGB1, LOW);
    digitalWrite(RGB2, HIGH);
    delay(50);
    digitalWrite(RGB2, LOW);
    digitalWrite(RGB3, HIGH);
    delay(50);
    digitalWrite(RGB3, LOW); 
    digitalWrite(RGB4,HIGH);
    delay(50);
    digitalWrite(RGB4, LOW); 
    digitalWrite(RGB5, HIGH);
    delay(50);
    digitalWrite(RGB5, LOW); 
    digitalWrite(RGB6, HIGH);
    delay(50);
    digitalWrite(RGB6, LOW); 
    digitalWrite(RGB7,HIGH);
    delay(50);
    digitalWrite(RGB7, LOW);
    digitalWrite(RGB8, HIGH);
    delay(50);
    digitalWrite(RGB8, LOW);
    digitalWrite(RGB9, HIGH);
    delay(50);
    digitalWrite(RGB9, LOW);
    digitalWrite(RGB10,HIGH);
    delay(50);
    digitalWrite(RGB10, LOW);
    digitalWrite(RGB9, HIGH);
    delay(50);
    digitalWrite(RGB9, LOW); 
    digitalWrite(RGB8, HIGH);
    delay(50);
    digitalWrite(RGB8, LOW); 
    digitalWrite(RGB7,HIGH);
    delay(50);
    digitalWrite(RGB7, LOW); 
    digitalWrite(RGB6, HIGH);
    delay(50);
    digitalWrite(RGB6, LOW); 
    digitalWrite(RGB5, HIGH);
    delay(50);
    digitalWrite(RGB5, LOW);
    digitalWrite(RGB4,HIGH);
    delay(50);
    digitalWrite(RGB4, LOW); 
    digitalWrite(RGB3, HIGH);
    delay(50);
    digitalWrite(RGB3, LOW);
    digitalWrite(RGB2, HIGH);
    delay(50);
    digitalWrite(RGB2, LOW); 
    digitalWrite(RGB1, HIGH);
    delay(50);
    digitalWrite(RGB1, LOW); 
    delay(1000);
  }  
  else
  {
    digitalWrite(RGB1, LOW);
    digitalWrite(RGB2, LOW);
    digitalWrite(RGB3, LOW);
    digitalWrite(RGB4, LOW); 
    digitalWrite(RGB5, LOW);
    digitalWrite(RGB6, LOW);
    digitalWrite(RGB7, LOW); 
    digitalWrite(RGB8, LOW);
    digitalWrite(RGB9, LOW);
    digitalWrite(RGB10, LOW);
  }
   
}</p>

Step 11: WORKING VIDEO:

<p>It looks like the link to your schematic is broken... Is anyone else having the same problem?</p>
<p>Thank you for your remind.</p><p>This is the link to the schematic of control board:</p><p></p><p><a href="http://bit.ly/2qUiWVU" rel="nofollow">http://bit.ly/2qUiWVU</a></p>
<p>how long did this last with the prediction of failure please. I need to know I have over 150 RGB SMD LEDs to control on a project I cal ALICE: RED QUEEN. It is a piece of art using silicone mushrooms and other sculptures of silicone tinted and clear using UV reactive colors, glow in the dark colors and neon colors with animatronics to shimmer the silicone items to bring it to life. It is a recreation of Alice in Wonderland Through the looking Glass mixed with earlier versions for talking foliages. Also if you found and errors in the code please inform me to correct them before I implement this in my work. I have posted some comments on this art in this guide (https://www.instructables.com/id/Enchanted-Forest-Mushroom-Lights/) if you care to read up on it but this clearly is the way to go. SIR YOU ARE A GENIUS and GOD amongst mice and coders. I plan on using the USB Nano V3.0 ATmega328 CH340G 5V 16MHz with piggybacking the power supply chip to handle the load to increase the power to 24v to accommodate the load of 150 leds. I may use a Stepup-BUCK in place not sure yet.</p><p>CH340G REPLACE FT232RL</p><p>Operating Voltage(logic level):5V</p><p>8 analog inputs ports:A0 ~ A7</p><p>14 Digital input / output ports:TX,RX,D2 ~ D13</p><p>6 PWM ports:D3, D5, D6, D9, D10, D11</p><p>1 pairs of TTL level serial transceiver ports RX / TX</p><p>Using Atmel Atmega328P-AU MCU</p><p>Support USB download and Power</p><p>Support for external 5V ~ 12V DC power supply. In conjunction with the TLC5904NTG4 DIP28 (http://www.alldatasheet.com/datasheet-pdf/pdf/146156/TI/TLC5940.html) in my project integrating your ideas if this lasted.</p>
<p>Looks good! Would like to see something along the lines of using addressable RGB strips!</p>
<p>Is each strip always fixed at a single color with the jumpers? </p>
<p>then I WIL BE THE FIRST.</p><p>NICE JOB. </p>
<p>The Nano is not powering the LED's directly, so why would it fail?</p>
<p>You are driving 90 RGB Leds with a single Nano, I can predict it won't last long.</p>
<p>could you give me a list of components used in this project.</p><p>Will help me a lot to do this project if I'd list</p>

About This Instructable

20,495views

140favorites

License:

Bio: Be enthusiastic about electronic design, enjoy the process in bringing a design to life. Always being happy to share good stuffs with others.
More by vividz:PCB Design Tutorial - How To Design your own PCB Board How to Make a LED Audio Spectrum Analyzer How to Make a LED VU Meter Using Arduino 
Add instructable to: