[time-nuts] Designing an embedded precision GPS time

Attila Kinali attila at kinali.ch
Tue Oct 31 20:11:26 EDT 2017


On Tue, 31 Oct 2017 21:03:05 +0000
Leo Bodnar <leo at leobodnar.com> wrote:

> The goal was maximum throughput with minimum time offset.
> Maximum throughput eventually ended up as "fully saturated full-duplex 
> 100BASE-TX" and minimum time offset as "below 1 microsecond"
> There was nothing on the market below £2-3k that could do that.  I think 
> Microsemi has recently made a server that can do 100kpps+ but I don't know 
> its price.

Hmm? There are at least a dozen how-tos out there that explain how to
make an NTP server out of an SBC. And I have seen the one or other
being sold as a complete box with batteries included.

Basically, all you have to do is use an SBC that runs linux and has
a GPIO with an interrupt to act as a PPS input. Attach a GPS receiver
and you are almost done. The cheapest option are probably the i.MX233
based ones (go as low as €20). The probably most mentioned option
is using a Beaglebone Black.

If I had to build something like this today, I would probably go
for an OSD3358, which is an AM3358 packaged with memory and power
management and allows using a simple 4 layer board. Add a few
bits for ethernet and the GPS and you are almost done.

> I do want to improve my NTP devices but I do not understand what you are 
> suggesting.
> Why would sawtooth correction matter when there is no GPS signal available at 
> all?

It matters while you have signal.

> I am not measuring any frequencies - the whole device runs synchronously hard-
> locked to GPS time when it is available and freewheeling when not.

You should have a control loop somewhere, which explicitly or implicitly
estimates the frequency of the TCXO. 

The time-nuts archives are full with discussions how to do such
control loops and improve hold over performance. Though there
weren't many in the last 2-3 years. John Vigs tutorial is also
a good start.


> Are you saying that if you deprive any PC of any connectivity it will drift 
> by 4-5ms in 24 hours?

Almost. It has to have ntp running and ntp must have had time to
discipline the local oscillator. If the PC is then in an environment
that will not cause its oscillator to drift more than 10-100ppb per
day, then it will stay below 10ms. There are a few ifs there, but
it's nothing out of the ordinary. Even ordinary crystal oscillators
can be quite stable if they have been running for a while.
Just for comparison: decent wrist watches drift less than 1min in
half a year. Good ones less than 10s.

			Attila Kinali

-- 
It is upon moral qualities that a society is ultimately founded. All 
the prosperity and technological sophistication in the world is of no 
use without that foundation.
                 -- Miss Matheson, The Diamond Age, Neil Stephenson


More information about the time-nuts mailing list