I had this project, exactly like in the image but instead of only one driver and nema17, it has 5. It also has a relay and solenoid lock in each nema17. Nearest nema is 2 meters away from my arduino mega and farthest is 10 meters away. When only one nema17 and solenoid is connected to my arduino, it runs with no problem. But when i connect all of them, the nema17 spins for a while then stop. What should I do to solve this problem?
Ps. new to programming and electronics
Pss. My 5v wire is twisted with ground, also the 12v.
Nema17 is the mounting faceplate size. How is relay and solenoid lock integrated to that, only you know.
Please post a wiring scheme of your setup, power supplies included.
Are the motor wires 10m, or is Step/Dir going 10m to a driver module? Long wires tend to act a great way to inject unwanted noise into your clean digital circuit.
If one motor stops running after a while, I might suspect an overheating issue in the driver.
However, it could equally well be a problem in the code.
Usually troubleshooting procedure applies, swap known good units with suspected faulty units to isolate the problem.
Also, posting your code, schematic and good pics of hardware might help.