Safe mains switching shield?

One thing I have been looking for won't be too cheap or too small - a safe way to switch 230V or 110V via Arduino. Best would be a version able to address 16 or so shields, but a lot of projects could use reliable, safe methods to handle high voltage.

Are there any projects out there already?

Best,
Jens

I don't think you are going to get that to fit onto a standard shield size.

With AC you want to switch both hot leads per line, so 2 relays.
Depending on Amps the relays get big and expensive. We are using 2 relays rated for 60amps each, and thats about 1.5inches square. Then you need AC mount points/blocks(2), those are about 2 inches by 1 inch.

Two hot leads? Standard AC there is hot, neutral, and ground (single phase); you could switch both hot and neutral - probably the safest, but really you can get away with an SPST switch on the hot side (same as switches in house wiring). Three phase is a different matter...

I would personally stay away from any AC "shield" - yes, they can be built; but they are inherently dangerous by having the AC too close to the low voltage control. Its best to keep a distance between those.

Look into SSRs (solid state relays); you can get away with regular relays, but you usually need to hook up the a drive transistor and such anyway - SSRs can usually be switched with TTL logic levels, plus they are typically opto-coupled devices, so they keep the AC isolated. Most are designed to be mounted to a metal plate with heat sink grease to act as a heat sink. They tend to be more expensive than a regular relay system, but they are more reliable in the long run.

Set things up so that the control lines from each relay (whatever system you use) run to an IDC connector or something that you can run a piece of ribbon cable to the Arduino; keep your wires neat on this project, you don't want a stray hookup wire touching the wrong terminal connected to 110-220 AC! Also, once you have your relays or whatnot connected and verified working (be very careful in your testing; respect AC and keep a hand in a pocket while working near it), put the relay board or whatnot in a case, under some kind of non-conductive covering - something - so that stray or errant hands, parts, screws, whatever - don't touch the wrong thing.

Good luck! :slight_smile:

Here you go:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1236998971/0

more dangerous than the danger shield

:slight_smile: Yeah only for the experienced in HV...

Mowcius

I kinda want to follow up to my own comments:

If you expect to put the thing together once, and never mess with it again (or fiddle with it periodically), having a close physical relationship between the low voltage AC or DC, and high voltage AC side of things can be OK; after all, it is done all the time in switching power supplies.

But it isn't for the faint of heart, or the person who is inexperienced in AC voltages (especially household levels - and don't even think of industrial levels), or for the tinkerer/fiddler.

But if your intent is to build a fairly permanent installed controller, and to install it in an appropriate enclosure with ground protection and proper fuses installed, such that it can't be easily accessed by the curious (and takes you some work to access it too, if needed), then, designed properly and with care it can be safe.

Its just that on a lot of these custom Arduino projects, what I think of as "safe", I see others do in a haphazard manner that look possibly unsafe and/or dangerous to the curious (who should know better than to stick their hands into a rat's nest of wire).

Then there's mowcius with his Arduino acrylic covers (although, having personally witnessed a flashover of a piece of hookup wire that shorted out across a 12VDC gel-cell, his ideas do have merit!)...

:smiley:

I've been using a solid state relay to switch mains from an Arduino perfectly fine. If it is a high inductance or capacitive load, you could however knock out the USB communication, as I have found all USB products that use the FTDI interface don't like very much interference at all!

Thank you for your comments, all! Very helpful!

The intention is not to have something that physically fits on a shield. It might just use the shield part as the "low voltage connector".

What I would love to see is a device you could connect to an Arduino, probably by using a stackable shield, which would (in it's simplest form) be pluggable to a wall socket and control a secondary socket.

Versions with more sockets - or high voltage connectors - would be the higher-end option.

Look at it this way: I do software. But I am not an electrical engineer or an electrician. Whatever I could do with mains power might work, but if I wanted to build something safe enough to give away, I wouldn't consider myself qualified to do such a thing.

Simple sample application:

Arduino with Network shield and mains power "shield".
Firewall box tends to hang now and then and power cycling fixes it.
Connect to "powerduino", let it ping some address every minute.
No answer? Just switch power off for a minute and back on 30 seconds later.

Best,
Jens

Another possibility (although probably more dangerous to play with if you don't know what you are doing with AC house current) is to use an SCR to turn on/off the load:

http://www.sullivan-county.com/ele/triacs.htm

That page discusses both SCRs and triacs; SCRs allow simple on/off operation of AC loads, triacs (used properly) can be used to (in effect) PWM the AC signal at various points of its phases to control brightness of a lamp, for example.

I don't know for sure, but I imagine that a solid state relay uses an SCR for the load switching, and is "connected" to the logic switching side with an optocoupler; given that it is an "all-in-one" unit with screw terminals and a handy metal mounting base for heat-sinking, for what you want to do, it is likely the best option, rather than using SCRs or triacs.

Just wanted to let you know a couple other options, though...

:slight_smile:

Its just that on a lot of these custom Arduino projects, what I think of as "safe", I see others do in a haphazard manner that look possibly unsafe and/or dangerous to the curious (who should know better than to stick their hands into a rat's nest of wire).

Then there's mowcius with his Arduino acrylic covers

Yey go me!

Arduino with Network shield and mains power "shield".

After that line I was hoping for some cool networked home automation system. :wink: Alas, it was not too be. Would be what I'd be doing with that stuff I think. Turn on the kettle before I get home (maybe not such a good idea though...)

Mowcius

I really wish I had the funding to do some sort of home automation! The only real problem is buying something like a WiFi shield or Ethernet shield, but I just don't feel like blowing 50+ USD..

I suppose the same could be done via an Arduino connected Serially to a computer, but I still have trouble with Serial (especially different variable types. No matter what I try, I can't get it to work quite right :P).

Relays would be cheap enough, and obviously I'd need a S$&t load of wire, or else wirelessly connected Arduinos (cha-ching), among other things.

Where did the rant begin or are you permenantly ranting? ;D

Mowcius

I realized I accidentally left my rant tag open about three years ago. Can't believe no one ever told me... ;D

Haha yeah I noticed :slight_smile:

There are also some (I think*) remote controlled outlets for lamps etc.
Then you would have to control the IR via the Arduino, but it would be safer I think.

That is a good idea!

I had not thought of something as simple and safe as that. You could even gut the original remote if you are feeling lazy about IR coding...

There are a load I have seen that control about 5 different sockets so they would be good. You have to have line of sight to the sockets though although you could just stick the IR LED right next to the socket.

Mowcius

For the one of the link, it has not to be strictly in line of sight. But of course...

If you need more modules than possible with one system you could add some from another brand (but test it for interferences).

Yeah it's for me the cheapest and the safest solution! :slight_smile:

Liquidware made a RelaySquid thingie: http://www.liquidware.com/shop/show/RS/RelaySquid sort of like a switching power strip.

@cr0sh

But it isn't for the faint of heart, or the person who is inexperienced in AC voltages (especially household levels - and don't even think of industrial levels), or for the tinkerer/fiddler.

[scuicidal mode]
Well nobody becomes "experienced" without trying first
but it is dubius to do mains without a friend in the room
[/Scuicidal mode] ;D

David

I'm thinking again about my DX outlet idea... thinking about testing it out.

Did you read the description?
It seems to be wonderful:

Learning IR InfraRed remote receiver

That means you don't have to find out the IR code on the Arduino, but just decide the code you want to use!
So... lots of outlets possible.

(The only problem I see is that it seems quite loud... but for 4?...)

The only problem I see is that it seems quite loud

Why loud?