Please help with the 230V AC connection !

Hi guys,

I am doing a project which now requires 230V AC circuit connection. Basically I want to control a 230V AC solenoid valve by Arduino via a relay. Can you help me with the connection please as I only know the DC connection.

1). Please see the picture of the SSR40-DA relay below, do I need another snubber protection circuit, or usually solid state relays already incorporate in this itself ?

2). If I do not need another snubber circuit, do I just connect the Arduino - relay - solenoid valve - mains directly without additional resistors ?

3). There are three power pins from the valve and the mains as well: hot, neutral, earth. However there are only two connection pins on the relay: hot and neutral. So do I need another different relay that has the earth pin on it (any recommendation or that is the name that has earth pin on it) ? Or there is a way of getting around this ?

4). How do I physically connect the relay, valve to the mains ? Do I buy a cheap UK lead (e.g. shown below in the picture) and cut the head or open the head and tie those pins to the relay accordingly by electric tapes ? Is this safe ? Can you teach me in some details like which line goes to which ? For example, how does it differ from the typical bulb connection below.

Thank you very much indeed.

Kind Regards,
Jeff

SSR40-DA.png

UK lead.png

Relay for bulb.jpg

It is extremely dangerous to work with 230 VAC circuitry, so if you are inexperienced, get help from an electrician or someone who is experienced with such tasks. Your life and/or your home is put at risk by faulty or improper wiring.

However, if proper safety procedures are followed, it is very simple and safe to control a solenoid with a solid state relay. Most SSRs have snubber circuitry built in. No diode should be used, as in the bulb circuit you show. The SSR output is wired in series with 230 VAC power and the solenoid coil.

1). Please see the picture of the SSR40-DA relay below, do I need another snubber protection circuit, or usually solid state relays already incorporate in this itself ?

You don't need anything else. We don't know exactly what's in side the relay, but it's ready-to-go.

2). If I do not need another snubber circuit, do I just connect the Arduino - relay - solenoid valve - mains directly without additional resistors ?

No. But double-check the specs. The Arduino puts-out 5V at 40mA or less. Generally, these things have a range like 3 - 15VDC, so the voltage should be fine. And, if you check the control current it's probably less than 10mA. Again we don't kwow what's inside, but if it's rated to be controlled by 5V, you don't need a current limiting resistor or anything else... You apply 5V and it turns on, remove 5V (or switch the arduino output to "low") and it turns off.

3). There are three power pins from the valve and the mains as well: hot, neutral, earth. However there are only two connection pins on the relay: hot and neutral. So do I need another different relay that has the earth pin on it (any recommendation or that is the name that has earth pin on it) ? Or there is a way of getting around this ?

The hot wire passes-through the relay and gets switched. The neutral & ground are directly-permanently connected.

Have you ever looked at a regular light-switch in your wall? There are only two terminals and only the hot passes-through the switch. (Usually, there is also a ground terminal on the switch for safety, and "3-Way" switches have 3 power-terminals.)

4). How do I physically connect the relay, valve to the mains ? Do I buy a cheap UK lead (e.g. shown below in the picture) and cut the head or open the head and tie those pins to the relay accordingly by electric tapes ? Is this safe ? Can you teach me in some details like which line goes to which ? For example, how does it differ from the typical bulb connection below.

That depends on what you have on either end. Are you getting power from the wall socket? What kind of connections does the solenoid have? (I don't know the UK color code.)

and tie those pins to the relay accordingly by electric tapes ? Is this safe ?

Usually, not electrical tape. Electricians normally use [u]Wire Nuts[/u] to attach wires in "free air", where there is no screw terminal or other option.

It's safe as long as everything is insulated, isolated, and wired correctly, so you can't touch the hot wire or anything directly connected to the hot wire. If all of the AC closed-up is in a grounded metal box, it's safe because if anything goes wrong the current will be "shorted" to ground and you'll blow a breaker. But, if the ground comes loose, or something is wired incorrectly so that you or the Arduino somehow makes contact with the line voltage, bad things can still happen! (The relay provides isolation between the power line voltage and the low-voltage Arduino.)

Ironically, a grounded box creates a hazard if you have the box open to work on the connections... If you touch the grounded box with one hand and a hot power line with the other hand, there is a "nice" path for the current to flow from hot, through your body, to ground! The guys who work on really high-voltage stuff have a "rule" to keep one hand in their pocket (and wear insulated shoes) so there is no path through their body. But it's hared to work with one hand in your pocket, so electricians working on 120V/220V household power don't do that. t

In general, it's not safe to work on power line voltage, so you may just have to be careful when testing/troubleshooting/experimenting!

I would use a arduino relay.

Good for 250 volts, opt isolated. etc under $2

http://www.ebay.com/itm/5V-One-1-Channel-Relay-Module-Board-Shield-For-PIC-AVR-DSP-ARM-MCU-Arduino-/310566336050?pt=LH_DefaultDomain_0&hash=item484f323632

DVDdoug:

4). How do I physically connect the relay, valve to the mains ? Do I buy a cheap UK lead (e.g. shown below in the picture) and cut the head or open the head and tie those pins to the relay accordingly by electric tapes ? Is this safe ? Can you teach me in some details like which line goes to which ? For example, how does it differ from the typical bulb connection below.

