[time-nuts] verifying synchronization with PPS

Steve Summit scs at eskimo.com
Tue Jul 9 13:56:56 UTC 2019


I wrote:
> I'm guessing there are some time nuts here who might be able
> to give me some pointers.

And there were!  Thanks for the suggestions & comments.

Dana Whitlow wrote:
> in the absence of a PPS or other electrical output from your
> "computer", what is the nature of the time "output"?

It's collecting data and coordinating activities among several
other systems, each with their own clocks, some connected by
serial ports and some by ethernet, some on NTP and some not,
some with PPS feeds and some not, but obviously the goal is,
by hook or by crook, to keep all the clocks well synchronized
so that timestamped data is commensurate -- and then to
positively *demonstrate* that they're well synchronized.

> why not view the light output of the seconds digit with a photocell.

Because I had never thought of such a thing.  I could pretty
easily implement, in a diagnostic window somewhere, a nice fat
1 Hz spot that would be trivial for even a crude photocell to "see".
There'd be some latency, but it'd be much better than nothing.
Thanks very much for the suggestion!


Graham wrote:
> What level of accuracy do you mean by "synchronized"?

I think we'd be happy with 1 ms.

> Plotting a lightly loaded Linux box, which is extracting time from
> the network via timesyncd, against a GPS 1PPS signal, I observe...

So it sounds like you're already doing more or less what I want
to do!  I'd be curious to hear more about the setup you use to
make those plots.

> The owner of this list has designed an excellent dual input timing
> device called the TICC, which can compare two PPS signals...

Ha!  Thought so.  Thanks for the pointer.


David Taylor wrote:
> Folkert van Heusden has a driver for NTP which includes PPS output:
>   https://vanheusden.com/time/rpi_gpio_ntp/

Great!  I will read that.


Hal Murray wrote:
> There is code in the Linux kernel to generate a PPS output.

Huh!  I should have noticed that.  (I'd been thinking of adding it,
if I had to.)

> I think it uses the printer port...

But it shouldn't be too hard to modify it to use a GPIO pin.

> If I wanted to try something, I would write a user-level hack
> to flap a modem line and compare that to a PPS signal.

That would probably be fine for my current purposes.  The latent
time-nut in me worries about scheduling and latency and jitter,
of course, tempting me to chase an overkill solution which is not
only in the kernel, but implemented in a brute-force, special-
cased way, eschewing the extra function calls and indirections
(and hence latency) which a properly general-purpose solution
might involve.


Thanks again for all the replies; this has been very helpful.




More information about the Time-nuts_lists.febo.com mailing list