I made a project which uses 4 stepper motors controlled by A4988 driver connected to arduino. For each stepper, I used one limitswitch.
The wires of the steppers and the limitswitchs are grouped together, which I think is affecting an electromagnetic field affecting the signal of the limitswitchs that false trigger.
I tried a 10uf capacitor over the limitswitchs but it solved 75% of the problem, one of the limitswitchs still false trigger.
What is the best way to stop the problem?