Relay Switching Causing Arduino to Crash when Load Attached to Relay

The title pretty much says it all.

When we don't have devices attached to the relay (standard 4 relay module board) this doesn't happen. But when there are devices attached this does cause the problem and needing to reset the Arduino.

It's not even every time, but between 2-6 flips of the relay the arduino freezes.

Haven't tested this yet for proximity as an issue, and I will be trying a different 4 relay module early next week.

Just wondering if anyone has had, or heard of, this problem before?

Maybe read the forum posting rules and provide the information volunteers need to help.

Maybe you could provide a link?

I'm on mobile and what you're referring to isn't immediately obvious.

What info is missing? Arduino Uno, 4 port relay module, this isn't a complex setup so I don't know how I could be more descriptive

If you routinely need to ask new users for missing information perhaps setup a discourse forum post template in the way many github repos do for opening new issues. I'm sure discourse has this built in to the admin panel or at least has a plugin for it

Hi, @Mr_Popper

A schematic and some images of your project would be of great assistance.

What are the loads the relays are switching?

Have you kept the load current carrying wires AWAY from the other signal and controller power supply wiring?

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

Always show us a good schematic of your proposed circuit showing all components.
Show us good images of your ‘actual’ wiring.
Give links to components.


In the Arduino IDE, use Ctrl T or CMD T to format your code then copy the complete sketch.

Use the < CODE / > icon from the ‘posting menu’ to attach the copied sketch.

It is obvious the Op does not understand EMI and its reactions. Apparently the need for information is not registering as the op can see the project, we cannot. From the OPs description EMI is the problem, conducted, radiated, combination is unknown, this is very specification to the hardware. Note the solution is in adjusting/fixing the hardware which is very application specific.

What type of device (load) do you connect to the relay? If it is a motor, some load with coils, etc. You are having problems with electrical noise when connecting these loads. If you are connecting these loads to DC, you can use a flyback diode to reduce this noise. If you are connecting to AC, it is recommended to use snubbers.

Ref: Snubber - Wikipedia