TRINAMIC MCM-343-H Modules for stepper motor Datasheet

MODULES FOR STEPPER MOTORS
MODULES
V 1.07
HARDWARE MANUAL
+
+
TMCM-343
3-axis stepper
controller / driver
300mA up to 1.1A RMS
nominal supply: 8V… 34V DC
TMCL™ / CANopen firmware
+
TRINAMIC Motion Control GmbH & Co. KG
Hamburg, Germany
www.trinamic.com
+
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
2
Table of contents
1
2
4
5
6
7
8
9
10
11
12
13
14
Life support policy ....................................................................................................................................................... 4
Features........................................................................................................................................................................... 5
Order codes.................................................................................................................................................................... 6
Electrical and mechanical interfacing ..................................................................................................................... 7
5.1 Dimensions ........................................................................................................................................................... 7
5.2 Connecting the module .................................................................................................................................... 8
5.3 Power supply requirements............................................................................................................................. 9
Operational ratings .................................................................................................................................................... 11
Functional description .............................................................................................................................................. 12
7.1 System architecture .......................................................................................................................................... 12
7.1.1
Microcontroller ........................................................................................................................................ 12
7.1.2
EEPROM ...................................................................................................................................................... 12
7.1.3
TMC428 motion controller ................................................................................................................... 13
7.1.4
Stepper motor drivers ........................................................................................................................... 13
7.2 Power supply ..................................................................................................................................................... 13
7.3 Motor connection .............................................................................................................................................. 13
7.4 Host communication ........................................................................................................................................ 14
7.4.1
CAN 2.0b .................................................................................................................................................... 14
7.4.2
RS232.......................................................................................................................................................... 15
7.4.3
RS485.......................................................................................................................................................... 15
7.5 stallGuard™ - sensorless motor stall detection ...................................................................................... 16
7.5.1
stallGuard™ adjusting tool ................................................................................................................. 16
7.5.2
stallGuard™ profiler .............................................................................................................................. 17
7.6 Reference switches ........................................................................................................................................... 18
7.6.1
Left and right limit switches .............................................................................................................. 18
7.6.2
Triple switch configuration ................................................................................................................. 18
7.6.3
One limit switch for circular systems .............................................................................................. 19
7.7 Serial peripheral interface (SPI) .................................................................................................................... 19
7.8 Additional inputs and outputs ...................................................................................................................... 19
7.9 Miscellaneous connections ............................................................................................................................ 19
7.10 Microstep resolution ........................................................................................................................................ 20
Putting the TMCM-343 into operation .................................................................................................................. 21
Migrating from the TMCM-303 to the TMCM-343 ............................................................................................... 22
TMCM-343 operational description ........................................................................................................................ 23
10.1 Calculation: Velocity and acceleration vs. microstep and fullstep frequency ................................. 23
TMCL™ ........................................................................................................................................................................... 25
CANopen ....................................................................................................................................................................... 25
Revision history .......................................................................................................................................................... 26
13.1 Document revision ........................................................................................................................................... 26
13.2 Hardware revision ............................................................................................................................................. 26
13.3 Firmware revision ............................................................................................................................................. 26
References .................................................................................................................................................................... 27
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
3
List of figures
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
4.1: Front view of TMCM-343 (all values in mm)............................................................................................ 7
4.2: Ordering options for the connector ........................................................................................................... 7
4.3: Pin order of the connector ........................................................................................................................... 8
4.4: Power supply requirements for TMCM-343 .............................................................................................. 9
4.5: Power supply requirements for TRINAMIC modules in a bus system .......................................... 10
6.1: Main parts of the TMCM-343 ....................................................................................................................... 12
6.2: Connecting the motors ................................................................................................................................ 14
6.3: Connecting CAN ............................................................................................................................................. 14
6.4: Connecting RS232 .......................................................................................................................................... 15
6.5: Connecting RS485 .......................................................................................................................................... 15
6.6: stallGuard™ adjusting tool ......................................................................................................................... 16
6.7: The stallGuard™ profiler ............................................................................................................................. 17
6.8: Left and right limit switches ...................................................................................................................... 18
6.9: Limit switch and reference switch ........................................................................................................... 18
6.10: One reference switch ................................................................................................................................. 19
List of tables
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
Table
3.1: Order codes ......................................................................................................................................................... 6
4.1: Pinout of the 68-Pin connector ..................................................................................................................... 8
5.1: Operational ratings ......................................................................................................................................... 11
6.1: Pinning of power supply .............................................................................................................................. 13
6.2: Pinout for motor connections ..................................................................................................................... 13
6.3: Pinout for CAN connection ........................................................................................................................... 14
6.4: Pin out for RS232 connection ...................................................................................................................... 15
6.5: Pinout for RS485 connection ....................................................................................................................... 15
6.6: stallGuard™ parameter SAP 205 ................................................................................................................. 16
6.7: Pinout reference switches ............................................................................................................................ 18
6.8: Pinout SPI .......................................................................................................................................................... 19
6.9: Additional I/O pins ......................................................................................................................................... 19
6.10: Miscellaneous connections ......................................................................................................................... 20
6.11: Microstep resolution setting ...................................................................................................................... 20
9.1: TMC428 velocity parameters ......................................................................................................................... 23
12.1: Document revision ........................................................................................................................................ 26
12.2: Hardware revision ......................................................................................................................................... 26
12.3: Firmware revision ......................................................................................................................................... 26
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
1 Life support policy
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.
© TRINAMIC Motion Control GmbH & Co. KG 2011
Information given in this data sheet is believed to be
accurate and reliable. However neither responsibility
is assumed for the consequences of its use nor for
any infringement of patents or other rights of third
parties, which may result from its use.
Specifications are subject to change without notice.
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
4
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
5
2 Features
The TMCM-343 is a compact and versatile triple axis 2-phase stepper motor controller and driver
module. It provides a complete motion control solution at a very small size for embedded
applications. Using the integrated additional I/Os it even can do complete system control applications.
The board can be connected to a baseboard or customized electronics with a pin connector. The
TMCM-343 comes with the PC based software development environment TMCL-IDE. Using predefined
TMCL™ (Trinamic Motion Control Language) high level commands like move to position or constant
rotation rapid and fast development of motion control applications is guaranteed. Host
communication is possible via the serial UART interface (e.g. using an RS232 or RS485 level shifter) or
via CAN. All time critical operations, e.g. ramp calculation are performed onboard. A user TMCL™
program can be stored in the on board EEPROM for stand-alone operation. The firmware of the
module can be updated via the serial interface. With the optional stallGuardTM feature it is possible to
detect overload and stall of the motor.
Applications
 Controller/driver board for control of up to 3 axes
 Versatile possibilities of applications in stand alone or PC controlled mode
Motor type
 Coil current from 300mA to 1.1A RMS (1.5A peak)
 8V to 34V nominal supply voltage
Highlights
 Automatic ramp generation in hardware
 stallGuardTM option for sensorless motor stall detection
 Full step frequencies up to 20kHz
 On the fly alteration of motion parameters (e.g. position, velocity, acceleration)
 Local reference move using sensorless stallGuardTM feature or reference switch
 Coil current adjustable by software
 Up to 64 times microstepping
 TRINAMIC driver technology: No heat sink required
 Adjustment possibilities. Therefore this module offers solutions for a great field of demands
Software
 Stand-alone operation using TMCL™ or remote controlled operation
 TMCL™ program storage: 16 KByte EEPROM (2048 TMCL™ commands)
 PC-based application development software TMCL-IDE included
 Special firmware for CANopen protocol support also available
Other
 68 pin connector carries all signals
 RoHS compliant latest from 1 July 2006
 Size: 80 x 50mm²
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
6
4 Order codes
Order code
TMCM-343 (-option)
Products related to TMCM-343
BB-303 (-option)
BB-323-03
TMCM-323
TMCM-EVAL
Options for TMCM-343
-H
-V
Description
3-axis controller/driver module 1.1A, 34V
Dimensions
80 x 55 x 8 mm3
Baseboard for TMCM-343
Baseboard for TMCM-343
3-axis encoder
Evaluation baseboard
80 x 50 x 15 mm3
96.5 x 79 x 60 mm3
80 x 53 x 8 mm3
160 x 100 x 24 mm3
horizontal pin connector (standard)
vertical pin connector (on request)
Table 4.1: Order codes
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
7
5 Electrical and mechanical interfacing
5.1 Dimensions
The 68 pin connector has a 2.0mm pitch.
80
76
4
R1.6
2.2
R1.1
1.2
39.1
36.9
R1.25
24.4
21.9
50 46
9.2 5.4 4
4
10
Figure 5.1: Front view of TMCM-343 (all values in mm)
6.7
53 50
Horizontal
connector
9.7
50
Header
connector
Figure 5.2: Ordering options for the connector (all values in mm)
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
8
5.2 Connecting the module
The 68-pin connector provides communication to a host, configuration of the EEPROM and connection
of motors as well as connection of reference switches. Pin 1 of this connector is located in the lower
left corner on the top site, while the connector is pointing towards the user.
Pin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Direction
In
In
In
In
In
In
In
In
In
In
Out
Out
Out
In
Out
Out
In
Out
In
Out
In
Out
In
Out
In
Out
In
Out
In
Out
Out
Out
Description
+5VDC (+/- 5%) Imax=300mA
GND
+5VDC (+/- 5%)
GND
V_Motor (+7 to 34VDC)
GND
V_Motor (+7 to 34VDC)
GND
V_Motor (+7 to 34VDC)
GND
SPI Select 0
SPI Clock
SPI Select 1
SPI MISO
SPI Select 2
SPI MOSI
Reset, active low
Alarm
Reference Switch Motor 0 right
Motor0 A0
Reference Switch Motor 0 left
Motor0 A1
Reference Switch Motor 1 right
Motor0 B0
Reference Switch Motor 1 left
Motor0 B1
Reference Switch Motor 2 right
Motor1 A0
Reference Switch Motor 2 left
Motor1 A1
Reserved
Motor1 B0
Reserved
Motor1 B1
Pin
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Direction
out
out
out
out
in
in
out
in
out
in
out
in
out
in
out
in
out
in
out
in
out
in
in
out
in and out
in
in and out
out
Description
Reserved
Motor2 A0
Reserved
Motor2 A1
Reserved
Motor2 B0
Reserved
Motor2 B1
Reserved
Shutdown
General Purpose
General Purpose
General Purpose
General Purpose
General Purpose
General Purpose
General Purpose
General Purpose
General Purpose
General Purpose
General Purpose
General Purpose
General Purpose
General Purpose
General Purpose
General Purpose
GND
GND
Reserved
RS485 Direction
CAN RS232 RxD
CAN +
RS232 TxD
Table 5.1: Pinout of the 68-Pin connector
2
68
1
67
PCB
Figure 5.3: Pin order of the connector
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
input 0
output 0
input 1
output 1
input 2
output 2
input 3
output 3
input 4
output 4
input 5
output 5
input 6
output 6
input 7
output 7
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
9
5.3 Power supply requirements
Two different power supplies have to be provided for the TMCM-343: +5VDC for the controller part and
+7… 34VDC for the motor supply. Please connect all listed pins for the power supply inputs and
ground in parallel. It is recommended to use capacitors of some 1000µF and a choke close to the
module for the motor supply. This ensures a stable power supply and minimizes noise injected into
the power supply cables. The choke especially becomes necessary in larger distributed systems using
a common power supply.
keep distance short
L
V_ Motor
(7... 34V)
+
Local +5V
regulator
TMCM-343
+
C (> 1000µF)
Power Supply
-
GND
supply for further modules on
same base board
Figure 5.4: Power supply requirements for TMCM-343
Especially in bus controlled systems (e.g. CAN or RS485) it is important to ensure a stable ground
potential of all modules. The stepper driver modules draw peak currents of some ampere from the
power supply. It has to be made sure, that this current does not cause a substantial voltage
difference on the interface lines between the module and the master, as disturbed transmissions
could result.
The following hints help avoiding transmission problems in larger systems:





