Hacker News new | ask | show | jobs
by adrian_b 1654 days ago
As long as the rubidium clock is used only for displaying the time and date, a few millisecond error from NTP will not matter.

If the pulse-per-second provided by the rubidium clock would be used for disciplining a high frequency clock, intended e.g. for providing timestamps with millisecond or microsecond precision, then the Precision Time Protocol (IEEE 1588) would be needed. PTP requires hardware support in the network interfaces, but most network cards have it.

I sympathize with the desire of the author of having an atomic clock, especially because when I was a little child I used to play in the lab where my dad worked, where he had a couple of atomic clocks (a HP cesium clock and a hydrogen maser). Things like frequency counters with Nixie tube displays and oscilloscopes with Lissajous figures were great fun, so those are cherished memories.

So there was a time when I entertained the idea of buying some cheap used rubidium or cesium frequency source, like the author of the article.

However the time has passed and now rubidium and cesium clocks are really obsolete and in any case they are not the best method to make the most accurate time measuring device within any constrained budget.

What most people who hear about atomic clocks are not aware of is that the "atomic" part of the clock has only the purpose of correcting the ageing error that affects any non-atomic clock.

For short times, e.g. under a few hours, the precision of the output provided by an "atomic" clock is that determined by whatever kind of oscillator is included in the "atomic" clock, whose frequency is determined by the dimensions of some kind of resonator. For cheap rubidium or cesium clocks, that oscillator is just a quartz oscillator, not necessarily better than the good OCXOs that can be bought at much lower prices. For expensive atomic clocks, the oscillator that ensures the short-time precision may use better resonators, e.g. cryogenic dielectric resonators, superconducting cavities or optical cavities. Even in the so-called "active hydrogen masers" which are the only currently-used atomic clocks with atomic oscillators, the maser is actually operated in a regime where the frequency is determined only in part by the atomic resonance and it is strongly influenced by the frequency of the resonating cavity in which the hydrogen is placed, so the short-term accuracy of the active hydrogen masers is worse than that of the best oscillators whose frequency is determined just by the dimensions of resonators.

While in an usual atomic clock there is a feed-back loop that slowly tunes the frequency of the quartz oscillator based on periodic measurements of the atomic resonances, for many purposes it is possible to obtain better results with an oscillator that is never tuned, but let to run freely, which has fewer components that can cause frequency instabilities.

For such a freely-running oscillator, by making periodic average frequency estimates using NTP or GPS, it is possible to compute the ageing rate and then apply appropriate corrections in software.

With a good OCXO, after an initial time for estimation of the ageing parameters, even when an NTP or GPS link is not available for a long time, the time can be kept more accurately than with most cheap rubidium or cesium clocks, which might have worse crystal oscillators and whose feed-back loop used for correcting the long-term errors due to ageing may cause larger short-term frequency instabilities.

1 comments

I took the current “just show the time” behavior to be a mere PoC and commented with the expectation that OP or someone interested in replicating OP’s design would ultimately add either PTP or (s)NTP server functionality to make it actually a functional bit of infrastructure.

Thanks for teaching me about OCXO. I found this relevant write up: https://www.paulvdiyblogs.net/2020/07/a-high-precision-10mhz...