15

What solutions are available to control a power plug (or even if possible a light socket), i.e. turning it On and Off?

I have looked for xbee/zigbee solutions but there doesn't seem to be a solution available for European power sockets (and so few solutions even for US sockets).

A wired solution including an Arduino is OK for me. I want it to be easy to use (as for zigbee I'm ok to learn how to use it), and safe (I don't want to connect or solder things because it's 240V, I don't want any risk with the electrical installation).

Matthieu Napoli
  • 525
  • 2
  • 5
  • 15

5 Answers5

9

I would suggest two options.

First - and this involves a small amount of wiring and soldering - using a PowerSwitchTail II. This is a very safe way of switching mains voltage. There is adequate isolation, it is safely cased and tested.

If you really want to do no wiring or soldering at all, then I would suggest finding one of the common 434/868/915MHz (depending on region) remote controlled sockets using a basic OOK protocol, and buy a simple 434MHz transmitter. A number of the protocols are documented in various places. The only issue with these is that you have no sure way of knowing if the switch is on or off.

Brad Parks
  • 103
  • 6
Cybergibbons
  • 1,934
  • 1
  • 16
  • 21
  • "Soldering is required for assembly." OP doesn't want to solder. Yeah, I missed that too the first time. – stevenvh Jun 06 '12 at 09:03
  • I noticed, but I believe the PowerSwitchTail is so easy and safe to build that it shouldn't be discounted. I'd say the bulk of danger with hobbyist mains control projects is bad design and poor casing/mounting. – Cybergibbons Jun 06 '12 at 09:13
  • Oh that's a great solution! I'm not against soldering at all, it's just I don't want to "affect" the electrical installation of the place I rent, and I don't want to modify the objects I use. I just want something to insert between the wall socket and the plug to turn on/off. So the PowerSwitchTail is *perfect*! – Matthieu Napoli Jun 06 '12 at 12:01
  • Updated link: [PowerSwitchTail](http://www.powerswitchtail.com/Pages/PSTKKit.aspx) (This product replaces the one listed.) – JYelton Dec 10 '12 at 06:57
8

enter image description here

This is how you control a relay. A relay gives you proper isolation from the mains, and with the appropriate relay you'll be able to switch more than a kW at 230V.

The relay will need more current than the Arduino can supply. That's where transistor Q1 comes in. The transistor multiplies the input current from the Arduino (the "on/off" at the left) by about a factor 100 and uses that higher current to activate the relay.

edit
An SSR (Solid State Relay) is even simpler, but usually a bit more expensive. (This one seems to be very low priced, at USD 3.50 at Digikey.)

enter image description here

This SSR connects via a resistor to the Arduino, that's the two left pins, and the other pins are the switch. This SSR can switch up to 1A.

stevenvh
  • 145,145
  • 21
  • 455
  • 667
  • 2
    If you don't have 12V at hand it is probably easier to use a 5V relay. Another option is an optocoupler/triac combination, for low currents (let's say a light bulb) these can be found in a DIP08 package. – Wouter van Ooijen Jun 05 '12 at 15:32
  • 1
    @Wouter - The phototriacs in these optocouplers can't switch loads, they're meant to trigger an external triac. Though some do have the power triac integrated next to the phototriac. The DIP package in the standard PCB footprint isn't SELV, which you'll want if the other side is an Arduino. – stevenvh Jun 05 '12 at 15:39
  • What you mention does indeed exist, but there are also things like S26MD01 (http://www.datasheetcatalog.org/datasheet/Sharp/mXtzyyt.pdf ): 230V, 0.6A in a DIP08 (or rather DIP07, one pin is missing). I think the propper term is optoisolated SSR. – Wouter van Ooijen Jun 05 '12 at 16:14
7

How about this:

enter image description hereenter image description here

You connect a 5V power supply, and the 4 inputs to 4 of your Arduino's outputs, and you're done. USD 16.50.

stevenvh
  • 145,145
  • 21
  • 455
  • 667
  • 1
    "you're done" not exactly, you have to find a power cord, cut it, separate the wires and connect them to the relay. That's not really "plug and play", there's "playing with 240V" involved. – Matthieu Napoli Feb 16 '13 at 12:05
  • Do i still require a transister and diode if i use this relay ? – Sakthivel Jun 21 '14 at 13:14
3

Perhaps X10 is what you need? X10 is a standard for communicating through the power lines of your house. This way you have have your Arduino send data into one power socket, which will be read by another device attached to a light fitting.

X10 home automation

Rocketmagnet
  • 26,933
  • 17
  • 92
  • 177
  • OP wants to switch the light on and off, and you want to sell him a home automation system??? – stevenvh Jun 05 '12 at 16:32
  • 2
    @stevenvh - The OP wants a safe solution: "I don't want to connect or solder things because it's 240V, I don't want any risk with the electrical installation" And you sell him a circuit he has to solder himself??? – Rocketmagnet Jun 05 '12 at 18:17
  • Zut! I missed that he doesn't want to solder. Why didn't you tell me? :-) – stevenvh Jun 05 '12 at 18:52
  • Well X10 is kind of what I want to do, but it's X10... it's old and it sucks. So I wan't to make my own automation system, I am able to interface the server, the arduinos (usb, ethernet, zigbee...), but when it comes to modifying the electrical circuits of the place I rent, I don't feel comfortable... I just want a power outlet with a 5V pin to turn it off and on :( – Matthieu Napoli Jun 05 '12 at 20:23
  • How does it suck? All you want to do is turn the power on and off. X10 is way better than that. Also, X10 requires no modification of the circuits of the place you rent. It's your best option. – Rocketmagnet Jun 05 '12 at 21:59
0

I'm using these devices Gembird / Siver shield Power manager. Check this short video. They work brilliantly well, even from Linux, and come in various flavours (USB, WLAN, ...)

jippie
  • 33,033
  • 16
  • 93
  • 160