Intro: LED RGB Floodlight Christmas Hack
Last winter I had an ugly plastic snowman out in the front yard with the brightest fluorescent bulb in it I could find - it was bright but boring. After doing some cool effects with this years Jack-o-Lanterns using RGB LEDs, I was looking to scale things up and put some fancy lighting inside the ugly snowman this year.
When I started sourcing parts it seemed most economical to just buy a 20W RGB LED floodlight off of eBay for $22. I looked high and low to see if anyone out there had a simple hack for animating the light without having to stand there with the IR remote. Unfortunately I didn't find a quick and easy hack but I went ahead and ordered the light anyway.
My thoughts were to use an Arduino Nano to "decode" the remote that came with the floodlight and then program the Arduino to be a clone of that remote and automatically change the floodlight. To my delight the project was very simple to throw together and looks great! I added a "selector" switch so I could have three different lighting modes. I have Christmas colors on one mode, then a winter theme for using after x-mas, and last a Green & Gold mode for when the Green Bay Packers are playing!
Step 1: The Circuit
The only thing I bought for this project was the RGB LED floodlight. The other parts I had laying around (would have cost about $20 more to purchase them all). This is what I used:
- 2ea 100K Resistors
- 1ea 220 Resistor
- Mini breadboard
- 20W multi color LED Outdoor Floodlight
- Arduino Nano
- IR Emitter
- ON-OFF-ON Rocker Switch
- 3.5mm Jack
- IR Receiver Module (for decoding remote)
- Dupont wires for the breadboard
My assumptions for this instructable are that you already have knowledge of both using an Arduino and safely working with electricity. I'm not going to go in depth on how I tested the circuits or how to upload sketches to the Arduino. The Arduino is inexpensive and very easy to learn and there are some great beginner Instructables on using an Arduino. I'm by no means an expert when it comes to coding, I'm certain it could look prettier.
Just a quick note here to save you headaches - I have some LED light strips that use an identical looking remote control as what came with this floodlamp - even though the remotes look identical they send different codes and cannot be interchanged. Wondering if your IR emitter is working? Remember you can always point your cell phone camera at an IR emitter to see if it's working. You can't see it flashing with the naked eye but through a digital camera you will see the emitter flashing if it's working.
I've used the 3-way selector switch with the Arduino in the past with great results. Credit goes to this website for sharing this easy to setup selector switch.
Ken Shirriff's IR library for the Arduino is what makes this project run. You need to add this library for things to work. To decode the remote that came with the floodlight, I used the information on his site and the example sketch that comes with the library. It is my understanding that the current Arduino IDE contains a library RobotIRemote that conflicts with the IRremote library needed for this project. You can delete the RobotIRemote library to resolve this conflict. If in the future you buy this robot and need the library, it's easy enough to reinstall.
I used a 220 ohm resistor on the IR emitter because that's what I had lying around. I actually used a double emitter extender which was from an old Tivo I believe. Both emitters fire just fine - I'm keeping this in mind for next halloween where I can control two floods at the same time to light up the front of my house.
I was concerned at first about having to add a detector circuit to test if the light was on or off but was happy to find the light powers on with any signal. Another bonus was that when I opened the light there was tons of room to hide my breadboard inside! Things got even better when I tested the power going to the IR detector and it was clean enough to run the Arduino so I didn't need to worry about a separate power supply. It's not shown in the schematic but I wired to Vin off the 5v+ to the IR detector and from the detector ground to Arduino ground. Please make certain to never have the Arduino powered by both the USB and LED driver at the same time. As a side note: This way of powering the Arduino actually provides a bit below the recommended voltage. If in your testing you have intermittent problems, try powering the Arduino from an actual power supply. I found as long as I don't use long delays everything works.
Everything else should be self explanatory if you open the pictures full size and read the comments.
After all the wiring make certain you add the IRremote library and load the sketch above. The Arduino sketch is version #2. In the first version I had some really long delays which turned out to be rather boring! I sped everything up significantly. Also with version 1, on really long delays it seemed things "hung" up now and then - this could be that with my Arduino being powered off the IR detector circuit it is actually running a little below the recommended voltage. With using shorter delays it seems so far that things are running fine.
Step 2: Put It All Back Together
As you can see everything went back together cleanly. Yes the fixture is nowhere near as water resistant as it came out of the box - but it's used in a sheltered environment so I'm not concerned. And I did consider putting the IR emitter under the glass next to the IR detector but decided against it. The way it is I can unplug the emitter and use the light with the regular remote say as an extra shop light during non holidays.
I hope some of my ramblings help some of you do some fancy lighting around your house!