The relay component allows the electronic device to be turned on and off programatically. We are using it for the lights and ventilation for the hot pepper plants in our autoponics project: https://www.hackster.io/autoponics/autoponics-dc37.. Our set up works for any electronics with 2 prongs that plug in to a north American wall outlet, but you can buy the right parts for whatever outlet you have.
For this project you will need
- 1 yard red wire
- 1 yard black wire
- wall plug
- 2 prong outlet
For the wire, we bought the thinnest gauge available at our local hardware store ($1.50 each). For the wall plug and 2 prong outlet, we had the Add-An-End plug and outlet (Cooper brand), costing $3 each at our local hardware store.
Step 1: Prep Wires for Insertion Into Outlet
The outlet clips the wires in with a pointy metal part, which is meant to pierce through the plastic wrap around the wire. We found that the clipping action wasn't strong enough to make a connection this way, so we clip the wires into the outlet to mark where the contact is supposed to be, and then we use a hobby knife to strip the wire at that spot.
Step 2: Clip Wires Into Outlet
Make sure that the stripped side is facing the pointy clip on the inside of the outlet. Also, be sure that the black wire is the ground (the wider prong), and the red wire is the power (the smaller prong). You may need to adjust the way that the pointy clips are pointing (we used a key for this) if they're not catching the wire properly. Check your connection with a multimeter.
Step 3: Attach the Red Wire to the Relay
Cut the red wire in half, and attach the relay to the wires where you put the cut. Strip the ends of the wires. Our wire was too thick, so we snipped off half the strands so that the wire would fit into the relay. Screw the relay wire holder tight, and test the connection with a multimeter.
Step 4: Attach the Plug
The plug has an outer shell and the inner part where the wires are clipped. First, thread the outer shell onto the wires. Then, clip the inner part onto the wires to mark them. Take the wires out, strip them where they are marked, and clip them back into the inner part of the plug. Put the plug shell back on.
Step 5: Use
We wrapped our setup in electrical tape so that it was less fiddly.
Now you have a programmable relay! It's also a short extension cord. We are using it to control the lights and fan for our aquaponics project. Here's a demo video: https://goo.gl/photos/6TAKYU27QreapBsT9