sergiu.dev
Posts: 1
Joined: Mon Apr 27, 2015 9:27 pm

Home lights control - with manual control also

Mon Apr 27, 2015 9:43 pm

Hello everyone!

I am the recent (and very excited) owner of a RPi. The project I am working on is a Home Monitor and Control system.
Untill now I have played a little bit with the RPi, GPIOs (cobbler and breadboad) and I succeeded in creating a web application that I can use to turn on or off a LED on the breadboad :) I know it might sound simple to some of you but it's a real accomplishment to me.

The next step I would like to do is to control a home light switch with the RPi. After some research I have found that I could replace the "classic" wall switch with a relay that can be controller with the PI but I would still like to be able to turn the lights on or off using the wall switch also. What I was thinking is to replace the wall switch with a "button like" switch that will turn the relay on or off.

Could you please help me/point me in the right direction to find out how could I turn on/off a relay using a button, without the use of the PI ports? (the relay and button will not be phisically connected to the PI, I will use a RF 433 Mhz kit).
For now, I could really use to know if/how a relay can be turned off/on by a button.

This is the relay I intend to use : http://www.seeedstudio.com/depot/grove- ... th=156_160

Thank you very much! Any help/information is highly appreciated.

oldun
Posts: 6
Joined: Wed Apr 29, 2015 6:16 am

Re: Home lights control - with manual control also

Wed Apr 29, 2015 6:26 am

Hi

Its relatively straightforward to use a switch to force on or force off but to override the automation completely needs two switches. To force the lights on just place the switch across the relay contacts. To force off place the switch in series with the contacts. To override the automation completely a two way select switch, three pins, centre one to lamp, must be used with the outer pins going to the relay and the manual on off switch.

Hope this helps

Best Regards

Oldun

User avatar
DougieLawson
Posts: 35540
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Home lights control - with manual control also

Wed Apr 29, 2015 8:35 am

oldun wrote:Hi

Its relatively straightforward to use a switch to force on or force off but to override the automation completely needs two switches. To force the lights on just place the switch across the relay contacts. To force off place the switch in series with the contacts. To override the automation completely a two way select switch, three pins, centre one to lamp, must be used with the outer pins going to the relay and the manual on off switch.

Hope this helps

Best Regards

Oldun
BZZZT! Wrong!

You need a relay with NO and NC contacts and a two-way switch with the same.
Image
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

oldun
Posts: 6
Joined: Wed Apr 29, 2015 6:16 am

Re: Home lights control - with manual control also

Wed Apr 29, 2015 10:53 am

Hi DougieLawson

I don't quite see it that way.

Sketch indicates three states as outlined in my post.

Best Regards

picclock
Attachments
light.png
light.png (14.13 KiB) Viewed 20504 times

User avatar
DougieLawson
Posts: 35540
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Home lights control - with manual control also

Wed Apr 29, 2015 11:06 am

Your circuit is overly complex. With a two-way switch and a relay you can have it so that either system can always control the light regardless of the position of the other switch.
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

harvy
Posts: 90
Joined: Mon Nov 26, 2012 1:49 pm
Location: London - UK

Re: Home lights control - with manual control also

Wed Apr 29, 2015 1:21 pm

I'm currently planning something very similar, and having some background in household electrics, i'm going with DougieLawson's solution.

Effectively all you are doing is making a single light switch into a two-way light switch, but with a relay.
If you already have a two way light setup, then add in the third intermediate switch.

Have a look on:
http://www.diynot.com/wiki/Electrics%3ATwo-way-lighting

for the setup.

all you need to do is replace the first/last switch in the chain with the 2-way relay.
It will allow any if the switches to turn the light on.off be it the one on the wall or the relay.

oldun
Posts: 6
Joined: Wed Apr 29, 2015 6:16 am

Re: Home lights control - with manual control also

Thu Apr 30, 2015 5:19 am

Whilst the two way lighting configuration will work it does have the snag that the lighting state is determined by the switch position. This means that the light state will change when the relay(s) change but you will not know whether it is on or off. A single pole changeover relay in conjunction with the manual switch is clearly the best choice for this configuration.

