Argon
Posts: 109
Joined: Thu Aug 25, 2011 11:04 am

Relay to Switch 220v

Tue Mar 11, 2014 9:14 pm

Hello,

I'm completely new to electronics. I already played a bit with the Gpio's on the Raspberry Pi and with some Led's. Now I want to switch my electronic Rolling Shutters (3 in total). The Raspberry Pi works on 5V and there are Gpio's on 5v and also on 3.3v.

The Rolling Shutters are powerd by 220 vac. Which Relay board do I need to connect to the Gpio pins and control the shutters?
Each shutter has 2 positions: Up and Down.

So, is it possible to connect a Relay board to the Raspberry Pi (without an external power source), that let me controle the 220v Shutters?

User avatar
iinnovations
Posts: 621
Joined: Thu Jun 06, 2013 5:17 pm

Re: Relay to Switch 220v

Tue Mar 11, 2014 10:19 pm

You will need an external power source in any circumstance.

You can use a transistor to switch a power relay. I have a circuit and the relay I use here is rated up to 380V single-phase: http://www.cupidcontrols.com/2014/03/cu ... ed-output/

The circuit is rather simple. There are many relay boards available that will perform this function. Take a poke around. Let me know if you have any more questions. And be careful. Cover your connections, ground properly, keep your hands away when powering up, and don't do anything you think "should I be doing this" before you do it.

Colin
CuPID Controls :: Open Source browser-based sensor and device control
interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

scotty101
Posts: 3723
Joined: Fri Jun 08, 2012 6:03 pm

Re: Relay to Switch 220v

Wed Mar 12, 2014 8:03 am

Argon wrote:The Rolling Shutters are powerd by 220 vac. Which Relay board do I need to connect to the Gpio pins and control the shutters?
You haven't mentioned the power of the device. Your choice of relay will depend very much on how many Watts the shutters need.

You get relays capable of mains voltage that will only cope with a few hundred milliamps, you are likely to need one that can cope with around 2amps (or 400w).
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

johndough
Posts: 254
Joined: Sun Jan 13, 2013 2:00 pm

Re: Relay to Switch 220v

Wed Mar 12, 2014 11:08 am

Argon wrote:Hello,

I'm completely new to electronics. I already played a bit with the Gpio's on the Raspberry Pi and with some Led's. Now I want to switch my electronic Rolling Shutters (3 in total). The Raspberry Pi works on 5V and there are Gpio's on 5v and also on 3.3v.

The Rolling Shutters are powerd by 220 vac. Which Relay board do I need to connect to the Gpio pins and control the shutters?
Each shutter has 2 positions: Up and Down.

So, is it possible to connect a Relay board to the Raspberry Pi (without an external power source), that let me controle the 220v Shutters?
Hi

So easy.

If you had a Halenco 3 relay board and copied it, job done.

So I will break it down with small circuit diagrams and parts.

A box to house the triple pole relays and terminal block, about 6" x 4".

2 relay bases (din rail optional) 11 pin
2 relays 11 pin, preferably 12 volt coils

Cabling

Interface to Pi.

More later...

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Relay to Switch 220v

Wed Mar 12, 2014 11:35 am

Why endure the clicky-clack of relays? Get a solid state relay. Why?

1 - opto isolated
2 - silent
3 - interfaces directly to the 3 volt gpio ports
4 - Handles 240+ volts and up to 40 amps.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

johndough
Posts: 254
Joined: Sun Jan 13, 2013 2:00 pm

Re: Relay to Switch 220v

Wed Mar 12, 2014 12:33 pm

Richard-TX wrote:Why endure the clicky-clack of relays? Get a solid state relay. Why?

1 - opto isolated
2 - silent
3 - interfaces directly to the 3 volt gpio ports
4 - Handles 240+ volts and up to 40 amps.

Hi

Well I don't know where to find such a thing.

So a pair of triple pole changeover relays please, with schematic would help.

johndough
Posts: 254
Joined: Sun Jan 13, 2013 2:00 pm

Re: Relay to Switch 220v

Wed Mar 12, 2014 12:39 pm

Hi

