Supply power to ESP8226 with a phone external battery

Is it possible to power this esp8266 board (D1 Mini NodeMcu) with this external phone battery?

The battery provides a 5V current. There is a 5V pin on the esp8266 board. How should I connect the two? Do I risk smoking my esp8266?

with USB cable

Cut a USB cable and use the Red (+) and Black (-) wires to power your 5V device. Leave the data wires unconnected. The ESP8266 is a 3.3V device so the "5V" pin typically goes to a small 3.3V regulator, like the device marked "4A20" near the 5V pin.

johnwasser:
Cut a USB cable and use the Red (+) and Black (-) wires to power your 5V device. Leave the data wires unconnected. The ESP8266 is a 3.3V device so the "5V" pin typically goes to a small 3.3V regulator, like the device marked "4A20" near the 5V pin.

why? the Wemos has a mini usb connector

Juraj:
why? the Wemos has a mini usb connector

I’m new to this and I am confused about something: I thought this USB cable was for connecting the device to a computer to be able to program it (with the Arduino IDE for example). Is it also possible to just plug it to an external battery to simply provide power to the device?

Yes.

Yes you can just plug the USB cable to that socket. It's connected to the on board regulator.

But fair chance it won't work for long: those phone charging batteries have the habit of switching off the output when the power draw is too low (the 300-400 mA drawn by a small air pump is not enough to keep mine active).

wvmarle:
Yes you can just plug the USB cable to that socket. It’s connected to the on board regulator.

But fair chance it won’t work for long: those phone charging batteries have the habit of switching off the output when the power draw is too low (the 300-400 mA drawn by a small air pump is not enough to keep mine active).

That’s very good to know. I’m working on my super-low power consumption project (foosball game detector).

I want my power draw to be in the 50-150mAs when the chip is working and under 80uAs when the chip is in deep sleep (most of the time).

I guess I need to buy a LiPo battery?

Yes, just get a regular LiPo battery - make sure it has the protection electronics in place and that you have an appropriate charger (the circuit is really simple, just an IC with a few extra components - you can build it into your project of you like). Adafruit has a range of such batteries on offer.

Would a rechargeable Li-Ion battery like this one work in my situation? The ESP8266 needs a 3.3V voltage but this one is 3.7V. Considering I'm using a raw ESP-12F (i.e. not a dev board like nodeCMU), should I use a voltage divider to bring the voltage down to 3.3V? Which one would you recommend?

I meant "voltage regulator". As per this SparkFun tutorial, a voltage divider should not be used to supply power.

Yes you need a regulator - when fully charged those batteries are more like 4.3V, OTOH they will cut out when dropping below 3.2V or so.
Look for a regulator with low drop-out to keep the voltage up.

I found this voltage regulator, called AMS1117. Looks similar to this one (LD1117V33) sold on SparkFun. Would that be fine?

Regarding the cut out, if I understand correctly from my research, it is an internal mechanism to prevent the battery from getting empty. Is that right? Should I be worry about that? If I have a 8800mAh battery, I can just consider its capacity is around 70% what's branded and assume I have a ~6000mAh capacity battery. Is that the good way of thinking?

That regulator works fine but has a 1.1V dropout. That's too much for your application.

Look for e.g. the MIC5225 (150 mA output, 310 mA dropout) or the RT9013 (up to 500 mA, 250 mV drop-out). Do try to find one on breakout board, unless you know how to hand solder SOT23-5 packages.

The second is probable more suited for the ESP8266 which can draw peak currents >200 mA when using WiFi communications. You can also help out the regulator big time by adding a big capacitor at the output side - the values given in the datasheets are basically minimum suggested values, the ESP should have at least 100 µF on the input for stability.

The cut-off should be included in the battery (check for this! Not all of them have it) and it is to prevent it from breaking down.

wvmarle:
Look for e.g. the MIC5225 (150 mA output, 310 mA dropout) or the RT9013 (up to 500 mA, 250 mV drop-out). Do try to find one on breakout board, unless you know how to hand solder SOT23-5 packages.

The second is probable more suited for the ESP8266 which can draw peak currents >200 mA when using WiFi communications. You can also help out the regulator big time by adding a big capacitor at the output side - the values given in the datasheets are basically minimum suggested values, the ESP should have at least 100 µF on the input for stability.

The cut-off should be included in the battery (check for this! Not all of them have it) and it is to prevent it from breaking down.

Thank you for all that info. You're preventing me from making so many mistakes.

I don't feel confident hand soldering SOT23-5 packages because I didn't know what it was before you mentioned it. I would love to find a good breakout board that includes a RT9013 voltage regulator but I can't find one by searching on the net. Any suggestion on a breakout board that would do the work here?

Looking at the specs of the RT9013, I see the maximum output voltage is 2.85V. Isn't that a problem for the ESP that expects a 3.3V voltage? Just shooting questions.

The RT9013-33 produces 3.3V. As with all regulators, there are multiple versions for different voltages. I have them on hand, haven't tried them out.

The MIC5225 I used for a PCB with a.o. a BMP280 - it regulates 5V down to 3.3V, but when supplied with 3.3V it outputs about 3V which is still good for that sensor. Great for such multi-voltage boards, nice and compact and the 150 mA is enough.

Breakout board for the SOT23 form factor here.

I'm sure you can find them a lot cheaper.
Still some hand soldering to do of course. It's not that hard, really. I've soldered SOT23-3 on perfboard, fits nicely in between the holes. Can't do that with the SOT23-5 of course. Check Youtube for videos demonstrating how to do it (you need a steady hand, tweezers, a decent soldering iron - though a 40W unregulated one works as well, that's how I did it - and maybe some desoldering wick).

I think in your case the RT9013 is the best choice of the two as it can handle higher currents, and the ESP can draw peaks. Most of the time it will draw little current so you shouldn't have a heat problem.

I selected these two types based on cost and availability. The MIC5225 is used by Adafruit in their breakout boards. The RT9013 I think I found on Digikey, looking for small low drop-out regulators.

The AMS1113 is good for if you're powering the ESP off a 5-12V source, as it can handle the higher voltage and is a bigger package so better to deal with the heat.