Absolutely Epic #HowTo: Configure #RaspberryPi for Stratum-1 Network Time Protocol #piday @Raspberry_Pi

time server for any project, you might think to use a Raspberry Pi to serve your purpose. But where to begin? Yes that is an older Raspberry Pi Model B, but this epic 15K+ word write-up over at satsignal.eu is a great place to begin configuring your NTP server.

From graphs recording GPS signals in different temperature environments and locations to configuring and checking software settings in your setup, NTP is absolutely essential for clock synchronization across networks like the Internet. And this how-to will get you within a few milliseconds of your timekeeping needs.

As an experiment, I purchased one of the low-cost credit-card-size Raspberry Pi computers, and have configured it to run NTP (Network Time Protocol). I have also used this board with a GPS receiver with pulse per second (PPS) output to make a stratum-1 NTP server, but as I know little of Linux, it has taken some time to achieve this aim! There are some helpful Linux commands scattered throughout this page. These notes are almost as much for my own records for the next time I need to visit this project, but I hope they may be helpful to others.

I start by describing how to get the Raspberry Pi running with just a LAN connection – no display, keyboard or mouse – a so-called headless operation. I then describe how to configure NTP for your environment, and adding a GPS/PPS receiver to convert your box into a stratum-1 NTP server including the operating system updates needed. Next, I note a couple of problems I had with the first GPS receiver I tried, and how I cured those with a different GPS receiver to produce a stratum-1 NTP server consuming about 4 watts.

Note that good performance is dependant on the GPS unit having a clear view of the sky, particularly the southern part of the sky if you are in the northern hemisphere. With older GPS receivers this required an outdoor antenna, but more modern units such as those mentioned here may well work indoors providing that some sky is visible, perhaps on the top floor of the building (as I am). If you have an “RF-proof” roof (lead-lined, perhaps?!) or certain windows with a lining to stop incoming heat, or wall construction including metal, you may still need an outdoor antenna, and almost certainly if you live in a basement! Whilst weather will normally have only a small effect in the signal – e.g. heavy rain – it’s possible that a layer of snow could attenuate the signal enough to stop the GPS receiving enough signal. Monitoring performance may help you spot these problems. (Thanks to Joe, HB9DRT for the information on snow – I’ve only seen that problem once here during an exceptionally cold winter).

Read much, much more.


Featured Adafruit Products!

NewImage

Adafruit Ultimate GPS Breakout – 66 channel w/10 Hz updates – Version 3: The breakout is built around the MTK3339 chipset, a no-nonsense, high-quality GPS module that can track up to 22 satellites on 66 channels, has an excellent high-sensitivity receiver (-165 dB tracking!), and a built in antenna. It can do up to 10 location updates a second for high speed, high sensitivity logging or tracking. Power usage is incredibly low, only 20 mA during navigation. Read more.


Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7:30pm ET! To join, head over to YouTube and check out the show’s live chat and our Discord!

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 38,000+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython – The easiest way to program microcontrollers – CircuitPython.org


New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — New Products 11/15/2024 Featuring Adafruit bq25185 USB / DC / Solar Charger with 3.3V Buck Board! (Video)

Python for Microcontrollers – Adafruit Daily — Python on Microcontrollers Newsletter: A New Arduino MicroPython Package Manager, How-Tos and Much More! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

EYE on NPI – Adafruit Daily — EYE on NPI Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

Adafruit IoT Monthly — The 2024 Recap Issue!

Maker Business – Adafruit Daily — Apple to build another chip at TSMC Arizona

Electronics – Adafruit Daily — SMT Tip – Stop moving around!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !


No Comments

No comments yet.

Sorry, the comment form is closed at this time.