ESP32 not working if using external supply

This is not programming related or software problem but please help me… I’m making home automation with power consumption monitoring. I do have 5v relay and 3 bulb. I want to use external supply which is 5v 2A but it won’t work, the template says offline. I know this a supply, circuit or wire problem but what should i do?? What is needed to make it work? If someone knows please help. I will really appreciate.

I’d start by simplifying things, the doing some systematic testing…

Remove all of the hardware that’s connected to your ESP32 and power it via the USB port, and make sure it works.
Then, swap the USB power for the 5V adapter and make sure that works.
Then, add-in the relay and make sure that works.

Eventually, you’ll find the thing that is causing the problem.

Pete.

2 Likes

Okay sir thankyou for the advice. I’ll reply here if I found the problem and don’t know how to solve. Thankyou for your patience sir

Can you draw a diagram of how you connect? Let’s help :wink:

1 Like

Good day, It works fine in USB port all the bulb turns on and the blynk goes online but when I tried to connect it in my 5v 2Amps adapter the blynk won’t go online. Please give me some advice sirr

More details required.

Pete.

1 Like

Did you test the external supply? Did you check if + is really +5v?

1 Like

Do like this.

  • disconnect relay and other stuff from esp32
  • download a simple blink sketch to your esp32
  • run from usb
  • does it work? Can you see the led blink?
    If yes:
  • remove usb, connect your 5 v adapter
  • does it work ? Can you see the led blink?
    If yes:
  • go back to YOUR code and add:
    a) LED ON at start of setup rutine and LED OFF at end of setup rutine.
    b) Serial.println("…’) statements to your code at some chosen places. I can propose at every time you (want to) activate relay, when you receive data from Blynk and probably before and after initializing Blynk. (Print info text and maybe important variable values.)
  • Download this sketch
  • run from usb
  • does it work as expected?
    If yes:
  • remove usb and connect 5v adapter
  • does it work as expected?

If it does not work as expected:

  • try to explain as clear as possible here in chat
    AND

  • post your full code here (possible also with the serial.print output from your serial monitor.

  • If the test fails the first time you try to run on 5v adapter - then i would look at that connector and describe how you connect with hw diagram or similar.

  • Then someone might have a chance to help you.

//Just one suggestion.

1 Like

Are you using a common ground?

And as Alex and Pete wrote, more information is needed!

1 Like

Yes, check the adapter. I have had a number of adapters where the stated voltage did not match the actual voltage.

1 Like

Good day everyone, I connected my 5v adapter into a micro usb and it’s working the bulb are working and the blynk goes online. Thankyou for the help everyone. Much appreciated.

You were referring to external power supply and now you are saying you have solved the problem by connecting to the USB port.

Anyways i will Mark this post as solved.
Happy Blynking !!

My guess is that you were using the wrong pins on the board to connect your power supply to.
I’ve come across some ESP32 Dev Boards with 38 pins where the pin next to the 5v pin is labelled GND, when it should actually be labelled CMD because it’s actually GPIO11.

But, it’s only a guess, as you didn’t share any information about how you’d wired your supply to your board.

Pete.

2 Likes

Actually when we are powering the dev boards via the Vin and Gnd, we will have to add few resistors to for particular pins to boot.

I had faced the same problem with NODEMCU12E.
When powered via USB all works fine. When connected via Vin pin, the board doesn’t want to boot. I then connected pull down and pull up resistors to get the board working.

That type of problem is usually caused by the external power supply not ramping-up quickly enough and the the CPU missing the RESET signal generated by the circuitry on the board at power-up. The solution is to add a 10uF capacitor between your EN (RST) and GND pins.

You can test this easily by applying the external power supply to the 5v and GND pins then pressing the RST/EN button. If the board boots as normal when the button is released then the capacitor solution will work.

Pete.

2 Likes

I also had the same problem. I was googling and find out that pin 5V couldbe more than 7 -12 volts. And when I applied it, solved my problem. Maybe the 5 volts input, not enough if the relay is loaded. I mean pin 5 Volt input, not 3.3 volt input. Sorry I use google translate.

A bit old but i just wasted 4 hours yesterday with this issue. GND next to 5V is NOT GND as correctly told by Pete. Unfortunately i didn´t find this until i had to restore my former setup and now redo everything at a later date. TY very much for info.

Btw. approx 50% of my ESP32 Wroom got it marked as “GND”, the remaining as “CMD” which is should be. I picked 2 with the “GND” yesterday :nauseated_face: :joy:

2 Likes

This information was very useful to me. Indeed, some esp32’s pins are very different. In a project, I connected the pin next to the +5 volt input as ground. It took a long time to solve my problem. Thank you very much PeteKnight for this useful information

1 Like