Sensorless homing with TMC22xx
Dreide last edited by
I would like to use sensorless homing with the Duet2 Maestro. So far, sensorless homing is not implemented for the TMC22xx, because the TMC22xx lack Stallguard [TMC22xx=TMC2208|TMC2224, not including the newish TMC2209 though]. However, this doesn't mean that sensorless homing cannot be done without Stallguard. I did a not so quick test that was quite promising. In essence, instead of checking the Stallguard status during homing, one has to check PWM_SCALE_SUM against some threshold. Moreover, the checking must only start with some delay after motion onset, so that it doesn't trigger right away.
Side note: Stallguard2 (as in TMC2130, TMC22xx,...) only works in SpreadCycle mode. Stallguard4 in the new TMC2209, however, works in SteathChop mode, and if I interpret the datasheet correctly, it works only in StealthChop mode. But given that the Trinamic datasheets tend to leave a lot of room for interpretation, this interpretation might as well be wrong. Nevertheless, I take this as another indication that doing sensorless homing in StealthChop mode is not such a bad idea.
If there is interest, I would clean up my code and submit a PR.
I've had this on my list to try for some time, but it's been low priority. I'm glad you found the time to try it. Any PR you submit will be considered on the usual criteria; in particular the usefulness of the new functionality provided, code quality, and avoidance of undesirable side-effects.