Best Battery for ESP8266 microcontroller

In this article you learn what is the best battery for the ESP8266 microcontroller.

First I describe the different voltage levels on the ESP8266 board to avoid magic smoke and a damage of the microcontroller.

On top of all this content, you learn which batteries need a voltage regulator and how to use such a regulator.

Battery Thumbnail

Table of Contents

The best Battery for the ESP8266

We have to differentiate between a EPS8266 NodeMCU and an ESP8266 WeMos D1 because the microprocessor is for both boards the ESP8266 but the electrical components of the microcontroller are different.

For the NodeMCU my recommendation is the LiFePO4 battery because you do not need any extra voltage regulator between the ESP8266 and the battery and they are rechargeable. Also LiFePO4 batteries have a high capacity up to 6,000mAh, that gives your project a long lifetime in combination with a power mode that reduces the power consumption to a minimum.

If you own a WeMos D1 Mini I recommend you to buy a LiPo battery with JST connector in combination with the battery shield. With this combination you do not need an extra voltage regulator and also you can charge the LiPo battery with the USB connector of the battery shield.

In the following article we deduce the recommendations and research the most used batteries for microcontrollers. In every chapter we take a look at the NodeMCU as well as the WeMos D1.

Overview of ESP8266 Voltage Levels

Before we analyze the different kinds of batteries of the microcontroller, we have to deal with the voltage levels of the microprocessor. This is important because we to not want to damage the ESP8266 due to a voltage overload.

The following table show the different voltage levels of the ESP8266.

MicrocontrollerMinimum VoltageTypical VoltageMaximum Voltage

The microprocessor runs at 3.3V and has a minimum operating voltage of 2.58V and a maximum voltage of 3.6V.

Maybe you already know that a USB connection has a voltage of 5V. But how is it possible that the NodeMCU as well as the WeMos D1 can be powered via a 5V USB connection although the maximum voltage is 3.6V. This is possible by a voltage regulator. The following picture shows the overall voltage levels of the ESP8266 NodeMCU and WeMos D1.

ESP8266 NodeMCU Voltage Levels

ESP8266 NodeMCU voltage levels and maximum current

The NodeMCU has a build in AMS1117 3.3V voltage regulator that transforms the input voltage from the 5V USB connection as well as the voltage of the VIN pin to the stable 3.3V output voltage.

The following table shows the technical specifications of the AMS1117 voltage regulator.

Voltage RegulatorOutput VoltageMaximum Input VoltageMaximum Output Current

From the table you see that the maximum input voltage is 15V. But this high input voltage would damage the regulator in continuous operation mode. Therefore a maximum voltage of 12V is recommended. Also the minimum voltage for the VIN pin is 7V to ensure a maximum output current of 1A.

ESP8266 WeMos D1 Mini Voltage Levels

ESP8266 WeMos voltage levels and maximum current

Compared to the NodeMCU, the WeMos D1 has another voltage regulator.

Voltage RegulatorOutput VoltageMaximum Input VoltageMaximum Output Current

The ME6211 has a maximum input voltage of 6V on the 5V pin and also a lower maximum output current of 500mA. But the lower output current is no problem, because also when the ESP8266 uses the WiFi communication, the current consumption is lower than 500mA.

Now we know the parameters of the NodeMCU VIN pin as well as the 5V pin of the WeMos D1. For both microcontroller there is also the possibility to power the ESP8266 on the 3.3V pin.

In the next part of this article we review the most used battery types and if it is reasonable to use the battery either on the NodeMCU or in combination with the WeMos D1.

Microcontroller Datasheet eBook

The 35 pages Microcontroller Datasheet Playbook contains the most useful information of 14 Arduino, ESP8266 and ESP32 microcontroller boards.

AA Alkaline Batteries for ESP8266

AA Alkaline Batteries CriteriaSpecification
Minimum discharge voltage1V
Working voltage1.5V
Maximum charge voltage1.65V
Number of recharges500
Energy density80 Wh/kg

AA Alkaline batteries have a low energy density compared to all other possible batteries. Therefore a battery powered project would not last a long time. The combination of two AA alkaline batteries have a working voltage of 3V and from the last chapter we know that we can power the ESP8266 via the 3.3V pin with this battery combination. But at around 50% capacity the voltage of two AA alkaline batteries drop to around 2.4V and is therefore very near the minimum voltage of the ESP8266 with 2.3V. If the current consumption of the microcontroller is around 250mA, the lifetime of your project is only around 14 hours.

Summarizing all this reasons, I can not recommend to use AA alkaline batteries for your ESP8266 microcontroller.

LiFePO4 Battery for ESP8266

LiFePO4 Battery​ CriteriaSpecification
Minimum discharge voltage2.5V
Working voltage3.0V...3.2V
Maximum charge voltage3.65V
Number of recharges5000
Energy density90 Wh/kg … 160 Wh/kg

The lithium iron phosphate battery (LiFePO4 battery) has a nominal voltage of 3.2V and a maximum voltage of 3.65V. The main advantage of a LiFePO4 battery is the very flat discharging curve so that the voltage drops very slowly during the discharging process. Because the maximum voltage of the lithium iron phosphate battery is with 3.65V only slightly higher than the maximum operation voltage of the ESP8266 with 3.6V, you can connect this type of battery directly with the 3.3V pin of the microcontroller.

In summary a LiFePO4 battery is very suitable for the ESP8266 and I recommend to power the NodeMCU as well as the WeMos D1 with a LiFePO4 on the 3.3V pin.

