EVALUATION FOR ICs EVALUATION BOARD Firmware Version V1.09 TMC429+TMC24x EVALUATIN BOARD MANUAL + + TMC429+TMC24x-EVAL Evaluation Board for TMC429 Motion Controller and TMC246, TMC248, and TMC249 Stepper Motor Driver ICs for Two Phase Stepper Motors Up to 3x 2.8A RMS/ +10V… 24V DC USB Control/ SPI Access to Chips 2x Ref. Switch Input per Axis + UNIQUE FEATURE TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany + TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 2 TABLE OF CONTENTS 1 2 3 4 5 6 7 8 9 Features........................................................................................................................................................................... 3 1.1 Characteristics of TMC429 Motion Controller .............................................................................................. 4 1.2 Characteristics of Stepper Motor Driver ICs ................................................................................................ 4 1.2.1 TMC246 ............................................................................................................................................................. 4 1.2.2 TMC248 ............................................................................................................................................................. 4 1.2.3 TMC249 ............................................................................................................................................................. 4 Order Codes ................................................................................................................................................................... 4 Hardware ........................................................................................................................................................................ 5 3.1 Mechanical and Electrical Interfacing ............................................................................................................ 5 3.1.1 Size of the TMC429+TMC24x-EVAL and Mounting Holes ..................................................................... 5 3.1.2 Connectors....................................................................................................................................................... 6 3.1.3 Jumper ............................................................................................................................................................ 10 3.1.4 Keys ................................................................................................................................................................. 13 3.1.5 LEDs ................................................................................................................................................................. 14 3.1.6 Test Points ..................................................................................................................................................... 15 Operational Ratings ................................................................................................................................................... 17 Getting Started – How to Connect the Board ................................................................................................... 18 5.1 Getting Started with up to Three Motors .................................................................................................. 19 Evaluation Software .................................................................................................................................................. 20 6.1 The Main Window ............................................................................................................................................. 20 6.1.1 Examples ........................................................................................................................................................ 21 6.2 Graphic Display .................................................................................................................................................. 23 6.3 TMC429 Register Dialog ................................................................................................................................... 24 6.3.1 Motor 1, Motor 2, and Motor 3 ............................................................................................................... 24 6.3.2 TMC429 Global Parameters ....................................................................................................................... 25 6.3.3 RAM Table ...................................................................................................................................................... 26 6.3.4 TMC429 Specials Dialog: Interrupts and Reversing Switches ........................................................ 27 6.4 The stallGuard Dialog ....................................................................................................................................... 28 6.5 Board Settings Dialog ...................................................................................................................................... 29 6.6 Logging Dialog ................................................................................................................................................... 30 TMC429 Parameter Calculation Tool ..................................................................................................................... 31 Life Support Policy ..................................................................................................................................................... 32 Revision History .......................................................................................................................................................... 33 9.1 Document Revision ........................................................................................................................................... 33 www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 1 3 Features The TMC429+TMC24x evaluation board is designed for evaluating all features of the TMC429 motion controller in combination with three SPI interface stepper motor driver chips (TMC246, TMC248, and TMC249). The STM32F ARM Cortex-M3 microcontroller is used to control the TMC429 and the communication. A software running under Windows enables access to all registers and functions of the TMC429 from a PC. Furthermore, some basic functionality can be tested/controlled by keys on the evaluation board. MAIN CHARACTERISTICS Application - Evaluation of all features of the TMC429 controlling the TMC246, TMC248, and TMC249 motor driver chips TMC429 Motion Controller Motion profile calculation in real-time On the fly alteration of motor parameters (e.g. position, velocity, acceleration) TMC246, TMC428, and TMC249 Motor Drivers - TMC246, TMC248, and TMC249 SPI stepper motor drivers with stallGuard™ feature - 16 times microstepping via SPI - Mixed decay feature for smooth motor operation - TMC246 comes with integrated power transistors - TMC248 and TMC249 use external MOSFETs Electrical Data - Supply voltage: +10… +24V DC operating voltage - Motor 1 is driven by the TMC246 stepper motor driver. The maximum motor current is 1A RMS (1.5A peak). - Motor 2 is driven by the TMC248 stepper motor driver with external power transistors. The maximum motor current of this driver chip on the evaluation board is 2.3A RMS (3.3A peak). - Motor 3 is driven by the TMC249 stepper motor driver with external power transistors. The maximum motor current of this driver chip on the evaluation board is 2.3A RMS (3.3A peak). Interfaces - USB (type B) - Native SPI of the TMC429 - 2x reference switch input per axis Safety Features - Overcurrent - Short to GND - Undervoltage protection - Integrated Diagnostics Software - PC demonstration software allowing access to all registers - TMC429 parameter calculation tool www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 1.1 4 Characteristics of TMC429 Motion Controller The TMC429 is a miniaturized high performance stepper motor controller. It is designed for high volume automotive as well as for demanding industrial motion control applications. Once initialized the TMC429 controls up to three 2-phase stepper motors simultaneously. The chip is equipped with an SPI host interface with easy-to-use protocol and two driver interfaces (SPI and STEP/DIR) for addressing various stepper motor driver types. On the TMC429+TMC24x-EVAL board, the SPI driver interface is used to control the stepper motor driver chips. 1.2 Characteristics of Stepper Motor Driver ICs The three stepper motor drivers on the evaluation board use different setups in order to allow testing different modes of operation and different schematic setups. 1.2.1 TMC246 This driver operates in a standard SPI setup providing up to 1A RMS current and can be tested using a standard 1A stepper motor. In case it is desired to operate motors with less current, e.g. below 500mA RMS current, it may be desired to exchange the current sense resistors against higher values. This way, the microstep resolution is not decreased due to scaling down motor current. 1.2.2 TMC248 This TMC248 operates in a standard SPI setup, too. The driver features an additional PWM current control for fine current setting. It provides from a few 100mA RMS up to 2.3A RMS current and can be tested using a standard 1A, 2A or 3A stepper motor. For a 3A stepper motor, it might be desired to use a lower sense resistor value, in order to provide the maximum full current. Be careful to match driver current setting to the motor before operating. 1.2.3 TMC249 The TMC249 operates in a standard SPI setup as well. As a default the driver provides up to 2.3A RMS current and can be tested using a standard 1A, 2A or 3A stepper motor. For a 3A stepper motor, it might be desired to use a lower sense resistor value, in order to provide the maximum full current. Be careful to match driver current setting to the motor before operating. In case it is desired to operate motors with less current, e.g. below 1A RMS current, it may be useful to exchange the current sense resistors against higher values. This way, the microstep resolution is not decreased due to scaling down motor current. The setup of the TMC249 schematic provides the option to operate this driver in a non-SPI standalone mode, using an external 0-3V source for analog phase current control and digital phase polarity and decay control signals. In this mode, the on-board motion-controller TMC429 and the microcontroller is disconnected from this driver. Please refer to the specific datasheets (see www.trinamic.com) for detailed information! 2 Order Codes Size of unit [mm3] Order code Description TMC429+TMC24x-EVAL Evaluation board for TMC429, TMC246, TMC248, and 134 x 82 x 11,5 TMC249. Table 2.1 Order codes www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 5 3 Hardware Attention See also the schematics of the evaluation board (supplied as PDF files on www.trinamic.com) for a better understanding of this description. 3.1 Mechanical and Electrical Interfacing 3.1.1 Size of the TMC429+TMC24x-EVAL and Mounting Holes The board dimensions are 134mm x 82mm without mating connectors. Maximum component height (height above PCB level) without mating connectors is 11.5mm. There are four mounting holes suitable for M3 screws. 134 130.5 3.5 82 78.5 Ø3.2 3.5 Figure 3.1 TMC429+TMC24x-EVAL dimensions www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 6 3.1.2 Connectors Ref. Switches 1 Motor 0 Motor 1 1 TMC249 Analog In 1 1 Motor 3 1 SPI_IN 1 SPI_OUT 1 USB 1 Power Figure 3.2 Connectors of TMC429+TMC24x-EVAL CONNECTORS OF TMC429+TMC24X-EVAL Label (KEY) Connector type RIA 330-02, 2 pol., 5mm pitch, shrouded Power header (X603) locking pitch, Mating connector type RIA 349-2, screw type terminal block, pluggable, centerline 5 mm / 0.197 inches, wire entry parallel to plug direction RIA 169-04, screw type terminal block, pluggable, centerline 3.5 mm / 0.138 inches, wire entry parallel to plug direction USB, type B, 4 pol., male Low profile socket connector, 16pol., DIN41651, 2.54mm pitch locking pitch, Low profile socket connector, 10pol., DIN41651, 2.54mm pitch locking pitch, Low profile socket connector, 10pol., DIN41651, 2.54mm pitch locking pitch, Low profile socket connector, 10pol., DIN41651, 2.54mm pitch RIA 182-04, 4 pol. 3.5mm pitch, header Motor 1… 3 (X302/X406/X501) USB (J101) Ref. Switches (J204) Analog_IN only TMC249 (J502) SPI_IN (J205) SPI_OUT (J206) USB, type B, 4 pol., female Low profile box header without bar, 16 pol., DIN 41651, 2.54mm 0.64mm pin diameter Low profile box header without bar, 10 pol., DIN 41651, 2.54mm 0.64mm pin diameter Low profile box header without bar, 10 pol., DIN 41651, 2.54mm 0.64mm pin diameter Low profile box header without bar, 10 pol., DIN 41651, 2.54mm 0.64mm pin diameter Table 3.1 Connectors www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 7 3.1.2.1 Power Connector (X603) Pin 1 2 Label GND +UB Description Power supply and signal ground Operational voltage: +10… +24V DC (protected by onboard 24V suppressor diode) Table 3.2 Power connector 3.1.2.1.1 Digital Power Supply The digital operating voltages (3.3V for the microcontroller and 5V for all other parts) are generated onboard. 3.1.2.1.1.1 Connecting External Digital Components For external add-on boards a +5V supply is provided. In case it is desired to evaluate the TMC429 in a +3.3V environment, replace the R601 30KΩ resistor with a 16KΩ resistor and bridge pin 3 and pin 2 of the IC603 voltage regulator. Now, the regulator provides 3.3V instead of 5V for all digital parts. 3.1.2.2 Motor Connectors for Axis 1, 2, and 3 (X302/X406/X501) Motor 1 is driven by the TMC246 (driver with internal power transistors), motor 2 is driven by the TMC248, and motor 3 is driven by the TMC249. TMC248 and TMC249 have external MOSFETs. Pin 1 2 3 4 Label OB2 OB1 OA2 OA1 Description Pin 2 of motor Pin 1 of motor Pin 2 of motor Pin 1 of motor coil coil coil coil B B A A Table 3.3 Motor connector OB2 OB1 OA2 M OA1 Figure 3.3 How to connect a stepper motor 3.1.2.3 Reference Switch Connector (J204) Pin 1 2 Label GND GND 3 REF1_L 4 +5V 5 REF1_R 6 7 8 9 10 11 12 13 14 15 16 +5V REF2_L +5V REF2_R +5V REF3_L +5V REF3_R +5V GND GND Description System and module ground System and module ground Left stop switch input for motor 1 (Note: the key REF 1L on the circuit board is already connected.) +5V output Right stop switch input for motor 1 (Note: the key REF 1R on the circuit board is already connected.) +5V output Left stop switch input for motor 2 +5V output Right stop switch input for motor 2 +5V output Left stop switch input for motor 3 +5V output Right stop switch input for motor 3 +5V output System and module ground System and module ground Table 3.4 Reference switch connector www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 8 3.1.2.4 USB Connector (J101) Pin Label 1 +5V 2 3 4 USBUSB+ GND Description Board is self-powered – just used to detect availability of attached host system (e.g. PC) Differential USB bus Differential USB bus System and module ground Table 3.5 USB connector 3.1.2.5 SPI IN Connector (J205) For connecting an external CPU to the TMC429 use the SPI IN connector. Before connecting the external CPU it is necessary to disable the CPU on the evaluation board. Therefore, plug a jumper at µC Disable (see chapter 3.1.3.1.1). Pin 1 2 3 4 Label SPI2_MISO /CS_EXT SPI2_MOSI GND 5 /CS_429 6 7 8 9 10 GND SPI2_SCK GND +UB +5V Description SPI serial data input of CPU and output of onboard TMC429. Chip select for external TMC429 (customer application board) SPI serial data output of CPU and input of onboard TMC429 System and module ground Chip select for internal TMC429 (allows control of the TMC429+TMC24x-EVAL by an external CPU) System and module ground SPI serial clock System and module ground Power supply voltage: +10… +24V DC (normally disconnected by R202) +5V output Table 3.6 SPI IN connector 3.1.2.6 SPI OUT Connector (J206) For connecting up to three external stepper motor driver ICs to the TMC429 motion controller use the SPI OUT connector. Therefore, select the external driver option with jumpers first (see chapter 3.1.3.1.2) Pin 1 2 3 4 5 6 7 8 9 10 Label SDI_S_D2 n.c. SDO_S_S1 GND /SCS_S_S2 GND SCK_S_D1 GND +UB +5V Description Serial data input from SPI stepper motor driver chain to TMC429 Serial data output of TMC429 to SPI stepper motor driver chain System and module ground SPI chip select signal of TMC429 to stepper motor driving chain System and module ground Serial data clock output to SPI stepper motor driver chain System and module ground Operational voltage: +10… +24V DC (normally disconnected by R203) +5V output Table 3.7 SPI OUT connector www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 9 3.1.2.7 TMC249 Analog Input Connector (J502) The TMC249 can be controlled by analog current control signals and digital phase signals. In this standalone mode, the SPI interface is disabled and the SPI input pins of the TMC249 have alternate functions as described in Table 3.8. The standalone mode has to be enabled on the evaluation board by plugging the specific jumpers below the TMC249 analog input connector (see chapter 3.1.3.4.3) Pin Label 1 2 3 4 5 6 7 8 9 GND SDI ANN INA GND CSN SCK INB GND 10 SDO Standalone mode name GND PHA MDAN INA GND PHB MDBN INB GND ERR Description System and module ground Polarity bridge A (low = current flow from output OA1 to OA2) Enable mixed decay for bridge A (low = enable) Analog current control phase A System and module ground Polarity bridge B (low = current flow from output OB1 to OB2) Enable mixed decay for bridge B (low = enable) Analog current control input phase B System and module ground Error output (high = overcurrent on any bridge, or over temperature). This pin is never tri-stated. Table 3.8 TMC249 analog input connector www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 10 3.1.3 Jumper 3.1.3.1 TMC429 Related Jumper Settings The TMC429 is connected with the onboard microcontroller and the onboard stepper motor driver ICs. TRINAMICs controller driver chains are proven, tested, and fit a wide range of motors and applications. In case it is desired to evaluate the TMC429 with your own customer specific driver board or with an external microcontroller, connections to the onboard components can be cut using jumpers. 3.1.3.1.1 µC Disable If this jumper is closed all functions of the microcontroller are disabled and its SPI interface enters a high impedance state. This allows external microcontrollers to be connected to the board. Thus, the TMC429 can be controlled by a different microcontroller. Connect your external microcontroller with SPI IN and SPI OUT connectors. Figure 3.4 µC disable 3.1.3.1.2 Driver Selection Per default, the onboard stepper motor driver chips are connected to the TMC429 as shown in Figure 3.5. In case an external customer specific stepper motor driver board should be tested, select EXT by plugging two jumpers on the left and middle pins. Figure 3.5 For external driver selection plug the jumpers on the left side. Here, the internal drivers are chosen. 3.1.3.2 TMC246 Related Jumper Settings The oscillator frequency can be chosen by jumpers. Note: there is no jumper selection for overvoltage protection because the integrated MOSFETs of the TMC246 are designed for a peak value of 40V, which is higher than supplied motor voltage on the evaluation board. 3.1.3.2.1 TMC246 Oscillator Frequency The oscillator frequency can be chosen by plugging a jumper on the OSZ pins or leaving them open. Jumper plugged no jumper Description 25KHz oscillator frequency 36KHz oscillator frequency Figure 3.6 Choose oscillator frequency by jumper. Here, 36KHz are set. Connect the OSZ pins for selecting 25KHz. www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 11 3.1.3.3 TMC248 Related Jumper Settings 3.1.3.3.1 TMC248 Oscillator Frequency The oscillator frequency can be chosen by plugging a jumper on both OSZ pins or leaving them open. Jumper plugged no jumper Description 25KHz oscillator frequency 36KHz oscillator frequency Figure 3.7 Choose oscillator frequency by jumper. Here, 36KHz are set. Connect the OSZ pins for selecting 25KHz. 3.1.3.3.2 TMC248 Overvoltage Protection To enable the overvoltage protection a jumper can be plugged on the OVD pins (see Figure 3.7). Because the evaluation board is limited to 26.5V DC peak supply voltage, this function is useful only for short time overvoltage shut down tests up to 28V. 3.1.3.3.3 TMC248 PWM (Pulse Width Modulation) Selection The processor uses a PWM to generate a voltage between 0 and 2V for the current control of the TMC248. This is important for the current setting of motor 2, which can be calibrated via software (see chapter 6.5). To enable the PWM selection via the processor and to set the motor current, three jumpers have to be plugged: - The analog input of the TMC248 has to be enabled by plugging a jumper on the ANALOG pins. The PWM selection of the processor has to be enabled by plugging two jumpers on the PWM pins. If all three jumpers are plugged, the PWM can be set using the evaluation board software. Figure 3.8 Enabling PWM selection with jumpers and choosing PWM values via software www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 12 3.1.3.4 TMC249 Related Jumper Settings 3.1.3.4.1 TMC249 Oscillator Frequency The oscillator frequency can be chosen by plugging a jumper on the OSZ pins or leaving them open. Jumper plugged no jumper Description 25KHz oscillator frequency 36KHz oscillator frequency Figure 3.9 Choose oscillator frequency by jumper. Here, 36KHz are set. Connect the OSZ pins for selecting 25KHz. 3.1.3.4.2 TMC249 Overvoltage Protection To enable the overvoltage protection a jumper can be plugged on the two OVD pins (see Figure 3.9). Because the evaluation board is limited to 26.5V DC peak supply voltage, this does only make sense for short time overvoltage shut down tests up to 28V. 3.1.3.4.3 TMC249 SPI or Analog Control The TMC249 can be controlled by analog current control signals and digital phase signals. Please refer to the TMC429 datasheet for details. In this standalone mode, the SPI interface is disabled and the SPI input pins of the TMC249 have alternate functions as described in chapter 3.1.2.7. Normally, the jumper setting of the TMC429+TMC24x-EVAL selects SPI mode. If analog control should be used, the jumpers have to be plugged differently. The inscription on the circuit board shows how to place the jumpers for the analog (standalone) mode. Figure 3.10 Jumper setting for SPI control or analog control www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 13 3.1.4 Keys The evaluation board offers five keys: - REF 1L (hard wired to TMC429 REF1L input) - REF 1R (hard wired to TMC429 REF1R input) - MOVE 1 (firmware defined) - MOVE 2 (firmware defined) - STOP (firmware defined) The keys allow a simple standalone test of the basic funcitons. Figure 3.11 Keys 3.1.4.1 Reference Switches for Motor 1 The keys REF 1L and REF 1R are push buttons. As long as one of these buttons is pushed, the related reference switch of motor 1 is active. Label REF 1L REF 1R Description This push button can be used for motor 1. The left reference switch is active as long as the button is pushed. It is connected to pin 1 (REF1) of the TMC429 (using a multiplexer). This push button can be used for motor 1. The right reference switch is active as long as the button is pushed. It is connected to pin 1 (REF1) of the TMC429 (using a multiplexer). Table 3.9 Reference switches for motor 1 Reference switches for motor 2 and motor 3 can be connected using the reference switch connector. 3.1.4.2 MOVE 1 and MOVE 2 These keys are programmed in a way that the motor accelerates as long as one of it is pressed. If the button (e.g. MOVE 1) is not pushed any more, the connected motor will rotate constantly with the reached velocity. For further acceleration the same key can be pushed as often and as long as the velocity limit 2047 will be reached. For deceleration, the other key (e.g. MOVE 2) has to be used. It is possible to decelerate the motor to a velocity of 0 and accelerate it in the opposite direction by pressing the key constantly. A further possibility is decelerating the motor in increments. If the key for deceleration is not pushed any more, the motor will rotate constantly in the reached velocity. If the STOP key is pressed, all connected motors stop immediately with a hard stop. Label MOVE 1 MOVE 2 Description Push this key to move one or more motors decreasing the position counter. Push this key to move one or more motors increasing the position counter. Table 3.10 MOVE 1 and MOVE 2 keys on the circuit board www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 14 3.1.5 LEDs The evaluation board has three LEDs. LED1 near the power supply indicates that the +5V digital supply is available. LED2 and LED3 are connected to the TMC246. LED2 lights up as long as motor 1 rotates decreasing the position counter. LED3 lights up if the motor rotates increasing the position counter. Note The push buttons MOVE 1 and MOVE 2 can also be used to move the other motors. But in case motor 2 and/or motor 3 rotate, there will be no LED signals, because the TMC248 and TMC249 are not connected to LED2 and LED3. LEDS OF EVALUATION BOARD Label LED1 LED2 LED3 Color green green green Description Indicates, if +5V digital power supply is available. This LED lights up if motor 1 rotates decreasing the position counter. This LED lights up if motor 1 rotates increasing the position counter. Table 3.11 LEDs LED 1 Figure 3.12 LEDs www.trinamic.com LED 2 LED 2 TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 15 3.1.6 Test Points TEST POINTS RELATED TO TMC246 Label GND VS VT SRA SRB OSZ EN Description Digital and power ground. Use for oscilloscope. Supply voltage Short to GND detection comparator. Bridge A sense resistor voltage Bridge B sense resistor voltage Oscillator frequency. The frequency can be chosen with jumpers. Driver enable of CPU Table 3.12 TMC246 test points TEST POINTS RELATED TO TMC248 Every pin of the TMC248 driver chip can be accessed here. Pin Label Description 1 AGND Analog ground (reference for SRA, SRB, OSC, SLP, INA, INB, SLP) 2 ANN Enable analog current control via INA and INB (low active) 3 HA1 Output for high side P-channel transistors 4 HA2 Output for high side P-channel transistors 5 LA1 Output for low side N-channel transistors 6 LA2 Output for low side N-channel transistors 7 SRA Bridge A current sense resistor input 8 OSC Oscillator capacitor or external clock input for chopper 9 SDO Data output of SPI interface (tri-state) 10 SDI Data input of SPI interface 11 SCK Serial clock input of SPI interface 12 CSN Chip select input of SPI interface 13 ENN Device enable (low active) and overvoltage shutdown input 14 SPE Enable SPI mode (high active). 15 BL1 Digital blank time select 16 SRB Bridge B current sense resistor input 17 LB2 Output for low side N-channel transistors 18 LB1 Output for low side N-channel transistors 19 HB2 Output for high side P-channel transistors 20 HB1 Output for high side P-channel transistors 21 BL2 Digital blank time select 22 VT Short to GND detection comparator 23 VS Motor supply voltage 24 GND Digital and power GND 25 VCC 3.0… 5.5V supply voltage for analog and logic circuits 26 INB Analog current control phase B 27 INA Analog current control phase A 28 SLP Slope control resistor. Tie to GND for fastest slope Table 3.13 TMC248 test points TEST POINTS RELATED TO TMC249 Label GND VS VT SRA SRB OSZ EN Description Digital and power ground. Use for oscilloscope. Supply voltage Short to GND detection comparator. Compare VS to VT to evaluate, weather the power supply is near short to GND. Bridge A sense resistor voltage Bridge B sense resistor voltage Oscillator frequency. The frequency can be chosen with jumpers. Driver enable of CPU Table 3.14 TMC249 test points www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 16 3.1.6.1 VS compared to VT To evaluate whether the power supply VS is near short to GND, compare VS to VT using two oscilloscope channels. 3.1.6.2 Current Sense Resistor Inputs (SRA and SRB) The screenshots in this chapter show typical microstep waves and chopper cycles measured on the pins SRA and SRB. The area between the white broken line and the white line marked with a red 2 corresponds to one microstep. The chopper cycles of the two phases are nearly the same, but shifted. Figure 3.13 Oscilloscope screen shot: microsteps Figure 3.14 Oscilloscope screen shot: chopper cycles www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 17 4 Operational Ratings The operational ratings shown below should be used as design values. The maximum power supply current depends on the used motors and the supply voltage. Do not exceed the maximum values during operation! Otherwise the MOSFETs or the suppressor diode may be damaged! Symbol VCC VCCIO +5V ISUPPLY TENV Parameter Power supply voltage for operation Min Max Unit ) 12-24 26.5* V Digital power supply (for external microcontroller) 5 5.1 V Output of internal switch regulator 5 5.1 V 4 A Power supply current Environment temperature at rated current (no forced cooling required) 7 Typ 1.4 20°C °C Table 4.1 General operational ratings of the module *) The TMC429+TMC24x-EVAL is equipped with a SMBJ24A +24V DC suppressor diode, that limits the operation voltage range. For short time overvoltage shut down tests up to 28V can be applied. www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 18 5 Getting Started – How to Connect the Board YOU NEED PRECAUTIONS - Evaluation board - Up to three stepper motors (motor current: 1… 3A RMS) - USB interface - Power supply +12… 24V DC, at least 1.5A recommended - TMC429+TMC24x-EVAL software and PC - Cables for interface, motor, and power - Do not mix up connections or short-circuit pins. - Avoid bounding I/O wires with motor wires. - Do not exceed the maximum power supply of +26.5V DC! - DO NOT CONNECT OR DISCONNECT THE MOTORS WHILE POWERED! - START WITH POWER SUPPLY OFF! - CONNECT POWER SUPPLY GND FIRST TO AVOID SUPPLY CURRENT FLOWING BACK VIA USB CABLE. Stepper Motor 1 1 1 1 1 Ref. Switches Motor 1 Serial USB interface Motor 2 Analog Motor 3 SPI IN 1 SPI OUT 1 USB Power 1 Power supply Pin 1 GND Pin 2 +10V… 24V DC Figure 5.1 Getting started STARTING UP 1. 2. 3. 4. 5. 6. 7. 8. 9. Connect the USB interface. Read the information about motor default settings in chapter 5.1. Connect one or more motors. Connect the power supply of the evaluation board. Turn power ON. The green LED near the power supply lights up. The motor is powered but in standstill now. If this does not occur, turn power OFF. Check your connections and power supply! Now, the keys on the board can be used. Please refer to chapter 3.1.4 for further information. If you connect the USB the first time, you will be asked for the virtual com port configuration file that is required for configuration of a virtual com port for your evaluation board. For Windows systems use the TMC429+TMC24x-EVAL.inf configuration file (available on www.trinamic.com). Download the file TMC429+TMC2xx-EVAL.exe. Open it with a double click. Push the button Open. The board will be detected now. Start examinations with the PC software (refer to chapter 6). Figure 5.2 Interface dialogue of evaluation board software www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 5.1 19 Getting Started with up to Three Motors Before connecting one or more motors, note that every axis has own default settings. This is, because the three motor drivers use different setups in order to allow testing different modes of operation and different schematic setups. This way, various stepper motors can be examined easily. MOTOR 1 (UP TO 1A RMS) Motor 1 is driven by the TMC246 stepper motor driver. The maximum motor current of this driver chip is 1A RMS (1.5A peak) which is also the default value of the evaluation board. The default value for stand still is 125mA. Software settings: - TMC429 IS_VO: 1 (=1/8 current) - IS_AGTAT=IS_ALEAT=0 (=8/8 current) MOTOR 2 (UP TO 2.3A RMS) Motor 2 is driven by the TMC248 stepper motor driver with external power transistors. This driver provides a fine current control using µC PWM output. The maximum motor current of this driver chip is 2.3A RMS (3.3A peak). The software default setting for motor current is 1A RMS (1.5A peak). The default value for stand still is 500mA. Software settings: - PWM=111/256 current - TMC429 IS_VO: 4 (=4/8 current) - IS_AGTAT=IS_ALEAT=0 (=8/8 current) MOTOR 3 (UP TO 2.3A RMS) Motor 3 is driven by the TMC249 stepper motor driver with external power transistors. The maximum motor current of this driver chip is 2.3A RMS (3.3A peak). The software default setting for motor current is 2.3A RMS (3.3A peak). The default value for stand still is 300mA. Software settings: - TMC429 IS_VO: 1 (=1/8 current) - IS_AGTAT=IS_ALEAT=0 (=8/8 current) www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 20 6 Evaluation Software The evaluation software TMC429+TMC2xx-EVAL.exe is intended for customers who design own PCBs with the TMC429 and/or one of the three motor driver chips. In order to understand the settings, the datasheets of the ICs need to be referenced. The software is designed for adjusting and testing all settings by allowing direct register access. 6.1 The Main Window After starting the software the main window will open up (Figure 6.1). First, click the Open button. If the connection to the evaluation board is established successfully, the message The board is active will be displayed. If the message The board does not respond is displayed, please check the power supply and the connection to your PC again. The TMC429 status register is displayed in the TMC429 status bits section on the left side. Using the controls in the Motor 1, Motor 2 and Motor 3 sections, the motors can be run. Just enter all necessary parameters and click the appropriate Go button. You can stop a motor by clicking the appropriate Stop button. Use the buttons All Go and All Stop to run or stop all motors simultaneously. Figure 6.1 The main window www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 21 Proceed as follows to run a motor: - Select a ramp mode. - Fill in the other necessary parameters. - Start the motor or all motors. You will find an explanation of all parameters in the TMC429 data sheet. Figure 6.2 Ramp mode selection RAMP MODES PROVIDED BY TMC429 Mode ramp_mode soft_mode velocity_mode hold_mode Function Default mode for positioning applications with trapezoidal ramp. This mode is provided as default mode for positioning tasks. Similar to ramp_mode, but with soft target position approaching. The target position is approached with exponentially reduced velocity. This feature can be useful for applications where vibrations at the target position have to be minimized. Mode for velocity control applications, change of velocities with linear ramps. This mode is for applications, where stepper motors have to be driven precisely with constant velocity. The velocity is controlled by the microcontroller, motion parameter limits are ignored. This mode is provided for motion control applications, where the ramp generation is completely controlled by the microcontroller. Table 6.1 TMC429 ramp modes 6.1.1 Examples In this example it is assumed that a motor is connected to the MOTOR1 connector. First, set the ramp mode of motor 1 to RAMP. Then enter the following parameters: - Target Position: Vmin: Vmax: Max Accel.: 100000 1 500 150 Click the Go button. Now, the motor will be running until position 100000 is reached. After that, enter zero as Target Position and click the Go button again. The motor will run back to position zero. You can also try to change the position on the fly whilst the motor is running. Just enter a different position, click the Go button and see how the motor reacts. Also open the graphics window (Chapter 6.2) and watch the ramps. Now try the other ramp modes. Figure 6.3 Example: positioning of motor 1 in RAMP mode In RAMP and SOFTMODE the Vmin parameter must not be zero because otherwise the target position sometimes cannot be reached. Some other parameters which are not displayed in the main window are calculated and set up automatically according to the acceleration parameter. www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 22 When using VELOCITY mode, you can enter the acceleration and the Vmax parameter. The motor is then accelerated to that velocity and keeps running constantly until you change the velocity and click the Go button again. The motor will then be accelerated or decelerated to the new velocity using the acceleration parameter you have entered. Figure 6.4 Example: motor 1 driven in VELOCITY mode If you set the ramp mode to HOLD, you can only enter the actual velocity parameter, click the Go button and control the velocity directly. Figure 6.5 Example: motor1 in HOLD mode www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 6.2 23 Graphic Display The graphic display window (Figure 6.6) shows the driving ramps of all the stepper motors. There is one tab for each motor. The following values are displayed: Green Red Blue Yellow actual position of the motor. actual velocity of the motor. The value is shown as an absolute value, so negative velocities will also be shown as positive values. actual acceleration, also shown as an absolute value. actual target velocity of the motor, also displayed as an absolute value. Please note that this is only a rough and not an exact diagram. Figure 6.6 graphic display window EXPLANATIONS The value Time interval [ms] shows the time between two pixels on the X axis. This value mainly depends on the performance of the PC and will be slower when the register window of the evaluation board software is open (the display then gets slower because more values are queried from the evaluation board). The scales of the Y axis are automatically adapted to fit the entire curves. The curves are also displayed one pixel against each other for a better view. If Stop when velocity = 0 is activated the display will be stopped when the velocities of all motors are zero. All curves are cleared by clicking the Clear display button. www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 6.3 24 TMC429 Register Dialog By clicking the TMC429 Registers button the register window opens and gives you access to every TMC429 register. This dialog contains six pages on which all registers are displayed sorted by functional blocks. Please read more about the registers in the TMC429 data sheet. Figure 6.7 The register window showing the Motor 1 page Click on the Graphics button to open the graphics window which displays the driving ramps of all motors. 6.3.1 Motor 1, Motor 2, and Motor 3 On the motor tabs, all registers belonging to the motors 1, 2, and 3 are displayed (Figure 6.7). In the Actual Values and Read Only Values sections, the contents of all readable registers are displayed. These values are updated permanently. To change the contents of a register, first click on its name in the Registers section. Then change the value in the appropriate edit field in the New Value section. You can also copy the actual values into the edit fields by clicking the Copy button. In the SPI Telegram section, the SPI telegram for setting the selected register to the desired value is shown. Click the Send SPI Telegram button to send it to the evaluation board, and the value will be set. Now, the new value is shown in the Actual Values section. www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 25 6.3.2 TMC429 Global Parameters This page (Figure 6.8) contains all the TMC429 global parameter registers. It is made up just like the motor register pages. The contents of the read only registers (including the reference switch flags) are shown in the Read Only section. In the Read/Write section all writable registers are displayed. In the Actual Values section the actual contents of the registers are shown and updated permanently. To change a register, select it in the Registers section and fill in the new value in the New Value section. Using the Copy button, you can copy the actual contents into the edit fields. In the SPI Telegram section, the SPI telegram for setting the selected register to the desired value is shown. Click the Send SPI Telegram button to send it to the evaluation board, and the value will be set. Figure 6.8 The register window showing the Global Parameters page www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 26 6.3.3 RAM Table On this tab (Figure 6.9), the internal configuration RAM of the TMC429 chip (which contains the driver configuration and the microstepping table) can be viewed and modified. Furthermore, any SPI data telegram can be entered and sent to the evaluation board and the response can be viewed. Figure 6.9 The register dialog showing the RAM Table tab Click the Read from RAM button to read the contents of the TMC429 RAM into the RAM editor. The progress bar below the RAM editor shows the reading progress. After that, the values can be modified. By clicking the Write to RAM button, the values will be written back to the TMC429 RAM, which is also shown by the progress bar. Use the Save to file function to save the contents of the RAM editor to a file and the Load from file function to read the file back into the RAM editor. The Microstep Shape function is used to calculate enhanced microstepping tables. To do this, first set the Sigma value to the desired value (any floating point number between –1 and +1). By clicking the Calculate button the new microstepping table will be written to the RAM editor only, and by clicking the Calculate & Write to RAM button, the values are not only written to the RAM editor, but also to the TMC429 microstepping RAM. The driver configuration bytes will not be modified by this process. In the SPI Direct section, any SPI telegram can be entered and sent to the TMC429 by clicking the Send button. The response sent from the TMC429 is then displayed below the Send button. www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 27 6.3.4 TMC429 Specials Dialog: Interrupts and Reversing Switches The TMC429 Specials tab of the TMC429 Register Set dialog is mainly designed for use with Step/Dir stepper motor driver ICs. With the SPI controller driver chain provided on the TMC429+TMC24x-EVAL a few special features can be used. Please ignore all input possibilities on the tab which are not for SPI operation. SETTING AND RESETTING INTERRUPTS For setting up a position compare interrupt and enabling it, the POS_COMP_429 and the POS_COMP_INT_429 registers can be used. Proceed as follows: 1. 2. 3. Choose the register IF_CONFIG_429 and then motor 1, motor 2, or motor 3. Click Send SPI Telegram. Choose the register POS_COMP_INT_429 and set ticks at MASK and INTERRUPT. Click Send SPI Telegram. Choose the register POS_COMP_429 and write a position value for the interrupt in the New Value field. Click Send SPI Telegram. Now, the interrupt flag will be set, if the chosen motor passes the interrupt position. To reset the interrupt flag, choose the register POS_COMP_INT_429 and send the SPI telegram again by just clicking Send SPI Telegram. INVERTING REFERENCE SWITCHES For inverting the reference switches of a motor choose the register IF_CONFIG_429 and set a tick at INV_REF. Further, motor 1, motor 2, or motor 3 has to be chosen. Thereafter, click Send SPI Telegram. Now, the reference switches for your chosen motor are inverted. Figure 6.10 TMC429 Special Features’ tab www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 6.4 28 The stallGuard Dialog Clicking the TMC24x stallGuard button opens the stallGuard window (Figure 6.11). Here, the stallGuard feature provided by the TMC246, TMC248, and the TMC249 can be explored. Figure 6.11 The stallGuard dialog. In this example motor 3 is not connected. For each motor driver chip there is a stallGuard display which shows the actual setting. Stall detection thresholds can be set with the slider on top of each display. If the load value shown by the red bar reaches the stall detection theshold, the motor will be stopped immediately. The error flags are shown by the blue LEDs. The abbreviations at the error flag LEDs have the following meanings: Error flag OC-A OC-B OL-A OL-B OC-HS UV OT-PW OT Description Overcurrent on phase A Overcurrent on phase B Open load on phase A Open load on phase B Overcurrent on high side Undervoltage Overtemperature prewarning Overtemperature Table 6.2 Stepper motor driver error flags www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 6.5 29 Board Settings Dialog Clicking the Board Settings button opens up the board settings window. This little dialog offers two very useful features. MOTOR DRIVERS SECTION Per default, all motor driver chips are enabled after starting the TMC429+TMC2xx-EVAL.exe evaluation software. In case you like to disconnect one or more motors maybe for a change or something else, click the Disable button first. Thereafter, all stepper motor drivers ICs are disabled. So, it is not necessary to turn off the power supply before disconnecting motors. Disconnecting motors while the board is powered leads to damage on the motor driver chips. To avoid this turn power off or click the Disable button on the Board Settings dialog first! PWM SECTION Here, the PWM current setting of the TMC248 can be chosen in a value range from 0 to 255. This way, the motor current for motor 2 can be set from 0 to 100% of the maximum value. Figure 6.12 Board settings dialog www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 30 Logging Dialog 6.6 The Logging dialog can be used to store values during motor rotation. Proceed as follows: 1. 2. 3. 4. 5. Click the button with three points on the right side of the window. Then, write in a file name and choose a storage location. Set a tick at Log for each motor you like to. Now, choose the specific parameters, each with a tick. Click Start logging. Now, the polled values are stored directly into a .csv file. Click Stop logging to end the polling. Now, all values can be read out using Excel. Excel opens up automatically after a double click at the stored file. In case it is desired to add further polled values to an existing file, tick Append to log file. Figure 6.13 Logging dialog Figure 6.14 Logged values shown in Excel www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 31 7 TMC429 Parameter Calculation Tool TRINAMIC offers the TMC429Calc.exe calculation tool for TMC429 parameter calculation on the TRINAMIC website www.trinamic.om. This program serves as a help to calculate the PMul and PDiv parameters (see the TMC429 datasheet for an exact explanation of these parameters). It can be run simply by double clicking the file TMC429Calc.exe. Figure 7.1 TMC429Calc program First, enter the parameters on the left side. After that, click the Calculate button and the values will be calculated and displayed on the right side of the window. www.trinamic.com TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 8 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 2013 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. All trademarks used are property of their respective owners. www.trinamic.com 32 TMC429+TMC24x-EVAL Manual (Rev2.00 / 2013-MAY-06) 9 33 Revision History 9.1 Document Revision Version Date SD – Sonja Dwersteg Author 1.00 2011-NOV-11 SD 2.00 2013-MAY-06 SD Table 9.1 Document revision www.trinamic.com Description Initial version, based on TMC428 Eval Kit 3.0 Manual (writers: LL, OK) Completely revised manual because of new hardware and firmware versions. TMC429 (successor of TMC428) and TMC248 are new on the evaluation board.