Steps to reproduce:
1. Enter REPL and set RTC time to be same as time on PC (I'm using Ubuntu)
2. Wait for ~10 minutes (either remaining in REPL and connected to USB or disconnect and use backup battery (VBAT))
3. After 10 minutes PyBoard RTC is 15-20 seconds behind my PC clock.
>>> os.uname()
(sysname='pyboard', nodename='pyboard', release='1.9.4', version='v1.9.4-46-g3ea0862a on 2018-05-21', machine='PYBLITEv1.0 with STM32F411RE')
Please kindly let me know if there is anything to diagnose/fix.
Thanks,
Max.
RTC (Clock) is too slow on PyBoard Lite v1.0 with accelrometer
-
- Posts: 6
- Joined: Fri May 11, 2018 6:39 pm
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
Re: RTC (Clock) is too slow on PyBoard Lite v1.0 with accelrometer
Maybe 32K crystal is inaccurate.
-
- Posts: 6
- Joined: Fri May 11, 2018 6:39 pm
Re: RTC (Clock) is too slow on PyBoard Lite v1.0 with accelrometer
Is there any way to deal with it?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: RTC (Clock) is too slow on PyBoard Lite v1.0 with accelrometer
I can confirm this. On mine the error is 3.8%. This is much greater than is plausible from a crystal oscillator - I have a vague recollection that the PyBoard Lite uses a resonator in place of a crystal as a cost saving measure.
Pyboard V1.1 and V1.0 use a crystal which can be calibrated to within ~2 mins/year (+-0.0004%). The only solutions I can see are to use a Pyboard or to use an external RTC such as the DS3231.
Pyboard V1.1 and V1.0 use a crystal which can be calibrated to within ~2 mins/year (+-0.0004%). The only solutions I can see are to use a Pyboard or to use an external RTC such as the DS3231.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 6
- Joined: Fri May 11, 2018 6:39 pm
Re: RTC (Clock) is too slow on PyBoard Lite v1.0 with accelrometer
Thank you very much! I just wanted to make sure that I'm not the only one seeing it. I'm writing a data logger. One of the options would be to compensate for this error by stretching timestamps based on reference time in the end of logging period after I've downloaded data.pythoncoder wrote: ↑Mon May 21, 2018 5:37 pmI can confirm this. On mine the error is 3.8%. This is much greater than is plausible from a crystal oscillator - I have a vague recollection that the PyBoard Lite uses a resonator in place of a crystal as a cost saving measure.
Pyboard V1.1 and V1.0 use a crystal which can be calibrated to within ~2 mins/year (+-0.0004%). The only solutions I can see are to use a Pyboard or to use an external RTC such as the DS3231.
Thanks again for your response!
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: RTC (Clock) is too slow on PyBoard Lite v1.0 with accelrometer
The DS3231 is cheap, highly accurate, and there is a driver for it.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: RTC (Clock) is too slow on PyBoard Lite v1.0 with accelrometer
It should be mentioned that PYBLITE doesn't use a crystal for the RTC but an RC oscillator. However, it is pretty easy to solder in a TH crystal.