Picture of Arduino Web Enabled RGB Lighting
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:
Remove these adsRemove these ads by Signing Up
voodoofox3 months ago
Hi, thanks for a great tutorial, it helped me a lot!
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.

kyokorn4 months ago

Hi, what is the static const int BUTTON_PIN = 12; for what is used?

DanNixon (author)  kyokorn4 months ago
It states what pin the mode change button is attached to, IIRR this should be pulled low.
It switches between off, white and the last colour set of the web interface.
See line 370 for when it is polled.
kyokorn DanNixon4 months ago

thanks for the clarification, but in your diagram where is connected pin 12 ?

DanNixon (author)  kyokorn4 months ago

The button is not on that diagram, that is for the LED driver only.

gagaetan101 year ago
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!
jarb1 year ago
the default ip adress is also hardcoded in the frontEndHTML on line 141 and 147.
it took me a while to debug why the web interface didn't respond to the changes
DanNixon (author)  jarb1 year ago
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?
and, do we have to fill ip address of arduino in service url?
DanNixon (author)  sandeep2008701 year ago
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.
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?
WebServer webserver("",8032);
also, what should i fill in service url (preferences) of android application?
DanNixon (author)  sandeep2008701 year ago
I really need more information than that.
The first parameter to webserver is the root URL, you almost certainly don't need to change it.
The Android app needs the URL of the XML service, usually http://[ARDUINO_IP]:[PORT]/service
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-
" 'WebServer' doesnot name a type "
also... this.....
WebRGB_LED:215: error: 'WebServer' has not been declared
WebRGB_LED:215: error: expected primary-expression before 'char'
WebRGB_LED:215: error: expected primary-expression before 'bool'

so, what should i write within these quotes -
WebServer webserver("",80);

thanks in advance...
DanNixon (author)  sandeep2008701 year ago
I can say with almost certainty there is something wrong with your copy of the Webduino library (
leopard8911 year ago
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.
DanNixon (author)  leopard8911 year ago
So you are having trouble accessing the Arduino webserver?
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.
Let me know how you get on.
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 -> websocket, then parsing the data with json. so android app can import that data as well.
DanNixon (author)  leopard8911 year ago
I'm sorry you have completely lost me on what you are attempting to do.
There is no serial data connection on this, it is all done over the XML webservice.
You do not need to run a separate webserver for this, the server runs on the Arduino.
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.
diy_bloke1 year ago
Impressive project. I regret though that it is a bit unclear what to do with what files in the Github repo
DanNixon (author)  diy_bloke1 year ago
The only important files in there are really WebRGB_LED.ino, which is the Arduino code and RGBLighting.apk, which is the Android package used to install the control app.
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 :-)
zendreti1 year ago
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 =)
DanNixon (author)  zendreti1 year ago
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.