When working with the ESP8266 microcontroller board, one of the key considerations is how to power it. Choosing the right power supply for your project can make a significant impact on its performance, reliability and safety. However, navigating through the winding roads of battery power is not an easy task. In this article, we will explore different types of batteries and their advantages and disadvantages, to help you select the best power supply for your ESP8266 project. Additionally, there will also be an FAQ section at the end to elaborate on how to connect the battery to the circuits!
Top 3 Types of Battery Options
1. Lithium Polymer (LiPo) batteries are a popular choice for powering the ESP8266 due to their lightweight and high energy density. They come in a variety of sizes and capacities, making them a versatile option for a wide range of projects. LiPo batteries also have a built-in protection circuit that prevents overcharging and over-discharging, increasing the safety of the battery. To get started, consider purchasing a development board with an integrated lithium battery interface. They generally come in 3.7V per pack, however, you could get them pre-configured to provide 7.4V on the market.
2. Alkaline batteries, on the other hand, are a more traditional type of battery that have been around for a long time. These are the ones hiding in your TV remote controls. This type of battery is inexpensive and widely available, making them a convenient option for projects such as cosplay costumes, where batteries can be easily found and replaced on the go. However, alkaline batteries have a lower energy density compared to 18650 batteries, so they will need to be replaced more frequently.
3. 18650 batteries are another type of rechargeable lithium-ion battery that are widely used in a variety of electronic devices. They come in 18x650mm cylinder cells, have a high energy density, and are available in a variety of capacities. To connect them in series or parallel, you need to connect them. It is best to use a spot welder with nickel connecting strips instead of soldering directly on the cell to steer clear of any possibilities of explosions. Alternatively, you can purchase 18650 cells with screw threads above, which allow you to join the cells using nuts and pre-cut nickel plating.
When choosing a power supply for your ESP8266, there are many things to consider.
Firstly, it's important to consider the specific requirements of your project. LiPo batteries are a good choice for portable projects that need to run on battery power for extended periods of time. They are lightweight, have a high energy density, and come in a variety of sizes and capacities. Alkaline batteries, on the other hand, are a more budget-friendly option and widely available, but they need to be replaced more frequently. 18650 batteries are a good option for projects that require more power, but they can be more expensive and take up more space within the product.
Secondly, you also need to consider the voltage needed for your project. An ESP8266 might be able to run on 3.7V, however, if you have a 5V motor connected to a relay or Neopixel LED in the circuit, you may need additional power sources to connect directly to those components (see below table for voltage references).
Last but not least, it's also important to consider the current consumption of the ESP8266 when choosing a power supply. The ESP8266 has a maximum current consumption of about 170~200mA, so make sure to calculate all the current draw from your components and choose an available power supply that can provide enough current to power your project. For the rated current, the higher is better. The device is safe as long as the voltage is right. The only thing that is worst with higher current is the short circuit - the explosion “boom” will be also be more noticeable on a higher current battery.
In summary, LiPo batteries, Alkaline batteries and 18650 batteries are all valid options for powering an ESP8266. Each type of battery has its own set of pros and cons, and the best option for your project will depend on the specific requirements of your project such as budget, duration, and power consumption. Make sure to choose a power supply that is compatible with the ESP8266 and can provide the correct voltage and current to power your project. Additionally, it is always recommended to consult the manufacturer's documentation and seek professional guidance if you are unsure about the power supply requirements for your project.
FAQ 1: Do I need a BMS?
Short answer is yes, it is recommended to have one. A Battery Management System (BMS) is an electronic device that manages the charging and discharging of a lithium-ion battery pack. It can also monitor the battery's voltage, current, and temperature to ensure the safety and longevity of the battery. When charging a lithium-ion battery pack with a BMS, the BMS will control the charging process to ensure that the battery is charged safely and efficiently. It will also monitor the battery's voltage, current, and temperature to ensure that the battery is not overcharged or overheated. This will, in addition, help prolong the life of the batteries. You can get battery modules with BMS embedded if you do not want to mess around with this bit of the circuit. However, if you would like to wire up your batteries by yourself in series, make sure to get the right BMS to suit your project's needs.
FAQ 2: How do I charge my batteries while they are connected to the micro-controller?
To charge a battery while it's connected to an ESP8266, you will need to use a charger that is specifically designed to charge lithium-ion batteries such as the TP4056 (shown below) or a BMS. Alternatively, you could also disconnect the battery from the circuit via a physical connector like JST; however, this option means you have to remove the battery from the product entirely, which is sometimes not the most practical option.
Datasheet for TP4056 here.
FAQ 3: Can I connect my battery straight to my ESP8266 board?
Read ESP8266 Voltage Regulator (LiPo and Li-ion Batteries) for more information.
The ESP recommended operating voltage is 3.3V, with an operating range of 3V and 3.6V. So, in short, you can’t plug the LiPo battery directly to an ESP8266, you’ll need a voltage regulator. Note: if your board has an onboard regulator, you can skip this part all together! 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.
The LDO should attain the follow specifications:
Output voltage (3.3V)
Quiescent current (~1.6uA)
Output current (~250mA)
Low-dropout voltage (~178mV)
Mariete says that we should also use an MCP73871 IC to act as a switch to make the battery charging and power circuits of our device independent. When the external power is connected, the battery continues to charge, but it has no connection with the circuit. In addition, in this way the priority is given to external power when the device is powered by cable, so that we will prevent our circuit from causing continuous charging and discharging of the battery (which would shorten its life a lot).
As a beginner this all may seem daunting! To skip through having to build your own voltage regulator from scratch, there are micro-controller boards available with voltage regulator on board. See link below to explore your options. Moreover, make sure your power supply is all 'regulated'! Though most power supplies are regulated now, keep an eye out to prevent your electronics from frying. Unregulated power supply of 5V 10A, for example, will provide 5V when drawing 10A. However, if the circuit draws less, the voltage hikes much higher.
It's important to note that the ESP8266 requires a voltage between 3.3V and 3.6V, so make sure to choose a charger that can provide the correct voltage!
Comments