[Dprglist] motion profiling with stepper motors

markus markus at bibi.ca
Tue Mar 20 10:53:10 PDT 2018


I started playing around with motion profiling and thought using a stepper was easier for experimenting. I've implemented "constant acceleration" and started to wonder what the correct implementation is when the stepper frequency is below the update frequency.

Let's say motion profiling updates the frequency every 10ms and the acceleration limit is set to 5Hz/10ms. So at the initial update the frequency is set to 5Hz - 1ms later we could/should set the frequency to 10Hz but that's not possible because the period of one 5Hz cycle is 200ms.

So the question I have is what is the correct value to update the timer at the end of those 200ms?
 -  10Hz
 - 100Hz

Both seem wrong, if I set it to 10Hz it's not really "constant accelleration" at low speeds from a wall clock perspective. And if I set it to 100Hz I might exceed the "constant accelleration" from the motors perspective.

Comments, thoughts?
Markus


More information about the DPRGlist mailing list