0

I am trying to sense mains to detect if some LED bulbs are ON or OFF. For that I am using HCPL-3700 (datasheet) that requires (two) resistors to reduce the voltage.

This is my schematic:

Schematic HCPL-3700

If my calculations are correct (I am a tons-of-mistakes-self-learner). The power this is wasting is around 0.7 W:

$$I = \frac{V}{R} = \frac{220\text{ V}}{78\text{ k}\Omega} = 2.83\text{ mA}$$

$$P = I \times V = 2.83\text{ mA} \times 220\text{ V} = 0.62\text{ W}$$

The problem with this, is that I will have around \$20 \times 8\text{ W} = 160\text{ W}\$ bulbs, that means my circuit will be using almost 13 W. Wasting almost 10% on those resistors sounds too high.

Is there a (PCB friendly) better way to bring 220 VAC down to a few volts?


PS: Full schematics/layout of what I am trying to do: https://github.com/crgarcia12/arduino-first-tests/tree/master/demo-11-esphome-module

Null
  • 7,448
  • 17
  • 36
  • 48
Carlos Garcia
  • 1,116
  • 1
  • 7
  • 25
  • 5
    *Is there a better way to bring 220VAC down to few volts?* Yes, that circuit is called a "capacitive dropper". For example: https://electronics.stackexchange.com/questions/5572/how-efficient-is-a-capacitive-power-supply/9834#9834 and also: https://en.wikipedia.org/wiki/Capacitive_power_supply – Bimpelrekkie Oct 18 '21 at 10:57
  • 4
    You can use a capacitive dropper - use the capacitor’s reactance to drop the voltage. You pcb needs some attention with clearance and creepage. Especially around the optos. Pull back the ground fill and add slots to extend the distance. – Kartman Oct 18 '21 at 10:59
  • 1
    Thanks @Bimpelrekkie. Can you post it as an answer? I will try to see if I can adapt it to my circuit – Carlos Garcia Oct 18 '21 at 11:34
  • Thanks @Kartman! I have added slots (yellow lines) to separate low voltage from mains. The optos are after the resistors, so they have < 6v. Anyways I am not completely sure about this so I would appreciate a lot any comments :) - I posted a question about that before: https://electronics.stackexchange.com/questions/586398/what-is-the-right-pcb-clearance-when-using-mains-220vac – Carlos Garcia Oct 18 '21 at 11:49
  • 1
    Whether the optos are after the resistors or not - its at mains potential. You would not want to touch it if it were powered. You want as much clearance as possible so the optos can actually isolate. You also have other clearance issues. – Kartman Oct 18 '21 at 11:59
  • Thanks @Kartman!! I will try to add slots under the optos as well then to separate both sides. I have added clearance rules to kicad and it did not show any errors, but will check it again to try to find the other issues and learn more about this! Thanks a lot! – Carlos Garcia Oct 18 '21 at 12:02
  • 1
    The slots under the resistors make little sense. Your optos are at or near mains potential - you do not want to touch there if powered. Measure the voltage between the input side of the optos and mains earth - it won’t be 6V. I’d suggest you do some research on basic electrical safety. The uln2003 is marginal driving 5V relays at 5V. Being darlington, you’ll lose around 2V. Just use some transistors. – Kartman Oct 18 '21 at 12:13
  • @Kartman you are right! I should have put both resistors in serie before the IC, to get 6v to N and not between each other. Now I have ~120v. I will check the ULN2003A, it works fine for now, but maybe it is just a miracle. When I measure the input of the IC to Gnd I get 4.21V... I chose the IC because if not I would need many more components to solder, annoying since I need to build many of these PCBs – Carlos Garcia Oct 18 '21 at 12:35
  • @Kartman btw, thanks a ton for all your input and taking the time to check my design!!! – Carlos Garcia Oct 18 '21 at 12:37
  • Putting the resistors on the active side won’t save you. You require clearance. Transients and lightning will easily exceed 120VAC. – Kartman Oct 18 '21 at 20:35
  • @Kartman, what voltage I should prepare for? I have used clearance following the rules for 400V. Thanks! – Carlos Garcia Oct 21 '21 at 13:06
  • What rules are you using according to which standard? – Kartman Oct 21 '21 at 13:56
  • @Kartman I am using the Kicad calculator. "B4" for 301-500V => clearance=0.8 & trace_width=2mm. It can support up to 4A – Carlos Garcia Oct 21 '21 at 14:26
  • This is for electrical safety - there are specific standards. – Kartman Oct 21 '21 at 14:36
  • @Kartman could you point me to any standard to read a bit more about it? – Carlos Garcia Oct 21 '21 at 14:50
  • It would be more instructive for you to Google it. Others might pipe in with suggestions. Its been some time since i have had to refer to them, that i would have to google it. – Kartman Oct 21 '21 at 14:56

1 Answers1

4

Standard voltage in Switzerland is 230VAC, not 220VAC. The data sheet shows in Figure 2 that the device more or less clamps its voltage at a level small compared to what you are dealing with; so you basically only need to consider the operating current you want to achieve. As others mentioned, you can use a capacitive dropper for that. However, you still incur the same voltages and currents for operation, it's just that they are out of phase and thus the capacitor will not heat up like the resistors would. Input threshold current is 3.11mA max (I am not considering AC here because I am lazy: essentially you have to stay above this threshold when taking into account the ripple after rectification and integration on the capacitor across 2&3); if you subtract a generous 10VAC for voltage drop (and assume a minimum guaranteed mains voltage of, well, 220V), you get a capacity of 3.11mA/(210V*50Hz) = 300nF. You'll need a foil capacitor of that size (not electrolytic) and about 400V voltage tolerance.

One problem is inrush current if the voltage is switched on outside of zero crossings. There is a maximum rating for surges of 3ms of 140mA, so you can put a resistor of 340V/140mA (the peak voltage of 240Vrms is 340V), something like 2.4kOhm or so in series. In sustained operation, it would waste 2.4kOhm*(3.11mA)^2 = 23.2mW which is still considerably less than what you started out with. The time constant RC will then be 2.4kOhm*300nF = 0.72ms so you stay reasonably safely below the surge duration of 3ms.

Of course you need to redo everything with actually available values and take into account their tolerances for the worst case, too.

While you could "save" even more energy by using an inductor for inrush surge limitation, LC combinations for taking care of voltage drops are a lot less well-behaved than RC so I wouldn't bother.

See how fiddly things get once you try avoiding the energy loss in a series resistor?

  • Since V and I will be the same, does this means that the amount of used Power is the same, but "wasted" in different ways? (heat vs 'out of phase') – Carlos Garcia Oct 21 '21 at 13:05