Relays triggers on boot of ESP-01

I am using the following 8622 replay module: https://www.aliexpress.com/item/4001108959192.html. Whenever the device is switched on (with the ESP01 plugged), or reboots, the relay is triggered. As I am wanting to use this to control my garage door, this is less than ideal.

I think I probably need a pullup or down resistor somewhere and I have tried putting one in but it seemed to make no difference.

The pin that triggers the relay is GPIO0.

Another approach would be create a hack which results in the GPIO0 only connecting after the boot up process but I am also not sure how to do this.

Sorted using: https://github.com/IOT-MCU/ESP-01S-Relay-v4.0/issues/1; @Amaktronix's method

Is your relay turned on buy GPIO0 being low or high?

If I recall the processor boots with all DIO as inputs. I would look at your setup code to see where it might go "on" before you set it to "off"

It made no difference. I tried all combinations. In fact even if a new unprogrammed ESP-01 is inserted, it triggers the relay on startup. Adding the capacitor fixed it.

Happy you found it :slight_smile:

A question that I do have is besides trial and error, what's the smallest value capacitor that I could safely assume would work?

Likely will always be a guess or maybe educated guess.

Where did you put the capacitor? Was it across GPIO0?

Sorry my electronics knowledge is a little weak. It looks to be across the voltage regulator. I will go with a trial and error :slight_smile:

OK... so tried other options and 470uF it is

I may be incorrect but as far as I can recall, that pin might goes high on power up. A capacitor may be an answer but it would not be the approach I would take if I wanted an extended life of my esp-01.
There is another pin on there (GPIO2). Have you tried using that pin? I also read a hack (somewhere) about taking another IO pin off the PCB, with the careful use of a soldering iron...
Also, if you only need one output (to power the relay), then perhaps you could AND these pins together, so that both have to be HIGH for the relay to switch. The 74LS08 might be the TTL logic chip you need. Or you can use a couple of mosfets.

Hi, thanks for this. Yes I tried all the pins i.e. I used leads to change the mappings of the pins to the replay board and there was no change.

My electronics knowledge is not strong but I will see if I can use your pointers to achieve the AND logic; that sounds like a good approach.

Just a side question; why would the capacitor shorten the life of the ESP-01?

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