I'm trying to switch a small 230V AC motor using an Arduino Uno, but I'm having same problems due to interference on the relay (so the Arduino itself is not a problem).

Sometimes the module create voltage/current peak on the wires going to the Arduino, and it reboot or sometimes stops running the sketch until I unplug the power to the board and connect it again.

Looking the signal on the oscilloscope I see something like that

enter image description here

and sometimes the peak are in very short periods

enter image description here

I tried to add capacitors or diods in different configurations, but nothing really solved the problem, in some cases it only appear more rarely.

The relay module I'm using are the standard Arduino-type optoisolated ones, already with back-current diod and optical isolation, so I thought it should work without any extra circuit, but apparently it is not, or maybe the module is broken?

What should I do to fix the problem?


There was a similar problem with the relay data.

In my case, a separate power supply to the relay unit helped (with common ground).

Most likely, the interference goes precisely along the power line, where the relay coil and the arduino power supply are combined.

Also, when switching an inductive load between the relay contacts, sparks can occur, which can also sometimes freeze the arduino. For these cases, a EMI/RFI supression capacitors can be installed parallel to the load. (Idea taken from the internet).

enter image description here enter image description here

  • \$\begingroup\$ I already tried separating power source (of course connecting the ground together to have a common reference for the signal), but it didn't solve the problem. About the capacitor in parallel to the relay contacts, should I rate the capacity according to the motor inductance or 220 nF are just fine? \$\endgroup\$ – Paa Jul 22 '20 at 11:20
  • \$\begingroup\$ These are special capacitors designed to suppress interference. They differ from conventional ones in higher safety (fire resistance) and greater resistance to voltage surges. They can often be seen in network filters. They have several classes (X1, X2, Y1, Y2). In conventional devices, class X2 is most often put (X1 for industry). Capacity: the higher the better. Usually 0.22, 0.47 uF are common. If the motor is powerful and 0.47 uF does not help, it can be increased to 1 uF. \$\endgroup\$ – Delta Jul 22 '20 at 12:37
  • \$\begingroup\$ The permissible capacitor voltage must be higher than the mains voltage. For example, the EPCOS has capacitors rated up to 305V, which is suitable for 230V. \$\endgroup\$ – Delta Jul 22 '20 at 12:37
  • \$\begingroup\$ An EMI suppression capacitor must be used (X1 / X2 / Y1 / Y2 - X2 good). Conventional capacitors are not designed for this and can be dangerous. \$\endgroup\$ – Delta Jul 22 '20 at 12:42
  • \$\begingroup\$ en.wikipedia.org/wiki/Snubber \$\endgroup\$ – Juraj Jul 23 '20 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.