Hi, I working on the two-way switching for home automation in which at one side I am using a simple electric switch and on the other side I am using I2C Relay boards which are accessible Arduino board through I2C connection.
I need some suggestion about the wiring of the live wire and ground wire with Electric switch and relay module so that I 'll be able to control the both manually as well as through microcontroller
The classic home electrical three-way switch wiring system would do the trick. The Two locations - Traveler system is the variation you’ll want. The big potential problem is that the Ardunino board will never know whether the load is currently on or off.
So if the Arduino needs to know the power state, you should not use a three way switch arrangement. Instead have the manual switch be only an input to the Arduino so that it always control the load and thereby always know the state of the load’s power.
To solve the problem of the Arduino needing to know whether the load is receiving power from the other switch, one could place an AC Line Monitor, such as the MID400-ND, in parallel with the load.
This device detects the presence of an AC voltage by allowing current to pass through a pair of infrared (IR) LEDs arranged in parallel with the anode of each one connected to the cathode of the other. This allows it to detect current in either direction. The IR LEDs transmit light to a photo diode detector amplifier circuit which turns on a transistor and provides an open collector output which can be connected to an input pin on the Arduino. Adjusting the value of Caux will adjust the minimum sensing voltage and the time delay of the output.