|
VFO Frequency
Counter and PLL stabilizer

This article
describes a module which can be used to stabilize a free running
oscillator and provide a frequency readout in one package.
The board consists of a gate/prescaler circuit, a microcontroller
and a loop filter/VCO control circuit using a passive integrator
and voltage follower. The front end squares, gates and prescales
the VFO signal under the control of the microcontroller. The
microcontroller counts the VFO frequency, drives a LCD display
and acts as an intelligent phase detector. The controller itself
has only an 8 bit counter which contains the most significant
bits of the count data at the end of each count period (100
msec). The 74HC4020 prescaler contains the other 14 bits of
data. To access this the prescaler is toggled until it’s output
changes state. The controller keeps track of how many pulses
are required and from this calculates the contents of the prescaler.
The overall resolution is 22 bits which means that frequencies
up to about 40 MHz can be counted to a resolution of 10 Hz.
The controller converts the binary data to BCD and ASCII to
drive a 16 character by 2 line Liquid Crystal Display. (Block
Diagram)

PLL circuit
The controller compares the frequency from one count to the
next. If the loop is locked, the controller corrects any drift
in the VFO by outputting a positive or negative pulse to an
integrator/filter circuit buffered by a voltage follower. The
PLL output is connected to a varactor diode placed across the
VFO tank circuit.
If the error between counts is more than 50 Hz it is assumed
the VFO is being tuned and the loop is unlocked. In this case
the circuit sets the VCO control to midrange and waits until
there are 3 counts without change before locking the loop again.
There is no need to manually lock the loop and the PLL system
is invisible to the user.
Offsets
The user can individually set up to 16 positive or negative
offsets to a resolution of 10 Hz. There are 4 I/O lines available
for this with a further 2 lines for pushbutton switches to allow
the user to program the offsets. If ENTER (Bit 0) is pressed
during normal counter operation, the counter enters the offset
setup routine. The user is prompted to enter "POS" or "NEG"
for offset. The SCROLL (bit 1) key is used to select the appropriate
option. When ENTER is pressed again, the program moves to the
offset frequency. The flashing cursor indicates which digit
is being entered. The SCROLL key advances the digit from 0 to
9 and then rolls over to 0 again if SCROLL is pressed repeatedly.
When ENTER is pressed, the next digit is selected. The Offset
data is stored in the EEPROM at an address selected by the 4
offset select lines. When the counter is in operation it accesses
the EEPROM at the address selected by the offset select lines
and adds or subtracts the offset from the VFO frequency accordingly.
|