Time is delayed sometimes when power of the device is off
Closed this issue · 3 comments
i am using rtc DS3231 module and your library with esp32- WROOM in my project .... Sometimes, when the power gets cutoff, the time gets delayed from few minutes to hours... Now the main issue is when i to test myself and turn off the device , the time is not changed...Means this behaviour is random, sometimes it does delay sometimes not..... I changed the batteries of rtc module still the issue is there....Please give some solution to this ... THank you in advance
I have been using your library for Ardiuno uno and mega microcontrollers... It works fine .... In esp32 only change i do is instead of using vcc as 3.3v esp32 pin i used direct 5 volt from the power supply... Do you think it can make this unusual behaviour...If so , can i directly use 3.3 volt esp32 pin to power rtc?
can i directly use 3.3 volt esp32 pin to power rtc?
It depends on the used hardware, I2C SDA/SCL pull-ups and if a voltage regulator exists. There are many fake/cloned chips around which can cause random problems on lower voltages.
Suggestions:
- Test on a AVR like UNO or Mega at 3.3V or test with a different DS3231.
- Always check the return boolean of
getTime()
andread()
, when it returnsfalse
, the time is invalid. If the time is behind, it is a hardware issue and not related to this library as these functions directly reads the DS3231 registers and are not touching the wall clock.
Success.