TRINAMIC TMC262C-LA Datasheet

POWER DRIVER FOR STEPPER MOTORS INTEGRATED CIRCUITS
TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany
TMC262 / TMC262C DATASHEET
BLOCK DIAGRAM
FEATURES AND BENEFITS
High Motor Current up to 10A using external (N&P) MOSFETs. Highest Voltage up to 60V DC operating voltage Highest Resolution up to 256 microsteps per full step Small Size 5x5mm QFN32 package Low Power Dissipation synchronous rectification EMI-optimized slope & current controlled gate drivers Protection & Diagnostics short to GND, overtemperature &
undervoltage; short to VS & overcurrent (TMC262C only)
StallGuard2 high precision sensorless motor load detection CoolStep load dependent current control saves up to 75% MicroPlyer 256 microstep smoothness with 1/16 step input. SpreadCycle high-precision chopper for best current sine
wave form and zero crossing
Improved Silent Motor operation (TMC262C only) Clock Failsafe option for external clock (TMC262C only)
APPLICATIONS
Textile, Sewing Machines Factory Automation Lab Automation Liquid Handling Medical Office Automation Printer and Scanner CCTV, Security ATM, Cash recycler POS Pumps and Valves Heliostat Controller CNC Machines
DESCRIPTION
The TMC262/TMC262C drivers for two-phase stepper motors offer an industry-leading feature set, including high-resolution micro-stepping, sensorless mechanical load measurement, load-adaptive power opti­mization, and low-resonance chopper ope-
ration. Standard SPI™ and STEP/DIR
interfaces simplify communication. The TMC262 uses four external N- and P­channel dual-MOSFETs for motor currents up to 8A RMS and up to 60V. Integrated protection and diagnostic features support robust and reliable operation. High integration, high energy efficiency and small form factor enable miniaturized designs with low external component count for cost-effective and highly competitive solutions. The new –C device improves motor silence and adds low side short protection.
Universal, cost-effective stepper driver for two-phase bipolar motors with state-of-the-art features. External MOSFETs fit different motor sizes. With Step/Dir Interface and SPI.
TMC262/TMC262C DATASHEET (V2.25 / 2020-JUN-08) 2
www.trinamic.com
Layout for Evaluation
APPLICATION EXAMPLES: HIGH POWER SMALL SIZE
The TMC262/TMC262C scores with its high power density and a versatility that covers a wide spectrum of applications and motor sizes, all while keeping costs down. Extensive support at the chip, board, and software levels enables rapid design cycles and fast time-to-market with competitive products. High energy efficiency from TRINAMIC’s CoolStep technology delivers further cost savings in related systems such as power supplies and cooling.
Layout with 6A MOSFETs
Miniaturized Layout
ORDER CODES
Device
PN
Description
Size
TMC262C-LA
00-0167
CoolStep™ driver for external MOSFETs, QFN32
5 x 5 mm2
TMC262-LA
00-0075
CoolStep™ driver for external MOSFETs, QFN32
5 x 5 mm2
TMC262x-LA-T
…T
-T devices are packaged in tape on reel (x=empty or C)
TMC429+26x-EVAL
40-0030
Chipset evaluation board for TMC429, TMC260, TMC261, TMC262, and TMC424.
16 x 10 cm2 LANDUNGSBRÜCKE
40-0167
Baseboard for evaluation boards
85 x 55
ESELSBRÜCKE
40-0098
Connector board for plug-in evaluation board system
61 x 38
*) The Term TMC262 is used for TMC262 or TMC262C within this datasheet. Differences in the TMC262C are explicitly marked with TMC262C. See summary in section 14.
STEPROCKER
The driver stage shown uses 6A-capable dual MOSFETs. All cooling requirements are satisfied by passive convection cooling. The stepRocker is supported by the motioncontrol-community, with forum, applications, schematics, open source projects, demos etc.:
TMCM-MODULE FOR NEMA 11 STEPPER MOTORS
This miniaturized power stage drives up to 1.2A RMS and mounts directly on a 28mm-size motor. Tiny TSOP6 dual MOSFETs enable an ultra-compact and flexible PCB layout.
TMC262-EVAL DEVELOPMENT PLATFORM
This evaluation board is a development platform for applications based on the TMC262C.
External power MOSFETs support drive currents up to 4A RMS and up to 40V peak supply voltage.
The evaluation board system based on the CPU board LANDUNGSBRÜCKE features an USB interface for communication with the learning and development control software TMCL-IDE running on a PC.
The control software provides a user-friendly GUI for setting control parameters and visualizing the dynamic response of the motor.
TMC262/TMC262C DATASHEET (V2.25 / 2020-JUN-08) 3
www.trinamic.com
TABLE OF CONTENTS
1 PRINCIPLES OF OPERATION ......................... 4
1.1 KEY CONCEPTS ............................................... 4
1.2 CONTROL INTERFACES .................................... 5
1.3 MECHANICAL LOAD SENSING ......................... 5
1.4 CURRENT CONTROL ........................................ 5
2 PIN ASSIGNMENTS ........................................... 6
2.1 PACKAGE OUTLINE ......................................... 6
2.2 SIGNAL DESCRIPTIONS .................................. 6
3 INTERNAL ARCHITECTURE ............................. 8
3.1 STANDARD APPLICATION CIRCUIT .................. 9
4 STALLGUARD2 LOAD MEASUREMENT ....... 10
4.1 TUNING THE STALLGUARD2 THRESHOLD ...... 11
4.2 STALLGUARD2 MEASUREMENT FREQUENCY
AND FILTERING ............................................ 12
4.3 DETECTING A MOTOR STALL ........................ 13
4.4 LIMITS OF STALLGUARD2 OPERATION ......... 13
5 COOLSTEP LOAD-ADAPTIVE CURRENT
CONTROL ........................................................... 14
5.1 TUNING COOLSTEP ...................................... 16
6 SPI INTERFACE ................................................ 17
6.1 BUS SIGNALS............................................... 17
6.2 BUS TIMING ................................................ 17
6.3 BUS ARCHITECTURE ..................................... 18
6.4 REGISTER WRITE COMMANDS ...................... 19
6.5 DRIVER CONTROL REGISTER (DRVCTRL) .... 21
6.6 CHOPPER CONTROL REGISTER (CHOPCONF) ..
................................................................... 23
6.7 COOLSTEP CONTROL REGISTER (SMARTEN) ...
................................................................... 24
6.8 STALLGUARD2 CONTROL REGISTER
(SGCSCONF) ............................................. 25
6.9 DRIVER CONTROL REGISTER (DRVCONF) ... 26
6.10 READ RESPONSE .......................................... 27
6.11 DEVICE INITIALIZATION ............................... 28
7 STEP/DIR INTERFACE ..................................... 29
7.1 TIMING ........................................................ 29
7.2 MICROSTEP TABLE ....................................... 30
7.3 CHANGING RESOLUTION .............................. 31
7.4 MICROPLYER STEP INTERPOLATOR ............... 31
7.5 STANDSTILL CURRENT REDUCTION ............... 32
8 CURRENT SETTING .......................................... 33
8.1 SENSE RESISTORS ........................................ 34
9 CHOPPER OPERATION ................................... 35
9.1 SPREADCYCLE CHOPPER ............................... 36
9.2 CLASSIC CONSTANT OFF-TIME CHOPPER ..... 39
10 POWER MOSFET STAGE ................................ 41
10.1 BREAK-BEFORE-MAKE LOGIC ........................ 41
10.2 ENN INPUT ................................................. 41
10.3 SLOPE CONTROL .......................................... 41
11 DIAGNOSTICS AND PROTECTION ............. 43
11.1 SHORT PROTECTION..................................... 43
11.2 OPEN-LOAD DETECTION .............................. 44
11.3 TEMPERATURE SENSORS ............................... 45
11.4 UNDERVOLTAGE DETECTION ......................... 45
12 POWER SUPPLY SEQUENCING .................... 46
13 SYSTEM CLOCK ................................................ 47
13.1 FREQUENCY SELECTION ................................ 48
14 TMC262C COMPATIBILITY ........................... 49
15 MOSFET EXAMPLES ......................................... 50
16 LAYOUT CONSIDERATIONS ......................... 51
16.1 SENSE RESISTORS ........................................ 51
16.2 EXPOSED DIE PAD ....................................... 51
16.3 POWER FILTERING ....................................... 51
16.4 THERMAL RESISTANCE ................................. 51
16.5 LAYOUT EXAMPLE ........................................ 52
17 ABSOLUTE MAXIMUM RATINGS ................. 54
18 ELECTRICAL CHARACTERISTICS ................. 55
18.1 OPERATIONAL RANGE .................................. 55
18.2 DC AND AC SPECIFICATIONS ...................... 55
19 PACKAGE MECHANICAL DATA .................... 59
19.1 DIMENSIONAL DRAWINGS ........................... 59
19.2 PACKAGE CODE ........................................... 60
20 DISCLAIMER ..................................................... 60
21 ESD SENSITIVE DEVICE ................................ 60
22 TABLE OF FIGURES ......................................... 61
23 REVISION HISTORY ....................................... 62
24 REFERENCES ...................................................... 62
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 4
www.trinamic.com
1 Principles of Operation
µC
SPI
TMC262
MOSFET
Driver
Stage
N
S
S/D
0A+
0A-
0B+ 0B-
High-Level
Interface
µC
SPI
SPI
TMC262
MOSFET
Driver
Stage
N
S
S/D
0A+
0A-
0B+ 0B-
TMC429
Motion
Controller
for up to 3 Motors
High-Level
Interface
Figure 1.1 Applications block diagrams
The TMC262 motor driver is the intelligence between a motion controller and the power MOSFETs for driving a two-phase stepper motor, as shown in Figure 1.1 Following power-up, an embedded microcontroller initializes the driver by sending commands over an SPI bus to write control parameters and mode bits in the TMC262. The microcontroller may implement the motion-control function as shown in the upper part of the figure, or it may send commands to a dedicated motion controller chip such as TRINAMIC’s TMC429 as shown in the lower part.
The motion controller can control the motor position by sending pulses on the STEP signal while indicating the direction on the DIR signal. The TMC262 has a microstep counter and sine table to convert these signals into the coil currents which control the position of the motor. If the microcontroller implements the motion-control function, it can write values for the coil currents directly to the TMC262 over the SPI interface, in which case the STEP/DIR interface may be disabled. This mode of operation requires software to track the motor position and reference a sine table to calculate the coil currents.
To optimize power consumption and heat dissipation, software may also adjust CoolStep and StallGuard2 parameters in real-time, for example to implement different tradeoffs between speed and power consumption in different modes of operation.
The motion control function is a hard real-time task which may be a burden to implement reliably alongside other tasks on the embedded microcontroller. By offloading the motion-control function to the TMC429, up to three motors can be operated reliably with very little demand for service from the microcontroller. Software only needs to send target positions, and the TMC429 generates precisely timed step pulses. Software retains full control over both the TMC262 and TMC429 through the SPI bus.
1.1 Key Concepts
The TMC262 motor driver implements several advanced patented features which are exclusive to TRINAMIC products. These features contribute toward greater precision, greater energy efficiency, higher reliability, smoother motion, and cooler operation in many stepper motor applications.
StallGuard2 High-precision load measurement using the back EMF on the coils CoolStep Load-adaptive current control which reduces energy consumption by as much as
75%
SpreadCycle™ High-precision chopper algorithm available as an alternative to the traditional
constant off-time algorithm
MicroPlyer Microstep interpolator for obtaining increased smoothness of microstepping over a
STEP/DIR interface
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 5
www.trinamic.com
In addition to these performance enhancements, TRINAMIC motor drivers also offer safeguards to detect and protect against shorted outputs, open-circuit output, overtemperature, and undervoltage conditions for enhancing safety and recovery from equipment malfunctions.
1.2 Control Interfaces
There are two control interfaces from the motion controller to the motor driver: the SPI serial interface and the STEP/DIR interface. The SPI interface is used to write control information to the chip and read back status information. This interface must be used to initialize parameters and modes necessary to enable driving the motor. This interface may also be used for directly setting the currents flowing through the motor coils, as an alternative to stepping the motor using the STEP and DIR signals, so the motor can be controlled through the SPI interface alone.
The STEP/DIR interface is a traditional motor control interface available for adapting existing designs to use TRINAMIC motor drivers. Using only the SPI interface requires slightly more CPU overhead to look up the sine tables and send out new current values for the coils.
1.2.1 SPI Interface
The SPI interface is a bit-serial interface synchronous to a bus clock. For every bit sent from the bus master to the bus slave, another bit is sent simultaneously from the slave to the master. Communication between an SPI master and the TMC262 slave always consists of sending one 20-bit command word and receiving one 20-bit status word.
For purely SPI-controlled operation, the SPI command rate typically corresponds to the microstep rate at low velocities. At high velocities, the rate may be limited by CPU bandwidth to 10-100 thousand commands per second, so the application may need to change to fullstep resolution.
1.2.2 STEP/DIR Interface
The STEP/DIR interface is enabled by default. Active edges on the STEP input can be rising edges or both rising and falling edges, as controlled by another mode bit (DEDGE). Using both edges cuts the toggle rate of the STEP signal in half, which is useful for communication over slow interfaces such as optically isolated interfaces.
On each active edge, the state sampled from the DIR input determines whether to step forward or back. Each step can be a fullstep or a microstep, in which there are 2, 4, 8, 16, 32, 64, 128, or 256 microsteps per fullstep. During microstepping, a low state on DIR increases the microstep counter and a high decreases the counter by an amount controlled by the microstep resolution. An internal table translates the counter value into the sine and cosine values which control the motor current for microstepping.
1.3 Mechanical Load Sensing
The TMC262 provides StallGuard2 high-resolution load measurement for determining the mechanical load on the motor by measuring the back EMF. In addition to detecting when a motor stalls, this feature can be used for homing to a mechanical stop without a limit switch or proximity detector. The CoolStep power-saving mechanism uses StallGuard2 to reduce the motor current to the minimum motor current required to meet the actual load placed on the motor.
1.4 Current Control
Current into the motor coils is controlled using a cycle-by-cycle chopper mode. Two chopper modes are available: a traditional constant off-time mode and the new SpreadCycle mode. SpreadCycle mode offers smoother operation and greater power efficiency over a wide range of speed and load.
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 6
www.trinamic.com
2 Pin Assignments
2.1 Package Outline
GND
HA1 HA2
BMA2
BMA1
SRA
VCC_IO
VS
CSN
GND
SDI
SCK
SRB
LB2
LB1
BMB1
BMB2
HB2
HB1
VHS
CLK
Top view
LA1
LA2
32 31 30 29 28 27 26 25
9 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24
1 2 3 4 5 6 7 8
TMC 262-LA
ENN
SDO
5VOUT
TST_ANA
SG_TST
GNDP
DIR
STEP
TST_MODE
Figure 2.1 TMC262 pin assignments
2.2 Signal Descriptions
Pin
Number
Type
Function
GND, GNDP, exposed pad
1
GND pads for different parts of the internal circuitry. Tie all GND pins and the die attach pad to a solid common GND plane. Directly connect the sense resistor GND side to this GND plane.
13
28
HA1
2
O (VS)
High side P-channel driver output. Becomes driven to VHS to switch on MOSFET.
HA2
3
HB1
23
HB2
22
BMA1
5
I (VS)
Sensing input for bridge outputs. Used for short to GND protection. May be tied to VS if unused.
BMA2
4
BMB1
20
BMB2
21
LA1
6
O 5V
Low side MOSFET driver output. Becomes driven to 5VOUT to switch on MOSFET.
LA2
7
LB1
19
LB2
18
SRA
8
AI
Sense resistor input of chopper driver. SRB
17
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 7
www.trinamic.com
Pin
Number
Type
Function
5VOUT
9 Output of internal 5V linear regulator. This voltage is used to supply the low-side drivers and internal analog circuitry. An external capacitor to GND close to the pin is required. Place the capacitor near to pin 9 and connect the other side to the GND plane. 470nF ceramic is sufficient for most applications; an additional low-ESR capacitor (10µF or more) improves performance with high gate charge MOSFETs.
SDO
10
DO VIO
Data output of SPI interface (Tristate)
SDI
11
DI VIO
Data input of SPI interface (Scan test input in test mode)
SCK
12
DI VIO
Serial clock input of SPI interface (Scan test shift enable input in test mode)
CSN
14
DI VIO
Chip select input of SPI interface
ENN
15
DI VIO
Enable not input for drivers. Switches off all MOSFETs.
CLK
16
DI VIO
Clock input for all internal operations. Tie low to use internal oscillator. The first high signal disables the internal oscillator until power down.
VHS
24 High side supply voltage (motor supply voltage VS - 10V)
VS
25 Motor supply voltage
TST_ANA
26
AO VIO
Analog mode test output. Leave open for normal operation.
SG_TST
27
DO VIO
StallGuard2™ output. Signals motor stall (high active).
VCC_IO
29 Input / output supply voltage VIO for all digital pins. Tie to digital logic supply voltage. Allows operation in 3.3V and 5V systems.
DIR
30
DI VIO
Direction input. Is sampled upon detection of a step to determine stepping direction. An internal glitch filter for 60ns is provided.
STEP
31
DI VIO
Step input. An internal glitch filter for 60ns is provided.
TST_MODE
32
DI VIO
Test mode input. Puts IC into test mode. Tie to GND for normal operation using a short wire to GND plane.
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 8
www.trinamic.com
3 Internal Architecture
Figure 3.1 shows the internal architecture of the TMC262.
+V
M
+V
M
VHS
5V linear regulator
5VOUT
470nF
VS
GND
slope HS
slope LS
SRA
D
ENABLE
5V supply
TMC262
OSC
15MHz
CSN
D
SCK
SDI
D
D
SDO
D
R
SENSE
DIE PAD
SPI interface
Chopper
logic
100m for 2.8A peak (resp. 1.5A peak)
Provide sufficient filtering capacity
near bridge transistors (electrolyt
capacitors and ceramic capacitors)
S
D
G
S
D
G
P
N
motor coil A
HA2
HA1
BMA1
BMA2
S
D
G
S
D
G
P
N
LA1
LA2
P-Gate drivers
Short to
GND
detectors
N-Gate drivers
Break
before
make
VHS
+5V
9
DAC
VS-10V
linear
regulator
220n 16V
100n
Protection &
Diagnostics
+V
M
slope HS
slope LS
SRB
R
SENSE
Chopper
logic
100m for 2.8A peak (resp. 1.5A peak)
S
D
G
S
D
G
P
N
motor coil B
HB2
HB1
BMB1
BMB2
S
D
G
S
D
G
P
N
LB1
LB2
P-Gate drivers
Short to
GND
detectors
N-Gate drivers
Break
before
make
VHS
+5V
9
DAC
ENABLE
ENABLE
Step & Direction interface
Step multiply
16 à 256
Sine wave 1024 entry
M
U X
STEP
D
DIR
D
Temperature
sensor
100°C, 150°C
CoolStep
Energy efficiency
stallGuard 2
Clock
selector
CLK
D
SG_TST
Digital
control
D
SHORT TO GND
BACK EMF
CLK
8-20MHz
SIN & COS
Phase polarity
Phase polarity
VCC_IO
D
D
TEST_SE
3.3V or 5V
+V
CC
100n
9-59V
step & dir
(optional)
SPI
stallGuard
output
TEST_ANA
10R
10R
optional input protection
resistors against inductive sparks
upon motor cable break
VSENSE
0.30V
0.16V
V
REF
Figure 3.1 TMC262 block diagram
Prominent features include:
Oscillator and clock selector
provides the system clock from the on-chip oscillator or an external source.
Step and direction interface
uses a microstep counter and sine table to generate target currents for the coils.
SPI interface
receives commands that directly set the coil current values.
Multiplexer
selects either the output of the sine table or the SPI interface for controlling the current into the motor coils.
Multipliers
scales down the currents to both coils when the currents are greater than those required by the load on the motor or as set by the CS current scale parameter.
DACs and comparators
converts the digital current values to analog signals that are compared with the voltages on the sense resistors. Comparator outputs terminate chopper drive phases when target currents are reached.
Break-before-make and gate drivers
ensure non-overlapping pulses, boost pulse voltage, and control pulse slope to the gates of the power MOSFETs.
On-chip voltage regulators
provide high-side voltage for P-channel MOSFET gate drivers and supply voltage for on-chip analog and digital circuits.
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 9
www.trinamic.com
3.1 Standard Application circuit
47R
LS
VCC_IO
TMC262
SPI interface
CSN
SCK
SDO
SDI
Step&Dir input
with microPlyer
STEP
DIR
stallGuard2
5V Voltage
regulator
CLK
SG_TST
+V
M
5VOUT
VS
2.2µ
+V
IO
DRV_ENN
GND
TST_MODE
DIE PAD
opt. ext. clock
12-16MHz
3.3V or 5V
I/O voltage
100n
100n
Sequencer
LS
stepper
motor
N
S
BMA2
Chopper
SRAH
C
E
Must be identical
to bridge supply!
Use low inductivity SMD
type, e.g. 1210 or 2512
resistor for RS!
TST_ANA
opt. driver enable
B.Dwersteg, ©
TRINAMIC 2014
R
S
LA1
LA2
HA1
HA2
BMA1
HS
HS
+V
M
LS
LS
BMB2
SRBH
R
S
LB1
LB2
HB1
HB2
BMB1
HS
HS
+V
M
VS-10V
regulator
VHS
220n
TEST OUT
470n
470n
Keep inductivity of the fat
interconnections as small as
possible to avoid ringing!
47R
pd
VS
VHS
5V
VS
VHS
5V
pd
Leave unconnected
C5VOUT: 470nF to 10µF
(higher for lower noise chopper) CVHS: 220nF to 1µF
(both higher for higher MOSFET gate
charge)
SPI interface for
configuration or for driving
(optional to Step/Dir) Configuration pins in stand
alone mode Stall detection pulse
(react to first impulse / ignore outside velocity window)
Tie to the same GND plane as the sense resistor s GND
Figure 2 Standard application circuit
The standard application uses a minimum number of external components in order to operate the stepper motor. Four N-channel and four P-channel MOSFETs are required, and shall be selected as required for the application motor current. See chapter 15 for examples. With N&P channel FETs, no charge-pump is required, making the design small and robust. Two sense resistors set the motor coil current. See chapter 8 for the calculation of the right sense resistor value. Use low ESR capacitors for filtering the power supply. A minimum of 100µF per ampere of coil current near to the power bridge is recommended for best performance. These capacitors need to cope with the current ripple caused by chopper operation, thus they should not be dimensioned too small. Current ripple in the supply capacitors also depends on the power supply internal resistance and cable length. VCC_IO can be supplied from 5VOUT, or from an external source, e.g. 3.3V.
Basic layout hints Place sense resistors and all filter capacitors as close as possible to the power MOSFETs. Place the TMC262 near to the MOSFETs and use short interconnection lines in order to minimize parasitic trace inductance. Use a solid common GND for GND and die pad GND connections, also for sense resistor GND. Connect 5VOUT filtering capacitor directly to 5VOUT and GND plane. See layout hints for more details. High capacity ceramic or low ESR electrolytic capacitors are recommended for VS filtering.
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 10
www.trinamic.com
4 StallGuard2 Load Measurement
StallGuard2 provides an accurate measurement of the load on the motor. It can be used for stall detection as well as other uses at loads below those which stall the motor, such as CoolStep load­adaptive current reduction. (StallGuard2 is a more precise evolution of the earlier StallGuard technology.) The StallGuard2 measurement value changes linearly over a wide range of load, velocity, and current settings, as shown in Figure 4.1. At maximum motor load, the value goes to zero or near to zero. This corresponds to a load angle of 90° between the magnetic field of the coils and magnets in the rotor. This also is the most energy-efficient point of operation for the motor.
motor load
(% max. torque)
stallGuard2
reading
100
200
300
400
500
600
700
800
900
1000
0 10 20 30 40 50 60 70 80 90 100
Start value depends on motor and operating conditions
Motor stalls above this point. Load angle exceeds 90° and available torque sinks.
stallGuard value reaches zero and indicates danger of stall.
This point is set by stallGuard
threshold value SGT.
Figure 4.1 StallGuard2 load measurement SG as a function of load
Two parameters control StallGuard2 and one status value is returned.
Parameter
Description
Setting
Comment
SGT
7-bit signed integer that sets the StallGuard2 threshold level for asserting the SG_TST output and sets the optimum measurement range for readout. Negative values increase sensitivity, and positive values reduce sensitivity so more torque is required to indicate a stall. Zero is a good starting value. Operating at values below
-10 is not recommended.
0
indifferent value
+1… +63
less sensitivity
-1… -64
higher sensitivity
SFILT
Mode bit which enables the StallGuard2 filter for more precision. If set, reduces the measurement frequency to one measurement per four fullsteps. If cleared, no filtering is performed. Filtering compensates for mechanical asymmetries in the construction of the motor, but at the expense of response time. Unfiltered operation is recommended for rapid stall detection. Filtered operation is recommended for more precise load measurement.
0
standard mode
1
filtered mode
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 11
www.trinamic.com
Status word
Description
Range
Comment
SG
10-bit unsigned integer StallGuard2 measure­ment 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.
0… 1023
0: highest load 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 performance. 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. This figure shows an optimal SGT curve in black and a two-point interpolated SGT curve in red.
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 12
www.trinamic.com
back EMF reaches
supply voltage
optimum
SGT setting
Motor RPM
(200 FS motor)
stallGuard2
reading at
no load
2
4
6
8
10
12
14
16
100
200
300
400
500
600
700
800
900
10001820
0 0 50 100 150 200 250 300 350 400 450 500 550 600
lower limit for stall
detection 4 RPM
simplified
SGT setting
Figure 4.2 Linear interpolation for optimizing SGT with changes in velocity
4.1.2 Small Motors with High Torque Ripple and Resonance
Motors with a high detent torque show an increased variation of the StallGuard2 measurement value SG with varying motor currents, especially at low currents. For these motors, the current dependency might need correction in a similar manner to velocity correction for obtaining the highest accuracy.
4.1.3 Temperature Dependence of Motor Coil Resistance
Motors working over a wide temperature range may require temperature correction, because motor coil resistance increases with rising temperature. This can be corrected as a linear reduction of SG at increasing temperature, as motor efficiency is reduced.
4.1.4 Accuracy and Reproducibility of StallGuard2 Measurement
In a production environment, it may be desirable to use a fixed SGT value within an application for one motor type. Most of the unit-to-unit variation in StallGuard2 measurements results from manufacturing tolerances in motor construction. The measurement error of StallGuard2 – provided that all other parameters remain stable – can be as low as:
  󰇛󰇜
