I am working in a project in which I need to control at the same time three NEMA17 stepper motors. In order to do so, I am using three DRV8825 drivers working at 12V connected to an Arduino MEGA.
This Arduino is generating the pulses in velocity ramps so that we have an accelerated movement to reach the goal.
With a digital analyzer, I can see that my velocity ramp is being generated properly:
In this picture below you can see how steps (ST) are generated once the direction (DR) is set for each of the motors. The time waiting after the direction change is bigger than the necessary established by the manufacturer and also does the duration of the step pulses.
Following this, the motors are supposed to make an accelerated movement until reaching a certain position and then, decelerate and stop.
Although, I am facing the problem that, in some cases, one of the motors (not always the same one) makes a few steps in the opposite direction of the movement and, after that, it executes the expected movement. This leads to, even of making the three motors perform the same movement, one of them finishes differently.
I tried to change the drivers but the same happens. Also, as I said before, I have checked that the pulses are correctly generated.
I would like to know if anyone has faced a similar problem or knows any reason that could lead to this strange behavior.