GPS as NTP reference clock?

My internal network is not routed. I run my own NTP server. But, without access to a reference clock, there is inevitable "local drift" (from REAL time).

Over time, this can be substantial!

I figured a cheap hack would be to tie a GPS receiver and use it as my reference clock. The absolute accuracy would then be << a second.

So, to find a GPS receiver that I can power from the mains (don't want to be replacing batteries!) and that has a serial interface (silly to have to install a BT driver *just* for a GPS dongle!)

ISTR having a Delorme Earthmate hiding somewhere in my stash. And, I think *that* had a serial port interface. Anyone use one of them, before? They seem to be obsolete so it will take a while to chase down technical info regarding the i/f...

This just seems like it would be the quick and dirty solution (instead of buying a "low stratum" server!)

Reply to
Don Y
Loading thread data ...

A GY-NEO6MV2 GPS Module comes with antenna for about a fiver from Ebay. It has (by default) a 9600 baud 'TTL RS2332' output and runs from 3.3 to 5V but this could probably be supplied by a spare control pin.

Every second, it spits out a few lines of standard NMEA 'sentences' with time embedded in a couple of them, easy to extract. There's also a 'lock' LED and the control pin for that gives a precise 1pps rising edge to synchronise the time to within well under a microsecond, probably some nanoseconds.

$GPRMC,091523.00,A,5127.16541,N,00057.52206,W,1.051,,260321,,,A*68 $GPVTG,,T,,M,1.051,N,1.947,K,A*2D $GPGGA,091523.00,5127.16541,N,00057.52206,W,1,07,1.25,54.5,M,46.6,M,,*74 $GPGSA,A,3,17,23,15,10,12,20,24,,,,,,2.33,1.25,1.96*0D $GPGSV,4,1,15,01,04,014,,10,28,290,14,12,45,210,23,13,20,142,*7A $GPGSV,4,2,15,14,05,049,,15,45,172,12,17,31,061,11,19,35,092,12*71 $GPGSV,4,3,15,20,16,239,19,21,02,354,,23,26,252,18,24,87,333,19*77 $GPGSV,4,4,15,25,07,224,,28,12,048,,32,10,314,*4A $GPGLL,5127.16541,N,00057.52206,W,091523.00,A,A*70

Time here is 09:15:23.00 as you can see in both the $GPRMC and $GPGGA sentences.

Reply to
Clive Arthur

fredag den 26. marts 2021 kl. 07.51.54 UTC+1 skrev Don Y:

there are plenty of USB GPS recievers and I'm sure linux has a driver to run an NTP server using a USB or serial connected GPS reciever

Reply to
Lasse Langwadt Christensen

GPS can be a good solution to your problem, but if you are indoors where GPS can not be received you may still be able to receive the WWVB signal on 60 kHz using a simple ferrite loop antenna. This can be a very small receiver powered from virtually any source including a solar cell in ambient light. A 1 ppm signal is easy to produce and a NEMA serial stream is not hard to produce.

I don't know of inexpensive products off the top of my head, but there are some number of them available.

Reply to
Rick C

Used GPS NTP servers are only a few hundred bucks on ebay. Symmetricom is one popular brand. Lots of options for these as they're usually very modular. At minimum you get ethernet and some sort of clock out signal,

1Hz or 10Mhz.

Threw racks of that junk out not too long ago. PTP makes NTP look like a cobbled together hack from the over 30 years ago, which it is. It's still probably fine for the manifesto writing paranoid air-gapped types with limited to no real internet access.

Reply to
Cydrome Leader

The cheap approach I've taken is to use a Neo-7 (or similar) GSP module (cheap on eBay/Amazon since they're used by many drones) and a CMOS-to-USB-serial-emulation device (also cheap since they're the standard sort of thing used for talking to Arduinos and so forth).

No separate power supply required - the auxiliary power output from the USB-to-serial dongle is sufficient to power the GPS.

If a one-second-plus-or-minus resolution is sufficient, you can just synchronize to the NEMA (or Neo-specific binary protocol) messages coming on over the "serial port".

With a bit more wiring, you can connect the GPS dongle's PPS output to a serial converter's hardware-handshake input (make sure that the serial converter has one - the cheaper Arduino-oriented converters don't, and some chipsets don't notify the host promptly on a state change on the handshaking line) and use a device driver which can synchronize to the PPS signal. Better PPS resolution can be had if you wire the PPS signal to a real serial UART's hardware handshaking input, as these can generate an immediate host interrupt when the stage changes (better timing than the USB-based converters can provide).

I've had a pairing like this providing a time reference for my home network for a few years. The PPS-over-USB signal is matching the timing of a Stratum 1 NTP server to within about 350 microseconds.

That's a lot better than I really need it to be.

Reply to
Dave Platt

I don't know if you want everything as cheap as possible and have unlimited time on your hands, but I have a LeoNTP server here and it works a treat. It has RJ45 network connection and a BNC that can output 1PPS. It is powered via USB or a USB power brick. It is easy to setup and works out of the box, very good accuracy. It receives NAVSTAR (US GPS), GLONASS and GALILEO at the same time. No need for sky view, it works indoor near a window. Look at leontp.com for more details.

Of course in the past I have also used GPS modules and added an RS232 interface converter (TTL->RS232) to send serial data and 1PPS to a PC. You can also supply that from a USB powersupply when it is 5V.

Reply to
Rob

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.