RTC accuracy

natsnats
Posts: 1
Joined: Fri Aug 11, 2017 3:41 pm

RTC accuracy

Postby natsnats » Thu Nov 23, 2017 11:37 pm

Using the sntp example from

https://github.com/espressif/esp-idf/tr ... /sntp/main

While in deepsleep, the RTC time is wrong by 76 seconds after 3.5 hours. Is this the best that can be expected?

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: RTC accuracy

Postby ESP_igrr » Fri Nov 24, 2017 1:15 am

Internal RTC clock frequency error is about 5%. With external 32k XTAL the error will be determined by the XTAL, usually about 20-30ppm.

User avatar
Gfast2
Posts: 182
Joined: Fri Aug 11, 2017 1:52 am

Re: RTC accuracy

Postby Gfast2 » Fri Nov 24, 2017 3:47 pm

ESP_igrr wrote:Internal RTC clock frequency error is about 5%. With external 32k XTAL the error will be determined by the XTAL, usually about 20-30ppm.
Hi ESP_igrr,

Cool stuff!

https://www.dataq.com/blog/data-logger/ ... ppm-stuff/ :o
The de facto standard in the industry for crystal inaccuracy is 20 PPM
You can also express PPM as a percentage: ±20/1,000,000 = ±0.002%. So after 30 days (2,592,000 seconds) we can expect the clock to drift about ±52 seconds; after 60 days about ±104 seconds, and so on.
Cheers

Gfast2

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: RTC accuracy

Postby Ritesh » Tue Aug 25, 2020 11:35 am

ESP_igrr wrote:
Fri Nov 24, 2017 1:15 am
Internal RTC clock frequency error is about 5%. With external 32k XTAL the error will be determined by the XTAL, usually about 20-30ppm.
Hello,

We are planning to use Internal RTC with button Cell to keep updated time once External Main power will be off. So, Will it possible to get clock properly with accuracy if we will go with Internal RTC?
Regards,
Ritesh Prajapati

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: RTC accuracy

Postby ESP_Sprite » Tue Aug 25, 2020 1:37 pm

Sorry, the internal RTC does not have the capability to run off coin cell. Suggest you get the time using e.g. NTP once you power up.

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: RTC accuracy

Postby Ritesh » Tue Aug 25, 2020 4:27 pm

ESP_Sprite wrote:
Tue Aug 25, 2020 1:37 pm
Sorry, the internal RTC does not have the capability to run off coin cell. Suggest you get the time using e.g. NTP once you power up.
Thanks.

Yes. We will take time from NTP if external network connectivity will be there or will set forcefully one time when board is fresh.

But our requirement is to maintain time when board is off using RTC and once there will be power applied then it will collect updated time from RTC and set into system clock.

So for that can't it be possible using internal RTC and button cell connected with VDD3.3V_RTC? what is accuracy provided if we consider 24 hours to execute RTC without external power supply?
Regards,
Ritesh Prajapati

Franco
Posts: 101
Joined: Thu Dec 10, 2015 1:11 pm

Re: RTC accuracy

Postby Franco » Wed Aug 26, 2020 1:16 am

One solution to keep the real time accurately while minimizing power consumption is to use an external RTC like ds3231 or similar.

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: RTC accuracy

Postby Ritesh » Wed Aug 26, 2020 3:28 am

Franco wrote:
Wed Aug 26, 2020 1:16 am
One solution to keep the real time accurately while minimizing power consumption is to use an external RTC like ds3231 or similar.
Thanks.

That is our next plan if not possible to get exact accuracy with internal RTC of ESP32. Actually we don't want to extra cost overhead into our product due to lower budget.

So that my intention is to use internal RTC with just button cell holder but need to think for other option if not possible to get accuracy with internal RTC.

I have also tried to find out Internal RTC Accuracy into ESP32 Documents but didn't find it anything apart from below.

"RTC timer: Allows keeping the system time during any resets and sleep modes, only the power-up reset leads to resetting the RTC timer. The frequency deviation depends on an RTC Clock Source and affects accuracy only in sleep modes, in which case the time will be measured at 6.6667 us resolution."
Regards,
Ritesh Prajapati

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: RTC accuracy

Postby Ritesh » Thu Aug 27, 2020 4:00 am

ESP_Sprite,

Do you have any idea or clue for this? any suggestions or inputs to move further?
Regards,
Ritesh Prajapati

IrfanIslam
Posts: 1
Joined: Fri Dec 09, 2022 6:05 am

Re: RTC accuracy

Postby IrfanIslam » Fri Dec 09, 2022 6:18 am

ESP32 accuracy on main power is very good but when in deep sleep on 3.7v battery the accuracy is worse in my case it's 162 seconds for 5 hours which is not acceptable, adding external hardware like DS3231 is not good idea when to keep project size compact, small and lower cost.

Who is online

Users browsing this forum: No registered users and 117 guests