I wanted to be able to control a power outlet wirelessly with an Arduino and Xbee radios. There are pigtail devices out there that you can use to turn small appliances on and off, but they are expensive and bulky. I wanted something that:
1. was low cost
2. didn’t require an Arduino at the remote end
3. will fit inside a standard electrical outlet box with a dual electrical outlet
4. will handle 20 amps or more
5. I could switch on/off with my phone or from any internet connection
The first problem I ran into was that I needed a way to convert the voltage in the outlet box from 120 volts AC to 3.3 volts DC for the Xbee. A power supply or transformer was out of the question. They are way too big to fit into an electrical box. After some research I found some Rohm non-isolated AC/DC converters that were about the size of a postage stamp for around $9. They are available at Digi-Key (p/n #BP5063-5-ND). A number of external components are needed to make it work, but those components can be purchased easily for under $5 and when completed, the AC/DC converter only takes up less than two cubic inches. To drop the voltage down to 3.3 volts I used the SparkFun Xbee Explorer Regulated board (p/n WRL-11373) for $10 which not only drops the voltage but is perfect for mounting the Xbee and giving you access to the XBee pins.
The next piece I needed was a small relay that I could control with the Xbee output pins. SparkFun has a $3.95 relay control board (p/n COM-11041) that will accept a Tyco Electronics T90 Series 5 volt relay and the components that will drive the relay directly from the 3.3 volt output pin of an Xbee. Sparkfun also sells a 20 amp Tyco relay, but I wanted something that could handle a little more power if needed. Digi-Key has 30 amp, 5 volt Tyco relays (p/n PB109-ND) that will fit the SparkFun relay control board for about $8. You just need to remove one unused pin to fit the board.
After putting this all together it easily fit inside of an electrical outlet box and cost about $35 excluding the electrical outlet hardware.
In a future post I’ll show you how to program the Arduino and Xbees to turn the power switch on and off and how I connect it all to the internet.
WARNING: This device uses potentially lethal voltages. Use proper precaution if you decide to build one, as it could kill you! Neither is this device UL approved. Use it at your own risk. You don’t want to burn your house down because you left it unattended.
Thanks for putting this together. the digi smartplugs and the switch-tails are pricey. Do you have a list of all the components you used and how they connect together.? I got the just of it, but I’m not an electrical engineer. I can see a few capacitors and maybe a resistor or two, but just don’t know why they connect together. Good explanation and great picture…
Mark
Hi Mark,
If you click on the links withing the post you’ll find the components necessary to build the project. The “Rohm non-isolated AC/DC converters” link is a spec sheet with a schematic and all the necessary values for voltage conversion. I think I purchased most of the components from DigiKey. Besides that, you just need an Xbee, relay control board, and the relay. I’ve listed the source and parts for the last two.
Russ