Trinamic TMCM-342 User Manual

Page 1
TMCM-342
3 - Axis Stepper Motor Motion Control Module
with Step / Direction outputs
Manual
Version: 1.01
December 9th, 2008
Trinamic Motion Control GmbH & Co. KG
Sternstraße 67
D – 20357 Hamburg, Germany
http://www.trinamic.com
Page 2
TMCM-342 Manual V1.01 2/26
Table of Contents
1 Features........................................................................................................................................................................... 4
2 Life support policy ....................................................................................................................................................... 5
3 Electrical and Mechanical Interfacing ..................................................................................................................... 6
3.1 Dimensions ........................................................................................................................................................... 6
3.2 Connecting the Module ..................................................................................................................................... 7
4 Operational Ratings ..................................................................................................................................................... 8
5 Functional Description ................................................................................................................................................ 8
5.1 System Architecture ........................................................................................................................................... 9
5.1.1 Microcontroller .......................................................................................................................................... 9
5.1.2 TMCL EEPROM............................................................................................................................................. 9
5.1.3 TMC428 Motion Controller ..................................................................................................................... 9
5.1.4 Interface to the external drivers .......................................................................................................... 9
5.2 Power Supply ....................................................................................................................................................... 9
5.3 Host Communication ....................................................................................................................................... 10
5.3.1 CAN 2.0b .................................................................................................................................................... 10
5.3.2 RS-232 ........................................................................................................................................................ 10
5.3.3 RS-485 ........................................................................................................................................................ 11
5.4 Step-/Direction output ..................................................................................................................................... 12
5.5 Connecting the drivers .................................................................................................................................... 12
5.5.1 Connecting the TMCM-342 to a power driver module with Step/Direction-Interface ........ 12
5.5.2 Connecting the TMCM-342 to drivers with an SPI-Interface ...................................................... 15
5.6 Power supply requirements with drivers .................................................................................................. 16
5.7 Ramp Profiles ..................................................................................................................................................... 18
5.8 Reference switches ........................................................................................................................................... 19
5.8.1 Left and right limit switches .............................................................................................................. 19
5.8.2 Triple Switch Configuration................................................................................................................. 19
5.8.3 One Limit Switch for circular systems ............................................................................................. 20
5.9 Serial Peripheral Interface (SPI) ................................................................................................................... 20
5.10 Additional inputs and outputs ...................................................................................................................... 21
5.11 Miscellaneous Connections ............................................................................................................................ 21
6 Putting the TMCM-342 into Operation .................................................................................................................. 22
7 Migrating from the TMCM-302 to the TMCM-342 ............................................................................................... 23
8 TMCM-342 Operational Description ....................................................................................................................... 24
8.1 Calculation: Velocity and Acceleration vs. Microstep- and Fullstep-Frequency............................... 24
9 TMCL ............................................................................................................................................................................... 25
10 CANopen ....................................................................................................................................................................... 25
11 Revision History .......................................................................................................................................................... 26
11.1 Documentation Revision ................................................................................................................................. 26
11.2 Hardware Revision ............................................................................................................................................ 26
11.3 Firmware Revision ............................................................................................................................................ 26
12 References .................................................................................................................................................................... 26
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 3
TMCM-342 Manual V1.01 3/26
List of Figures
Figure 3.1: Dimensions ........................................................................................................................................................ 6
Figure 3.2: Pin order of the connector ........................................................................................................................... 7
Figure 5.1: Main parts of the TMCM-342 ......................................................................................................................... 8
Figure 5.2: Connecting CAN ............................................................................................................................................. 10
Figure 5.3: Connecting RS-232 ......................................................................................................................................... 11
Figure 5.4: Connecting the RS-485 interface ............................................................................................................... 11
Figure 5.5: Step-/Direction output signals ................................................................................................................... 12
Figure 5.6: Application Environment using the Step/Direction-Interface ........................................................... 13
Figure 5.7: Application with power module Monopack 2 with a Step/Direction-Interface .......................... 13
Figure 5.8: Application with TMCM-023 with 3 Step/Direction-Interfaces (5V inputs required, please see
latest TMCM-023 documentation for modifications) ........................................................................................ 14
Figure 5.9: Application with TMCM-013 with a Step/Direction-Interface ............................................................ 14
Figure 5.10: Application Environment using the SPI-Interface ............................................................................. 15
Figure 5.11: Application with an SPI-stepper motor driver ................................................................................... 16
Figure 5.12: Power supply requirements for TMCM-342 with additional driver ............................................... 16
Figure 5.13: Power supply requirements for TMC-Modules in a bus system .................................................... 17
Figure 5.14: Velocity profile in ramp mode ................................................................................................................ 18
Figure 5.15: Velocity profile in velocity mode ............................................................................................................ 18
Figure 5.16: Left and right limit switches .................................................................................................................... 19
Figure 5.17: Limit switch and reference switch ......................................................................................................... 19
Figure 5.18: One reference switch ................................................................................................................................. 20
List of Tables
Table 1.1: Order codes ......................................................................................................................................................... 4
Table 3.1: Pinout of the 68-Pin Connector .................................................................................................................... 7
Table 4.1: Operational Ratings .......................................................................................................................................... 8
Table 5.1: Pinning of Power supply ................................................................................................................................ 9
Table 5.2: Pinout for CAN Connection .......................................................................................................................... 10
Table 5.3: Pinout for RS-232 Connection ...................................................................................................................... 10
Table 5.4: Pinout for RS-485 Connection ...................................................................................................................... 11
Table 5.5: Pinout for using the Step/Direction-Interface ......................................................................................... 12
Table 5.6: Pinout for the connections using the SPI-Interface ............................................................................. 15
Table 5.7: Pinout of the reference switch inputs ...................................................................................................... 19
Table 5.8: Pinout Serial Peripheral Interface .............................................................................................................. 20
Table 5.9: Additional I/O pins ......................................................................................................................................... 21
Table 5.10: Miscellaneous Connections ........................................................................................................................ 21
Table 7.1: TMC428 Velocity parameters ........................................................................................................................ 24
Table 9.1: Documentation Revisions ............................................................................................................................. 26
Table 9.2: Hardware Revisions ........................................................................................................................................ 26
Table 9.3: Firmware Revisions......................................................................................................................................... 26
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 4
TMCM-342 Manual V1.01 4/26
Order code
Description
TMCM-342 (-option)
3-axis controller module with step/dir. Outputs
Related products
BB-302, TMCM-EVAL, BB-323-02
Option
-H
horizontal pin connector (standard)
-V
vertical pin connector (on request)
1 Features
The TMCM-342 is a triple axis stepper motor controller module for external power drivers with step / direction interface. With its very small size it is dedicated to embedded applications, where centralized or de-centralized high power drivers are desired. The board can be connected to a baseboard or customized electronics with a pin connector. The TMCM-342 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. The TMCM-342 can be controlled via the serial UART interface (e.g. using a RS-232 or RS-485 level shifter) or via CAN. Communication traffic is kept very low since all time critical operations, e.g. ramp calculation, are performed on board. The TMCL operations can be stored in the onboard EEPROM for stand-alone operation. The firmware of the module can be updated via the serial interface as well as via the CAN interface.
Applications
Controller board for control of up to 3 Step / Direction drivers e.g. TMCM-035, TMCM-023 (triple
driver), IDX or PD-013-42 mechatronic module or TMCM-078 step/direction driver
Versatile possibilities of applications in stand alone or host controlled mode
Electrical Data
5V DC logic power supply TTL / CMOS step / direction outputs
Interface
RS-232, RS-485 (max. 115200bps) or CAN 2.0b (max. 1MBit/s) host interface Inputs for reference and stop switches, general purpose analog and digital I/Os
Highlights
Three motion controllers for high step frequency Automatic ramp generation in Hardware On the fly alteration of motion parameters (e.g. position, velocity, acceleration) High dynamics: step frequencies up to 300kHz
1.8µs step pulse length and step to direction delay
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 Size: 80x50mm²
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Table 1.1: Order codes
Page 5
TMCM-342 Manual V1.01 5/26
2 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 2008
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 from its use.
Specifications are subject to change without notice.
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 6
TMCM-342 Manual V1.01 6/26
Horizontal
Connector:
Header
Connector:
5
Note: all dimensions in mm
6
2 (PCB)
2 (PCB)
AT91SAM7X256
68-Pin Connector
4
36.9
39.1
50
2.2
3.2
4
80
3 Electrical and Mechanical Interfacing
3.1 Dimensions
Figure 3.1: Dimensions
The size of the module (80x50mm) is the same as of many other Trinamic motion control modules. It also uses the same connector. The 68 pin connector has a 2.0mm pitch.
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 7
TMCM-342 Manual V1.01 7/26
Pin
Direction
Description
Pin
Direction
Description
1 +5VDC (+/- 5%) I
max
=50mA
35
Out
STEP_M1
2 GND
36
Out
SPI_M2_CLK
3 +5VDC (+/- 5%)
37
Out
DIR_M1 4
GND
38
In
SPI_M0_IN
5 Internally not connected
39
Out
STEP_M2
6 GND
40
In
SPI_M1_IN
7 Internally not connected
41
Out
DIR_M2
8 GND
42
In
SPI_M2_IN
9 Internally not connected
43
In
Shutdown
10 GND
44
-
Reserved
11
Out
SPI Select 0
45
In
General Purpose input 0
12
Out
SPI Clock
46
Out
General Purpose output 0
13
Out
SPI Select 1
47
In
General Purpose input 1
14
In
SPI MISO
48
Out
General Purpose output 1
15
Out
SPI Select 2
49
In
General Purpose input 2
16
Out
SPI MOSI
50
Out
General Purpose output 2
17
In
Reset, active low
51
In
General Purpose input 3
18
Out
Alarm
52
Out
General Purpose output 3
19
In
Reference Switch Motor 0 left
53
In
General Purpose input 4
20
Out
nSCS0
54
Out
General Purpose output 4
21
In
Reference Switch Motor 0 right
55
In
General Purpose input 5
22
Out
nSCS1
56
Out
General Purpose output 5
23
In
Reference Switch Motor 1 left
57
In
General Purpose input 6
24
Out
nSCS2
58
Out
General Purpose output 6
25
In
Reference Switch Motor 1 right
59
In
General Purpose input 7
26
Out
SPI_M0_OUT
60
Out
General Purpose output 7
27
In
Reference Switch Motor 2 left
61
GND
28
Out
SPI_M0_CLK
62
GND
29
In
Reference Switch Motor 2 right
63
-
Reserved
30
Out
SPI_M1_OUT
64
Out
RS-485 Direction
31
Out
STEP_M0
65
InOut
CAN -
32
Out
SPI_M1_CLK
66
In
RS-232 RxD
33
Out
DIR_M0
67
InOut
CAN +
34
Out
SPI_M2_OUT
68
Out
RS-232 TxD
PCB
1
2
68
67
3.2 Connecting the Module
The 68-pin connector provides communication to a host, configuration of the EEPROM and connection of step / direction drivers 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.
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Table 3.1: Pinout of the 68-Pin Connector
Figure 3.2: Pin order of the connector
Page 8
TMCM-342 Manual V1.01 8/26
Symbol
Parameter
Min
Typ
Max
Unit
V
+5V
+5V DC input (max. 300mA)
4.75
5.0
5.25
V
f
STEP
Maximum step frequency
300
kHz
t
SPulse
Step pulse length
1.5
1.8
2.4
µs
t
S2D
Step to direction delay
1.5
1.8
2.4
µs
V
INPROT
Input voltage for StopL, StopR, GPI0 (internal protection diodes)
-0.5
0 … 5
V
+5V
+0.5
V
V
ANA
INx analog measurement range
0 ... 5
V
V
INLO
INx, StopL, StopR low level input
0 0.9
V
V
INHI
INx, StopL, StopR high level input
2 5
V
I
OUTI
OUTx max +/- output current (CMOS output) (sum for all outputs max. 50mA)
0..10
+/-20
mA
T
ENV
Environment temperature at rated current (no cooling)
-40 +70
°C
RS-232
or
RS-485
3x
programmable
Motion
Controller
with TMC428
TMCM-342
TMCL
Memory
step/dir
Driver
e.g. TMCM-035
Step
Motor
5V DC
REF-Switches
I/Os
16
6
step/dir
Driver
e.g. TMCM-035
Step
Motor
step/dir
Driver
e.g. TMCM-035
Step
Motor
UART
CAN
4 Operational Ratings
The operational ratings show the intended / the characteristic range for the values and should be used as design values. In no case shall the maximum values be exceeded.
5 Functional Description
In Figure 5.1 the main parts oft the TMCM-342 module are shown. The module mainly consists of three TMC428 motion controllers, the TMCL program memory (EEPROM) and the host interfaces (RS­232, RS-485 and CAN).
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Table 4.1: Operational Ratings
Figure 5.1: Main parts of the TMCM-342
Page 9
TMCM-342 Manual V1.01 9/26
Pin
Function
1, 3
+5V DC (+/- 5%), I
max
=50mA power supply (plus current required for outputs)
2, 4, 6, 8, 10
Ground
5.1 System Architecture
The TMCM-342 integrates a microcontroller with the TMCL (Trinamic Motion Control Language) operating system. The motion control real-time tasks are realized by three TMC428 chips.
5.1.1 Microcontroller
On this module, the Atmel AT91SAM7X256 microcontroller is used to communicate with the host and the EEPROM 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, RS-485 and CAN interface. These commands are interpreted by the microcontroller and then converted into SPI-datagrams which are then sent to the TMC428. 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.
5.1.2 TMCL EEPROM
To store TMCL programs for stand-alone operation and for storing configuration data the TMCM-342 module is equipped with a 16kByte EEPROM attached to the microcontroller. The EEPROM can store TMCL programs consisting of up to 2048 TMCL commands.
5.1.3 TMC428 Motion Controller
The TMC428 is a high-performance stepper motor control IC and can control up to three 2-phase­stepper-motors. On the TMCM-342 three TMC428 are used to get fastest calculation of ramps and highest step frequencies. 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.
5.1.4 Interface to the external drivers
Drivers are not included on the module. To drive stepper motors with this module, stepper motor drivers have to be added externally. To drive a stepper motor with the Step/Direction-Interface, a power driver module has to be added, which can evaluate the Step/Direction-signals. Also stepper motor drivers with an SPI-Interface can be added, but this module is mainly intended for use with Step/Direction drivers.
5.2 Power Supply
The power supply for the TMCM-342 is +5VDC for module functionality. Please use all listed pins for the power supply inputs and ground parallel. Refer to 6.
Table 5.1: Pinning of Power supply
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 10
TMCM-342 Manual V1.01 10/26
Pin Number
Direction
Name
Limits
Description
65
InOut
CAN -
-8…+18V
CAN Input / Output
67
InOut
CAN +
-8…+18V
CAN Input / Output
Pin 2 Pin 1
TMCM-342
68-Pin-Connector
Pin67: CAN+
Pin65: CAN-
Host
CAN+
CAN-
Pin Number
Direction
Name
Limits
Description
66
In
RxD
TTL
RS-232 Receive Data
68
Out
TxD
TTL
RS-232 Transmit Data
2, 4, 6, 8, 10
In
GND
0V
Connect to ground
5.3 Host Communication
Communication to a host takes place via one or more of the onboard interfaces. The module provides a wide range of different interfaces, like CAN, RS-232 and RS-485. The following chapters explain how the interfaces are connected with the 68-pin connector.
5.3.1 CAN 2.0b
Table 5.2: Pinout for CAN Connection
Figure 5.2: Connecting CAN
5.3.2 RS-232
Table 5.3: Pinout for RS-232 Connection
Note: The module only provides serial signals with TTL level. For using RS232, a suitable RS232 level shifter (like MAX202) has to be added by the user.
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 11
TMCM-342 Manual V1.01 11/26
Pin 66: RS232_RxD
Pin 68: RS232_TxD
Pin 2 Pin 1
Pin61: GND
TMCM-342
68-Pin-Connector
Host
TxD
RxD
GND
level shifter
(e.g. MAX202)
TTL
Pin Number
Direction
Name
Limits
Description
64
Out
RS485_DIR
TTL
Driver / Receiver enable for RS-485 Transceiver. 0: Receiver enable 1: Driver enable
66
In
RxD
TTL
RS-485 Receive Data
68
Out
TxD
TTL
RS-485 Transmit Data
2, 4, 6, 8, 10
In
GND
0V
Connect to ground
Pin 61: GND
TxD
RxD
DIR
RS485+
RS485-
GND
TxD
RxD
DIR
RS485+
RS485-
GND
Transceiver, e.g. MAX485
Transceiver, e.g. MAX485
Pin 64: RS485_DIRECTION
Pin 66: RS232_RxD
Pin 68: RS232_TxD
Pin 2 Pin 1
TMCM-342
68-Pin-Connector
TxD RxD
DIR
GND
HOST
Figure 5.3: Connecting RS-232
5.3.3 RS-485
Note: The TMCM-342 module only provides TTL level signals. For using RS485 a suitable RS485 tansceiver (like MAX485) has to be added by the user.
Figure 5.4: Connecting the RS-485 interface
Via RS-485 Interface it is possible to build up systems with of 31 (with repeater 254) modules, which are addressable by one host.
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Table 5.4: Pinout for RS-485 Connection
Page 12
TMCM-342 Manual V1.01 12/26
old direction signalDIR output
STEP output
internal
TMC428 step
signal
t
S2DIR
=1.8 µs t
SPULSE
=1.8 µs
Step impulse
new direction signal
First step in new direction initiated by user
Pin Number
Direction
Name
Limits
Description
31
Out
STEP_M0
TTL
Step-Signal for Driver 0
33
Out
DIR_M0
TTL
Direction-Signal for Driver 0
35
Out
STEP_M1
TTL
Step-Signal for Driver 1
37
Out
DIR_M1
TTL
Direction-Signal for Driver 1
39
Out
STEP_M2
TTL
Direction-Signal for Driver 2
41
Out
DIR_M2
TTL
Serial Clock for the Driver 2
5.4 Step-/Direction output
The TMCM-342 generates step- and direction output signals, which are pre-conditioned in order to be directly connected to microstep driver units with 5V inputs. See Figure 5.5 for the output timing. Some driver units might require inverters / level shifters in order to adapt step polarity and voltage. You can use standard open collector level shifters like the SN7407 or inverters like SN7406. These devices allow level translation to 12V or 24V, or inversion of the step signal, if the device timing requires this. One 7406 or 7407 can shift all six output signals. In order not to loose any steps, please make sure that your driver unit can work with the step-to-direction delay and with the step impulse length.
Figure 5.5: Step-/Direction output signals
5.5 Connecting the drivers
Because there are no stepper motor drivers included on the TMCM-342, an Add-On-Board has to be developed to drive the stepper motors. Some examples of Trinamic´s own driver modules are added below. Please refer to www.trinamic.com for more information. Normally, a step/direction interface is used to connect the driver. Using the SPI interface would also be possible, but is normally not used with this module (compare TMCM-301 for SPI applications).
5.5.1 Connecting the TMCM-342 to a power driver module with
Step/Direction-Interface
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Table 5.5: Pinout for using the Step/Direction-Interface
Page 13
TMCM-342 Manual V1.01 13/26
TMCM-342
µC
EEPROM
CAN
Host
Communication
5 VDC
RS-232 / RS-485 /
SPI
TMC428
Reference Switches
TMC428 TMC428
step/dir­converter
STEP0
DIR0
STEP1
DIR1
STEP2
DIR2
power
driver
module
Motor 0
power
driver
module
Motor 1
power
driver
module
Motor 2
Reference Switches
Reference Switches
step/dir­converter
step/dir­converter
Power module with
Step/Direction Interface,
e.g. Monopack 2
DIR+
DIR-
STEP+ STEP-
Max
45VDC
Motor max.
2.5A
+ -
A1 A2 B1 B2
Pin 2: GND
Pin 4: GND
Pin 26
Pin 28
Pin 30
Pin 32
Pin 34
Pin 68
TMCM-342
GND: Pin 2, 4, 6, 8
5V: Pin 1, 3
33
31
Pin 6
5
A
B
IN A
IN B
OUT A
OUT B
OUT A
OUT B
GND
VCC
e.g. DS9638
A
B
C
D
IN A
IN B
IN D
IN C
OUT A
OUT B
OUT C
OUT D
OUT A
OUT B
OUT C
OUT D
VCC
GND
e.g. DS26C31
DIR_M0
STEP_M0
for two other Monopack
2
Motor 1
Examples: Connection of the TMCM-342 with the Monopack2 (power driver module with a Step/Direction-Interface), TMCM-023 or TMCM-013.
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Figure 5.6: Application Environment using the Step/Direction-Interface
Figure 5.7: Application with power module Monopack 2 with a Step/Direction-Interface
Page 14
TMCM-342 Manual V1.01 14/26
DIR_M1
STEP_M1
DIR_M0
STEP_M0
DIR_M2
STEP_M2
Pin 2
Pin 4
Pin 32
Pin 34
Pin 36
Pin 38
Pin 40
Pin 68
TMCM-342
33
31
Pin 6
5
35
37
39
Pin 42
41
3
1
B2 B1 A2 A1
B2 B1 A2 A1
B2 B1 A2 A1
VS = 7..28.5 V
GND
Motor 0
Motor 2
Motor 1
V
COMM
= +5V DC
TMCM-023
DIR_M1
STEP_M1
DIR_M0
STEP_M0
DIR_M2
STEP_M2
for two other step/direction
modules
Pin 2
Pin 4
Pin 32
Pin 34
Pin 36
Pin 38
Pin 40
Pin 68
TMCM-342
33
31
Pin 6
5
35
37
39
Pin 42
41
3
1
VS = 7...28V
TMCM-
013
Motor connection
OA1
OA2
OB1
OB2
+5V DC
Figure 5.8: Application with TMCM-023 with 3 Step/Direction-Interfaces (5V inputs required, please
see latest TMCM-023 documentation for modifications)
Figure 5.9: Application with TMCM-013 with a Step/Direction-Interface
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 15
TMCM-342 Manual V1.01 15/26
Pin Number
Direction
Name
Limits
Description
20
Out
nSCS0
TTL
Chip Select for Driver 0
22
Out
nSCS1
TTL
Chip Select for Driver 1
24
Out
nSCS2
TTL
Chip Select for Driver 2
26
Out
SPI_M0_OUT
TTL
SPI Data In for Driver 0
28
Out
SPI_M0_CLK
TTL
SPI Clock for Driver 0
30
Out
SPI_M1_OUT
TTL
SPI Data In for Driver 1
32
Out
SPI_M1_CLK
TTL
SPI Clock for Driver 1
34
Out
SPI_M2_OUT
TTL
SPI Data In for Driver 2
36
Out
SPI_M2_CLK
TTL
SPI Clock for Driver 2
38
In
SPI_M0_IN
TTL
SPI Data Out for Driver 0
40
In
SPI_M1_IN
TTL
SPI Data Out for Driver 1
42
In
SPI_M2_IN
TTL
SPI Data Out for Driver 2
TMCM-342
µC
EEPROM
TMC428
CAN
Host
Communication
5 VDC
RS-232 / RS-485
Reference
Switches
Driver,
w/o SDO
Driver
Driver,
w/o SDO
nSCS0
nSCS1
nSCS2
nSCS1
nSCS2
nSCS3
SDI_S
SDI_S
SDI_S
SCK_S
SCK_S
SCK_S
SDO_S
Motor 0
Motor 1
Motor 2
+5V
external pullups
5.5.2 Connecting the TMCM-342 to drivers with an SPI-Interface
The pins connecting the TMCM-342 with the Add-On-Board using the SPI-Interface are listed in Table
5.6. This is only listed here for the sake of completeness. It is not directly supported by the firmware of the TMCM-342. Please use the TMCM-341 for using SPI motor drivers.
Table 5.6: Pinout for the connections using the SPI-Interface
Figure 5.10: Application Environment using the SPI-Interface
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 16
TMCM-342 Manual V1.01 16/26
Pin 2
Pin 20
Pin 22
Pin 24
Pin 26
Pin 28
Pin 38
Pin 68
TMCM-342
M
TMC236
CSN
SDI
SCK
SDO
OUTA1 OUTA2
OUTB1 OUTB2
GND: Pin 2, 4, 6, 8 5V: Pin 1, 3
V_Motor
GND
+
C (>1000µF)
L
+
Power Supply
keep distance short
local +5V regulator
supply for further modules on
same base board
TMCM-342
Driver
+5V
GND
Example : Using the TMC236 stepper motor driver with an SPI-interface
Figure 5.11: Application with an SPI-stepper motor driver
5.6 Power supply requirements with drivers
The TMCM-342 is supplied with +5VDC, the drivers need an additional power supply 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 drivers. This ensures a stable power supply and minimizes noise injected into the power supply cables. The choke especially becomes necessary with larger distributed systems using a common power supply.
Especially with 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.
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Figure 5.12: Power supply requirements for TMCM-342 with additional driver
Page 17
TMCM-342 Manual V1.01 17/26
TMCM-342
with driver
V_Motor
(14...50V)
GND
+
C
L
+
Power Supply
keep distance short
TMCM-342
with driver
V_Motor
(14...50V)
GND
+
C
L
keep distance short
keep distance below a few meters with a single power supply
CAN high
CAN low
CAN high
CAN low
Do not supply modules with the same power supply which are mounted in a distance of more than a few meters. 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.
other devices
on CAN bus
(incl. Master)
CAN high
CAN low
V_Motor
GND
+
C
L
CAN_GND
CAN_GND
CAN_GND
The following hints help avoiding transmission problems in larger systems. Not all hints have to be followed:
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 with the same power supply which are mounted in a distance of more
than a few meters.
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 base-board.
Figure 5.13: Power supply requirements for TMC-Modules in a bus system
For large systems, an optically decoupled CAN bus for each number of nodes, e.g. for each base board with a number of TMCM-34X modules with drivers may make sense, 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 © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 18
TMCM-342 Manual V1.01 18/26
target position reached
v(t)
t
a
_
m
a
x
-
a
_
m
a
x
maximum velocity reached
v_max
target position reached
close to target position
-> start deceleration
t
0
t
1
t
2
t
3
acceleration constant velocity
decele-
ration
t
5
t
6
t
7
a
_
m
a
x
-
a
_
m
a
x
v_max
acceleration
decele-
ration
v_min
v_
min
v_
min
t
4
new target position
v(t)
t
a
_
m
a
x
1
-
a
_
m
a
x
3
t
0
t
1
accele­ration
constant
velocity
t
8
t
9
a
_
m
a
x
5
-
a
_
m
a
x
6
v_max
acceleration
decele-
ration
a
_
m
a
x
2
a
_
m
a
x
4
maximum velocity reached
maximum velocity not yet reached
acceleration
constant
velocity
deceleration
accele-
ration
constant
velocity
maximum velocity not yet reached
t
2
t
3
t4t
5
t
6
t
7
5.7 Ramp Profiles
The speed profile is automatically worked out by the TMCM-342 from the values for the minimum speed, maximum speed and acceleration specified by the user with the TMCL. Two modes of operation for the course of velocity are available for selection.
In the Ramp-Mode the maximum acceleration (a_max), maximum (v_max) and minimum (v_min)
speed and the target position (x_target) are specified to calculate the actual velocity. By giving the target position, the TMCM-342 calculates the speed profile of each stepper motor from the current position and the specified parameters and immediately converts it into a motion sequence. In Figure 5.14, an example of the motion sequence is shown. Here the motor accelerates from t0 onwards with a_max till it reaches v_max in t1, then it moves itself with v_max up to t2, it then slows down with a_max till it reaches v_min in t3 and then it travels with v_min till it reaches its target (x_target) in t4. On the right side of the Figure it can be seen that v_max cannot be reached if a_max is too small or the target (x_target) is too close.
Figure 5.14: Velocity profile in ramp mode
In Velocity-Mode the acceleration and the maximum speed is specified in the TMCM-342. Then the
motor accelerates immediately with the specified value to the maximum speed and continues to run at constant speed till new values are sent to the TMCM-342. In Figure 5.15 the motion sequence for the velocity mode is shown as an example. Here the motor accelerates with a_max till it reaches the maximum velocity and then continues to run at constant speed with v_max till new a_max and v_max is specified. On the right side and at t5 the v_max is not distinctly reached if a new parameter is prematurely given.
Figure 5.15: Velocity profile in velocity mode
A detailed explanation of the parameters and its calculation is given in the software description.
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 19
TMCM-342 Manual V1.01 19/26
Pin Number
Direction
Name
Limits
Description
19
In
STOP0L
TTL
Left reference switch input for Motor #0
21
In
STOP0R
TTL
Right reference switch input for Motor #0
23
In
STOP1L
TTL
Left reference switch input for Motor #1
25
In
STOP1R
TTL
Right reference switch input for Motor #1
27
In
STOP2L
TTL
Left reference switch input for Motor #2
29
In
STOP2R
TTL
Right reference switch input for Motor #2
left stop
switch
right stop
switch
REF_L_x REF_R_x
motor
traveler
left stop
switch
motor
traveler
REF_L_x
right stop
switch
REF_R_x
reference
switch
5.8 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. All reference switch inputs are equipped with pull-up resistors.
Table 5.7: Pinout of the reference switch inputs
5.8.1 Left and right limit switches
The TMCM-342 can be configured so that a motor has a left and a right limit switch (Figure 5.16). The motor stops when the traveler has reached one of the limit switches.
Figure 5.16: Left and right limit switches
5.8.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 5.17. 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.
Figure 5.17: Limit switch and reference switch
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 20
TMCM-342 Manual V1.01 20/26
motor
ref switch
REF_L_x
eccentric
Pin Number
Direction
Name
Limits
Description
11
Out
SPI_SEL0
TTL
Chip Select Bit0
13
Out
SPI_SEL1
TTL
Chip Select Bit1
15
Out
SPI_SEL2
TTL
Chip Select Bit2
12
Out
SPI_CLK
TTL
SPI Clock
14
In
SPI_MISO
TTL
SPI Serial Data In
16
Out
SPI_MOSI
TTL
SPI Serial Data Out
5.8.3 One Limit Switch for circular systems
If a circular system is used (Figure 5.18), only one reference switch is necessary, because there are no end-points in such a system.
Figure 5.18: One reference switch
Note: In the actual TMCL, a function is available, which turns the motor left until the reference switch
has been detected. Then the actual and target position are set to zero. In the future, two and three limit switches will also be supported.
5.9 Serial Peripheral Interface (SPI)
On-board communication is performed via the Serial Peripheral Interface (SPI), where the microcontroller acts as master. For adaptation to user requirements, the user has access to this interface via the 68-pin connector. Furthermore three chip select lines can be used for addressing of external devices.
Table 5.8: Pinout Serial Peripheral Interface
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 21
TMCM-342 Manual V1.01 21/26
Pin Number
Direction
Name
Limits
Description
45
In
INP_0
TTL
digital and analog input pin 0
47
In
INP_1
TTL
digital and analog input 1
49
In
INP_2
TTL
digital and analog input 2
51
In
INP_3
TTL
digital and analog input 3
53
In
INP_4
TTL
digital and analog input 4
55
In
INP_5
TTL
digital and analog input 5
57
In
INP_6
TTL
digital and analog input 6
59
In
INP_7
TTL
digital and analog input 7
46
Out
Out_0
TTL
digital output 0
48
Out
Out_1
TTL
digital output 1
50
Out
Out_2
TTL
digital output 2
52
Out
Out_3
TTL
digital output 3
54
Out
Out_4
TTL
digital output 4
56
Out
Out_5
TTL
digital output 5
58
Out
Out_6
TTL
digital output 6
60
Out
Out_7
TTL
digital output 7
Pin Number
Direction
Name
Limits
Description
17
In
Reset
TTL
Reset, active low
18
Out
Alarm
TTL
Alarm, active high
43
In
Shutdown
TTL
Emergency stop
5.10 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 analog inputs.
Table 5.9: Additional I/O pins
5.11 Miscellaneous Connections
Table 5.10: Miscellaneous Connections
The functionality of the shutdown pin is configurable using in TMCL with global parameter 80 (please see the TMCL reference manual for information on this).
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 22
TMCM-342 Manual V1.01 22/26
//A simple example for using TMCL and TMCL-IDE
ROL 0, 500 //Rotate motor 0 with speed 500 WAIT TICKS, 0, 500 MST 0 ROR 1, 250 //Rotate motor 1 with 250 WAIT TICKS, 0, 500 MST 1
SAP 4, 2, 500 //Set max. Velocity SAP 5, 2, 50 //Set max. Acceleration Loop: MVP ABS, 2, 10000 //Move to Position 10000 WAIT POS, 2, 0 //Wait until position reached MVP ABS, 2, -10000 //Move to Position -10000 WAIT POS, 2, 0 //Wait until position reached JA Loop //Infinite Loop
6 Putting the TMCM-342 into Operation
On the basis of a small example it is shown step by step how the TMCM-342 is set into operation. Experienced users could skip this chapter and proceed to chapter 6.
Example: The following application is to implement with the TMCL-IDE Software development environment in the TMCM-342 module. For data transfer between the host PC and the module the RS­232 interface is employed.
A formula how “speed” is converted into a physical unit like rotations per seconds can be found in
chapter 8.1.
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 RS-232 Interface as specified in 5.3.2.
Step 2: Connect the motor drivers as specified in 5.4
Step 3: Connect the power supply.
+5 VDC to pins 1 or 3 Ground to pins 2, 4, 6, 8 or 10
Step 4: Connect the motor supply voltage to your driver module
Step 5: Switch on the power supply and the motor supply. An on-board LED should starting
to flash. This indicates the correct configuration of the microcontroller.
Step 6: 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 7: Click on Icon “Assemble” to convert the TMCL into machine code. Then download the program to the TMCM-342 module via the Icon “Download”.
Step 8: Press Icon “Run”. The desired program will be executed.
A documentation about the TMCL operations can be found in “TMCL Reference and Programming Manual”. The next chapter discusses additional operations to turn the TMCM-342 into a high
performance motion control system.
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 23
TMCM-342 Manual V1.01 23/26
7 Migrating from the TMCM-302 to the
TMCM-342
Migrating TMCM-302 applications to the TMCM-342 module is easy, as the TMCM-342 can replace a TMCM-302 without problems. The connector of the TMCM-342 is identical to the connector of the TMCM-302, so that a TMCM-342 can just be plugged into a slot that has originally been designed for a TMCM-302 (it can also use the same base boards as the TMCM-302). Also the TMCL firmware of the TMCM-342 module is highly compatible with the TMCM-302. However there are some slight differences that have to be observed (due to the fact that the TMCM-342 has many enhancements compared to the TMCM-302):
Speed of TMCL program execution: TMCL programs run up twenty times faster than on the
TMCM-302 module. In general, the developer of a TMCL program should not make assumptions about command execution times.
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 [TMCL] for details. The usage of this command also has to be adapted.
Default CAN bit rate: the default CAN bit rate of the TMCM-342 module (e.g. after resetting it to
factory default settings) is 1000kBit/s (in contrast to 250kBit/s on the TMCM-302.
All other TMCL commands and parameters are the same as with the TMCM-302 module.
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 24
TMCM-342 Manual V1.01 24/26
Signal
Description
Range
f
CLK
clock-frequency
0..16 MHz
velocity
-
0..2047
a_max
maximum acceleration
0..2047
pulse_div
divider for the velocity. The higher the value is, the less is the maximum velocity default value = 0
0..13
ramp_div
divider for the acceleration. The higher the value is, the less is the maximum acceleration default value = 0
0..13 Usrs
microstep-resolution (microsteps per fullstep = 2
usrs
)
0..7 (a value of 7 is internally mapped to 6 by the TMC428)
3220482
velocity]Hz[f
]Hz[usf
div_pulse
CLK
usrs
2
]Hz[usf
]Hz[fsf
29div_rampdiv_pulse
max
2
CLK
2
af
a
usrs
2
a
af
8 TMCM-342 Operational Description
8.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:
Table 8.1: TMC428 Velocity parameters
The microstep-frequency of the stepper motor is calculated with
where “usf” means microstep-frequency
To calculate the fullstep-frequency from the microstep-frequency, the microstep-frequency must be multiplied with the number of microsteps per fullstep.
where “fsf” means fullstep-frequency
The change in the pulse rate per time unit (pulse frequency change per second – the acceleration a is given by
This results in an acceleration in fullsteps of:
where “af” means acceleration in fullsteps
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 25
TMCM-342 Manual V1.01 25/26
Hz31.122070
3220482
1000MHz16
msf
1
Hz34.1907
2
31.122070
]Hz[fsf
6
s
MHz
21.119
2
1000)Mhz16(
a
2911
2
s
MHz
863.1
2
s
MHz
21.119
af
6
49.26
72
34.1907
rotationperfullsteps
fsf
RPS
46.1589
72
6034.1907
rotationperfullsteps
60fsf
RPM
Example:
f_CLK = 16 MHz velocity = 1000 a_max = 1000 pulse_div = 1 ramp_div = 1 usrs = 6
If the stepper motor has e.g. 72 fullsteps per rotation, the number of rotations of the motor is:
9 TMCL
TMCL, the TRINAMIC Motion Control Language, is described in a separate documentation, the TMCL Reference and Programming Manual. This manual is provided on the TMC TechLib CD and on the web site of TRINAMIC: www.trinamic.com. Please refer to these sources for updated data sheets and application notes.
The TMC TechLib CD-ROM including data sheets, application notes, schematics of evaluation boards, software of evaluation boards, source code examples, parameter calculation spreadsheets, tools, and more is available from TRINAMIC by request to info@trinamic.com
10 CANopen
The TMCM-342 module can also be used with the CANopen protocol. For this purpose, a special CANopen firmware has to be installed. To do this, download the latest version of the TMCM-342 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-342 module is then ready to be used with CANopen. Please see the CANopen manual provided on the Trinamic website and on the TechLibCD on how to use the TMCM-342 module with the CANopen protocol.
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Page 26
TMCM-342 Manual V1.01 26/26
Version
Date
Author
Description
1.00
14-May-2008
OK
Initial version
1.01
8-Dec-08
OK
Migration and CANopen chapters added
Version
Comment
Description
1.0
Initial release
First version of new generation TMCM-342
1.1
Actual version
Version
Comment
Description
4.07
Initial release
Please refer to TMCL documentation
4.15
Actual release
11 Revision History
11.1 Documentation Revision
Table 11.1: Documentation Revisions
11.2 Hardware Revision
Table 11.2: Hardware Revisions
11.3 Firmware Revision
Table 11.3: Firmware Revisions
12 References
[TMCL] TMCL manual (see http://www.trinamic.com)
[CANopen] CANopen manual (see http://www.trinamic.com)
Copyright © 2008, TRINAMIC Motion Control GmbH & Co. KG
Loading...