Any more info on the make or type of shutter please, and how its currently
controlled.

Meanwhile.....

TRIPLE POLE Motor Relay – DAISY CHAINED with LOCAL Switching Control
2 off FINDER - 60.13.9.012.0040 - RELAY, 3PCO, 10A, 12VDC
2 off FINDER - 90.27SMA - SOCKET, DIN/SURFACE, 11 PIN, RELAY
Triple Pole Motor relays.PNG
Triple Pole Motor relays.PNG (15.62 KiB) Viewed 15630 times
Triple Pole Motor terminals.PNG
Triple Pole Motor terminals.PNG (50.15 KiB) Viewed 15630 times
The wiring part I will come to next.

User avatar
iinnovations
Posts: 621
Joined: Thu Jun 06, 2013 5:17 pm

Re: Relay to Switch 220v

Wed Mar 12, 2014 2:29 pm

Richard-TX wrote:Why endure the clicky-clack of relays? Get a solid state relay. Why?

1 - opto isolated
2 - silent
3 - interfaces directly to the 3 volt gpio ports
4 - Handles 240+ volts and up to 40 amps.
Sometimes on resistance and heat dissipation are issues. If cycle time is slow, I still prefer mechanicals for high power.

Ssrs have a worse habit of failing closed.

Ssrs are more sensitive and likely to fail due to system disruption.

That said, I do use SSRs, but mechanicals have their place.
CuPID Controls :: Open Source browser-based sensor and device control
interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

johndough
Posts: 254
Joined: Sun Jan 13, 2013 2:00 pm

Re: Relay to Switch 220v

Wed Mar 12, 2014 2:46 pm

iinnovations wrote:
Richard-TX wrote:Why endure the clicky-clack of relays? Get a solid state relay. Why?

1 - opto isolated
2 - silent
3 - interfaces directly to the 3 volt gpio ports
4 - Handles 240+ volts and up to 40 amps.
Sometimes on resistance and heat dissipation are issues. If cycle time is slow, I still prefer mechanicals for high power.

Ssrs have a worse habit of failing closed.

Ssrs are more sensitive and likely to fail due to system disruption.

That said, I do use SSRs, but mechanicals have their place.
Hi

Thank you. "but mechanicals have their place"

In this case mechanical are far better, they will work for 20 years or so. Plugin: so replacement is simple. Noise will not be an issue as the motorised shutters will make enough noise to wake the dead.

As the motors probably have a running capacitor inside, slow switching (50 - 150 millisecs) will allow the capacitors to discharge and not blow, and this time is needed to allow the motor to be able change direction.

Failing closed could damage the motors, and bear in mind that there can be a back feed from the motor capacitor on the other direction wire.

A good compromise could be to control 2 SSR's that control mains voltage coils on my MR3 design.

User avatar
iinnovations
Posts: 621
Joined: Thu Jun 06, 2013 5:17 pm

Re: Relay to Switch 220v

Wed Mar 12, 2014 2:50 pm

johndough wrote:
iinnovations wrote:
Richard-TX wrote:Why endure the clicky-clack of relays? Get a solid state relay. Why?

1 - opto isolated
2 - silent
3 - interfaces directly to the 3 volt gpio ports
4 - Handles 240+ volts and up to 40 amps.
Sometimes on resistance and heat dissipation are issues. If cycle time is slow, I still prefer mechanicals for high power.

Ssrs have a worse habit of failing closed.

Ssrs are more sensitive and likely to fail due to system disruption.

That said, I do use SSRs, but mechanicals have their place.
Hi

Thank you. "but mechanicals have their place"

In this case mechanical are far better, they will work for 20 years or so. Plugin: so replacement is simple. Noise will not be an issue as the motorised shutters will make enough noise to wake the dead.

As the motors probably have a running capacitor inside, slow switching (50 - 150 millisecs) will allow the capacitors to discharge and not blow, and this time is needed to allow the motor to be able change direction.

Failing closed could damage the motors, and bear in mind that there can be a back feed from the motor capacitor on the other direction wire.

