POWER DRIVER FOR STEPPER MOTORS
INTEGRATED CIRCUITS
TMC5031 DATASHEET
Dual, cost-effective controller and driver for up to two 2-phase bipolar stepper motors.
Integrated motion controller with SPI interface.
A
PPLICATIONS
CCTV, Security
Antenna Positioning
Heliostat Controller
Battery powered applications
Office Automation
ATM, Cash recycler, POS
Lab Automation
Liquid Handling
Medical
Printer and Scanner
Pumps and Valves
F
EATURES
AND
B
ENEFITS
D
ESCRIPTION
The TMC5031 is a low cost motion controller
and driver IC for up to two stepper motors.
It combines two flexible ramp motion
controllers with energy efficient stepper
motor drivers. The drivers support two-phase
stepper motors and offer an industry-leading
feature
set,
including
high-resolution
microstepping, sensorless mechanical load
measurement, load-adaptive power optimi-
zation, and low-resonance chopper operation.
All features are controlled by a standard
SPI™ interface. 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.
2-phase
stepper motors
Drive Capability
up to 2 x 1.1A coil current
Motion Controller
with
sixPoint™
ramp
Voltage Range
4.75… 16V DC
SPI Interface
2x Ref.-Switch input per axis
Highest Resolution
256 microsteps per full step
Full Protection & Diagnostics
stallGuard2™
high precision sensorless motor load detection
coolStep™
load dependent current control for energy savings up
to 75%
spreadCycle™
high-precision chopper for best current sine wave
form and zero crossing with additional
chopSync2™
Compact Size
7x7mm QFN48 package
B
LOCK
D
IAGRAM
2x Ref. Switches
Power
Supply
Charge
Pump
MOTION CONTROLLER
with Linear 6 Point
RAMP Generator
TMC5031
Programmable
256 µStep
Sequencer
Protection
& Diagnostics
Motor 1
DRIVER 1
SPI
Protection
& Diagnostics
Motor 2
DRIVER 2
MOTION CONTROLLER
with Linear 6 Point
RAMP Generator
Programmable
256 µStep
Sequencer
stallGuard2
coolStep
2x Ref. Switches
TRINAMIC Motion Control GmbH & Co. KG
Hamburg, Germany
TMC5031 DATASHEET (Rev. 1.09 / 2014-JUL-01)
2
APPLICATION EXAMPLES: HIGH FLEXIBILITY – MULTIPURPOSE USE
The TMC5031 scores with power density, complete motion controlling features and integrated power
stages. It offers a versatility that covers a wide spectrum of applications from battery systems up to
embedded applications with 1.1A current per motor. The small form factor keeps costs down and allows for
miniaturized layouts. Extensive support at the chip, board, and software levels enables rapid design cycles
and fast time-to-market with competitive products. High energy efficiency and reliability from TRINAMIC’s
coolStep technology deliver cost savings in related systems such as power supplies and cooling.
M
INIATURIZED
D
ESIGN
FOR UP TO TWO
S
TEPPER
M
OTORS
Ref.
Switches
SPI
High-Level
Interface
CPU
TMC5031
M
Two
reference
switch
inputs can be used for
each motor. A single CPU
controls
the
whole
system, which is highly
economical and space
saving.
Ref.
Switches
High-Level
Interface
CPU
SPI
M
TMC5031
M
Ref.
Switches
O
RDER
C
ODES
Order code
TMC5031-LA
Description
Dual stallGuard2™ and coolStep™ controller/driver, QFN48
Size
7 x 7 mm
2
www.trinamic.com
TMC5031 DATASHEET (Rev. 1.09 / 2014-JUL-01)
3
T
ABLE OF
C
ONTENTS
1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
2
2.1
2.2
3
3.1
3.2
3.3
3.4
4
4.1
4.2
4.3
5
5.1
5.2
5.3
6
6.1
7
7.1
7.2
7.3
7.4
8
8.1
8.2
8.3
9
9.1
9.2
9.3
9.4
PRINCIPLES OF OPERATION
4
9.5
10
R
ESTRICTIONS OF
R
AMP
G
ENERATOR
(E
RRATA
) 45
STALLGUARD2 LOAD MEASUREMENT
T
UNING THE STALL
G
UARD
2 T
HRESHOLD
SGT
STALL
G
UARD
2 M
EASUREMENT
F
REQUENCY AND
F
ILTERING
D
ETECTING A
M
OTOR
S
TALL
L
IMITS OF STALL
G
UARD
2 O
PERATION
48
49
50
50
50
51
51
51
53
54
54
54
56
56
57
57
57
58
60
61
61
61
61
62
63
63
63
64
64
65
65
66
67
67
K
EY
C
ONCEPTS
4
SPI C
ONTROL
I
NTERFACE
5
S
OFTWARE
5
M
OVING AND
C
ONTROLLING THE
M
OTOR
5
P
RECISION
D
RIVER WITH
P
ROGRAMMABLE
M
ICROSTEPPING
W
AVE
5
STALL
G
UARD
2 – M
ECHANICAL
L
OAD
S
ENSING
5
COOL
S
TEP
– L
OAD
A
DAPTIVE
C
URRENT
C
ONTROL
6
PIN ASSIGNMENTS
P
ACKAGE
O
UTLINE
S
IGNAL
D
ESCRIPTIONS
SAMPLE CIRCUITS
S
TANDARD
A
PPLICATION
C
IRCUIT
5 V O
NLY
S
UPPLY
E
XTERNAL
VCC S
UPPLY
O
PTIMIZING
A
NALOG
P
RECISION
SPI INTERFACE
SPI D
ATAGRAM
S
TRUCTURE
SPI S
IGNALS
T
IMING
REGISTER MAPPING
G
ENERAL
C
ONFIGURATION
R
EGISTERS
R
AMP
G
ENERATOR
R
EGISTERS
M
OTOR
D
RIVER
R
EGISTERS
CURRENT SETTING
S
ENSE
R
ESISTORS
CHOPPER OPERATION
SPREAD
C
YCLE
10.1
10.2
10.3
10.4
11
COOLSTEP OPERATION
U
SER
B
ENEFITS
S
ETTING UP FOR COOL
S
TEP
T
UNING COOL
S
TEP
7
7
7
10
10
12
13
13
14
14
15
17
18
19
20
25
31
32
33
11.1
11.2
11.3
12
SINE-WAVE LOOK-UP TABLE
U
SER
B
ENEFITS
M
ICROSTEP
T
ABLE
12.1
12.2
13
CLOCK OSCILLATOR AND CLOCK INPUT
C
ONSIDERATIONS ON THE
F
REQUENCY
13.1
14
15
ABSOLUTE MAXIMUM RATINGS
ELECTRICAL CHARACTERISTICS
O
PERATIONAL
R
ANGE
DC C
HARACTERISTICS AND
T
IMING
C
HARACTERISTICS
T
HERMAL
C
HARACTERISTICS
15.1
15.2
15.3
16
LAYOUT CONSIDERATIONS
E
XPOSED
D
IE
P
AD
W
IRING
GND
S
UPPLY
F
ILTERING
L
AYOUT
E
XAMPLE
16.1
16.2
16.3
16.4
17
2-P
HASE
M
OTOR
C
HOPPER
35
C
LASSIC
2-P
HASE
M
OTOR
C
ONSTANT
O
FF
T
IME
C
HOPPER
37
R
ANDOM
O
FF
T
IME
38
CHOP
S
YNC
2
FOR
Q
UIET
M
OTORS
39
DRIVER DIAGNOSTIC FLAGS
T
EMPERATURE
M
EASUREMENT
S
HORT TO
GND P
ROTECTION
O
PEN
L
OAD
D
IAGNOSTICS
RAMP GENERATOR
R
EAL
W
ORLD
U
NIT
C
ONVERSION
R
AMP
G
ENERATOR
F
UNCTIONALITY
V
ELOCITY
T
HRESHOLDS
R
EFERENCE
S
WITCHES
40
40
40
40
41
41
41
43
44
PACKAGE MECHANICAL DATA
D
IMENSIONAL
D
RAWINGS
P
ACKAGE
C
ODES
17.1
17.2
18
GETTING STARTED
I
NITIALIZATION
E
XAMPLES
18.1
19
20
21
22
23
DISCLAIMER
ESD SENSITIVE DEVICE
TABLE OF FIGURES
REVISION HISTORY
REFERENCES
www.trinamic.com
TMC5031 DATASHEET (Rev. 1.09 / 2014-JUL-01)
4
1 Principles of Operation
ref. / stop switches motor 1
REFR1
REFL1
+V
M
VCP
100n
TMC5031
Dual stepper motor
driver / controller
CPI
CPO
22n
F
F
reference switch
processing
charge pump
2x linear 6 point
RAMP generator
5V Voltage
regulator
Step &
Direction pulse
generation
programmable
sine table
4*256 entry
otor
ep m
t
coolS river
d
DRV_ENN
100n
+V
M
VS
Half Bridge 1
Half Bridge 1
Stepper
#1
S
N
O1A1
O1A2
O1B1
x
chopper
Half Bridge 2
Half Bridge 2
2 phase
stepper
motor
VSA
100n
4.7µ
5VOUT
VCC
l
ontro
io n c
Mot
Control register
set
SINGLEDRV
O1B2
BR1A / B
coolStep™
R
SENSE
R
SENSE
GNDP
stallGuard2™
temperature
measurement
2 x current
comparator
2 x DAC
R
SENSE
=0R25 allows for
maximum coil current
SPI™
CSN
SCK
SDI
SDO
SPI interface
f ac
Inter
e
Stepper driver
Protection
& diagnostics
CLK oscillator/
selector
stallGuard2™
2 x current
comparator
2 x DAC
GNDP
R
SENSE
R
SENSE
ntrol
o n co
Moti
INT
interrupt out
opt. ext. clock
12-16MHz
+V
IO
3.3V or 5V
I/O voltage
100n
coolStep™
BR2A / B
Step &
Direction pulse
generation
Half Bridge 2
Half Bridge 2
programmable
sine table
4*256 entry
O2B2
O2B1
PP
CLK_IN
VCC_IO
INT & position
pulse output
2x linear 6 point
RAMP generator
x
chopper
reference switch
processing
F
F
to
p mo
olSte er
co
driv
DIE PAD
GNDA
GND
r
F = 60ns spike filter
O2A2
Half Bridge 1
Half Bridge 1
S
N
O2A1
VS
100n
2 phase
stepper
motor
+V
M
Stepper
#2
Figure 1.1 Basic application and block diagram
The TMC5031 motion controller and driver chip is an intelligent power component interfacing between
the CPU and up to two stepper motors. The TMC5031 offers a number of unique enhancements which
are enabled by the system-on-chip integration of driver and controller. The sixPoint ramp generator of
the TMC5031 uses coolStep and stallGuard2 automatically to optimize every motor movement:
TRINAMICs special features contribute toward lower system cost, greater precision, greater energy
efficiency, smoother motion, and cooler operation in stepper motor applications. The clear concept
and the comprehensive solution save design-in time.
1.1 Key Concepts
The TMC5031 implements several advanced 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™
coolStep™
spreadCycle™
High-precision load measurement using the back EMF on the motor coils.
Load-adaptive current control which reduces energy consumption by as much as
75%.
High-precision chopper algorithm available as an alternative to the traditional
constant off-time algorithm.
In addition to these performance enhancements, TRINAMIC motor drivers also offer safeguards to
detect and protect against shorted outputs, output open-circuit, overtemperature, and undervoltage
conditions for enhancing safety and recovery from equipment malfunctions.
TST_MODE
ref. / stop switches motor 2
opt. driver enable
REFL2
REFR2
DRV_ENN
www.trinamic.com
TMC5031 DATASHEET (Rev. 1.09 / 2014-JUL-01)
5
1.2 SPI Control 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 TMC5031 slave always consists of sending one 40-bit
command word and receiving one 40-bit status word.
The SPI command rate typically is a few commands per complete motor motion.
1.3 Software
From a software point of view the TMC5031 is a peripheral with a number of control and status
registers. Most of them can either be written only or read only, some of the registers allow both read
and write access. In case read-modify-write access is desired for a write only register, a shadow
register can be realized in master software.
1.4 Moving and Controlling the Motor
1.4.1 Integrated Motion Controller
The integrated 32 bit motion controller automatically drives the motors to target positions, or
accelerates to target velocities. All motion parameters can be changed on the fly with the motion
controller recalculating immediately. A minimum set of configuration data consists of acceleration and
deceleration values and the maximum motion velocity. A start and stop velocity is supported as well
as a second acceleration and deceleration setting. It supports immediate reaction to mechanical
reference switches and to the sensorless stall detection stallGuard2.
Benefits are:
-
Flexible ramp programming
-
Efficient use of motor torque for acceleration and deceleration allows higher machine throughput
-
Immediate reaction to stop and stall conditions
1.5 Precision Driver with Programmable Microstepping Wave
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. Constant off-time
mode provides higher torque at the highest velocity, while spreadCycle mode offers smoother
operation and greater power efficiency over a wide range of speed and load. The spreadCycle chopper
scheme automatically integrates a fast decay cycle and guarantees smooth zero crossing performance.
Programmable microstep shapes allow optimizing the motor performance.
Benefits are:
-
Significantly improved microstepping with low cost motors
-
Motor runs smooth and quiet
-
Reduced mechanical resonances yields improved torque
1.6 stallGuard2 – Mechanical Load Sensing
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. This gives more information on the drive allowing functions like
sensorless homing and diagnostics of the drive mechanics.
www.trinamic.com