Use power supply filter capacitors of some 1000µF on the base board for each module in order to
take over current spikes. A choke in the positive power supply line will prevent current spikes
from changing the GND potential of the base board, especially when a central power supply is
used.
Optionally use an isolated power supply for the TMCM-Modules (no earth connection on the
power supply, in case the CAN master is not optically decoupled)
Do not supply modules which are mounted in a distance of more than a few meters with the
same power supply.
For modules working on the same power supply (especially the same power supply as the
master) use a straight and thick, low-resistive GND connection.
Use a local +5V regulator on each baseboard.
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
10
keep distance short
V_ Motor
(7...34V)
CAN high
TMCM-343
CAN low
+
+
L
Power supply
C
GND
V_ Motor
(7...34V)
CAN high
other devices on CAN
bus (incl. master)
CAN low
GND
CAN_ GND
+
L
C
keep distance short
V_ Motor
(7...34V)
CAN high
TMCM-343
CAN low
+
L
C
keep distance below a few meters with a single power supply
-
CAN_ GND
GND
CAN_ GND
Figure 5.5: Power supply requirements for TRINAMIC modules in a bus system

In large systems it may make sense to use an optically decoupled CAN bus for each number
of nodes, e.g. for each base board with a number of TMCM-34x modules, especially when a
centralized power supply is to be used.

Be aware that different ground potentials of the CAN sender (e.g. a PC) and the power supply
may damage the modules.

