5V relay stops working after a HW reset

Hello!

So I have designed a PCB which uses the ESP8266 microcontroller. One of the functionalities is to control a 5V relay:

For the ESP8266, I am using GPIO4, where GPIO4 and GPIO5 are said to be the most safe to use GPIOs if you want to operate relays.

I have to say that the relay control works good, at least until I restart the device.

Restart interface:

imagen
imagen
imagen

At this point, a reset is performed in the microcontroller and the program setup and loop is executed as usual, but when I try to perform an action on the relay, it doesn't work.

Any idea? I can provide whatever is needed to make the post better.

Thanks!

1 Like

Espressif recommends using CHIP_EN and NOT EXT_RSTB to RESET the chip.

10K is too high for the MMBT2222 base resistor, use 910 Ω.

3 Likes

+1
That sugar-cube relay draws about 75mA.
Look at the saturation graph of the transistor.
You need at least 2mA base current for that, which works out to about 1k.
Not saturating a switching transistor fully will release it's magic smoke.
Leo..

3 Likes

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