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.

[PIC] how to measure frequency of an ac wave

Status
Not open for further replies.

vikram11

Newbie level 1
Joined
Jan 25, 2017
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
9
how to measure frequency using zero crossing technique ???

and i am using 1 msec timer for this ... please i need ur help guys.
 

First, you couple and limit the AC waveform (or
replica) to a comparator that will flip when the input
crosses zero.

Then you count (or integrate-and-dump) time pulses
until the next one. 1mS timer is going to be coarse even
at 50/60Hz (20/17.7mS). Is 4-bit resolution good for
anything?

Then you do the 1/N math to get frequency from
period (N).
 

It is also highly recommended that you take several samples, and then to average them.
 

Hi,

Many microcontrollers have a "capture" function to do exact timing measurement.

Klaus
 

Hello!

how to measure frequency using zero crossing technique ???

and i am using 1 msec timer for this ... please i need ur help guys.

- What is the frequency you want to measure?
- What do you mean by 1 msec timer? Is it a timer with one millisecond resolution or a timer
going up and rolling back to 0 every millisecond?

It is also highly recommended that you take several samples, and then to average them.

It depends on:
- The resolution you want to have
- The frequency of the AC wave
- The clock frequency of the counter (or timer) you use.

Example 1 : if you measure 50 Hz with a 25 MHz clock timer, then you will get approximately
500 000 counts per period, which might be OK in many cases.

Example 2 : if you measure a 10 MHz AC wave with the same counter, then you will have either
2 or 3 counts per period. In this case, the best way is to create a long timer (for example 100 ms)
and count the AC periods during these 100 ms. In this case, counting 10 MHz with a 100 ms timer
would result in 1 million AC waves in this period, which is sufficiently accurate.
In this case, the problem is that you have to calculate the frequency.

Dora
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top