This instructable explains how to control an RGB LED strip with an Arduino. In this case, the LED strip is mounted to a snowboard. RGB (red green blue) LEDs have the ability to display a variety of colours based on switching on and off red, green and blue LEDs. The purpose of having the Arduino micro control unit (MCU) is to control the circuits of these three colours. When the device is powered on with the program running it will continuously cycle through several different colours, fading in and out of each one. A simpler design can be made by using a regular (single colour) LED strip rather than using an RGB strip. This eliminates the need for a micro controller as it only requires a proper power source and a switch.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Testing the LED Strip
This LED strip is rated for 12 volts so I decided to use a simple 12V battery using AA batteries. Each AA battery has a voltage of 1.5 volts so connecting 8 AA batteries in series gives us a 12V battery (1.5V x 8 = 12V). The 8 AA holder seen in the images was found on Sparkfun.com. Perfect for a small, easily replaced 12V battery. There are several options for choosing a 12V power source but since this LED strip doesn't draw a lot of current these 8 AA batteries will give a decent duration. These AA cells typically have a capacity of 2500mAh.
The transistor shown is the one I decided to use to control the 3 LED circuits. One for each colour. This allows the LED strip to be controlled by the Arduino but still powered by its own power source, the 12V battery. The first image shows the LED strip connected directly to the battery and the next shows the circuits with the transistors in place. At this point the Arduino is still being powered by the USB port on my laptop.
Step 2: Programming the Arduino Microcontroller
This sketch is relatively simple. This one is set to have the LEDs at half brightness which seemed to be more than enough. Afterall, this is designed to be used at night but the light still can be seen during the day. This code shows how the light changes from colour to colour. This can all be adjusted. You can change the colour sequence, the speed, the brightness, remove certain colours, whatever you want to be displayed. Virtually any colour can be made with an RGB strip, just like the LCD screen on your phone or tv.
Ensure that the pin numbers you decide to use correspond to the pins you are using on your controller. In this case, you need to use pulse width modulation (PWM) outputs pins. You will see "~" on the Arduino board beside these pins. This is why I used pins 3,5 and 6. These are used to have the fade in and fade out affect with the LEDs. These pins allow you to simulate an analog output digitally. This gives a smooth fade in the LEDs.
Step 3: Protecting/Organizing the Electronics
I realized that there were a few ways to do this but I decided to keep the electronics in a backpack. Originally I wanted to keep all of this stuff on the snowboard but I felt like it wouldn't be protected enough and would eventually fall off.
I used a plastic container to hold all of the electonics to provide some degree of waterproofing from snow. To mount everything inside of the container I glued a cut out piece of a thin carpet pad and used velcro strips to attach each component. I felt like this was convenient because I could move everything around as many times as I needed. In these images you can see the Arduino power supply, it's just a 9V battery in the black case.
In the next section I will explain how I decided to connect everything in the container to the LED strip on the snowboard.
Step 4: Schematic and Soldering
The circuits in this project are pretty simple. I decided to keep the breadboard instead of making a more permanent prototype board. I did this just so I can easily reuse all of the components afterwards.
I needed to figure out a way to connect all of this to the LED strip on the snowboard. Because I needed four wires (12V cathode, red blue and green anodes), I used USB cords as they have 4 pins. This also made it easy to plug in and unplug everything when I would get off the board. This USB cord would run through my jacket and my snow pants. I also added a toggle switch on the 12V line so that I could quickly turn the LEDs on and off while riding. This switch was setup just underneath my jacket above my snow pants. This switch is shown in the second image but is not in the wiring diagram. Also, I added a toggle switch and potentiometer to the 12V line on the breadboard. These are redundant but I added them for additional control. These are not shown in the wiring diagram.
Using the USB cords required some soldering. When doing this ensure you connect all of the pins to the correct wires. I just used some old USB ports that I didn't mind taking apart for the project. I highly recommend using flux for soldering as it just makes life easier. To hide the exposed conductors I used a glue gun and electrical tape. There are probably better ways to do this but this was a cheap and easy way to do it.
Step 5: LED Strip Placement & Final Product
This LED strip was purchased as 1 meter and was cut into 4 parts. When cutting the strip make sure you cut it at the proper points. These points expose contacts that allow you to solder wires to them (These contacts are show in one of the images. This is how the 4 LED strips are connected across the snowboard. Packing tape was used over the strips to mount them to the board. The LED strips include their own adhesive as well.
The issue with this was not the strips peeling off but the packing tape being damaged or water/snow getting under the tape. This issue never actually affected the LEDs but I feel like it could lead to a short circuit over time. If I build this project again I will find a more reliable way to mount the strips to the board.
Thank you for viewing my first instructable, if you have any questions feel free to ask.
Participated in the