# Surge monitor

Discussion in 'General Electronics Discussion' started by Starkers, Sep 1, 2017.

1. ### Starkers

5
0
Sep 1, 2017
Hi, I'm a mechatronic student trying to build a circuit that reads an ac source and counts transient events over a specified time period. I would also like to output a 1 if the events detected within this time reaches a set number.
My thoughts so far are to use a pic and program it to measure voltage/ rate of change over time using a pt as i want to be able to detect a surge at any point in the sine wave. But researching this is getting me more and more confused as there seems to be so many alternative ideas and viewpoints. So i finally decided to post to a forum.
Is this idea as easy as it sounds? Is this the most effective way to solve my issue? Or is there a better way?
Any hints/ assistance would be greatly appreciated.

2. ### Externet

759
165
Aug 24, 2009
A clean sinewave has always an expected value in the next millisecond (or less). Comparing the expected (table value) with the reality reading may trigger a time stamper and an anomaly counter.
Synchronizing the table being read and the power sinewave would be vital.
-If am expressing myself properly-

3. ### Harald KappModeratorModerator

11,425
2,622
Nov 17, 2011
You could also compute a fast Fourier transform (FFT) over an integer number of periods of the input signal, then remove the fundamental component from the result. The higher order frequencies' energy content is indicative of a surge.

kellys_eye likes this.
4. ### dorke

2,342
665
Jun 20, 2015
You should start with the definition of what is an electric surge.

While this definition may not be singular, in electric power lines it is usually defined as the excess of voltage or current above the allowed/expected max. peak.

The main concern is it's destructive nature,
both to the power company and the end user's equipment/lines etc.

If this is the definition you adopt,
then you should measure the access in voltage(current) above the allowed swing of the line feed and possibly it's time duration.

Any other disturbance smaller in size than the peak allowed normal voltage swing is usually called noise.

Hope this helps.

Last edited: Sep 1, 2017
5. ### Starkers

5
0
Sep 1, 2017
Thanks for your replies. All very good points. My thoughts are that there are already plenty of surge suppressing circuits, so i would be trying to look more at the transients that occur often but not necessarily over the max voltage that a suppressor circuit would eliminate. So as you state (dorke) probably more the noise.

6. ### Starkers

5
0
Sep 1, 2017
Absolutely. I was actually thinking of a comparison circuit initially. I was going to get the data from a pt and ct and enter them into the sine wave formula and then compare it. I wad thinking of comparing the angles. Is this what you're saying or am i off?

7. ### Starkers

5
0
Sep 1, 2017
Thanks Harald, your idea sounds impressive and quite a nice way to look at it. I'm quite interested in this approach though so i might spend some time looking into it. Would this be able to sufficiently detect constant noise or cyclic transients as well, that aren't of high magnitude? I believe this idea will be perfect in comparing actual signal with intended. Do you have any idea what programming language is best for committing FFT equations on a PIC? I've Done a bit of C and C++ but no FFT equations unfortunately

Last edited: Sep 3, 2017
8. ### Externet

759
165
Aug 24, 2009
If at a certain instant in the sinewave -say minus 46V and decreasing- ; it is computed that in 0.001 seconds the next sampled value should have decreased to -say -49V- And the presence of a spike reads - 95V, you had a negative spike of -46V superimposed to the expected -49V, detectable by comparing the expected with the reading.

The number of samplings per cycle or per second would allow detection of narrower transients. But Harald differential sounds better.

9. ### Starkers

5
0
Sep 1, 2017
Thanks externet, a great idea and definitely once i would have went with as i didn't even consider Haralds idea. But the FFT equation does sound effective and i am guessing quite efficient with the programming as well. Thanks again

10. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,489
2,830
Jan 21, 2010
You could also pass the 50/60 Hz through a notch filter then see what's left. If you look for events which cross a threshold, you can count them.

Starkers likes this.