Picture of Arduino Christmas lights
I am very new to Arduino, but am having a lot of fun with it!!! After finishing the animatronics for my office Christmas float I decided to make some automated Christmas lights.
I know this has been done many times online, but I think this shows the best, easiest, and cheapest of some of the different ways I have found.

Most of this deals with the electrical box. I didn't take pictures of the cable build, so it is all in one step, but there is a lot there.

Also the software and a MP3 is at the end.

Let me know if you have any questions.

I will also say that I got the hot/neutral backwards. You don't want to be switching the neutral on and off and constantly pushing electrons down the other lines (the hot). Any leak, insulation damage, or whatever else will results in leaking electrons... and this is never good. So make sure the lines that are being switched are the hot lines, not the neutral.
I have keep this the same (wrong) way so as not to cause more confusion with the colors. If you are doing this I am going to assume you can make this switch without too much problem. Just make sure you are switching the hot, not the neutral.

It looks like you did a lot of planning, but you are unaware of some serious concerns when working with AC mains voltages and this instructable as it is now presents SHOCK AND FIRE HAZARDS.  I felt this was important enough that I created an account just to post it.

Breaking the neutral legs is wrong and dangerous presenting a shock hazard, especially given the nature of the projecct.  A neutral is basically a dedicated ground for the power to return on.  The way you have built this all the strings of lights will be hot when they are off and since Christmas lights are not grounded, they have no easy path to ground.  This means someone could cut/damage the wire or pick it up while in contact with something grounded and receive a shock.  Everything should be protected by a GFCI outlet, but it should never be relied upon to make up for improper design.  To correct this you need to rewire to break the hot legs instead of the neutrals.

The other thing is your use of sprinkler control cable as an extension cord which presents a shock and fire hazard.  You don't specify, but 7 conductor sprinkler control cable is typically 18 ga conductor and insulated for low voltage use.  For a safe project you MUST design for the maximum current the source can supply, not the anticipated load you will draw.  Christmas lights use thin gauge wire because they have a fuse in the plug limiting the maximum draw the wire/string can pull.  If the 18ga conductors were insulated for 120V AC (sprinkler cable is typically not) they would have a maximum of ampacity of 14 amps before you adjust for the length.  Assuming that this project is plugged into an outlet protected by a 15 or 20 amp circuit breaker you could easily exceed that 14amp maximum before the breaker trips.  This means that a short or heavy load down the line could melt the insulation presenting a fire and/or shock hazard.  Also of note are the plugs and receptacles you're using.  They do not look like they are weather rated and if they are, they likely won't seal properly with just the conductors going into them (without external sheathing).  To correct this you need to use wire sized and insulated for the usage (you could still use a 18ga 120VAC conductor, but you would have to add fuses inline to protect them). 

I hope you're not offended, you really did do a nice job of planning this out, it just seems like there were some concerns you were unaware of.  PLEASE address these concerns ASAP.
tlandrum (author)  kernelhappy1 year ago
Offended?!!? Are you kidding?!? THANK YOU!!

I totally messed up on the hot/ground thing... I can't believe I did that... it should be fairly easy to fix by just switching my plug.

This was actually made for a Christmas Float, so it won't be outside in weather, and a fuse is something I didn't even think about, but am certainly going to add.

This is why I love things like instructables... I hope I can help someone else learn to do some, and in the process learn more myself. So offended?!!? Please, thank you very much. I have a life time "be nice" policy, but I am glad they have an official one here.
It's obvious you put a lot of thought into the project and the instructable, but sometimes people react to corrections/constructive criticism like you told them their kid is ugly.  So I figured I'd just disclaimer it, glad it wasn't necessary.

The fusing is only really necessary to protect the relays (what are they rated for?) or the custom extension cord.  If you're going to keep the custom extension cord, see if you can find more info on the wire/conductors, maybe you'll get lucky and they're marked with a AC rating so you can pick a fuse.  Keep in mind that typical mini-lights use about 0.4 watts per bulb or 40 watts per 100 ct strand.  Since they're incandescent lights we can use a power factor of 1 and assume that 100 lights is 0.333 amps. In all reality the loads are probably pretty low and the 18ga wire is probably ok, but it still isn't right using it for voltage it's not rated for.

Also since this is going to be used on a float, make sure you have a working GFCI (especially if people will be on the float) powering the whole thing.  GFCI's work by comparing the current on the hot leg to the current on the neutral leg, if it senses more on the hot than on the neutral it assumes that something/someone is providing a better path to ground and shuts off the power.

As far as your later question in the instructable about using white/black it doesn't actually matter, but the convention of sending power on black/red is there so it's clear to anyone working on it which is hot.  On a semi-interesting side note, for a Junction Box with a device (light/receptacle) where the power goes there first then to the switch, power should be sent to the switch on the white conductor so that when it returns to the box it's on the black, preventing confusion in a crowded JB.
crussell191 year ago
Hey, so far this has been the most clear instructable on christmas light control and I think I'm going to try it out. Did you find that the wave shield was able to produce loud, semi-decent quality audio? Also would there be any way to play music from your computer without just having to start your Arduino code and press play at the same time? Thanks!
tlandrum (author)  crussell191 year ago
Good, it was fun.
The wave shield works great... you will have to make some changes to the hardware for use with the mega, but it isn't any big deal... just figure out which wires go where... and there are several things in the AdaFruit blog about it.
The sounds is 16bit mono... so it isn't high quality CD best, but plenty good enough for something like this.
I am really not sure about starting the music from the computer... the problem would be syncing it together... I really thought about that, but never really came to a conclusion.
Let me know how it goes!
tlandrum (author) 1 year ago
Talonsblade.... Do it... I have only been doing Arduino for a few weeks, and there is just nothing like writing some code that does something in the real world! And programing is nothing but C. Sure there are some functions you may not want to use on a little Arduino chip, but it makes it fun and simple. Something like this with relays is a great place to start because you have one pin that just turns one light on with one line if code. I am looking for my next project!
tlandrum (author) 1 year ago
I certainty can't disagree with upptown.... You can also buy a spool of lamp cord wire from Home Depot.
upptown1 year ago
Please do NOT use speaker wire! If you have to use twisted strand wire cannibalize a heavy duty extension cord. If you have a lot of incandescent strings the speaker wire will heat up and melt the insulation.
looks awesome. ive been thinking about doing this for a while now but i am more a software junkie than hardware so i never knew where to start. now, im going to get one of these and get started. i will let you know how it works out