[time-nuts] Designing an embedded precision GPS time

Hal Murray hmurray at megapathdsl.net
Tue Oct 31 23:45:30 EDT 2017


> I'm intending to add a "precision" (well, precision to the Pi world) RTC  to
> my Pi 3 to use for a holdover source when it hasn't got PPS from the  GPS
> module. 

> An RTC that +/- 3 PPM over 24 hours would be great for holdovers of one  to
> 20 minutes. 

Run some experiments to collect some data and play with the numbers.

How stable is the temperature in your environment?

The key to keeping sane time on a PC or Raspberry PI is to calibrate the 
crystal.  Most CPUs have a register that counts at the CPU clock frequency - 
or something in that range.  Most systems smear the clock to keep the FCC 
happy...

Most OSes keep time by watching that register and dividing by the clock rate. 
 The actual clock rate doesn't usually match the number printed on the 
crystal.  It's close, but ntpd can easily measure the error and tell the 
kernel so the kernel can use the right value.  If you turn on loopstats, ntpd 
will log it and you can graph it.

If you are writing an embedded system, you will want that sort of logic too.

My guess is that in the under 30 minute range, you will get better results by 
just coasting with the system clock rather that using a RTC.  It would be an 
interesting experiment.  Implement both clocking schemes and compare them.





-- 
These are my opinions.  I hate spam.





More information about the time-nuts mailing list