I'm having an issue with my ESP12 module and RTC DS3231. I've created a captive portal on the ESP for configurations, and the RTC handles time-related operations. Twice now, the captive portal has failed to load, despite everything else working fine.
This morning, the portal wasn’t loading even after restarting the ESP. However, when I removed the RTC battery, the portal started working. I then reinserted the battery, and everything was fine.
Can anyone help me understand why this is happening and how to prevent it in the future?
The problem happens twice now: captive portal fails to load while everything else works fine. Restarting the ESP doesn't help. Removing and reinserting the RTC battery fixes it temporarily.
Setup: ESP12E with captive portal, RTC DS3231 for time ops. No recent code/circuit changes.
Using EspAsyncWebserver library for captive portal.
What else is needed to post here?
The code isn't the problem cz there are no changes in the code & also it isn't postable here as it is very long.
& I powered the ESP with a circuit which can handle load of 1 amp (I don't think ESP & RTC will take .ore than that.
I didn't understood that what is connection between CAPTIVE Portal & battery of the RTC?
Doesn't look like there isn't any information related to them.
Does your code do something differently, particularly during setup(), if it finds the DS3231 does not have a valid time/date? That could be affecting the startup of your captive portal.
Nope, My code doesn't have any condition to start the captive portal, the ESP Starts & first thing it does it start serial monitor & start captive portal & define the web endpoints.
Actually the problem is this behaviour isn't regular, this happened twice since 2 months.
& I am manufacturing a commercial product...
As this issue doesn't occur everytime, I am unable to check that doing any changes is helping me or not....
I posted the question here so any expert will help me to figure out the actual problem or root cause or to check that did anyone else faced this issue before so they can guide me...
& I would like to mention one thing that my colleague was connected to the captive portal & it crashed suddenly & after that it started working after reinserting the battery.
Don't know. You may have other unknown problems with your wiring, power, and code but the battery problem is a known issue with the DS3231 module.
It should give the same error everytime.
Not necessarily, Charging a non-rechargable battery will have unpredictable results. It could take days/weeks/months before the battery malfunctions and it may or may not recover.
Without knowing how the RTC is used in the code, it’s hard to speculate on what the problem is. Could have nothing to do with whether or not the RTC has a battery, but something to do with how the date/time is used in the code.
When the problem occurs, does removing the battery, without powering off the ESP8266, then hitting reset, fix the problem? Or is a complete power cycle necessary?