happy new year 2025 countdown clock on abstract glittering midnight sky with copy space, festive party invitation card concept for new years eve

What time is it?

I have hundreds of dollars worth of GPS equipment. Not counting the cell phones we all carry with us.

I wanted to try to create a Stratum 0 NTP clock.

The last time I attempted this, I used a Garmin handheld GPS. Time to sync was in minutes and while the power draw as trivial, by the standards of the day, it would still burn through AA batteries.

Because you, kind readers, told me that there were cheap options, I went looking.

What I found was a GPS module that is about an inch square. For $15 I could have one delivered. It comes with a header containing VCC, GND, TXD, RXD, and PPS. I figured I could solder in the provided header then run them to a GPIO that has an attached UART.

Well, the darn things showed up a day early, and I didn’t really want to do any soldering. I plugged it in via the USB port, put it in the window. A few minutes later, it had a hard lock.

After installing gpsd and configuring, chrony I now have a system that is locked at less than 1ms accuracy, NOT using the PPS option.

That will be next week’s project. Getting that PPS signal to the motherboard.

If I had a Raspberry Pi with a good interface, not wifi, I can see that this would make a darn nice little timekeeper.


Comments

3 responses to “What time is it?”

  1. pkoning Avatar
    pkoning

    I hooked up the PPS to my BeagleBone Black, which is a small computer similar to the Raspberry Pi. That worked perfectly (with sub-microsecond tolerances) until the board just went totally dead a few weeks ago. That connection was via a GPIO. I’d assume the Pi can do likewise. A regular PC probably not, but I think one decent substitute is a modem control signal input on a UART, if you have a serial port with modem signals (RTS/CTS which are commonly used for flow control would work). The goal is to have something that can be hooked to an interrupt so the kernel can capture the time of the event with low latency and small variance.

    1. The normal procedure is to drop the computer’s serial port into RS 485(?) which is at TTL levels. Then hook up the five lines, with your PPS going to CTS. “gpsd” will read the CTS pin as PPS. Makes it easy.

      The Ethernet port on the Raspberry Pi3 uses shared lines with the UART. This means that you get more jitter than you might expect.

      One really neat method is to hook the PPS to your NIC so that the NIC transmits the PPS information.

      I’m also looking at the UBlox 7 being able to see the frequency of the PPS. I’m looking at setting it to 16Hz. This should get me down under 100us. I’m not sure if I can achieve ns precision, but it will be fun to try.

  2. I went back to my pocket watch standard clock face. battery powered..

Leave a Reply

Your email address will not be published. Required fields are marked *