[time-nuts] Digital temperature compensation

Daniel Drown dan-timenuts at drown.org
Sun Nov 2 18:35:44 EST 2014

On 11/1/2014 6:03 PM, Hal Murray wrote:
> dan-timenuts at drown.org said:
>> I'm experimenting with using a temperature sensor to estimate local
>> oscillator frequency changes.  My goal is to have a decent holdover clock
>> for a NTP server with not so great GPS antenna placement.
> This is for ntpd rather than chrony, but it's a good read:
>    NTP temperature compensation
>    http://www.ijs.si/time/temp-compensation/

Thank you, I hadn't seen this one.  I chose chrony because it has 
built-in support for temperature compensation.  I couldn't find anyone 
else talking about using it, so I posted my trial run information:

Chrony's support looks very similar in implementation to that page, so I 
assume that's what it was inspired by.  My trial run was exciting 
because it suggested around 25ppb-60ppb was possible.

>> With the colder temperatures, there's a sudden drop off in frequency  that
>> I'm having a hard time finding a equation that fits as nicely.
> That section of the graph doesn't make sense to me.  I suspect a glitch in
> your setup.

I suspect what I'm running into is some interaction of other components 
(perhaps the resistors and capacitors) with the crystal oscillator.

> When does your GPS unit run out of satellites?

I've only included data when the GPS is locked and the PPS offset is 
within +/- 15us.

> Where is your temperature probe?  Is it in contact with the crystal inside
> the PC?  Is the PC doing anything?  In particular at the times when the data
> doesn't make sense?

The probe is nearby, on a breadboard.  The system in question is a 
beaglebone black and dedicated to just NTP.  I'm also collecting the 
(less precise) CPU temperature sensor data, and there's no relationship 
between it and the frequency spikes.  I've gone ahead and attached that 

> PCs can do a lot of self heating.  Try running a big workload when the
> temperature is in the middle of the good range.

Yup, you can see an example of this on the blog page.

I've posted a part 2 to my blog to go over my estimation of what should 
be possible using this hardware, and came to the conclusion of around 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cputemp-vs-clock.png
Type: image/png
Size: 20576 bytes
Desc: not available
URL: <http://www.febo.com/pipermail/time-nuts/attachments/20141102/f8a3b411/attachment-0001.png>

More information about the time-nuts mailing list