Device stuck on boot

Hi,
I am building a new garage door controller running ESPHOME.
That’s my first steps in ESPHOME.

Here’s the hardware of my unit (NodeMCU + Reed switch + DHT22 sensor + 5V 2-Channel Relay Module).

All works good on the workbench except one thing ; when I unplug and replug my nodemcu, the booting process stuck. If I want to boot the device I have to unplug the relay module, plug-in the nodemcu and as soon as the nodemcu is booted, I can replug the relay module.

Here’s my pin connection :

NodeMCU VIN --> Relay VCC
NodeMCU Ground --> Relay Ground
NodeMCU D6 --> Relay IN1
NodeMCU D8 --> Relay IN2

When I power the nodemcu, the relay IN1 is quickly “clicking”, the light IN1 on the relay board turn on and after that, nothing else happen. This look to stuck the booting process of the nodemcu.

If I removed the connection VIN --> VCC and power up the nodemcu unit everything is fine. I can then, while the nodemcu is powered up, re-connection the VIN --> VCC and the relay work good.

After some guess and try, I tried using a 3.3v pîn rather than the VIN pin of the nodemcu. By using the 3.3v the booting process is good, no stuck at all, but when I power up the relay with only 3.3v, only one channel is working on the relay.

Here’s my node config :

switch:
  - platform: gpio
    pin: 
        number: D6
        inverted : True        
    id: relay2
    restore_mode : ALWAYS_OFF

  - platform: gpio
    pin:
      number: D8    
      inverted : True        
    id: relay1
    restore_mode : ALWAYS_OFF

Any help would be appreciated.

This resource has helped me a lot finding suitable pins for input/output (-> Best Pins to Use – ESP8266):

In your case, it seems that D8 may be problematic to use.

You need a
[AU$4.93]5Pcs Logic Level Converter Bi-Directional IIC 4 Way Level Conversion Module Module Board from Electronics on banggood.com
https://banggood.app.link/V8IPn6K9d3

Thanks a lot for this !
That was exactly the problem, I reassigned the pin and used 2 GPIO that are not affected on boot.

thanks again !

1 Like