Random Nerd Tutorials
Shares

ESP8266 Voltage Regulator (LiPo and Li-ion Batteries)

Shares

In this guide, you’re going to build a voltage regulator for the ESP8266 that can be used with LiPo and Li-ion batteries.

Watch the video version

This guide is available in video format (watch below) and in written format (continue reading this page).


ESP8266 power consumption

The ESP8266 is well known for being power hungry when performing Wi-Fi tasks. It can consume from 50mA to 170mA. So, for a lot of applications it’s not ideal to use a battery with it.

It is better to use a power adapter connected to mains voltage, so that you don’t have to worry about power consumption or charging batteries.

ESP8266 with LiPo/Li-ion batteries

However, for some ESP8266 projects that use Deep Sleep or don’t require constant Wi-Fi connection, using the ESP8266 with rechargeable LiPo batteries is a great solution.

For battery powered applications the ESP-01 version is the recommended board, because it has few on board components.

Boards like the ESP-12 NodeMCU use more power, because they have extra components like resistors, capacitors, chips, etc..

Since LiPo batteries are so easily available, I’ll show you how to power the ESP8266 using those types of batteries.

This guide is not about different types of batteries and I won’t explain how LiPo batteries work. I’ll just give you the relevant information to complete the circuit presented…

LiPo/Li-ion batteries fully charged

LiPo/Li-ion batteries are rechargeable with the appropriate charger and they output approximately 4.2V when are fully charged.

However, as the battery keeps discharging the voltage starts to drop:

The ESP recommended operating voltage is 3.3V, but it can operate with voltages between 3V and 3.6V. So you can’t plug the LiPo battery directly to an ESP8266, you’ll need a voltage regulator.

Typical Linear Voltage Regulator

Using a typical linear voltage regulator to drop the voltage from 4.2V to 3.3V isn’t a good idea.

For example: if the battery discharges to 3.7V, your voltage regulator would stop working, because it has a high cutoff voltage.

Low-dropout or LDO Regulator

To drop the voltage efficiently with batteries, you need to use low-dropout regulator or also known as LDO regulator that can regulate the output voltage.

Having a low dropout voltage means that even if the battery is only outputting 3.4V it would still work. Keep in mind that you should never empty the LiPo battery completely, because it will damage the battery or decrease its lifetime.

After researching LDOs, I found a couple of good alternatives. One of the best LDOs I’ve found was the MCP1700-3302E.

It’s fairly small and It looks like a transistor.

There is also a good alternative like the HT7333-A.

Any LDO that has similar specifications to the ones shown on the datasheet below are also good alternatives. Your LDO should have similar specs when it comes to:

  • Output voltage (3.3V)
  • Quiescent current (~1.6uA)
  • Output current (~250mA)
  • Low-dropout voltage (~178mV)

MCP1700-3302E Pinout

Here’s the MCP1700-3302E pinout. It has GND, Vin and Vout:

Other LDOs should have the same pinout, but you should always search for your LDO’s datasheet to verify its pinout.

ESP8266 Circuit with LDO and Li-ion Battery

Here’s the parts required to design the voltage regulator for the ESP-01:

You can use the preceding links or go directly to MakerAdvisor.com/tools to find all the parts for your projects at the best price!

Take a look at the diagram below to design your own voltage regulator circuit.

Or you can take a look at the Fritzing diagram (the ceramic capacitor and electrolytic capacitor are in parallel with GND and Vout of the LDO):

The pushbutton is connected to the RESET pin of the ESP-01, for this particular guide it’s not necessary, but it will be useful in a future guide.

Here’s the final circuit:

About the capacitors

The LDOs should have a ceramic capacitor and an electrolytic capacitor connected in parallel to GND and Vout to smooth the voltages peaks. The capacitors prevent unexpected resets or unstable behaviour for your ESP8266.

Testing

Let’s power the circuit and test it. Having the multimeter measuring the Vin voltage of the LiPo battery, you can see it outputs approximately 4.2V, because the battery is currently fully charged.

Let’s place the multimeter probe on Vout. Now, the multimeter is measuring approximately 3.3V which is the recommended voltage to power the ESP8266.

Voltage regulator

A popular voltage regulator design for the ESP8266 looks like this:

You solder the capacitors to the LDO, so in the end you have a voltage regulator in a small form factor that can be easily used in your projects.

I hope this guide was useful. This concept will be very helpful to power future projects.

This is an excerpt from my Home Automation using ESP8266 eBook. If you like ESP8266 and you want to learn more about it. I recommend downloading my course: Home Automation using ESP8266.

I hope this guide was useful. Thanks for reading!

Recommended Resources

Home Automation using ESP8266 »
Build IoT projects and home automation gadgets with the ESP8266 Wi-Fi module.

Build a Home Automation System »
Learn how to build a automation system using open-source hardware and software from scratch.

Arduino Step-by-Step Projects »
Build 25 cool Arduino projects with our couse even with no prior experience!

Leave a Comment: