Which is the best way to measure low frequencies?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hallo,
I should measure the frequency of an input signal.
Max frequency of signal is 100 KHz.

I have made a simple system to detect rising edge of input signal using a
flip flop.
It samples the input signal every system clock cycle.
To measure the input frequency I count the number of system clock periods
between two rising edges of input signal.

To test the system I' using a function generator.

Reading the data acquired (using a fixed frequency) I have watched that
every 5-10 datas there is an error.
The number aquired is about 50% or 75% less than the others.

Using a pull up resistor will be solved the error?

Otherwise I need a system that verify glitches?

--
Marco



Re: Which is the best way to measure low frequencies?
On a sunny day (Mon, 17 Apr 2006 16:59:07 +0200) it happened "Marco T."

Quoted text here. Click to load it
Hard to tell what your error source is.
But in all cases you need to make a fast rise clean pulse.
You need a Smitt-trigger.
Basically an opamp with some positive feedback.

Re: Which is the best way to measure low frequencies?
If you want to measure 100 kHz with 1% accuracy, you need to count the
incoming pulses for at least 1 millisecond.
Or you can measure the 10 microsecond period length, if you have a
clock available that is faster than 10 MHz.

Measuring for a longer time reduces the impact of signal rise time and
jitter, but requires a counter to establish the ms time base.

This is all covered in hundreds of text books...
Peter Alfke


Re: Which is the best way to measure low frequencies?

Quoted text here. Click to load it

For more precsiion, you can divide the Fu, before doing the time
capture.
Or, you can set up to capture a wide-timebase counter, and NOT reset the
counter between captures - then you have the option to choose
Cycles in SW, and the time is done by subtract, and you do not loose
any time-ticks, so have best precision.

Quoted text here. Click to load it

50% less is explained by false triggers on the wrong edge,
75% less is harder to explain, unless you are over more than one cycle ?

Quoted text here. Click to load it

Hardware solution is to add a Schmitt trigger, and maybe also a RC filter.

SW patch is to read multiple captures, and reject ones that suddenly
'step' from previous readings.

-jg



Re: Which is the best way to measure low frequencies?

Quoted text here. Click to load it

[... snip ...]

There is a frequency coutner reference design for Spartan-3E Starter
Kit board.
http://www.xilinx.com/products/boards/s3estarter/reference_designs.htm#frequency_counter

I'm not sure how low in frequency that you want to go, but it does
measure from ~50 kHz to 100s of MHz.  It also uses the PicoBlaze 8-bit
embedded controller macro.

[ADV]:  Spartan-3E Starter Kit board
http://www.xilinx.com/s3estarter

[ADV]:  PicoBlaze Controller
http://www.xilinx.com/picoblaze

---------------------------------
Steven K. Knapp
Applications Manager, Xilinx Inc.
General Products Division
Spartan-3/-3E FPGAs
http://www.xilinx.com/spartan3e
---------------------------------
The Spartan(tm)-3 Generation:  The World's Lowest-Cost FPGAs.


Re: Which is the best way to measure low frequencies?
Many Thanks to Everyone!

Marco



Site Timeline