-->
Page 1 of 2

ESP-01 + AM2320 starts sending false data after a while

PostPosted: Mon Apr 29, 2019 4:50 pm
by Londik
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?

Re: ESP-01 + AM2320 starts sending false data after a while

PostPosted: Tue Apr 30, 2019 5:21 am
by QuickFix
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

Re: ESP-01 + AM2320 starts sending false data after a while

PostPosted: Tue Apr 30, 2019 3:53 pm
by Londik
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?

Re: ESP-01 + AM2320 starts sending false data after a while

PostPosted: Thu May 02, 2019 2:07 pm
by Londik
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?