I was looking at these new IOT devices coming from CN that are designed to replace your standard wall switch with an ESP8266 smart-switch.

It seems there are two types: A) the typical one where the AC-DC circuit needs to be feed with a Neutral and a Hot wire and B) one which only requires the Hot/Live AC (220V) wire.

What kind of circuit are we talking about and how could we implement one from scratch ? Bonus points for example schematic. :-)

enter image description here

  • \$\begingroup\$ It needs some sort of return for the current, whether its a neutral or a ground connection. Do you have a data sheet or any more info? \$\endgroup\$ – BeB00 Apr 21 '18 at 0:33
  • \$\begingroup\$ It's likely that L1/L2/L3 are each one side of a light circuit, and the other side is connected to neutral \$\endgroup\$ – BeB00 Apr 21 '18 at 0:34

The answer is pretty straight forward. You can't just power any circuit with only a live wire and no current return path.

In this particular application you are supposed to connect the live wire to the smart switch and the neutral to L1, L2 and L3 after the load. Check the schematic.


Anyway, as it's AC current, you can swap live and neutral no worries, which is useful in case your lamps are feed with live wires instead of neutral.

When the lamps are off, to keep the supply to the electronic board, a small current must be passed through them, but not enough for turning them on. In case of LED lights, this small current may slightly turn on the LEDs. In this situation, a bypass capacitor provided with the kit must be installed in parallel with one of the LED lights so the current goes through the capacitor instead of through the LEDs.

  • \$\begingroup\$ You have missed the point of the question. How does the smart switch steal power for its internal electronics from the circuit (1) when the lights are on and (2) when the lights are off. The OP realises that this is a problem without a permanent neutral connection. You will find that the answer is not "pretty straightforward". \$\endgroup\$ – Transistor Apr 21 '18 at 0:54
  • \$\begingroup\$ @Transistor I edited the answer. \$\endgroup\$ – user162889 Apr 21 '18 at 1:27

What kind of circuit are we talking about ...

The device is taking parasitic power from the circuit it is controlling. This is a bit tricky.

  • When the load - usually a light - is on the semiconductor switch in the device must open for some part of the mains cycle so that enough voltage is dropped across the switch to recharge its power-supply capacitor.
  • When the load is off a little bit of leakage must be allowed through to power the circuit.


simulate this circuit – Schematic created using CircuitLab

Figure 1. The basic setup. Note there is no true neutral connection to the controller.

enter image description here

Figure 2. A triac controller output waveform. In the off (0 V) periods of the waveform the mains voltage is applied across the switch. Power can be "stolen" to charge up a reservoir capacitor during the off time but a small current must flow through the load.

Note that for this to work the RMS voltage to the load will be reduced as the full wave is no longer being delivered.

enter image description here

Figure 3. An Elektor circuit based on the Siemens LSB0586A touch dimmer. Source: SeekIC.

You might get some ideas by studying the schematic of Figure 3.

  • Note that the neutral is not directly connected to the circuit.
  • The triac is the actual switch.
  • The controller power supply is formed by R2, C2, D1, D2, C3. These give a -5.3 V DC working voltage (relative to ~, the live wire) for the SLB0586A.
  • As L~ goes positive C3 charges up to a voltage limited by D1 (Zener) and D2.

You may find that this circuit, designed in the days of incandescent lamps, may not work well with LED and CFL lamps.

Further improvements may be possible with MOSFET switches rather than triac as the mains can be interrupted at any point in the cycle to generate a precise voltage drop across the switch. I too would be interested in a good application note for one of these ICs.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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