[ntp:questions] PPS from an external OCXO source. Correcting drift is it possible?

Hal Murray hal-usenet at ip-64-139-1-69.sjc.megapath.net
Sun May 3 09:37:13 UTC 2009


In article <c5391c04-b342-4922-b520-ff862fa3802c at v1g2000prd.googlegroups.com>,  Kat <Schwar3Kat at gmail.com> writes:
>To try and maintain better accuracy on the ntp server that feeds my
>small network and increase the maxtime for server polling, I thought
>that I would dig into my scrap box and build a PPS with a home built
>OCXO as a spare time project.  The NTP documentation stated that e a
>PPS source could be used with an NTP server as the reference clock, so
>I built the PPS source.
>
>My homebrew PPS source that is vastly more stable than my servers
>internal clock, but it has a slight constant drift that I can't easily
>correct.  Also I can expect the drift to change slowly with time due
>to crystal aging.
>
>I hooked it up to my FreeBSD servers serial port and tweeked it for
>minimum drift relative to another internal NTP server referencing
>three external NTP servers. (NTP 4.2.5p5-a).  Unfortunately this setup
>doesn't appear to work as I would have expected it to.
>
>I have two problems with it.  1. It starts off with a random offset.
>2. The offset drifts at about 20 milliseconds a day.
>
>If this was the internal PC clock then  NTP would take care of the
>drift with by calculating the drift constant with respect to other
>external NTP servers and correcting for it whilst reducing the offset
>to zero. Does the PPS clock not have a similar mechanism?
>
>Is there any way to do this or is the NTP documentation misleading me?

There are two things you might get from a PPS input.  One is time.
The other is frequency.  You are feeding it frequency.  The ATOM/PPS
refclock driver expects time.

It might be fun to see if you can get the software to take advantage
of a frequency input rather than time.  It won't be a simple hack.

There are a couple of things you can do.

One is to use GPS to tweak your OCXO.  Google for GPSDO.

Another is to use your OCXO to drive the clock on your system.

Most PCs have 2 crystals, one for the CPU and one for the
CMOS battery backed time-of-day/year (TOY) clock.  Which
one gets used for timekeeping depends on the fine print
in your kernel.  You can probably figure it out by warming
up one of them and watching the drift.  If you like tinkering,
you could derive the right frequency from your OCXO and wire
that up to your system.

-- 
These are my opinions, not necessarily my employer's.  I hate spam.




More information about the questions mailing list