ESP32 power conditioning

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: ESP32 power conditioning

Post by OutoftheBOTS_ » Tue Mar 20, 2018 9:35 pm

@RobertHH

Do you know of any IC's that do exacly the same as the LM3281 but in a bigger package.

Reading the data sheet the LM3281 sounds perfect for the application of powering a 3.3v dev board except it has 6 pins in a 1.4mm x 1.2mm package.

I can successfully solder QNF packages but this looks like the next level above a QNF

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

Re: ESP32 power conditioning

Post by Capstan » Tue Mar 20, 2018 10:59 pm

OutoftheBOTS_ wrote:
Tue Mar 20, 2018 5:44 am
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?
I agree that LiPo has some nice advantages if they can be made to work; cheap, easy to get, chargers are easy to make.

I am looking at this device;
https://www.mouser.com/ds/2/268/22056b-475378.pdf

It comes in the SOT-223-3 package like the LD1117 (a drop-in replacement which is handy for me) and they claim the quiescent current is 120uA. One downside is that the max input voltage is 6V, which means I can't use cheap 12V wall-warts for it, but for battery power it could work out fine.

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

Re: ESP32 power conditioning

Post by OutoftheBOTS_ » Wed Mar 21, 2018 2:43 am

@capstan

The LD1117 is nice as a drop in replacement without having to build a new PCB. It will also have the disadvantage of the ineffiency of a linear regulator and the problem of drop out voltage not letting you use all the battery.

The lm3281 posted by RobertHH is likely to last 3 times longer though. It is a very high freq switching regular so efficiency is not much under 100%. It also is designed exaclty for this type of application of running on all time device with a deep sleep mode. The LM3281 has 3 modes of operation, High freq PWM for high efficiency, high amp, low ripple operation. A ECO mode with lower freq for low quiescent current during very low current times like MCU in sleep and it also has a bypass mode that shuts down and bypasses the regulator when the battery gets close to the drop out voltage so that you can use the battery all the way till flat.

The big down side to the LM3281 is it is so so small that soldering it would be a specialized robot job. See pic attached, the huge componet at top of the pic is a 8050 inductor
lm3281.JPG
lm3281.JPG (52.24 KiB) Viewed 8091 times

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

Re: ESP32 power conditioning

Post by Capstan » Wed Mar 21, 2018 3:54 am

OutoftheBOTS_ wrote:
Wed Mar 21, 2018 2:43 am
The LD1117 is nice as a drop in replacement without having to build a new PCB. It will also have the disadvantage of the ineffiency of a linear regulator and the problem of drop out voltage not letting you use all the battery.
Actually the part I was talking about is the MCP1825. The LM3281 is interesting but it is relatively expensive, about 50% more than most regulators, and the package would be a lot harder to work with in a manual board assembly as you say. Dropout voltage of the MCP1825 is only 210 mV. No inductor required.

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

Re: ESP32 power conditioning

Post by OutoftheBOTS_ » Wed Mar 21, 2018 6:43 am

Ok I am fairly new to harnware but this is my understanding og it, if I am wrong somone will hopefully correct me.

Yes the MCP1825 drop out voltage is low at only 210 mV but if your regulating down to 3.3v then the regulator will stop working at 3.3v + 0.21v so round figures 3.5v. The battery will reach 3.5v about 70% of the way through its usable capacity so you can only use the first 70% of the battery before having to recharge. On top of that a linear regulator is inefficient because it regulates voltage down by burning it off as heat. A switching regulator working by switch on/off really fast then using an inductor to smooth it out best as possible.
5112a224ce395fb479000003.png
5112a224ce395fb479000003.png (24.01 KiB) Viewed 8086 times

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

Re: ESP32 power conditioning

Post by loboris » Wed Mar 21, 2018 9:27 am