Please make sure that the GND lines of the CAN sender and the module(s) and power
supplies are connected by a cable.
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
11
6 Operational ratings
The operational ratings show the intended or rather the characteristic range for the values and should
be used as design values. In no case shall the maximum values be exceeded.
Symbol
Parameter
Min
Typ
Max
Unit
7
12 … 28
34
V
4.8
5.0
5.2
V
0
0.3 … 1.5
1.5
A
VS
DC Power supply voltage for operation
V+5V
+5V DC input (max. 50mA / no OUT load)
ICOIL
Motor coil current for sine wave peak
(chopper
regulated,
adjustable
via
software)
fCHOP
Motor chopper frequency
IS
Power supply current (per motor)
VINPROT
Input voltage for StopL, StopR, GPI0
(internal protection diodes)
VANA
INx analog measurement range
(resolution: 10bit / range: 0..1023)
0 ... 5.5
VINLO
INx, StopL, StopR low level input
0
VINHI
INx, StopL, StopR high level input
(integrated 10k pull-up to +5V for Stop)
IOUTI
OUTx max +/- output current (CMOS
output) (sum for all outputs max. 50mA)
TENV
Environment temperature at rated current
(no cooling)
36.8
-0.5
Table 6.1: Operational ratings
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
2
-40
kHz
<< ICOIL
1.4 * ICOIL
A
0…5
V+5V+0.5
V
V
0.9
5
V
V
+/-20
mA
+80
°C
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
12
7 Functional description
In Figure 7.1 the main parts of the TMCM-343 module are shown. The module mainly consists of a
processor, a TMC428 motion controller, three TMC246 stepper motor drivers, the TMCL™ program
memory (EEPROM) and the host interfaces RS232, RS485 and CAN.
Please note,
that the USB
interface can
be offered
on demand.
TMCL
Memory
High Power
Step
Driver
TMC246
Motor
CAN
RS232 or
RS485
additional
I/Os
progammable
Motion
Controller
UART
16
µC
with TMC428
High Power
Step
Driver
TMC246
Motor
Special
option:
USB
High Power
Driver
Step
TMC246
+5V
7… 34V DC
5V DC
Motor
TMCM-343
3x2 Stop
switches
Figure 7.1: Main parts of the TMCM-343
7.1 System architecture
The TMCM-343 integrates a microcontroller with the TMCL™ (Trinamic Motion Control Language)
operating system. The motion control real-time tasks are realized by the TMC428.
7.1.1 Microcontroller
On this module, the Atmel AT91SAM7X256 is used to run the TMCL™ operating system and to control
the TMC428. The CPU has 256KB flash memory and a 64KB RAM. The microcontroller runs the TMCL™
(Trinamic Motion Control Language) operating system which makes it possible to execute TMCL™
commands that are sent to the module from the host via the RS232, RS485 and CAN interface. The
microcontroller interprets the TMCL™ commands and controls the TMC428 which executes the motion
commands.
The flash ROM of the microcontroller holds the TMCL™ operating system. The TMCL™ operating
system can be updated via the RS232 interface or via the CAN interface. Use the TMCL-IDE to do this.
7.1.2 EEPROM
To store TMCL™ programs for stand-alone operation the TMCM-343 module is equipped with a
16kByte EEPROM attached to the microcontroller. The EEPROM can store TMCL™ programs consisting
of up to 2048 TMCL™ commands. The EEPROM is also used to store configuration data.
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
13
7.1.3 TMC428 motion controller
The TMC428 is a high-performance stepper motor control IC and can control up to three 2-phasestepper-motors. Motion parameters like speed or acceleration are sent to the TMC428 via SPI by the
microcontroller. Calculation of ramps and speed profiles are done internally by hardware based on the
target motion parameters.
7.1.4 Stepper motor drivers
On the TMCM-343 modules the TMCM246 chips are used. These chips have the stallGuard™ feature.
As the power dissipation of TMC246 chips is very low no heat sink or cooling fan is needed. The
temperature of the chips does not get high. The coils will be switched off automatically when the
temperature or the current exceeds the limits and automatically switched on again when the values
are within the limits again.
The TMCM-343 module is equipped with a circuit that extends the microstep resolution of the TMC246
chips to true 64 times microstepping. The maximum peak coil current of each stepper motor driver
chip is 1500mA.
7.2 Power supply
Two different power supplies have to be provided for the TMCM-343: +5VDC for the module
functionality and +7… 34VDC for the motor supply. Please use all listed pins for the power supply
inputs and ground parallel.
1,
2,
5,
6,
Pin
Function
3
4
7, 9
8, 10
+5V DC (+/- 5%), Imax = 50mA power supply
Ground
+7… 34V DC motor power supply
Ground
Table 7.1: Pinning of power supply
7.3 Motor connection
Never connect or disconnect the motors while the TMCM-343 Module is switched on. Doing this
will destroy the driver ICs!
The TMCM-343 controls up to three 2-phase stepper motors.
Table 7.2 shows how to connect the three motors with the 68-pin connector:
Pin Number
20
22
24
26
28
30
32
34
36
38
40
42
Direction
out
out
out
out
out
out
out
out
out
out
out
out
Name
Motor0_A0
Motor0_A1
Motor0_B0
Motor0_B1
Motor1_A0
Motor1_A1
Motor1_B0
Motor1_B1
Motor2_A0
Motor2_A1
Motor2_B0
Motor2_B1
Motor Numbers and Coils
Motor #0, Coil A0
Motor #0, Coil A1
Motor #0, Coil B0
Motor #0, Coil B1
Motor #1, Coil A0
Motor #1, Coil A1
Motor #1, Coil B0
Motor #1, Coil B1
Motor #2, Coil A0
Motor #2, Coil A1
Motor #2, Coil B0
Motor #2, Coil B1
Table 7.2: Pinout for motor connections
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
14
TMCM-343
Pin 68
Pin 67
B1
MOTOR
2
Pin 42
B0
Pin 40
A1
A0
Pin 38
Pin 36
B1
Pin 34
MOTOR
1
Pin 32
B0
Pin 30
A1
Pin 28
A0
B1
Pin 26
MOTOR
0
Pin 24
Pin 22
B0
Pin 20
A1
Pin 2
A0
Pin 1
Figure 7.2: Connecting the motors
7.4 Host communication
The communication to a host takes place via one or more of the onboard interfaces. The module
provides a range of different interfaces, like CAN, RS232, and RS485. The following chapters explain
how the interfaces are connected with the 68-pin connector.
7.4.1 CAN 2.0b
Pin
65
67
Direction
in and out
In and out
Name
CAN CAN +
Limits
Description
-8… +18V CAN input/output
-8… +18V CAN input/output
Table 7.3: Pinout for CAN connection
68 - Pin - Connector
Pin 67: CAN++
Pin 65: CAN--
CAN+
CAN--
Host
TMCM-343
Pin 2
Pin 1
Figure 7.3: Connecting CAN
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
15
7.4.2 RS232
Pin
Direction
in
out
in
66
68
2, 4, 6, 8, 10
Name
RxD
TxD
GND
Limits
Description
TTL
RS232 receive data
TTL
RS232 transmit data
0V
Connect to ground
Table 7.4: Pinout for RS232 connection
The module only provides a serial interface at TTL level. For using RS232 a suitable level shifter has to
be added by the user (e.g. MAX202).
68 - Pin - Connector
level shifter
( e. g . MAX 202 )
Pin 68 : RS232_TxD
TxD
TTL
Pin 66 : RS232_RxD
RxD
GND
Pin61: GND
TMCM-343
Host
Pin 1
Pin 2
Figure 7.4: Connecting RS232
7.4.3 RS485
Pin Number
Direction
Name
Limits
64
Out
RS485_DIR
TTL
66
68
2, 4, 6, 8, 10
In
Out
In
RxD
TxD
GND
TTL
TTL
0V
Description
Driver/receiver enable for RS485 transceiver.
0: receiver enable
1: driver enable
RS485 receive data
RS485 transmit data
Connect to ground
Table 7.5: Pinout for RS485 connection
The TMCM-343 module only provides a serial interface at TTL level. To use RS485 a suitable RS485
transceiver (like MAX485) has to be added by the user.
Transceiver
e. g . MAX 485
68 - Pin - Connector
Pin 68 : RS232_TxD
Pin 66 : RS232_RxD
Pin 64 : RS485_ DIRECTION
Pin 2
RS485+
RxD
RS485-
DIR
Pin 61 : GND
TMCM-343
TxD
GND
Pin 1
Figure 7.5: Connecting RS485
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
Transceiver
e. g . MAX 485
RS485+
RS485-
HOST
TxD
RxD
TxD
RxD
GND
GND
DIR
DIR
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
16
7.5 stallGuard™ - sensorless motor stall detection
The TMCM-343 modules are equipped with the stallGuard™ feature. The stallGuard™ feature makes it
possible to detect if the mechanical load on a stepper motor is too high or if the traveler has been
obstructed. The load value can be read using a TMCL™ command or the module can be programmed
so that the motor will be stopped automatically when it has been obstructed or the load has been
too high.
stallGuard™ can also be used for finding the reference position without the need for a reference
switch: Activate stallGuard™ and then let the traveler run against a mechanical obstacle that is placed
at the end of the way. When the motor has stopped it is definitely at the end of its way, and this
point can be used as the reference position.
For using stallGuard™ in an actual application, some manual tests should be done first, because the
stallGuard™ level depends upon the motor velocities and on the occurrence of resonances.
Mixed decay should be switched off while stallGuard is in use in order to get usable results.
Value
Description
0
stallGuard™ function is deactivated (default)
1… 7 Motor stops when stallGuard™ value is reached and position is not set zero.
Table 7.6: stallGuard™ parameter SAP 205
To activate the stallGuard™ feature use the TMCL™ command SAP 205 and set the stallGuard™
threshold value according to Table 7.6. The actual load value is given by GAP 206. The TMCL-IDE has
some tools which let you try out and adjust the stallGuard™ function in an easy way. They can be
found at stallGuard™ in the Setup menu and are described in the following chapters. Please refer to
the TMCM-341/342/343 TMCL™ Firmware Manual for further information about working with TMCL-IDE.
7.5.1 stallGuard™ adjusting tool
The stallGuard™ adjusting tool helps to find the necessary motor
parameters when stallGuard™ is to be used. This function can only be
used when a module is connected that features stallGuard™. This is
checked when the stallGuard™ adjusting tool is selected in the Setup
menu. After this has been successfully checked the stallGuard™
adjusting tool is displayed.
First, select the axis that is to be used in the Motor area. Now you can
enter a velocity and an acceleration value in the Drive area and then
click Rotate Left or Rotate Right. Clicking one of these buttons will
send the necessary commands to the module so that the motor starts
running. The red bar in the stallGuard™ area on the right side of the
windows displays the actual load value. Use the slider to set the
stallGuard™ threshold value. If the load value reaches this value the
motor stops. Clicking the Stop button also stops the motor.
Figure 7.6: stallGuard™ adjusting tool
All commands necessary to set the values entered in this dialogue are displayed in the Commands
area at the bottom of the window. There, they can be selected, copied and pasted into the TMCL™
editor.
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
17
7.5.2 stallGuard™ profiler
The stallGuard™ profiler is a utility that helps you find the best parameters for using stall detection.
It scans through given velocities and shows which velocities are the best ones. Similar to the
stallGuard™ adjusting tool it can only be used together with a module that supports stallGuard™.
This is checked right after the stallGuard™ profiler has been selected in the Setup menu. After this
has been successfully checked the stallGuard™ profiler window will be shown.
First, select the axis that is to be used. Then, enter the Start
velocity and the End velocity. The start velocity is used at the
beginning of the profile recording. The recording ends when
the end velocity has been reached. Start velocity and end
velocity must not be equal. After you have entered these
parameters, click the Start button to start the stallGuard™
profile recording. Depending on the range between start and
end velocity this can take several minutes, as the load value
for every velocity value is measured ten times. The Actual
velocity value shows the velocity that is currently being tested
and so tells you the progress of the profile recording. You can
also abort a profile recording by clicking the Abort button.
The result can also be exported to Excel or to a text file by
using the Export button.
Figure 7.7: The stallGuard™ profiler
7.5.2.1 The result of the stallGuard™ profiler
The result is shown as a graphic in the stallGuard™ profiler window. After the profile recording has
finished you can scroll through the profile graphic using the scroll bar below it. The scale on the
vertical axis shows the load value: A higher value means a higher load. The scale on the horizontal
axis is the velocity scale. The color of each line shows the standard deviation of the ten load values
that have been measured for the velocity at that point. This is an indicator for the vibration of the
motor at the given velocity.
There are three colors used:

