I am currently trying to build a very high performing Servomotor from an ams AS5048A absolute rotary encoder and a stepper. I use a teensy 3.5 and i looked in the very nice TeensyStep library.. it works in a very interesting way, but i cant use this algorithm for my purposes (i guess).
I just want to define the desired motorspeed for each stepper, calculate the actual speed via PID Controller and everything else thats needed accordingly, and call a timer interrupt every time a step needs to be made. so far so good. i think i am capable of doing that, shouldnt be too hard.
but thats just for one motor. Now I am trying to figure out an algorithm to call the timer each time a step needs to be made, for 6 motors. all have different speeds, so the intervals are all different. and i cant think of a way i could do this. maybe some smart mind could lighten me up here.
I use a teensy 3.5 and i looked in the very nice TeensyStep library..it works in a very interesting way, but i cant use this algorithm for my purposes (i guess)..
I'm currently implementing the possibility to change the rotation speed on the fly in TeensyStep. Change of speed will be done using normal acceleration / deceleration. In case you attached more than one motor to the controller the movement of the motors will stay in sync (Bresenham) when you change the speed. As usual, each controller will be able to control up to 10 steppers in sync and you can have up to 4 independent controllers. Step frequencies of up to 300'000 steps/sec should be no problem with a T3.5.
Once this is working, it should be easy to use a standard PID algorithm to control your motors.
I hope that I can finish this in the next 2 weeks. If you are interested and want to test a pre-release version drop me a note.
I'm currently implementing the possibility to change the rotation speed on the fly in TeensyStep. Change of speed will be done using normal acceleration / deceleration. In case you attached more than one motor to the controller the movement of the motors will stay in sync (Bresenham) when you change the speed. As usual, each controller will be able to control up to 10 steppers in sync and you can have up to 4 independent controllers. Step frequencies of up to 300'000 steps/sec should be no problem with a T3.5.