That depends on what you have on either end. Are you getting power from the wall socket? What kind of connections does the solenoid have? (I don't know the UK color code.)

First thank you very much for help, my knowledge on the electrics are very limited. On one end, I will draw power from the wall socket (the mains), on the relay end I will have two terminals (hot and neutral), on the solenoid valve end I will have three terminals (hot, neutral and earth), these terminals'connections on the valve are screw nuts type like you described.

Connecting Arduino with the relay is very easy (positive to positive, negative to negative), but I don't know how to wire the mains with the solenoid valve. I guess there are two steps ?

Step I: from the mains to the relay. I assume I need a three terminal plug & lead, one end plug into the mains on the wall socket, the other end wired to the relay: hot of plug & lead is wired to the hot of the relay.

Step II: from the relay to the valve. Then the neutral terminal of the relay is wired to the hot terminal of the valve, and the neutral terminal of the valve is wired to the neutral terminal of the plug & lead which is in turn connected to the neutral terminal of the mains.

So what I don't know is how to wire the earth of the plug & lead to the earth of the valve, do I just wire the two earth terminals directly ?

It's safe as long as everything is insulated, isolated, and wired correctly, so you can't touch the hot wire or anything directly connected to the hot wire. If all of the AC closed-up is in a grounded metal box, it's safe because if anything goes wrong the current will be "shorted" to ground and you'll blow a breaker. But, if the ground comes loose, or something is wired incorrectly so that you or the Arduino somehow makes contact with the line voltage, bad things can still happen! (The relay provides isolation between the power line voltage and the low-voltage Arduino.)

Ironically, a grounded box creates a hazard if you have the box open to work on the connections... If you touch the grounded box with one hand and a hot power line with the other hand, there is a "nice" path for the current to flow from hot, through your body, to ground! The guys who work on really high-voltage stuff have a "rule" to keep one hand in their pocket (and wear insulated shoes) so there is no path through their body. But it's hared to work with one hand in your pocket, so electricians working on 120V/220V household power don't do that.

Yes, I understand first, never connect the mains with the Arduino or to breadboard, that's the point of relay right ? It is designed to separate the mains from the lower voltage end.

Thank you very much indeed.

Earth ground on the solenoid should be connected directly to Earth ground on the mains supply, not to neutral or anywhere else. Otherwise it sounds like you understand the situation correctly. Still, it would not be a bad idea to find someone in the know to look over your circuit!

STOP, get the data sheet for the relay. it should have an opto internally and all you supply is a supply voltage of 5v at 10ma. easily done with any pin of the arduino.

there is no 'coil' so there is no back EMF. no need for the transistor or diode.

please DO NOT use a cheap relay from e-bay. it is not enclosed and has no business on a 220 line.

also, you show a 220V line in europe ? 220 is hot and neutral is not hot ?

in the USA, BOTH lines are hot and BOTH must be switched or you will have a hot line at all times. that is very dangerous.

as was stated, do not do this. get someone that is comfortable around 220 to help you. a chat room does NOT substitute for professional supervision.

as an aside, rig up a mercury switch to an arduino with dial out ability. that way, if you do kill yourself, when your body finally lets go of the high voltage and it falls to the floor, the tilt switch will call someone to come pick up the pieces. lastly do them a favor and put a note on the door to shut off the power so they do not suffer the same fate.

The UK domestic supply is nominally 230VAC single phase, actually 240VAC single phase. (*)

live = brown
neutral = blue
protective earth = green/yellow striped

Its genuinely single phase so live is hot, neutral is not, except during a fault, so you
always treat neutral as as dangerous as live. (A lot of small appliances are double
insulated with no PE and reversible cables anyway.

The US system is split-phase, not single phase.

(*) Most of Europe uses 220V, UK uses 240V, so the cross-european standard
is 230V +/- 6% or something like that to accommodate both. I suspect supply utilities
are migrating towards 230V as circuits are replaced/maintained.

MarkT: The UK domestic supply is nominally 230VAC single phase, actually 240VAC single phase. (*)

live = brown neutral = blue protective earth = green/yellow striped

Its genuinely single phase so live is hot, neutral is not, except during a fault, so you always treat neutral as as dangerous as live. (A lot of small appliances are double insulated with no PE and reversible cables anyway.

The US system is split-phase, not single phase.

(*) Most of Europe uses 220V, UK uses 240V, so the cross-european standard is 230V +/- 6% or something like that to accommodate both. I suspect supply utilities are migrating towards 230V as circuits are replaced/maintained.

I've just put my meter across the mains here and got a reading of 243V. I know that in some places, if you're next to a sub-station, the voltage can be as high as 260V, but that is rare.

[u]No neutral should go to the relay contacts.[/u] Just the live (hot) in to the contacts and the switched live (hot) out to the valve. The metal body of the relay should be earthed, but the OP has said there's no earth connection. There should be somewhere to connect an earth to, but possibly an earth lead can be trapped under one of the fixing screws (don't use a countersunk screw for this. Better still, use a tag). I'd not use it without a secure earth connection. From the picture, it looks as if the relay is designed to fit onto a DIN rail or other metal structure which would be earthed, hence there is no earth connection point on the body.