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.
-
\$\begingroup\$ In the case with the two separate supply units, is it ensured that the two grounds are connected? \$\endgroup\$Hufi– Hufi2020年06月13日 07:40:35 +00:00Commented 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– Samrat2020年06月13日 08:34:05 +00:00Commented Jun 13, 2020 at 8:34
-
\$\begingroup\$ Hi Samrat, Was the polarity correct when you connected the power supply? \$\endgroup\$vu2nan– vu2nan2020年06月13日 10:27:01 +00:00Commented Jun 13, 2020 at 10:27
-
\$\begingroup\$ Is it an AC supply perhaps? \$\endgroup\$Andy aka– Andy aka2020年06月13日 12:49:03 +00:00Commented 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– Samrat2020年06月15日 04:06:51 +00:00Commented Jun 15, 2020 at 4:06
1 Answer 1
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.