Overview: Power Supply for ESP32
In this tutorial, we will learn how we can make Power Supply for ESP32 Board. We will also integrate a Battery Booster or Boost Converter Circuit so that ESP32 can be powered using 3.7V Lithium-Ion Battery. The Lithium-Ion Battery can get discharged, so we will also integrate a Battery Charger Circuit along with Battery Management System. Earlier we designed Power Supply for NodeMCU, we will redesign the same circuit here for ESP32.
Most of the Lithium-Ion/Lithium Polymer Batteries can only fully charge up to 4.2V which is not enough for ESP32 Board. So we need to step-up the 2.8V-3.7V voltage from Battery to 5V. That is the reason why we are using a small-sized Boost Converter Module designed using some inductors, IC & resistor. In order to charge & manage the battery we will use TP4056 Battery Charger Module.
We can also power this circuit using 9V/12V DC Adapter. The LM7805 Voltage regulator IC limits the voltage to 5V only. If you don’t want to power the circuit using Battery, you can use the DC Power Adapter or 9V Battery. You may check the 5V 3A USB Charger circuit.
ESP32 Power Requirement
The ESP32 Board operates between 2.2V to 3.6V. But we supply 5V from Micro-USB port. For 3.3V there is already an LDO voltage regulator to keep the voltage steady at 3.3V. ESP32 can be powered using Micro USB port and VIN pin (External Supply Pin).
The power required by ESP32 is 600mA, as ESP32 pulls as much as 250mA during RF transmissions. During boot or wifi operation it’s drawing more than 200mA current. Thus supply power from Micro-USB Cable is not enough for ESP32 Board when we are adding multiple sensors or modules to the Board. This is because Computer USB port can provide less than 500mA of current. Check more about ESP32 Power requirement here: ESP32 Datasheet.
Bill of Materials
Following are the components required for making this ESP32 Power Supply project. All the components can be easily purchased from Amazon. The component purchase link is given below.
S.N. | Components Name | Description | Quantity |
---|---|---|---|
1 | ESP32 Board | ESP32 ESP-32S Development Board (ESP-WROOM-32) | 1 |
2 | Battery Charger Module | TP4056 5V,1A Battery Charging Module | 1 |
3 | Voltage Regulator IC | LM7805 5V IC | 1 |
4 | Female DC Power Jack | DCJ0202 | 1 |
5 | Step-Up Boost Converter Module | 3.7V to 5V Boost Converter Module | 1 |
6 | Switch | 3 Pin SPDT Switch | 1 |
7 | Electrolytic Capacitor | 470uF, 25V | 1 |
8 | Electrolytic Capacitor | 100uF,16V | 1 |
9 | LED | 5mm LED Any Color | 1 |
10 | Resistor | 220 ohm | 1 |
11 | Female Header | 2.54mm Female Header | 4 Set |
12 | Male Headers | 2.54mm Male Headers | 1 Set |
3.7V to 5V Step-Up Boost Converter Module
This is the Step-Up DC-DC Boost converter module which provides 5V DC stable voltage output at various input ranges between 1.5V to 5V. This small tiny circuit boosts the voltage level and provides the amplified stabilized 5V output. This module operates at a frequency of modules operate at frequency 150KHZ. For the different input ranges, it consumes a different amount of current to produce a balanced output.
1. Input 1-1.5V, output 5V 40-100mA
2. Input 1.5-2V, output 5V 100-150mA
3. Input 2-3V, output 5V 150-380mA
4. Input more than 3V, output 5V 380-480mA
TP4056 Battery Charger Module
This 3.7V Battery Charger TP4056 module is made for charging rechargeable lithium batteries using the constant-current/constant-voltage (CC/CV) charging method. In addition to safely charging a lithium battery, TP4056 BMS Board also provides the necessary protection required by lithium batteries. The TP4056 is suitable for USB power and adapter power supplies. Due to the internal PMOSFET architecture and anti-reverse charging path, no external isolation diodes are required.
To learn more about this module, you can go through its datasheet here: TP4056 Module Datasheet.
Power Supply for ESP32 with Battery Charger & Boost Converter
The Circuit Diagram for Power Supply Circuit for ESP32 with Battery Charger & Boost Converter is given below. The circuit can be powered using two methods, one with 9V/12V DC Adapter and other with 3.7V Lithium-Ion Battery.
For powering the Board using DC Jack, we have used DCJ0202 Female Jack. We used 470uF & 100uF Electrolytic Capacitor to avoid DC fluctuations and remove voltage spikes. The LM7805 Voltage regulator IC can take the input voltage from 7V to 35V. But is recommended to use the input voltage up to 15V only. With an increase in voltage, there is more heat dissipation that requires a bigger heat sink. The output from the Voltage regulator is connected to the Vin pin of ESP32 & GND is connected to GND. Hence you can power up the module using 9V/12V DC Adapter or by 9V Battery.
On the other hand, if you don’t want to power up the ESP32 using DC Adapter, you can use 3.7V Lithium-Ion or Lithium Polymer Battery. Using the Boost Converter Module 3.7V is boosted to 5V (can work from 2.8V input to 4.2V input). The 5V boosted voltage is connected to switch and the switch is connected to 5V Vin pin of ESP32. The Battery terminal is also connected to the output terminal of the TP4056 Battery Charger Module. Thus the battery can be charged using 5V MicroUSB Data Cable.
The board has an LED connected via 220ohm resistor which is used to indicate the Module is powered ON. While charging the battery, it is recommended to turn off the SPDT switch.
Project PCB Gerber File & PCB Ordering Online
If you don’t want to assemble the circuit on breadboard and you want PCB for the project, then here is the PCB for you. The PCB Board for the The PCB for Power Supply for ESP32 with Battery Charger & Booster is designed using EasyEDA online Circuit Schematics & PCB designing tool. The front side and back side of the PCB is given below.
The Gerber File for the PCB is given below. You can simply download the Gerber File and order the PCB from ALLPCB at 1$ only.
You can use this Gerber file to order high quality PCB for this project. To do that visit the ALLPCB official website by clicking here: https://www.allpcb.com/.
You can now upload the Gerber File by choosing the Quote Now option. From these options, you can choose the Material Type, Dimensions, Quantity, Thickness, Solder Mask Color and other required parameters.
After filling all details, select your country and shipping method. Finally you can place the order.
6 Comments
How does the boost circuit supply the necessary current Up to 600 madc when the listed spec you show says 380- 480 madc when input is above 3 volts?
where is the BOM purchase link
Beware the incorrect wiring of the TP4056 .
The battery should be wired to the tp4056’s battery terminals to properly charge the batteries. Otherwise the tp4056 will only pull from the batteries.
Gurns again here, That was wrong.
Something up is with the tp4056 and this pcb. — i’ll figure it out later perhaps.
hi is this the correct 1 or is this being updated? Should I connect the battery to tp4056’s battery terminal?