I just happened to see some large strips of LED lighting when I was picking up some parts at Maplin which were on sale (if I remember correct they were around £12 per approx. 2m strip) however the controller/driver was still around £40, so I thought I would just build a better one myself.
I wanted it to be a web enabled controller as there are a lot of cool things that can be done with a device once it is accessible over HTTP, and I am working on a home automation server project so it would be good to have some devices which I can test this with.

Anyway, let's get started, here is a basic parts list, some of the components may change depending on the nature of your lighting installation (i.e. if you are driving more LEDs you may need higher power transistors, etc.):
  • Arduino (Duemilanove, Uno, etc., can be done with a Mega but it is overkill)
  • Ethernet Shield
  • 12v to 5v switchmode DC-DC converters (my LED strips rat at 12v but the Arduino needs 5v and this is more efficient than a linear converter)
  • Assorted resistors (for transistor protection, usually around 100-500 ohms)
  • NPN transistors (I just used basic NPN transistors as I was only switching around 300mA per channel)
  • Push to make button
  • Various connectors and cables
  • Stripboard (goes by various other names, I used this to make my driver circuit into an Arduino shield)
  • Enclosure (optional but recommended)
  • Fuse and fuse holder (optional but highly recommended for permanent installations)
  • Scrap materials to make any mounting hardware needed (I used HIPS to mount my Arduino in the enclosure)
