Reasons for stopping the microcontroller

Peace be upon you. I designed an Arduino project to control a number of motors. The work is done alternately. The Arduino output was connected to a circuit to operate electrical loads, knowing that the project works perfectly with the circuit. The problem occurs when the circuit’s output is connected to a contactor to bear higher loads for the motors that occur. The microcontroller stops working and the writing is touched from On the screen and strange things happen, what is the solution, knowing that when I unplug the contactor, everything is fine, please help

I would guess the "circuit" is expecting a motor, not a relay. Please show a schematic for your project.

Shalom
The magic word is electromagnetic compatibility.
You must identify the sources of interference and eliminate them by taking appropriate measures.
Have a nice day and enjoy coding in C++.
Дайте миру шанс!

Hi,
your project is being impacted by problems with electrical peaks generated in the activation of inductive loads by mechanical contacts.

In addition to the recommendations of good grounding and good shielding, both for the microcontroller and the cables, it is necessary to use snubbers.

Read here about electrical noises and how to avoid them with snubber:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.