A good compromise could be to control 2 SSR's that control mains voltage coils on my MR3 design.
Good points. To be fair , lifetime depends on switching frequency. If you are cycling at <1s, a ssr will outlast a mechanical for sure. I spec a mix, but primarily mechanical for industrial applications, partially due to convention. Mechanicals are also easy to find and cheap wherever you are. Pop them out of their base and pop another in. Also makes disabling all outputs on commission pretty easy.
CuPID Controls :: Open Source browser-based sensor and device control
interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

johndough
Posts: 254
Joined: Sun Jan 13, 2013 2:00 pm

Re: Relay to Switch 220v

Wed Mar 12, 2014 3:03 pm

Hi

Step one is to mount the bases and a terminal block, (separate block for relay coils if wanted).
As this is daisy chained the assumption is for raised/retracted to have priority as for an external awning.
The supply connects to terminals 1 for an EARTH, 8 for the incoming NEUTRAL and 9 for the incoming LIVE.
Then terminals 1 – 4 need linking together across the top, as do 5 -8.
A BROWN wire is taken from the terminal strip 9 to terminal 1 on the FIRST relay base (11) then to terminal 6 (21) then to terminal 11 (31) and then back to terminal strip 9 completing a ring.
Brown wiring.PNG
Brown wiring.PNG (8.22 KiB) Viewed 15579 times
(I would use 1.0mm2, but then I would also know the motor current ratings etc.)

johndough
Posts: 254
Joined: Sun Jan 13, 2013 2:00 pm

Re: Relay to Switch 220v

Wed Mar 12, 2014 3:23 pm

NEXT in this jigsaw of dis-jointed jottings.

RLY 1 terminal 4 (12) to Relay 2 terminal 1 (11) RLY 2 terminal 4 (12) to terminal strip 11
RLY 1 terminal 5 (22) to Relay 2 terminal 6 (21) RLY 2 terminal 5 (22) to terminal strip14
RLY 1 terminal 8 (32) to Relay 2 terminal 11 (31) RLY 2 terminal 8 (32) to terminal strip17
DaisyChained picture.PNG
DaisyChained picture.PNG (61.87 KiB) Viewed 15563 times
This gives RLY1 priority over RLY2 if both are energised together.
Also either relay (or both relays) get priority over the terminal strip LOCAL control.

So far we have filled the tops of terminal strip no’s 1 – 9, 11, 14 & 17.
Next is to fill 10,12,13,15,16 & 18.

johndough
Posts: 254
Joined: Sun Jan 13, 2013 2:00 pm

Re: Relay to Switch 220v

Thu Mar 13, 2014 3:03 pm

Hiya

Still with me?

Really tricky step/concept next.

Local control of each motor, when priority permits.
Dealing with just Motor 1, which I expect to have 4 wires. A Green/Yellow for earth which connects to the common earthing area, likewise a BLUE wire that connects to the common Neutral area. The remaining 2 wires connect to Terminal strip 10 & 12, they may need to be swapped for direction.
Then a Mains rated rocker or bi-stable switch is added. The centre
pole/connection to term 11 and the UP/DN or arrowed contacts to 10 & 12, with the option to be reversed to match relay direction.
BI-STABLE.PNG
BI-STABLE.PNG (11.6 KiB) Viewed 15467 times
So...

The idea/logic/concept is this

The 2 relays are controlled by a switch and / or a BMS (we used to call them Building Management Systems), these days with all the cuts a Pi will do.

So if RLY1 is energised all 3 will move UP to their inbuilt run limit. If RLY1 is released after 2 minutes then the local motor swich can move the individual shutter. This local control allows a single shutter to be opened for staff access.
WARNING Will Robinson, these controls must not prevent egress in event of a fire or some other rapid exit etc etc.

RLY2 gets energised for 2 minutes and all shutters close.

NB If local control is a BI-STABLE and left in the open position then a shutter will open. So perhaps sprung loaded local switches are preferred.


What is left is the control of the relay coils, locally and remotely.

Argon
Posts: 109
Joined: Thu Aug 25, 2011 11:04 am

Re: Relay to Switch 220v

Thu Mar 13, 2014 10:01 pm

