[time-nuts] Testing frequency using NTP

Bruce Griffiths bruce.griffiths at xtra.co.nz
Thu Oct 2 16:41:18 EDT 2008

Tom Van Baak wrote:
>> I'm wondering about the possibility of checking the frequency of my
>> oscillator by using a NTP synced RT Linux system. What I'm thinking of
> An "all-PC" frequency counter is a great idea. True, the
> performance is limited compared to GPS time sources and
> hardware frequency counters, but there's something to be
> said for an all (or almost all) software approach.
> Time-stamping from an external pin transition should work fine.
> Consider also using the sound card as a time comparator.
> If you put your divided down UUT the left channel and an
> NTP sync'd parallel or serial port tick into the right channel
> you can compare the relative phase by looking at the stereo
> input data. Phase change over time gives you frequency error.
> The instability of the sound card's own LO drops out of the
> equation. With 44.1 kHz sampling you could handle tick rates
> of 1 kHz without any problem. This should be quite a bit more
> accurate than 1 Hz sampling, so you might have to wait less
> for your goal of 1 ppm resolution. If the limiting factor is the
> quality of your NTP connection, then you've done a good job.
> /tvb

When using a sound card for frequency comparisons the zero crossing time 
stamp resolution is improved if the slew rate of the input signal is 
slow enough that several (3 or more) samples are taken in the vicinity 
of the zero crossing. One can then make use of  WKS (Whittaker, 
Kotelnikov, Shannon) interpolation to accurately calculate a high 
resolution zero crossing time stamp.
The instability of the sound card LO isnt completely cancelled if the 
zero crossings of the the 2 signals aren't coincident.


More information about the time-nuts mailing list