TMC Adaptive Microstep Table

So, updates, for now, I summarize what I’ve said in discord.
I will refer to this topic:

There is my fancy glued together graph :smile:


Between red lines is 1 full step, so 4 of them is full sinusoidal signal.
Technically we can control only 1 quarter of this, TMC2130/5160 does not allow to change offset or mess more than full 1 step. I think the realistic goal here is to smooth out there
variations.

Original datasheet, show different sinusoidal sample here.

So first hypothesis:
if more current at a specific MSCNT position drives acceleration higher (peaks around 90 degrees of sin)
Just by moving the peak backward, before 90 degrees, and a slight decrease at 90 - there is the possibility to slope the acceleration curve.

Second hypothesis:
Calibration of micro-step inequality will smooth that.

I’m not certain here that we can ideally calibrate micro-step inequality with an accelerometer and/or encoder.
But looking at proposed moves by TMC (3th and 4th graphs)
Looks like after that calibration we will have “strange” sinusoidal output, but more steady linear movements and acceleration.

Please excuse me for the long posts and perhaps I am wishful thinking.
So for now, this is what I’m digging into without the assumption that it will succeed or will fix real-world problems.
image
image