4
\$\begingroup\$

I've been trying to make a circuit that:

  1. Outputs 12V when the power is off
  2. Outputs 0V when the power is on.

Input is 230V 50Hz AC.

I have a question about the voltage across the output capacitor. When the mains is on, it seems the average voltage across the capacitor is 0V. Am I correct or missing anything? I'd highly appreciate your input before going to mess with the high voltages...

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
15
  • 1
    \$\begingroup\$ Might not work as you intend (e.g. LED stays on if there is power, else off). If that's directly the mains, you may want to consider the heat, too. \$\endgroup\$ Aug 25 '20 at 19:21
  • 4
    \$\begingroup\$ You've drawn ground symbols on the "live" side and the "safe" (low voltage) side and as all symbols are the same, it means that they're connected. In reality you would not want that, I would remove the ground on the mains side (the left one) and only have ground on the safe part of the circuit. \$\endgroup\$ Aug 25 '20 at 19:24
  • 3
    \$\begingroup\$ 230 V AC across just one resistor is "pushing it" as ordinary 1/4 resistors are rated for about 200 V. It is better to use two 15 k ohm resistors in series. \$\endgroup\$ Aug 25 '20 at 19:26
  • 3
    \$\begingroup\$ @across Suppose that LED can take full 325 V reverse voltage. The power dissipated by the resistor would be ~323^2 / 30k ~3.48 W. You'll need at least some 5 W rated resistor. If you want to prepare for the winter, that's fine. BTW, 1N4148 can only take 75 V (or 200?, can't remembrer). \$\endgroup\$ Aug 25 '20 at 19:27
  • 6
    \$\begingroup\$ There are "smarter" ways to make an LED (inside an optocoupler) light up more efficiently, search this site for "LED mains voltage" and you'll find some examples like the "capacitive dropper circuit". \$\endgroup\$ Aug 25 '20 at 19:29
9
\$\begingroup\$

This is pretty much fair, you just need a high power resistor. opto1

The resistor can be replaced with a capacitor (220n 275VAC) and will not heat up. opto2

\$\endgroup\$
4
  • \$\begingroup\$ May I know if R1 1k is required? It seems the 220n capacitor reactance limits the current, so... Thank you so much for the beautiful simulations:) \$\endgroup\$
    – across
    Aug 25 '20 at 20:36
  • 4
    \$\begingroup\$ When first switched on, it is not known in which phase the capacitor is switched on. So the first charging current must be limited. \$\endgroup\$
    – csabahu
    Aug 25 '20 at 20:45
  • \$\begingroup\$ Indeed it must be limited, but isn't 1k a bit too small for that? I wouldn't risk exposing the LED to more than 100 mA even momentarily. \$\endgroup\$ Aug 26 '20 at 14:58
  • \$\begingroup\$ Forward surge current for the LED 1,5A. \$\endgroup\$
    – csabahu
    Aug 26 '20 at 15:53
8
\$\begingroup\$

Supposing the whole circuit works without smoke, what you have there is an optocoupler which will be turned on/off 50 times per second. This makes the transistor act the same. Which means that the cap will be charged according to the time constant, but discharged by the transistor. So there will be some voltage, but if you use a comparator afterwards, it should work.

However, the resistor will dissipate some 1.75 W (miscalculated in the comments), which means it will need a rating of at least 2 W (3 more likely). It might be best to listen to Bimpelrekkie's suggestion.


Here's a quick simulation in LTspice:

test

So if you want a relay afterwards, you could use it, since the voltage across the cap, even if not zero, will be, most probably, below the threshold. But be careful, even that little voltage as it is will still be considered a load by its inductance. Only don't connect the relay straight on the optocoupler's transistor, instead of the 10k resistor, because you'll have an LC tank there.

\$\endgroup\$
3
  • \$\begingroup\$ interesting... so the average voltage on capacitor is not 0V! I'll be connecting the output to a relay. Do I still need a comparator or will I be okay? \$\endgroup\$
    – across
    Aug 25 '20 at 19:58
  • 1
    \$\begingroup\$ @across I've updated my answer. I still say it's too crude a circuit, but it's your choice. \$\endgroup\$ Aug 25 '20 at 20:07
  • 1
    \$\begingroup\$ As you said, 50 times on/off cycle may cause in long term, some AC Input Optocouplers can help to improve circuit. \$\endgroup\$ Aug 25 '20 at 20:14

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.