Yet Another Arduino 110v Power Controller

 by maewert
4-gang.JPG
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).
 
Remove these adsRemove these ads by Signing Up

Step 1: Assemble Materials/Review Plan

FD13HSGG9BWGLNS.MEDIUM.jpg
Wire clamps.JPG
Epoxys.JPG
Tools Needed:
Needle Nose Pliers
Wire Cutters and strippers
Screw driver
Soldering Iron
Multimeter

Materials:
Deep metal 4 gang output box and cover
Wire clamps
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
Wire Nut

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.
TerryKing says: Apr 26, 2011. 9:20 PM
Lots of information on Arduino power control here:

http://arduino-info.wikispaces.com/ArduinoPower

Regards, Terry King

terry@yourduino.com
maewert (author) in reply to TerryKingApr 27, 2011. 6:23 AM

Very nice site, Terry, and well worth the read for those new to the subject as the site you linked provides a a detailed overview and excellent descriptions of the issues involving microcontroller control of high power electrical loads.  Also the commercial boards the site features seem to have good value for the price and are worthy of consideration in home projects.

Best Wishes
Mark.

altoidsfreak says: Aug 14, 2012. 10:09 AM
If I did use a cell phone charger, how would I do this? I am also confused with using a wall wart. Do I have to cut the end off of the cord?
maewert (author) in reply to altoidsfreakAug 14, 2012. 9:04 PM
You can use it either way.  Just be sure it provides the voltage and the current you need.  If you purchase a mating connector then you can plug the charger into the connector and wire the connector to the circuit.  Otherwise you can cut the connector off the charger and wire the charger directly.
Best Wishes.
ringai says: Aug 9, 2012. 7:24 AM
This was interesting. I might suggest, though, that you make use of relays that will handle 15Amps.

Also, the NM wire clamps should both have bushings on the inside. They run about USD$2 for a five pack at the local big box. The bushing keeps the clamped wires from chaffing against the edges of the clamp on the inside of the junction box.

Rich1953 says: Jan 5, 2012. 5:49 PM
Nice write up, and a fun way to get into power control. Also could easily be expanded. If you want to bring the power supply requirements down the relay could be replaced with a Photo-Triac
This is a type of switch to control AC current with an LED.
A solid state relay would also work. but that would be for a more permanent instillation
maewert (author) in reply to Rich1953Jan 6, 2012. 6:21 AM
Thank you.
Yes, I think you are right. I have used regular triacs (but not photo triacs but i understand the concept :-). I prefer the 'solid' on and off a relay provides at the sacrifice of reliability as the relay's physical parts wear out much sooner than the triac. I have had problems of leakage current using triacs - a CFL bulb that would flicker a little bit when it should have been OFF when under triac control.

Thanks again!

Best wishes
fluxor says: Apr 30, 2011. 8:55 PM
Try using a tiny cell phone charger. I did in one of my projects. They are switching supplies and are quite small, but will output 5v anywhere from 500mA to 1A depending on the unit.
Voltamps says: Jan 14, 2011. 5:23 PM
An excellent and well documented instructable. How about adding the script for completeness. I have done lots of electronics projects but am new to the arduino so any help with programming would be really welcome.

Many thanks.
maewert (author) in reply to VoltampsJan 15, 2011. 12:52 PM
Voltamps,

If I were you I would begin my using the BLINK example program that comes with the Arduino environment. It will show you how to blink an LED or to 'blink' the power outlet in our case. This will help you debug your circuit.

Other than this the code would depend on what you want to accomplish, such as turning on a lamp when an infrared beam is broken, or turning on a heater when the room gets below a certain temperature. Each of these examples would be possible but would take additional hardware.

Best Wishes.
City Lights says: Nov 30, 2010. 3:41 PM
I would suggest to anyone playing with circuits that switches house main voltage to install a ARC Fault breaker at the panel or somewhere before your custom monkey business! This Is Not the same as a Ground Fault which saves You from getting electrocuted. Most electrical fires are started by Arcing. A small arc over time will carbonized where the electrical bounding has been broken or poorly made. Once carbonized, heat increases and increased heat can lead to Fire. Arc Fault Circuit Interrupters Saves Lives from Fires! ..and property and insurance hassles :) so play it safe and Happy automating!
maewert (author) in reply to City LightsDec 1, 2010. 5:44 AM
I was not aware of these.  Sounds like a very good idea!
w0rm5 says: Nov 13, 2010. 2:04 PM
Very Nice instructable, can I program the code and add it directly to the arduino? So I can work without the computer?
maewert (author) in reply to w0rm5Nov 14, 2010. 12:56 PM
Yes,  an Arduino can easily provide the signals to control the relays.  In the demo I used the PC only to program (and run) the Arduino which provided the signals.
Computothought says: May 19, 2010. 9:29 PM
nte2018 = uln2803. if you have some really old disk drives, sometimes they have them.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!