Arduino Christmas Light Controller

Arduino Christmas Light Controller
You've probably seen all those videos where people make there christmas lights dance to music, you think to your self wow that looks realy cool.... i could never do that. WELL... you can the idea is actually quite simple.
WHATS A RELAY?
a relay is a component that can be used to control large amounts of voltage or current with just a small voltage, it does this by using that small voltage (5 volts in our case) to create a magnetic feild that will pull a switch type object to connect the larger current (120 volts in our case). Image 2 is a diagram on how a relay works





 
Remove these adsRemove these ads by Signing Up
 

Step 1Supplies

• 1x Arduino
• 1x Protoshield/ breadboard
8x 5v DC relays »»»  search.digikey.com/scripts/DkSearch/dksus.dll
• 8x 1N4004 diodes »»» search.digikey.com/scripts/DkSearch/dksus.dll
• 8x 2N2222 transistors »»» search.digikey.com/scripts/DkSearch/dksus.dll
• 8x 1K (Brown,Black,Red) ohm resistor (radio shack)
• 1x double/single sided PCB (radioshack)
• 1x sharpie
• 16x nuts and bolts (discuss size later)
• 8x dead sets of lights (for there male plugs)
• 500 ft of 5 strand cable
• a set of connector things
• some wire and some other stuff that you should have
• a place to display your light show
• and a some what knowledge of making pcb's

LETS BEGIN SHALL WE


« Previous StepDownload PDFView All StepsNext Step »
71 comments
1-40 of 71next »
Jan 23, 2012. 3:20 PMrpdthree says:
Out of curiosity, have you thought of ways to dim the lights? I am fairly new to the Arduino platform and electrical engineering in general, but would it be possible to use some sort of digital potentiometer instad of the relays?

If not, do you have an ideas on how to easily dim the lights?
Dec 12, 2011. 3:31 PMpclever says:
Hello, I didn't use the resistors on my pcb and everything works well unless there is more than 3 relays on. Can the arduiono only power 3 relays, or did I need the resistors?
Dec 12, 2011. 6:53 PMpclever says:
Sorry, I found out that if I add more voltage it fixes the problem, but now the arduino is getting very hot. Is this a problem?
Dec 2, 2011. 7:57 PMdcopeland1 says:
One thing you have to pay attention to is the 120 volts that comes from your house is a RMS voltage. Never hook up the ground on your AC to an earth ground. Go through your common as this is where your current comes from. Your voltage is on your potential side. I would also make sure the gate is rated high enough so that if there is a spike in your voltage it will send it to the ground thus dropping your voltage to zero.
Oct 28, 2011. 2:08 PMdonphipps says:
Is there a way to hook up to computer va USB port, i am looking for a way to make light blink to music.
Nov 29, 2011. 11:09 PMblangston1 says:
Just thought I'd pipe in here. Vixen, an open source software that sequences audio to digital events, will pipe it's output directly through an arduino (connected via USB.) I am planning to use this to run my Christmas light show as I have a spare desktop to run the program in the garage. In this type of setup, the code on the arduino only tells it what it needs to know to become the generic plug-in for vixen and doesn't actually contain code for the sequence, so this wouldn't work if you wanted a standalone.

Beyond the arduino outputs, everything should be the same as dany's setup. Then your songs/light shows are only limited to your patience with the sequencer.

Unfortunately, like you, I am still in the production phase and don't have a finished product to show such as dany's. I am as far as running some test LEDs with the sequence on a bread board, so theoretically, I'll build the board with the relays and be good to go...

http://www.youtube.com/watch?v=bucQrRSpv7Y
Nov 30, 2011. 3:47 PMblangston1 says:
No problem! I'm glad you think it might work for your setup.

I like your idea about the xbee and the climate controlled box. However, part of the deal in getting my wife on board with turning our house into a musical light show involved committing to a budget of practically $0, so I'm working with only components that I already have. But thanks for the tip about the temp of the arduino. I realized that my crawlspace door in the floor of my guest room closet is within a few feet from the nearest crawlspace vent to the front yard. I think I'll set up the whole operation in my climate controlled ;-) guest room, and run the cables beyond the relay through the crawlspace to the front yard.

