WWVB-Based Precision Frequency Comparator

Computer-Interfaced Version

Describes how long-term frequency data can be collected using a computer in place of (or in addition to) a stepper motor.
This is the second article of a series.

Read first: Stepper Motor Version

Max Carter


The circuit in the previous article (Figs 1-2) utilizes the stepper motor as its 'slip memory', or 'phase accumulator'. Each step represents one cycle of phase slippage. The aggregate slippage is represented by the number of steps noted by a pointer connected to a stepper motor shaft, pointing to a scale, after some time has elapsed. The only other input needed to calculate the stability of the oscillator under test is the elapsed time in seconds - the test's stop time minus its start time.

The computer offers a way to automate the process for long-term testing. Since I have a computer here that runs 24/7 (the computer that hosts this website), I decided to build an interface and write some software to do the number crunching.

The two figures below show the comparator schematic with the computer interface added (Figure 4), along with a slightly modified quadrature mixer circuit (Figure 3).

(Figure 3)

(Figure 4)

The interface (Fig 4) consists of two cascaded CD4516 4-bit binary up/down counters, together comprising an 8-bit binary up/down counter, and a 74HC244 line-driver. The 8 output lines from the line driver connect, through a parallel printer cable, to the computer's parallel I/O port. (The parallel port was used to connect a printer in computing's olden days.) The OE (output enable) line delivers a signal from the computer telling the comparator when it's ready to accept data. When the OE line goes low, the line driver outputs are enabled.

The counter is the 'first-order' counter of the system. It keeps track of the pulses from the quadrature mixer. Note that there are two inputs to the counter, analogous to the two inputs to the stepper motor. One input is called 'clock' (C). The counter registers a count each time the clock signal goes from low to high. The other is "up/down" (U/D). It tells the counter what direction to count, high up, low down.

The clock signal is derived from a separate filter/Schmitt trigger gate, shown in Figure 3, called the "delayed" I-channel. (See LP Filter/Schmitt Trigger.) The delayed I-channel gate is designed with a wider hysteresis band than the I-channel gate below it (note the 22k resistor in leau of 100k across the feedback capacitor). The delayed I-channel signal is further processed by U7b which generates a clock pulse on both the rising and falling edges. The counter is clocked on every other step of the stepper motor, thus the effective sample rate is 500 kHz. The result of these two processing steps is to assure that the clock signal cannot change state before the U/D signal changes state, thus assuring that one and only one count will be registered for each cycle slip.

The U/D signal is generated by combining the I-channel and Q-channel signals in U7a. The signal is inverted (or not inverted) by U7d so as to generate counts in the positive direction for positive phase slips (or negative direction if selected by a jumper to ground on pin 13).

Note that there is some ambiguity built into the counter. After it reaches full count, binary 11111111 (dec 255), on the next (up) clock pulse the counter reverts back to 00000000, registering a huge step backward. Likewise, when the counter reaches 00000000, on the next (down) clock pulse it jumps to 11111111, registering a huge step forward. To keep the hardware simple, the ambiguity is dealt with in the software.

The WWVB receiver provides a "loss of carrier" indicator output line. A low on this line indicates when the carrier from WWVB is not present or is of low quality (low S/N). This signal is used to inhibit the counter during loss of carrier intervals, preventing it from accumulating spurious counts.

The section below presents the real-time data now being collected by the computer connected to the WWVB Frequency Comparator, along with their evaluation.


Phase Slippage Data Evaluation

Device under test: Electronic Research Co., EROS-750-PE-20 Ovenized Crystal Oscillator (HP 10544A clone)

Accumulated Phase Slippage and Time Data:

At scheduled intervals the web server (computer) calls up a program (read_port.pl) which reads the output from the WWVB frequency comparator via the computer's parallal port and writes (appends) the current data byte to an accumulator file. The oldest entry in the accumulator file is thrown out. The accumulator collects 25 successive data and time readings. For the current test, the slippage data are being read automatically once every hour (3600 seconds) and may also be read manually more often.

The URL for this page calls up a program (wwvb_computerized.php) that displays the contents of the accumulator file and calculates frequency error factor from the data. The error factor is the derivative of the phase slips over time:

