EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: space55 on November 11, 2024, 03:13:24 am
-
Hi, all
I'm new to the forum here but have been lurking for a little while. I figured I'd share my latest obsession project. Loosely, I'm trying to build a grandmaster clock, backed by a GPS chip, running chrony on a Raspberry Pi CM4. These servers are expensive in the wild, so I figured I'd do it myself for twice the price and a thousand times the effort.
My current parts list for verifying the core idea here is as such:
- Trimble Thunderbolt for getting a relatively good understanding of how GPSDOs work, how they're interfaced, etc. (note: this Thunderbolt is _not_ having a good time, he's stuck behind a metallized window in an apartment building)
- A few Raspberry Pi's with GPS HATs, running Chrony (they work like a charm)
- Some various servers that I can run clients and tests on
- A set of boards being manufactured right now that have some NEO-M9N chips on them, with CM4 sockets, power, ethernet, etc., all on a Mini-ITX footprint (note: these boards are definitely using the wrong chip, I'm going to switch to an F9T at some point)
I'm a software guy with tons of DevOps experience, so I have zero fears about everything OS-level upwards. I'm relatively new to PCB design (only designed a half dozen or so boards thus far), and very afraid of the prices of some of these parts, such as the nearly $300 RCB-F9T I want to use longer term.
Some questions for the community:
1. This is a personal project, as therefore has no real deadline or value, but am I doing something that I _should_ just be purchasing instead? I've seen Open TimeCards, TimeBeat parts, etc., but I kinda wanted to do it myself for fun. Still - is this a silly endeavor?
2. Are there gotchas I should be worried about, especially with regards to the PPS output of the GPS chip feeding into the CM4? I've learned it is sort of possible to run PTP & hardware timestamping on the CM4, but it's dependent on reading documentation (my favorite...)
3. For the RCB-F9T board specifically, is there somewhere I can get a footprint? I'm really hesitant to make one myself, as I don't want to be off by 1mm on the connector and have to have a new set of boards made
4. What other features should this "server" have? Anything you wish you had in a homelab?
If this project doesn't get dropped by me in two months, I may do a larger run of boards for anyone that wants one, but that's going to be a future endeavor. I have only barely lost my sanity so far! There's more left to lose!
Thanks, all
-
Hi,
I usually lurk on here as well, but this post is right up my alley.
I maintain the Time Card and design a lot of the designs contributed by OCP TAP, our github is here: https://github.com/opencomputeproject/Time-Appliance-Project.
The designs you mentioned are almost all lifted from our designs, including the CM4 designs. We have the open source versions listed on our website, which are the originals, not the rebranded ones.
1. CM4 sandwich with OCXO / GPS -> https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Incubation/Hardware/Time4CM4_Sandwich
2. Time Card itself -> https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Time-Card
3. RCB-F9T, M.2 of F9T also available -> https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Time-Card/GNSS/UBlox/RCB-F9T
4. RCB Neo-M9N, M.2 of Neo-M9N also available -> https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Time-Card/GNSS/UBlox/NEO-M9N
5. OCXO daughter card for Time Card -> https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Time-Card/OSC/OCXO%20Daughtercard
We also designed multiple NICs that can consume 1PPS or even host GNSS modules, with different interfaces and for different kinds of hosts.
1. Timehat with I225 that can sit on RPI5 with PCIe and has a M.2 slot for GNSS -> https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Incubation/Hardware/TimeHAT
2. USB to ethernet with ASIX chipset, supports PTP and 1PPS input or output -> https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Incubation/Hardware/TimeStick
3. TimeNIC, a PCIe I225 NIC with SMA for PPS input and output exposed to PCIe front panel -> https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Incubation/Hardware/TimeNIC
A question about your goal, chrony (NTP) will degrade performance anyways, so ZED-F9T will be overkill unless you use PTP. Are you looking for PTP? Or just an NTP server?
Also, are you looking for holdover (i.e. you lost GPS)? Or just something that works when GPS is present? Are you interested in a GPSDO for frequency as well? Or just for timing?
More than happy to help with timing problems, it's a very fun field to design in!
-
Wow! I'm flattered to have you in this thread!
Let me reply last-to-first. My primary goal by the end of this project is two-fold:
1. A good GNSS-backed NTP server (though having PTP support would be awesome, it is not a requirement)
2. Learning how all of this stuff works
By those standards, it makes sense how chrony could get in my way. Ultimately, I'm doing this with Linux, and so I can imagine that due to OS-level timing inconsistencies and jitter, I would never be able to get *too* precise. I could probably write some custom firmware for a microcontroller that would do better, but that's well beyond the scope of what I want to do right now. For this project, maintaining a platform that I know and understand has a lot of benefits, which more than outweigh any potential precision I could gain by going a more PTP-focused route.
For holdover, I'm not particularly worried beyond if the antenna gets bumped. I specifically want to exclude mobile applications from my goals. The server is going in a rack and it's staying there, for all intents and purposes. In terms of personal interest, having a GPSDO for frequency is awesome, but I don't expect that the chips I'm working with for this board would be able to give me the 10MHz output stability (I'm told "phase noise" is the phrase to use) one would come to expect from even a $200 GPSDO. I'm happy to be wrong, though.
I definitely took some heavy inspiration from the Open Time Card. I actually looked through some of the designs in GitHub, especially for the RCB-F9T, but I don't have Altium, so I wasn't able to go too far. The idea of modularity, and using a standard design for the ublox chip, is something I'd like to target, and so I'm likely going to redesign the board I'm having built (it's still being manufactured) using one of those modules. Means I don't have to learn much RF engineering.
It is reassuring to hear that the ZED-F9T is overkill, as it means I get to keep the cost down. I'll take a look at the NEO-M9N variant, it should be a pretty easy replacement for my current design.
When I get the boards, I'll post some images and details as to how well it is (or isn't) working.
Again, I really appreciate your post!
-
I found a good tutorial on making a GPS backed NTP server from a Raspberry Pi. Apparently, you can configure pins on the Raspberry Pi as PPS inputs and use that.
https://blog.networkprofile.org/gps-backed-local-ntp-server/
Using that combined with different Sparkfun or other vendor's GPS breakout boards, you could probably make the entire solution. It would have wires and separate boards, but you could at least experiment and see how the whole setup works.
Custom boards are fun of course, a dedicated HAT is of course possible too, and wouldn't take too much effort to make either, but also then you're locked in to whatever GPS footprint you put on the HAT. You also have to make sure to have impedance matching and DC bias on the antenna port to power GPS antennas, and some other kind of house keeping things we did on the RCB designs.
What do you think?
-
I actually have two proof-of-concepts running with different GPS boards (one via a small breakout board and associated header wires, one via a Waveshare GPS HAT) that fit the bill perfectly. The thing I'm trying to do is build it all into one main board that you can just plug a CM4 into, rather than slip a HAT on top of. I really like the rackmount form factor as well, and so am trying to chase that as best I can. The RCB design's impedance matching and DC bias is one of the reasons I'm interested in the RCB boards specifically.
Definitely agree, though, that doing small PoCs and stuff is a good way to test this all out. It's how I've confirmed the software works so far, but there's a difference between the CM4 and the Pi 4B that allows hardware timestamping on the CM4 only. Hence the super simple board that is a jumping-off point towards something more complicated.
Is there somewhere I can buy an RCB-format board with a NEO-M9N chip on it, rather than the $250 ZED-F9T board from ublox?
-
For the RCB Neo-M9N, the design is on the github. Makerfabs makes it and includes it in the Time Card when you buy it from them, https://www.makerfabs.com/ocp-tap-time-card.html (https://www.makerfabs.com/ocp-tap-time-card.html) . I'm asking them about listing the RCB separately, but no guarantees at this point, I'll post back anything I hear back on that part.
Good to know you want to base around CM4. That's also a group of designs Mike Lambeta made for our repo:
https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Incubation/Hardware/Time4CM4_Sandwich (https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Incubation/Hardware/Time4CM4_Sandwich)
https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Incubation/Hardware/Time4CM4 (https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Incubation/Hardware/Time4CM4)
https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Incubation/Hardware/Time4Pi_Carrier (https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Incubation/Hardware/Time4Pi_Carrier)
It's designed as a sandwich interposer board, that sits between the CM4 and say the CM4 IO board, and allows you to add OCXO to it, or to add GPS modules as well.
And this design, which looks like a HAT for raspberry pi supporting lots of GPS form factors. I forget exactly: https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Incubation/Hardware/TimePi_HW (https://github.com/opencomputeproject/Time-Appliance-Project/tree/master/Incubation/Hardware/TimePi_HW)
Also worth noting, the BeagleY-AI board, using the TI AM67A part, supports PTP as well, and PTM (PTP over PCIe basically). It's a newer board and may need more bring-up but it's a fun board I've been watching and playing with.
-
Several of us around this forum have built GPS disciplined oscillators, they are reasonably straightforward and can work well with a cheap ($10) Chinese clone GPS board fitted with a fake 6M (navigation) module and a $5 Chinese 10 MHz oven oscillator. Both these are available from several eBay sources.
While easier projects than a precision time server, a GPSDO has a lot in common with one…
By using a genuine Ublox M8T board and an outdoor “mushroom” antenna, you should be able to obtain the stability of the 1pps shown in the Ublox datasheet. If you check the various data sheets, you can pick a suitable timing accuracy/cost point. Given that you might not want better than a few mS accuracy, it doesn’t make sense to spend upwards of $80 (typical M8T board assembly) to get 20 nS accurate 1 pps.
Details of my build of a Lars/Murray GPSDO are here:
https://www.qsl.net/g4aon/gpsdo/ (https://www.qsl.net/g4aon/gpsdo/)
SJ
-
I'll probably pull the RCB NEO-M9N board and have it assembled. Should I throw them up on Tindie or something?
The BeagleY-AI board looks interesting if it can do PTM/PTP. Looks like I have another project lined up after this one!
For building a GPSDO, if it's that easy... maybe I should try building one into this. There's more than enough space on the board I had manufactured. It's finally being shipped, woo!
Much appreciated, both!
-
For building a GPSDO, if it's that easy... maybe I should try building one into this. There's more than enough space on the board I had manufactured. It's finally being shipped, woo!
Much appreciated, both!
It's a slippery slope. I have 4 GPSDOs, a TinyPFA and a rubidium :-DD I did consider building a time server, but have no use for one as my only use would be to set amateur radio data software time and a few tens of millisecond accuracy is more than enough for that via the internet time servers.
SJ
-
The boards have arrived!
I have good news and bad news.
The bad:
- In my infinite wisdom, I connected RX to RX and TX to TX for UART on the NEO-M8N chip. This can't easily be fixed (with my skills, at least) by bodge wires between the traces, so another round of boards may need to be done.
- I neglected to include a power status LED. That's silly of me.
- The CM4 needs to be pre-imaged to work properly in the board, as there is no display out anywhere.
- I managed to screw up the power connector, but that's easily fixed with a bodge wire.
The good:
- The NEO-M8N is sending NMEA data, as I checked with an oscilloscope.
- The CM4 connectors work, provide power, and are the right distance apart.
- The board only draws a few hundred mA, which is pleasantly lower than my expectations.
- The activity LED works.
- The ethernet port works.
- The USB port works.
What's next:
- Update my designs to include some changes I've been noting, such as a +5V LED, some PPS connections, and maybe shift the CM4 to one side. I like it in the middle, though, it looks more balanced that way.
- Get some RCB-M9N boards manufactured, if I can figure out how to migrate them from Altium to Kicad (reliably). Or just buy them if someone wants to sell me a few.
- Try to figure out how in the *world* I'm going to get a case manufactured for these for under $1k per unit (Protolabs pricing).
If anyone has suggestions on that last point, please, let me know. I've been thinking of using SendCutSend, but then I have to design up a full case in Fusion 360. Which I'm not opposed to, just not quite looking forward to.
Will attach pictures of the boards in (insert resulting unit of time here).
Thanks!
-
Finally took the photo of the board. Or, two, more accurately.
They're... basic. But oh well, they're designed to be mini-ITX compatible, so I guess that's what I get.