I have problems running stepper motors at very low speed. I would like to achieve something around 3 RPM, but it seems that the motors loose precision at some point.
First, I am using NEMA 17 with 200 steps per revolution (4 wires used), A4988 driver and a couple of gears so I do not really care about torque (I hope). In order to reduce vibration and make the movement smoother, I use 8 times microstepping.
I need to make a step every 50 ms or more (like 100 ms). The motors work fine up to 40 ms, but then it suddenly loose precision and it looks like the motors do more steps (1/3 more) than they should (if I give the system - together with gears - a command to move 5 degrees, it moves around 7 degrees instead).
I have no idea why is that happening. I do not understand stepper motors very much. Could you please give me an advice how to manage the motors at these low speeds?
(I do not think that this is a software issue, but the code can be found here)
Well, good point I am not sure, but I hope so. The controller is powered constantly and I do not touch the enable pin, nor the sleep pin. Every pulse (triggered at half-delay), the step pin is XORed.