Page 1 of 1

ESP-12 RTC Accuracy

Posted: Mon Mar 13, 2017 11:42 pm
by devnull
I am using the in-built RTC on the 8266 to deepsleep for an hour, but it seems to be highly inaccurate, although it's repeatability seems to be OK.

Code: Select all

    secs = 3600
    rtc = mc.RTC()
    rtc.irq(trigger=rtc.ALARM0, wake=mc.DEEPSLEEP)
    rtc.alarm(rtc.ALARM0, (secs*1000))
In sleeping for 1 hour, it wakes up on average 108 seconds early, this seems to be a huge error and of course in 1 day this would be roughly 43 minutes a day assuming that the error is cumulative.

Can the clock be so inaccurate ??

Other than adding a multiplication factor into the sleep time code, is there away to calibrate / adjust the rtc ?

Re: ESP-12 RTC Accuracy

Posted: Tue Mar 14, 2017 8:54 am
by filipmar.mf
I have the same observation. My "hour" has 57.5 min with amazing second precise repeatabilty with small minute variation time to time. Very strange behavior :?

Re: ESP-12 RTC Accuracy

Posted: Tue Mar 14, 2017 10:27 am
by pythoncoder

Re: ESP-12 RTC Accuracy

Posted: Tue Mar 14, 2017 1:56 pm
by devnull
Peter - thanks, but after reading through that it appears that the issue was fixed ??

https://github.com/micropython/micropython/pull/2726

Re: ESP-12 RTC Accuracy

Posted: Wed Mar 15, 2017 9:10 am
by pythoncoder
You haven't followed the chain to its end ;) See https://github.com/micropython/micropython/pull/2728. It has not yet been reviewed and accepted.

Re: ESP-12 RTC Accuracy

Posted: Fri Mar 17, 2017 12:16 pm
by devnull
Does not look like this is going to happen, 2728 has been closed / terminated, what a shame.

:(

Re: ESP-12 RTC Accuracy

Posted: Fri Mar 17, 2017 3:55 pm
by pythoncoder
You can always fetch the PR and build it yourself. But it would be good to see it reviewed and merged.