Arduino NANO UNO MEGA

I have Problem with (NANO, UNO, MEGA) and (MAX7219)

When I ( ON/OFF ) Several Times Contactor, after MAX7219 Have a Problems

if I connect with relay and on/off contactor with relay it's need only 1 or 2 on

Here is my video about this problem and example:

https://youtu.be/UDKvnHEoNAk

This elegantly demonstrates the problem with transients due to the switching on and off of mains power circuits being conveyed to the Arduino part. This is a major source of problems we encounter here when "lash-ups" are made with random pieces of wire draped loosely around.

I frequently stress the need to keep the wiring from one part to another together, power wire with ground return; control wire with its return (which return for many common relay modules, is not the ground). The idea is to avoid loops which permit inductive coupling; we are dealing with devices which are operating at HF (3 to 30 MHz) radio frequencies here, electromagnetic transmission is a very real matter.

You always need to keep the high (mains) voltage physically and clearly separate from the low voltage for safety, but it is also most important to avoid the switching impulses that can cause the arcing of relay contacts, from being coupled back into the microprocessor circuitry and causing code and hardware such as displays to malfunction and crash.

Coupling can be both electrostatic over the stray capacitance between one wire and another, and electromagnetic where a loop of wire in which the current transient occurs, inductively couples an another nearby loop of wire in the signal and control circuits. This is why it is important to keep both wires of any given circuit together so that the electric field from any one wire tends to be cancelled by the adjacent ground (and supply) return and they do not form any open loops which can produce or pick up a magnetic field.