#No power to the GPIO pins when ESP32 is powered from Vin/GND

1 messages · Page 1 of 1 (latest)

vale drift
#

I'm making a simple plant watering circuit where a moisture sensor triggers a relay after falling below a certain percentage, powering a motor.

The setup works perfectly when the ESP is powered through USB, however when trying to power the board through the Vin, the board powers fine but I lose power to the relay (multi-metre reads 0 current and voltage to the motor).
Initially, as I was powering the motor and the ESP with the same 9V, I assumed it was a current draw issue, however after trying both a separate battery and a breadboard PS with USB on to the Vin, I'm still reading 0.

I am unable to confirm if the GPIO pins are receiving power or not however I believe this to be the issue from the way the relay is not being activated.

Any ideas would be appreciated 🙂

burnt hound
#

Make sure you have power going to the pins that need it.

vale drift
#

Is that to say all pins aren't powered from the Vin?

trim wing
#

Is it the exact same circuit except for how you power the esp?
Did you measure the relay voltage/current when using USB?
I think I remember a similar issue and for me the reason was that USB powered with around 5V while with VIN I had only the expected 3V which was not enough to power my 5V relay (obviously).

So questions might be:
How/Where do you measure?
Which relay do you use?
Can you try a simple LED circuit to see if the pins are powered at least?

vale drift
#

That sounds like a good shout, how did I not see that. The relay is a 5v songle relay, no board but i've added a transistor and resistor.

#

I measured it from the NC to the Common on the relay which I've since realised would not be giving any readings if it wasn't activated.

#

I've just tried measuring the current and voltage across and before the coil of the relay with no results

vale drift
#

I added a working LED to Pin26, without interfering with the moisture sensor (So it should still be giving the reading and pulling 26 high). No light.
Wiring it direct to the 3.3v pin and GND worked fine however so the 3.3 pin IS powered at the very least

#

I just went to go upload the basic blink sketch and as soon as I plugged in the USB it powered on the LED.

I'm starting to think this is more to do with what @burnt hound was suggesting however after reading through the pins and power on the docs I'm still not sure what it was being suggested

burnt hound
#

I'm unfortunately not directly familiar with the ESP32, so I can't give a clear answer. I just know this is an issue I've encountered on other chips, and it seems to indicate a large number of power inputs.

vale drift
#

I believe that section is related to powering the chip itself and not the GPIO pins. I've not had a problem with pin power before

trim wing
#

Sounds strange but at least we know that it seems to be a common issue with your board and not directly related to the relay. Is the circuit soldered, on breadboard or loose connections? Does your ESP (board) have multiple VCC inputs, e.g. 5V/3V? Might be bad connections, e.g. those breadboard wires usually have some room to move in PCB connection holes.

vale drift
#

No solder, just jumpers and a breadboard. I've been plugging the jumpers in and out so often I doubt it will be a loose connection however I have also had a check just in case.
I've also tried swapping out the ESP for another of the same type and the issue remains.

#

As far as power goes there's only one Vin Input and a 3.3v Output

vale drift
#

I can see the voltage regulator on the board and the power LED does seem weaker when powering from 3.3v so it's starting to look like a very obvious solution

trim wing
#

For me it was bad connections, both soldered and with breadboard when prototyping.
After fixing the connections everything worked fine.

As you posted a picture, I checked https://lastminuteengineers.com/getting-started-with-esp32/ for information.
Unfortunately not very successful.

Are you sure the 3.3V pin is output only? The website says so but the boards I use (Wemos D1 Mini) use this as input too.
If powered with USB, I can grab 3V there. If powered via the 3.3V pin, the voltage regulator is bypassed and the board is directly powered with 3V.

Powering the board via VIN with 3V or less does usually not make much sense because usually USB and VIN use the voltage regulator to lower the voltage to 3V. When applying 3V there, you might end up with a lower voltage.

What you could try, as we know that 5V via USB work: Apply 5V via VIN. This should be reduced to 3V by the voltage regulator just like when using USB.
That’s by the way also the voltage mentioned on the website. So maybe this specific board should not be powered with less than 5V?

Last Minute Engineers

A complete ESP32 beginner's guide, covering introduction to various development boards and platforms, hardware overview, pinout, installation, sample code and troubleshooting.

vale drift
#

We got there! Was a case of powering from 5v however I also had to add a second battery, likely due to the 800mA from the 9v battery being too weak

#

As for the question about the 3.3pin, I'm not entirely sure. All my boards are from Ali with no documentation so I can only assume they are built to the same spec as the official Espressiff boards as they look very similar (hence my hesitation about trying 5v through the Vin). I'm sure I've read somewhere before that the Vin is a I/O however the 3.3v Pin is only In