Monday, January 30, 2006

Switcheroony

I've come up with a really simple circuit to allow me to turn the lights on and off either in the garage, or in the house:



The idea is to use a relay that will stay on given current limited by R1 (I used 100ohms with a 12V supply and a 12V relay). The relay is wired to latch. To switch the device on a switch bypasses the latch contacts turning the relay on (which then stays on from current through the latching contact). To switch it off another switch shorts out the relay coil. I used momentary contact rockers from DSE, which look quite nice. You can add as many extra switches as you wish, and a computer can switch either way using a suitable buffer such as a 4000 series tri-state buffer or a pair of transistors.

The second pole is the light circuit pole. I used a 240V rated 5A DPDT relay, which cost me about $5. The power supply can be shared with other devices and the circuit produces very little noise (considering its got a relay). If you shared lots of these devices on the same power supply you could switch multiple lights using a single switch using a diode from each circuit to avoid loops.

The circuit has some nice properties:
  • It is quite robust, as the relay and resistor can take a lot of abuse.
  • The signals are sent via reasonably high current making the system quite noise immune.
  • It is very simple to assemble and debug.
  • It interprets set and reset as a reset.
  • It starts in a known state, off.
  • It uses no current when the light is off (ignoring power supply).
  • You can read the current state looking at the switching lines, so you can use a suitably low current indicator at the remote end (perhaps a buffered LED). If you only have a few switches you can probably get away with just a LED from switching to ground at each rocker.
All in all, a very nice design. The only thing I'd like to extend it would be to make the local switch (the one on the wall for the light) look like a normal switch, and to actually be the relay itself so that the switch displayed the current state. With that you'd have a very elegant home automation system.

No comments: