ESP32 Wroom and 5V Relay problem

Hey Guys,

maybe one of you can help me please?

I just bought an ESP32 Wroom Module and 5 pieces of 5V Low Level Relays from AZ-Delivery.
Now i connected 5V and Ground from the ESP32 to 5V + and GND - on the Relay, I see now the red light is now lightened up. In the software i programmed GPIO 27 for controlling the relay.
So, as soon as i plug in the cable from GPIO27 to the IN of the relay, the green light is lightened up and i can hear the relay clicking. but the strange thing is, even when the GPIO27 is LOW (110mv measured) or HIGH (3.3V measured) the relay always stays active (green light active).
How can this be possible? does it mean the relay is so sensitive that it even reacts on the LOW state with 110mv?
below you can find a picture (layout) of my current setup, but i dont use the 5V external power supply.

thanks

Post a link to the relay product page and/or data sheet.

Very likely, you are applying 5V to a 3.3V I/O pin, which is one of the quickest ways of destroying an ESP32.

I haven’t found a datasheet but here is the link:

AZDelivery 3 x 1-Relais 5V KF-301... https://www.amazon.de/dp/B07FNGCSZQ?ref=ppx_pop_mob_ap_share

Here’s an updated layout how it looks mite at the moment:

The green wire (pin 12 ?) needs to go to a transistor that then goes to the relay board IN pin.

Pin 12 or 27 ?

1 Like

I am sorry it’s pin 27, in the layout its the wrong pin 12 . So, according to that it looks like the voltage is too low according to the relays needs ? There should be a transistor to pump the 3.3v up to 5v ?

It looks like there is a transistor on the relay board, but without a data sheet, or reverse engineering the board, it is anyone's guess how it is wired.

Connect just the relay to 5V and GND, measure the voltage on the IN or SIGNAL pin with your multimeter and let us know what you find.

Also, if the relay activates when the IN pin is not connected, it is probably defective.

1 Like

Similar to this:

Signal wire connects to the IN relay board pin.

1 Like

The product page has this, which is more or less incomprehensible:

Relay Control from 20mA/5 V switching power supply using upstream Optocoupler – suitable for Arduinos.

1 Like

Not strange at all. This relay module seems to have a PNP transistor instead of the more common opto or NPN transistor. That means the relay only switches off when the IN pin is 5volt.
So not a 3.3volt-logic compatible relay module.
Leo..

1 Like

Which, in turn, would be applying a bit less than 5V to a 3.3V I/O pin.

If so, use the circuit in post #7 to prevent further damage to the ESP32.

1 Like

It would put 4.3volt through a 1k resistor on the ESP pin.
Less than 1mA fault current, but still...
Leo..

1 Like

thank you very much guys, i will use the circuit in post 7#!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.