Setting atomic-clock precise time on your Pi
We all assume that our devices and computers all keep accurate date and time, but when was the last time you looked at the clock on your computer and asked, “I wonder if that time is correct?”
Often computers use the Network Time Protocol (NTP) from an internet time source to synchronise their time. In this tutorial, we’re going to examine a system for establishing accurate time without an internet connection. We will assemble a global positioning system (GPS) receiver using a Raspberry Pi and take advantage of the accurate time signals that are broadcast by GPS satellites.
Establishing a GPS reference time source is a complex task so we’ll break the task down into some manageable parts. First, we’ll install an Adafruit GPS Receiver HAT and configure the software. Second, we’ll examine the output signals provided by the receiver and take advantage of the GPS supplied tools to tweak the receiver for obtaining accurate time. Finally, we’ll configure a daemon service that uses the GPS signals to ensure the computer’s system time is accurate.
A reliable time source used as a reference could be an atomic clock or the master clock on a GPS receiver. NTP uses a stratum levels to organise the hierarchy in a time servers network. A Stratum 0 device is directly connected to a
You’re reading a preview, subscribe to read more.
Start your free 30 days