As I mentioned in the previous step, the light bulbs are connected at one side to one side of the mains, the other side is connected to a relay, which is connected to the other side of the mains. Activating the relay closes the connection around the light bulb switching it on. There are a lot of choices for relays, but one obvious bad choice would be a mechanical relay. The last thing you would want when playing music would be the constant click of a mechanical relay (they're actually quite loud). The best alternative is a
solid state relay which allows you to control an AC line by simply switching on a low power led (~10-20mA). Any microcontroller/arduino can easily perform this task. The solid state relay (SSR) I used is the
PR36MF22NSZF which you can get from digikey or mouser or any place like that. This particular relay, in addition to being small (8 pin dip package) and silent, also allows for control of 240VAC up to 600mA! That corresponds to ~ 70 Watts at 120V. (120V * .6A= 72 W). So technically I could plug in 70 watt bulbs and be okay, although I don't think my eyes or anyone elses would be.
The circuit of what all the relays look like with the bulbs is the last picture above. Because it's so simple, I just picked up a small
perf board at radioshack . The resistors leading into them are necessary since the microcontroller is sending out 5V. If you've ever lit up an led with a microcontroller pin, this is the exact same thing, literally. Inside the solid state relay is a small infrared emitting led which sits next to a photo sensitive mosfet. When you light up the led, the mosfet closes. If you check the datasheet, you need 1.2V across the led with 10mA of current. So, from 5V you get: 5V - 1.2V = 3.8V .....3.8V/(10mA) = 380 ohms. Actually anything in this range will work +- about 100 ohms.
The microcontroller connects to the two relay boards with one strip of ribbon cable, explained in the next section.