beautypg.com

Frequency measurement – Measurement Computing DBK Part 2 User Manual

Page 115

background image

The figure shows the effect of 10 ms debouncing on a noisy signal. To be counted, a rising edge must be
preceded by a low sustained for at least 10 ms without any other edges. Rising edges a and f are counted
because they are preceded by low signal levels sustained for at least 10 ms (the debounce time). All other
rising edges (b, c, d, and e) are ignored. Any falling edge makes (or keeps) the debounced output low,
regardless of preceding edges. Thus, the DBK55 can detect short pulses even with debouncing.


Frequency Measurement

After debouncing, the signal’s frequency is ready to be measured. Frequencies are measured to 12-bit
accuracy between a minimum frequency (F

min

) and maximum frequency (F

max

). This frequency range can

be programmed individually for each channel. The limitations on F

min

and F

max

are:

The frequency range must be within 0 to 1 MHz.

F

max

- F

min

must be at least 1 Hz.

F

max

/ F

min

must be at least 100/99 (1.010101).

Based on F

min

and F

max

, the DBK55 measures the frequency by counting input cycles during a variable

time interval. The length of the interval depends on the difference between F

min

and F

max

.

For a wide range (when F

min

and F

max

are far apart), each bit of the 12-bit result represents a

large frequency change and can be measured quickly.

For a narrow range (when F

min

and F

max

are close together), each bit of the 12-bit result

represents a small frequency change and takes longer to measure.

The following equation determines the time interval needed to measure a frequency:

Minimum Measurement Period (sec) = (4096 x 0.5

µs) [F

max

/(F

max

- F

min

)]

In this equation: 4096 derives from 12-bit precision; 0.5 µs is the resolution of the DBK55’s timing
circuits; and F

max

/ (F

max

- F

min

) is the ratio the measurement time must be increased to achieve 12-bit

accuracy over the selected range.

To see how the measurement period varies, consider two examples:

To measure frequencies from 59 to 61 Hz, the measurement period is at least

4096 x 0.5 µs x 61/2 = 62.5 ms, or about 16 measurements per second.

To measure frequencies from 1 to 61 Hz, the measurement period is at least

4096 x 0.5 µs x 61/60 = 2.1 ms. Note that as the DBK55 only measures frequency once per
cycle, it would take from 1 to 61 measurements per second.

Thus, measuring frequencies over a narrow range takes longer than over a wide range as the ratio of
F

max

/(F

max

- F

min

). The actual measurement time is the sum of several items: the minimum measurement

period (from the equation above), the actual input period, and a variable processing time of 0 to 4 ms.

Note: If the Sequence Rep Rate is set faster than the measurement rate, multiple readings of the

same measurement will occur.


After the frequency (F) is measured to the required accuracy, it is scaled to a 12-bit number (D) for use by
the Digital to Analog Converter (DAC). This 12-bit number is determined by the formula:

D = 4096 [(F - F

min

) / (F

max

- F

min

)]; where: 0 < DAC < 4096

DBK Option Cards and Modules

988793

DBK55, pg. 5

This manual is related to the following products: