I want to remove my usb wifi from my pi zero after the correct time is set, how long will the time remain reasonably correct if its not synching? 1 or 2 minutes either way after a couple of months is fine (presuming there are no reboots).
Thanks.
You're asking for ±1 in 50000 accuracy, or 20 ppm. That appears to be about what one might expect from a crystal oscillator.mediastore93 wrote: ↑Wed Aug 16, 2017 8:49 pm... 1 or 2 minutes either way after a couple of months is fine ...
Or, depending on the RTC, pins 1-8. For a 1, 3, 5, 7, 9 pin RTC, see this https://thepihut.com/products/mini-rtc- ... =758601217 one. For the pin 1-8 (with replaceable battery!), see this one: http://www.mcmelectronics.com/product/83-17980rpdom wrote: ↑Wed Aug 16, 2017 9:22 pmOr you could buy a cheap DS3231 RTC module with battery for it and with a bit of simple configuration it will keep a reasonably accurate time for you even when the Pi is switched off or rebooted.
It will require some GPIO pins to be soldered to the Pi Zero, but you don't need the full 40-pin connector, just pins 1, 3, 5 and 9.
Any RTC is going to be worse than an Pi with access to NTP servers. However, the OP wants to run without a network connection and, hence, without NTP service. The following is for a Pi0 with a network connection. The RTC hasn't been written to since it was set up, so the comparison here is RTC to NTP and a free running system clock is very unlikely to be better than the RTC:Martin Frezman wrote: ↑Thu Aug 17, 2017 2:54 pmThis thread really has nothing to do with RTC, so that's mostly a distraction.
Although using an RTC may (emphasis "may") be an end-around solution to OP's underlying problem, via the hack of periodically (via cron) reading the RTC's time into the system time. However, my very limited experience (playing around with one particular RTC on the Pi) is that the RTC's time isn't much better (in fact, seemed to be worse) than the (onboard) system timekeeping.
Code: Select all
pi@pi0ntp:~ $ uptime; date; sudo hwclock -r
16:57:26 up 102 days, 19:20, 3 users, load average: 0.06, 0.06, 0.01
Thu Aug 17 16:57:26 PDT 2017
Thu 17 Aug 2017 04:57:27 PM PDT -0.198464 seconds
pi@pi0ntp:~ $
Depends which RTCs you use. In my not so limited experience the one I mentioned has internal temperature compensation, which improves the accuracy considerably.Martin Frezman wrote: ↑Thu Aug 17, 2017 2:54 pmHowever, my very limited experience (playing around with one particular RTC on the Pi) is that the RTC's time isn't much better (in fact, seemed to be worse) than the (onboard) system timekeeping.
It doesn't really matter, the underlying reason for using an RTC is not accuracy. The reason for an RTC is that the clock keeps running when the Raspberry is powered off, so the system powers back on with something close to the right time of day.rpdom wrote: ↑Fri Aug 18, 2017 6:31 amDepends which RTCs you use. In my not so limited experience the one I mentioned has internal temperature compensation, which improves the accuracy considerably.Martin Frezman wrote: ↑Thu Aug 17, 2017 2:54 pmHowever, my very limited experience (playing around with one particular RTC on the Pi) is that the RTC's time isn't much better (in fact, seemed to be worse) than the (onboard) system timekeeping.
I wouldn't say that as an absolute. Indeed, the OPs question (about clock accuracy without access to NTP servers) is a case in point where an accurate RTC could be used to periodically correct the system clock.DougieLawson wrote: ↑Fri Aug 18, 2017 1:44 pmIt doesn't really matter, the underlying reason for using an RTC is not accuracy. The reason for an RTC is that the clock keeps running when the Raspberry is powered off, so the system powers back on with something close to the right time of day.
Precisely.I wouldn't say that as an absolute. Indeed, the OPs question (about clock accuracy without access to NTP servers) is a case in point where an accurate RTC could be used to periodically correct the system clock.