# [time-nuts] Beginners GPS locked frequency counter question

Bob Stewart bob at evoria.net
Sat Oct 31 21:25:18 EDT 2015

```Tom,
It's been awhile since I did soundcard SSTV, but the program MMSSTV uses the time ticks from WWV to do a calculation similar to what you describe.  You tune in WWV on your receiver, which is coupled to your computer's soundcard.  The MMSSTV calibration routine puts a raster scan on the screen.  You adjust the calibration factor so that the time ticks are lined up vertically from top to bottom.  The code is proprietary, but I suspect that he is merely dumping bytes from the soundcard on the screen, and the calibration value is some sort of multiplier for the soundcard's clock rate.  Someone who has done soundcard FFT programming might have a better idea.

Bob

From: Tom Van Baak <tvb at LeapSecond.com>
To: Discussion of precise time and frequency measurement <time-nuts at febo.com>
Sent: Saturday, October 31, 2015 7:58 PM
Subject: Re: [time-nuts] Beginners GPS locked frequency counter question

>  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?

Chris,

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.

/tvb

_______________________________________________
time-nuts mailing list -- time-nuts at febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts