Relay switching, Arduino Lockup, Electromagnetic Interference: Some solutions

I’ve been having some discussions lately with people who are building various automated devices that switch lights, motors, solenoids/valves etc. on and off.

Often problems arise with Electromagnetic Interference (EMI) that can cause problems like these:

  • Lockup of the Arduino controlling the relays and switching
  • Loss of ability to communicate with a PC connected to the Arduino by USB
  • Noise and erroneous readings on sensors or attached devices when relays or loads are switched

I have pulled together some of the things I have found to help with these problems HERE: RelayIsolation

More general information on Power Control with Arduino is on the arduino-info Wiki here: ArduinoPower

If you have these kind of problems, or if you have had these problems and solved them, please tell us more about what you’ve done and learned. I would like to add suggestions and sources for methods and components to alleviate this type of problem. Subjects like relay Arc Suppression (especially for DC power switching) etc. would be good here too.

I’ll try to pull together whatever conventional wisdom we can collect.

If anyone has pointers to good sources on this subject, those would be helpful also.


Try looping your AC wires that are going inside the relay around a ferrite core and everything will be good good