Electronic – Does this optocoupler circuit work practically

mainsopto-isolator

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

Best Answer

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