2018-12-21 06:03 AM
I’ve made a T-Bot similar to this http://www.buildlog.net/blog/2017/10/the-midtbot-a-new-flavor-of-h-bot/ design. Using stepper motor driver L6470, I can control the movements e.g. up/down, left/right and diagonally using the equations shown here https://corexy.com/theory.html, via the L6470 command MOVE(direction, number_of_steps) using MAX_SPEED(100 step/s).
If I move from (0, 0) to (400, 400), both stepper motors move at a constant speed, and reaches (400, 400). Great.
If I move from (0, 0) to (400, 100), then I need to reduce the speed of one of the stepper motors by 4 times (400 / 100 = 25 step/s). Fine.
However, if I move from (0, 0) to (400, 300), I reduce the speed of one of the stepper motors by 1.3 times (400 / 300 = 1.333 step/s). Slight issue here, MAX_SPEED only accepts integers and therefore the linear path it follows is not correct – one stepper motor will stop before the other, and a diagonal line is not drawn correctly.
Is there a way of resolving this issue, using the commands that are provided by L6470?