Green:


Yellow:
Red:
The standard deviation is very low or zero. This means that there is effectively no
vibration at this velocity.
This color means that there might be some low vibration at this velocity.
The red color means that there is high vibration at that velocity.
7.5.2.2 Interpreting the result
In order to make effective use of the stallGuard™ feature you should choose a velocity where the
load value is as low as possible and where the color is green. The very best velocity values are those
where the load value is zero (areas that do not show any green, yellow or red line). Velocities shown
in yellow can also be used, but with care as they might cause problems (maybe the motor stops even
if it is not stalled).
Velocities shown in red should not be chosen. Because of vibration the load value is often
unpredictable and so not usable to produce good results when using stall detection.
As it is very seldom that exactly the same result is produced when recording a profile with the same
parameters a second time, always two or more profiles should be recorded and compared against
each other.
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
18
7.6 Reference switches
With reference switches, an interval for the movement of the motor or the zero point can be defined.
Also a step loss of the system can be detected, e.g. due to overloading or manual interaction, by
using a travel-switch.
Pin
19
21
23
25
27
29
Direction
in
in
in
in
in
in
Name
STOP0R
STOP0L
STOP1R
STOP1L
STOP2R
STOP2L
Limits
TTL
TTL
TTL
TTL
TTL
TTL
Description
Right reference switch input for Motor #0
Left reference switch input for Motor #0
Right reference switch input for Motor #1
Left reference switch input for Motor #1
Right reference switch input for Motor #2
Left reference switch input for Motor #2
Table 7.7: Pinout reference switches
10k pull-up resistors for reference switches are included on the module.
7.6.1 Left and right limit switches
The TMCM-343 can be configured so that a motor has a left and a right limit switch (Figure 7.8).
The motor stops when the traveler has reached one of the limit switches.
REF _ R _x
REF _ L _x
motor
right stop
switch
left stop
switch
traveler
Figure 7.8: Left and right limit switches
7.6.2 Triple switch configuration
It is possible to program a tolerance range around the reference switch position. This is useful for a
triple switch configuration, as outlined in Figure 7.9. In that configuration two switches are used as
automatic stop switches, and one additional switch is used as the reference switch between the left
stop switch and the right stop switch. The left stop switch and the reference switch are wired
together. The center switch (travel switch) allows for a monitoring of the axis in order to detect a
step loss.
REF _ L _x
REF _ R_x
motor
left stop
reference
switch
switch
right stop
switch
traveler
Figure 7.9: Limit switch and reference switch
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
19
7.6.3 One limit switch for circular systems
If a circular system is used (Figure 7.10), only one reference switch is necessary, because there are no
end-points in such a system.
motor
REF _ L _x
ref switch
eccentric
Figure 7.10: One reference switch
7.7 Serial peripheral interface (SPI)
On-board communication is performed via the Serial Peripheral Interface (SPI). The microcontroller
acts as master. For adaptation to user requirements, the user has access to this interface via the 68pin connector. Furthermore three chip select lines can be used for addressing of external devices.
Pin
11
13
15
12
14
16
Direction
out
out
out
out
in
out
Name
SPI_SEL0
SPI_SEL1
SPI_SEL2
SPI_CLK
SPI_MISO
SPI_MOSI
Limits
TTL
TTL
TTL
TTL
TTL
TTL
Description
Chip Select Bit0
Chip Select Bit1
Chip Select Bit2
SPI Clock
SPI Serial Data In
SPI Serial Data Out
Table 7.8: Pinout SPI
7.8 Additional inputs and outputs
The module is equipped with eight TTL input pins and eight TTL output pins, which are accessible via
the 68-pin connector. The input pins can also be used as analogue inputs.
Pin
45
47
49
51
53
55
57
59
46
48
50
52
54
56
58
60
Direction
in
in
in
in
in
in
in
in
out
out
out
out
out
out
out
out
Name
INP_0
INP_1
INP_2
INP_3
INP_4
INP_5
INP_6
INP_7
Out_0
Out_1
Out_2
Out_3
Out_4
Out_5
Out_6
Out_7
Limits
TTL
TTL
TTL
TTL
TTL
TTL
TTL
TTL
TTL
TTL
TTL
TTL
TTL
TTL
TTL
TTL
digital
digital
digital
digital
digital
digital
digital
digital
digital
digital
digital
digital
digital
digital
digital
digital
Description
and analogue input pin
and analogue input pin
and analogue input pin
and analogue input pin
and analogue input pin
and analogue input pin
and analogue input pin
and analogue input pin
output pin 0, output
output pin 1, output
output pin 2, output
output pin 3, output
output pin 4, output
output pin 5, output
output pin 6, output
output pin 7, output
Table 7.9: Additional I/O pins
7.9 Miscellaneous connections
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
0,
1,
2,
3,
4,
5,
6,
7,
input
input
input
input
input
input
input
input
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
Pin
17
18
44
Direction
Name
in
Reset
out
Alarm
in
Shutdown
20
Limits
Description
TTL
Reset, active low
TTL
Alarm, active high
TTL
Emergency stop
Table 7.10: Miscellaneous connections
The functionality of the shutdown pin is configurable using in TMCL™ with global parameter 80
(please see the TMCM-341/342/343 TMCL™ Firmware Manual for information on this).
7.10 Microstep resolution
The TMCM-343 supports a true 64 microstep resolution. To meet your needs, the microstep resolution
can be set using the TMCL™ software. The default setting is 64 microsteps, which is the highest
resolution. For setting the microstep resolution with the TMCL™ firmware use instruction 5: SAP, type
140: microstep resolution.
You can find the appropriate value in Table 7.11.
Value
0
1
2
3
4
5
6
microsteps
Do not use: for fullstep please see fullstep threshold
2
4
8
16
32
64
Table 7.11: Microstep resolution setting
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
21
8 Putting the TMCM-343 into operation
On the basis of a small example it is shown step by step how the TMCM-343 is set into operation.
Experienced users could skip this chapter and proceed to chapter 9.
Example: The following application is to implement with the TMCL-IDE Software development
environment in the TMCM-343 module. For data transfer between the host PC and the module the
RS232 interface is employed.
A formula how speed is converted into a physical unit like rotations per seconds can be found in
chapter Calculation: Velocity and acceleration vs. microstep and fullstep frequency.



