Controlling AC mains using Arduino and removing control easily

acarduinohardwarehome-automationswitches

I am planning to for an Arduino to read status of a switch, and accordingly switch on and off AC appliance, for a demo purpose. I want to add a feature to it of easy recovery to manual switch control.

schematic

simulate this circuit – Schematic created using CircuitLab

First circuit to the left is when Arduino reads status of switch, and controls a bulb by digital pin P2 which drives SSR/relay. Circuit on the right is normal switch board controlled light bulb.

So basically what I am trying is: when I remove Arduino board, my previous control (light bulb controlled only through switch) should be regained. Really stuck on this, help will be highly appreciated 🙂

Best Answer

I solved it by using a SPDT relay instead of SSR. The N/C contact is attached to the manual switch control. The uC then puts the relay in on state to turn the output off. That way even if uC failed, I could still operate it manually. There are corner cases, of course.

BTW, you might need a DPST or DPDT switch for mains control. One pole directly to relay, the other to uC.

It's kind of relay logic, actually. Think of it as staircase wiring (e.g. http://electricaltechnology.org/2012/11/stair-case-wiring-circuit-diagram-or.html).