0
\$\begingroup\$

I want to try and understand why the Relays get a "pulse" or hi/low signal to all the Relay pins after a POWER on boot. Normally this wouldn't be an issue for a light or other powered device but it causes my Garage Door to open, which is not ideal!!!.

The circuit works fine after boot up but the POWER on issue

I have a ESP32 Devkit V1, which I have currently running TASMOTA v9.5 but I've tried a another firmware with same result.

Any suggestions on what to try next?

ESP32 with Relays and Sensors

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Sorry, that mess of colored wires doesn't mean much to us. You need to fix up your schematic and tell us about your 'relays'. \$\endgroup\$
    – Kartman
    Jul 26, 2021 at 11:58
  • 1
    \$\begingroup\$ Welcome to the the site, as someone's already pointed out we could use a proper schematic to make sense of the problem, but here's my guess, if you're activating the relays with logic 0 then the problem might be that when an MCU "boots up" all it's pins are configured as inputs, Wich might be able to sink enough current to turn the relays for a brief moment, alternatively if you've configured the pins as outputs and, again you use 0 to turn the relays on, you have to set the output pin to 1 immediately after configuring the pin as output, that's my blind guess \$\endgroup\$ Jul 26, 2021 at 13:46

1 Answer 1

1
\$\begingroup\$

This is common with most microprocessors. When the power is first applied the microprocessor is reset and the outputs are in an undefined state unless held to a predefined state with pull up or pull down resistors. During the start up of the code the outputs are then placed into a defined state as determined by the programmer. The ESP32 falls into this category and needs certain pines at specified states to boot properly, remember it loads its code to internal ram before starting. Once it has booted you can change them to whatever you want. Rue does a great explanation along with illustrations defining this including your board. Give this link a try: https://randomnerdtutorials.com/esp32-pinout-reference-gpios/

\$\endgroup\$
2
  • \$\begingroup\$ Thanks for the feedback, I have been using on of these relays on a nodemcu device for several years now without this problem, which is why I was surprised to see it for the esp32. \$\endgroup\$
    – mtraxdroid
    Jul 26, 2021 at 20:24
  • \$\begingroup\$ That is not unusual, many times those pins glitches are not noticeable. This processor is a bit different and a bit like the Arduino. It has its own operating system that boots up, controls most of the perfireals and TCP IP stack. Its code at startup loads from external flash and the pins are then available for use so during boot they change but are undefined to the user like the data from the flash. Some of the pins are defined to be in specified positions for it to boot and the module holds them at level via resistors. Also your program is a process from the ESP32's code, not stand alone. \$\endgroup\$
    – Gil
    Jul 26, 2021 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.