Playing devils advocate, if the relay/select switch in my diagram above (right) was replaced with a pi controlled changeover relay, it would then be possible select whether the pi or manual switch would have control.

Best Regards

oldun

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Home lights control - with manual control also

Thu Apr 30, 2015 8:31 am

I'd agree with Dougie Lawson's suggestion but bear in mind that the Pi won't know the status of the light (so on and off are relative terms) unless you also add some kind of monitoring for that into the circuit.
Doug.
Building Management Systems Engineer.

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

Re: Home lights control - with manual control also

Thu Apr 30, 2015 9:02 am

BMS Doug wrote:I'd agree with Dougie Lawson's suggestion but bear in mind that the Pi won't know the status of the light (so on and off are relative terms) unless you also add some kind of monitoring for that into the circuit.
Hi

Well what Dougie Lawson showed is accurate, and the kind of solution I have mentioned.

However there are alternatives... http://www.telerupteur.com/

This shows Dougie's idea....
http://translate.google.co.uk/translate ... rev=search

Differing ideas in differing countries.

User avatar
DougieLawson
Posts: 35540
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Home lights control - with manual control also

Thu Apr 30, 2015 9:28 am

That French device appears to be a latching relay that's activated and deactivated by one (or more) push-to-make switch(es).

There's not enough details (that I've found on http://www.telerupteur.com/ with my limited technical French) of the voltages on the control circuit side of that device (so I'll assume it's 230V AC). The French wiring standards are much the same as ours because of the EU control of that stuff. You could use a RPi to drive a relay to replace one of the push-to-make switches and activate the "télérupteur".
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Home lights control - with manual control also

Thu Apr 30, 2015 2:11 pm

DougieLawson wrote:That French device appears to be a latching relay that's activated and deactivated by one (or more) push-to-make switch(es).

There's not enough details (that I've found on http://www.telerupteur.com/ with my limited technical French) of the voltages on the control circuit side of that device (so I'll assume it's 230V AC). The French wiring standards are much the same as ours because of the EU control of that stuff. You could use a RPi to drive a relay to replace one of the push-to-make switches and activate the "télérupteur".
I agree (except for the French bit, I let google handle the translation).

A Single Pole Single Throw (SPST) mechanical latching relay would be used (seemingly controlled at mains voltage), all switches are connected in parallel to the relay coil, when any single switch is energised the relay changes position and the circuit is either energised or de-energised accordingly.

Mechanical latching relays do fail over time, I've got a DPDT one in pieces on my desk at the moment (no obvious cause of failure, must throw it into the WEE waste bin soon) it was probably in use for about 12 years with multiple operations per day.

A suitable 5v relay board could certainly be used to allow the Pi to give the momentary signal, this still leaves your Pi not knowing whether the lights are on or off.
Doug.
Building Management Systems Engineer.

DavidSturzenbecher
Posts: 19
Joined: Wed Dec 24, 2014 2:33 pm

Re: Home lights control - with manual control also

Fri May 01, 2015 2:15 am

If you really needed to know the state of the light, you could have a circuit monitor current or the (stepped down and rectified) voltage after the final two way switch.

duckvader
Posts: 11
Joined: Thu Apr 23, 2015 2:41 pm

Re: Home lights control - with manual control also

Mon May 11, 2015 8:10 am

I am wanting to do this same thing with my pool lighting. I want to be able to have a switch outside on a post that I can use to control the light outside and have relay to turn it on via a web app on my phone. My issue is finding a 2-way waterproof switch.

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

Re: Home lights control - with manual control also

Mon May 11, 2015 8:48 am

duckvader wrote:I am wanting to do this same thing with my pool lighting. I want to be able to have a switch outside on a post that I can use to control the light outside and have relay to turn it on via a web app on my phone. My issue is finding a 2-way waterproof switch.

Hi

MK waterproof switches, available from Screwfix.

Return to “Automation, sensing and robotics”