MAX7219 and Contactor - Problem

Hello can you help me? (I think it problem Contactor Magnet)

I Have only Arduino and Max7219 (4 devices) <–single

and also near I Have Contactor ← single

it is not connect each other, but when I turn on/off (3 or 4 ) times Contactor in 220v. screen(MAX7219) there is wrong Symbols some diode lamp off some on.

I need turn on and off (Contactor) it with arduino relay but it will be Future

here is my Test code

#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>

// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define MAX_DEVICES 4

#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10

// Hardware SPI connection
// Arbitrary output pins

void setup(void)
P.displayText(“Welcome”, PA_CENTER, 0, 0, PA_PRINT, PA_NO_EFFECT);

void loop(void)

It sounds like you have a problem of electrical interference. I had a similar problem when I tried to turn a 12V DC water pump on/off from an Arduino via a relay. The current spike in the water pump circuit when the relay switched it on created a voltage pulse in the Arduino circuit causing it to fail. I was able to solve it by winding the wire powering the water pump (which is where the big current spike originated) around an iron rod (i think i used a plain 3 inch nail) a number of turns.

It is a bit hard to understand your exact setup (a photo would help a lot) but i guess it is one of two things:

  1. The contactor has some electrical connectivity (possibly via ground) to the Arduino/screen and an electrical pulse in that wire propagates into your sensitive Arduino/screen circuits. In this case it could help to create an inductor where the big current spike originates. If you have a ferrite bead you can clamp that on to the power wire. Or you could try winding it around an iron rod a number of turns.
  2. If there is absolutely no electrical connection between the contactor and the Arduino/screen it could be an electromagnetic pulse through the air (a strong radio wave). Then you may need to create a metal shielding (tinfoil or similar) around the Arduino/screen or the contactor (don't forget its power wires). Or just make sure they are further apart. The power of electromagnetic fields decreases with the distance cubed.

Discussed just now here.