OutoftheBOTS_ wrote:
Wed Mar 21, 2018 6:43 am
Yes the MCP1825 drop out voltage is low at only 210 mV but if your regulating down to 3.3v then the regulator will stop working at 3.3v + 0.21v ...
Most linear regulators (every one I've ever used) will not stop working with input voltage lower then the regulation voltage. They will just pass the input voltage (-dropout voltage) to the output.

I have successfully used this switching regulator module. It has excelent characteristics, low price, works well with input voltages from 4.5V to 24V, max current >2A, efficiency ~97%, pin and dimensions compatible with 750x regulators.
This module uses MP2315 regulator.
It can be used with 2 LiPo batteries connected in series, 4 alcaline bateries, 6 or 12V sealed lead-acid battery...

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

Re: ESP32 power conditioning

Post by Roberthh » Wed Mar 21, 2018 9:43 am

If it comes to pre-built modules: The one I favour (hint from @pythoncoder): https://www.pololu.com/product/2122 (or similar)
Size about a TO220 package. Runs with any battery, uses the TPS6306x chip from Ti (solder friendly package)

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

Re: ESP32 power conditioning

Post by OutoftheBOTS_ » Wed Mar 21, 2018 11:07 am

@laboris

I have been using a very similar MP2307 on my robots to step down the 2S 7.2v batteries to 5v for the motors and servos

@RobertHH

Thanks for the showing me the TPS6306x IC as it a little more solder friendly. It does need a couple of extra resistors to set the adjustable voltage but realistic it is much more doable my me than the LM3281
tps6306x.JPG
tps6306x.JPG (51.49 KiB) Viewed 8075 times

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

Re: ESP32 power conditioning

Post by Capstan » Wed Mar 21, 2018 3:54 pm

I'm doing some experiments today in an attempt to get a better handle on this power situation. I've got a INA219 current sensor hooked up as shown below. This is an I2C device, you can get them on Ebay for about USD $6, and there is a micropython driver for it that works very well. You put the sensor in series with your power supply (green terminal) and can easily get current readings.

https://www.ebay.com/itm/GY-INA219-High ... SwXYtYwQrB

https://github.com/chrisb2/pyb_ina219

Image

As I was saying earlier I am powering my ESP32's through a LD1117 regulator that have a dropout voltage of 1V. My typical power supply is a 12V wall-wart attached to an adjustable DC-DC buck converter that I have set to output 7.5V.

To start off with I measured the current with the 7.5V power supply. I am seeing about 123 mA to the board when it is hooked up to WiFi and in receive mode. This spikes up to about 145 mA when transmitting (a little hard to capture with 1-second samples). I am thinking that the minimum draw of the regulator alone is the 123 mA (it gets warm, obviously dissipating power) and I see that same power draw when the board is sitting idle at the Python prompt.

Then I dialed the buck converter down to 5V and repeated the experiment. The ESP32 continually resets with "brownout detector was triggered" and the power draw is about 90 mA. Obviously the LD117 needs a higher input voltage. :)

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

Re: ESP32 power conditioning

Post by Capstan » Wed Mar 21, 2018 6:01 pm

So, dialing the buck converter down to 3.3V I attached it to my homebrew ESP32 board that has no regulator and is configured to send the power input straight to the ESP32. This board was apparently damaged in one of my previous experiments. I can flash it with fresh firmware however, and in the "waiting for download" mode it draws only 17.5mA. This rises up to about 26mA while flashing the firmware, and 19mA while flashing the FatFS filesystem.

When the board was first powered up it reached the Python prompt and drew about 39mA. Unfortunately on subsequent boots it starts to continuously reset with "brownout detected" even when the input voltage is dialed up to 3.7V. and it draws from 60-110mA as it cycles. Presumably a part was damaged, and I am thinking it was the flash memory, because I can reflash the filesystem and get back to the first Python prompt again.

I ordered some LifePo4 batteries on Amazon and they should arrive soon. I'm going to assemble another board with 'raw' voltage input in the meantime, should be able to perform these tests with something that starts off in a known good state.

Post Reply