-->
Page 1 of 3

Best way to battery power ESP-12 and to monitor battery life

PostPosted: Wed Apr 27, 2016 7:59 am
by ErikLem
Around my house I have several esp-12 running with temperature (DS18B12) and humidity (SI7021) sensors on them. they run a http server and when I do a http request to them I get the temp/humidity values back in plain text.

I read the sensors every minute to store the values in a database. Currently all of the modules are powered from the mains, using 5v adapters and LM1117 to convert to 3.3v.

I was wondering what would be the bast way to make the same kind of sensor battery powered. I can of course use some aa batteries and the LM1117, but I'm guessing that's not the most efficient way.

What kind of batteries should I use (preferably rechargeable) and is there a way to monitor the battery life?
Is it even possible to get a proper battery life while reading the sensors every minute?

Re: Best way to battery power ESP-12 and to monitor battery

PostPosted: Wed Apr 27, 2016 8:29 am
by martinayotte
With batteries, don't use LM1117, since this LDO has a big quescient current, it will drain your battery even if ESP is in deepSleep().
You can use SPX3819, or even better HT7333 or XC6203 instead.

Re: Best way to battery power ESP-12 and to monitor battery

PostPosted: Wed Apr 27, 2016 10:43 am
by lethe
For a battery powered system, you are using the wrong network topology.
A sensor should not act as server, instead it should push its data to a server in regular intervals and use deep sleep between measurements. Also to increase battery life, you should increase the intervals and/or accumulate data by waking with RF disabled and sending the accumulated readings every hour or so.

As for batteries: there's a huge thread on this, which you should check out.

Re: Best way to battery power ESP-12 and to monitor battery

PostPosted: Sat Jun 04, 2016 1:39 pm
by ErikLem
A few weeks down the road, and some ali-express parts further down the road, I'm picking this project up again :)

I'm switching the network topology so that the esp powered sensors will push the data and then go back to deep sleep.
I now have some CN18650 batteries that should be able to provide enough power to get the ESP going. I've also ordered a few HT7333 modules, since the battery could deliver 4.5v at full charge wich the ESP would not like.

One thing I would like to be able to do is check the battery life of the ESP, so that I can send a notification if charging is required. What would be the best way to do this? I can use a voltage divider to scale 4.5v down to 1v and feed it to the ADC, but I'm wondering if that would give me any usable readings. Any ideas?

lethe: Can you give me a link to that batteries tread? I'm unable to find it.