Datasheet
TMC2130 DATASHEET (Rev. 1.09 / 2017-MAY-15) 65
www.trinamic.com
14.2 stallGuard2 Update Rate and Filter
The stallGuard2 measurement value SG is updated with each full step of the motor. This is enough to
safely detect a stall, because a stall always means the loss of four full steps. In a practical application,
especially when using coolStep, a more precise measurement might be more important than an
update for each fullstep because the mechanical load never changes instantaneously from one step to
the next. For these applications, the sfilt bit enables a filtering function over four load measurements.
The filter should always be enabled when high-precision measurement is required. It compensates for
variations in motor construction, for example due to misalignment of the phase A to phase B
magnets. The filter should be disabled when rapid response to increasing load is required and for
best results of sensorless homing using stallGuard.
14.3 Detecting a Motor Stall
To safely detect a motor stall the stall threshold must be determined using a specific SGT setting.
Therefore, the maximum load needs to be determined the motor can drive without stalling. At the
same time, monitor the SG value at this load, e.g. some value within the range 0 to 100. The stall
threshold should be a value safely within the operating limits, to allow for parameter stray. The
response at an SGT setting at or near 0 gives some idea on the quality of the signal: Check the SG
value without load and with maximum load. They should show a difference of at least 100 or a few
100, which shall be large compared to the offset. If you set the SGT value in a way, that a reading of
0 occurs at maximum motor load, the stall can be automatically detected by the motion controller to
issue a motor stop. In the moment of the step resulting in a step loss, the lowest reading will be
visible. After the step loss, the motor will vibrate and show a higher SG reading.
14.4 Limits of stallGuard2 Operation
stallGuard2 does not operate reliably at extreme motor velocities: Very low motor velocities (for many
motors, less than one revolution per second) generate a low back EMF and make the measurement
unstable and dependent on environment conditions (temperature, etc.). The automatic tuning
procedure described above will compensate for this. Other conditions will also lead to extreme
settings of SGT and poor response of the measurement value SG to the motor load.
Very high motor velocities, in which the full sinusoidal current is not driven into the motor coils also
leads to poor response. These velocities are typically characterized by the motor back EMF reaching
the supply voltage.