[time-nuts] Poor Man's IRIG-B Generator?

Dean Weiten dmw at weiten.com
Thu Dec 14 08:42:17 EST 2006

Hi there,

The "standard" source package for the Network Time Protocol package,
found either at http://www.ntp.org or through download with/for a LINUX
distribution, has a tool in the "utils" directory called "tg", which
stands for "tone generator".  It can generate simple modulated IRIG-B
and WWV(H) time signals on an audio card.  Unfortunately, I found that
it would not compile for X86 - it was apparently written for the
SparcStation, I think.  I've modified it to work with Open Sound System
(a modern LINUX sound system), and added all kinds of IRIG options,
including IEEE 1344 yes/no, daylight savings time, proper second-of-day,
1998 or 2002 format (includes years), etc.  I also tweaked the WWV(H)
format to make it more correct, e.g. skipping the 440 Hz tone on the
29th second, etc.

Unfortunately, I haven't got around to contributing the source back
yet.  Looking just now, it's not obvious **how** to contribute back. 
I'll check that out later.

In spite of this... should you be running LINUX, and should you wish to
download NTP (you have to have NTP source before you can compile "tg" -
may even have to have the core software compiled), I can provide a file
"tg.c" which will drop right on top of the existing "tg.c" in the
"utils" directory, and give you these features.  Just drop me a line. 
As always, your mileage might vary, no warranties, etc.

One caveat: with any sound card output, the sample rate is only as good
as the time card's clock source.  This means that the output frequency
is only as good as that clock source.  Since the signal is just sine
waves output continuously, this means that the IRIG-B output time will
drift from the system clock.  I was working on monitoring the difference
and correcting for this long-term drift.  I haven't completed this yet. 
It would create a small short term variation in the frequency, but
IRIG-B clients would not care.

As an aside, I've implemented a couple of IRIG-B time decoders as part
of my job.  One of them automatically handled modulated and unmodulated
on the same input, switched and level-compensated automatically, and fed
a highly accurate (hmm, "highly" is dubious when you are talking IRIG-B,
but let's say "impressively" accurate given the signal characteristics)
"on-time" signal to a DSP, which then synchronized its sampling to it. 
It was part of the framework for a power system relay & recorder product
line, http://www.nxtphase.com/sub-products-relays-bpro.htm .  For some
reason, I find such things exciting and gratifying.  I guess this is why
I subscribe :-)


Dean Weiten
dmw at weiten.com

More information about the time-nuts mailing list