Fast 220v AC power failure detection

comparatormainsvoltage dividerzener

I'm building an AC-Detection circuit. I want to detect when the AC power has failed ASAP so that I can react very quickly. (like 1-3ms should be enough time)
This was my first idea. It works in theory, but the zener power requirement of 10W is way too high.
first idea works, but current too high
I was hoping to use a 1/8w or 1/4w zener. When I increase the resistor to 1Mohm to reduce the current through the zener, the zener leaks most of the available current and the output voltage is miniscule :/
does not work

My 2nd idea, works.
2nd idea works

It performed pretty well with my simulations.

The next step would be to feed the output voltage to a comparator that compares it against a reference voltage.
In order to do that, the opamp would need to be powered by a ground common to the bridge rectifier in this circuit.
The comparator would then turn on an opto-isolator.

It won't be possible to power the opto's LED using this circuit unless I reduce the resistor values and dramatically increase their power dissipation.
I think I'd prefer to make a capacitive power supply to power the comparator and opto.

Any thoughts?

Best Answer

I will be honest, I have not taken the time to fully understand Spehro's suggestion. But usually his ideas are very good (he is sharp and experienced).

But here is my idea. You could create a model or replica, either digital or analog of the mains waveform that you keep in-sync, time wise with the mains (use some type of phase-lock scheme). If the actual voltage droops significantly below the model voltage at any time, you conclude that mains has failed. Obviously this circuitry would have to have some way to remain powered up after mains is cut off. Good luck. It is a challenging problem to decide when mains has failed. You may have false alarms, so think about the implications of that for your system.