Were I work, usually thunder storms and industrial equipment cause voltage spikes very often on the mains. Making the power supply fail and even burning the devices connected to the power supply.
Of curse you need to put input protection to protect your devices, but since all my equipment has an auxiliary battery. It will be safer to use the battery and wait till the signal is more stable.
In other words I need to check in a safe way, if the quality of the mains AC is good enough for use. I have been thinking that a zero-crossing circuit will help, but industrial equipment are usually AC phased.
Using an op-amp with an ADC seems like a good idea but unless I can ensure they will have no problems with voltage spikes. I will avoid them.
Measuring the quality of mains is not easy. You can buy several thousand dollar power quality analyzers that measure various parameters. Swell or dip of voltage or frequency, waveshape distortion, harmonics sometimes even transients.
You're not going to do this with "just an op-amp and an ADC". It involves some number crunching DSP.
In the end, for your equipment to survive, the best course of action would be to buy an online UPS. One with permanent conversion.
I don't need a high quality measurement nor to detect every aspect of the signal. Just a way to detect harmful voltages like 200v and above on a 127VAC.
UPS are used on the most important equipment. But they are also expensive making them not suitable for all equipment.
The simplest thing I would try is a fault protected high impedance high voltage input similar to an oscilloscope input which feeds either a sampling ADC or positive and negative peak detectors. With care in the design, such an input can be fault protected and return good measurements to thousands of volts.
well, graphing the data and using excell could probably give you some stats. Other stuff probably requires a high pass filter to detect transients etc.
You need two channel measurements to add AA filters. You don't wanna be measuring a 60 hertz signal and a 500KHz transient on the same ADC. At least in my opinion the data would be alot easier to sort.