The TMC211 is a combined micro-stepping stepper motor motion controller and driver with RAM and
OTP memory. The RAM or OTP memory is used to store motor parameters and configuration settings.
The TMC211 allows up to four bit of microstepping and a coil current of up to 800 mA. After
initialization it performs all time critical tasks autonomously based on target positions and velocity
parameters. Communications to a host takes place via LIN. Together with an inexpensive
microcontroller the TMC211 forms a complete motion control system. The main benefits of the
TMC211 are:
• Motor driver
• Controls one stepper motor with four bit microstepping
• Programmable Coil current up to 800 mA
• Supply voltage operating range 8V ... 29V
• Fixed frequency PWM current control with automatic selection of fast and slow decay mode
• Full step frequencies up to 1 kHz
• High temperature, open circuit, short, over-current and under-voltage diagnostics
• Motion controller
• Internal 16-bit wide position counter
• Configurable speed and acceleration settings
• Build-in ramp generator for autonomous positioning and speed control
• On-the-fly alteration of target position
• reference switch input available for read out
• LIN interface
• Physical and Data-Link Layers conform to LIN specification rev. 1.3
• Field-programmable node addresses (128)
• Dynamically allocated identifiers
• Diagnostics and status information as well as motion parameters accessable
• LIN bus short-circuit protection to supply and ground
TRINAMIC Motion Control GmbH & Co. KG does
not authorize or warrant any of its products for
use in life support systems, without the specific
written consent of TRINAMIC Motion Control
GmbH & Co. KG.
Life support systems are equipment intended to
support or sustain life, and whose failure to
perform, when properly used in accordance with
instructions provided, can be reasonably
expected to result in personal injury or death.
Information given in this data sheet is believed to
be accurate and reliable. However no
responsibility is assumed for the consequences
of its use nor for any infringement of patents or
other rights of third parties which may result form
its use.
Motor parameters, e.g. acceleration, velocity and position parameters are passed to the main control
block via the LIN interface. These information are stored internally in RAM or OTP memory and are
accessable by the position controller. This block takes over all time critical tasks to drive a stepper
motor to the desired position under abiding the desired motion parameters.
The main controller gets feedback from the stepper motor driver block and is able to arrange internal
actions in case of possible problems. Diagnostics information about problems and errors are
transferred to the LIN interface block.
2.3 Stepper Motor Driver
Two H-bridges are employed to drive both windings of a bipolar stepper motor. The internal transistors
can reach an output current of up to 800 mA. The PWM principle is used to force the given current
through the coils. The regulation loop performs a comparison between the sensed output current and
the internal reference. The PW M signals to drive the power transistors are derived from the output of
the current comparator.
Communication between a host and the TMC211 takes places via the bi-directional LIN interface.
Motion Instructions and diagnostic information are provided to or from the Main Control block. It is
possible to connect up to 128 devices on the same bus. Slave addresses are programmable via OTP
memory or external pins. The LIN interface implements the MAC and LLC layers according to the OSI
reference model.
2.5 Miscellaneous
Besides the main blocks the TMC211 contains the following:
• an internal charge pump is used to drive the high side transistors.
• an internal oscillator running at 4 MHz +/- 10% to clock the LIN protocol handler, the positioning
unit, and the main control block
• internal voltage reference for precise referencing
• a 5 Volts voltage regulator to supply the digital logic
• protection block featuring Thermal Shutdown, Power-On-Reset, etc.
2.6 Pin and Signal Descriptions
Pin SOIC20 Description
HW0 1 hard-wired LIN address bit #0 input
HW1 2 hard-wired LIN address bit #1 input
The TMC211 supports up to 16 micro steps per full step, which leads to smooth and low torque ripple
motion of the stepping motor. Four stepping modes (micro step resolutions) are selectable by the user:
See also 5.3 Stepper Motor Driver on page 21.
• Half step Mode
• 1/4 Micro stepping
• 1/8 Micro stepping
• 1/16 Micro stepping
5.1.2 Velocity Ramp
A common velocity ramp where a motor drives to a desired position is shown in the figure below. The
motion consists of an acceleration phase, a phase of constant speed and a final deceleration phase.
Both the acceleration and the deceleration are symmetrical. The acceleration factor can be chosen
from a table with 16 entries. (Table 5: Acc Parameter on page 11). A typical motion begins with a start
velocity Vmin. During acceleration phase the velocity is increased until Vmax is reached. After
acceleration phase the motion is continued with velocity Vmax until the velocity has to be decreased in
order to stop at the desired target position. Both velocity parameters Vmin and Vmax are
programmable, whereas Vmin is a programmable ratio of Vmax (see Table 3: Vmax Parameter on
page 10 and Table 4: Vmin on page 11). The user has to take into account that Vmin is not allowed to
change while a motion is ongoing. Vmax is only allowed to change under special circumstances. (See
5.1.4 Vmax Parameter on page 10).
The peak current value to be fed to each coil of the stepper-motor is selectable from a table with 16
possible values. It has to be distinguished between the run current Irun and the hold current Ihold. Irun
is fed through the stepper motor coils while a motion is performed, whereas Ihold is the current to hold
the stepper motor before or after a motion. More details about Irun and Ihold can be found in 5.3.1 and
5.3.2.
Velocity resp. acceleration parameters are accessable via the LIN interface. These parameters are
written via the SetMotorParam command (See Page 42) and read via the GetFullStatus command
(See Page 36).
The following figures show some examples of typical motions under different conditions:
Velocity V
V
max
V
mi n
X
start
X
target_1
X
target_2
time
Figure 2: Motion with change of target position
Velocity V
V
max
V
mi n
X
start
X
target_1
X
target_2
time
Figure 3: Motion with change of target position while in deceleration phase
Velocity V
V
max
V
mi n
X
start
X
target
time
Figure 4: Short Motion Vmax is not reached
Velocity V
V
max
V
mi n
X
start
X
target_1
X
target_2
time
Figure 5: Motion with change of target position in opposite direction (linear zero crossing)
In Figure 5 the motor crosses zero velocity with a linear shape. The velocity can be less than the
programmed Vmin value during zero crossing. Linear zero crossing provides very low torque ripple to
the stepper motor during crossing.
Under special circumstances it is possible to change the Vmax parameters while a motion is ongoing.
All 16 entries for the Vmax parameter are divided into four groups A, B, C and D. W hen changing
Vmax during a motion take care that the new Vmax value is within the same group. Background: The
TMC211 uses an internal pre-divider for positioning calculations. Within one group the pre-divider is
equal. When changing Vmax between different groups during a motion, correct positioning is not
ensured anymore.
The minimum velocity parameter is a programmable ratio between 1/32 and 15/32 of Vmax. It is also
possible to set Vmin to the same velocity as Vmax by setting Vmin index to zero. The table below
shows the possible rounded values.
Table 4: Vmin values for all Vmin index – Vmax index combinations
5.1.6 Acceleration Parameter
The acceleration parameter can be chosen from a wide range of available values as described in the
table below. Please note that the acceleration parameter is not to change while a motion is ongoing.
The amount of equivalent full steps during acceleration phase can be computed by the next equation:
V
Acc
2
minmax
8192 half-steps
213
16384 micro-steps
214
32768 micro-steps
215
65536 micro-steps
216
2
V
step
N
=
5.1.7 Position Ranges
Position information is coded by using two’s complement format. Depending on the stepping mode
(see 5.1.1) the position ranges are as listed in the following table:
Stepping Mode Position Range Full range excursion
Half-stepping -4096…+4095
1/4 micro-stepping -8192…+8191
1/8 micro-stepping -16384…+16383
1/16 micro-stepping -32768…+32767
Table 6: Position Ranges
(-2
(-2
(-2
(-2
12
13
14
15
−
⋅
2
…+212-1)
…+213-1)
…+214-1)
…+215-1)
Target positions can be programmed via LIN interface by using the SetPosition command (see
6.11.11). The actual motor position can be read by the GetActualPos command (see 6.11.1).
5.1.8 Secure Position
In case of emergency (communication loss) or GotoSecurePosition command (6.11.5) the motor
drives to the secure position. The secure position is programmable by the user. Secure position is
coded with 11 bits, therefore the resolution is lower than for normal positioning commands, as shown
in the following table.
Pin SWI will alternately attempt to source and sink current in/from the external switch (Figure 1:
TMC211 Typical Application on page 7). This is to check whether the external switch is open or closed,
resp. if the pin is connected to ground or Vbat. The status of the switch can be read by using the
GetFullStatus or the GetActualPos command. As long as the switch is open, the <ESW> flag is set to
zero.
A stepper motor does not provide information about the actual position of the motor. Therefore it is
recommended to perform a reference drive after power-up or if a motor shutdown happened in case of
a problem. The RunInit command initiates the reference search. The RunInit command consists of a
Vmin and a Vmax parameter and also position information about the end of first and second motion.
(6.11.9 RunInit).
A reference drive consists of two motions (Figure 6: RunInit): The first motion is to drive the motor into
a stall position or a reference switch. The first motion is performed under compliance of the selected
Vmax and Vmin parameter and the acceleration parameter specified in the RAM. The second motion
has got a rectangular shape without an acceleration phase and is to drive the motor out of the stall
position or slowly towards the stall position again to compensate for the bouncing of the faster first
motion to stop as close to the stall position as possible. The maximum velocity of the second motion
equals to Vmin. After the second motion the actual position register is set to zero. Finally, the secure
position will be traveled to if it is enabled (different from the most negative decimal value of –1024).
Once the RunInit command is started it can not be interrupted by any other command except a
condition occurs which leads to a motor shutdown (See 5.1.10 Motor Shutdown Management) or a
HardStop command is received. Furthermore the master has to ensure that the target position of the
first motion is not equal to the actual position of the stepper motor and that the target positions of the
first and the second motion are not equal. This is very important otherwise the circuit goes into a
deadlock state. Once the circuit finds itself in a deadlock state only a HardStop command followed by a
GetFullStatus command will cause the circuit to leave the deadlock state.
Velocity V
[FS/s]
1st Motion
2nd Motion
V
max
V
min
Position X
Pos1Pos2
[FS]
Figure 6: RunInit
5.1.12 Sleep Mode
When entering Sleep mode, the stepper-motor is driven to the secure position if the secure position is
enabled (SecPos[10:0] different from the most negative decimal value of –1024). Then the circuit is
completely powered down, apart from the LIN receiver which remains active to detect a dominant state
on the bus. In case sleep mode is entered while a motion is ongoing, a transition will occur towards
secure position as described above.
The Sleep mode can be entered in the following cases:
• The circuit receives a LIN frame with identifier 0x3C and first data byte containing 0x00, as
required by LIN specification rev. 1.3.
• The LIN bus remains inactive or is lost during more than 25000 LIN bit times (1.30s at 19.2 kbit/s).
The circuit will return to normal mode once a valid LIN frame is received while in the Sleep mode (this
valid frame can be addressed to another slave). For more information refer to 6.11.15 Sleep Mode on
page 45.
The TMC211 provides an internal battery voltage monitoring. The circuit goes into shutdown mode if
the battery voltage falls below threshold UV2, furthermore one threshold UV1 is implemented to
generate a low voltage warning.
Due to the sleep mode, the internal handling of commands and flags differs. Commands are handled
with different priorities depending on the current state and the current status of internal flags, see figure
below. Details can be found in Table 8: Priority Encoder.
Note: A HardStop command is sent by the master or triggered internally in case of an electrical defect
or over temperature.
A description of the available commands can be found in 6.11 Command Description. A list of the
internal flags can be found in 5.2.2 Status Flags.
As an example: When the circuit drives the motor to its programmed target position, state “GotoPos” is
entered. There are three events which can cause to leave this state: HardStop command received,
SoftStop command received or target position reached. If all three events occur at the same time the
HardStop command is executed since it has the highest priority. The Motion finished event (target
position reached) has the lowest priority and thus will only cause transition to “Stopped” state when
both other events do not occur.