Page 2 of 2

Re: Accuracy of Raspberry Pi "clock"

Posted: Fri Jan 11, 2013 7:22 pm
by gritz
pluggy wrote:Has it got a little springy thingy that tweaks the armature into rotating when you turn it ?
Dad's has a little button / knob thinger on the back to kickstart it. Once in a blue moon it'll start backwards. There's a little window in the face with a disc behind it that indicates whether it's running clockwise (the disc rotates counterclockwise if all is well...). Burngate's looks pretty similar to dad's - same mech / face, but different case, I think.

@ Burngate: 8-) Dad will be chuffed when he hears there's another one out there.

Re: Accuracy of Raspberry Pi "clock"

Posted: Fri Jan 11, 2013 7:27 pm
by gragib
pluggy wrote:10 ton diesel generator jump a foot in the air against its mountings
That must happen quite often then! I've seen that too!

Re: Accuracy of Raspberry Pi "clock"

Posted: Fri Jan 11, 2013 7:33 pm
by gragib
aTao wrote:Or, go right to the horses mouth, or at least the same trough as the National Grid :http://roevalley.com/newsbrowser/interface/rugby.htm
Unfortunately, radio-controlled clocks are regional. I'm in Canada. I'll have to see if there's something equivalent that'll pick up time signals from WWVB.

Re: Accuracy of Raspberry Pi "clock"

Posted: Fri Jan 11, 2013 7:46 pm
by joan
Pick up a cheap GPS unit, connect it via the Pi's UART, and interpret the NMEA sentences.

Re: Accuracy of Raspberry Pi "clock"

