Relay Module stops working mid cycle

Hello!

I have built a device that relies on a Relay Module to operate a motor, solenoids, & pump. However, after a bit of use, it stops working during the repetitive motor pulsing that lasts for 9.5mins. I can't seem to isolate the problem. I have the relay module optoisolated with GND and JD-VCC coming from one power source and the other VCC pin to the Arduino UNO 5V supply. Typically I see if I change out the ground and power wires I get more use out of it, but after a while, it happens again.

Is there a minimum activation time that the relay needs? Perhaps my pulse is too short? (its a delay(200) in the code).

Any other Ideas?

Supplies being used:

Arduino Uno

Any other Ideas?

Unfortunately, your circuit diagram and code is invisible.

Is the separate power supply for the relay module isolated? (non- DC to DC converter type)
Are solenoids and pump DC? If so, are you using flyback diodes?
Are solenoids and pump AC? If so, are you using MOVs, snubbers or ferrite cores for EMI and arc suppression?
Is the relay module and relay load located at a sufficient distance from the electronics? (try 1 meter+)
Have you checked to make sure the Arduino GND is isolated from relay GND? (continuity or ohm test)
Are you using star-connected grounding? (avoids ground loops and reduces ground noise).

  1. The JD-VCC pin and GND pin are isolated from the arduino and is a DC supply that is plugged in.
    2 & 3. I am using DC solenoids and pumps and an AC motor. The relay module is rated for "Equipped with high-current relay, AC250V 10A ; DC30V 10A" so I thought it would have all the diodes and snubbers included? Is that not the case?

  2. Less than 1 meter

  3. its not using the Arduino ground

  4. I dont know what star connected grounding is...

Equipped with high-current relay, AC250V 10A ; DC30V 10A" so I thought it would have all the diodes and snubbers included? Is that not the case?

Nope, not included.

  1. Less than 1 meter

Rather close, considering that the relay contacts or load has no arc suppression.

  1. its not using the Arduino ground

There may not be a physical ground wire from the Arduino to the relay board, but its still possible that the Arduino ground is non-isolated from the relay module ground. (easy to test)

  1. I dont know what star connected grounding is...

All ground wires are separate (no connections from GND to GND), all GND wires terminate at a common point (usually the power supply). However, the relay module's GND would not be part of this (hopefully it's isolated).

How would I do this? Would I make a PCB for the snubber and fly diodes before each of the relay module screw terminals? Do you connect the snubber to the power supply or the output(load)?

Also, how do I test to see that GND Arduino isn't connected to my GND for the relay?

Usually, I fix this for a while by changing out wires and/or moving the IN pin to a different Arduino Pin. Is there some correlation that not having arc suppression causes back current? However, I did read that the relay module does have resistors to prevent these things but obviously they aren't working?

Thanks. I am definitely new to the electrical side of prototyping. Just learning :slight_smile:

How would I do this?

One step at a time ... do you have a multimeter?
Seems like a complex project for beginning with electrical/electronics.
Those who post circuit diagrams and /or pictures usually get improved help.

Hi,
When the relays stop operating, do the onboard LED indicators for each relay stop as well, or do they keep flashing to indicate that they are being operated?

It is a good idea to use the UNO on board LED as a heartbeat indicator, put the "Blink without delay" code into your code and make the pin13 LED blink ON and OFF every second.
That way when your project stops you can see if the code is still running or not.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Tom... :slight_smile:

When The relay stops, It stops blinking any of its red lights. There is the power to the board and to the pins but no red light. I did notice the pin that is supposed to fluctuate voltage (0, to 5V) just sits at 5V.

I didn’t know that! Because it might be an Uno issue that the cycle is stopping.

Attached are my connections to the relay module.

Hi,
Ops image;


If you disconnect the motor does the fault cease?

Have you got the 230Vac wiring well away from the Arduino and its low voltage wiring?

Can you post a picture of your project please so we can see your component layout?

Thanks.. Tom.. :slight_smile:

Just a wild guess, are you trying to increment an int variable
beyond its maximum value?

Is the jumper removed from the VCC/JD-VCC pins? It should be.

The GND of the Arduino should NOT be connected to the relay module. Connecting it defeats the isolation from the external 5V volt supply through the optocouplers and that couples the relay switching transients onto the Arduino’s ground plane.

If disconnecting the 5V and GND doesn’t sort things, the problem is then EMI as already mentioned. Electromagnetic Interference. The transients from switching either the motor or solenoids is inducing a voltage disturbance in the Arduino processor, crashing or resetting the program. You need a diode across each dc coil and an RC snubber across the motor relay contacts. In addition, any mains voltage wiring must be segregated well away from any low voltage wiring.

Thank you everyone for your comments it been a great help.

To answer your questions:

  1. Yes I have the jumper removed for the JC-VCC
  2. Yes my GND isn't coming from the Arduino
  3. I did redesign my mounting board for all my components to put the AC wiring as far as I can from the Relay and Arduino. I hope that helps!

I haven't tried the diodes and snubber because I don't really know how to go about it. So below is a link to the relay board, to a website to calculate my RC snubber circuit and to a possible Capacitor. According to that site, I would need R > 12Ohm and a 13.8uF capacitor. Voltage is 120 VAC and frequency I think is 5pulses/sec since my shortest activation time is 200ms in my Arduino Code. Does this seem right?

As far as assembly, Its already solder together as a component. Is it best to do it on the board on the bottom or before it enters the board?

Relay Module: https://www.amazon.com/gp/product/B0057OC5O8/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

RC Snubber calculation website: How to Design an RC Snubber | Sciencing

Capacitor: https://www.digikey.com/products/en/capacitors/film-capacitors/62?k=snubber&k=&pkeyword=snubber&sv=0&pv2049=u10µF&sf=0&FV=1292|157291%2C-8|62%2C1989|0&quantity=&ColumnSort=0&page=1&pageSize=25

Hi,
Does the fault occur if the motor is not connected?

Tom... :slight_smile:

Yes, try TomGeorge's suggestion.

I would suggest using an MOV for the 230VAC load because they're low cost, easy to install and in most cases would resolve issues resulting from EMI/contact arcing. Here's some MOV's you could use - they're rated at 275VAC continuous and have a good current surge capacity.

Easy to install...

ok! I designed this circuit to pass the AC current through before it enters the relay.

I got this MOV
https://www.digikey.com/product-detail/en/tdk-electronics-inc/B72220S0271K101/495-1417-ND/593851

Will the extra terminal connections be a problem?

MOV AC Circuit.PNG

MOV AC Circuit.PNG

A particularly critical point with controlling higher current circuits with relays, is the need to not only separate the mains wiring from the logic and control wiring, but to keep all wiring paired with both wires together in every part of the circuit. This applies not only to the mains wiring but to the logic wiring as well.

There must be no open loops to provide coupling of interference from one part to the other.

Hi,
Please answer post #12.

Thanks… Tom… :slight_smile: