Hacker'n'Tinker guy
Posts: 51
Joined: Sun Dec 07, 2014 5:03 pm

how to replace a switch with relay in a 2 switch circuit

Fri Nov 27, 2015 5:17 pm

I want to control lights from rpi or arduino and the same time i want to have local control of the light through a physical wall switch.
Below is a double switching circuit

Image

so how do i replace one of the switches with the outputs of a relay no nc and com.

The relay switching will be controlled by the Arduino or raspberry pi.

User avatar
Laurens-wuyts
Posts: 716
Joined: Wed Aug 21, 2013 7:35 pm
Location: Belgium
Contact: Website

Re: how to replace a switch with relay in a 2 switch circuit

Fri Nov 27, 2015 5:22 pm

Just connect NO to L1 of 1 switch and NC to L2 of the switch.
Com goes to COM of the switch.

Laurens

User avatar
rpdom
Posts: 15608
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: how to replace a switch with relay in a 2 switch circuit

Fri Nov 27, 2015 5:37 pm

If you replace that switch with a relay like that the Pi won't know if it is turning the light on or off.

Say the relay is "off" then Com (COM) is connected to NO (L1). The light may be on or off, depending on the position of the switch. Change the switch and the light will change - your program won't know that.

All you can do is to get it to toggle the existing state OFF to ON or ON to OFF.

Hacker'n'Tinker guy
Posts: 51
Joined: Sun Dec 07, 2014 5:03 pm

Re: how to replace a switch with relay in a 2 switch circuit

Fri Nov 27, 2015 6:14 pm

rpdom wrote:If you replace that switch with a relay like that the Pi won't know if it is turning the light on or off.

Say the relay is "off" then Com (COM) is connected to NO (L1). The light may be on or off, depending on the position of the switch. Change the switch and the light will change - your program won't know that.

All you can do is to get it to toggle the existing state OFF to ON or ON to OFF.
i was planning to use a current sensor or a relay with a 240v trigger 5 v output to the arduino after the switches

RaspISteve
Posts: 98
Joined: Wed Oct 24, 2012 9:15 pm
Location: Cheltenham, UK

Re: how to replace a switch with relay in a 2 switch circuit

Fri Nov 27, 2015 9:28 pm

Tinker,
If you can come up with a change-over relay that swaps L1a -> L1b and L2a -> L2b for L1a -> L2b and L2a -> L1b you can then have any number of Pi's capable to changing the current ON/OFF state of the lamp. You can also buy those cross-over switches from the bigger distributors.

If you think about it this switching arrangement is an XOR gate (Exclusive OR) set up. As distinct from series switches being AND gates and parallel switches being an OR gate.
Share and Enjoy.

Return to “Automation, sensing and robotics”