TMC Adaptive Microstep Table

I said above that hypothetically tuned motor registers would look at the micro-step level similar to StealthChop. Looks like - yes.
I was not successful again with the oscilloscope and tuning, cause I can’t reliably see current without a good current probe, but I used it to validate tmc table data and end the expected chopper frequency.
So, I used ~30kHz as the target, all data below are with offset90 and TMC2240.
Interpolation enabled.

There is the remark that I drive my motor with ~75% RMS, with lower values like 40% it should be harder to get it to work reliably by table.
I didn’t verify frequency with Z motors, but I was unsuccessful in making it behave in the same manner. Motors are the same, but TMC2226 on Z is just overheating with a current above 1.2A

*All microsteps graphs scaled to same values 3..8us

Spread with tuned registers and Stealth look similar, I even worried the left graph was made with StealthChop instead of SpreadCycle, so there are 2.


So 2 spreads side by side

Without interpolation tuned spread also looks more equidistant

Stealth on the other hand, without interpolation looks a little bit twitchy

Left one with interpolation enabled,


Two to check “repeatability”, from different driver initializations.

From the linear motion side, I did tests again to compare “new” data.

I did want to say, that it makes something better, but there are resonances and it will look better or worse, depending on which speed range we are looking at.

Okay, we move slowly, it really looks better.


Then faster, no difference.

There, where strange things start to appear, a little speed difference produces a large accelerometer swing.


And there again the difference is small.


I can’t say that it is possible to tune driver registers by microstep values or by accelerometer data. There is definitely a correlation, and good-tuned drivers should behave similarly to stealth and be closer to the “ideal” motor.

It would be nice to tune drivers and/or have an automatic way to reliably do so, set offset90 on TMC2240, etc. But it mostly looks marginal from a vibration perspective to my taste. Precision - maybe, but microsteps are barely visible during motion, and equidistance maybe important for very slow travel with a low gear ratio.

I will rephrase this, they of course make a difference and they do change the behavior of motor.
But my end goal was to make rotation linear and the motor closer to the “ideal” one if it is possible. For now, for me with what I have it looks like an unreliable way to do so, and changes only shift stuff around, but not like really make it linear.
Maybe someone with motors with higher inductance will experience different behavior, I hope so. Cause inductance will add some inertia to the current flow and the motor - I don’t know.
(I have LDO 2504 with 1.5mH).

So, some sort of shaper is needed here to counterforce current motor behavior at low/medium speeds. Because it possibly can cancel torque lows and highs during full-step switching, and this shaper should be highly coupled to the motor/driver and its phase.


Just a small notice on the current shaper and accel to deceleration phase:


ADXL data looks awesome.
Because of the while acceleration/deceleration phase, there is rotor slippage (the rotor will overrun the target position while deceleration and will lag behind while accelerating) there is a minimal amount of full step artifacts, I think so, maybe slippage here is just a little too low.