Absolutely Epic #HowTo: Configure #RaspberryPi for Stratum-1 Network Time Protocol #piday @Raspberry_Pi
If you’re looking to build a primary 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).
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.
We are angry, frustrated, and in pain because of the violence and murder of Black people by the police because of racism. We are in the fight AGAINST RACISM. George Floyd was murdered, his life stolen. The Adafruit teams have specific actions we’ve done, are doing, and will do together as a company and culture. We are asking the Adafruit community to get involved and share what you are doing. The Adafruit teams will not settle for a hash tag, a Tweet, or an icon change. We will work on real change, and that requires real action and real work together. That is what we will do each day, each month, each year – we will hold ourselves accountable and publish our collective efforts, partnerships, activism, donations, openly and publicly. Our blog and social media platforms will be utilized in actionable ways. Join us and the anti-racist efforts working to end police brutality, reform the criminal justice system, and dismantle the many other forms of systemic racism at work in this country, read more @ adafruit.com/blacklivesmatter
Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.