Updated  31Aug.2009

--> home/projects/gps clock/



GPS-based universal clock generator





GPS satellites and GPS Ground Segment need extremely accurate timing to allow GPS users to know their own position on the Earth. Rubidium and Cesium clock generators are extensively used and maintained to synchronize and generate the signals that our inexpensive navigator gets from the GPS satellites orbiting at 20000 Km. Many commercial systems use the same GPS signals to extract time marks or high-frequency clock references with atomic-like accuracy, and with the appropriate hardware this opportunity is available also for amateurs and hobbysts. With the project described in these pages, the microwave frequency counters and signal generators we have in our home-labs will have an absolute accuracy in the range of 10ppb (parts-per-billion) without relying on external calibration facilities.



Almost all commercially available GPS OEM modules provide a 1pps output, synchronized with GPS time. This pulse could be used as a reference to generate accurate high-frequency clocks, but special design has to address the short-term jitter affecting the 1pps signal. As a general guideline, an oven-stabilized crystal oscillator who guarantees the short-term stability is synchronized with the GPS 1pps for the long-term accuracy.

An alternate, and simpler, solution uses the higher frequency synchronization signal (10KHz) that the Rockwell's Jupiter GPS is able to provide. Ideally, a simple PLL frequency multiplier with a loop bandwidth in the range of 50~100mHz is all you need to complete the equipment. We have bought a couple of these modules on E-bay and we started some experiments with them.


The projects is straightforward and basically simple. As anticipated in the previous section, it is a PLL multiplier with few auxiliary blocks to get more flexibility and to monitor the GPS status without the need of a PC.

The /2000 divider of the PLL has 8 taps at most used frequencies from 10KHz to 20MHz: an output selector controlled by the uP forwards the selected one to the main output of the equipment. One or more auxiliary outputs at fixed frequency can also be implemented to drive more instruments that need different master-clock frequencies. The PLL loop bandwidth is intentionally limited to 1/10~1/20Hz to cut-off short-term frequency jitter of the 10KHz GPS reference. As a consequence, a VCXO (Voltage Controlled Crystal Oscillator) has been chosen to avoid all instabilities and drifts outside the loop bandwidth. No temperature stabilization has been adopted: the only precautions taken have been to supply the VCXO with a dedicated 5V regulator and to keep it in a closed box protected from sudden temperature variations. A varicap in series with a 20MHz crystal gives a 300Hz correction range, therefore excess drifts at extreme cold or warm ambient temperatures could not be corrected by GPS synchronization. A larger correction range could be reached, in theory, but at the price of oscillator Q reduction and, as a consequence, a greater phase noise that could prevent the use of this clock generator for LO generation in narrow-band microwave transverters. A LOCK signal turns-on an indicator LED and informs the uP that the phase loop is locked.

The 10KHz reference is essential for the absolute accuracy of our clock generator. Unfortunately the Rockwell's Jupiter module outputs the 10KHz even if no GPS satellites are in view, then the reference can be totally inaccurate without notice. A possibility to validate the GPS time reference is by analyzing the NMEA sentences sent by the module, but since there is no specific field dedicated to this information, we need to do some extrapolations. By experimentation it has been observed that a 3D fix, normally reached with 4 SVs tracked, does not guarantee that the 10KHz reference is correct, while a minimum of 5 SVs tracked allows the GPS module to resolve also a time solution from the GPS signals. So the uP looks for a 3Dfix with 5 SVs tracked as a minimum condition to validate the 10KHz reference and will drive an indicator LED when this condition is reached.

The microcontroller, a PIC16F628, receives the NMEA sentences from the GPS module also to report on the LCD screen some essential data in three separate screen pages.

Page1 (Default): PLL lock status, Selected output frequency, # of tracked SVs, UTC time.

UP/DWN buttons select output frequency.
PAGE button switch to page 2.

Page2: Received signal strength, # of almanac SVs in view, ^ marks tracked SVs, fix type.

PAGE button switch to page 3.

Page3: Altitude, Latitude, HDOP, Longitude.

PAGE button switch to page 1.


Similarly to position accuracy, time solution is affected by the amount of tracked SVs and constellation geometry. Therefore, DOP is an useful parameter to judge how accurate the output frequency is.

An RS-232 output is provided to obtain a more complete graphical interpretation of NMEA data using a PC with a suitable SW, or to get position data for APRS purposes. In the prototype made the AC power supply is internal and, together with a small 3V button cell, it also keeps alive the GPS module internal RAM in order to reduce TTFF at power-on.

Since this equipment should work indoor in a lab, it needs an external amplified antenna in clear view of the sky. The max cable length depends on antenna amplifier gain, that for most commercial patches just compensates for the losses of the attached RG174 line. If more cable length is needed for a fixed installation, it's better to leave only ~20cm of the original RG174 and continue with a lower loss coax. For example, the RG213 losses at 1.5GHz are about 1/5 of the RG174, then the antenna can be put 20 meters and more far away.


  Back to top



The first prototype has been built by Johnny on 100mils pre-drilled proto-boards. PLL circuits and the GPS module have been enclosed in a shielded TEKO case directly attached to the back panel of the equipment. Two BNCs on the back have fixed frequency output, while the one in the front panel is the programmable one. This prototype has been used to debug and validate HW and SW design. It is currently operative in Johnny's lab.


Back view of Johnny's prototype. Outer case and inner shielded box are open. Click on picture for larger view.

Closer view of PLL multiplier and the Jupiter GPS module staying on it. Click on picture for larger view.

Front view of Johnny's prototype. The shielded box containing the PLL multiplier and the GPS module is now closed. Microcontroller board is beyond the front panel, and the LCD is mounted on its solder side.


If you have the same GPS module and you want to build a similar equipment, PCB and schematic files are available at our downloads section. There you find also the .hex code to allow you to program the micro by yourself.

At there are all the informations you may need to connect and use the Jupiter GPS module. 



  Back to top



As the reader could imagine, the toughest part of a project like this is its validation. Aiming to be a frequency standard, it should be compared to another equipment supposed to be correctly calibrated. Up-to-date, the best Standard in our reach is a surplus Cesium-beam 5MHz clock at a friend of ours lab. The deltaF has been measured quite stable around 50mHz, or 10ppb, in 2 hours observation, that's not bad. Even if performed with an equipment whose calibration certificate was out-of-date, we consider significant this test as we could imagine how small is the probability to find two cheap wristwatches from two different brands exactly giving the same time after one year of operation. We hope to repeat the test using a recently calibrated equipment and a more accurate observation method.
In the meanwhile, we had the opportunity to verify how useful can be such an accurate frequency reference for our new 10GHz experiments on the field: to know more visit our Ham Radio pages.


  Back to top


The projects presented in these pages are our own design and have been tested and verified by ourselves at the best we can. However, they might be inspired by concepts, ideas, solutions coming from known-art or free resources on the Web. We provide them as  reference designs to skilled hobbyists and technicians  who are willing to reproduce them for non-commercial use. Your results might be different from ours and we cannot be considered responsible for that. Similarly, we are not responsible for any damage or injury you might incur while building, assembling or using the equipments, projects or ideas presented in these pages. The firmware embedded in our projects is our property unless differently stated and, when available in the Download Area, it is license-free only for non-commercial purposes.  

Hotwater 2007-2009