Turn Motor 0 left with speed 500
Turn Motor 1 right with speed 500
Turn Motor 2 with speed 500, acceleration 5 and move between position +10000 and –10000.
Step 1:
Connect the RS232 Interface as specified in 7.7.
Step 2:
Connect the motors as specified in 7.3.
Step 3:
Connect the power supply.
+5 VDC to pins 1 or 3
Ground to pins 2, 4, 6, 8 or 10
Connect the motor supply voltage
+10 to 30 VDC to pins 5, 7, 9
Switch on the power supply and the motor supply. An on-board LED should start to
flash. This indicates the correct configuration of the microcontroller.
Start the TMCL-IDE Software development environment. Open file test2.tmc. The
following source code appears on the screen:
A description for the TMCL commands can be found in Appendix A.
Step 4:
Step 5:
Step 6:
//A simple example for using TMCL™ and TMCL-IDE
Loop:
Step 7:
Step 8:
ROL 0, 500
WAIT TICKS, 0, 500
MST 0
ROR 1, 250
WAIT TICKS, 0, 500
MST 1
//Rotate motor 0 with speed 500
SAP 4, 2, 500
SAP 5, 2, 50
MVP ABS, 2, 10000
WAIT POS, 2, 0
MVP ABS, 2, -10000
WAIT POS, 2, 0
JA Loop
//Set max. Velocity
//Set max. Acceleration
//Move to Position 10000
//Wait until position reached
//Move to Position -10000
//Wait until position reached
//Infinite Loop
//Rotate motor 1 with 250
Click on Icon Assemble to convert the TMCL™ into machine code.
Then download the program to the TMCM-343 module via the Icon Download.
Press Icon Run. The desired program will be executed.
Please refer to the TMCM-341/342/343 TMCL™ Firmware Manual for further information about the
commands.
The next chapter discusses additional operations to turn the TMCM-343 into a high performance
motion control system.
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
22
9 Migrating from the TMCM-303 to the
TMCM-343
Migrating TMCM-303 applications to the TMCM-343 is easy, as the TMCM-343 can replace a TMCM-303
without problems. The connector of the TMCM-343 is identical to the connector of the TMCM-303, so
that a TMCM-343 can just be plugged into the slot for a TMCM-303 (it can also use the same base
boards as the TMCM-303). Also the TMCL™ firmware of the TMCM-343 is highly compatible with the
TMCM-303.
However there are some slight differences that have to be observed (due to the fact that the TMCM343 has some enhancements compared to the TMCM-303):





