switching inductive load crashes microcontroller

Thread Starter

masynthetic

Joined Oct 1, 2021
3
I am using an Arduino mega to switch several of these very common relays with a 24v inductive load on pretty much all of them and I am having a peculiar and extremely frustrating issue where during switching (frequently but not always) the Arduino will reset, when monitoring the arduino's 5v power rails with oscilloscope there is extreme noise (60v+) during switching the relays but Only when the 24v is applied to the relays, when where is no load the noise/reset does not occur. This was very confusing to me as I understood these voltages to be isolated by the relay module

For this reason I believe my issue is related to the voltage spike created by the inductive load like discussed here
where it says that

  • A diode and a resistor (for DC circuits) – the diode as well as the resistor need to be sized according to the switching frequency, spike voltage and the load input power. The diode breakdown voltage must be higher than the circuit supply voltage, and the maximum forward current must be higher than the current through the load (inductor) when switched on.

but I don't have enough info here to produce a circuit, I have found some mentions of circuits using a diode on the relay coil (5v) side like this but it appears that the board already has a diode in parallel to the coil so I am wondering if there is another similar type of circuit (perhaps on the load side?) or some guidelines on how I should modify the existing circuit to mitigate this?


Note
  • the relay boards are being powered from a buck converter from the 24v power source, the Arduino is being powered by USB, I have also tried powering the Arduino from the buck converter and powering the relay boards from the Arduino
 

LowQCab

Joined Nov 6, 2012
4,029
Relays create Arcing across their Contacts,
this broadcasts EMI Trash for long distances,
which will be induced into any Conductor nearby.

It can sometimes smoke Electronic Devices.

Use a Solid-State-Relay instead (SSR).
.
.
.
 

DickCappels

Joined Aug 21, 2008
10,152
Or if the load is inductive and the power source for the load, you can try placing a diode across the load similar to the one across the relay (reverse biased by the load's power supply when the relay is on and forward biased by the inductive kick from the load when the relay switches off.

An RC snubber across the relay contacts might work better than a diode.
1633085618201.png
 

Wolframore

Joined Jan 21, 2019
2,609
the relay modules have the diode Built in here’s the schematic:
CDAF194F-9E7B-4D50-8196-D6D25769575D.jpeg

how are you powering the coil side of the relay module? (VCC pin on the relay module)
 
Last edited:

Thread Starter

masynthetic

Joined Oct 1, 2021
3
Relays create Arcing across their Contacts,
this broadcasts EMI Trash for long distances,
which will be induced into any Conductor nearby.

It can sometimes smoke Electronic Devices.

Use a Solid-State-Relay instead (SSR).
.
.
.
appreciate the suggestion but I am really struggling to find any SSRS with similar form factor rated for DC rather than AC, do you know of anything?
 

ElectricSpidey

Joined Dec 2, 2017
2,758
This is a common problem with micros controlling inductive loads (yes even with isolation) I would start with the suggestion in #3 and if that fails I would try using some ferrite cores on the power and signal lines on the controller.
 

LowQCab

Joined Nov 6, 2012
4,029
appreciate the suggestion but I am really struggling to find any SSRS with similar form factor rated for DC rather than AC, do you know of anything?
.
Virtually all SSRs that I've ever seen are available in AC or DC versions.

You didn't specify how much Current You need to Switch.

Also, the mechanical requirements of the Inductive-Load may be important.
If there are no particular requirements for turn-on and turn-off speeds
You can use a MOSFET and easily slow-down its switching speed,
this can completely eliminate any Inductive-Flyback-Spikes.
.
.
.
 

ecka

Joined Feb 19, 2021
7
I have faced with the same voltage spike problem two years ago. I was making aquarium controller. Microcontroller switched 230V AC inductive loads (aquarium water filter, pumps) through relays. I have tried everything: inductive filters designed for the mains (maybe silly idea?), various ferrite cores, rings etc. The only one thing which worked for me was to place capacitor in parallel with the relay output. This solution does not eliminated electromagnetic spikes 100% but helped a lot.
 

Juhahoo

Joined Jun 3, 2019
302
There are tons of suggestions as online circuits how to suppress contact noise, try Google at first and bring your best suggestion here.
 

Wolframore

Joined Jan 21, 2019
2,609
Keep in mind the drive circuit can be decoupled from your VCC but it would require a separate power source. The optoisolators can be used to decouple the drive circuit from the micro I/O.
 

DickCappels

Joined Aug 21, 2008
10,152
The optical isolation is an excellent way to keep the noise from the relay and load from working their way into the controller. This may also require some filtering in the power supply to the controller so the noise does not get into the controller that way.
 
Top