VHF/UHF General-Purpose Synthesizer

Not that long ago, home brewing your own synthesizer required a few chips, including separate prescalers and then the main synthesizer that contained reference divider, main divider, and phase comparator, Motorola had some successful CMOS all-in-one chips, but their frequency divider chains only went up to tens’ of Megahertz. Then there were UHF synthesizers made for TV tuners that had divider chains tailored for huge divider numbers.

            Now a few manufacturers have a line of chips that cover a very wide range of frequencies. While the voltage-controlled-oscillator may not be included (a good idea that extends versatility), everything else is included. Their biggest drawback is that serial programming is required. With microcontrollers so easily programmed now, this is not a big problem at all. The second biggest drawback is the tiny packages available – all surface mount. Get used to it – this is the future.

Example Circuit

There’s nothing like an example circuit to show how easily these new chips can be applied. A VHF receiver meant for weather satellite reception needs a front-end local oscillator. The weather satellite band extends roughly from 137.0 to 138.0 MHz. Like many receivers, the first I.F. frequency is 10.7 Mhz. With low-side injection, the synthesizer output should extend from 127.3 Mhz. up to 128.3 Mhz. Since there are not that many satellites, the frequency list is short, and eight channels should cover most frequencies of interest:

137.100                      new NOAA APT frequency

137.300                      Russian

137.400                      Russian

137.500                      old NOAA APT frequency

137.620                      old NOAA APT frequency

137.770                      old NOAA telemetry frequency

137.850                      Russian

137.9125                  new NOAA APT frequency

There are other frequencies of interest in this band. This list could easily be extended and microcontroller software would be the only major thing to change. The user interface is a single push-button, along with eight light emitting diodes for channel display. A simple 14-pin PIC microcontroller controls both synthesizer and display, and reads the single push-switch. A few I/O pins remain unused that could be used for later expansion.

            The synthesizer appropriate for VHF use is National Semiconductor’s LMX2306. It can interface directly with VCO frequencies from 100 to 500 MHz. While its charge-pump could drive the VCO frequency-control voltage directly, in this design an op-amp loop filter is used that allows a wider range control voltage (between 1v – 11v). Without the op-amp, range is limited to 0v – 5v, with outputs near the edges not recommended. Analog Devices make a similar (pin-compatible) chip ADF4111 with a few extra features.

          Setting up the counter chains

You’ll notice that the frequency list above doesn’t have nice even channel increments. The usual plan is to set the phase comparison frequency equal to channel spacing. That’d be 10 Khz., except for that last channel at 137.9125 which is unique. We’d really like to keep the phase comparator running at a good high frequency. We have the luxury of having a reference divider programmable into small increments. So let’s use this feature to find a divider plan to give a phase comparison frequency that’s much higher than 10 Khz., yet have very small output frequency errors.

            The main crystal reference will be around 14.318 MHz., since this is a very common crystal available from vintage personal computers. We won’t use a canned oscillator, since a separate crystal can be pulled up or down a small amount. This “rubbering” can decrease frequency error even further. The PIC processor can use this crystal as its main clock. Its built-in oscillator will provide 14.32 MHz. to the synthesizer too.

Let’s strive for a comparison frequency in the 80KHz. – 90 KHz. ballpark. The reference divider would range from 159 to 179. Then the “N” divider would divide down the VCO frequency (127.3 MHz. – 128.3 MHz.) by 1414 – 1603. The whole universe of divider combinations was set up in a spreadsheet, and candidates for the eight desired output frequencies were selected to give smallest frequency error. In this table, the N-counter is further divided into B-count and A-count. The first is the main divider, with the second being a swallow counter prescaler. Output frequency = reference * (8*B+A):

Output freq:    R-cnt   B-cnt   A-cnt   Ref-freq          Output freq.    error

137.100           173      190      7          82776.5           137.099755     -245    

137.300           163      180      1          87854.8           137.298825     -1175

137.400           164      181      3          87319.1           137.400072     +72

137.500           165      182      5          86789.9           137.500093     +93

137.620           175      193      7          81830.5           137.619119     -881

137.770           158      175      2          90635.0           137.770350     +350

137.850           157      174      2          91212.3           137.850016     +16

137.9125         180      199      7          79557.4           137.912345     -155

