Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Mains Frequency Detector

Magnethicc

Member level 4
Member level 4
Joined
Feb 7, 2022
Messages
75
Helped
1
Reputation
2
Reaction score
8
Trophy points
8
Visit site
Activity points
963
Hi Everyone,
I want to design a circuit that reliably detects if the mains frequency is 50Hz or 60Hz (no microcontroller).
I first though of scaling down the ac voltage and than filtering using notch filter to filter out 60Hz, than compare if there is a signal on the output, if so then I know line freq. is 50Hz but the problem with that is:
1. mains frequency can shift a bit so high q filters are not very robust in the presence of a wide tolerances frequencies.
2. mains voltage vary from country to country so I cannot relay on constant amplitude to compare if signal (at the output of the filter) is present or not.
Another idea I had was using a zero-cross detector to generate a square wave with the frequency of the mains and then use a frequency to voltage converter (something like this) and comparing the output voltage level with a reference level to detect 50hz or 60hz.

I have a few other ideas but I was interested to hear other ideas,
Thanks!
 
Hi,

50Hz --> 20ms ( 2 x 10ms)
60Hz --> 16.66ms (2 x 8.33ms)


sine --> square wave.
rising edge --> start a 9ms one shot --> clock a DFF
Data_ DFF = also square wave.

If 9ms after rising edge the signal still is HIGH --> it´s a 50Hz
Data_ DFF = also square wave.

If 9ms after rising edge the signal still is HIGH --> it´s 50Hz
If 9ms after rising edge the signal is LOW --> it´s 60Hz

Klaus
 
You can e.g. use a low Q 55 Hz band pass and a phase detector.
I just want to make sure I understand:
You take the input voltage, pass it through a band-pass filter (center frequency = 55Hz).
you compare if zero crossing (going from negative to positive for example) happens earlier than the zero crossing of the band-pass output. if yes - 50Hz, if no 60Hz.

That is a really cool idea! Thanks.


Hi,

50Hz --> 20ms ( 2 x 10ms)
60Hz --> 16.66ms (2 x 8.33ms)


sine --> square wave.
rising edge --> start a 9ms one shot --> clock a DFF
Data_ DFF = also square wave.

If 9ms after rising edge the signal still is HIGH --> it´s a 50Hz
Data_ DFF = also square wave.

If 9ms after rising edge the signal still is HIGH --> it´s 50Hz
If 9ms after rising edge the signal is LOW --> it´s 60Hz

Klaus
Am I correct to assume that the problem with one-shots is that I cannot guarantee a precise 9msec for every one-shot (hundreds of circuits per year) since manufacturers of such IC's don't give out the tolerances, and since line frequency can be also 57 (5% tolerance) - the square wave is 8.77msec so 9msec needs to be very precise.
 
Hi,

to destinguish 50Hz from 60Hz you need some accuracy ... no matter which way you chose.

But:
* here (Europe) we have 50Hz. There are not much times in a year where it is outside 50Hz +/- 0.2Hz, which is just +/- 0.4%. If outside, then there will be a more global reason. Actual measurement: https://www.netzfrequenzmessung.de/
* 5% seems to be huge.
* for nominal 60Hz you get 8.333ms (not 8.77 ms)

Sqrt(10ms * 8.333ms) = 9.129ms (I simplified it to 9ms). This gives 8.7% to 50Hz and 8.7% to 60Hz

It´s on you to chose the right one shot according your requirements.
You can buy one, you can build your own using a comparator .. or build one using an XTAL and a counter. (Like 1MHz XTAL, reset at rising zero cross mains, trigger the DFF at count 9129)
If you build one with comparator you can chose resistors, capacitors and comparators according the expected accuracy.

*******
The given solution updates the result every full wave. You did not specify how fast / how often you need an update.
For sure if you need an update every 1s you can just count full waves for one second ... and decide at which threshold(s) you show 50Hz and 60Hz respectively.

*******
Also you gave no information why no microcontroller. (Is it a school project?) For me it is the most obvious solution: accurate, adjustable, reliable, small, low power, low part count, no drift / aging, optional filtering .... Even an 8 pin microcontroller will do the job. I´d use an XTAL.

***
Regarding FvM´s phase detector:
I guess he wants to use the fact that the signal phase changes a lot around "resonance frequency" of the band pass filter. So the phase tells you whether your input signal is below or above the "resonance frequency". Ouptut of phase detector = below / above 55Hz.


Klaus
 
Last edited:
You take the input voltage, pass it through a band-pass filter (center frequency = 55Hz).
you compare if zero crossing (going from negative to positive for example) happens earlier than the zero crossing of the band-pass output. if yes - 50Hz, if no 60Hz.
Yes, that's the idea. Of course, suggested cycle time measurement is a good alternative. In any case you should have some kind of filtering to get not disturbed by short voltage drops or noise.
 
since manufacturers of such IC's don't give out the tolerances,
I´d say: not true. EVERY IC manufacturer should give a datasheet including tolerance specification.

since line frequency can be also 57 (5% tolerance)
Here in Europe the 5% is the worst case value, where all power stations switch OFF (black out) and try to restart the whole grid.
At 2% difference (49Hz) the emergency situation starts by disconnecting some loads.

In Europe the biggest frequency deviation in the past 20 years ... was about 0.6Hz (1.2%) .. if my internet sources are correct. (Jan 27, 2021)

Klaus
 
I´d say: not true. EVERY IC manufacturer should give a datasheet including tolerance specification.


Here in Europe the 5% is the worst case value, where all power stations switch OFF (black out) and try to restart the whole grid.
At 2% difference (49Hz) the emergency situation starts by disconnecting some loads.

In Europe the biggest frequency deviation in the past 20 years ... was about 0.6Hz (1.2%) .. if my internet sources are correct. (Jan 27, 2021)

Klaus
Where did you find the biggest frequency deviation in the past 20 years?
Thank you for your help!

Yes, that's the idea. Of course, suggested cycle time measurement is a good alternative. In any case you should have some kind of filtering to get not disturbed by short voltage drops or noise.
Thanks a lot FvM!
 

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top