Two way switching with electric switch as well as I2C realy


#1

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

Any suggestion on this will be a great help.


#2

@DigiKey_Internal

Is there anyone who would be able to assist with this request?


#3

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.


#4

If this were me I would hook up a tactile switch to the microcontroller to latch in code for manual overrides.


#5

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.

image