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.

Looking for 1Hz to 100Hz mains frequency meter on PIC

Status
Not open for further replies.

latecomer

Member level 4
Joined
Jun 6, 2001
Messages
77
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,288
Location
USA
Activity points
642
what is 1hz - 100hz

Hello all,
I'm searching for a 1Hz to 100Hz frequency meter based on PIC16F877 or PIC16F84 for measuring Mains Frequency. I've already searched for the same but ended with 50Mhz frequency which gives error when measuring lower frequencies of 1 to 100 Hz.
Any advice/links will be appreciated.
 

pic based mains frequency meter

I think you should search for a period meter rather then a frequency meter. However let see how a frequency meter works before.

A frequency meter (doesn't matter if based on PIC or whatever) counts how many periods are repeated within unity time.
This is also the "frequency" concept by definition as well.
So, the signal is squared, sometime its frequency is divided by a prescaler factor and passes to a counter which is enabled by a known time reference period, i.e. 1 second or even 100ms. As the period of time base elapsed so the counter is stopped and result is stored and made available to display. Finally, the counter resets, enabled again, and cycle repeats forever.

The minimum frequency and resolution which is achieveable with this method is equal or greater then the time base period. For instance, at 1 second time base you can measure 1Hz and see on display just 1 count. In order to improve resolution at low frequencies, i.e 1Hz, the simplest solution is to increase the time base, i.e. 10 seconds, such that you would see at least 10 counts. However, the display will be also updated at very low rate, 10 seconds in this case.

Rather then frequency, a better method (F=1/T, do you remember ?) is to measure the period of signal and compute the frequency. In such case your signal enables the counter whereas time base is counted by counter. Just for example, imagine you have a signal of 1.745 Hz and your time base value is 1ms. As a result, your signal enables the counter for 0.5730.... seconds, and counter will totalize 573 counts of 1000 reference counts at 1ms of time base. By computing "time base counts"/"signal counts" you'll get 1000/573=1.745... that is what you're searching for with a resolution of 1mHz and relatively fast display updating rate.
 

measure mains frequency

i think if you have to use one of timers of pic in mode counter , i tested this way and work well, you have to define the trigger of counter
in falling or raising. Try this way , i think it will be good
matelda
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top