Apparently Time IS Money

Some people like to tweak cars. Some like to overclock PCs. Then there are the guys like [Jack Zimmermann] who are obsessed with accurate time. He’s working on a project that will deploy NTP (Network Time Protocol) servers in different African countries and needed small, cheap, energy-efficient, and accurate servers. What he wound up with is a very accurate setup for around $200. Along the way, he built some custom hardware, and hacked a computer to sync to the GPS clock reference.

His original attempt was with a Raspberry Pi 3. However, the network adapter isn’t the fastest possible, both because it is 100 MBPS and, primarily, because it is connected via the USB bus. Network latency due to these limitations makes it difficult to serve accurate time.

His solution includes an Odroid C2. For $50 it is a very capable computer with four cores, gigabit Ethernet, and can even use eMMC storage which is faster than the usual SD card. You can still use a conventional SD card, though, if you prefer.

For a time reference, [Jack] used a Trimble GPSDO (GPS-disciplined oscillator) that outputs a PPS (pulse per second) and two 10 MHz signals. These are locked to the GPS satellite clocks which are very accurate and [Jack] says the timing is accurate to within less than 50 ns. Unfortunately, the pulse from the Trimble board is too short to read, so he designed a pulse stretching circuit.

Instead of trying to discipline the existing clock on the Odroid to the GPS reference, [Jack] removed the crystal and associated components completely. He then used a frequency generator chip to convert the 10 MHz GPS signal to the 24 MHz clock the Odroid expects. He has plans to use the extra outputs from the chip to drive the ethernet and USB clocks, too, although their absolute accuracy is probably not that critical.

We’ve seen NTP clocks before that can consume this kind of time reference. If you want to know more about the Odroid C2, we talked about them at length last year.

25 thoughts on “Apparently Time IS Money

  1. I ran into some info on GPS and the NTP client in linux the other day as we had some issues with std steady_clock on the job.

    It seems that the NTP client can sync directly from a GPS NMEA stream!?

    Sooo. Question being: Could you simply sync the server to the GPS sattelites via this method?
    And if so, how would this simple setup stack up against the method in this article?

    1. Unfortunately not. The delay is too big on the serial line. Most people uses the GPS NMEA stream to set the hour:minutes:seconds and rely on the PPS signal for more exact seconds. It’s really easy to modify an U-Blox GPS module from eBay to output PPS (or 10MHz) by soldering a wire on the board. There’s even cheap Raspberry Pi boards from Adafruit and others that has the PPS signal out, connected to a GPIO pin.

  2. >> “deploy NTP… the network adapter isn’t the fast … Network latency … difficult to serve accurate time.”
    Isn’t NTP supposed to accurately sync time across a network IN SPITE of network speed and latency? I guess you still need at least one server to be the timebase…

      1. “Yes, NTP can handle jitter and latency, but why make the job harder?”

        The job of making NTP handle jitter and latency is already done, so there’s nothing hard about it. Of course, what’s missing from this blog entry is the actual requirement specification. We have no idea what kind of accuracy is ultimately needed, making it hard to contribute useful suggestions.

  3. It’s fairly straight forward to use the pps_gpio linux module as a time source for NTPD, For an RTK GPS basestation & rover I used an OrangePi Zero running the latest Armbian and uBlox LEA-6T modules. For $80 AUD each they happily run RTKLIB and ntpd without breaking a sweat. The RMS error of the LEA-6T PPS output is 30ns according to the datasheet.

  4. So you’re looking for accuracy and precision. The time right now is 10:08 AM EDT. That’s accurate, but it’s not precise. Precise would be 10:06:54:30. That’s precise, but not accurate. Precise and accurate would be something I can’t do easily on this Windows PC ;)

  5. Instead of adding a coverter from 10 MHz to 24 MHz, I’d have used a CPU that can run a timer from separate clock input pin like the AM335x with its TCLKIN pin.

    And for pushing that accuracy out to the net, PTP is much better than NTP, especially with Ethernet controllers that can do hardware timestamping.

  6. Maybe build one that can decode MSF, GPS, Galileo AND GLONASS using recycled phone parts?

    I did read somewhere that GPS micro-antennas are way better than the junk piece of wire typically sold with phones,
    and can give about a 30-50% increase in gain with negligible increase in noise.

    Also I have built makeshift antennas for my buddies at Golf Charlie Hotel Quebec before, using large area blue LEDs harvested from assorted junked LED matrix boards used on some jets (seriously!) and they also work if you stack up enough of them side by side with the emitters facing sideways on for maximum exposure of the junctions to the sky.
    They incidentally also have incredibly good varicap properties and the ones from old flat screen TVs in series work moderately well if you pick emitters with 1Px16S single diode arrays in them but are far bulkier.

    The record is a 3mm*4mm * 2mm double sided “module” which out-locked a £15,000 custom made laser tuned antenna by a factor of 1.3 just using the cheapest GPS single chip solution we could find for a whole £9 plus some very finicky hand nano-soldering.

    Catch is that they have atrocious temperature and light sensitivity but the fix is to use 3 such emitters with different peaks and connect them in parallel via DC blocking wye filters to the front end.
    With only minor work the same module picks up Galileo as well.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s