Nanosecond clock sync with a Raspberry Pi

  Переглядів 168,287

Jeff Geerling

Jeff Geerling

День тому

What is a second? And what does that have to do with the Raspberry Pi CM4 and IEEE1588-2008? And why should you care?
Support me on Patreon: / geerlingguy
Sponsor me on GitHub: github.com/sponsors/geerlingguy
Merch: redshirtjeff.com
2nd Channel: / geerlingengineering
Mentioned in this video:
- My original Time Card video: • The most accurate Rasp...
- Why is this PCIe Card RADIOACTIVE? (LTT): • Why is this PCIe Card ...
- Time Card (a bit pricey, but if you want it preassembled...): store.timebeat.app/products/o...
- Time4Pi module (not yet for sale): store.timebeat.app/products/g...
- New US Time Standard - NIST-F2 (NIST): • NIST Launches a New U....
- How the Tweezer Clock Works (NIST): • How the Tweezer Clock ...
- GPS III - Focused on the Future (Lockheed Martin): • GPS III - Focused on t...
- How does Britain know what time it is? (Tom Scott): • How does Britain know ...
- WWV Video Tour (ShutterMafia): • WWV VIDEO TOUR: Fort C...
- Meinberg IMS Series clocks: • Meinberg IMS Series (I...
#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?

КОМЕНТАРІ: 536
@nomadelog
@nomadelog Рік тому
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.).[
@JaredConnell
@JaredConnell Рік тому
Like how iso stands for international organization for standardization, sometimes the acronym doesn't match in all languages
@flatiron235
@flatiron235 Рік тому
@@JaredConnell roughly the same reason. Additionally ISO is derived from the Greek word isos, which means "equal". The more you know... 😊
@tissuepaper9962
@tissuepaper9962 Рік тому
I just think of it as "Universal Time, Coordinated" and move on.
@Kalamatee
@Kalamatee Рік тому
UTC stands for Universal Time Coordinate and refers to the baseline that coordinated time is set from (which is why it is represented as UTC+x).
@Kalamatee
@Kalamatee Рік тому
So yes.. the acronym is correct.
@_winston_smith_
@_winston_smith_ Рік тому
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!
@tim-w
@tim-w Рік тому
I can't fathom why people care so much about this.
@_winston_smith_
@_winston_smith_ Рік тому
@@tim-w Do you use a cell phone? Tight synchronization is vital to making the radio network work. There are many other applications, but this is probably the one normal people interact with most often. The electrical grid also relies on tight synchronization, but the transition to digital is happening more slowly as they are ultra-conservative in that industry.
@1boobtube
@1boobtube Рік тому
@@tim-w Making cell phones networks possible. Making GPS possible. Making banking transactions secure. Proving relativity. Calibrating equipment not to mention more serious applied and pure scientific research.
@rjy8960
@rjy8960 Рік тому
@@tim-w I currently have better than 1ns timing jitter between my Grandmaster and switch using PTP and Synchronous Ethernet in my home lab and the GM is accurate to about 40ns of UTC. As has been mentioned, timing is critical in communications systems. It is looking likely that 5G will transition in later specifications to a requirement of 5ns timing accuracy. It is fun to play with but there are absolutely real-world applications for sub-ns timing. In the industrial networking space accurate time is needed for synchronising different parts of a production facility and is provided by industrial field bus systems such as EtherCAT. With standard crystals I’ve had better than 20ns of timing jitter between devices on a network. One of the problems is that the GNSS constellations such as GPS, Galileo, GLONASS etc are prone to blocking so it is common to have multiple Grandmasters which may be 100’s of miles apart for resilience. In the UK there are exercises where GNSS is deliberately blocked and these are listed on Ofcom’s website. IT is also possible to have a GNSS firewall where if the GNSS signal is blocked the timing can be sourced from either another remote GNSS Grandmaster or a local Caesium / Rubidium clock. Accurate time is also critical for trading to track when exactly a transaction is placed and also in cars. Many new automotive applications rely on time for position doing and synchronising RADAR systems for spatial awareness.
@d3vastat0r89
@d3vastat0r89 Рік тому
Oof, this makes me think of how big companies will use open source work, not contribute, and then try to draw away attention from the open source work by rebranding and popularizing their own version that builds on it. I’m thinking about video capture software, that most streamers use. I hope whoever decides to make use of this put in a few of the millions into the work.
@timramich
@timramich Рік тому
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.
@JeffGeerling
@JeffGeerling Рік тому
Hahaha, I actually made a similar comment on a Technology Connections video about turn signal timing :D
@AndreVanKammen
@AndreVanKammen Рік тому
Make the whole city blink in sync, would be a nice sight on a dark night, it would probably reflect in the sky :)
@davidrmcmahon
@davidrmcmahon Рік тому
I love that
@baylinkdashyt
@baylinkdashyt Рік тому
@@JeffGeerling I was just about to mention Alec's clip on this, and you beat me to it.
@gudenau
@gudenau Рік тому
You can just use cameras already in cars for this. :-)
@GSBarlev
@GSBarlev Рік тому
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.
@JeffGeerling
@JeffGeerling Рік тому
I would also recommend against eating bricks of lead :D
@abyagowi7
@abyagowi7 Рік тому
Thank you for the explanation Gilad. It makes me feel more safe playing with these toys :)
@NiklasAuBln
@NiklasAuBln Рік тому
@Astrocat 3D I'm pretty sure he will let us recompile the Linux kernel
@anon_y_mousse
@anon_y_mousse Рік тому
Must be why I glow in the dark, I eat a lot of bananas.
@GSBarlev
@GSBarlev Рік тому
@@anon_y_mousse This issue came up. Person in the class asked if they should be worried about their radiation dose because their significant other's diet was so rich in potassium. Physics professor replied, with a completely straight face, "Well, dosage vs. proximity follows the inverse square law."
@roelesch
@roelesch Рік тому
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.
@jyvben1520
@jyvben1520 Рік тому
large metal structure, like an antenna ? ;-)
@roelesch
@roelesch Рік тому
@@jyvben1520 Like a faraday cage, about 20 meters in height. We try to keep the computers close to the microphones (near the ground) and they're generally standing in the wind (300kph). Running long wires in that environment doesn't seem wise.
@hyperfluff_folf
@hyperfluff_folf Рік тому
What are you using microphones for in a wind tunnel and is it even possible to do acurate audio location when wind is a factor?
@roelesch
@roelesch Рік тому
@@hyperfluff_folf about 50% of aircraft noise comes from the engines. The rest comes from the aircraft itself. Landing gear, flaps, but also small gaps between components. Since noise of landing aircraft is a big factor for airports, manufacturers want to find the sources of the noise. This is generally too complex to simulate with a computer I'm told. You are right that wind is a factor in the propagation of sound. These effects have been modeled, and we apply corrections to our measurements in an attempt to undo these effects. In order to apply the corrections we need to know things like wind speed in the wind tunnel, so these are measured too.
@roelesch
@roelesch Рік тому
@Richard Cranium Yep, where PTP is used you sync after the fact. In general the strategy in measurement systems is to directly store your measurements on disk, unmodified. Wind tunnels are expensive to rent, so you want to have your data to pass through as little lines code as possible. Every line of code is a possible bug, and you cannot recover from bugs in your acquisition code.
@MarcoGPUtuber
@MarcoGPUtuber Рік тому
It's about time!....to watch Jeff Geerling!
@Wordsnwood
@Wordsnwood Рік тому
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. 😆
@JeffGeerling
@JeffGeerling Рік тому
[First date] Would you like to know how accurate my clocks are?
@sonosus
@sonosus Рік тому
My clock's more accurate than any other out there.
@ewout4890
@ewout4890 Рік тому
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.
@YeOldeTraveller
@YeOldeTraveller Рік тому
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.
@HeadBoffin
@HeadBoffin Рік тому
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???
@JeffGeerling
@JeffGeerling Рік тому
Haha I was wondering if someone would notice. I had plugged them in backwards from the pins I thought they were and just left 'em.
@stefanmisch5272
@stefanmisch5272 Рік тому
came here only for this comment 😅
@cb-zh3gv
@cb-zh3gv Рік тому
If you think about it, on a sundial it is black for signal and yellow for ground.
@3Dpoleproductions
@3Dpoleproductions Рік тому
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.
@PsRohrbaugh
@PsRohrbaugh Рік тому
Are they purple switches?
@3Dpoleproductions
@3Dpoleproductions Рік тому
@@PsRohrbaugh honestly for video we end up using the Netgear av line switches. They come in a good range of sizes and configurations preset that's make manufacture specs for encoders and decoders. faster and easier deployment that way.
@JxH
@JxH Рік тому
2:40 Radio Clocks "...will sync-up after a few minutes..." Only locally, from a 'continental' perspective. More-distant locations will have to wait until the wee hours (e.g. 2:00 AM local), when the VLF signal can reach their location.
@StringerNews1
@StringerNews1 Рік тому
Indeed. I currently live in the next state over from where the WWVB transmitter is, and my "atomic clocks" that use WWVB typically need several tries to sync up. The best case is they start at midnight, and finish at 12:04, but it's not unusual to have them trying again at 0100, 0200 ... all the way to 4 AM. When I lived in Chicago, these types of clocks almost never synced up. Too much electrical noise in the city.
@jays.1876
@jays.1876 Рік тому
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.
@JeffGeerling
@JeffGeerling Рік тому
True, true.
@fredrik241
@fredrik241 Рік тому
Nice job on finding yet another Raspberry angle on something I didn't know anything about! I loved the vibe and enthusiasm of Ahmad!
@martyb3783
@martyb3783 Рік тому
Fascinating. I love all of the things you can do with a RPi. Great video!
@flynn3649
@flynn3649 Рік тому
I get pumped when I see a Geerling notification in my feed. I know I'm gonna learn something cool.
@HomelabExtreme
@HomelabExtreme Рік тому
"Maybe i'll be the first homelabber with a time server in my rack" Sorry to break it to you, but that prize was handed out a long time ago, even on a Pi. Running GPS based stratum 1 servers on RPIs has been common for long.
@JeffGeerling
@JeffGeerling Рік тому
What I meant was an atomic-clock-based PTP time server. No other *Pi*-based setup can do that besides a CM4 (and only recently at that).
@avramitra
@avramitra Рік тому
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.
@VincentSaelzler
@VincentSaelzler Рік тому
One of the most unique and interesting videos on the channel so far!
@awesomefacepalm
@awesomefacepalm Рік тому
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
@StringerNews1
@StringerNews1 Рік тому
About 20 years ago, I read the Linux NTP README and discovered that I could buy an obsolete GPS receiver for $25 and a serial cable for another $10 to turn pretty much any Linux box into an accurate NTP server. The hardest part was making a battery eliminator, so I didn't need to keep replacing the AA cells in the GPS receiver. Today you could probably use an old cellphone and a USB OTG cable for next to nothing.
@nulious
@nulious Рік тому
@@StringerNews1 mini pcie and M.2 lte and gps cards exist
@marcogenovesi8570
@marcogenovesi8570 Рік тому
@@StringerNews1 afaik there are GPS/modem modules with serial interface for around 30$ to be used for Arduino, drones and other microcontroller-based stuff
@StringerNews1
@StringerNews1 Рік тому
@@bobbydazzler6990 why are you asking me this? I've never found a 1 Hz tone useful for anything I do, certainly not a replacement for the standard 10 MHz tone carried over a coax cable. I was talking about making an inexpensive NTP server, as was the OP. If you really need to count one second intervals, you could use the phone's clock or something. What exactly is your use case?
@StringerNews1
@StringerNews1 Рік тому
@@bobbydazzler6990 sorry, but I'm not your parents. You're not entitled to my time. You're acting like I owe you something, and that's simply not true. If you want strangers to respond to you, try asking nicely, and learn how to hold a conversation.
@mayankraichura
@mayankraichura Рік тому
Jeff showing off 2 RPi CM4 when it's hard to get your hands on a single one 😂😂
@fram1111
@fram1111 Рік тому
Always great content
@franciscogtome
@franciscogtome Рік тому
Amazing video, Jeff! 💪🏻
@ItsQuintFX
@ItsQuintFX Рік тому
I love videos like this, though this issue in time syncing doesn't affect me personally. I am fascinated by it because the lengths people go to, to perfect solutions like this is impressive and greatly underrated by the majority. I can't help but and geek out about videos like this. Keep up the great content Jeff!
@aleksandertesenkov1421
@aleksandertesenkov1421 Рік тому
Very interesting and very educational. Excellent job Jeff.
@okoeroo
@okoeroo Рік тому
Seriously impressive progress!
@T3chpat
@T3chpat Рік тому
Cool video, never knew time could be managed at home with my own server. When CM4 prices comes down, maybe I'll install it next to my Pi-hole! Thanks again for the video, I only wish you would post more often!
@roguethinker6284
@roguethinker6284 Рік тому
Loved this video. Beautiful , elegant explanations! And to boot on a PI! woooo hooo
@sunfoundermakereducation8590
@sunfoundermakereducation8590 Рік тому
Thank you very much. It was a new experience for me.
@ygiagam
@ygiagam Рік тому
Absolutely amazing - Thanks!
@mzimmerman1988
@mzimmerman1988 Рік тому
Thanks! Very interesting stuff.
@dave_dennis
@dave_dennis Рік тому
Excellent video Jeff. I would love to see a video about the PI’s ability to generate a reference frequency. Not a reference time via a pulse interval. The frequency domain is very important for synchronization of communications. You know as in frequency hopping spread spectrum. If the PI could give us a cheap way to generate an accurate frequency it would enable all kinds of elaborate data exchange at a very low cost. It would be a game changer.
@joeg3950
@joeg3950 Рік тому
Informative and got me thinking (This is where I usually get into trouble)
@TrippSC2
@TrippSC2 Рік тому
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!
@FreshSmog
@FreshSmog Рік тому
Pis are getting more and more useful! I'm never going to get one at this point..
@JoshLiechty
@JoshLiechty Рік тому
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!
@carmakills
@carmakills Рік тому
Love the channel
@UNVIRUSLETALE
@UNVIRUSLETALE Рік тому
This is really interesting, once more available I might get one
@dormantat
@dormantat Рік тому
This is fantastic for me. I have equipment that uses GPS for timing. Last year some of the GPS units stopped working and the equipment defaulted to NTP, which was not accurate enough. I then discovered they could use PTP, but the cost of a server was too much for me. Now maybe I can implement PTP.
@JeffGeerling
@JeffGeerling Рік тому
It sounds like it's _time_ for an upgrade!
@hyperfluff_folf
@hyperfluff_folf Рік тому
@@JeffGeerling ba dum ts xD, good one
@shubinternet
@shubinternet Рік тому
But only if the network switches and other gear actually support PTP. If they don't, then you won't have a way to get the PTP signal across LAN segments so that the clients can talk to the server(s).
@UpLateGeek
@UpLateGeek Рік тому
At work we're looking at using our Cisco ASR routers as PTP GM clocks, with GPS reference. It looks like it's a pretty straightforward setup, so I'm sure there's more than a few CCIE types who would have this set up in their home labs. Granted a couch change raspberry pie is a lot cheaper than a $100K router, but businesses retire these things all the time, and it's not uncommon for equipment to be redirected from the e-waste bin to employees' home labs. (EDIT: Not that I'm speaking from experience.)
@Dronebotworkshop
@Dronebotworkshop Рік тому
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!
@TheCRibe
@TheCRibe Рік тому
Yes Jeff great video you always go beyond the content details I expect too see. Great work!
@MC-emmcee
@MC-emmcee Рік тому
You tease us so much. Most of us will not get our hands on ANY sort of RPi this year (or next, the way things are going). So you may as well do projects with, or educate us on, the hadron collider.
@michael7738
@michael7738 Рік тому
A few years back I had a Raspberry with GPS as the only time source, because that RPi was used outdoors without any network connectivity. I remember extremely good how I struggled to get GPSd and NTPd talking to each other.
@TheTkiller9999
@TheTkiller9999 Рік тому
This is a great post.... I just did something exactly like this... My Pi Hat uses multiple GPS sats to give me +/- 400ns time /date and I use NTP to get it to my networked servers...
@sabyasachitalukdar4314
@sabyasachitalukdar4314 Рік тому
Well thanks for making those board more rare.
@brianscally3439
@brianscally3439 Рік тому
Jeff.. look at the timing features etc for the upcoming WiFi 7. 802.11be includes full QoS and time services so all your wireless devices can also sync.
@JeffGeerling
@JeffGeerling Рік тому
WiFi 7 will be quite interesting. Borrows some features from 5G (which also uses this kind of timing accuracy to get the bandwidth it does).
@asoteunh345
@asoteunh345 Рік тому
Awesome video, thank you!
@pavan13
@pavan13 Рік тому
Tom Scott he's amazing his videos are super informative and easy to understand the bcz the he explains about things in a simple way.
@JeffGeerling
@JeffGeerling Рік тому
He crams a good amount of information into a short video that illustrates what he's talking about very well.
@pavan13
@pavan13 Рік тому
@@JeffGeerling yeah 👍
@IMBlakeley
@IMBlakeley Рік тому
I did some work with small 4g pico cells, the ones outside used GPS for time, the ones inside we fed with PTP from our backhaul radio equipment. That had a GPS and generated the PTP pretty much as the PI is doing, we had a load of interest from companies that wanted the GM functionality and didn't need the radio link. I left soon after, always wondered if it went anywhere was cheap compared to a GM IRO of $1000 IIRC but maximum of 6 slaves, would probably do more but that was all we tested. Somehow the solutions now are going to be way cheaper and this was only 6 years ago.
@JBothell_KF0IVQ
@JBothell_KF0IVQ Рік тому
Jeff ur videos always motivate me to go play with PIs but then I remember that I need to buy some 😭
@PhilipvanderMatten
@PhilipvanderMatten Рік тому
Really cool stuff!!
@ianallaway4964
@ianallaway4964 Рік тому
The Dante audio protocol actually uses PTP to sync all of the audio packets that are traveling over the network.
@temyraverdana6421
@temyraverdana6421 Рік тому
Thanks, an amazing lesson.
@mweilbacher
@mweilbacher Рік тому
Thanks!
@mritunjaymusale
@mritunjaymusale Рік тому
Some guy made this idea work with starlink aswell, so eventually getting the starlink dish and router might throughput PTP through existing LAN cables.
@DrorF
@DrorF Рік тому
You say "Until next time I'm Jeff Geerling", but every time you come back you are Jeff Geerling again! 🤪
@r1asimon01
@r1asimon01 Рік тому
PTP works by using profiles and the size of the network, routers, switches, etc are taken into account with PTP. PTP measures the end to end latency form the client to the PTP server to calculate the loss to maintain time sub microsecond.
@zambonidriver42
@zambonidriver42 Рік тому
PTP is my favorite clock!
@jwillisbarrie
@jwillisbarrie Рік тому
Thanks for adding actual captions for the Deaf
@brenthoadley
@brenthoadley Рік тому
You learn alot from these comments 10/10 video
@scbtripwire
@scbtripwire Рік тому
12:26 "I use this material to pick up girls." "Hey girl, are those clocks atomic? Because you make my heart go tick-tock." I'll see myself out.
@JxH
@JxH Рік тому
For test bench use, a GPS Disciplined Oscillator (GPSDO) can be useful. They're about US100. 'BG7TBL' is one designer. These gadgets contain an Oven Controlled Xtal Oscillator (OCXO), brought into alignment to GPS by a uC. They typically produce plain-Jane digital 1PPS and 10MHz signals on their front panel BNC connectors.
@Eddie.Mootsen
@Eddie.Mootsen Рік тому
Fancy scope !
@LiLBitsDK
@LiLBitsDK Рік тому
Jeff: Nerdy about time Me: Doesn't even use a watch anymore
@dragonrider6875
@dragonrider6875 Рік тому
I have dealt with GPS time devices and can't wait see the time hat.
@Dreamwalkerx
@Dreamwalkerx Рік тому
Sometimes the answer to a problem is NOT a raspberry Pi. Jeff Geerling 'Hold my beer!'
@thomasbonse
@thomasbonse Рік тому
You're right, sometimes the answer is RPi-Pico, or 42. 😉
@d00dEEE
@d00dEEE Рік тому
Wow, the day after Sam at THIS MUSEUM IS (NOT) OBSOLETE channel shows us how to build our own master clock, we get this!
@HardwareHaven
@HardwareHaven Рік тому
Welp. Definitely learned some new stuff here!
@HardwareHaven
@HardwareHaven Рік тому
@+①②①④⑥③⑨⓪③④WhatsApp Oh wow definitely will "Jeff"
@hagensiekerj
@hagensiekerj Рік тому
I've been playing with GPS PPS on a Pi4 and Sparkfun GPS module and getting nanosecond level accuracy. Your statement about GPS is accurate though. The better the access to open sky the better the accuracy. Nobody needs any of this for home network stuff but it sure is fun to set up your own PPS server for a few bucks.
@50shadesofbeige88
@50shadesofbeige88 Рік тому
2:26 I just picture Jeff toiling away with a soldiering iron while WWV plays in the background. 😄 that's true geek cred.
@ilovefunnyamv2nd
@ilovefunnyamv2nd Рік тому
watching this in the car over Bluetooth. quite ironic I'm watching a video about precise time keeping & syncing. and having the audio 2 seconds later than the video!
@letsmakeelectronics5432
@letsmakeelectronics5432 Рік тому
Thank you
@ianhill20101
@ianhill20101 Рік тому
Jeff is genuinely nice as pi
@yngsjo
@yngsjo Рік тому
I know a project with this in mind. Central clock replacement. I think there still is a lot of old mechanical clocks needed to be replaced by a raspberry pi.
@markfiechtner
@markfiechtner Рік тому
I have been replacing clocks in my house for a few years. I have four pi zero (original, w, 2w) based clocks scattered about. Two are clocks ONLY. Two have clocks in the UI; but, also play audio from my home server. I have a pi 4 based GPS enabled NTP server supporting all my networked CPUs. My wife puts up with me. 😁
@autohmae
@autohmae Рік тому
I can guarantee you are not the first with a PTP time server in their home lab. I don't remember who it was, but I remember seeing that someone had multiple atomic clocks in his homelab. This guy even did a test with him going up a mountain with the atomic clock and getting down and comparing two clocks.
@asbecka
@asbecka Рік тому
GPS also has the roll over issue which can be fun to deal with. Do the cards have an auto update feature so they don’t fall victim to the GPS epoch issue?
@IstvanNagy86
@IstvanNagy86 Рік тому
I always get hyped up from these videos to have extra precise network time on my LAN for no apparent reason; your presentation is great. :D Is there such thing as a database of NICs to see which support PTP protocol? Eg. can I check somehow if an onboard LAN on a motherboard supports this or not? Because having a CM4 PTP server is just one part of the equation. I guess the big investment is going to be on the PC side.
@JeffGeerling
@JeffGeerling Рік тому
Unfortunately, it seems like IEEE1588 support is often buried in tech specs for NICs :( And not all that support it really seem to have full driver support, either. It seems like Intel is the best bet, even many older NICs support it (e.g. i210 I think).
@IstvanNagy86
@IstvanNagy86 Рік тому
@@JeffGeerling so this will take some "time" (ba dum tss) to get mainstream unfortunately. :(
@ChrisA4A4
@ChrisA4A4 Рік тому
PPT also works with software time stamping. We have a Raspberry Pi 4 with a GPS Hat (with PPS) running as a PPT Server. We use this to time sync our web server which is located in the basement where we haven't any change to get a GPS signal. Using software instead of hardware time stamping reduce the accuracy to the micro second range. But that's at least two magnitudes better than using NTP from a time server via internet
@JeffGeerling
@JeffGeerling Рік тому
@@ChrisA4A4 True! And I didn't even touch on that ability. And from some further investigation, it looks like it's _possible_ the chip in the Pi 4 could have 'unofficial' support for hardware timestamping, too.
@JxH
@JxH Рік тому
It's worth mentioning that 1PPS signals (done correctly) are aligned with UTC seconds, so that all the 1PPS signals on Earth should transition (upwards) at the very same instant.
@Acirakin
@Acirakin Рік тому
Stop buying all CM4 I can't get my hands on one :) Very educational video. I look forward to see that applied to online gaming
@deniswasepik3549
@deniswasepik3549 Рік тому
it's about time for a raspberry pi time watch
@midnightwatchman1
@midnightwatchman1 Рік тому
I am looking to implement PTP on a LAN that runs Dante audio equipment. This sounds like a good project
@electroplank587
@electroplank587 Рік тому
very interesting, i work in managed IT infrastructure and i notice that good time synchronization is often overlooked, most sys admins only care if it's accurate within a few minutes which make me die inside 😭
@hikaru-live
@hikaru-live Рік тому
There are network switches that can fan out PTP. So if you connect the Pi to a few of those switches, you don't need those expensive grandmasters. In this case those switches handles downstream devices however many of them, and aggregates all of those into one PTP stream from the Pi.
@totohayashi852-81
@totohayashi852-81 Рік тому
I think NTP and PTP are different usage, PTP and GM clock are for digital transmission usage … this is prevent digital packet collisions and crash. It can apply on device on the LAN, router, switch, ap … etc. and also apply on multicast streaming … like SMPTe 2110, Dante AV and NDI. PTP is like Metronome
@matthiaslange392
@matthiaslange392 Рік тому
Nice. With this i will be never again to late to bid in the last second of an ebay offer 😁 Some of us are happy if their windows clock isn't out of sync by hours. "Sorry, boss. I'm not a little late at work this morning. I'm just out of sync"
@ArjanvanVught
@ArjanvanVught Рік тому
PTP is also used in the entertainment industry; synchronization for light and video shows.
@ArjanvanVught
@ArjanvanVught Рік тому
https en wikipedia org /wiki/SMPTE_2059
@JeffGeerling
@JeffGeerling Рік тому
Also AES67 for broadcast! I'm hoping to explore that a little more with my Dad (radio engineer) on a Geerling Engineering video in the future.
@billnoname8093
@billnoname8093 Рік тому
love the T shirt
@MarcusPHagen
@MarcusPHagen Рік тому
Yet another reason to ditch "Daylight Savings Time", with its twice/year shenanigans!
@osd-cf
@osd-cf Рік тому
Hi Jeff, thanks for the great explanation about how high precision time sychronisation is possible on the CM4. Have you published any of the code / instructions used in your demo? I would like to try to reproduce the time synchronization between two CM4 modules.
@JohnCookNet
@JohnCookNet Рік тому
Great topic. I have several Casio watches that have the shortwave radio update feature. They are affordable and amazing. This is a very underrated technology. I recall there was some conversation in recent past about Govt reducing their funding in the NIST program. Hope this never happens.
@JeffGeerling
@JeffGeerling Рік тому
Yeah, in the WWV tour video I linked, the engineer mentioned that from time to time there are discussions about cutting off WWV since GPS has all but taken over. But I think it would be a bit disruptive since there are still so many radio-based clocks! Also, for a Time Card upgrade, they might include a WWV receiver since, once you know your location with GPS, WWV can be a very accurate backup time source if GPS is jammed or the signal is lost.
@baylinkdashyt
@baylinkdashyt Рік тому
@@JeffGeerling Seems worth pointing out here that the WWV(/B/H/L) clusters serve not only as time standards, but -- as I think their top-of-hour announcement says -- also *frequency* standards. That's *much* harder to ship over the internet, and still important. And you can't get it from network TV anymore...
@JohnCookNet
@JohnCookNet Рік тому
@Astrocat 3D Ditto. This is a great example of how analog complements digital information. The simplicity of the radio wave's protocol is brilliant.
@strandvaskeren
@strandvaskeren Рік тому
@Astrocat 3D Yeah, what's wrong with running wire telegraphs along railroads, just in case?
@DaHaiZhu
@DaHaiZhu Рік тому
My dad would listen to the WWV every week to set the 50+ clocks in our home.
@PaulGrayUK
@PaulGrayUK Рік тому
How did you find the time to do this? What would be a good project/task for an RPi that would save you the most time and with that, wished some projects showed the return upon time investment as if a day spent can return a day in a year, that whole days task becomes more likely to come about. So what would be the best projects you have done for yourself that have saved you the most time? Maybe a video idea is there for the answer.
@muddyexport5639
@muddyexport5639 Рік тому
Wonderfully insane!
@pentasteve9723
@pentasteve9723 Рік тому
when I started to watch this video, I immediately predicted that this video would be about using a raspberry pi to keep track of time. My prediction seems to have been correct.
@redherring5532
@redherring5532 Рік тому
I often wondered if this kind of signal was being picked up on the Skinwalker Ranch show
@davidclift5989
@davidclift5989 Рік тому
The TimeCard uses a Xilinx FPGA, the software to program this is not open source, whilst you can get an open source bit stream to program it, if you want to change the programming you still need commercial software tools from Xilinx these are not open source although they are currently free to use
@minigpracing3068
@minigpracing3068 Рік тому
Very interesting, something I'll need to look into going forward. Wish it worked on regular pi4 since I have that now. Of note, GPS locked NTP devices are not that expensive. Look at Broadcast Tools and Timenet, these are the two clocks I have on my network.
@Sylvan_dB
@Sylvan_dB Рік тому
PTP is a few orders of magnitude more precise than NTP.
@chriscox2045
@chriscox2045 Рік тому
I was going down the rabbit hole of using a USB gps module on my pfsense box and then you make this video. Heh.
@junialter
@junialter Рік тому
Wonderful, thank you!
@StringerNews1
@StringerNews1 Рік тому
A few corrections: 1. While strontium clocks do appear to be a thing, they don't appear to be more than experimental at this time. The NIST still uses cesium-based clocks, as well as a pair of hydrogen masers for their production equipment. This is what feeds station WWV and the Navstar GPS satellites. AFAIK the SI definition of a second still uses cesium. 2. WWV is not "a tower" it's a shortwave radio station near Ft. Collins Colorado that broadcasts on several shortwave frequencies. There's also WWVH in Hawaii, and CHU in Ottawa, Canada. 3. Nope, all those clocks do _not_ use WWV to set themselves. They use longwave station WWVB, that's located on the same campus as WWV, and uses the same NIST time base in Boulder CO, but WWVB is a completely different station on a completely different frequency band, and uses a completely different format that's more easily decoded by simple electronics. 4. Pretty much every GPS receiver that's designed to be a stable time reference has a local oscillator using a quartz, rubidium or cesium time base that can either be slaved to the GPS signal, or become free-running if the GPS signal is lost. Other radio signal sources include CDMA cellular receivers. 5. Calling a GPS clock "grandmaster" is silly, misleading and simply incorrect. They don't play chess at all, and in the hierarchy of master clocks, they're at the bottom. The cesium clocks aboard each of the Navstar GPS satellites are superior to the user segment clocks on the cards, and the cesium beam, cesium fountain and hydrogen maser clocks at the NIST and Naval Observatory are superior to the space segment clocks. One could argue that the _Bureau International de l'Heure_ in Paris is superior to NIST and USNO, but when one considers that the National Bureau of Standards, the predecessor of NIST invented atomic clocks, the technological home is in the US.
@shubinternet
@shubinternet Рік тому
In the hierarchy of clocks that might live at any customer site, the Stratum 1 Grandmasters are at the top. They use the Stratum 0 GPS sources as reference clocks, and at small sites you might have clients directly connecting to the Grandmasters, but at larger sites you'd design an architecture where the Grandmasters feed a set of Stratum 2 intermediate clocks, and at really large sites those might feed another level of infrastructure for Stratum 3, etc.... This is the same kind of architecture that we've been designing and implementing for over twenty years.
@StringerNews1
@StringerNews1 Рік тому
@@shubinternet perhaps you need to learn the difference between NTP and PTP. IJS
The most accurate Raspberry Pi atomic clock IN THE WORLD!
11:20
Jeff Geerling
Переглядів 160 тис.
The ULTIMATE Raspberry Pi 5 NAS
32:14
Jeff Geerling
Переглядів 1 млн
Підставка для яєць
00:37
Afinka
Переглядів 107 тис.
10 Minutes To Escape Or This Room Explodes!
10:00
MrBeast
Переглядів 67 млн
"Поховали поруч": у Луцьку попрощались із ДВОМА Героями 🕯🥀 #герої #втрати
00:15
Телеканал Конкурент TV - новини Луцька та Волині
Переглядів 142 тис.
Godzilla Attacks Brawl Stars!!!
00:39
Brawl Stars
Переглядів 4,5 млн
How does Britain know what time it is?
5:06
Tom Scott
Переглядів 1,4 млн
Why is this PCIe Card RADIOACTIVE?
14:12
Linus Tech Tips
Переглядів 2,2 млн
Biggest new Nixie clock
22:19
Techmoan
Переглядів 320 тис.
Who decides how long a second is? - John Kitching
5:47
TED-Ed
Переглядів 2,2 млн
Can you predict an earthquake?
16:13
Jeff Geerling
Переглядів 93 тис.
NTP vs PTP: Which is the Best Time Sync Protocol
3:12
AV Network Guy
Переглядів 2,1 тис.
Put An Atomic Clock in Your PC - Open Source Time Card
11:57
Gary Explains
Переглядів 27 тис.
Best Single Board Computer You Never Heard Of
11:49
Britec09
Переглядів 46 тис.
WAY faster than a Raspberry Pi-but is it enough?
17:26
Jeff Geerling
Переглядів 642 тис.
Лучший телефон на андроиде?
0:25
Опросный
Переглядів 114 тис.
Samsung or iPhone
0:19
rishton_vines😇
Переглядів 137 тис.
Infrared Soldering Iron from Cigarette Lighter
0:58
ALABAYCHIC
Переглядів 1,8 млн
I KNEW I’d Hate this (I Was Wrong)
12:19
Linus Tech Tips
Переглядів 456 тис.