# Fast 220v AC power failure detection

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. 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 :/

My 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?

• One half cycle of 50Hz is 10msecs so how can you be sure your detector would respond in less than 3 milli seconds? Apr 15 '15 at 11:35
• @Andyaka so that the zero-crossover would trigger it? Apr 15 '15 at 11:45
• what about a low voltage detection? you might want to treat half-voltage as an outage. Apr 15 '15 at 11:47
• @Skaperen A 50Hz zero cross occurs every 10msecs not every 3msecs or less. Apr 15 '15 at 11:47
• @Andyaka: A 50-Hz, 240 VAC power line should not drop below, say, 20 V (after full-wave rectification) for more than about 0.4 ms. If it does, you can be reasonably sure that the power has failed. Apr 15 '15 at 12:51

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.

If you want to drive a LED, you will need to amplify the signal from D2 to obtain voltage and current suitable for your LED.

Sidenote 1: Your schematic will give you 0V pulses at each mains zero crossing. You may want to filter those out if you threat low voltage on D2 as a sign of power failure.

Sidenote 2: I wonder what is the purpose of R3. It will have ~0V voltage drop. I'm sure you can remove it with no effect on the rest of your circuit.

• Yes, as I said I would feed the signal into a comparator which would compare the voltage with a reference voltage. The comparator would switch on the opto's LED. Re: Sidenote 1: Yes, I've not thought about a way to eliminate the zero crossings. I could try a cap or something. I was just wondering about the main operation. Regarding the Zener. Yes, you're right. I can remove R3. It was just there so that I could measure the zener current in the simulation to make sure it doesn't burn up if I crank the input voltage up to 450v (simulate a spike). I confirmed the zener hardly burns any current. Apr 15 '15 at 15:39

Maybe consider a different approach- a zero crossing detector (an AC-input optoisolator and a resistor). Pass digital information across the opto and do the detection with timing (micro, preferably, but could also be a retriggerable multivibrator).

If you detect stretched zero crossing detection pulses you can get extremely fast detection of a failure- if the pulses should be no more than (say) 200usec long you can get detection in << 1ms.

Loss of pulses for more than 10ms would indicate a sensing (hardware) failure.

Note:

Some loads (for example, some motors) will not cooperate in voltage based sensing- they'll continue to act as generators as the shaft winds down. This results in a slow ramp down of the peak AC voltage which could fool some of the sensing schemes.

• Thanks but it seems you've missed 2 important details. 220v AC is 50hz and 10ms is slower than the 1-3ms target I mentioned. Apr 15 '15 at 15:44
• I have missed nothing that I can see. The 10ms (the space between zero crossings on a 50Hz mains) is for sensing of an opto or resistor failure. Sensing of a mains failure occurs when the zero crossing is longer than expected- in other words within a few hundred microseconds. That's without any smarts in the sensing- where the zero crossings should occur. Apr 15 '15 at 16:09