[time-nuts] Encoded 1PPS signals

Chris Albertson albertson.chris at gmail.com
Tue Jun 26 17:49:04 UTC 2012


On Tue, Jun 26, 2012 at 6:15 AM, Clayton G <clayton at isnotcrazy.com> wrote:

> Hi Nuts,
>
> I have been building an LF transmitter, and have provision for a 1PPS
> input for calibration purposes. However I would like to be able to provide
> more time information than just the second pulses. It occurs to me that
> full time info could be encoded onto a 1PPS stream by changing the width of
> the pulse itself. The rising edge can be left unchanged to indicate the
> precise second, but the trailing edge can vary between (say) 100mSec and
> 300mSec, and this could encode 60 bits (with suitable idle pulses etc for
> synchronisation) in each minute. Using this I could encode full date and
> time into the 1PPS stream.
>
>
There are a few better ways to do this.  The general term is "time code".
 IRIG is one common time code and there are others, such as that used by
WWVB.  It is not hard to create a good time code stream.   If you look at
the source code distribution for NTP in the "test" directory there is a C
source code for a time code generator (the one used by WWVB) and it will
output the signal using an audio interface.   Assuming you have the PPS
signal going to a Linux or BSD based computer the time code can be accurate
at the "handful of microseconds" level


The other point is "why?"   You do not need to encode anything on top of
the PPS.  Here is a very simple example:  If you run a local oscillator at
even (say) 1kHz and keep it phase locked to the incoming PPS you now have a
digital millisecond counter that is tied to the PPS.  If you run a 1Mhz
oscillator you have a microsecond counter.  No need at all to encode time
on the PPS signal you get that from the local counter.     It is not hard
at all to keep this accurate at the "few uSec level."

In simpler terms, the PPS leading edge already gives you sub uSec time
because you can run a fast-ticking clock and count the ticks after the
leading edge of the PPS.   Also at the same time you count ticks from
leading edge to leading edge and adjust your local "ticker" to keep it at
the correct rate.

Chris Albertson
Redondo Beach, California


More information about the time-nuts mailing list