Posted on by & filed under electronics, hardware, radio.

Part 1

The Doctor: People assume that time is a strict progression of cause to effect, but actually from a non-linear, non-subjective viewpoint—it’s more like a big ball of wibbly wobbly… timey-wimey… stuff.

Amy Pond: It’s spacey-wacey, isn’t it?

—Dr. Who?

Though delightfully silly, there is some truth to that quote! Time is an amazing phenomenon to me. Concepts of time—whether philosophical, subjective, or rooted in the equations of Modern Physics—exist at the core of so much that governs our lives. Time is a measurement like the orthogonal dimensions of length. Everything in the universe contains a dimension of time. But time is also a where as much as a when. The relative experience of time that any object is at once unique, yet, within some conditions, is still relatable to other spacey-timey stuff around it. We can sense time, but we can’t hold a “1 Second” of anything in our hand.

Like any system of measurement, when thinking of time we are usually concerned with two key descriptors: precision and accuracy. Within the time reference we all more or less share, precision is the ability to resolve the difference between two events. Accuracy is the ability to line up contemporaneous events—usually an event with a mutually agreed upon standard reference. We are all accurate about lunchtime, but maybe not as precise about a “lunch hour.”

Time, and its polymorph frequency, is very important in practical, day-to-day ways. In our IT infrastructure at Safari Books time is very important to decoding the events of a system failure, to accounting for distribution payments, to securing our systems, and to planning lunch. Time is also of critical importance for Amateur Radio (de KR6AU, cm88. QSL?), astronomy, auto racing, and many other activities, like lunchtime.

So, tell me about the project…

GPS receivers are an ever-present part of our lives these days. They are in our phones, cars, and computers and they are popping up in many surprising places. Our popular understanding of GPS technology is that it tells us where we are on the planet. It is accurate enough that we even measure the polar eccentricity and spherical deviation of the earth (it is actually an ovoid!). What fewer people understand is that the GPS system satellites are based on sophisticated atomic clocks, each coordinated and compensated for the relativistic effects of their orbital velocity. The messages GPS satellites send back to earth tell us the UTC time and a very precise pulse per second (PPS) signal. Given those messages from a range of different satellites (each with a slightly different time relative to their distance), a GPS receiver calculates where it is within a big spherical model of space and maps it to a location on earth. It is kind of like mapping textures on an object in a game or animated movie.

GPS receivers have a liability, though. When one looks at their precision—in the short-term, say, seconds to minutes and hours, they “jitter” about their ideal. In the long term—days to months and years—a GPS receiver will average within a few tens of nanoseconds (that is 1/1,000,000,000ths, a billionth of a second!) or 1 second every 3 years or so!

tl;dr: GPS is great for long time span precision and accuracy, but not too super for short term

This is where Rubidium (Ru) comes in. Crystal oscillators are one of the oldest technologies in electronics. Actually they are electro-mechanical devices! Crystal oscillators have a teeny-tiny little electrode that completes a circuit through the crystal that makes use of the structure of the crystal and its properties to generate an electrical signal at a proscribed frequency. You will often see them on a schematic abbreviated as XO. Among XOs, Ru crystal oscillators have terrific short-term stability—but over time their frequency can drift. There are a variety of ways this is addressed. In the case of time and frequency standards it is desirable to use a combination of techniques. XOs are sensitive to temperature. It is common to encase them in a small heater or “oven” that controls the temperature in the XO and stablizes them. An additional means of stabilizing the XO is to use a feedback loop to apply a voltage to the XO that will slightly change shape to the crystal, changing its electrical-mechanical properties. The XO I have chosen (ok the WHOLE world have chosen for this application) uses both types of stablization. These are called Ovenized Voltage Controlled Crystal Oscillators or OCXOs.

tl;dr, again: OCXO’s—short-term super, long term drifty

So, um, what about the project?

Combining the characteristics of the two devices (GPS and OXCOs), we can create a time and frequency standard that can drive an NTP server, and be used for other nifty nerd-hobbies.

A block diagram showing antennas, OCXOs, amplifiers, and a range of outputs

Conceptual diagram of the whole project?

How will this all fit together?

A block diagram starting with an antenna and including a range of outputs

Block diagram from Antenna to output including GPSDo and Raspberry Pi

There are two inputs to the GPSDO circuit: the OCXO and the GPS signal from the satellites. The GPS signal is processed in a timing optimized GPS receiver module, which sends out a PPS precise 10KHz signal. It also send PPS signal to the Raspberry Pi that I am using for the NTP host. The OCXO signal is amplified so it will operate at the signal levels of the integrated circuits then fed to a frequency divider that besides providing handy reference frequencies for Amateur Radio and other projects produces a 10KHz signal. The 10KHz signals from the GPS and the OXCO are compared in a type of circuit called a Phase Locked Loop (PLL). A PLL compares the waveforms of the two inputs and produces an error signal that is used to provide correction back to the OCXO. This feedback control loop is the key to generating a signal that is stable in both the short term and long term.

Some GPS disciplined frequency and time standards will sync the PLL with other frequencies (the lower the frequency the higher phase noise) to reduce jitter that is generated by the limited sampling and longer stabilization times. I went with this GPS receiver because it fit what I had sketched out and was doable for me. I am reading up on more advanced means of frequency discipline for my next project.

The design

When I began to research my approach, I found that others had used this same approach successfully. This design is based on the work of before me others that had the same ideas. You will find schematics shockingly similar to this on the web. Some have additional bells and whistles, some improved my original idea and are heavily borrowed from.

This schematic follows the conceptual drawing very closely—there are a few places where hex buffers are used as phase inverters and drivers, and the frequency divider is spread through three decade counters on two separate chips. The fourth counter is not used and the inputs pulled to GND to prevent noise/oscillation.

I drew the schematic up in Cadsoft Eagle and all sources for the it, and the printed circuit board are available at GitHub. I also have reference stuff I found while researching tucked away in the repo.

The schematic


The schematic for the GPSDO

The printed circuit board

Image of a printed circuit board

The two sided PCB layout. (not scaled for direct use)

I created this layout to conserve space, but also to minimize high frequency signal paths. This board also has GND connections for all signal I/O to prevent noise and interference signals. Anytime you are working with frequencies in the radio bands, you must take care to prevent the unintended radiation of board signals! Again, the source files are available. I have little doubt that someone could do the layout better! If you give it a try, please do let me know how it turns out.

Next time

This has turned out to be a much bigger project that a single blog post. I will likely have 2, maybe 3 additional installments.

For my next post I will provide a BOM and discuss the populating of the board. I’ll also talk about the larger chassis assembly and the steps needed to integrate a Raspberry Pi and the PPS kernel modules into this project.

In following posts I will discuss testing, performance, and the next steps for a more advanced v.2 GPS Ru OCXO Time and Frequency standard.

Safari Flow has many resources for further investigation if you’re curious, both IT and electronics related. Here are a few:


Comments are closed.