ESP32 is an IoT based smart board that has a variable source of power. Thanks to ESP32 multiple power mode support it can run on minimal power without getting dead. During ESP32 deep sleep mode one charge can power it for up to a year.
ESP32 less power consumption makes it best buy for remote projects. ESP32 can also be powered using phone chargers or external power banks. This lesson will cover how ESP32 can be powered using a smartphone charger.
ESP32 Power Options
ESP32 has multiple power options like other microcontroller boards. This not only increases its compatibility in multiple projects but also makes it a more power efficient board. Following are the power source ESP32 uses:
1: USB Cable
USB cable is the safest and most reliable power source for ESP32 as most USB ports can provide devices with regulated 5V that can easily be stepped down to 3.3 working voltages of ESP32 using the on board (LDO) low dropout voltage regulator.
Here are some main highlights of powering ESP32 using USB:
- Constant 5V supply
- Safe current limits
- No voltage or current fluctuation
- Can provide power for long term without heating
- Best power source for ESP32
- Protect On board voltage regulator
2: VIN Pin
VIN pin is the second way of powering ESP32 using an external source. This pin can take voltage up to 12V and is connected to an onboard voltage regulator that converts input 12V into regulated working voltage of ESP32 that is 3.3V.
It’s recommended to not use more than 7V at this pin as most of the voltage will be lost during conversion in the form of heat.
Here are some main highlights of using Vin pin for powering ESP32:
- Unregulated voltage can be connected
- Provide great range of voltage for connecting with ESP32
- ESP32 can be power up using multiple ways through this Vin pin
- Constant supply can be given for longer period
3: External Regulated 3.3V
Last source on the list is using the external regulated 3.3V. It’s by far the most complicated way of powering ESP32. One of the reasons include the bypassing of LDO regulator circuitry by this pin.
This pin is not connected to the on-board regulator which means any slight change in voltage greater than 3.3V will permanently damage ESP32. This happens because of reverse flow current. Output current becomes greater than input.
Some main highlights of using 3.3V pin is:
- 3V supply can be easily designed
- Reduced the loss of excess voltage
- Maintain safe current limit
- Constant supply for long term
- Portable power supply such as dry cell can be used
As we have discussed all the power sources for ESP32. So, to power ESP32 using a smartphone charger we will be using a micro-USB port of ESP32.
How to Power ESP32 Using a Smartphone Charger
To connect ESP32 with the charger we will be using the micro-USB cable. But before we move to powering ESP32 make sure the ESP32 board has an on-board voltage regulator. Some ESP32 boards come with only bare ESP32 chips which means they are not 5V tolerant.
Most people are concerned about the current limit of ESP32 as most chargers come in rating of 1A-1.5A. ESP32 can support up to 500mA of current. However, the current limit of smartphone chargers does not affect ESP32 performance. As ESP32 will only draw current which is required and the maximum ESP32 GPIO pins can draw is no more than 40mA.
Note: Avoid connecting DC motors with ESP32 as they require large current which may overheat ESP32 and result in permanent damage to the voltage regulator.
Demonstration
To power ESP32 connect micro-USB cable with ESP32 and other end to 5V output port of charger. Plug smartphone charger into AC 220V-240V socket. We can see the power LED of ESP32 is turned ON.
We have successfully powered ESP32 with a smartphone charger.
Conclusion
ESP32 is a portable board and its low power consumptions make it a perfect choice for IoT projects. For remote projects ESP32 can be easily powered using the external 5V charger. This solves the main problem of power distribution inside the projects and most of the time AC supply is widely available hence ESP32 can be powered anywhere using the 5V smartphone charger.