[time-nuts] Beginners GPS locked frequency counter question

Tom Van Baak tvb at LeapSecond.com
Sat Oct 31 20:58:12 EDT 2015

>   As an aside, I work low frequency RF transmissions on 136 Mhz, and
>   very narrow bandwidth. Can a soundcard be locked to GPS instead of
>   its own internal crystal for precise frequency output?


It might first be interesting to see how far off the frequency is before you worry about disciplining it with GPS.

One trick that I use is to make the soundcard generate 1 Hz pulses and compare that against GPS with a TI counter. The tool is 1hz.c 1hz.exe in my tools directory (http://leapsecond.com/tools). This avoids having to open up the computer and probe or buffer the soundcard oscillator.

If you collect a long enough data set you will also get a feel for how stable the oscillator is; something you will need to know to tune your GPSDO algorithms.

But wait, there's more. If you find that your soundcard oscillator is, say, 12.34 ppm fast -- you don't actually have to tune or discipline or replace the physical oscillator. Instead just change the software that's writing to the soundcard and have it generate waveforms that it thinks are 12.34 ppm too slow. In other words, instead of defining PCM_RATE 48000 as a constant, you set pcm_rate = 48000 * (1 + 12.34e-6) as a variable. One line of code.

It gets even better. If all you need is one channel of output, then generate your waveform on the L channel and generate 1PPS on the R channel. Use a TBolt and TIC to continuously measure R vs. 1PPS and send those readings back to the PC for averaging. As the time interval grows (indicating a frequency offset) beyond acceptable levels, then make corresponding changes your pcm_rate variable. This essentially becomes a software GPSDO. No h/w changes are required to the board; you don't even have to open the case. The output waveform will always be spot on-frequency, regardless of soundcard oscillator frequency offset and drift.


More information about the time-nuts mailing list