Pfiew, thanks for the answers, but the most of these info sounds like chinese for me.
I thought this would be a simple thing to test with the Raspberry Pi.

I fear that I better begin to learn more basics off electronics.

johndough
Posts: 254
Joined: Sun Jan 13, 2013 2:00 pm

Re: Relay to Switch 220v

Fri Mar 14, 2014 1:11 pm

Argon wrote:Pfiew, thanks for the answers, but the most of these info sounds like chinese for me.
I thought this would be a simple thing to test with the Raspberry Pi.

I fear that I better begin to learn more basics off electronics.

Hiya

Mine isn't electronics, it's more choo choo trains. The electricity goes along like Thomas then meets a set of points (C/O relay contact) if the points switch it goes to a new destination.

##########################

TRIPLE POLE MOTOR RELAY – DAISY CHAINED with LOCAL SWITCHING CONTROL

2 each FINDER - 60.13.9.0xx.0040 - RELAY, 3PCO, 10A, xxV?C
2 each FINDER - 90.27SMA - SOCKET, DIN/SURFACE, 11 PIN, RELAY
21 Terminals rated for 250 volts 15amps
1 Suitable enclosure, wiring etc.


Step one is to mount the bases and a terminal block, (separate block for relay coils if wanted).
As this is daisy chained the assumption is for raised/retracted to have priority as for an external awning.
The supply connects to terminals 1 for an EARTH, 8 for the incoming NEUTRAL and 9 for the incoming LIVE.
Then terminals 1 – 4 need linking together across the top, as do 5 -8.
A BROWN wire is taken from the terminal strip 9 to terminal 1 on the FIRST relay base (11) then to terminal 6 (21) then to terminal 11 (31) and then back to terminal strip 9 completing a ring.
(I would use 1.0mm2, but then I would also know the motor current ratings etc.)


Next is the Daisy Chaining steps.

RLY 1 terminal 4 (12) to Relay 2 terminal 1 (11) RLY 2 terminal 4 (12) to terminal strip 11
RLY 1 terminal 5 (22) to Relay 2 terminal 6 (21) RLY 2 terminal 5 (22) to terminal strip14
RLY 1 terminal 8 (32) to Relay 2 terminal 11 (31) RLY 2 terminal 8 (32) to terminal strip17
This gives RLY1 priority over RLY2 if both are energised together.
Also either relay (or both relays) get priority over the terminal strip LOCAL control.
So far we have filled the tops of terminal strip no’s 1 – 9, 11, 14 & 17. Next is to fill 10,12,13,15,16 & 18.

RLY1 term 3 (14) to Terminal strip 10 RLY2 term 3 (14) to Terminal strip 12
RLY1 term 7 (24) to Terminal strip 13 RLY2 term 7 (24) to Terminal strip15
RLY1 term 9 (34) to Terminal strip 16 RLY2 term 9 (34) to Terminal strip18
This gives 3 UP/Retract outputs on TS 10, 13 & 16 from RLY 1
This gives 3 DN/Rollout outputs on TS 12, 15 & 18 from RLY 1
Local control can take either or both of these 2 forms, individual motor for maint/repair to group override, with the proviso of priorities already established.


Really tricky step/concept next. Local control of each motor, when priority permits.

Dealing with just Motor 1, which I expect to have 4 wires. A Green/Yellow for earth which connects to the common earthing area, likewise a BLUE wire that connects to the common Neutral area. The remaining 2 wires connect to Terminal strip 10 & 12, they may need to be swapped for direction.
Then a Mains rated rocker or bi-stable switch is added. The centre pole/connection to term 11 and the UP/DN or arrowed contacts to 10 & 12, with the option to be reversed to match relay direction. Ditto for motors 2 & 3.

Depending on the voltage selected, 12vdc is suggested, then interfacing to the PI using a transistor and optocoupler is the next step. Obviously the control using python for opening and closing times etc has yet to be determined.
3 Motor Relay Schematic & External.PNG
3 Motor Relay Schematic & External.PNG (60.11 KiB) Viewed 15391 times
The electronics come next.... or not as the case may be.

Return to “Automation, sensing and robotics”