Post Go back to editing

TMC2209 homing accuracy with mechanical end stops only (not stall detection)

Category: Hardware
Product Number: TMC2209

Hi,

I am developping a product using two stepper motors. I have implemented TMC2209 and it work well to rotate the motor.

However I can't make homing using stall detection repeatable on the pre-serie samples. For that reason I changed to more basic homing using mechanical end stop and bumping into it multiple time to ensure position is home position.

I inplemented  full step mode and pattern detection to ensure the position is repeatable : coil supplied and B coil is not supplied (reading back from the TMC2209).

This works ok but when switching back to 1/64 step mode, I notice a shift that is not repeatable when power is cycled. This creates inaccuracy to the homing.

Is that an expected behavior ? 

Is this strategy relevant to do such a homing using TMC2209 ?

In term of mechanical design this is very basic : the shaft of the motor is firmly attached to a bracket bumping in a rigid mechanical part for homing.

Thanks for your help.

  • Hi, 

    When you change microstepping to fullstep, the microstep counter is not changed. Just the current patterns are generated as fitting to the more coarse resolution. The previous offset it not lost, and when changing back to microstepping, it is there again. Therefore, in case you want to use fullstepping, you should first position to a certain MSTEP value while in microstepping, i.e. near to 128, which is a fullstep position.  However, there is no clear benefit when changing to fullstepping. You can also remain with microstepping and after homing stop at a certain microstep position, i.e. 0 (you can use the index pulse to signal the position). This way, the position becomes more repeatable.

    Mechanical homing always includes bouncing back at the mechanical obstacle. This way, the motion will stop within +-2 steps of the end stop. Therefore, typical repeatability is four fullsteps. Choosing of a stable electrical position for homing makes sense and can improve the homing procedure repeatability. But, as mechanical position and motor magnets typically are not aligned, the best stop position for repeatable mechanical homing can vary from setup to setup. It could be somewhere within the full MSTEP range. 

    Hopefully you can make StallGuard work. It requires moving fast enough, but as response is fast, this should not be a big matter. Maybe you can get a better StallGuard response when tuning current for homing procedure to the required minimum value. 

  • Thanks for your detailed reply. I am surprise not to be able to do mechanical homing as precise as old system from 1990 using basic drivers are homing with mechanical stops with perfect repeatability (using old basic H bridge for the output).

    Regarding the stallguard I managed to make it work but it seems it requires a repeatable torque during homing as we are setting a threshold. My system can have different orientation and the load seen by the motor during homing, due to gravity, would change and that make stallguard settings useless if I am right ... Do you agree ?

    thanks again.

  • > Thanks for your detailed reply. I am surprise not to be able to do mechanical homing as precise as old system from 1990 using basic drivers are homing with mechanical stops with perfect repeatability (using old basic H bridge for the output).

    Don't misunderstand me - you can still have it the same way, if you do the same good job of aligning motor and mechanics for each device produced and selecting a dedicated (micro-)step position as end position for your homing. Correct mechanical homing requires both, a fitting electrical position and a fitting mechanical constellation to be repeatable.

    Understand. But, still, a certain minimum value will be coupled to motor stalling, independent of the normal load. This works best if StallGuard filtering is switched off. 

    Optionally, if you need to keep StallGuard filtering on: You do not need a fixed value for stall detection. You can also poll the value and search for a certain pattern, e.g. for the characteristic drop cause by hitting the end stop. Or you first check StallGuard response during motion and then set the threshold.

  • Thanks a lot for your help. I will implement the microstepping position and the mechanical alignement and let you know.

  • I confirm that stopping at a specific pattern in microsteps mode works well. thanks !

    Not sure I will take the time to try the stall detection to match all my use cases. I found it already quite long for a single orientation to make it work with different unit of the same motor referece. (Finding the right settings to have something repeatable). I am affraid of first production were tolerance disparity will increase with volume.

    Thanks a lot.

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.