Raspberry GPS based time server
-
I have a recommendation if anyone is looking to build a GPS driven Stratum 1 time server. I came across some information on a Brit company, Uputronics, building a self contained Pi-hat for GPS with RTC and PPS (it also has super caps for some time retention over short outages). So I went looking for builds that supported this device. There are a few out there, but with updates to the base OS and the Time Server software, I found most had problems. Anyway, after working with the author on one of these problems I now have a working time server with PPS that gets 2digit ns time resolution. He has corrected his build doc accordingly. I used a Raspberry Pi 4, model b with 2GB of ram but it would easily work on a 1GB model. It's based on DietPi OS and uses Chrony. You can get it up an running in minutes. The Uputronics GPS hat for Raspberry Pi seller is in England but they have a US distributor, AirSpy. The hat uses a u-Blox M8/8 GPS chip and you can configure it via u-Blox u-Center software. I dropped off the GLONASS stuff as their time components suck. I added Gallileo.
If you are interested, the build doc is on GitHub: Kreeblah
It works!!
-
Eighteen months or so ago I bought myself a Raspbery Pi 4 and one of the Uputronics hats with a view to doing exactly what the link in this post gives instructions for. I struggled quite a lot to find instructions with all the dots joined up to do this, but eventually cobbled something together and then put it to one side intending to tidy everything up and write some clear instructions of the steps needed. Of course this never happened and the hardware has just been sitting on my desk doing nothing ever since. When I saw this post my enthusiasm was rekindled and a couple of hours later, bingo, I was up and cooking with gas.
I must take my hat off to Kreeblah, the guide to getting this set up is well laid out, thorough and an example to others who might aspire to writing guides.
-
@Misterb Awesome, glad it got you going. PiShop sells two versions of their HighPi case that will enclose the Raspberry Pi and the Uputronicss hat. Their new "Pro" version is a bit longer and allows you to add a fan. Fortunately, the folks at Uputronics build their hat with a pass through header so if you pick up a header extender with longer pins, you can run it all in the same case... you do have to drill a small hole for the SMA connector in the lid.
Just curious... what version of the Uputronics hat do you have?
-
@Ramosel said in Raspberry GPS based time server:
Just curious... what version of the Uputronics hat do you have?
I bought the Uputronics Raspberry Pi GPS HAT with RTC Rev 6.1.
-
I still say the Kreeblah build is the easiest to get up and going... and he responds to questions and concerns. It works.
But, if you really want a cut down, time only version of this package, take a look at Phil Randal's blog. One other feature is that he allows configuration of the GPS sources from configuration parameters on the Pi and not having to run the u-Center software on the hat removed from the pi.
http://www.philrandal.co.uk/blog/archives/2019/04/entry_213.html
Rick
-
-
-
I have been running PI's as time servers for about 3 years as a project between myself and my son for robotics. I too had to cobble together info from about 10 different blogs and posts to get mine to work. I am using the Adafruit GPS hat (you have to solder the pin header in place)
I used a PI3 as my build and prototyping system and the a PI4 for my production time server. I put the antenna in the attic and then used a splitter to share the antenna with with both PI's.
I think the hardest part was building the latest versions of GPSD and NTPsec from source since the repositories for the PI's at the time had older versions that had issues with PPS and large NMEA sentence blocks.
-
@ronv42 said in Raspberry GPS based time server:
I have been running PI's as time servers for about 3 years as a project between myself and my son for robotics. I too had to cobble together info from about 10 different blogs and posts to get mine to work. I am using the Adafruit GPS hat (you have to solder the pin header in place)
Very cool. I had the same Adafruit GPS hat in my cart for a year while I was waiting for them to get RPi 4s back in stock... I mentioned this project to a friend and he told me about the Uputronics hat. He had a ver. 5.9. The version I could buy was a 6.3 which has a USB header that allows you to run and configure the hat independently via u-Control software. Wisely, they trapped it behind the interface blocks so you can't run it on the Pi and the USB at the same time. Fortunately, Uputronics has a US based distributor (AirSpy.us), so the shipping costs and delivery time were very convenient.
Since you mentioned yours is in the attic... how much offset time do you use per foot of antenna cable? From my notes a few years back I had written down it should be 4ns/ft... not that it will make much difference.
Rick
-
@Ramosel said in Raspberry GPS based time server:
Since you mentioned yours is in the attic... how much offset time do you use per foot of antenna cable? From my notes a few years back I had written down it should be 4ns/ft... not that it will make much difference.
Well the tuning of the offset took a interative cycle of 7 day intervals at the start. Then I used 30 day data to come up with what I have now. I do audit every 90 days and adjust as needed. I didn't use a length of cable because inconsistent NVP when going from quad shield to RG316 and factoring in the splitter. Below if the GPS time offset, I have cycled though in the last year.
#refclock shm unit 0 refid GPS maxpoll 2 time1 0.220 #refclock shm unit 0 refid GPS maxpoll 2 time1 0.2764 #refclock shm unit 0 refid GPS maxpoll 2 time1 0.2843 #2/26/2023 offset time -19.742 #refclock shm unit 0 refid GPS maxpoll 2 time1 0.304042 #3/6/2023 offset time -12.334 ms #refclock shm unit 0 refid GPS maxpoll 2 time1 0.316376 #6/27/2023 offset time -75.606 ms #refclock shm unit 0 refid GPS maxpoll 2 time1 0.391982 #7/31/2023 offset time 21.632 ms refclock shm unit 0 refid GPS maxpoll 2 time1 0.37035
-
This post is deleted! -
-
thank you for your explanation
-
@Ramosel
Thanks for the info. I got my Pi4B with Uputronics GPS hat plus PoE hat working fine. I'm using mine for GPS NTP server in a closed network for surveillance system.
Regards, Mark