I've been doing some planning to build a home automation system on top of the existing power infrastructure of my house.

The first thing would be making my light switches smart. My original plan is to replace the current switch with my own (push switch) that would talk to a microcontroller that would in turn switch a relay and report the status to the control center. Powering the 3v microcontroller and a 5v relay would be done by a 220vac to 5vdc 3.5W buck converter. But the problem is that behind a single pole switch lies only two wires, Hot and Switched. Most boxes don't have the Neutral present.

I can't connect the converter and a relay in series because the microcontroller would not get any power if the light is off, and if I connect them in parallel the light would be constantly on, regardless of the relay status.

What is left for me to do?

Schematics: https://www.dropbox.com/s/0tdb1mkmnwny6n6/scheme.jpg?dl=0

  • \$\begingroup\$ Schematics, please. \$\endgroup\$
    – Eugene Sh.
    Jul 16, 2015 at 20:01
  • \$\begingroup\$ Coming right up. \$\endgroup\$ Jul 16, 2015 at 20:04
  • \$\begingroup\$ What's behind a switch isn't live & neutral. Its more like live-in and live-out. In some cases, depending on how things were wired, there may be a neutral passing through too. \$\endgroup\$
    – brhans
    Jul 16, 2015 at 20:09
  • \$\begingroup\$ Yeah that what I meant. I apologize, I mix the terms sometime. \$\endgroup\$ Jul 16, 2015 at 20:12

1 Answer 1


There is a couple of methods commonly used in your situation.

1) (not recommended) Use the protective Earth ground connection that should be present in your box instead of a Neutral connection.

Note that although this works quite well from a technical perspective, it won't pass UL or CSA certification (nor most other certifying authorities). One reason is that if the Earth connection should become disconnected or broken, you are deliberately passing current down the Earth conductor, which would cause it to become live in the event of a disconnected Earth.

2) Do some fancy phase control during the ON state.

Stealing power while the switch is OFF (open) is easy - you treat the Switched conductor as if it were the Neutral. That is: the load provides the continuity to the Neutral conductor. You will have approximately the full AC mains voltage across the switch.

This is (usually) OK so long as you are stealing only a few mA. However, there are some loads that this won't work with - I'm thinking of the little Egg-shaped strobe lights that used to be in discos in decades past. There may be other loads that aren't happy with this as well.

Stealing power when the switch is ON (closed) is a little more difficult. What you do is use a triac as the switching element and delay turning the triac on until the voltage across the triac is the desired supply voltage that you are trying to achieve. A diode picks that voltage off and stores it in a bulk storage capacitor. Then turn the triac ON.

Modern X10 light switches and some other smart light dimmers work this way.

  • 1
    \$\begingroup\$ Also if you dump more than a few mA into the protective Earth, the house breakers will trip and it'll get very dark until you reset them... \$\endgroup\$
    – user16324
    Jul 16, 2015 at 20:47
  • \$\begingroup\$ Thank you for the response. I'm having trouble understanding your second method. English is not my native language so I can't image a way the circuit is connected. If it's not a problem could you elaborate a bit, or better yet could you please draw the schematics of the connections. Thank you very much. \$\endgroup\$ Jul 16, 2015 at 20:50
  • \$\begingroup\$ Anybody here can elaborate a bit? \$\endgroup\$ Jul 21, 2015 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.