-->
Page 1 of 4

ESP8266 battery powered / charging solution

PostPosted: Mon Nov 14, 2016 6:38 am
by ErikLem
Until now I've always used AC adapters to power my ESP project. I now want to go one step further, making a battery powered project.

What I want is a ESP that I can power using a 5v ac adapter, but I also want to connect a battery (3.7v lipo) that is getting charged when the ac adapter is plugged in. Plugging or unplugging the adapter should not affect the running state of the ESP.

It seems like the TP4056 should be suitable to take care of this. I have bought a few of these boards that also include overcharge protection: https://www.aliexpress.com/item/5pcs-lo ... 12b8bb0acd

When I hook it up to the AC 5v adapter, I get about 4v out of it on the output pins, whether the battery is connected or not, so that should be good enough for the 3.3v the esp needs.

When I use a esp with ac adapter, I use a HT7333 to convert the 5v to 3.3v. I thought I would also need to do that with battery power (since 4v is more than 3.3v), but when I hook up the output pins of the TP4056 to the HT7333, I only get 3.11v out of it.

When I hook up the esp, I see it drops to below 3v, and the esp is just spitting out exceptions.
When I hook the esp up directly to the output of the TP4056, it is actually booting successful, but it seems to me that feeding the ESP with a too high voltage is not really a stable long-term solution...

I was wondering if anyone can give me some advice on how to best regulate the power that's going into the esp. Seems like I'm not going in the right direction with the HT7333.
Is there any other kind of solution for this? when I google around, I see a lot of projects directly feeding the ESP with a 3.7v lipo, but it seems to me that that is not a proper solution, since the power going into the ESP can be too high that way.

Re: ESP8266 battery powered / charging solution

PostPosted: Mon Nov 14, 2016 8:48 am
by tomte76
I successfully use nearly the same setup you described in your post. I use a TP4056 based charger-board comparable to the one you got from aliexpress. I use this battery

http://www.pollin.de/shop/dt/OTg2MTU0OT ... _HAMA.html

as it is small and fits in my sensor-case. But I also tried a Samsung ICR18650-26F with larger size and capacity. Then I use a ESP12-E module mounted on a breakout board as found here:

http://www.ebay.de/itm/PCB-Adapter-Boar ... SwLF1X~efx

You can mount a regulator on the backside of this breakout. As advised in this forum I used a XC6203E33 regulator because of its small quiescent current and low dropout voltage. My sensor uses a DHT22 sensor for humidity and temperature. The DHT22 is powered by a ESP12 GPIO so I can switch it of during DeepSleep to save energy. The sensor is running on battery since 3 weeks now and I expect it to last around 2 month before recharging.

I changed the resistor for charge current on the TP-Board as with the original value it gets very hot and I have no space for a heatsink. Charging takes around three hours. Also keep in mind that you need to remove the 0 ohm resistor on the above mentioned ESP-breakout if you use a regulator. If the battery is empty the ESP will boot up in the moment you plug the USB-charger and it keeps running if you unplug it after charging it completed.

Re: ESP8266 battery powered / charging solution

PostPosted: Mon Nov 14, 2016 10:14 am
by ErikLem
Thanks for the suggestion tomte76, do you know where I can buy the XC6203E33? I can only find them at mouser (where I have to pay a lot of shipping costs)

I also found this topic on stackoverflow, where somone seems to be searching for exactly the same thing: http://electronics.stackexchange.com/qu ... po-battery

A whole lot of different solutions are mentioned there, but only one seems to be in a package that is usable if you have to solder it by hand: TPS73633 (available on aliexpress: https://www.aliexpress.com/item/Free-sh ... 0cd4ea090c)

Re: ESP8266 battery powered / charging solution

PostPosted: Mon Nov 14, 2016 10:45 am
by martinayotte
There are many sellers of XC6203 on eBay...