Using Relay Module as a three-way switch?

Hi everyone,

I was curious if anyone out there has done anything with the Relay Module, using it in combination with a traditional three-way light switch. My idea is to use a board, network adapter and relay module to control a simple light bulb (turn the light on/off in response to a web request); but I’d also like to keep my traditional light switch in place. I’m also curious to know if anyone out there has come up with a way to power a board by wiring it into their normal electrical supply instead of using something like a outlet-AC-Adapter/USB Adapter.

Thanks!

Thanks Andre! Can you tell me more about connecting the relay and the switch in SPCO mode? I followed your link and did some binging. I found the a three-way switch has three poles; two hot and a traveler. The relay module from SEEED has 4 sets of C, NC and NO poles. Do these things fit together, or do I need some other form of relay? Is it simply a matter of connecting the hot to the relay’s common, the light to the relay’s NO and the traveler to the relay’s NC?

I appreciate the feedback - hoping to avoid electrocution. :slight_smile:

I think it’s the same as the one that GHI used to sell:

http://www.seeedstudio.com/depot/relay-module-net-gadgeteer-compatible-p-967.html?cPath=203
http://www.ghielectronics.com/catalog/product/327


Hey Andre.m,

Check out that 1min YouTube video. I think I’m in a similar situation as who started this thread…

I’m doing a project, exactly I want to do the same stuff which has been done in that video…

Is the image you had uploaded in your previous reply a possible solution??
(I have also attached that image with this reply)

I’m new to all these electrical stuffs so I need some guidance…

Thanks in advance.

The setup shown here is a simple switching capability - when either the relay state or the physical switch is toggled position, the light will change state. The setup in the video is more complex - the relay and physical switch are independent of one another, and there is sensing of the manual switch turning on that is detected. Simple or hard, you get to choose what you want to do :slight_smile: The simple option is quite easy to retrofit into an existing wired house, but the hard option is often implemented as a low power signaling network to get the switch state, and an active controller detecting that and controlling the lighting

@ Brett - Thanks for the reply Brett. As I’m a novice in electronics, I don’t have any idea about the things you said about (Low power signalling network & active controller to read switch state). But, at any cost, I want to do that project from the scratch…

I barely know that they are using Raspberry Pi for wireless control and I don’t need any guidance in writing codes. I just want to know how that two way control is possible also how the status of lights on that webpage was updated while using manual switches to turn ON/OFF the lights??

So, could anyone please tell me what are all the components I would need & what are all the things I must learn about to successfully do the things I just asked??

do you want to model this, or do it in a house ? Very different levels of information are needed. New product: Sonoff Programming Adapter – SuperHouse Automation interesting blog on doing this kind of thing.

So what are your questions? How much research have you done?

I’m going to model that home automation system for my last semester Engineering project.

Almost I know everything except how that two way switching is done.

I want to set up a two way switching control for my model. Is that possible??

I mean the man in that video controls different lights of his home using manual switches as well as the webpage.

The switching system must work like a two way switch in our home.

Personally I would use a press, touch or proximity switch wired to an input on the microcontroller. This means that the state of the switch is not needed to determine when the light should be on. If a multi way switch circuit is needed like the original poster then a current sensing unit on the light side of the circuit would be needed to determine whether the light switch is providing voltage to the light. However the situation may be different depending on the design of the light circuit e.g. loop in, single and earth or loop through (see House Wiring for Beginners - DIYWiki for more information). If it was a new installation then running the twin and earth from a single light back to a relay box and low voltage cable from the light switch to the micro controller (like the recommended solution for Control4 home automation) may be preferable. There was a cool product that can be retrofitted to a light switch that works over wifi that I saw recently but I have forgotten it’s name… If I find it again I will post it!

No, no it doesn’t operate like a two way switch. The two way switch scenario is the same as is documented earlier in this thread. You can tell this when he turns the manual switches to OFF and then controls from the web, and the lights still come on, but never shows a situation where the light is controlled to ON by the web or switch, then the alternate is used to turn it off.

To maintain state and display it on the website, the simplest way is to use the switches as digital inputs to your controller, and each one’s state is then able to be reflected to the webpage as well as setting the relay’s state to toggle the light. A trickier (sexier?) way is to use press-buttons with indicator LEDs in them as the switches, and still toggle the relay and LED when pressed. This then means you can never get the physical switch and light “out of sync”.

@ networkfusion - Thanks bro. I will learn about those things further and report back… :wink:

@ Brett - Brilliant!! yes, I noticed the thing you mentioned. (Turned it ON using webcontrol but didn’t turn it off using manual switches).

So, if push button is used, could it be made to serve as a two way switch? In the sense, the following things must be able to be done.

  1. Turning ON using web-control & turning OFF using push button.
  2. Turning ON using push button & turning OFF using web-control.
  3. Turning ON & OFF using web-control.
  4. Turning ON & OFF using push button.

Is this really possible? if yes, what are all the things I will need??

Push button makes this trivial. Detect a button press, and that simply toggles the binary state that you record in your app in the microcontroller. If the light was off, turn it on. If on, turn it off. If the “press” came via the web interface instead, it still acts on the same binary state element, and still carries out the same action. In this condition there is no such thing as “two way” switching; you’re switching from as many elements as needed but it’s simply on or off. This method is actually even more flexible - for a stairway you normally have a two way switch one at the top one at the bottom, and you can have a press button switch in each place but you can also have another switch for that light next to your bedside so when someone goes sleepwalking you can turn the light on for them. Or put master switches somewhere in the fuseboard.

Go back to the superhouse link I gave you and you’ll see a lot more detail about how Jon set that up - its exactly the scenario you are talking about.

@ Brett -

Okay Brett, I haven’t been much into this whole electronics thing. Thanks for your guidance. Let me start the work and report back about the work progress…

@ vicke4 -

You may want to look at this:

HI Vickie, did you manage to find a solution, as I am also facing the same problem to combine high voltage switch with a relay as a 3-way switch.
BR. Emir