Electronic – Is this a reliable circuit to monitor AC mains voltage

acmainsvoltage measurement

enter image description here

I want to design a simple circuit to monitor AC mains voltage and take simple decisions if the voltage falls below a specific reference voltage.

It's important to mention that accuracy isn't an issue at all.

Circuit description :
The input voltage is stepped down to 9 V peak voltage and rectified, the rectifier plus the capacitor is intended to act like a peak detector and the output voltage at C1 would represent the peak input voltage (of course after stepping down).

This voltage is scaled via R1 and R2 then compared to a reference voltage using hysteresis comparator (using LM358 but not found in ltspice).

Is this a valid concept ?

Best Answer

For reference and to protect against future edits, here is your circuit that will be discussed:

The basic idea is OK, but there are some things to consider:

  1. Powering the opamp from the same signal you are trying to measure is asking for trouble.

  2. I don't like how this circuit looks at peaks instead of more a average. Ideally you probably want RMS, but that's difficult to do. You know the voltage is mostly a sine, so the average tells you what you need to know.

    The problem with grabbing peaks is that it's quite susceptible to noise. You're only getting information from the waveform at two points each cycle. This means you have little opportunity to filter out noise.

    Worse yet, the susceptibility to noise is non-linear. One positive glitch at a peak will make the measurement read high for quite a while. A single negative glitch at a peak will go largely unnoticed.

    Put a resistor before the capacitor so that you get low pass filtered absolute value, not recent max peaks.

  3. You may not need a opamp or comparator at all. If the output of OP07 is going into a microcontroller, then you might as well feed the filtered and clipped analog signal to the micro directly instead. The micro can trivially compare the result to some threshold in firmware. Then changing the threshold is a firmware change, not a hardware change.