The operating voltage range of ESP32 is 2.2V to 3.6V. The ESP32 boards have an LDO voltage regulator to keep the voltage at 3.3V. The output of the regulator is also broken out to one of the sides of the board and labelled as 3V3 which can be used to supply power to the other components. The VIN pin can be used to directly supply the ESP32 a regulated 5V voltage electricity supply. In other words, if you have a regulated 5V voltage (see our article on powering breadboard and using a computer power supply), then you can easily use either the micro-USB port or the VIN pin. But, most of the readers search a way how to use smaller batteries with ESP32. The sleep current of the ESP32 is less than 5 µA, making it suitable for wearable electronics.
We would like to avoid going through VIN in 5V, as because the voltage regulator will result in a loss of energy due to the potential difference. We would prefer directly connecting the positive pole of the battery to the 3V3 pin of the ESP32.
What Battery Will Work With ESP32?
A power bank usually uses a 3.7V lithium battery, converts it to 5 volts and connected ESP32 will reduce to 3.3 volts. This will make the system least energy efficient.
Regular batteries will not work for long. ESP32 will need 2.55V to operate and after a certain operating time, two batteries will simply not work. Two 1.5V lithium batteries or one 3V CR123 lithium battery will work fine. But, 3V CR123 lithium battery will costs higher. LiFePO4 batteries are better than the conventional 1.5V lithium batteries but costs higher and special charger will be required. Lithium polymer batteries will not last long on a single charge.
So, we can see that we do not have many choices outside using two 1.5V lithium batteries (with a charger) or one 3V CR123 lithium battery. A 3V CR123 1400 mAh battery on the 3.3V input is one of the best solutions. The other options will waste a huge amount of energy because of the conversion. The cost of charging two 1.5V lithium batteries and single-time usage 3V CR123 1400 mAh battery is the same (maybe more).
Whenever you are using any other solution, you can use the same circuit of breadboard power supply, like manufactured by YwRobot and sold as MB102 breadboard power supply. It has exact 3.3V output option. A typical alkaline 9V battery has a capacity of something like 450mAh, and it drains within 40 hours. 9v batteries are designed for very small drain current. 3 x AA cells to give 4.5V will run for less than 7 days. Your other option is powering MB102 breadboard power supply from AC mains.