Posted: Fri Jan 11, 2013 7:50 pm
by pluggy
gragib wrote:
pluggy wrote:10 ton diesel generator jump a foot in the air against its mountings
That must happen quite often then! I've seen that too!
Probably every time someone misconnects one to a running grid. The electricians had a board with a phase indicator on it, they would set the engine speed so the phase indicator (a rotating pointer, 12 o'clock was in phase) was rotating clockwise at about 5 or 10 rpm (generator running faster than the grid) when the phase indicator got to 5 to the hour, they engaged the breaker. If they got it wrong, the generator armature would immediately try to rotate to get itself in phase, sometimes against the rotation of the engine driving it, usually with 'interesting' results.



Its probably done by computer these days.......

Re: Accuracy of Raspberry Pi "clock"

Posted: Fri Jan 11, 2013 8:04 pm
by gragib
joan wrote:Pick up a cheap GPS unit, connect it via the Pi's UART, and interpret the NMEA sentences.
Sure, but that assumes you have good GPS reception and you are not inside an enclosed space like a basement, which is not always true.

Re: Accuracy of Raspberry Pi "clock"

Posted: Sat Jan 12, 2013 5:01 am
by gragib
UPDATE!

I found a DS1307 kit that I had never opened or used; hooked it up, made some changes to the startup scripts, and voila!

Now I need to tell the Pi to sync with the RTC every 15 minutes or so.

Re: Accuracy of Raspberry Pi "clock"

Posted: Sat Jan 12, 2013 10:48 pm
by edj4523
This guy has extensive notes on using the Raspberry Pi with NTP and GPS timing sources:

http://www.satsignal.eu/ntp/Raspberry-Pi-NTP.html

The results are on par with other platforms configured the same way. The Sure GPS demo board exposes a PPS signal at 3.3V, and that is only $35 also. Put the two together and you have an inexpensive time server accurate to a few microseconds.

Re: Accuracy of Raspberry Pi "clock"

Posted: Sun Jan 13, 2013 4:45 am
by Jim Manley
Sheesh, a lot of people seem to have a bunch of excess cash that they need to send to me - talk about a gold brick! Between sticking any old USB WiFi dongle in to get NTP, to the cron script that adjusts for measured drift where WiFi may not be available, if that isn't good enough, you're using the wrong kind of computer.

Something that I just noticed is that some old smart phones I have still remain synched with the time service, even though they are no longer under a current service contract. They do have GPS, so that may be where they're getting the time signal from, but I wonder if a USB cell dongle without a current service contract can track time via the service. It may work because even out-of-contract phones can be used to call 911 (or whatever the emergency number may be in your area) and so they can be tracked at least by cell tower triangulation. Time synching may be necessary for that to work, so that's why it continues past end-of-contract. I don't have any cell dongles to test this theory, but maybe someone else does.

Re: Accuracy of Raspberry Pi "clock"

Posted: Sun Jan 13, 2013 5:05 am
by gragib
Jim Manley wrote:Sheesh, a lot of people seem to have a bunch of excess cash that they need to send to me - talk about a gold brick! Between sticking any old USB WiFi dongle in to get NTP, to the cron script that adjusts for measured drift where WiFi may not be available, if that isn't good enough, you're using the wrong kind of computer.

Something that I just noticed is that some old smart phones I have still remain synched with the time service, even though they are no longer under a current service contract. They do have GPS, so that may be where they're getting the time signal from, but I wonder if a USB cell dongle without a current service contract can track time via the service. It may work because even out-of-contract phones can be used to call 911 (or whatever the emergency number may be in your area) and so they can be tracked at least by cell tower triangulation. Time synching may be necessary for that to work, so that's why it continues past end-of-contract. I don't have any cell dongles to test this theory, but maybe someone else does.
  1. I don't have a USB WiFi dongle, not to mention that using a USB WiFi dongle means I'll need a powered USB hub as well (I have that!).
  2. The drift isn't constant. In the last 12 hours of operation without an RTC, the observed drift was 44 seconds (in a period of 12 hours, or 1020ppm).
  3. I found an unused RTC I had. Translation: problem solved!
  4. Using GPS for time-keeping works only if you can get a good fix (not always true when you are indoors or in a basement).
  5. Unused cellphones can keep track of time because the cell towers broadcast time. These unused cellphones can connect to the tower because there's a law that says that any operational phone should be able to make calls to 911 regardless of service status. For cell phones, that means battery charge, cell signal and a phone that's not broken (whether hardware or software); GSM phones can make emergency calls without a SIM card.
I have an unused MiFi somewhere. It shouldn't be impossible to telnet into it. Is there an AT command to get the time from a modem/phone?

Re: Accuracy of Raspberry Pi "clock"

Posted: Sun Jan 13, 2013 2:32 pm
by lewmur
gragib wrote:[
  1. I don't have a USB WiFi dongle, not to mention that using a USB WiFi dongle means I'll need a powered USB hub as well (I have that!).
  2. The drift isn't constant. In the last 12 hours of operation without an RTC, the observed drift was 44 seconds (in a period of 12 hours, or 1020ppm).
1: Most wifi dongles should work without a powered hub and are cheap.
2: Unless your Pi is in a place where the temp varies wildly, the drift should be vairly constant. I used the "adjustment" method in the early days of PCs, when there was no access to NTP, and it worked amazingly well in air-conditioned surroundings. There is no way it should change from 12 sec/day to 44.

Re: Accuracy of Raspberry Pi "clock"

Posted: Sun Jan 13, 2013 5:40 pm
by gragib
With all due appreciation for the effort everybody has put into this thread, I think it is going off-topic.

I started the thread to ask if the observed drift was normal, or out of the ordinary. I think we all can agree that it was former.

As far as offline solutions are concerned, an RTC with backup battery does the job.

Re: Accuracy of Raspberry Pi "clock"

Posted: Sat May 18, 2019 12:38 am
by seanspotatobusiness
If the Pi gains or loses a fixed amount of time each day, couldn't a daily adjustment be programmed in? Or does the amount of time lost/gained vary?

Re: Accuracy of Raspberry Pi "clock"

Posted: Sat May 18, 2019 3:27 am
by W. H. Heydt
seanspotatobusiness wrote:
Sat May 18, 2019 12:38 am
If the Pi gains or loses a fixed amount of time each day, couldn't a daily adjustment be programmed in? Or does the amount of time lost/gained vary?
Congratulations. You have necro'd a thread from OVER 6 years ago.

Re: Accuracy of Raspberry Pi "clock"

Posted: Sat May 18, 2019 6:02 am
by DougieLawson
seanspotatobusiness wrote:
Sat May 18, 2019 12:38 am
If the Pi gains or loses a fixed amount of time each day, couldn't a daily adjustment be programmed in? Or does the amount of time lost/gained vary?
Despite the pointless thread necro. Raspbian includes timedatectl and systemd-timesyncd to keep the clock stable. If you're off the grid then get a DS3231 hardware RTC to keep your offline clock stable.

BTW, it is ALWAYS better to start a new thread. Including a link to the old prehistoric thread, if needed.