EEVblog Electronics Community Forum

Electronics => Metrology => Topic started by: linux-works on June 12, 2019, 04:37:43 am

Title: any diy PTP/ieee1588 grandmaster clock builds? (high precision 'ntp' like)
Post by: linux-works on June 12, 2019, 04:37:43 am
for a project at work, we need to get high precision network time.  the standard for us will be PTP (ieee 1588 v2).

I've seen (and built) an ntp rasp pi server that uses gps and pps.  that was a fun build.

from what I understand, the precision time clock for PTP is held in the network card (nic).  is that always true?

I do see some linux opensource PTP code and I'm wondering if anyone tried building one and how it compares to commercial grade GPS-DO based network master clocks?

so far, I'm thinking the only special hardware I need is a pps-enabled gps module, a way to send the pps into the kernel (serial DCD/DTR line?) and buying a 1588 capable NIC (intel i210 I think can do it).  but there are probably details I'm not seeing.

any experience in this, from a DIY pov?
Title: Re: any diy PTP/ieee1588 grandmaster clock builds? (high precision 'ntp' like)
Post by: jbb on June 12, 2019, 05:47:55 pm
I haven’t done it myself, but I believe that if you want real precision time you buy a GPS time server which does the most critical PTP master in hardware.

You could have a look at the White Rabbit stuff from CERN? It’s open source and bonkers precise/accurate. As it’s open source you can go in and look at how they did their PTP stuff.
Title: Re: any diy PTP/ieee1588 grandmaster clock builds? (high precision 'ntp' like)
Post by: ogden on June 12, 2019, 06:24:36 pm
Such way you can't make anything better than NTP you already did. You miss inherent jitter of software/CPU based solutions. 1588 needs OCXO high stability local oscillator and FPGA for processing. In short: buy it.
Title: Re: any diy PTP/ieee1588 grandmaster clock builds? (high precision 'ntp' like)
Post by: dkozel on June 14, 2019, 06:07:55 am
WhiteRabbit is excellent and CERN has posted all of the materials needed to make a commercial grade timing reference. A downside is that all the switches in your network path need to be WhiteRabbit capable as well, which CERN also has designs for. Maybe a bit premature or overkill for a house installation, but doesn't stop me from wanting it!

https://white-rabbit.web.cern.ch/
Title: Re: any diy PTP/ieee1588 grandmaster clock builds? (high precision 'ntp' like)
Post by: LapTop006 on June 16, 2019, 05:06:50 pm
I've worked on building a homebrew high quality SyncE source, but haven't actually gotten to the point of testing that (other shiny projects).

PTP isn't inherently better than NTP, you can do the same sort of hardware assist for NTP, and without the hardware assist PTP is no better than NTP.

If you actually need sub-ms time referencing there's a lot more to it than just time sync, have a read of the Spanner/Truetime paper (https://ai.google/research/pubs/pub45855) for a start.

If I had to use PTP or SyncE, I'd almost certainly start with the White Rabbit project, as, unlike most of the vendors, they've actually got demonstrated results.