So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Londik
#82073 Hi


I have four ESP-01 modules connected to AM2320 temp/humidity sensors. I have made the "DeepSleep mod" and after sending temp and humidity info over WiFi, they go to DeepSleep for 30min. Power comes from 18650 batteries that last several months that way.

The problem is, that after a while (few days to few weeks) eventually all of the ESP-01 modules start sending false data (2147483648 for temp and 2147483647 for humidity), which appears to be maximum value for 32bit data, until I disconnect the battery for some seconds. Then, after reconnecting the battery it's all good again for few days to few weeks.

What could be the problem or solution to the problem? Could it be hardware related or software related? My first thought was to add a function to the code that resets the ESP-01 every day or so, but recovering from DeepSleed should also reset the module?
User avatar
By QuickFix
#82080
Londik wrote:but recovering from DeepSleed should also reset the module?

Recovering from deep sleep is indeed "Just" a restart of the ESP: you connect GPIO16 to the reset-pin and internally GPIO16 is set as a timer that will trip when the set time-out expires.

But... do you also reset/initialize the AM2320 at every start up?
flowchart.png
You do not have the required permissions to view the files attached to this post.
User avatar
By Londik
#82088 I use DHTesp library:

https://github.com/beegee-tokyo/DHTesp

Every startup i call dht.setup function which is used to: "Call to initialize the interface, define the GPIO pin to which the sensor is connected and define the sensor type"

What I don't use is the resetTimer() function. May that help?
User avatar
By Londik
#82120 I use the DHTesp library:

https://github.com/beegee-tokyo/DHTesp

Every startup I use the setup() function, which is to "Call to initialize the interface, define the GPIO pin to which the sensor is connected and define the sensor type."

What I don't use is the resetTimer() function. Might that help?