Author Topic: Your five utterly brilliant things about modern technology  (Read 5107 times)

Davef

Re: Your five utterly brilliant things about modern technology
« Reply #50 on: 23 April, 2020, 01:22:39 pm »
You could always build one yourself - https://vaxxi.net/log/android-phone-raspberry-pi-gps-ntp-server/

What an absolutely terrible way of doing it!  That won't get you any more accuracy than NTP (though of course it doesn't need an internet connection, which can be extremely useful[1]), as you've no idea what the latency of the serial data from the GPS is - to say nothing of the vagaries of Bluetooth.

Better to get a GPS receiver with a hardware pulse-per-second output (Adafruit and the like do convenient modules that don't involve any SMD soldering) and connect that directly to the Raspberry Pi's GPIO/serial ports.  That should give you precision in the microsecond range.


[1] I have a GPS feeding into ntpd on our Raspberry-Pi-based alarm clock, so that it knows what time it is if it powers up without a network connection.  I could have used a battery-backed real time clock, but it being a stratum-1 time server was more fun.
I just googled without reading. As long as you are happy to work outside I think you could have an entirely software based setup on an android tablet accessing the gps time. Last millenium I had a GPS receiver plugged into my laptops rs232 before satnav,  before I had heard of Bluetooth or usb and before the internet had its .com bubble. That could pick up the time.


Sent from my iPad using Tapatalk

Kim

  • Timelord
    • Fediverse
Re: Your five utterly brilliant things about modern technology
« Reply #51 on: 23 April, 2020, 01:36:56 pm »
I just googled without reading. As long as you are happy to work outside I think you could have an entirely software based setup on an android tablet accessing the gps time.

That would still have the same problem: The GPS chipset is connected internally to the CPU via a serial interface.  Therefore all it can know is that a stream of characters has arrived in the serial buffer, some of which contain the timestamp.  You don't know[1] the delay between the start of the second and the string appearing, so your clock is slow by some unknown amount.  (On my NTP server, the time obtained via NMEA strings is a couple of hundred milliseconds late.)

GPS receiver chipsets usually have a hardware pulse-per-second output to get around this problem: A physical wire that is switched on and off at the exact start of each second.  NTP servers running on suitable hardware can use that to get microsecond precision (which they can combine with the less precise serial data to tell them *which* second they're on).  The problem is that an Android device won't have this capability.


Quote
Last millenium I had a GPS receiver plugged into my laptops rs232 before satnav,  before I had heard of Bluetooth or usb and before the internet had its .com bubble. That could pick up the time.

See above - any GPS will give you the time, but no more accurately than NTP over the internet.

Some RS232 GPS receivers will connect their PPS output to one of the handshake lines on the serial port, which ntpd can use.  Timing's still an issue, so it's better to use a good old-fashioned serial port on the host computer rather than a USB-RS232 dongle, as that will introduce more difficult-to-quantify delay.


[1] You can estimate the best-case minimum delay from the baud rate.  It's not pretty.

Re: Your five utterly brilliant things about modern technology
« Reply #52 on: 23 April, 2020, 01:52:18 pm »
I'm impressed that my exercise bike keeps different time to my watch (which I assume slurps it's time from the Apple-verse) – in the space of a hour's workout, there's a good 90 seconds difference (the bike winning the race).

It's all to do with Einstein's relativity theory. Einstein would have been a great cyclist had it not been for Hitler. Not many people know that.

I installed this into Buck House for a Science Day they were having there about 15 years ago.

Davef

Your five utterly brilliant things about modern technology
« Reply #53 on: 23 April, 2020, 02:07:29 pm »
That is a disappointment. I am pretty sure on the old gps unit the pps was one of the connections on its external connector and it was an adapter cable to a D type connector that gave rs232 levels. It was over 20 years ago so I can’t remember precisely. What I do remember is that it had a battery life that rendered it all but useless.

Edit: no, I seem to be making that up as I think it was a garmin gps 38.

Sent from my iPad using Tapatalk

Re: Your five utterly brilliant things about modern technology
« Reply #54 on: 24 April, 2020, 08:31:46 am »
You could always build one yourself - https://vaxxi.net/log/android-phone-raspberry-pi-gps-ntp-server/

What an absolutely terrible way of doing it!  That won't get you any more accuracy than NTP (though of course it doesn't need an internet connection, which can be extremely useful), as you've no idea what the latency of the serial data from the GPS is - to say nothing of the vagaries of Bluetooth.

Better to get a GPS receiver with a hardware pulse-per-second output (Adafruit and the like do convenient modules that don't involve any SMD soldering) and connect that directly to the Raspberry Pi's GPIO/serial ports.  That should give you precision in the microsecond range.
I agree. When I have compared two pulse-per-second from cheap GPS receivers they are well under a microsecond apart. The Ublox PAM7Q modules are about as small as you can get with an integrated antenna, without surface mounting.

The good GPS time standards allow the length and type of cable from the aerial to be entered, so that can be compensated for as well. When the cable delay isn't going to be more than 50 picoseconds and is still worth compensating for, adding a bluetooth link is just silly.
Quote from: Kim
Paging Diver300.  Diver300 to the GSM Trimphone, please...

SoreTween

  • Most of me survived the Pennine Bridleway.
Re: Your five utterly brilliant things about modern technology
« Reply #55 on: 24 April, 2020, 09:02:29 am »
Sub microsecond synchronisation over a network is possible but forget NTP, you need PTP.  I had the 'joy' of implementing that on a job some years ago.

I think PTP or a proprietary clone of it is probably how Sonos and the like stay in sync.

[ETA] I am greatly relieved to find my recent-ish new network switch does not support IEEE 1588.  This rules out all temptation to go down the google rabbit hole investigating a Pi based PTP powered Sonos-a-like.  Phew.
2023 targets: Survive. Maybe.
There is only one infinite resource in this universe; human stupidity.

T42

  • Apprentice geezer
Re: Your five utterly brilliant things about modern technology
« Reply #56 on: 24 April, 2020, 09:49:40 am »
I love the way you can use Skype's lousy performance as an excuse to cut off a boring conversation.
I've dusted off all those old bottles and set them up straight

Beardy

  • Shedist
Re: Your five utterly brilliant things about modern technology
« Reply #57 on: 05 May, 2020, 06:14:35 pm »
1. Modern tech has mostly paid my mortgage and fed my children for the last 35 years or so. Before that the tech was a bit older.
For every complex problem in the world, there is a simple and easily understood solution that’s wrong.