Electronic – Arduino Esp32-dev powering with 9V battery connected to pins

arduinobatteriespower supply

I can not find any example 🙁 Is it possible that I power directly my Arduino Esp32 with 9 V baterry? Is it safe?

Pinouts
enter image description here

How to connect power to pins if I dont see "VIN" pinout?

http://mh.nodebb.com/topic/2/mh-et-live-esp32-devkit/12

Datasheet:
https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf

Could somebody help me please?

Best Answer

The real problem with trying to run the ESP32 off of a 9v "transistor radio" battery is the lack of capacity of the battery. It just can not supply the peak current that the ESP32 needs. It is like using moped to pull a train. Sure the moped can do 50km per hour. (or more) But it does not have the torque needed to get the train moving. (once you get the train rolling the power requirement is not nearly what it takes to get it moving)

Having said that, potentially the 9V battery could power the ESP32 for a few times before it would totally choke. And power dissipation of a regulator would not be a significant problem. Because the internal series resistance of the battery would limit the output voltage when there are higher current demands.

If you do use a 9V battery, then use a high quality alkaline battery, like a Duracell.

The minimum I would use for the ESP32 is AA batteries. AAA batteries would have much the same problem as the 9V battery, although it might at least be able to boot up.

The ESP32 is a little more demanding of current compared to the ESP8266. And the ESP8266 will draw 400mA peaks on start up. And if the power supply can't deliver that the ESP8266 will not start. It will crash, restart, then crash, ...

I have not done current tests on the ESP32 yet but from the documentation that Espressif provides the power supply needs to be capable of 500mA for the peak demands.

For battery use I use the 18650 lithium batteries for some of my ESP projects.

Whatever battery you use, you need to use a regulator that does not consume much current when the ESP is in sleep mode. (not requiring much power) You need to also use a regulator that has a low voltage drop at the maximum current. Using a 9 volt battery makes finding an acceptable regulator so much harder. And one thing to take into account. The 9volts of the battery is the nominal value. A brand new fresh battery will have a voltage higher than that. Closer to 10 volts.

You are far better off using a 3.7 volt lithium polymer battery. I use a 250mAH rated one for a small ESP8266 project, a remote control. You can get a cheap TP4056 Lithium Battery Charger for it and then charge it with 5 volt USB chargers. (what I use)

If for some reason you really wanted to use a 9V battery then it would make more sense to have a "buck" switching regulator to convert the 9V down to 4.2-5v and then use a linear regulator after that. Using a switching regulator will not waste as much energy from the battery. A switching regulator acts as a transformer, and is mainly power conversion and not just series wasted heat. Assuming a regulator with 100% efficiency (does not exist but makes the math easier) if we had the regulator provide 4.5V from the 9V battery, then the current drawn from the battery would be 1/2 of what the load at 4.5V draws. Like if the load needed 200mA at the 4.5V then the 9V would only see a load of 100mA.

Of course there are no 100% efficient converters, but 94% is possible at certain ranges. Selection of the right converter is important because you still need to consider the minimum running current. You will need to add the minimum current from the switching converter to the minimum requirement of the linear 3.3 volt regulator. And you need to use a better regulator than the one that is supplied on most development boards. They are low drop regulators (good) and are cheap. And cheap means they have a higher idle current compared to what is otherwise available. The 117 type regulators are not appropriate for battery powered use.