Hi all,
I have a Arduino Mega that is driving a stepper motor via an external stepper driver. I have input to the system via 4 proximity switches.
The stepper is powered eith 24V. The Arduino is powered by a cheap buck converter that feeds it with 7V. This way I can use the 7V also for the proximity switches that need at least 6V as power (output of the proximity switches is around 4v).
Now my problem: The system works fine for quite some time. Then when I touch e.g. the linear rail it will reset itself.
The powersupply is not connected to earth/ground fault. Only N and L are connected.
You have a grounding issue. All your grounds need to be tied together (power supplies, stepper, mega, etc.) You are most likely discharging some static electricity when you touch things.