I also plan on using an FM transmitter to play my music. A buddy that's helping me with some of the wiring work told me that the range of the common dashboard mp3 player transmitters can be boosted by simply soldering a longer wire to their antenna on the cb and coiling around a rod. I guess we'll see if that actually works or not.

Let me know if you can't find the vixen plug-in code for the arduino, and good luck to you too!
Nov 15, 2011. 3:46 PMEdDruino says:
this is my version of your pcb, it's a grate project and i will make it for this christmas! nice itable!!
craciun_pcb.jpg
Jun 4, 2011. 10:10 PMpsychodot5415 says:
Nice job. I am combining your idea with a portion of one of the Daft Punk projects -- the part that takes input from a stereo mini plug to the Arduino's analog in 0. My question concerns the PCB. I see that you made separate
traces for the power source to the relays and connected them together with wire. Was there a reason you didn't connect the wire once and combine all the power in traces to the relays into one long trace? PCB overheat?
Aug 12, 2011. 5:36 PMpsychodot5415 says:
I finished and published. Check out http://www.instructables.com/id/Arduino-Christmas-Light-With-Music-Sync/. Thanks for your help.
May 27, 2011. 10:36 AMizziwbr says:
the lights turn on and off like a VU Meter, or the programming was done by listening to music?
Dec 11, 2010. 2:02 PMpso24 says:
What is the purpose of the transistor in this circuit?
Dec 5, 2010. 1:39 PMmoose517 says:
@tbonz247, i would assume since the orange wire is what powers that tree, it doesn't need to continue down the line. The white needs to as its the common ground for them all.
Nov 18, 2010. 2:41 PMled235 says:
Hi, i have the whole schematic set up according to your drawing in step 2, I cannot get my lights to blink, the arduino works, but the lights do not blink, they are just solid on. when i unplug the 5 volt supply, the lights turn out.

Could there be a mistake in your drawing? I know i may have messed up somewhere, but what is your opinion.
Thanks for your help!
Nov 27, 2010. 7:11 PMled235 says:
I put a brand new transistor in the circuit in the other direction, and the same thing happened. could i just use my outputs on my arduino to make the relay work and just ignore the transistor and resistor and just have the arduino connected to the relay coil?
thanks, sorry it took so long to get back to you.
Dec 23, 2009. 1:06 PMDefaultio says:
I made my circuits but there was a problem- the relays would make a small click but they would not complete their circuit. After tinkering, I found out that if I take the resistor out and bring the Arduino pin directly to the transistor then it would work. Can I just take out the resistor and it will work safely?
Nov 18, 2010. 2:40 PMled235 says:
Hi, i have the whole schematic set up according to your drawing in step 2, I cannot get my lights to blink, the arduino works, but the lights do not blink, they are just solid on. when i unplug the 5 volt supply, the lights turn out.

Could there be a mistake in your drawing? I know i may have messed up somewhere, but what is your opinion.
Thanks for your help!
Oct 5, 2010. 10:26 AMtbonz247 says:
in image 5... what did u do with the other orange wire... the side not crimped...
Aug 10, 2010. 11:41 PMlane29 says:
you could find a serial led driver and then you yould not need anything but the relays
Mar 18, 2010. 2:31 AMsapc says:
(removed by author or community request)
Jul 7, 2010. 11:03 AMtalkingjazz says:
There is also a limit of usually 80-100ma MAX that you can source per port (8 pins) on most AVR's. Trying to drive many relays from a single port would more than likely blow the AVR chip.
Apr 14, 2010. 12:39 AMsapc says:
that would take a lot of time working out the delays for the song. nice job
Dec 21, 2009. 4:33 PMgrodenbarg says:
depends on relay contacts, but yes if it is not rated at 120 on the business end there can be a fire hazard there if overload conditions exist.

BTW: to reduce confusion on wiring the 120 Volt side of this project the "ground" on your circuit plans is actually the "neutral" wire o the house. If it was actually wired to the earth ground, there could potentially be an electrical hazard. :(
Mar 18, 2010. 1:21 PMMinifig666 says:
 Hopefully it would trip the RCD before then.
Nov 27, 2009. 5:35 PMrider2006 says:
Relay contacts are rated at 30VDC, are they being used at 110 V?
Mar 18, 2010. 1:18 PMMinifig666 says:
 Because he is referring to the American AC mains. You can have a higher voltage at AC.
1-40 of 71next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
27
Followers
4
Author:dany32412