Background

 

In my previous Blog: https://www.element14.com/community/people/neilk/blog/2019/02/14/investigating-the-power-consumption-of-a-wemos-d1-mini-esp8266

 

I described my investigations into the power consumption of a Wemos d1 mini ESP8266 device, powered by an 18650 2400mAh Li-ion battery, via a Wemos battery shield which has the same form factor as the d1 mini. The Wemos was reading from two DS18B20 temperature probes and also reading the battery voltage at 1 minute intervals. All 3 data items were uploaded to my private server via a  single POST command, using a single php script, which wrote the temperature data to one log file and the battery voltage data to a second log file.

 

The original sketch had used 2 separate POST commands; the change to a single server call dramatically reduced power consumption. An early assessment suggested that the system might run for about 100 hours before the battery voltage dropped to around 3.6V., This figure was chosen because this article indicated that the author's device stopped working at 3.56V: https://arduinodiy.wordpress.com/2017/01/02/reviewing-the-wemos-battery-shield/. This is despite the claim by Wemos that the shield would continue to power the d1 mini with a battery voltage as low as 3.2V

 

Results

 

I ran the test for 90 hours, by which time the battery voltage had fallen to around 3.53V. The good news is that the system was still working, even though the voltage had fallen below 3.56V. The slightly disappointing news is that we didn't get to 100 hours by 3.6V

Battery Voltage Sleep 5

 

The various spikes and glitches in the graph are caused by minor physical disturbances to the test circuit. My work area is pretty cramped and the test setup is a bit of a delicate "rats nest". Note to self - order up some proper battery connectors and reduce the number of dodgy connection points in the system!!

 

Conclusions

 

The power consumption was more or less within the estimated region.

 

Further optimisation of the sketch may reduce the power consumption.

 

Longer intervals between readings - eg 5 or 10 minutes will almost certainly reduce power consumption.

 

Watch this space.......................