[time-nuts] Raspberry Pi NTP server

jimlux jimlux at earthlink.net
Wed Jul 15 17:04:59 UTC 2020


On 7/15/20 5:59 AM, Hal Murray wrote:
> 
> tpiepho at gmail.com said:
>> It seems like it would not be that hard to get the USB frame sequence phase
>> locked to the system clock.  One would need a way to measure the phase offset
>> of the USB S-o-F vs the system clock, and then it's a standard process to
>> phase lock, with the necessary control to do this described above.
> 
> The catch is that getting the frame lined up doesn't provide you with any info
> about the offset.  (I'm assuming we have something like a RS-232 to USB setup
> with the PPS signal connected to one of the modem control signals - Carrier
> Detect is the most popular.)
> 
> If you have a knob to slew the phase of the USB signal, and things are stable,
> you could move the USB signal so that it is exactly lined up.  Then noise in
> the system would make half the samples come up "no" and the other half come up
> "yes".  That probably depends on something like the noise being large relative
> to the stability of the system.  (You could add artificial noise.)  If things
> aren't that stable, you can steer the USB timing back and forth to bracket the
> PPS signal.
> 
> It all seems much simpler to put a counter in the USB device to measure the
> time between the PPS and the poll.  That actually sounds like a fun hack.
> Does anybody have a favorite dev board with a CPU and USB that would be
> appropriate for doing that?
> 
I use teensy boards (pjrc.com) for this kind of thing (Arduino sort of, 
but much, much more - much faster processor with more resources, and 
physically smaller).

I've used Teensy 3.1s and 3.2s  - but a Teensy LC for $12 might do it.
https://www.pjrc.com/store/teensylc.html

lots of timers on the chip.  You can in fact, run it off an external 
clock, although if you change from the native frequency, the USB 
interface won't work (but it is conceivably reprogrammable to make it work)


An Arduino might also do it.

Both have serial ports and USB interfaces.






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