Output Current required for relays

Hi, I have designed a PCB board which uses an ESP32 and srd-05vdc-sl-c relays.

I have the grounds of the relay shared to a GND pin on the device. The V+ on the coil goes to a GPIO pin.

What I am discovering is that the GPIO pin does not output enough current to trigger the relay. However if i bridge the V+ to the 5v pin on the ESP32, the relay latches.

Would a fix be as simple as sharing a 5v hot accross the relays and then triggering the GPIO pin low to ground it? Or would it still pull current. I believe the latching current is anywhere from 50-80mA

I expect you will need to do the board again. The ESP32 is not capable of driving a srd-05vdc-sl-c relay. You need some type of buffer to drive the relay such as a transistor or MOSFET, either is fine. If you use an avalanche rated MOSFET you do not need a diode however with the transistor you will. You can purchase relay boards with the driver already mounted along with the relays. Schematics for these relay boards are readily on line. There are a lot of other ways to fix your problem. It depends if this is a few or a production lot. I am surprised that you have not destroyed the ESP32. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!

Thanks for the input Gil.

One question, do you have a part number I can look into for those avalanche mosfets? I have revised my board design using diodes and BC547BTA transistors but I'd love to look into those mosfets that eliminate the need for a diode.


I am assuming you will do low side switching for the relay. That indicates that one end of the coil will be connected to +5 and the other to the MOSFET drain. Use the 2N7000 family, it will do what you need and is available in TO92 and SMD. If you have a higher voltage it will take the load off your 5V regulator. The MOSFET is good for 24V systems. They are only pennies in the SMD configuration. Good Luck & Have Fun!

Always always always use a free-wheel diode, whatever gilshultz says…