Intro: Automated Plug-In Appliances
The title may sound a little daunting, but this is probably one of the most simple instructables you could make. Here I will show you how to switch on and off appliances such as TV's, lamps, Christmas lights, or anything that plugs into an AC wall jack, with a microcontroller or any other computerized source.
WARNING: When creating this device, you will be dealing with ~120V AC. This is considered HIGH VOLTAGE, which as many know, can be lethal. Be careful when working with high voltage; NEVER work on this when it is plugged in. Make sure all connections are how they should be, and verify that they are fully insulated and won't short each other out, or you could cause a fire. Also, be aware of what is going on around you, be alert, and never work on with high voltage if you feel you can't devote enough concentration towards what you are doing. And lastly, if you ever have to service the connections inside this device, ALWAYS unplug it before doing so.
Step 1: Theory
Basically, all you need for a low-power microcontroller or any form of computer to switch high-voltage is either a relay or an SCR (solid-state type switching device).
Step 2: The Stuff You'll Need
- Control Source (Computer, microcontroller, etc.)
- 120V Relay (Look for one with a LOW trigger voltage that matches that of your control source's voltage levels. AKA TTL (5V) for most microcontrollers, RS-232 (~3-12V) for computers' COM port outputs.
- Extension Cord
- Enclosure (his is IMPERATIVE to keep the high-voltage components away from anything and everything. 120V AC is considered HIGH VOLTAGE)
- Diode (Rated at 120V AC or higher).
- TIP120 Transistor
- 1K-Ohm Resistor
- Wire (Be sure to use a heavy gauge for the 120V AC connections. If you use wire that is too small, you are risking setting your house on fire!!)
If the relay you use has a trigger voltage higher than what your control source can drive, you'll need a transistor or another relay to trigger the large 120V AC relay. In my case, I chose to use a smaller relay.
Step 3: Assembly
IMPORTANT: The relays are shown in the ON position (my mistake). Make sure to wire it so that the circuits are left OPEN normally, and CLOSED when the relays are activated. Also, any wires that cross over each other but do not have a black dot at the intersection means they are NOT connected. Don't connect those wires together or you will blow your wall jack in your house!!
- In the areas marked "NC", that means "No Connection" for all you who don't know
- The ~120V AC Input is simply the wall jack side of the extension cord
- The ~120V output is simply the socket(s) side of the extension cord
- The diode connected to the low voltage relay is sometimes included INSIDE the relay, but in this case I simply accidentally drew it inside
- The small red boxes inside each relay represent the coils
Here are seven easy steps to make this adapter:
1. Cut the extension cord in half, splice the ends, then tin them with a soldering iron
2. Drill two openings in the enclosure to insert the ends of the extension cord in
3. Make all connections, using heat shrink tubing if necessary for the relay circuit
4. Make all connections for the transistor circuit
--> This can be made on an external (outside of the relay enclosure) breadboard, or PCB (Printed/Perforated Circuit Board)
5. Secure the relays, if necessary (everything fit snug in mine so I just closed the lid and it all fit)
6. Run GND and CONTROL lines out from enclosure (these connect to the computer/microcontroller)
7. Close the enclosure
Step 4: Controlling Appliances, Lights, Etc.
You might ask, "Why would I build this? What's the point?" Well, there are many many many uses for this, but to list a few...
- Cut down energy costs through human presence detection
- Reduce annual costs due to unnecessary phantom power draw
- Cool home automation
- Parental control of home entertainment systems (TV, videogames, etc.)
- Halloween prop animation
- Animated holiday lights