Hi,
I have a project where I'd like to turn my lights on/off remotely with a switch that can alternate the state of the circuit. A simple 3-way switch along with an SPDT relay will do the trick there however I want to create a power-efficient design. The arduino will be ~70feet away and I will provide power to the relay through a centralized transformer & some wires.
My ideal input in the gang:
*1 wire for GPIO (on/off)
*2 wires to power @ 5VDC
*3 wires from the main 120 VAC (Neutral + HOT + GND)
I'm using a latching relay for power efficiency and ideally, I don't want to use 2 wires per relay to control the relay. I understand that I can use a 2 coil relay and invert +/- to alternate the state of the relay. Alternatively, I could use a single coil with some transistors to achieve the same thing, but I struggle to figure out how I could do this with a single pin vs 2 pins.
I don't particularly care what state the relay is in. I only really want to XOR (flip) it's state. ie: If it's in NO, I'd want to switch it to NC and vise versa. I already have a circuit that will detect the output coming out so I can easily control it by reading the result out and flipping the state with the Arduino if that's not what I wanted. I've taken a few EE classes over a decade ago so I'm a little rusty on some of these concepts. Vaguely speaking, I'd imagine that I'd want to detect a change in voltage on the GPIO (presumably I can do that with a transistor?) and depending on the state of the GPIO, I'd either send a burst to set or reset (2 more transistors?).
I Googled for all I could and I couldn't find an example of how I could wire something like that and atlaest what I read in a few forums seem to suggest that this is totally possible. Fewer parts is a plus as well, but making sure that I don't consume power while the appliance is on/off by the relay trumps that.
Thanks