Speed of TMCL™ program execution: TMCL™ programs run up twenty times faster than on the
TMCM-303 module. In general, the developer of a TMCL™ program should not make
assumptions about command execution times.
Axis parameters 6 and 7 (run current and stand by current): The range of these parameters is
now 0… 255 and no longer 0… 1500. These parameter settings must be adapted.
Axis parameters 194 and 195: The reference search speeds are now specified directly (1… 2047)
and no longer as fractions of the maximum positioning speed. These settings have to be
adapted.
MVP COORD: The parameter of the MVP COORD command is different (to make it compatible
with the six axis modules). Please see the TMCM-341/342/343 TMCL™ Firmware Manual for
details. The usage of the MVP COORD command also has to be adapted.
Default CAN bit rate: the default CAN bit rate of the TMCM-343 module (e.g. after resetting it
to factory default settings) is 1000kBit/s (in contrast to 250kBit/s on the TMCM-303.
All other TMCL™ commands and parameters are the same as with the TMCM-303.
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
23
10 TMCM-343 operational description
10.1 Calculation: Velocity and acceleration vs. microstep and
fullstep frequency
The values of the parameters sent to the TMC428 do not have typical motor values like rotations per
second as velocity. But these values can be calculated from the TMC428-parameters as shown in this
document.
The parameters for the TMC428 are:
Signal
fCLK
velocity
a_max
Description
clock-frequency
maximum acceleration
divider for the velocity. The higher the value is, the less
is the maximum velocity
default value = 0
divider for the acceleration. The higher the value is, the
less is the maximum acceleration
default value = 0
pulse_div
ramp_div
microstep-resolution (microsteps per fullstep = 2usrs)
Usrs
Range
16 MHz
0… 2047
0… 2047
0… 13
0… 13
0… 7 (a value of 7 is
internally mapped to
6 by the TMC428)
Table 10.1: TMC428 velocity parameters
The microstep-frequency of the stepper motor is calculated with
usf [Hz] 
fCLK [Hz]  velocity
2pulse_ div  2048  32
with usf: microstep-frequency
To calculate the fullstep-frequency from the microstep-frequency, the microstep-frequency must be
divided by the number of microsteps per fullstep.
fsf [Hz] 
usf [Hz]
2usrs
with fsf: fullstep-frequency
The change in the pulse rate per time unit (pulse frequency change per second – the acceleration a)
is given by
2
a
f CLK  a max
2 pulse_ divramp _ div29
This results in acceleration in fullsteps of:
af 
a
2
usrs
with af: acceleration in fullsteps
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
Example:
Signal
f_CLK
velocity
a_max
pulse_div
ramp_div
usrs
msf 
16 MHz  1000
21  2048 32
fsf [Hz] 
a
value
16 MHz
1000
1000
1
1
6
122070.31
26
(16Mhz) 2  1000
2
11 29
 122070.31Hz
 1907.34Hz
 119.21
MHz
s
MHz
s  1.863 MHz
6
s
2
119.21
af 
Calculation of the number of rotations:
A stepper motor has e.g. 72 fullsteps per rotation.
RPS 
fsf
1907.34

 26.49
fullstepsper rotation
72
RPM 
fsf  60
1907.34  60

 1589.46
fullstepsper rotation
72
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
24
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
25
11 TMCL™
TMCL™, the TRINAMIC Motion Control Language, is described in separate documentations, which refer
to the specific products (e.g. TMCM-341/342/343 TMCL™ Firmware Manual). The manuals are provided
on the TMC TechLibCD and on www.trinamic.com. Please refer to these sources for updated data
sheets and application notes.
The TMC TechLibCD includes data sheets, application notes, and schematics of evaluation boards,
software of evaluation boards, source code examples, parameter calculation spreadsheets, tools, and
more.
12 CANopen
The TMCM-343 module can also be used with the CANopen protocol. For this purpose, a special
CANopen firmware has to be installed. To do that, download the latest version of the TMCM-343
CANopen firmware from the Trinamic website or use the version provided on the TechLib CD and
install it using the firmware update function of the TMCL-IDE (Setup/Install OS). The TMCM-343 module
is then ready to be used with CANopen. Please see the specific CANopen manual provided on the
TRINAMIC website and on the TechLibCD on how to use the TMCM-343 module with the CANopen
protocol.
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
13 Revision history
13.1 Document revision
Version
1.00
1.01
1.02
1.04
1.05
Date
2008-MAY-19
2009-DEC-15
2009-MAY-08
2009-JUN-12
2010-FEB-24
Author
OK
OK
OE
OK
SD
1.06
2010-MAR-02 SD
1.07
2011-JUN-08
SD
Description
Some figures corrected
Migration and CANopen chapters added
Dimension Figure extended
Chapter 5.5. corrected
Dimensions corrected, minor changes
New front page, analog measurement
range in chapter 6 completed
Minor changes
Table 13.1: Document revision
13.2 Hardware revision
Version
1.00
1.01
Comment
Description
Initial release First version of new generation TMCM-343
Actual version
Table 13.2: Hardware revision
13.3 Firmware revision
Version
4.07
Comment
Initial release
4.20
Actual release
Description
Please refer to the TMCM-341/342/343 TMCL™
Firmware Manual
Table 13.3: Firmware revision
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
26
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08)
14 References
[TMCM-343]
[QSH-4218]
[TMCM-323]
[TMCM-EVAL]
TMCM-343 Hardware Manual on www.trinamic.com
QSH-4218 Manual on www.trinamic.com
TMCM-323 Hardware Manual on www.trinamic.com
TMCM-EVAL Hardware Manual on www.trinamic.com
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
27
Similar pages