Rasp Pi at +/- 1 us from GPS
MLewis
mlewis000 at rogers.com
Sun Nov 26 19:33:26 UTC 2017
I thought people working on having a Rasp Pi as a Time Server
would/should be aware of pps-client.
My Rasp Pi 3 is running software (pps-client) that uses GPS PPS and
seems to be meeting the goal of maintaining system time to +/- 1 us.
How I got there:
- I got a Raspberry Pi 3 running Raspbian Stretch.
- Installed a DS3231 RTC on the I2C. (remote by leads, wrapped in
insulation, it and the Pi in a metal tea-box with five of six sides
insulated)
- I disabled Stretch's simple stripped down client-only NTP replacement
with timedatectl so it's: synced no, NTP no, UTC yes.
- I installed Lady Heather 5.0, but I couldn't get it to recognize the
USB feed from my GPS (which it was happily doing on a Win 7 box).
- Mark Sims sent me a newer zip and some hints on identifying ACM type
devices.
- GPS (uBlox NEO-M8T) is set to a fixed survey position and is feeding
messages to Lady Heather through USB as id=/dev/ttyACM0 and Lady Heather
is happily producing graphs & maps.
- Lady Heather is set to force system time to the GPS message time if
System Time is off by more than 300 ms. This sets system time to a whole
second.
- I found pps-client, which disciplines System Time to TOS with the GPS
PPS. https://github.com/rascol/Raspberry-Pi-PPS-Client
- (if I understand properly) pps-client takes a pair of GPIO pins and
calibrates latency, so its PPS adjustment is more accurate.
- pps-client installed as expected. One gets the Stretch source and
compiles the kernel as part of that.
- pps-client wouldn't run without NTP in play.
- So I trivially modified pps-client to skip checking for NTP and
disabling/re-enabling NTP.
https://github.com/rascol/Raspberry-Pi-PPS-Client/issues/1
- pps-client now ran.
- pps-client -v displays the "status printout", showing that in around
ten minutes it was reporting jitter as single digit us. avgCorrection is
typically 0.00000, -0.016667 or -0.033333, occasionally 0.016667 or
0.033333 us. My "status printout" looks nearly identical to the example
in the pps-client README.md.
- after running overnight, reported jitter is typically between -2 and
+3 us, with a regular odd value in the mix ranging between -5 and +10 us.
I haven't figured out how to collect data for graphs yet...
I don't know how to measure if pps-client is doing what it says it is...
I hope to be able to install NTPsec:
- as a time server
- leaving system time alone
- reading/referencing system time (as disciplined to 1us by pps-client)
- providing polling to my local network through Pi's stupid USB
controlled Ethernet...
I hesitate to install NTPsec as I don't know if it will blow away
anything needed for pps-client.
Someone else may be, or may be interesting in, trying pps-client out.
Michael
More information about the devel
mailing list