WROOM32 Board RTC drifting
WROOM32 Board RTC drifting
Hi guys,
I have this board https://www.banggood.com/ESP32-Developm ... 09512.html which wakes up every 2 minutes and goes to deep sleep again. Im syncing the time daily using the sntp example but the time is drifting 1 minute every day. Im trying to minimize the network activity to save battery power so dont want to sync it too often. Is there any rtc calibration which im missing in the docs or the only solution is to sync it 2-3 times a day?
I have this board https://www.banggood.com/ESP32-Developm ... 09512.html which wakes up every 2 minutes and goes to deep sleep again. Im syncing the time daily using the sntp example but the time is drifting 1 minute every day. Im trying to minimize the network activity to save battery power so dont want to sync it too often. Is there any rtc calibration which im missing in the docs or the only solution is to sync it 2-3 times a day?
Re: WROOM32 Board RTC drifting
I forgot to mention that my CPU is downed to 80MHz but im not sure if this affects the RTC.
Re: WROOM32 Board RTC drifting
I faced same problem some time ago.
This time drift is due to the bad precisión of the internal RTC clock, which is derived from the main clock I believe.
I think you have two options here:
1. Use an external RTC crystal connected to ESP32 at the corresponding pins and configure ESP32 to use this RTC clock
2. Try to calibrate the drift you are seeing, but this has to be done for each unit and at different temperatures... then you should use an external temperature sensor (or also try to calibrate the internal temperature sensor). By calibration I mean: you measure time drift during 24h at X temperature avg, then at the end of the day you always add/remove that time drift from your ESP32 time.
This time drift is due to the bad precisión of the internal RTC clock, which is derived from the main clock I believe.
I think you have two options here:
1. Use an external RTC crystal connected to ESP32 at the corresponding pins and configure ESP32 to use this RTC clock
2. Try to calibrate the drift you are seeing, but this has to be done for each unit and at different temperatures... then you should use an external temperature sensor (or also try to calibrate the internal temperature sensor). By calibration I mean: you measure time drift during 24h at X temperature avg, then at the end of the day you always add/remove that time drift from your ESP32 time.
Re: WROOM32 Board RTC drifting
Thanks, luisonoff
Point 1) will be hard to implement i think because there is not free space on the board. I will probably try to calibrate it or just sync the time every hour.
Point 1) will be hard to implement i think because there is not free space on the board. I will probably try to calibrate it or just sync the time every hour.
Re: WROOM32 Board RTC drifting
Damn, i am currently using the Wemos Lolin32 (not the lite version)for a project where it just wakes up once a day. It also has a WROOM32. Is ist also affected by this drift? Can you tell me if you mean +1 minute or -1minute ?
Re: WROOM32 Board RTC drifting
Almost +1 minute but i didn't calculate the seconds. This might be just my chip. Now im syncing it hourly and works fine.
Re: WROOM32 Board RTC drifting
Can you tell me how to activate RTC? I used "make menuconfig" and activated the RTC in the settings. Now I have the message: "still waiting for 32k oscillator to start up"meneldor wrote:Almost +1 minute but i didn't calculate the seconds. This might be just my chip. Now im syncing it hourly and works fine.
I have a Wemos Lolin32 which also has a WROOM32. I let him sleep exactly 86400 seconds via esp_deep_sleep_start. 86400 seconds are 24 hours. My ESP was waking up 15 minutes too early. What am I doing wrong?
Last edited by Kazuya91 on Fri Apr 20, 2018 4:44 pm, edited 1 time in total.
Re: WROOM32 Board RTC drifting
If your board does not have 32.768 crystal, 32 kHz oscilator cannot operate, no use of enabling it in menuconfig.Kazuya91 wrote:Can you tell me how to activate RTC? I used "make menuconfig" and activated the RTC in the settings. Now I have the message: "still waiting for 32k oscillator to start up"
Re: WROOM32 Board RTC drifting
My board is a WEMOS Lolin32. Does it have a 32khz oscilator?loboris wrote:If your board does not have 32.768 crystal, 32 kHz oscilator cannot operate, no use of enabling it in menuconfig.Kazuya91 wrote:Can you tell me how to activate RTC? I used "make menuconfig" and activated the RTC in the settings. Now I have the message: "still waiting for 32k oscillator to start up"
Re: WROOM32 Board RTC drifting
No. SchematicsKazuya91 wrote:My board is a WEMOS Lolin32. Does it have a 32khz oscilator?
Who is online
Users browsing this forum: No registered users and 58 guests