0

ESP32 External Power
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ESP32 External Power

by gustavos_andrade on Fri Oct 12, 2018 8:41 am

Hi,

I bought more components to try to set up my esp32 (https://www.adafruit.com/product/3269) with a 9V Battery.

And I'd like to use a button (https://www.adafruit.com/product/915) to turn on/off the esp32.

Could help me with the schema?

gustavos_andrade
 
Posts: 14
Joined: Tue Sep 18, 2018 8:04 am

Re: ESP32 External Power

by adafruit_support_mike on Fri Oct 12, 2018 11:09 pm

All you need to do is connect the button between the EN pin and GND.

Pulling EN low shuts off the EPS32.

adafruit_support_mike
 
Posts: 53579
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32 External Power

by gustavos_andrade on Sat Oct 13, 2018 3:46 pm

Sorry for ask again, but and about the battery?

It will be in the same pin? (EN and GND) ?

esp32-9v.png
Esp32 connecting battery 9v and button on/off
esp32-9v.png (103.13 KiB) Viewed 104 times

gustavos_andrade
 
Posts: 14
Joined: Tue Sep 18, 2018 8:04 am

Re: ESP32 External Power

by adafruit_support_mike on Sat Oct 13, 2018 11:58 pm

No, those connections would short-circuit the battery when you close the switch.

I don't think that board can work with a 5V battery directly. According to Espressif's documentation, that board can only take power from a USB cable, a 5V supply connected to the 5V pin near the USB jack, or from a 3.3V supply connected to the 3.3V pin:

https://docs.espressif.com/projects/esp ... ly-options

To get 5V from a 9V battery, you'll need a 5V regulator. We have them over in the shop:

https://www.adafruit.com/product/2236
https://www.adafruit.com/product/2164

but you can get voltage regulators almost anywhere. Make sure you read the datasheet for the one you get, because it will show you the circuit you need.

adafruit_support_mike
 
Posts: 53579
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32 External Power

by gustavos_andrade on Sun Oct 14, 2018 6:56 pm

Ok, so I'm gonna do with some resistor the regulator.

But my question is if the connections are right?

Do I just need to put the regulator between the battery and the switch button and it will be ok?

gustavos_andrade
 
Posts: 14
Joined: Tue Sep 18, 2018 8:04 am

Re: ESP32 External Power

by adafruit_support_mike on Mon Oct 15, 2018 12:23 am

No.

The battery needs to connect to the voltage regulator's input, and the regulator's output needs to connect to the 5V and GND pins.

The connection between EN and GND doesn't have anything to do with the battery.

If you want to control power to the board directly, put the switch between the battery's positive terminal and the voltage regulator's input. The regulator's output still goes to the 5V and GND pins.

adafruit_support_mike
 
Posts: 53579
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32 External Power

by gustavos_andrade on Tue Oct 16, 2018 1:41 pm

I'm reading a lot of people saying that is not working very well with a 9V battery.

Could you recommend to me any battery from your shop and how can set up it on esp32?

I'm really new on microcontrollers and have some problems to do that.

gustavos_andrade
 
Posts: 14
Joined: Tue Sep 18, 2018 8:04 am

Re: ESP32 External Power

by adafruit_support_mike on Tue Oct 16, 2018 11:54 pm

So you know: the ESP32 isn't a beginner-friendly chip. It's new, and the support code for it is still under active development. Some things just don't work, and there are known problems the developers are working to solve.

That board you linked isn't designed for use with a battery, so you'll need some extra pieces.

You can use either a 3.7V LiPo or a 3-AA battery pack with this 3.3V step-down voltage converter:

https://www.adafruit.com/product/2745

You can connect the converter's output to the ESP32 board's 3V and GND pins.

adafruit_support_mike
 
Posts: 53579
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32 External Power

by gustavos_andrade on Wed Nov 07, 2018 3:05 pm

I just did what you said:
"The battery needs to connect to the voltage regulator's input, and the regulator's output needs to connect to the 5V and GND pins.

The connection between EN and GND doesn't have anything to do with the battery.

If you want to control power to the board directly, put the switch between the battery's positive terminal and the voltage regulator's input. The regulator's output still goes to the 5V and GND pins."

and burned my button (https://www.adafruit.com/product/1477)

gustavos_andrade
 
Posts: 14
Joined: Tue Sep 18, 2018 8:04 am

Re: ESP32 External Power

by adafruit_support_mike on Thu Nov 08, 2018 12:52 am

Post a photo showing your hardware and connections and we'll take a look. 800x600 images usually work best.

adafruit_support_mike
 
Posts: 53579
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32 External Power

by gustavos_andrade on Thu Nov 08, 2018 9:18 am

I don't know if you can see, but I put between the positive battery and the regulator input.

I just saw the blue LED once and turn off forever.
Attachments
20181108_081201.jpg
20181108_081201.jpg (1007.46 KiB) Viewed 29 times

gustavos_andrade
 
Posts: 14
Joined: Tue Sep 18, 2018 8:04 am

Re: ESP32 External Power

by adafruit_support_mike on Fri Nov 09, 2018 12:38 am

With those connections, closing the switch will short the voltage regulator's output to GND.

I don't know if the voltage regulator has been damaged.. they usually have internal protection circuits to keep them from dying if that kind of thing happens.. but the button and its LED are probably fine. Shorting the regulator's output to GND just pulls that voltage low enough that a blue LED can't light up.

Try moving the switch between the battery's positive terminal and the regulator's input pin, and only connect the LED between the regulator's output and GND.

adafruit_support_mike
 
Posts: 53579
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32 External Power

by gustavos_andrade on Fri Nov 09, 2018 1:38 am

I guess I cannot use the button anymore, because I just saw on yours Website that the button is 3V. It is really not working anymore because I used with a 9v battery, I think so.

But anyway, I'm gonna try to use a power bank, and don't use the battery anymore. I'm afraid to burn all the circuit.

But thank you very much for your helping.

gustavos_andrade
 
Posts: 14
Joined: Tue Sep 18, 2018 8:04 am

Please be positive and constructive with your questions and comments.