This Instructable shows you how to build a four-gang outlet box in which each outlet is controlled via an Arduino (or any other TTL level signals).
It differs from the other relay boxes in that it uses no circuit boards and has very few parts (one chip and 4 relays).
Step 1: Assemble Materials/Review Plan
Needle Nose Pliers
Wire Cutters and strippers
Deep metal 4 gang output box and cover
Two 15Amp outlets
Four 5v 10Amp relays (such as Jameco’s 843155)
A ULN2803A (such as Jameco’s 34315)
A 5volt – 500ma Wall Wart (such as Jameco’s 164101)
A length of 5-conductor wire (I used Cat5 cable)
Household current rated wire with a male three-prong connector at one end.
Miscellaneous wire and solder
5 minute epoxy
Theory of Operation:
The electricity flow to each outlet of a four-outlet household current box is controlled via TTL level signals (such as the output pins of an Arduino). Five wires are connected from the Arduino to the outlet box, four wires being connected to four Arduino output pins and the fifth to the Arduino’s ground pin. A separate 5 volt wall-wart is used to power the outlet box (the outlet box relay activation coils will consume nearly 500 milliamps and a separate wall wart is used here so as not to stress the Arduino power supply). The TTL control lines are wired to the inputs of the ULN2803A which can handle the relay coil current needs and also contains diodes to safely manage the back EMF produced by the relay coils when switched off.
NOTE: for simplicity the schematic only shows a single outlet connection. Repeat the wires for the other three relays and other outlets, using ULN2803A Pins 3 & 16, 5 & 14, and 7 & 12.