ESP32 doesn't work when using PSU as power

So I want to develop a soil moisture control device. But I have a problem with my ESP32 device, it didn't work properly when I used the PSU as a power source, I used step down to change the PSU voltage from 12v to 5v. There is a built-in led on the step down and ESP32, which flashes rapidly. But when I used the micro usb as a power source, the esp32 was running properly and the led was on normally.

For detailed device specifications as follows:
1.ESP32 DOIT DEVKIT V1 (30 pins)
2. PSU Output 12V 15A
3. Step Down LM2596 (Set to 5V)
4.LCD 16x2 I2C
5. Capacitive Soil Moisture (CSM) Sensor
6. DHT22
7. 5V Relay Module
8. 12V 4.2W Water Pump

The circuit schematic can be seen as follows:

Pin Connection:

  1. LCD 16x2 I2C: SCL - GPIO22; SDA - GPIO21
  2. CSM: AOUT - GPIO36
  3. DHT22: DATA - GPIO5
  4. Relays: IN - GPIO17

Cable Connection:
PSU AC+ => AC 220V+
PSU AC- => AC 220V-
PSU V+ => Relay COM => Relay NO => Water Pump V+
Water Pump V- => PSU V-
PSU V+ => Step Down IN+
PSU V- => Step Down IN-
Step Down OUT+ => ESP32 VIN
Step Down OUT- => ESP32 GND

Additional Info:
I'm using a printed PCB, which I've tested for connectivity to the devices.

So how did it work properly?

1 Like

So when I connect it with micro usb, the led on step down, esp32, and the relay can light up without blinking. The LCD is also on and displays soil moisture values. But if I use psu, the relay led doesn't turn on, the led on step down and esp32 blinks quickly, the LCD also flashes.

How is the step down connected? For what purpose?

As I explained earlier, on the LM2596 step down,

  1. IN+ is connected to V+ PSU
  2. IN- is connected to V- PSU
  3. OUT+ is connected to VIN ESP32
  4. OUT- is connected to GND ESP32.

Since PSU has 12v output voltage and ESP32 only has 3-5v input voltage, I use step down to step down the voltage.

So the USB is used in parallel to the step down? Then either the step down or PSU alone can not supply enough current.

Oh sorry, there was a mistake in my sentence. When using micro usb as a power source, I don't use step down because I don't use PSU.

So the problem is when using a micro usb as a power source, the device can run properly, but when using the PSU and step down, the device cannot run properly.

The PSU I'm using has an output of 15A, and the step down has a max output of 3A. I have also calculated how much total current is needed for this project, which is about 350mA.

Okay, everything fine now :slight_smile:

Can you look up the allowed voltage on Vin of your ESP32 board?

From what I got from this source, vin allows a current voltage of 5v.

I'm almost out of ideas :frowning:

Do you have a scope to control the power lines?

What's the voltage on the 3.3V output pin of the ESP board?

Can you link to the esp32 module you have? If you remove the esp32 from the rest of the circuit, and try to supply 5v to the esp32's VIN and GND pins, does the esp32 turn on?

I once had an esp8266 module (wemos d1 mini pro) which refused to accept power from VIN and GND, and only accepted power from usb input or 3.3v pin. Never had this happen with an esp32 module though.

Around 3.3v, more likely to be less than that, but not much of a difference. I used a multimeter to test it.

I'm using this ESP32 board. I haven't tried that, I'll let you know when I do.

Hi, @jambanhanyut

Do you have a DMM, Digital MultiMeter.

Check the 5V on the Vin pin ESP32 when powered from the PC USB, then from the DC-DC as the power supply.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

I use digital ones. I have checked the Vin pin on the ESP32 board and on the DC-DC outputs, the multimeter read 5v. But I haven't checked it when using USB as the power source. Ill let you know later :+1:

Hi,
Can you please post some images of your project?
So we can see your component layout.

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

I'm using pcb, and maybe this design can help.


There are 2 pins at the bottom, it says 5V and GND, those are the pins connected to the step down/PSU. I just want to say, this is my first time doing this so if there is any problem with this design, please let me know.

EDITED
And also this,

Do you have installed a flyback diode over the pump?

No, I don't. I've heard it's important to use it to protect from voltage spikes. But I'm pretty sure that's not the case because the pump works normally when I use the USB as the power source of the ESP32. The pump power source is different from the ESP32, it's directly connected to the PSU.

which again goes to the step down...

1 Like