This DIY Time Server Is More Accurate Than You Need

You almost certainly don’t have an application for the sort of accurate timekeeping that’s made possible by this enhanced version of [Cristiano Monteiro]’s satellite-backed time server. By his own admission, the vast majority of users will be more than happy to have their system’s time synchronized by the traditional Network Time Protocol (NTP). But if you’re really chasing those last few microseconds, that’s where the Precision Time Protocol (PTP) comes in.

With NTP, you can get within 10 milliseconds or so of your upstream time source — but PTP is accurate down to nanoseconds. Unless you’re performing some kind of scientific research, running a robotic assembly line, or perhaps doing high-speed financial trading, there’s no reason for this level of accuracy. In fact, PTP is such a niche technology that until the release of the ESP32-P4, [Cristiano] couldn’t even find an affordable enough chip that supported it.

Hardware-level support for PTP is important as there’s no way to achieve this level of accuracy with software alone, the capability needs to be baked into the Ethernet controller. As you might expect, it takes a highly accurate time source to make the most of PTP, and that’s where the navigation-grade Global Navigation Satellite System (GNSS) receiver comes in. All told the cost of the build is unsurprisingly higher than that of its predecessor, but [Cristiano] says it’s still a couple zeros shy of what a commercial offering would run.

As with his original time server from 2021, [Cristiano] made sure this build was as friendly as possible for hackers and makers. We especially like the 3D printed case designed in OpenSCAD, and his insistence that the gadget have a front panel with blinking status LEDs. Again, the vast majority of us don’t need our clocks to be accurate down to the nanosecond…but it’s nice to know we have the option.

