0
\$\begingroup\$

I have this relay circuit that can be turned ON/OFF by NodeMCU ESP32 GPIO18.

This circuit allows current to pass through the RL2 even when NodeMCU is turned off. When GPIO18 is HIGH, it will switch RL2 so that current won't pass.

I'm having problem with my relay because after I set it to LOW and set it to HIGH again, after a few seconds, the relay switches ON/OFF randomly and rapidly.

Question is, how can I stop relay from switching ON/OFF randomly and rapidly?

Additional Information

*I'm using 5V SPDT relay. (SRD-05VDC-SL-C)

*It's drawing out 60mA.

*I created a 5V voltage regulator circuit from my 12V 2A DC Adaptor

*D2(LED) is connected to relay's normally close pin. Also, the goal of my circuit is to automatically allow current to pass through even if NodeMCU is turned off.

Lastly, the relay acts weird when GPIO pin is set to LOW.

Thank you everyone for your help!

This circuit allows current to pass through the RL2 even when NodeMCU is turned off. When GPIO18 is HIGH, it will switch RL2 so that current won't pass.

\$\endgroup\$
3
  • \$\begingroup\$ What do you need help with? There is no question, and not much info to start with. How much does the relay consume current from regulated 5V and how much the 5V regulator can provide? \$\endgroup\$
    – Justme
    Commented Dec 29, 2020 at 8:38
  • \$\begingroup\$ Just as a wild guess, you may be running out of beta as the coil current rises upward. We need details about the relay. \$\endgroup\$
    – jonk
    Commented Dec 29, 2020 at 9:08
  • 1
    \$\begingroup\$ Have you tried eliminating the NodeMCU from the problem first by connecting D3 alternately to ground and a 3V3 supply (use a divider from 5V that can source 0.25mA to drive the bias network for Q4, 1K in series with 2K should do it). \$\endgroup\$
    – mhaselup
    Commented Dec 29, 2020 at 11:23

1 Answer 1

2
\$\begingroup\$

There is so much possibility of what is going on:

  • The GPIO sending PWM signal
  • The relay doesn't get sufficient voltage
  • The relay doesn't get sufficient current
  • The relay somehow damaged?

Relay has specification such as:

  • Working input rated voltage.
  • Power consumption (insufficient current can get relay stop working).
  • Rated voltage contact pin (using the contact pin with voltage over than intended can damage the relay).
  • Rated Current for contact pin.
  • Typical resistance.
  • Relay minimum time to contact. (only in specific relay)
  • Typical life (usually typical value of contact life on/off)

And relay has a drawback such as:

  • EMF.
  • Capacitance.
  • Resistance.
  • Inductance.

Because after all the relay is a coil.

so back in your drawing, what is your relay spec? how much current did you draw from the relay? how much current you can provide to relay? Did you check all possibilities?

\$\endgroup\$
1
  • \$\begingroup\$ Cubic273.15’s is a good answer it is always a good place to start with failure modes. What are all the things that could have gone wrong, which of those might explain what was observed, which can be ruled out. en.wikipedia.org/wiki/… \$\endgroup\$
    – RowanP
    Commented Aug 7, 2021 at 2:49

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.