TMC260 and TMC261 DATASHEET (Rev. 2.05 / 2012-NOV-05)
10
Status word
Description
10-bit unsigned
Range
Comment
SG
integer
stallGuard2 0… 1023
0: highest load
measurement value. A higher value indicates
lower mechanical load. A lower value indicates
a higher load and therefore a higher load angle.
For stall detection, adjust SGT to return an SG
value of 0 or slightly higher upon maximum
motor load before stall.
low value: high load
high value: less load
4.1 Tuning the stallGuard2 Threshold
Due to the dependency of the stallGuard2 value SG from motor-specific characteristics and application-
specific demands on load and velocity the easiest way to tune the stallGuard2 threshold SGT for a
specific motor type and operating conditions is interactive tuning in the actual application.
The procedure is:
1. Operate the motor at a reasonable velocity for your application and monitor SG.
2. Apply slowly increasing mechanical load to the motor. If the motor stalls before SG reaches
zero, decrease SGT. If SG reaches zero before the motor stalls, increase SGT. A good SGT
starting value is zero. SGT is signed, so it can have negative or positive values.
3. The optimum setting is reached when SG is between 0 and 400 at increasing load shortly
before the motor stalls, and SG increases by 100 or more without load. SGT in most cases can
be tuned together with the motion velocity in a way that SG goes to zero when the motor
stalls and the stall output SG_TST is asserted. This indicates that a step has been lost.
The system clock frequency affects SG. An external crystal-stabilized clock should be used for
applications that demand the highest precision. The power supply voltage also affects SG, so tighter
regulation results in more accurate values. SG measurement has a high resolution, and there are a
few ways to enhance its accuracy, as described in the following sections.
4.1.1 Variable Velocity Operation
Across a range of velocities, on-the-fly adjustment of the stallGuard2 threshold SGT improves the
accuracy of the load measurement SG. This also improves the power reduction provided by coolStep,
which is driven by SG. Linear interpolation between two SGT values optimized at different velocities is
a simple algorithm for obtaining most of the benefits of on-the-fly SGT adjustment, as shown in
Figure 4.2. An optimal SGT curve in black and a two-point interpolated SGT curve in red are shown.
1000
900
800
700
600
500
400
300
200
100
0
20
18
16
14
12
10
8
stallGuard2
reading at
no load
optimum
SGT setting
6
simplified
SGT setting
4
2
0
50
100
150
200
250
300
350
400
450
500
550
600
Motor RPM
(200 FS motor)
lower limit for stall
detection 4 RPM
back EMF reaches
supply voltage
Figure 4.2 Linear interpolation for optimizing SGT with changes in velocity.
www.trinamic.com