Frequency Error Factor = ΔN/ΔT,

where:
ΔN is the number of phase slips,
is the phase error represented by each slip in seconds,
and ΔT is elapsed time in seconds.

Each 1-point change in the slip data represents 360 degrees (one cycle) of phase slippage at 500 kHz, the frequency at which the two sources (the WWVB receiver and the source under test) are compared. Thus each slip represents 1/500000 second (2 µS) of phase error. The frequency error calculation becomes:

Frequency Error Factor = ΔN x 1/500000 x 1/ΔT.

The table below shows the last 25 raw data outputs from the frequency comparator (in decimal format) along with the times the data were recorded. The latest entry, recorded/calculated within the last hour, is at the bottom.

Phase Slip
Count, N

ΔN
Computer Time,
T (seconds)

ΔT (seconds)
ΔN x 1/500000 x 1/ΔT
Parts/109(rounded)

188-1268199000--
1880126820260036000
1880126820620036000
1891126820980036000.6
1890126821340036000
1890126821700036000
1890126822060036000
1890126822420036000
1890126822575615560
1890126822575820
189012682262554970
1890126822625610
1890126822625710
1890126822780015430
1890126823140036000
1890126823500036000
188-112682386003600-0.6
1880126824220036000
1880126824580036000
1880126824940036000
1880126825300036000
187-112682566003600-0.6
1870126826020036000
1870126826380036000
187  (latest entry)0126826740036000

get current reading

24-Hour Calculation:

Phase Slips (ΔN) (latest entry minus oldest entry) = -1

Elapsed Time (ΔT) (latest entry minus oldest entry) = 68400 seconds

Calculated Error Factor (ΔN x 1/500000 x 1/ΔT) = -2.9239766081871E-011

Frequency Error Factor, Parts in 1011 (rounded) = -2.9

Frequency Error @:
1 MHz
= -3E-005 Hz
5 MHz = -0.0001 Hz
10 MHz = -0.0003 Hz


24-Hour and 31-Day Records:

Expanded Phase Slip Count (N) - 24-Hour Graph

The hourly phase slip data for the last 24 hours are displayed on the graph below.

  • This is an expanded graphical representation of the information shown in the left column of the table above - phase slip count (N).
  • Vertical Scale: The center number, on the red graticule line, shows the 24-hour average phase slip count. The numbers above and below the red line show deviation from average.
  • Horizontal Scale: Hour #
  • The latest point (#24) was recorded/calculated within the last hour.


12-Hour Average Phase Slip Count (N) and Correction Voltage - 31-Day Graph

Twice-daily average phase slip and correction voltage (if applicable) data are shown on the graph below. The plot shows the trend over 31 days. Its flatness (or lack of) is an indication of the intrinsic stablility of the oscillator.



Frequency - 31-Day Graph

Twice a day, frequency error is calculated and plotted on the graph below. 31 days worth of error data are shown.

  • Vertical Scale: Parts per 1011
  • Horizontal Scale: Day #
  • The latest point (day #31) was calculated within the last 12 hours.


Previous Test Results - Frequency:

The graph below shows the result of an earlier test run. That test ran for 10 days (ten 24-hour samples).

  • Device under test: Lucent RFG-M-RB Reference Frequency Generator (rubidium frequency standard)
  • Vertical Scale: Parts per 1011 (1/1011)

As you can see, the rubidium standard is considerably more stable than the ovenized crystal oscillator.


top

Go directly to graphs.
(Do not collect $200.)




Related Articles:

WWVB-Based Precision Frequency Comparator
describes the original version of this circuit - uses a stepper motor
instead of a computer to accumulate phase-slip data.
The first article in this series.

Frequency Controller - Add-On Circuit Discliplines Ovenized Crystal Oscillator
describes how the error data generated by the computer interface circuit can be converted
to an analog voltage and presented back to the ovenized oscillator to "discipline" its frequency.
The third and concluding article in the series.




Care to comment?
Ask a question?

Type your comment/question below and click SEND.

No information about yourself is required.

VIEW Previous Comments


This box posts to an open forum.
To send an
invisible comment directly to me,
please click here. - Max






cat