ESP32 power conditioning

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Capstan
Posts: 117
Joined: Sun Jan 29, 2017 4:03 pm
Location: Texas, USA

ESP32 power conditioning

Post by Capstan » Mon Mar 19, 2018 8:53 pm

A little off-topic for the Micropython software forum I know, but looking for some advice on how to properly supply power to the ESP32. Maybe someone will have had experience with this?

I've been using LD1117 regulators to step down power inputs of 5V and up to 3.3V for the ESP32 and that has worked fine. I am putting 10uF capacitors on the input and output of the regulator. Now I am wanting to see what is possible with 3.7V LiPo batteries or a couple of AAA alkaline batteries in series. To do that I have simply tied a charged LiPo battery to the power and ground of an ESP32 on one of my homebrew boards. The only protection is a 10uF capacitor.

I can flash firmware to the ESP32 through the serial port. At first it booted up, but now it is spontaneously resetting over and over even when I attach a regulated 3.3V power supply. I am thinking I damaged it. Should I have some additional components in series or in parallel with the power inputs to protect it?

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: ESP32 power conditioning

Post by loboris » Mon Mar 19, 2018 10:06 pm

Fully charged LiPo battery has voltage of 4.2 V and can damage ESP32 if connected directly.
The capacitor does not serve as a protection element.
You can use a silicon diode in series with the battery, the voltage will drop by 0.6V.

Much better solution is to use Low-Dropout regulator with quiescent current lower than 10-20 uA to get as much power from the battery as possible.

The only battery which can be connected directly to the ESP32 is LiFePO4.

Capstan
Posts: 117
Joined: Sun Jan 29, 2017 4:03 pm
Location: Texas, USA

Re: ESP32 power conditioning

Post by Capstan » Mon Mar 19, 2018 11:34 pm

Very helpful, thanks. I had attached a LiPo battery, which went to 3.7V under load, but probably the initial voltage was above the upper limit and damaged the ESP32. I am using a low-dropout regulator in my circuitry but hoping to not incur the loss (reportedly 20%) for long-term battery operation so I have a way to bypass it for this experiment.

LiFePo4 looks like a reasonable solution and they are not terribly expensive. The 14500 size is AA-compatible and only one would be required;
https://www.amazon.com/gp/product/B00YR ... V130&psc=1

This video talks about the various battery solutions;
https://www.youtube.com/watch?v=heD1zw3bMhw

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: ESP32 power conditioning

Post by OutoftheBOTS_ » Tue Mar 20, 2018 5:44 am

@Capstan

Thanks for posting the links.

If I understood the Youtube video with the guy with the Swiss accent correctly even though the Lipo had 20% waste in the LDO because it's capacity was so much higher than the other types of cells it still have a better size to usable capacity ratio, even better than the LiFePo4 that didn't have the 20% LDO waste.

Also not sure what charging ICs are available for the LiFePo4 batteries either.

I am quite interested in what would be the best way to make a small sized long life cheap battery power source.

What are the best LDOs for lowest drop out voltage and lowest quiescent current for deep sleep but will still provide enough current?

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: ESP32 power conditioning

Post by OutoftheBOTS_ » Tue Mar 20, 2018 7:33 am

I also wonder if you wanted to increase battery life running the ESP32 at 3v instead of 3.3v. The datasheet lists the voltage as 2.3v to 3.6v. Using a 3v LDO would allow you to use the vast majority of the Lipo battery and 3v will run most external chips you want to connect to it.

I did a bit of research about lipo vs lifepo4 and it seems that Lipo has the highest weight/size to Watt hours capacity of any chemistry. Comparing Lipo to LiFePo4 for the same size, the Lipo will be lighter with more amp hours at a higher voltage with a lower internal resistance. I suppose this explains why they are so commonly used. The main disadvantage to Lipo is it is more acceptable to thermal run away (fire)

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: ESP32 power conditioning

Post by loboris » Tue Mar 20, 2018 9:00 am

One of the usable LDOs is Holtek HT7833 with 500 mA output, 4 uA quiescent current and 360 mV dropout.

MCP1700 can sometimes be used (250 mA max output, 1,6 uA quiescent current and 178 mV dropout) with large (100-330 uF) output capacitor.

All linear regulators has power losses. The switching regulator like this one can be used to improve power effitiency.
I've used it combined with MCP1700 in a way that the switching regulator provides the power wnen ESP32 is running and in deepsleep it is disabled and MCP1700 provides the power. That way I've got the total power cunsumption (ESP32+regulators) of ~10 uA in deep sleep.

Combined LiPo/LiFePO4 battery charger like this one can be used for charging LiFePO4 batteries.

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: ESP32 power conditioning

Post by OutoftheBOTS_ » Tue Mar 20, 2018 9:32 am

I think drop out voltage will govern usable battery life a lot becuase if the drop voltage is too high then the regular will shut down long before you have used the capacity of the battery.
5112a224ce395fb479000003.png
5112a224ce395fb479000003.png (24.01 KiB) Viewed 9931 times
A Lipo should be discharged below 3v as it both damges the battery and can lead to fire when charging the battery from that low.

If you have a drop out voltage of 0.3v and the output is 3.3v then you can't use the battery below 3.6v which would be lucky to be 30% of the usable capacity of the battery.

If you have a drop out voltage of 0.2v and the output is 3v then you can use the battery down to 3.2v which is about 95% of the usable capacity. That's 3 times the running time between charges.

@Laboris the switching buck converter u linked I think uses a MP2307 chip which has max duty cycle of 90% meaning a drop out voltage of 10% of input voltage so on a Lipo that would be over 0.3v as well.

Has anyone experimented with running a ESP32 on 3v for the purposes of being able to use 95% of a Lipo battery???

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: ESP32 power conditioning

Post by OutoftheBOTS_ » Tue Mar 20, 2018 9:40 am

Another really interesting way of increasing battery lifetime would be to have a circuit that runs though a LDO to drop the voltage while the battery was highly charged but when the battery dropped below 3.6v then to have a mosfet to bypass and shut down the LDO so then the power loss and dropout voltage would no longer be a problem :)

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ESP32 power conditioning

Post by Roberthh » Tue Mar 20, 2018 11:47 am

Some voltage regulators like the lm3281 have a built-in bypass transistor. http://www.ti.com/lit/ds/symlink/lm3281.pdf

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: ESP32 power conditioning

Post by OutoftheBOTS_ » Tue Mar 20, 2018 12:31 pm

@Roberthh

That is quite an impressive performance, mind it looks unusual to solder. I have booked marked it and am going to have a good read of the datasheet

Am I reading it right when it says Input from 3v to 5v with output of 3.3v up to 1.6amp with switching converter efficiency of over 90%
6Mhz high freq so only need small inducotor?

Do you know if the ripple during the low current eco mode affects the ESP32 in sleep mode or is the ESP32 fine with the ripple??

Post Reply