4.2 StallGuard2 Measurement Frequency and Filtering
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 only be disabled when rapid response to increasing load is required, such as for stall detection at high velocity.
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 13
www.trinamic.com
4.3 Detecting a Motor Stall
To safely detect a motor stall, a stall threshold must be determined using a specific SGT setting. Therefore, you need to determine the maximum load the motor can drive without stalling and to monitor the SG value at this load, for example some value within the range 0 to 400. The stall threshold should be a value safely within the operating limits, to allow for parameter stray. So, your microcontroller software should set a stall threshold which is slightly higher than the minimum value seen before an actual motor stall occurs. 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. These values 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 so that a reading of 0 occurs at maximum motor load, an active high stall output signal will be available at SG_TST output.
4.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.). 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 lead to poor response. These velocities are typically characterized by the motor back EMF reaching the supply voltage.
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 14
www.trinamic.com
5 CoolStep Load-Adaptive Current Control
CoolStep allows substantial energy savings, especially for motors which see varying loads or operate at a high duty cycle. Because a stepper motor application needs to work with a torque reserve of 30% to 50%, even a constant-load application allows significant energy savings because CoolStep automatically enables torque reserve when required. Reducing power consumption keeps the system cooler, increases motor life, and allows reducing cost in the power supply and cooling components.
Hint
Reducing motor current by half results in reducing power by a factor of four.
Energy efficiency - power consumption decreased up to 75%. Motor generates less heat - improved mechanical precision. Less cooling infrastructure - for motor and driver. Cheaper motor - does the job.
0
0,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
0 50 100 150 200 250 300 350
Efficiency
Velocity [RPM]
Efficiency with coolStep
Efficiency with 50% torque reserve
Figure 5.1 Energy efficiency example with CoolStep
Figure 5.1 shows the efficiency gain of a 42mm stepper motor when using CoolStep compared to standard operation with 50% of torque reserve. CoolStep is enabled above 60rpm in the example.
CoolStep is controlled by several parameters, but two are critical for understanding how it works:
Parameter
Description
Range
Comment
SEMIN
4-bit unsigned integer that sets a lower threshold. If SG goes below this threshold, CoolStep increases the current to both coils. The 4-bit SEMIN value is scaled by 32 to cover the lower half of the range of the 10-bit SG value. (The name of this parameter is derived from smartEnergy, which is an earlier name for CoolStep.)
0… 15
lower StallGuard threshold: SEMINx32 SEMAX
4-bit unsigned integer that controls an upper threshold. If SG is sampled equal to or above this threshold enough times, CoolStep decreases the current to both coils. The upper threshold is (SEMIN + SEMAX + 1) x 32.
0… 15
upper StallGuard threshold: (SEMIN+SEMAX+1)x32
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 15
www.trinamic.com
Figure 5.2 shows the operating regions of CoolStep. The black line represents the SG measurement value, the blue line represents the mechanical load applied to the motor, and the red line represents the current into the motor coils. When the load increases, SG falls below SEMIN, and CoolStep increases the current. When the load decreases and SG rises above (SEMIN + SEMAX + 1) x 32 the current becomes reduced.
stallGuard2
reading
0=maximum load
motor current increment area
motor current reduction area
stall possible
SEMIN
SEMAX+SEMIN+1
time
motor current
current setting CS (upper limit)
½ or ¼ CS (lower limit)
mechanical load
current increment due to
increased load
slow current reduction due
to reduced motor load
load angle optimized load angle optimized
load
angle
optimized
Figure 5.2 CoolStep adapts motor current to the load
Four more parameters control CoolStep and one status value is returned:
Parameter
Description
Range
Comment
CS
Current scale. Scales both coil current values as taken from the internal sine wave table or from the SPI interface. For high precision motor operation, work with a current scaling factor in the range 16 to 31, because scaling down the current values reduces the effective microstep resolution by making microsteps coarser. This setting also controls the maximum current value set by CoolStep™.
0… 31
scaling factor: 1/32, 2/32, … 32/32
SEUP
Number of increments of the coil current for each occurrence of an SG measurement below the lower threshold.
0… 3
step width is: 1, 2, 4, 8
SEDN
Number of occurrences of SG measurements above the upper threshold before the coil current is decremented.
0… 3
number of StallGuard measurements per decrement: 32, 8, 2, 1
SEIMIN
Mode bit that controls the lower limit for scaling the coil current. If the bit is set, the limit is ¼ CS. If the bit is clear, the limit is ½ CS. 0
Minimum motor current: 1/2 of CS
1
1/4 of CS
Status word
Description
Range
Comment
SE
5-bit unsigned integer reporting the actual cur­rent scaling value determined by CoolStep. This value is biased by 1 and divided by 32, so the range is 1/32 to 32/32. The value will not be greater than the value of CS or lower than either ¼ CS or ½ CS depending on SEIMIN setting.
0… 31
Actual motor current scaling factor set by CoolStep: 1/32, 2/32, … 32/32
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 16
www.trinamic.com
5.1 Tuning CoolStep
Before tuning CoolStep, first tune the StallGuard2 threshold level SGT, which affects the range of the load measurement value SG. CoolStep uses SG to operate the motor near the optimum load angle of +90°.
The current increment speed is specified in SEUP, and the current decrement speed is specified in SEDN. They can be tuned separately because they are triggered by different events that may need different responses. The encodings for these parameters allow the coil currents to be increased much more quickly than decreased, because crossing the lower threshold is a more serious event that may require a faster response. If the response is too slow, the motor may stall. In contrast, a slow response to crossing the upper threshold does not risk anything more serious than missing an opportunity to save power.
Hint
CoolStep operates between limits controlled by the current scale parameter CS and the SEIMIN bit.
5.1.1 Response Time
For fast response to increasing motor load, use a high current increment step SEUP. If the motor load changes slowly, a lower current increment step can be used to avoid motor current oscillations. If the filter controlled by SFILT is enabled, the measurement rate and regulation speed are cut by a factor of four.
5.1.2 Low Velocity and Standby Operation
Because StallGuard2 is not able to measure the motor load in standstill and at very low RPM, the current at low velocities should be set to an application-specific default value and combined with standstill current reduction settings programmed through the SPI interface.
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 17
www.trinamic.com
6 SPI Interface
The TMC262 allows full control over all configuration parameters and mode bits through the SPI interface. An initialization is required prior to motor operation. The SPI interface also allows reading back status values and bits.
6.1 Bus Signals
The SPI bus on the TMC262 has four signals:
SCK bus clock input SDI serial data input SDO serial data output CSN chip select input (active low)
The slave is enabled for an SPI transaction by a low on the chip select input CSN. Bit transfer is synchronous to the bus clock SCK, with the slave latching the data from SDI on the rising edge of SCK and driving data to SDO following the falling edge. The most significant bit is sent first. A minimum of 20 SCK clock cycles is required for a bus transaction with the TMC262.
If more than 20 clocks are driven, the additional bits shifted into SDI are shifted out on SDO after a 20-clock delay through an internal shift register. This can be used for daisy chaining multiple chips.
CSN must be low during the whole bus transaction. When CSN goes high, the contents of the internal shift register are latched into the internal control register and recognized as a command from the master to the slave. If more than 20 bits are sent, only the last 20 bits received before the rising edge of CSN are recognized as the command.
6.2 Bus Timing
SPI interface is synchronized to the internal system clock, which limits the SPI bus clock SCK to half of the system clock frequency. If the system clock is based on the on-chip oscillator, an additional 10% safety margin must be used to ensure reliable data transmission. All SPI inputs as well as the ENN input are internally filtered to avoid triggering on pulses shorter than 20ns. Figure 6.1 shows the timing parameters of an SPI bus transaction, and the table below specifies their values.
CSN
SCK
SDI
SDO
t
CC
t
CC
t
CL
t
CH
bit19 bit18 bit0
bit19 bit18 bit0
t
DO
t
ZC
t
DU
t
DH
t
CH
Figure 6.1 SPI Timing
Hint
Usually this SPI timing is referred to as SPI MODE 3
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 18
www.trinamic.com
SPI Interface Timing
AC-Characteristics
clock period is t
CLK
Parameter
Symbol
Conditions
Min
Typ
Max
Unit
SCK valid before or after change of CSN
tCC 10
ns
CSN high time
t
CSH
*)
Min time is for synchronous CLK with SCK high one tCH before CSN high only
t
CLK
>2t
CLK
+10
ns
SCK low time
tCL
*)
Min time is for synchronous CLK only
t
CLK
>t
CLK
+10
ns
SCK high time
tCH
*)
Min time is for synchronous CLK only
t
CLK
>t
CLK
+10
ns
SCK frequency using internal clock
f
SCK
Assumes minimum OSC frequency
4
MHz
SCK frequency using external 16MHz clock
f
SCK
Assumes synchronous CLK
8
MHz
SDI setup time before rising edge of SCK
tDU 10
ns
SDI hold time after rising edge of SCK
tDH 10
ns
Data out valid time after falling SCK clock edge
tDO
No capacitive load on SDO
t
FILT
+5
ns
SDI, SCK, and CSN filter delay time
t
FILT
Rising and falling edge
12
20
30
ns
6.3 Bus Architecture
SPI slaves can be chained and used with a single chip select line. If slaves are chained, they behave like a long shift register. For example, a chain of two motor drivers requires 40 bits to be sent. The last bits shifted to each register in the chain are loaded into an internal register on the rising edge of the CSN input. For example, 24 or 32 bits can be sent to a single motor driver, but it latches just the last 20 bits received before CSN goes high.
Driver 3
STEP
DIR
CSN SCK
SDO
SDI
VCC_IO
TMC429
triple stepper motor controller
SPI to master
nSCS_C
SCK_C
SDOZ_C
SDI_C
CLK
3x linear RAMP
generator
Position
comparator
Interrupt controller
nINT
Reference switch
processing
Step &
Direction
pulse
generation
Output select
SPI or
Step & Dir
Microstep
table
Serial driver
interface
POSCOMP
3 x REF_L, REF_R
S1 (SDO_S)
D1 (SCK_S)
S2 (nSCS_S)
D2 (SDI_S)
S3 (nSCS_2)
D3 (nSCS_3)
Driver 2
Real time Step/Dir
interface
User CPU
Motion command
SPI
(TM)
Configuration and diagnostics SPI
(TM)
Mechanical Feedback
or virtual stop switch
Realtime event trigger
Virtual stop switch
Third driver and motor
Second driver and motor
System interfacing
System control
Motion control
Gate driver
Gate driver
Gate Driver
Gate Driver
2 x Current Comparator
TMC262
Protection
& Diagnostics
Sine Table
4*256 entry
2 x DAC
SPI control,
Config & Diags
stallGuard2
coolStep™
x
Step Multiplier
SG_TST
Chopper
+V
M
HS
LS
2 Phase Stepper
N
S
BM
RSR
S
RS
Motor Driver
Figure 6.2 Interfaces to a TMC429 motion controller chip and a TMC262 motor driver
Figure 6.2 shows the interfaces in a typical application. The SPI bus is used by an embedded MCU to initialize the control registers of both a motion controller and one or more motor drivers. STEP/DIR interfaces are used between the motion controller and the motor drivers.
TMC262 / TMC262C DATASHEET (Rev. 2.25 / 2020-JUN-08) 19
www.trinamic.com
6.4 Register Write Commands
An SPI bus transaction to the TMC262 is a write command to one of the five write-only registers that hold configuration parameters and mode bits:
Register
Description
Driver Control Register (DRVCTRL)
The DRVCTRL register has different formats for controlling the interface to the motion controller depending on whether or not the STEP/DIR interface is enabled.
Chopper Configuration Register (CHOPCONF)
The CHOPCONF register holds chopper parameters and mode bits.
CoolStep Configuration Register (SMARTEN)
The SMARTEN register holds CoolStep parameters and a mode bit. (smartEnergy is an earlier name for CoolStep.)
StallGuard2 Configuration Register (SGCSCONF)
The SGCSCONF register holds StallGuard2 parameters and a mode bit.
Driver Configuration Register (DRVCONF)
The DRVCONF register holds parameters and mode bits used to control the power MOSFETs and the protection circuitry. It also holds the SDOFF bit which controls the STEP/DIR interface and the RDSEL parameter which controls the contents of the response returned in an SPI transaction
In the following sections, multibit binary values are prefixed with a % sign, for example %0111.
Loading...
+ 43 hidden pages