Reputation: 451
I am trying my hands on home-automation using Arduino and a relay module. I'm trying to connect a light to the relay. The light is connected to the wall switch in the following manner:
Now I want to control the same light using my relay. To do so I have to remove the connection from the wall switch and connect it to the relay. But I want to make it work in such a way that the light can be controlled by both the wall switch and the relay module, so that if Arduino is offline I can use the wall switch to turn the light on or off.
This is the kind of relay I'm using:
I am a complete beginner in this and don't know anything about circuits and connections, so it would be awesome if some of you guys can help. Thank you.
Upvotes: 0
Views: 2779
Reputation: 7409
You should check local codes and with a respected local electrician on how to design a three-way switch. For a permanent installation, you should not remove the wall switch and replace it with a relay. Instead you should aim for a circuit like the one below, except that one of the switches is replaced by a relay and installed properly in a box according to local codes.
From the picture I can tell you though that that relay would not pass electrical code for home control in my area. 10A @ 125VAC is inadequate for line equipment in my area. Which brings me to my next caution: Working with mains wiring is risky. You could be killed or injured, or destroy your or others' property. Get a design from a pro and get it checked out before going live. The laws and norms for wiring also vary by region so you need local advice and local help.
Finally, to actually test this switch, you need to refer to its datasheet, which should show connections. The control signal connection is one of the pins on the right of the picture, and the controlled load is the screw terminals on the left. But you need to read the parts datasheet correct and start off by lighting LED strips or small DC incandescent fixtures first. Only then think about hooking it up to house mains.
Upvotes: 2