25 thoughts on “This DIY Time Server Is More Accurate Than You Need

  1. To be honest PTP has a lot more use cases..For example Grid communication over IEC 61850 GOOSE it is a requirement. The build cost is quite impressive and i am tempted. I have wanteda cheap PTP for a while. the closest we have come to so far is the timecard (https://www.jeffgeerling.com/blog/2021/time-card-and-ptp-on-raspberry-pi-compute-module-4/), but that is still quite expensive since it requires an atomic clock. Connecting to GNSS is a good idea as long as you can get a clear view of the sky

    1. Hi! Maker/Author here!!

      Feel free if you need support implementing my build.

      One thing I did in this build that I didn’t in the previous one (the NTP/RDATE box) was to force the GNSS module into stationary mode. Some GNSS chips will allow you to configure some parameters to instruct the chip that it is in a stationary position and not in movement, and all the computing should be dedicated to timekeeping. This should shave a few nanoseconds and make the machine even more accurate.

      So far I could identify only one low cost GNSS chip with such capability for which a genuine one can be acquired on the usual places with little trouble, it’s mentioned in the article. Feel free to reach me so I can point you right. The machine will take the first 15 minutes (configurable) calibrating itself for this fixed position and commit that to the module RAM and assume you will not move it anymore. To restart the calibration you need to reboot.

      Still finishing the PTP slave code and will upload it soon, so, recommend you to acquire at least two of the mentioned ESP32-P4 boards if you don’t have a PTP client immediately at hand to test your Grandmaster against.

      Regards,

      Cristiano

    2. The cost for entry for hobbyists is coming down for sure.
      There are a few different options for smaller-scale PTP depending on how much you want a solution vs a project.

      The Timecard solution with the CSAC oscillator is amazing but expensive.

      The step down would probably be something like an E810 timing nic.
      https://scottstuff.net/posts/2025/06/10/timing-conclusions/

      Anything below here will likely have less precise oscillators, so you would likely see drift during holdover events if/when you lose your GNSS reference. In theory it should be acceptable if you configure all of your devices for a single timing source, because even if you have drift all of your clocks should be held in sync with each other even if not necessarily with an external reference such as GNSS.

      The Switchberry is a great self-contained lab product to give you a timing solution and switch.
      https://www.tindie.com/products/timeappliances/switchberry/

      If you want to do more DIY, you can bring the cost down much more by using a timestamping nic and a good quality GPSDO.
      https://www.leobodnar.com/shop/index.php?main_page=product_info&cPath=107&products_id=399

      Solarflare makes a couple that are licensed for PTP. The older 6322F/7322F models or 8522-Plus models.
      Intel i210 nic is a great low-cost solution that also supports a PPS input if you configure the SDP.
      And Microchip makes a dev board nic that has nice SMA connectors on it.
      https://www.microchip.com/en-us/development-tool/EVB-LAN7430

      There are also more cost-effective switches with Mikrotik having some options, specifically the CRS326-24G-2S+
      https://help.mikrotik.com/docs/spaces/ROS/pages/64127015/Precision+Time+Protocol
      I have read that FS.com has some PTP industrial switches (IES3100) but I did not do much research into them as the formfactor is not great for me and some models do not support all PTP clock modes.

      If you are doing any PTP experiments, you will likely want to keep your timing network separate and free of normal network traffic unless you have found some success stories using your chosen switch.

  2. Quite a coincidence, I just started building very similar thing: NTP server and 25 MHz GPS disciplined oscillator for Q0-100 ham radio station. The most mundane stack: Esp32 Ethernet module, neo10 from AliExpress and Platformio. I’ll gladly hear tips from people experienced in this area.

  3. [Cristiano] couldn’t even find an affordable enough chip that supported it

    I’ve been doing PTP on AM335x and SAM E70. Both have hardware support for timestamping of PTP ethernet frames. Not affordable enough?

      1. NXP also have some parts that do it on the built in MAC; Kinetis K60 and K66.

        (Probably more to be honest, they are making a big effort into the connected vehicle space and Time-Sensitive-Networking is all based on the same hardware timestamping concepts.)

  4. … accurate down to nanoseconds. Unless you’re performing some kind of scientific research, running a robotic assembly line, or perhaps doing high-speed financial trading, there’s no reason for this level of accuracy.

    I can see this being useful for SDR (Software Defined Radio), where you have multiple SDR devices and want to use Trilateration to calculate the position of a transmitter. 1 nanosecond could be within ~30 cm (~1 foot).

    I could see it being useful in a prison to locate active mobile phones.

  5. Back in time, people used to have radio-controlled clocks if they needed precise time.
    There were PC dongles for serial port, for example.
    They’ve received the pulses of, say, DCF-77 time station.
    A DOS TSR driver then decoded the time signal’s pulse on a V.24 data pin and kept the DOS clock in sync.
    For Windows for Workgroups or Windows 95, there were separate drivers.
    That was also useful servers running Novell NetWare et cetera.
    I remember, an intelligent parallel port version sold by ELV (?) with an LC display existed, too.
    These were such sophisticated times, I miss them.

    1. Hi Joshua! Maker/Author here!

      Oh man! That is so cool, wish I had the chance of playing with that on a computer.

      Unfortunately I don’t have a time syncing station in my part of the world (I live in Brazil), but I remember when I was in US I had a CASIO watch that could sync automatically against the Forth Collins tower, even though I was in NJ!!

      It was a beautiful thing to watch, I only needed to find a clear spot near the window and observe the syncing happening.

      Heard these time towers will be deactivated, too bad man too bad…

      Have a great day,

      Cristiano

  6. Cristiano: That’s a genuinely good piece of writing. It’s clear you architected the article, but I strongly suspect AI help in massaging it: I (and I’m sure others here) would be really interested in your workflow to produce that.

    (the project is great too!)

    1. Hi Paul!

      Yes, as I say in the article, AI was of great help both in bringing to life in weeks something that would probably take months in my hands, keeping the same quality, as well as polishing the corners on how to convey the message to a diverse audience once I was ready to publish it

      In the case of the article, I produced a text focused on what I think would be understandable by a broad audience (knowledgeable and non-knowledgeable people in the subject and surrounding body of knowledge), submitted to the AI proposing the different target audiences I intended to reach, and asked if the text would be clear or not. It proposes changes (AIs ALWAYS have something to say… talkative crowd…), some really bad, other changes really good, at least in my view. I, then, incorporated the ones I felt contributed to make the whole thing more understandable (or not, a lot of times I think my version was better), and that’s it.

      I know that it’s a dry topic that will fly over the head of the majority of people (a GNSS synced nanoseconds capable time server?? What are you talking about???), so I tried different approaches to make the text more attractive and understandable.

      Some comparisons with daily real world stuffs, a bit of humor, being candid about the joys and difficulties of the project, etc.

      This time and age we have a powerful tool that came to last, the AI, and I’m taking it for a ride to see how far we can go with it in different fronts. So far several good experiences and some really bad ones. We will see in the future where we arrive after this initial shock wave.

      Thanks and feel free to contact me if you need additional info!

      Regards,

      Cristiano

  7. What timing 😜 I just spent the afternoon standing up an old Meshtastic T-Beam as the all in one GPS NTP AP Gizmo. Lord knows many of us have those kicking around. They even have PPS tied to a GPIO. Can’t imagine the use case for Meshtastic for that. Learned that DHCP option 42 is for the NTP server IP address. What will they think of next?

  8. Beyond “just” a PTP server this project enables you to do so much more. Clean PPS signal is quite valuable. Feed it into a Si5351 module with Erik Kaashoek code and you have 10MHz reference for your lab. Take the GNSS stream from the module (amazing value BTW, the cheapest dual band GNSS module that I have seen) and create your own NTRIP base station and share it with the world. 2 of these coupled with a PTP compatible Mikrotik router/switch + TinyPFA firmware for your NanoVNA: weeks of fun experiments and troubleshooting ;) I will stop geeking out now :)
    Congrats, and 73s to Christian from YT land, for an amazing project.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.