izeman wrote: ↑24 Nov 2019, 12:28
[...]
It's set to wake up every 10min. With ESPEASY it takes very long to obtain an IP, send the measurement to MQTT and power down again. So it's about 5s, that's around 30s every hour. And it will be consuming 0.08mA for 3600s (-30s).
So it consumes 30x80 + 3600x0.08 mA = 2688mAs or 0.747mAh. Correct? That would mean it could run 167days or around half a year.
[...]
Let's work out the average current over the period of an hour.
That's (30 * 80 + (3600 - 30) * 0.08) / 3600 = 2685.6 / 3600 = 0.746 mA on average.
So it is indeed 0.746 mAh over the period of one hour.
Let's assume you can actually use 50% of battery capacity, then you only have 1500 mAh to consume, which is roughly 2000 hours (~80 days)
First question: Is your assumption correct that the ESP is on for 5 seconds on average?
Second: Is your assumption correct that the average "on" current is 80 mA?
With these assumptions (30 sec on time per hour @80 mA), you're using 10x as much as during sleep.
So I would first focus on the "on time".
I think the 80 mA estimate is quite a good one, as I also see about 70 mA when the ESP is connected.
You could enable "eco" mode, which does drop the current to roughly 30 - 50 mA, but that happens only after a while and then you're already back to sleep.
I think your setup would benefit the most from no longer having to wait for DHCP and being able to reconnect to the last known BSSID/channel.
Still, it could be the "on time" will not be shortened by the amount of time needed to connect to WiFi, as the sensors need to be read and the data to be sent.
Maybe you can also have a look at the capacitors used over the 3v3 line, to help the voltage regulator, since it is only capable of 250 mA.
When performing RF calibration, the ESP does draw a lot more current, so maybe it is actually crashing and rebooting a few times?
Adding more (or larger) capacitors may also not be the solution here, since charging empty capacitors is almost like a short circuit.
Do you have some tools to measure the actual power consumption in mAh?
For example some of those USB meters?
Something like this one:
https://www.aliexpress.com/item/3296830 ... 373cYbynE2
Too bad the high resolution one (the TC66 I linked) only has an USB C connector on the output, which makes it hard to connect.
The older one (
UM25) has more usable connectors, but less resolution (10 uA vs. 100 uA resolution)
But both should be able to give proper readings around the 80 mA range.