LiPo and Li-ion Battery for ESP8266

LiPo and Li-ion Battery​ CriteriaSpecification
Minimum discharge voltage2.7V...3.0V
Working voltage3.7V
Maximum charge voltage4.2V
Number of recharges5000
Energy density100 Wh/kg … 265 Wh/kg

The maximum voltage of LiPo and Li-ion batteries are around 4.2V and too high to connect directly to the 3.3V pin. Therefore you need a low-dropout or LDO regulator that reduces the battery voltage to 3.3V. The MCP1725T-3302E/MC LDO fits perfect to the ESP8266 in combination with a LiPo or Li-ion battery. In the last chapter of this article you find a detailed explanation how to use the LDO regulator in combination with a battery and the ESP8266.

If you have a WeMos D1 Mini, there is also a battery shield available that enables the WeMos D1 Mini to connect directly to a LiPo battery without the need of a voltage regulator. This battery shield has a JST (Japan Solderless Terminal) connector that is used with most LiPo batteries. Moreover the shield has a Micro USB port to charge the connected LiPo battery.

AAA NiMH Batteries for ESP8266

AAA NiMH Batteries​ CriteriaSpecification
Minimum discharge voltage0.8V
Working voltage1.2V...1.25V
Maximum charge voltage1.4V
Number of recharges1000
Energy density60 Wh/kg … 120 Wh/kg

There is also the possibility to power the ESP8266 with four AAA batteries. Make sure you buy NiMH batteries because they are rechargeable and have the highest energy density. Four AAA NiMH batteries connected in series have an operating voltage of 4.8V…5V that is too high to power the ESP8266 directly.

For the NodeMCU the operating voltage is also to low for the VIN pin, that requires a minimum voltage of 7V but the voltage regulator of the WeMos D1 can handle the input voltage until the battery has only a voltage of 4V.

But like for the LiPo and Li-ion batteries there is also the possibilities to use the same LDO regulator that reduces the input voltage of maximum 6V to 3.3V and use the 3.3V pin of the microcontroller.

Compared to the LiPo and Li-ion batteries, NiMH batteries needs the same connection to the NodeMCU microcontroller and do not provide a JST connector for the WeMos D1 Mini battery shield. Additionally NiMH batteries have a lower energy density and therefore I do not recommend to use the NiMH batteries in combination with the ESP8266.

9V Alkaline Block Battery for ESP8266

9V Alkaline Block Battery​ CriteriaSpecification
Minimum discharge voltage6V
Working voltage9.0V
Maximum charge voltage9.9V
Number of recharges500
Energy density80 Wh/kg

With a 9V block battery, you can use the VIN pin of the ESP8266 NodeMCU, that is internal connected with the 3.3V AMS1117 voltage regulator and therefore you need no external components. But because a 9V alkaline block battery is nothing else than 6 AA alkaline Batteries connected in series, you have the same step discharging curve resulting in a short lifespan of your battery powered system. Therefore I do not recommend to use a 9V Alkaline block battery.

For the WeMos D1 you can not connect the 9V battery to the 5V pin because the maximum input voltage of the WeMos voltage regulator is 6V. Therefore you would need another voltage regulator to reduce the 9V input voltage to either 6V for the 5V pin or 3.3V for the 3.3V pin. In my opinion this combination make no sense because we have found better combinations in this article and the energy density of the 9V battery is also low compared to the LiPo Li-ion or LiFePO4 batteries.

Low-dropout Voltage Regulator for ESP8266

The MCP1725T-3302E/MC fits perfect to the ESP8266 in combination with batteries has have a maximum voltage higher than 3.6V. The following tables shows the fundamentals of the LDO datasheet and explains why these fundamentals match perfect to the ESP8266.

Output voltage3.3VThe regulator needs an output voltage equal to the operating voltage of the ESP8266 that is 3.3V.
Output current500mAIt is also important that the LDO has an output current of 500mA because the ESP8266 needs around 450mA during the WiFi communication and in the datasheet of the ESP8266 an output current of 500mA is recommend.
Maximum input voltage6VWith a maximum input voltage of 6V, we are able to combine the LDO with the 3.7V LiPo and Li-ion batteries as well as the 5V AAA NiMH batteries.
Minimum input voltage2.3VThe minimum input voltage should match the minimum operation voltage of the ESP8266 which is 2.3V.

If you want to know how to reduce the power consumption of the ESP8266, visit the article where you learn to reduce the overall power consumption to a minimum to run you project on one battery charge for more than a year.

If you have any questions about the different batteries and how to use them, please use the comment section below to ask your questions. I will answer then as soon as possible.

10 thoughts on “The best battery for ESP8266 microcontrollers”

  1. Very valuable information, it’s not at all blogs that we find this, congratulations I was
    searching for something like that and found it here.

    King regards,
    Thomassen Zacho

  2. Thank you for all your hard work on this!
    I have a question, as I decided to use a LiFePO4 battery with my NodeMCU esp8266, how to connect them together? Also, how long the project will operate using LiFePO4?
    After reading the article, it’s clear to me that the LiFePO4 battery is the best.
    I’m open to receive any suggestions.

    • Hi Sara,
      there LiFePo4 batteries that have a 26650 or 18650 format. Depending on the format, you need the suitable battery holder and then connect the battery to the 3.3V and ground pin.
      How long the project runs with one charging depends on the power consumption of the project 🙂

  3. Congratulations! It was a great lecture for those struggle looking for the best battery on their projects.

    High quality information!


Leave a Comment