Tools I used which would help:
  • Soldering iron
  • Multimeter
  • Small flat screwdriver
  • Small posi-drive screwdriver
  • Laser cutter (drills and a file will suffice if you don't have access to one)
All the code for this project is available at this GitHub repo.

Here is a quick demo of my installation at uni using an Android app for control:

Step 1: LED Driver Circuit

NOTE: Please read the next two steps before starting any work mentioned here, I had to do some modification to my original shield because of power issues, they are described on the next step.

Here you will want to build the driver circuit depicted in the schematic below, this can be done in the same way I did it and made into a shield to stack on top of the Arduino and Ethernet shield, or can be a separate board, either way will work, but I don't see any advantage to not making it as a shield.

Some minor points, you will want to have three power cables coming from your shield:
  • One +12v cable going to the 12v pin on the LED strip output
  • One +5v pin going to the 5v pin on the Arduino, and
  • One ground going to the ground pin on the Arduino
The reason for this is explained in the next step.

There are some good guides to building a shield from scratch using stripboard on YouTube, alternatively you could use a (semi) pre-built prototyping shield.
<p>Hi. Great project. Will this control the rgb strip from internet radio, or streamed audio? I'm new to everything and have been digging for a way to control my rgb's by internet radio music. I used minim to read an mp3 but can not figure out how to use the streaming audio. So I could probably benefit from your input.</p><p>Thanks</p>
<p>Hi DanNixon, congratulations for a nice project, I am trying to control RGB leds using the app but I could not get it. I tried configuring with many options typing IP, port, /service; without success. I hope that you can support me.</p>
Hi, thanks for a great tutorial, it helped me a lot! <br>One question, I tried the apk and it works great, however I tried to implement http post task in Tasker, did you have a chance to try it, because for some reason it won't work.<br><br>Thanks
<p>Hi, what is the static const int BUTTON_PIN = 12; for what is used?</p>
It states what pin the mode change button is attached to, IIRR this should be pulled low.<br>It switches between off, white and the last colour set of the web interface.<br>See line 370 for when it is polled.
<p>thanks for the clarification, but in your diagram where is connected pin 12 ? https://cdn.instructables.com/F99/07N6/HI3TRJU2/F9907N6HI3TRJU2.LARGE.jpg</p>
<p>The button is not on that diagram, that is for the LED driver only.</p>
Hello Dannixon you've make a extraordinary project it's that as I search all this mount I have now found I need for controlling my rgb strip (10 meter) that's great when I will have a times I will more interesting by this project that's really great good job!
the default ip adress is also hardcoded in the frontEndHTML on line 141 and 147. <br>it took me a while to debug why the web interface didn't respond to the changes
Thanks for spotting this, I'll update the docs to show this.
does it works on public (wan) network? or its only for local network? <br>and, do we have to fill ip address of arduino in service url?
It could work via port forwarding, although there is no authentication so you may want to use VPN if you want to use it externally. <br>The IP addresses will have to be updated to whatever you set the IP of the Arduino to.
i was unable to run my app. so what should i write within these quotes? <br> WebServer webserver(&quot;&quot;,8032); <br>also, what should i fill in service url (preferences) of android application? <br>
I really need more information than that.<br>The first parameter to webserver is the root URL, you almost certainly don't need to change it.<br>The Android app needs the URL of the XML service, usually http://[ARDUINO_IP]:[PORT]/service<br>Where in this case PORT is 8032, you can check this URL in your browser.
very cool project. thanks a lot for posting the complete files which are hard to get over internet. But, being a newbie i am facing several problems. When i am uploading the code into arduino, I m getting- <br>&quot; 'WebServer' doesnot name a type &quot; <br>also... this..... <br>WebRGB_LED:215: error: 'WebServer' has not been declared <br>WebRGB_LED:215: error: expected primary-expression before 'char' <br>WebRGB_LED:215: error: expected primary-expression before 'bool' <br> <br>so, what should i write within these quotes - <br> WebServer webserver(&quot;&quot;,80); <br> <br>thanks in advance...
I can say with almost certainty there is something wrong with your copy of the Webduino library (https://github.com/sirleech/Webduino).
that is great. could you please to provide tutorial to control rgb led through internet but arduino is not setting as webserver. then control it using android app. i try to make it but right now still get stuck at json parse point.
So you are having trouble accessing the Arduino webserver?<br>Have you tried running any of the sample scripts from the webserver library? I would start here, this will eliminate any problems caused by your Arduino, Ethernet Shield or network.<br>Let me know how you get on.<br>
yes i did. I tried without arduino firstly, running web socket test script to know wether the web server work or not. It runs well. I run my led sketch separately also(without internet). I used tornado web server that provide web socket connection. my notion is control arduino using serial connection -&gt; websocket, then parsing the data with json. so android app can import that data as well. <br>
I'm sorry you have completely lost me on what you are attempting to do. <br>There is no serial data connection on this, it is all done over the XML webservice. <br>You do not need to run a separate webserver for this, the server runs on the Arduino. <br>You will need an internet connection to use the on board web UI (at least the client will), as it used jQuery, the libraries fro which are downloaded from the jQuery website by the client when the page loads.
Impressive project. I regret though that it is a bit unclear what to do with what files in the Github repo <br>
The only important files in there are really <a href="https://github.com/DanNixon/ArduinoRGBLighting/blob/master/WebRGB_LED/WebRGB_LED.ino" rel="nofollow">WebRGB_LED.ino</a>, which is the Arduino code and <a href="https://github.com/DanNixon/ArduinoRGBLighting/blob/master/RGBLighting.apk" rel="nofollow">RGBLighting.apk</a>, which is the Android package used to install the control app.<br> The other files are just CAD files and the Eclipse project for the Android app, which aren't a great deal of use unless you are using the same type of enclosure as me or want to develop the Android app further, I just included them for completeness.
thanks that helps a lot :-) <br>
really cool build! , only thing i would do different would be to change the output header to a female for safety reasons. low voltage but still something to think about =)
Yeah I agree, a better connector for the output would be better, but I wasn't sure exactly how I was connecting the strip to the controller at this point so went with the versatility of screw terminals.

About This Instructable




More by DanNixon:Arduino Keyboard Learning Lights Attachment Google Play Music Internet Radio (Raspberry Pi and Arduino) Arduino Web Enabled RGB Lighting 
Add instructable to: