logoalt Hacker News

m463today at 3:27 AM0 repliesview on HN

I did went GPS+ntp route.

I have a few raspberry pis on my lan that serve NTP time. (you need more than one)

Over the years I've experimented with various flavors.

Right now I have a mix:

1) a pi3 with a gps hat and a battery backup for the pi itself. It uses ntp 127.127.20.20 for gps time, and 127.127.20.28 for PPS. The SMA antenna goes to receiver at the window

2) a pi3 with USB gps on a cable going to the window

3) a pi4 same as above, but with a tiny battery backup rtc attachment

4) a pi5 with usb gps + the new RTC with an added rechargable battery backup

usually, when power goes out, a few reboot, but #1 stays up if <1hr without power. If power outlasts the pi with battery backup, the RTC battery backups take over. strangely #1 doesn't reboot when it has power, some artifact of the battery backup hat - I have to manually reset it.

I've also kind of wondered if GPS might be able to give you a time less accurately but quicker. Sometimes I look at the NMEA GPS output, and it sometimes doesn't have a position fix, but it does give out a time + week number

(this is all for no good reason, just yak shaving.)