You can see that for most channels, a small frequency error results. Since weather satellite APT channel bandwidth is usually 40 KHz., this error is small. Further,  most errors are on the low side. By moving the crystal reference frequency up to 14.320339 MHz., errors are minimized, as shown in the table. Changing two capacitor values associated with the PIC’s crystal oscillator quite easily does this.

          VCO Interface

            The VCO is a standard Colpitts oscillator, with a varactor diode added. This circuit is adaptable to many varactors, with Cx and Cy ratios accommodating a small or wider frequency span. In this application, the required span is only 1 MHz. With 10 volts available, this design has nearly 10 MHz. span, although much of this range is crowded at the low-voltage end. We’ll aim for the higher voltage end where tuning sensitivity is around 0.4 MHz. per volt. National Semiconductor has a “web-bench” design tool for choosing component values of the charge-pump lowpass filter. A 3rd-order op-amp filter of “type A” was selected, with the following parameters submitted:

Output Frequency = 128 MHz.

Comparison frequency = 85 KHz. (average)

VCO – custom, VCO gain = 0.4 MHz./v

Loop bandwidth = 0.4 KHz.

Charge pump gain = 0.25 ma.

Optimize for spurs

            Since “fastlock” isn’t necessary, a re-design using 1.0 mA charge pump would help reduce noise sidebands. Components associated with the op-amp would change values. This lowpass filter affects spur rejection and settling time when skipping from one channel to another. Settling time is around 0.005 seconds, which will allow quite fast channel scanning. Settling characteristics were verified later as being very close to those simulated by web-bench. Since settling time was adequately fast, the LMX2306 “fastlock” feature was not used.

            A little VCO signal is routed over to the LMX2306 RF input (pins 5,6)  through a twisted-pair transmission line made from #28 magnet wire, six inches long. Coupling capacitors were avoided by link-coupling to the main VCO inductor, a 3+3/4 turn air-wound coil. Very little signal is needed, and the single-turn link winding was bent down far away from the main coil with still-adequate counting stability.

            VCO frequency is tweaked by spreading the main coil turns. The aim is to adjust so that the op-amp DC output voltage on pin 1 is sitting at about +5v. For this application, if the bottom channel is at +5v, the top channel goes up to about +7.2 volts.

          PIC Software

            Microchip’s MPLAB IDE software for WINDOWS personal computer (download for free) contains a very nice assembler and debugger. Assembler code was written, debugged and programmed into the PIC16F505 with a PICSTART programmer. The microcontroller duties include:

            All the channel count values are hard-coded into look-up tables. Any new channels would require re-programming the PIC. The LED interface is a serial one that only consumes two I/O pins – a clock pin 13, and data pin 12. A PIC with more I/O pins could be used, but the smaller PIC plus eight-bit shift register chip is cheaper, and could be extended easily. Two serial chips can be daisy-chained together to provide a 16-channel display (with eight more LEDs).

            After powering up, a short time delay lets supply voltages settle, then the function word (F1-word) is written serially from PIC to LMX2306. This 21-bit word pulls the LMX2306 out of sleep, selects VCO direction as negative (the op-amp has negative gain, while the VCO has positive gain), and disables Fastlock and it timers. Then the 21-bit Reference counter word is written for the first channel, then the 21-bit Ncounter word is written for the first channel. While it may seem like a lot of writing, its all done in a fraction of a millisecond. After this, every time a new channel is selected, the R-word and N-word are re-written.

            The single push switch serves multiple functions. Upon power up, channel one (137.100) is selected, and a push on the switch moves to the next channel. To get to the last channel, seven pushes on the switch are required. On the 8th push, channels are sequentially scanned in a never-ending loop. After each new channel is selected, the digital squelch input is tested (after a time delay of 0.2 seconds) for channel activity. If squelch says a signal is active, a three-second loop is entered, testing for squelch, and testing for push-switch too. Upon squelch dropping, channel scanning continues after the two-second delay. On push-switch, scanning ends immediately, with first channel selected. Subsequent pushes increment from one channel to the next as at power-up.

            The push-switch has another function. On power-up, if the push-switch is depressed, the LMX2306 is initialized so that its pin 14 output shows reference-frequency output. I had intended to use a frequency counter to verify proper reference frequency (of about 85 KHz.) but these pulses are so narrow that most counters are confused and won’t properly display frequency. An oscilloscope will show these narrow pulses properly. Once the PIC gets into auto-scanning mode, it waits until the lock-detect from LMX2306 goes active, which indicates that VCO frequency has settled. If it can’t attain lock, it won’t scan. In reference-frequency mode, this pin is mostly low, with very short high pulses. This is interpreted as “no-lock” by the scanning software, so scanning likely won’t work properly. If you want to scan, power down, then power back up with your finger off the switch.