1
\$\begingroup\$

I am using the EE2-12NUL relay and the LL4148 flyback diode. I am controlling the relay with a GPIO pin from an MCU connect to some mosfets. The coil current is 11.7mA for this relay. When not energized the relay should switch back to Pin 3 but I am running into the issue where when I pull the 12V power supply jack while Pin 4 is connected to Pin 5 (by writing a 1 to GPIO_WRITE), the relay output, Pin 4, stays with Pin 5 and does not switch back to Pin 3. This does not always happen, I get into this state about 1 out of every 5 times I try this.

When I put the 12V power supply jack back in after this has happened (Pin 4 is still connected to Pin 5), I measure Pin 1 of the relay and voltage is 0V (as expected since my GPIO_WRITE =0 at the start) but the output of the relay is still connected with Pin 5 so it seems like MCU has no control over it. The only way to get it back to pin 3 is to write a 1 then write a 0 from my MCU. If I just write a 0, it will not go back to original state. When I write a 1, I expect the relay not to click since it is already connected to Pin 5. But I still hear a click.

I read that flyback diodes alone may not always be sufficient, and to install a cap between the coil supply and ground to act as a back-up power source allowing the relay to toggle properly. I added a 10uF cap to Pin 1 and GND but then my relay seems to never switch back to it's original state of Pin 3 regardless of what I do.

I have attached the portion of my design and help would be much appreciated! relay design

\$\endgroup\$
3
  • \$\begingroup\$ Is it possible the relay contacts were damaged by passing too much current through the relay? \$\endgroup\$
    – user20574
    Commented May 8, 2019 at 22:26
  • \$\begingroup\$ As a follow-up to the comment by @immibis, what is your load? How much current? Is it inductive? \$\endgroup\$
    – bitsmack
    Commented May 8, 2019 at 23:26
  • \$\begingroup\$ Thanks for the response immibis and bitsmack. I don't think it can be damaged with too much current. The load draws around 0.3A, even with in rush current the max I usually see on my power supply is 0.7A. The output powers a PMIC system which powers a CPU. I just replaced the relay with a new one in case it is damaged and the problem still persist. Seems like when I pull power jack while relay output is connected to Pin 5 it does not have enough current to toggle back to Pin 3. \$\endgroup\$
    – k051819
    Commented May 9, 2019 at 0:38

1 Answer 1

0
\$\begingroup\$

This design looks correct, so it should be working.

From what you are describing, it looks like relay driver (MOSFET and protection diode) is fine. If you see 0 volts on both coil pins 1 and 12, and your relay is engaged (pins 5 and 4 connection), this means you have damaged the relay.

The relays usually get damaged this way because you try to pass to much current through them. I think the reason for that is inrush current. Many electronic devices have big capacitors on input, which charge very quickly when the power is applied. During this time, capacitors have effectively 0 ohm resistance, so the maximum charging current is limited by power supply, wires, and stray inductances. The result is very short, very high current peak. It can be easily many tens of amps, and your relay is rated for 2 amp max.

Note that inrush current is very short, so you cannot measure it with regular voltmeter -- you need an oscilloscope measuring the shunt.

The easiest way to fix it is to oversize relay and add some resistance. For example, if you add 1 ohm resistance on the input, you'll limit inrush current to (12 volt)/(1 ohm) = 12 amperes in the worst case. JS1-12V-F relay is rated for 10 amps and will likely work fine. Another downside is that resistor will waste some voltage -- so with 0.5 amp load, your device will only get (12 volt - 0.5 amp * 1 ohm) = 11.5 volt, and the resistor will emit (0.5 amp)**2 * 1 ohm = 0.25 watts of power as a heat.

There are better ways to decrease inrush current, like pre-charging and NTC thermistors -- they might allow you to use smaller relay, but would be harder to design.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you for the response theamk. I cut the trace at Pin 4 so that there is no load anymore. The relay seems to work fine now, every time I pull the power jack I hear it click and Pin 4 connects to 3. I know that may not mean it is not damaged but I think I need to further investigate. I have ordered relays with 5-8A ratings and will replace and test them. I also ordered a few power resistors to replace my current load. I will also try to put a resistor to limit the inrush and see if that helps. Thank you for the help! \$\endgroup\$
    – k051819
    Commented May 9, 2019 at 23:27

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.