• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Raspberry GPS based time server

Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
11 Posts 6 Posters 1.9k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    Ramosel
    last edited by Ramosel Sep 12, 2023, 7:30 PM Sep 12, 2023, 6:33 PM

    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!!
    NTP status.jpg

    M K 2 Replies Last reply Sep 13, 2023, 11:27 AM Reply Quote 4
    • M
      Misterb @Ramosel
      last edited by Misterb Sep 13, 2023, 11:30 AM Sep 13, 2023, 11:27 AM

      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.

      ntppi.png

      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.

      R 1 Reply Last reply Sep 13, 2023, 1:31 PM Reply Quote 2
      • R
        Ramosel @Misterb
        last edited by Ramosel Sep 13, 2023, 1:35 PM Sep 13, 2023, 1:31 PM

        @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?

        M 1 Reply Last reply Sep 13, 2023, 1:53 PM Reply Quote 0
        • M
          Misterb @Ramosel
          last edited by Sep 13, 2023, 1:53 PM

          @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.

          R 1 Reply Last reply Sep 20, 2023, 3:46 PM Reply Quote 0
          • R
            Ramosel @Misterb
            last edited by Sep 20, 2023, 3:46 PM

            @Misterb

            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

            1 Reply Last reply Reply Quote 0
            • B bingo600 referenced this topic on Sep 20, 2023, 5:08 PM
            • R Ramosel referenced this topic on Sep 20, 2023, 5:25 PM
            • R
              ronv42
              last edited by ronv42 Sep 21, 2023, 10:56 AM Sep 21, 2023, 10:54 AM

              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)

              Adafruit Hat

              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.

              47ebc1c6-3523-4fce-8a69-aafacfaf0957-image.png

              R 1 Reply Last reply Sep 21, 2023, 2:02 PM Reply Quote 0
              • R
                Ramosel @ronv42
                last edited by Sep 21, 2023, 2:02 PM

                @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)

                Adafruit Hat

                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

                R 1 Reply Last reply Sep 21, 2023, 3:21 PM Reply Quote 0
                • R
                  ronv42 @Ramosel
                  last edited by ronv42 Sep 21, 2023, 3:25 PM Sep 21, 2023, 3:21 PM

                  @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
                  
                  1 Reply Last reply Reply Quote 0
                  • R
                    roye36955
                    last edited by Oct 13, 2023, 1:13 PM

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • R Ramosel referenced this topic on Oct 13, 2023, 4:00 PM
                    • D
                      dipalisingh
                      last edited by Dec 5, 2023, 5:20 PM

                      thank you for your explanation

                      1 Reply Last reply Reply Quote 0
                      • K
                        kooveeon @Ramosel
                        last edited by Jun 23, 2024, 1:08 AM

                        @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

                        1 Reply Last reply Reply Quote 2
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                          This community forum collects and processes your personal information.
                          consent.not_received