Hi, I need to rotate the stepper motor to 16200 steps over 15 seconds using acceleration and deceleration. Even with basic code, the stepper motor keeps restarting in between as you can in the attached video clip here. I am not sure what is causing this and I would love some guidance how to fix this.
I am using stepper driver DRV8825, Potentiometer Vref is 0.57V. Max current in the stepper motor is 1.2A. Power input to the driver is 12V DC and 2A.
Great job posting the code! To help us assist you further, please include an annotated schematic that shows exactly how everything is connected. Be sure to include all power, ground, and power sources in the schematic. There is the possibility this is an EMI problem.