0
\$\begingroup\$

I am using an ESP8266 NodeMCU and a 4-channel 5 V relay. When I power both with an external 5 V, 2 A supply it doesn't work, but when I connect both devices using a separate supply from a laptop's USB it works.

Can anyone can help me solve this, as I want to run both devices through the power supply. The output of the power supply is 5 V and working fine.

\$\endgroup\$
5
  • \$\begingroup\$ In the case with the two separate supply units, is it ensured that the two grounds are connected? \$\endgroup\$
    – Hufi
    Jun 13, 2020 at 7:40
  • \$\begingroup\$ Yes the output of PS is given to the node mcu as well as relay with two grounds, but the catch is that the PS cannot drive even either of device connected separately also. \$\endgroup\$
    – Samrat
    Jun 13, 2020 at 8:34
  • \$\begingroup\$ Hi Samrat, Was the polarity correct when you connected the power supply? \$\endgroup\$
    – vu2nan
    Jun 13, 2020 at 10:27
  • \$\begingroup\$ Is it an AC supply perhaps? \$\endgroup\$
    – Andy aka
    Jun 13, 2020 at 12:49
  • \$\begingroup\$ Hey my problem is resolved. The fault was that i was powering the relay as well as esp through PS but later i powered only esp with PS and powered the relay through vin and gnd of esp and it workes wholeheartedly. Thank u Hufi, vu2nan and Andy aka for taking efforts for understanding and replying \$\endgroup\$
    – Samrat
    Jun 15, 2020 at 4:06

1 Answer 1

1
\$\begingroup\$

My problem is resolved. The fault was that I was powering the relay as well as the ESP from the PS, but later I powered only the ESP with the PS and powered the relay through the Vin and GND of the ESP and it worked.

\$\endgroup\$

Your Answer

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

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