The whole thing is very simple and straightforward. We had to change a couple of things however in the code. As the deep sleep mode sets in, the loop in our code became unnecessary as the node turns on, connects to the main hub, takes and publishes the measurement and goes back to sleep. The deep sleep therefor is more of a shutdown/reset with a timer.
I have set the interval to 15 seconds to get more measurements for our tests:
|ESP8266 in deep sleep|
When the ESP8266 board wakes up it consumes a maximum of ~130mA. This process takes about 12 to 14 seconds until its done and goes back to sleep.
With ElectroDroid, a free and very useful Android app provides a neat option to calculate battery life. We are using a LiIon 18650 2600 mAh battery. This is what we got with our current estimates for time (with one measurement per hour) and consumption:
44 days is a good time giving us enough room during dark and cloudy days and for further operations like adding a battery current measurement with battery level calculation and especially if we would add firmware OTA updates.
Test data to ESP8266 power consumption: