Speed vs position graph - motor motion control

Elias's icon

Hello,

I'd like to ask for advice or suggestions on how to create a system for keyframe based motion control where both position and speed can be set at each keyframe.
The motion needs to flow well. I'd like it to look beautiful and smooth. 4 stepper motors will move a small object in front of a microscope. So the motion will be very different than that of a 3D printer. Only the moments where there is a keyframe, I need the motors to be in the correct positions. In between keyframes however, linear interpolations are fine.

I already made a speed / position sequencer for a previous version of this setup (see images attached), but due to the configuration (multistepper function of the accelstepper library on arduino) the motors always stopped abruptly every keyframe. For the new version, I would like the option to have the motion system visit the locations of the keyframed positions, but with the possibility to keep the motors moving instead of stopping at the keyframe. The setup would smoothy change speed at the location of the keyframe. The result would be a smooth curvy motion-path that, when you're looking through the microscope, resembles flying over a landscape.

I thought of controlling only the speed parameter of the motor control library, because position control always makes the motor stop at the destination. To create the motion path with the keyframes, however, I need to work with positions. I know that After Effects has a speed vs position graph. So that every position change would be reflected on the speed graph and vice versa. Would it make sense to try to implement something similar in Max?

Any thoughts are very welcome!

More background-info on the project: http://eliasheuninck.be/?section=topos-sonos
Elias

First version of the setup

first version of the keyframe sequencer

Elias's icon

I made a quick diagram of the conventional position based approach, and then the speed based approach below, where the motor doesn't necessarily stops at keyframes. I hope this makes it a little clearer.