Nanosecond clock sync with a Raspberry Pi

preview_player
Показать описание
What is a second? And what does that have to do with the Raspberry Pi CM4 and IEEE1588-2008? And why should you care?

Mentioned in this video:

#RaspberryPi #PTP #TimeCard

Contents:

00:00 - What is a second?
00:32 - Time is too expensive
01:29 - PPS and WWV
02:56 - PPS on the Pi CM4
04:19 - Precision Time Protocol
06:09 - PTP Demo
08:16 - A radioactive PCIe card
10:35 - CM4's time has come
12:21 - How important is time?
13:27 - A Time Server for your Homelab?
Рекомендации по теме
Комментарии
Автор

The official abbreviation for Coordinated Universal Time is UTC. This abbreviation comes as a result of the International Telecommunication Union and the International Astronomical Union wanting to use the same abbreviation in all languages. English speakers originally proposed CUT (for "coordinated universal time"), while French speakers proposed TUC (for "temps universel coordonné"). The compromise that emerged was UTC, [6] which conforms to the pattern for the abbreviations of the variants of Universal Time (UT0, UT1, UT2, UT1R, etc.).[

nomadelog
Автор

Having worked on PTP professionally, I know that a few years ago big players used to charge $1, 000, 000+ to license the software for the algorithm that does the synchronization. Then it would still take many months of work to integrate it into a working product. The fact that this is open source is awesome!

_winston_smith_
Автор

Glad to see you and Dr. Byagowi debunking the radioactive hype. Looks like the average Rubidium oscillator consists of 160 picoCuries of radioactivity. For comparison, your average banana measures in at 520 picoCuries. And you *really shouldn't be eating* any Rubidium oscillators you find lying around.

During undergrad physics we did a ton of experiments with radioactive button sources and a few using our college's very own neutron source. At the beginning of every lab we were given a safety lecture about the proper way to handle... the bricks of lead we were using for shielding, because those were the real health hazard.

GSBarlev
Автор

They should have more of those WWV type of transmitters all over the US and force auto makers to tune into it for turn signal flashing. No more sitting at red lights watching a bunch of flashing lights sync and unsync.

timramich
Автор

I have used PTPv2 in wind tunnels, where multiple computers record audio signals from a few hundred microphones. The data is all timestamped, which allows software post-processing to calculate where certain sounds came from. The same effect as a dish that your would physically move. For this to work well, you want nanosecond-scale accuracy.
And since wind tunnels are generally large metal structures, running a GPS antenna for each computer is not preferable.

RoelBaardman
Автор

I've run Stratum 1 servers from RPi 3s for a few years. While testing code for NTPsec, I had a group of 4 fed from the same antenna with carefully crafted cables to ensure that signal path was the same for each device. This was used to experiment with convergence differences between different NTP solutions.

Also, my first professional presentation was on time synchronization using xntpd as one of the options. I also have code that is part of that project for adjusting the time in the kernel to reduce drift, basically adjusting the value of each 'tick' to account for the variance in the systems base oscillator.

YeOldeTraveller
Автор

The T-shirt was well Co-ordinated also... ;-)
My first job as a sysadmin 30 years ago was setting up and managing xntp on our network, so this takes me way back. Back then you had to ask permission to have our servers "ping" off of a university's stratum 1 clock over in the next province. It's fascinating to learn how NTP is not accurate enough these days. But wow, a Stratum one clock for so cheap sounds amazing.

And no, it did not impress the ladies back then either. 😆

Wordsnwood
Автор

I did an internship at a telecom company, every piece of lab equipment (network switches, oscilloscope etc.) was modded to be able to use the same clock signal via bare (coax) cabling.

ewout
Автор

Jeff, On that scope you can use Measurements to measure time between the two pulses so you don't have to count ticks. You can also use Cursors to manually get a time delta by placing one cursor on one pulse and the other on the other pulse. Measurements and Cursors are very powerful tools in the scope and it's well worth the time to learn how to use them. Best wishes.

jays.
Автор

We use ptp to coordinate audio and video over a network in the Audio Visual field. It allows us to get video walls synced up for making sure they are frame accurate. We actually don't care about the exact time just that all the device are synchronized. It also means we have to use somewhat specialized switches that support QoS and non-blocking.

Dpoleproductions
Автор

It's about time!....to watch Jeff Geerling!

MarcoGPUtuber
Автор

As someone who went through the hassle of researching and waiting until I could snag a good deal on a used enterprise GPS clock, I'm stoked to see how accessible accurate NTP / PTP sources are becoming for the home lab community now. (Yeah, you're not the first, and neither was I, but hey, it's a cool club, and we're happy to welcome you!)

I want to warn anyone who's eyeing old enterprise gear, make note of how long it's been end of life, check whether you can get firmware updates without a[n expensive] support contract, and verify that it was updated recently enough to handle the GPS Week Number rollover on April 6, 2019. The oldest and most affordable stuff out there cannot, so it's basically useless, and the gear that's new enough to still work is not as affordable as it should (IMHO) be. Caveat emptor, and whether you go refurbed enterprise or DIY, happy timekeeping!

JoshLiechty
Автор

This video is a godsend. I am currently working on a project where positioning is determined based on Time Difference of Arrival between two signals. Even though the project is in very early stage and we don't need perfectly synced devices right now, but eventually we'll need it. Else nothing will work.

Thanks for making a video on this topic. It'll definitely help me immensely.

avramitra
Автор

I get pumped when I see a Geerling notification in my feed. I know I'm gonna learn something cool.

flynn
Автор

Got many CM4's on order, in the meanwhile, the sun is out today so the master clock in the garden (sundial) is all we have! PS, black for signal and yellow for ground???

HeadBoffin
Автор

I made a gps based ntp server with my old pi a few years back. it used the PPS on that gps chip. It was fun

awesomefacepalm
Автор

Nice job on finding yet another Raspberry angle on something I didn't know anything about!
I loved the vibe and enthusiasm of Ahmad!

fredrik
Автор

What a strange coincidence. I saw recently that VMware 7.0 supported PTP as a time sync source, which led me down the rabbit hole of all this stuff. Very cool video!

TrippSC
Автор

Great video as always Jeff, but I have to admit that for me the star of the show was the shirt you're wearing - I want one of those!

Dronebotworkshop
Автор

Fascinating. I love all of the things you can do with a RPi. Great video!

martyb
visit shbcf.ru