-->
Page 1 of 1

Need to improve battery life of my ESP8266 Temp Hum sensor.

PostPosted: Tue Jul 04, 2023 7:46 am
by aphlox
Hi,
I have designed a Temp-Hum sensor for my homeassistant. I am using ESPHOME I have got issues with the battery life using a 18650 2200 mah Li-on battery. It last about a month and then need to recharge it. Any ideas to improve the life of the battery? Is there any improvement to be done or is this what I should be expecting running ESP on a battery?
ESPhome conf:
wifi:
power_save_mode: none
update_interval: 1s
deep_sleep:
run_duration: 30s
sleep_duration: 10min

I'm using
    TP4056 Type-C 1S 3.7V LiPo charging board bms integrated.
    XC6203E332PR LDO regulator Output Current: 400 mA, Quiescent Current: 8 uA



Diagram:
Image
Image

Any help is appreciated.

Re: Need to improve battery life of my ESP8266 Temp Hum sens

PostPosted: Wed Jul 05, 2023 6:25 am
by btidey
I don't use EspHome myself but looking at documentation it would look like the run_duration in the config means that it will re-enter deep sleep 30 seconds after waking up. As you are waking up to measure and report every 10 minutes this means the esp8266 is awake for 5% of the time. Assuming 80mA current consumption while it is awake this would give an average consumption of 4mA. That will drain your battery in about 550 hours.

To get much better battery life you need to reduce the duty cycle of the wake to sleep time. Does it really need to be awake for 30 seconds to take the measurement and report it? If for example, you can reduce that to 5 seconds then you will reduce your average current by 6 times and get 6 times longer battery life.

Ignoring ESPHome for the moment it is possible to do a fast wifi connect, take a measurement, and report it in under 2 seconds which would give over a year of operation.

Re: Need to improve battery life of my ESP8266 Temp Hum sens

PostPosted: Wed Jul 05, 2023 11:24 am
by aphlox
It takes about 20-25 seconds for home assistant connection. Should i be using mqtt to report in 2 seconds? What is the method?