Let me add this to the beginning of this... I made some very large safety mistakes in this... please if you do anything with this understand the electricity, how it should be used, and how to NOT do it like I did. There are some things are are fine... great even... and there are some things that should NOT be done. (the biggest ones I can think of are putting the relay on the neutral, instead of the hot, and using low voltage wire instead of 120v wire).
That being said everything here works, and was very educational for me. With a few minor changes you can amke this functional AND safe. Thank you.
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.