A straightforward HF precision reference, based on TV sync or GPS as a reference source.
Optional AM ticks and CW ID, similar to WWV or VNG.
This project is an exercise in time keeping and frequency precision. It uses a widely available precision frequency source (TV network sync is often derived from a Rubidium source), and provides accurate time and frequency. It can be used as a simple Precision Reference, say at 5 MHz or 10 MHz, or without phase locking, as a phase comparator for a high quality reference. The Amateur band version includes modulators and Morse ID, so can also be used as an Exciter for a Precision Frequency Transmitter.
The TV Reference Concept
The design might look complicated, but just about everything shown takes place inside just one IC. The Sync Separator, which separates the 50Hz sync from the composite video TV signal, and the Modulated Amplifier, which keys the output at two power levels, are the other two ICs, both inexpensive and readily available. The main IC is a micro controller, the ATMEL AT90S2313 AVR device, a simple 20 pin chip. The video source can be a TV receiver or video recorder tuner, tuned to a network which uses a Rubidium Reference (in New Zealand, TV1 and TV2; in Australia, the ABC).
Three essentially similar designs are presented. All use the same PC software for monitoring. Check out the schematics:
Precision Transmitter and matching Power Amplifier. Phase-locked Local Reference. Phase Comparator for References. The phase-locked performance is fairly good - check out this narrow spectrogram of the actual transmitted signal. Over a seven hour operating test period, the signal did not deviate by more than ±0.1Hz (that's 2.6 parts in 108). Note also the speed of recovery from power loss, and the fact that the signal returns to the same frequency.
The next picture is of the same unit, but shows an amplified view of the 5th harmonic. There are 1Hz sidebands (less prominent on the 80m transmission) plus frequency deviations and obvious phase noise, but these amount in total to about 3 parts in 108! You can also see the regular patterns created by the ID keying every 10 minutes. The small saw-teeth are related to limited D-A resolution in the phase lock error feedback, and are more prominent during warmup (and have been eliminated in improved firmware). This picture shows the first two hours of operation after 20 minutes warmup.
Why Build Something This Complicated?
There have been other TV-derived references in the past (e.g. "Low Cost TV-derived Frequency Reference", Electronics Australia Oct-Nov 1993), so why should anybody build the ZL1BPU design instead?The performance of simple TV-locked designs has often been poor due to signal path effects, modulation of the reference by TV video, and poor locking. The ZL1BPU design uses a high performance sync separator, and a micro controller with special phase lock firmware, to provide exceptional performance. Using a micro to manage phase lock allows for much better filtering of the signal to remove short-term jitter in the TV reference signal, generally related to propagation and TV receiver noise. The remaining issues with a reference of this type centre around knowing when the TV source is "on reference" and when it is not, and this is also addressed in the present design. Some of the features of the unit are:
The serial data can be used for time logging, or setting other clocks. The phase information can be used for calibration and tracking reference oscillator and network phase error. Using the PC software to track phase is the best way to know whether the TV Network is 'on reference' or not.
- Reasonably fast lock time (2 minutes maximum), with "out of lock" indication
- Carrier output is turned off when out of lock (option)
- Very low phase modulation of the oscillator from the TV reference due to special control algorithms
- UTC time kept in hours, minutes and seconds, settable to within milliseconds of UTC
- Very accurate time optionally transmitted as different modulated seconds ticks, and available via serial port
- Serial data time message every second, which includes current reference phase
- PC software provided for reference phase monitoring - know when the network is "on reference"!
- Reference performance is better than 107 accuracy (0.3 Hz at 3.6 MHz), and typically much better
- Simple fully documented bi-directional communications protocol used (same as the Superclock)
- Precise 1 kHz, seconds ticks and Morse ID outputs - seconds ticks follow simplified VNG format (option)
- Output can be unmodulated carrier, AM modulated with ticks or tone, or carrier keyed
- Modulating data (ticks, ID) can be independently AM modulated or carrier keyed
- Carrier frequency and ID message are user programmable - any single frequency 2 - 15 MHz in 2 kHz steps
- Can be locked to any reference source that is a multiple of 1Hz to 1250Hz (with firmware changes), or any integer fraction of 1kHz (standard configuration)
AM modulation of ticks
(Click on image to enlarge)Modulation
The Modulated Amplifier allows three carrier levels to be generated (40mW, 10mW and off), so AM, MCW and carrier keying can be used. In this example (above) a 10mW carrier has 100% upward modulated 1kHz tone ticks superimposed. The 1kHz ticks are useful in the shack, but ideally should NOT be transmitted on air, as the keying is square-wave, and the spectrum of the transmission is about 10kHz wide! However, the unit also has a 1kHz square wave tick output which can be used with a simple low pass filter to generate a near-sine wave for AM modulation. The DC (power level shift) keying is very clean, and is recommended for on-air use, as it is even cleaner than on-off keying. Both the ticks and the ID message can be DC keyed.The Power Amplifier design offered will accept conventional AM modulation of the power supply, and this is the approach used by VK2BLR and a more recent ZL1BPU design. A 1W audio chip and a 1:2 step-up transformer should suffice - what about the modulator from an old VHF AM commercial radio?
Locking Source
The design is quite versatile, and will lock a crystal that is any multiple of 2kHz from about 2 to 15MHz to any reference that provides a signal at any integer fraction of 1kHz. For example, it will lock a 3650kHz crystal to a 50Hz TV frame signal, a 100Hz, 200Hz, 500Hz or 1kHz square wave from a precision reference, or to a 1pps GPS signal. Because the internal operation of the design uses a 2kHz interrupt, it will only lock crystals to exact 2kHz multiples.There are two reasons why a lower step size is not used. First, the risk of locking the crystal to the wrong multiple increases, and secondly, the ability to generate an exact 1kHz carrier synchronous modulation tone is lost. At lower carrier frequencies operating with 500Hz audio tone (1kHz interrupt and step size) would be practical. This would require a minor change to the firmware.
With other minor changes to the firmware, the internal interrupt can be operated at 2.5kHz to allow locking of crystals to 5kHz multiples, or at 2.4kHz to allow locking at multiples of a 60Hz reference (such as NTSC TV).
Micro Section
Follow the Exciter Schematic as you read this description. (The other versions are similar - just cut-down somewhat). Power for the Precision Reference unit can come from two sources - a simple plug-pack connected to the points labelled "+10V" and "-0V", and a backup battery, B1. The supplies are isolated from each other by diodes D3 and D4. These diodes also prevent reverse supply damage. When the plug-pack output (nominally 10-12V DC) is higher than the battery voltage, D3 is reverse biassed, D4 is forward biassed, and the unit operates from the AC supply.When the AC supply fails, D3 conducts, D4 is reverse biassed, and the unit continues to keep time from the battery. If power failures are frequent, a 6-cell 500mAH or better NiCd or NiMH battery pack is recommended. The backup isn't necessary if the clock feature is unused, so omit B1 and D3.
Regulator U1 provides 5V with sufficient current to operate the micro controller, sync separator and buffer/modulator device. The total load is only about 20 mA. It is convenient to operate the Exciter from a small SLA (gel-cell) battery, and the power amp from an AC supply. If the power fails, at least 10mW will leak through the power amp. Battery operation is intended only to keep the clock accurate, as the phase-lock TV reference source will be lost.
The RS232 transmit signal from the micro to the PC requires a negative voltage supply, and to keep supply current to a minimum, this voltage is derived from the mostly idle PC transmit data line, which is normally negative. TR1 converts to RS232 levels and transmits the serial data. Note how its collector supply is derived from the RS232 receive line at J2 pin 3, via D1 and R28. C8 maintains the -10V supply even when data is being received from the PC. TR2 is the RS232 receiver, with D2 catching the reverse voltage to prevent reverse bias damage. The RS232 connection is purely for time setting and phase monitoring. Full phase-locked operation continues with the PC off or disconnected.
J1 is the programming header, a simple 2x5 pin connector. The micro can be programmed in the unit. The operating frequency and ID message, stored in EEPROM, are changed in the same way.
X1 is the reference crystal, which operates in a variable crystal controlled oscillator configuration (VCXO). The oscillator is the main reference oscillator in the micro, and so is used for all timing. The components C2 and C3 set the precise crystal oscillating frequency, which can also be trimmed over a range of about 30 Hz by the variable capacitance diode D2. In the prototype a 47V Zener diode is used as the varicap. The voltage on the varicap is provided by the micro via a pulse-width modulated output, operating at about 100 Hz, but with 8 Hz fine adjustment timing components. The PWM output is averaged by R36 and C8 to remove most of the PWM and leave a clean DC ERROR signal. Since the bandwidth of the varicap frequency shift is very low, the remaining PWM ripple is not modulated onto the carrier (4 Hz sidebands about 60dB down, and 100 Hz sidebands unmeasureable).
In the Phase Comparator version, the micro operates directly from the 5MHz or 10MHz local reference, and U3/1 is used instead as a buffer for the incoming reference to drive the micro. There is no phase lock, and the ERROR signal is simply used with a phase indicating meter. Telemetry to the PC provides an indication of the phase drift, and the PC also calculates the frequency offset of the local reference from the TV sync source. This is a good way to check whether the TV station is "on reference" or not. A unit of this type can be fitted inside a local reference unit and provides continuous calibration updates while the unit is in use.
This version makes a handy calibrator for a high performance free-running reference, such as a Rubidium source. These can be otherwise impossible to calibrate without your own Caesium source! With a Phase Comparator such as this, operated at 5MHz or 10MHz, you can achieve 1 part in to12 calibration in about three days.
Transmitter
U3 forms the basis of a simple AM and CW transmitter. U3/1 (gate 1) acts as a buffer for the carrier signal. It drives one half of the transmitter, U3/3 directly, and the other, U3/4 via a further inverter, U3/2. This means that the two output devices U3/3 and U3/4 operate in push-pull. Notice that their outputs are coupled in push-pull via the primary of a small toroidal transformer. The other inputs of these gates are keyed by the micro. One, labelled "CARRIER" allows the carrier to be keyed on and off - in other words makes keyed CW. The other, labelled "MOD" allows the output power to be changed. When both devices are on, the output is 40mW (1.4V RMS into 50 Ohm), while when either one is on, the output is 10mW. So the output can be off, carrier on, or carrier plus AM modulation, upward modulated. Depending on the firmware option, the modulation can be 1kHz tone, or DC. In the latter case, the "ticks" are 6dB stronger, or if ticks are off, the carrier is 6dB stronger, and dropped back to be keyed back up during the ID. A simple but versatile system.The output is essentially a square wave, so it is very important to use a low pass filter on the output. When used with the Power Amplifier, the filter is not used. The drive level is suitable for direct coupling to most 2-5W power transistors. The amplifier consists of just one high gain transistor, TR401. Drive from the Exciter is AC coupled and terminated by a 100 Ohm resistor, which also helps ensure stability. TR401 is a surplus VHF power transistor, and since it has high gain at HF could be quite unstable. In this design however, there is no hint of instability since the base is resistively loaded. The collector matches directly to about 50 Ohm impedance, so a simple 50 Ohm half wave filter is used at the output. This is the same design as used without the power amp, but higher rated components are used. DC power is fed to the the power transistor via a toroidal choke L401, which is paralleled with a damping resistor to prevent unwanted resonances and instability. The transistor suggested is a 24V device, and so can be high-level AM modulated if necessary. Conservative rating is essential for continuous operation, and this device (and others like it) will handle 5W disappation continuously (i.e. for weeks on end) at 12-15V supply. A good heatsink is essential.
The output filter components, L401 - L403 and C404 - C406 are quoted as impedances, so for any operating frequency, simply use the standard impedance formulae:
XL=2 π f L XC=1/(2 π f C)
where π = 3.14159 to calculate the required values. Alternatively, simply scale all the values given for 3840kHz. L401 is a 12mm toroidal core. L402-403 are bobbin cores. The capacitors are 250V disc ceramic. The amplifier output is very clean, thanks to the filter, and will not cause unwanted interference to the TV receiver used as the sync reference. The output is intended for a 50 Ohm impedance antenna. Make sure you use a good antenna, and an antenna tuner if necessary, as RF in the shack can easily cause inaccuracy in the oscillator.
Firmware
The micro controller has three program loops - main, 2 kHz divider, and sync. The reference oscillator operates a 16 bit divider, used as the phase counter. When the defined count is reached (every 500µsec), the timer interrupts, the 1 kHz output is toggled, the pulse width modulator stepped, and a divide by 2000 firmware counter stepped, allowing seconds to be counted. The PWM is oversampled and generates 8 bit resolution in only 10ms, rather than the expected 128ms. These are all tasks requiring high timing precision, either to ensure accuracy, or prevent carrier phase noise.Once every second the 2000 software counter overflows, and a flag is set. In the main program, when this flag is seen, the ticks are sent, UTC time is incremented, and the serial output updated. These are all tasks which are not precision time dependent, but still occur within a few microseconds of the precision event which triggers the activity (the setting of the flag). Otherwise the main program does very little - every 10 minutes it also generates the Morse ID message, which is sent by keying the carrier.
The third task happens when the 50 Hz TV frame sync reference or 1pps GPS reference arrives. The content of the phase counter is sampled (in hardware, so no precision is lost), and the interrupt generated. In the interrupt, time precision is unnecessary; the phase error calculation is made and the new error value provided to the pulse width modulator.
Time is kept in 'Packed BCD' format (Binary Coded Decimal, where the lower four bits represent the units 0 - 9, and the upper four bits represent the tens, 0 -5 in the case of seconds and minutes, or 0 - 2 in the case of hours), which makes counting more tricky, but simplifies display. Every time the UTC time is incremented, the BCD values need to be checked to ensure they follow the BCD format, which means checking that the low nibble is < 10 and the high nibble < 6. The hour is checked to see that it remains < 24, and is set to zero when 23 is exceeded.
A front view of the prototype unit
In the above picture, the three control switches on the front panel control, left to right, are the VCXO REFERENCE (LOCK/HOLD/FREE), the 1 kHz AM MODULATION (TICKS/OFF/1kHz) and the CARRIER (KEY/OFF/ON). To the right is the RF output.
On the back panel reside the reference video input connector, the DC power connector, and the RS232 connector.
Nostalgia
The Precision Reference can be used as a low-cost replacement for HF time and frequency services that are no longer available. Any Amateur can now transmit a standard frequency service for others to use, as a frequency reference, a calibration source, a time reference, and a signal to practice frequency measurement with. In this "VNG mode" the ID and Time Code information for the Precision Reference are as follows:
The unit transmits a cut-down simulation of the VNG time code. It cannot however be used to decode the real time.
Precision Measurement
Special software has been developed for this application, so a power amplifier can be used to good effect without causing inwanted interference. The keying is restricted to 6dB power drop during Morse ID. The firmware for this version is optimized for the cleanest signal and best possible spectrogram results.The carrier frequency can be observed and compared with a local reference using a narrow-band spectrogram, allowing comparisons to better than 1 part in 107 to be achieved.
Propagation Studies
Another very interesting use of the "clean signal" version is as a signal for propagation studies. The Doppler effects introduced by the ionosphere are not always clear on typical HF transmissions because they either don't radiate a constant carrier, or the carrier is not sufficiently stable. For example, shortwave broadcast stations typically have significant phase noise, and often a cyclic variation in frequency of several Hz. Apart from the Frequency Standard transmissions, few stations have the necessary carrier stability and purity for such propagation studies.The next picture shows NVIS reception (Near Vertical Incidence Signal - typical of 80m at night) of a Precision Amateur Transmission on 80m over a range of 120km. The transmitter power was 100mW, but the signal was well above the noise in the received 5Hz bandwidth. Note that the apparent carrier frequency varies over about 1Hz as the refractive index of the ionosphere changes. At times, for example at 2230, there appear to be several "rays". This effect is caused by differences in refractive index and thus signal velocity for components of different wave polarization.
Reception of a precision 80m NVIS signal over 120kmThe smudges on the picture are caused by scattering effects. At these times the carrier is still a clean single signal, but is varying so quickly that the spectrogram represents the carrier energy as a smudge over a range of frequencies. In this picture the sample rate is about 40 seconds. Look closely at the start of the picture - at time 2030 the carrier appears to have gone completely! All the energy has gone into components that are being reflected elsewhere. Note the fine lines above this point which demonstrate reflections from other layers.
Compare this picture with one below, which used the same receiver and the same spectrogram resolution, but measured the signal directly from the Precision Reference without the effects of the ionosphere:
Narrow spectrogram of Precision Reference
This idea is not intended in any way to compete with the excellent NCDXF beacons used for propagation markers around the world. The purpose of the Precision Reference, and any plan to use them around the world, although complementary, does not have the same goals.
Local Calibration
The final use for the Precision Reference is the most obvious one - as a local reference for calibrating other equipment. Any equipment with an external reference input (such as a frequency counter) can also benefit from the use of such a reference. A special non-locked version of the firmware can be used to adjust and monitor the performance of a local high stability OCXO (Oven Controlled Crystal Oscillator) or Rubidium source reference.
The unit is easily calibrated using the calibration procedure described.
TRANSMIT (CWID)The Morse ID is transmitted by keying the carrier. At second zero of the ID minute (every 10 minutes, starting at minute zero), the carrier is cut, and the ticks may be turned off (depends on the version). Starting at the following second, the recorded ID is transmitted. The message may if necessary last longer than one minute. When the message is complete, the carrier is restored and the ticks restart (if used). Time synchronism is retained.
There are three ID options:
QRSS Mode
- QRSS carrier keyed Morse with 3 sec dots (suits Argo 3 sec mode)
- 10 WPM conventional carrier keyed Morse
- 10 WPM conventional keyed Morse using 6dB carrier drop between elements (spectrally clean mode)
The QRSS option sounds really cool, since the carrier keying is synchronous with the second events, and the ticks stay operating. Each dot is three seconds, and each dash nine seconds, so the ID needs to be kept VERY short (say three letters). Unfortunately nobody except the Lowfers realize the transmitter is actually being ID keyed! The ticks are transmitted as 6dB power increase.10WPM Morse Mode
The conventional Morse option uses timing that is asynchronous with the ticks, and so the ticks are turned off while the message is sent. A full message "ZL1BPU BCN" takes about 20 seconds to transmit. The carrier and ticks are restored once the message has completed. This is really only a local use "nostalgia" mode.6dB Carrier-Drop Mode
This "clean mode" is the best for Precision Frequency Transmission, since it offers the narrowest and cleanest spectral response. The carrier is on continuously. The only keying is during the CWID, when the transmitter power is dropped 6dB, and keyed back to full power. When the signal is well above the noise, it sounds as though it has strong "backwave". When out of lock, only the seconds ticks are transmitted as lower power carrier dots. Once lock is achieved, the ticks stop.Local Reference Modes
Two local reference versions are also offered. neither have ID or keying, and the Comparator version has no phase lock. It is used only for monitoring a local OCXO reference and comparing it to the TV reference. Both these versions retain the accurate clock, which is available only via the serial message.TRANSMIT (DATA)
The serial communications data transmitted to the monitoring PC is of the form:
HH:MM:SS PPPP<CR><LF>where PPPP represents the phase of the local counter sampled by the external reference, the 50 Hz TV frame pulses. The value of PPPP can be from 0000 to one less than the divisor required to divide the clock reference to 2 kHz, and is expressed in 16 bit HEX. For example, operating on 3600 kHz, the value is (3600 / 2) - 1 = 1799 or 0707HEX.The Precision Reference also transmits responses to some of the time setting commands (those in red in the table below). These three commands should not be used while transmitting, as they disturb the carrier phase as well as the UTC timing. (This is why the PC monitoring software is not equipped for time setting).
RECEIVE (COMMANDS)
There are no front panel controls for the clock section of the Precision Reference. After all, the clock is Rubidium Standard accurate, and battery backed, so what would need adjusting? All adjustment is achieved using the serial link to a PC. There are eight commands:
Hnn Set UTC hours to nn (BCD) hours Mnn Set UTC minutes to nn Snn Set UTC hours to nn+ Add one to UTC seconds - Subtract one from UTC seconds > Increment local time offset by one hour < Decrement local time offset by one hour R Retard clock by 10 msThe commands should be used in the order shown while setting the clock. The commands shown in red cause the clock to stop while they are entered, so must not be used during time-keeping. They also disturb the PWM part of the frequency control, causing frequency disturbances. Lower case letters are accepted and used as upper case. Invalid commands are ignored. The clock can be set with a simple ASCII terminal program, such as Windows TERMINAL, or even HYPERTERM.
By comparing the Precision Reference seconds ticks with a reference such as a GPS receiver with 1pps output, the clock can be set to within 10ms of real UTC time, and when calibrated, may stay there for months on end (dependent only on the TV network). If the calibration of the VCXO is good, it will be quite adequate even without the TV reference, but the seconds ticks may need to be pulled back in line before the next transmission session.
Because the source code is available to you, you could add additional functions to the Precision Reference. Here are some suggestions:
- Independent carrier-keyed and MCW keyed ID message outputs (at present only the carrier is keyed, and only the tone is "ticked"), allowing external sine-wave modulation.
- Additional or alternative reference outputs, or modulation outputs, such as 440 Hz, 50 Hz or 1 hour
- Voice announcements from a message generator, triggered by the micro
- Time code modulation in WWV or MSF format (to operate "atomic" clocks)
- An alarm or time controlled output function, or a time clock to control operation
- An LCD time and status display, with phase data (see the Superclock for ideas)
There are two versions of the embedded firmware:
The PC software supports both versions and all applications. It operates by displaying the oscillator phase graphically over time. It also calculates the frequency offset by accumulating the phase error across the screen. The phase display easily shows drift and short-term variations, while the frequency display indicates long term frequency and averages out short-term errors.
- The Precision Frequency Transmitter is used for transmitting on HF as a reference for others. The transmitter is phase locked to a reference source such as a precision OCXO, GPS or TV sync. This version can be used without modulators as a 5MHz or 10MHz local phase-locked reference.
- The Precision Reference is a cut-down version used as a means of monitoring the performance of your high stability local reference (such as a 5MHz or 10MHz OCXO) compared with another reference. This version can be used with or without phase lock. Using phase lock, it operates with the Phase-locked Local Reference design.
- Used without phase lock, this version is used with the Phase Comparator for References hardware version. The precision OCXO it monitors runs unaffected, but the phase and frequency are monitored, and the phase feedback output indicates phase via a meter and via the same PC software.
PC Software monitoring a locked reference
(Click on image to view full size)The above image is shown with negative colours for improved clarity (the actual background is black). The top half of the screen constitutes the main graphical display. The red line in the main display is phase, measured from one minute after oscillator switch-on, with a duration of 10 hours. Above it, the black line with the brown "lump" at the left end is the frequency measurement. The error at the beginning is caused by the phase drift of the oscillator as the unit warms up. The frequency error is never greater than -1 part in 108. If there had been any disturbance of the TV sync refernce during the operating period, it would show clearly as a change in phase followed by a large change in frequency offset.
The lower display is the "fast phase" display, used mostly during calibration. Below that is a circular phase meter and a text display of the operating phase and frequency parameters and program settings. The current frequency offset (largely irrelevant with a locked oscillator) is shown at the top right above the main display.
The PC software is used for initial calibration, and in order to monitor long term phase performance. Long term performance monitoring is also a measure of the reliability of the TV network reference. The PC software is available as both executable and source code (if you order the source code, you get both). The PC software is a DOS executable program, which will operate from Windows™ 3.1, 95, 98 or 2000 (because it is a graphics program, on older computers it may require full-screen rather than "DOS Box" operation). Computer requirements are minimal - a 486 processor and a serial port. Given the simplicity of the communications protocol, you could easily write your own phase and time display or data logging program. To recompile the source code you will need Microsoft Quick Basic 4.2 Compiler or similar. The source code may also run under "QBASIC" which was supplied with DOS 6, but it will not compile to a stand-alone executable.
The source code and executable programs for micro and PC are available from the author at a very modest cost ($30 for both source and executables, $10 for just the executables). You get all the available versions in one package, including the PC software. What you are paying for is email support, not the code itself. You can edit and compile the source code for yourself by getting a copy of the AVR Assembler free from Atmel. You will also need a copy of the ISP, or "In System Programming" software, free from the same source.
Obviously, if you want to modify the software, you will need both Assembler and ISP programs. If you don't want to change the software, simply order just the executable firmware ($10), and use the ISP to load it into the micro. You will also need to use the ISP software to modify the EEPROM map file supplied, in order to set the carrier frequency, the required serial data rate, and the ID message. If the unit is not used as a transmitter, the message is not necessary, but the other values will still need to be set. Instructions are supplied with the firmware.
See the Specifications page for details.
Review the Technical Notes
HOME