POWER DRIVER FOR STEPPER MOTORS INTEGRATED CIRCUITS TMC5062 DATASHEET Dual, cost-effective controller and driver for up to two 2-phase bipolar stepper motors. Integrated motion controller with SPI interface.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 2 APPLICATION EXAMPLES: HIGH FLEXIBILITY – MULTIPURPOSE USE The TMC5062 scores with power density, complete motion controlling features and integrated power stages. It offers a versatility that covers a wide spectrum of applications from battery systems up to embedded applications with 1.1A RMS motor current per coil. The small form factor keeps costs down and allows for miniaturized layouts.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 3 TABLE OF CONTENTS 1 PRINCIPLES OF OPERATION 1.1 1.2 1.3 1.4 1.5 KEY CONCEPTS 5 CONTROL INTERFACES 6 SOFTWARE 6 MOVING AND CONTROLLING THE MOTOR 7 PRECISION DRIVER WITH PROGRAMMABLE MICROSTEPPING WAVE 7 STALLGUARD2 – MECHANICAL LOAD SENSING 7 COOLSTEP – LOAD ADAPTIVE CURRENT CONTROL 7 DCSTEP – LOAD DEPENDENT SPEED CONTROL 8 ENCODER INTERFACES 8 1.6 1.7 1.8 1.9 2 PIN ASSIGNMENTS 2.1 2.2 3 PACKAGE OUTLINE SIGNAL DESCRIPTIONS SAMPLE CIRCUITS 3.1 3.2 3.3 3.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 21.4 22 PACKAGE MECHANICAL DATA 22.1 22.2 23 LAYOUT EXAMPLE DIMENSIONAL DRAWINGS PACKAGE CODES DISCLAIMER www.trinamic.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 1 5 Principles of Operation +VM F F oto tep m S l o o c r drive DRV_ENN TMC5062 Dual stepper motor driver / controller REFR1 REFL1 ref. / stop switches (motor 1) reference switch processing VCP CPI 100n charge pump CPO VSA 5V Voltage regulator 5VOUT 100n M VCC 4.7µ CSN/IO0 SCK/IO1 SDI/IO2 SDO/IO3 SPI™ interface selection SPI interface ce terfa InSingle wire SW_SEL interface F single wire UART SWIOP F SWION F Diff.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 6 In addition to these performance enhancements, TRINAMIC motor drivers also offer safeguards to detect and protect against shorted outputs, output open-circuit, overtemperature, and undervoltage conditions for enhancing safety and recovery from equipment malfunctions. 1.2 Control Interfaces The TMC5062 supports both, an SPI and a UART based single wire interface with CRC checking.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 7 1.4 Moving and Controlling the Motor 1.4.1 Integrated Motion Controller The integrated 32 bit motion controller automatically drives the motors to target positions, or accelerates to target velocities. All motion parameters can be changed on the fly. The motion controller recalculates immediately. A minimum set of configuration data consists of acceleration and deceleration values and the maximum motion velocity.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 8 0,9 Efficiency with coolStep 0,8 Efficiency with 50% torque reserve 0,7 0,6 0,5 Efficiency 0,4 0,3 0,2 0,1 0 0 50 100 150 200 250 300 350 Velocity [RPM] Figure 1.2 Energy efficiency with coolStep (example) 1.8 dcStep – Load Dependent Speed Control dcStep allows the motor to run near its load limit and at its velocity limit without losing a step.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 2 9 Pin Assignments TST_MODE O1A1 BR1A O1A2 VS GNDP VS O1B1 BR1B O1B2 - VCP 48 47 46 45 44 43 42 41 40 39 38 37 2.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) Pin VCC Number 33 Type DIE_PAD - GND 10 Function 5V supply input for digital circuitry within chip and charge pump. Attach 470nF capacitor to GND (GND plane). May be supplied by 5VOUT. A 2.2Ω resistor is recommended for decoupling noise from 5VOUT. When using an external supply, make sure, that VCC comes up before or in parallel to 5VOUT. Connect the exposed die pad to a GND plane. Provide as many as possible vias for heat transfer to GND plane. Table 2.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) Pin O2A1 BR2A Number 14 15 Type O (VS) O2A2 VS 16 17, 19 O (VS) GNDP O2B1 BR2B 18 20 21 GND O (VS) O2B2 O1B2 BR1B 22 39 40 O (VS) O (VS) O1B1 VS 41 42, 44 O (VS) GNDP O1A2 BR1A 43 45 46 GND O (VS) O1A1 47 O (VS) Table 2.4 Power driver pins www.trinamic.com 11 Function Motor 2 coil A output 1 Sense resistor connection for motor 2 coil A. Place sense resistor to GND near pin. Motor 2 coil A output 2 Motor supply voltage.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 3 12 Sample Circuits The sample circuits show the connection of the external components in different operation and supply modes. The connection of the bus interface and further digital signals is left out for clarity. REFR1 CPO CPI 22n REFL1 3.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 13 3.1.1 VCC_IO Requirements For a reliable start-up it is essential that VCC_IO comes up to a minimum of 1.5V before the TMC5062 leaves the reset condition. The reset condition ends earliest 50µs after the time when VSA exceeds its undervoltage threshold of typically 4.2V, or when 5VOUT exceeds its undervoltage threshold of typically 3.5V, whichever comes last.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 14 REFR1 REFL1 CPI 22n CPO 3.2 5 V Only Supply +5V VS +5V 100n O1A1 Full Bridge A 5V Voltage regulator 5VOUT 4.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 15 3.3 External VCC Supply Supplying VCC from an external supply is advised, when cooling of the chip is critical, e.g. at high environment temperatures in combination with high supply voltages (20 V), as the linear regulator is a major source of on-chip power dissipation. It must be made sure that the external VCC supply comes up before or synchronously with the 5VOUT supply, because otherwise the power-up reset event may be missed by the TMC5062.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 16 3.4 Optimizing Analog Precision CPI 22n CPO The 5VOUT pin is used as an analog reference for operation of the TMC5062. Performance will degrade when there is voltage ripple on this pin. Most of the high frequency ripple in a TMC5062 design results from the operation of the internal digital logic. The digital logic switches with each edge of the clock signal.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 17 3.5 Driver Protection and EME Circuitry Some applications have to cope with ESD events caused by motor operation or external influence. Despite ESD circuitry within the driver chips, ESD events occurring during operation can cause a reset or even a destruction of the motor driver, depending on their energy. Especially plastic housings and belt drive systems tend to cause ESD events.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 4 18 SPI Interface 4.1 SPI Datagram Structure The TMC5062 uses 40 bit SPI™ (Serial Peripheral Interface, SPI is Trademark of Motorola) datagrams for communication with a microcontroller. Microcontrollers which are equipped with hardware SPI are typically able to communicate using integer multiples of 8 bit. The NCS line of the TMC5062 must be handled in a way, that it stays active (low) for the complete duration of the datagram transmission.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 19 Example: For a read access to the register (XACTUAL) with the address 0x21, the address byte has to be set to 0x21 in the access preceding the read access. For a write access to the register (VMAX), the address byte has to be set to 0x80 + 0x27 = 0xA7. For read access, the data bit might have any value (-). So, one can set them to 0.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 20 4.3 Timing The SPI interface is synchronized to the internal system clock, which limits the SPI bus clock SCK to half of the system clock frequency. If the system clock is based on the on-chip oscillator, an additional 10% safety margin must be used to ensure reliable data transmission. All SPI inputs as well as the ENN input are internally filtered to avoid triggering on pulses shorter than 20ns. Figure 4.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 5 21 UART Single Wire Interface The UART single wire interface allows the control of the TMC5062 with any microcontroller UART. It shares transmit and receive line like an RS485 based interface. Data transmission is secured using a cyclic redundancy check, so that increased interface distances (e.g. over cables between two PCBs) can be bridged without the danger of wrong or missed commands even in the event of electro-magnetic disturbance.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 5.1.2 22 Read Access TMC5062 UART READ ACCESS REQUEST DATAGRAM STRUCTURE each byte is LSB…MSB, highest byte transmitted first RW + 7 bit register address 16...23 crc 23 0 … 8...15 register address CRC 15 16 0 1 2 3 4 5 6 7 8 0...7 1 0 1 0 0 0 0 0 … synchronization The read access request datagram structure is identical to the write access datagram structure, but uses a lower number of user bits.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 23 5.2 CRC Calculation An 8 bit CRC polynomial is used for checking both read and write access. It allows detection of up to eight single bit errors. The CRC8-ATM polynomial with an initial value of zero is applied LSB to MSB, including the sync- and register addressing byte. The synchronization byte is assumed to always be correct. The TMC5062 responds only to correctly transmitted datagrams.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 24 5.3 UART Signals The UART interface on the TMC5062 has two signals: TMC5062 UART INTERFACE SIGNALS SWIOP Non-inverted data input and output SWION Inverted data input and output for use in differential transmission. Can be left open in a 5V IO voltage system. Tie to the half IO level voltage for best performance. In UART mode the slave checks the serial wire SWIOP and SWION for correctly received datagrams continuously.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 6 25 Register Mapping This chapter gives an overview of the complete register set. Some of the registers bundling a number of single bits are detailed in extra tables. The functional practical application of the settings is detailed in dedicated chapters. Note - All registers become reset to 0 upon power up, unless otherwise noted.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 26 6.1 General Configuration Registers GENERAL CONFIGURATION REGISTERS (0X00…0X1F) R/W Addr n RW 0x00 11 Register GCONF Description / bit names Bit GCONF – Global configuration flags 0..2 Reserved, set to 0 3 poscmp_enable 0: Encoder 1 A and B inputs are mapped. 1: Position compare pulse (PP) and interrupt output (INT) are available, Encoder 1 is unused.
TMC5062 DATASHEET (Rev. 1.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 28 6.2 Ramp Generator Registers Addresses Addr are specified for motor 1 (upper value) and motor 2 (second address). 6.2.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 29 RAMP GENERATOR MOTION CONTROL REGISTER SET (MOTOR 1: 0X20…0X2D, MOTOR 2: 0X40…0X4D) R/W Addr n Register Description / bit names Motor stop velocity (unsigned) W 0x2B 0x4B 18 VSTOP Attention: Set VSTOP ≥ VSTART! W 0x2C 0x4C 16 TZEROWAIT Attention: Do not set 0 in positioning mode. Waiting time after ramping down to zero velocity before next movement or direction inversion can start and before motor power down starts.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 6.2.2 30 Ramp Generator Driver Feature Control Register Set RAMP GENERATOR DRIVER FEATURE CONTROL REGISTER SET (MOTOR 1: 0X30…0X36, MOTOR 2: 0X50…0X56) R/W W Addr n 0x30 0x50 5 + 5 + 4 Register IHOLD_IRUN Description / bit names Bit IHOLD_IRUN – Driver current control 4..0 IHOLD Standstill current (0=1/32…31=32/32) 12..8 IRUN Motor run current (0=1/32…31=32/32) 19..
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 31 RAMP GENERATOR DRIVER FEATURE CONTROL REGISTER SET (MOTOR 1: 0X30…0X36, MOTOR 2: 0X50…0X56) R/W Addr n Register W 0x33 0x53 23 VDCMIN Description / bit names Automatic commutation dcStep becomes enabled above velocity VDCMIN (unsigned) In this mode, the actual position is determined by the sensorless motor commutation and becomes fed back to XACTUAL. In case the motor becomes heavily loaded, VDCMIN also is used as the minimum step velocity.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 32 6.2.2.1 SW_MODE – Reference Switch and stallGuard2 Event Configuration Register 0X34, 0X54: SW_MODE – REFERENCE SWITCH AND STALLGUARD2 EVENT CONFIGURATION REGISTER Bit 11 Name en_softstop Comment 0: Hard stop 1: Soft stop The soft stop mode always uses the deceleration ramp settings DMAX, V1, D1, VSTOP and TZEROWAIT for stopping the motor.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 33 6.2.2.2 RAMP_STAT – Ramp and Reference Switch Status Register 0X35, 0X55: RAMP_STAT – RAMP AND REFERENCE SWITCH STATUS REGISTER R/W R Bit 13 Name status_sg R+C 12 second_move R 11 R R 10 9 R 8 R+C 7 t_zerowait_ active vzero position_ reached velocity_ reached event_pos_ reached R+C 6 event_stop_ sg R 5 event_stop_r 4 event_stop_l 3 status_latch_r 2 status_latch_l 1 0 status_stop_r status_stop_l R+C R www.trinamic.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 34 6.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 35 6.2.2.3 ENCMODE – Encoder Register 0X38, 0X58: ENCMODE – ENCODER REGISTER Bit 10 Name enc_sel_decimal 9 latch_x_act 8 clr_enc_x 7 6 neg_edge pos_edge 5 clr_once 4 clr_cont 3 ignore_AB 2 1 0 pol_N pol_B pol_A www.trinamic.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 36 6.4 Motor Driver Registers MOTOR DRIVER REGISTER SET (MOTOR 1: 0X60…0X6F, MOTOR 2: 0X70…0X7F) R/W Addr n W 0x60 0x70 32 W W W 0x61 … 0x67 0x71 … 0x77 0x68 0x78 0x69 0x79 7 x 32 32 8 + 8 Register MSLUT1[0] MSLUT2[0] microstep table entries 0…31 MSLUT1[1...7] MSLUT2[1...
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) W 0x6E 0x7E 8 + 8 DCCTRL R 0x6F 0x7F 32 DRV_ STATUS dcStep (DC) automatic commutation configuration register: bit 7… 0: DC_TIME: Upper PWM on time limit for commutation (DC_TIME * 1/fCLK). Set slightly above effective blank time TBL. bit 15… 8: DC_SG: Max. PWM on time for step loss detection using dcStep stallGuard2 in dcStep mode.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 6.4.1 38 MSLUTSEL – Look up Table Segmentation Definition 0X68, 0X78: MSLUTSEL – LOOK UP TABLE SEGMENTATION DEFINITION Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Name X3 X2 Function LUT segment 3 start LUT segment 2 start Comment The sine wave look up table can be divided into up to four segments using an individual step width control entry Wx. The segment borders are selected by X1, X2 and X3.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 6.4.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 11 fd3 TFD [3] 10 hend3 9 hend2 8 hend1 HEND hysteresis low value OFFSET sine wave offset 7 hend0 chm=1: MSB of fast decay time setting TFD chm=0 %0000 … %1111: Hysteresis is -3, -2, -1, 0, 1, …, 12 (1/512 of this setting adds to current setting) This is the hysteresis value which becomes used for the hysteresis chopper. chm=1 6 hstrt2 5 hstrt1 4 hstrt0 HSTRT hysteresis start value added to HEND TFD [2..
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 6.4.3 41 COOLCONF – Smart Energy Control coolStep and stallGuard2 0X6D, 0X7D: COOLCONF – SMART ENERGY CONTROL COOLSTEP AND STALLGUARD2 Bit … 24 Name sfilt Function reserved stallGuard2 filter enable 23 22 21 20 19 18 17 16 15 sgt6 sgt5 sgt4 sgt3 sgt2 sgt1 sgt0 seimin reserved stallGuard2 threshold value 14 13 sedn1 sedn0 12 11 10 9 8 7 6 5 4 3 2 1 0 semax3 semax2 semax1 semax0 seup1 seup0 semin3 semin2 semin1 semin0 www.trinamic.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 6.4.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 7 43 Current Setting The internal 5 V supply voltage available at the pin 5VOUT is used as a reference for the coil current regulation based on the sense resistor voltage measurement. The desired maximum motor current is set by selecting an appropriate value for the sense resistor. The sense resistor voltage range can be selected by the vsense bit in CHOPCONF.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) Parameter IRUN IHOLD IHOLD DELAY vsense Description Current scale when motor is running. Scales coil current values as taken from the internal sine wave table. For high precision motor operation, work with a current scaling factor in the range 16 to 31, because scaling down the current values reduces the effective microstep resolution by making microsteps coarser. This setting also controls the maximum current value set by coolStep.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 8 45 Chopper Operation The currents through both motor coils are controlled using choppers. The choppers work independently of each other. In Figure 8.1 the different chopper phases are shown. +VM +VM +VM ICOIL ICOIL ICOIL RSENSE On Phase: current flows in direction of target current RSENSE Fast Decay Phase: current flows in opposite direction of target current RSENSE Slow Decay Phase: current re-circulation Figure 8.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 46 Three parameters are used for controlling both chopper modes: Parameter TOFF Description Setting Sets the slow decay time (off time). This setting also 0 limits the maximum chopper frequency. 1…15 0 Comment chopper off off time setting NCLK= 12 + 32*TOFF (1 will work with minimum blank time of 24 clocks) 16 tCLK 1 24 tCLK 2 36 tCLK 3 54 tCLK 0 1 spreadCycle classic const.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 47 100 to 400 fullsteps per second), a too low hysteresis setting will lead to increased humming and vibration of the motor. Figure 8.2 No ledges in current wave with sufficient hysteresis (magenta: current A, yellow & blue: sense resistor voltages A and B) A too high hysteresis setting will lead to reduced chopper frequency and increased chopper noise but will not yield any benefit for the wave shape.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) I target current + hysteresis start 48 HDEC target current + hysteresis end target current target current - hysteresis end target current - hysteresis start on sd fd sd t Figure 8.3 spreadCycle chopper scheme showing coil current during a chopper cycle Two parameters control spreadCycle mode: Parameter HSTRT Description Setting Hysteresis start setting. This value is an offset 0…7 from the hysteresis end value HEND.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 49 8.2 Classic 2-Phase Motor Constant Off Time Chopper The classic constant off time chopper is an alternative to spreadCycle. Perfectly tuned, it also gives good results. The classic constant off time chopper (automatically) is used in combination with fullstepping in dcStep operation. The classic constant off-time chopper uses a fixed-time fast decay following each on phase.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 50 Parameter TFD (fd3 & HSTRT) Description Setting Fast decay time setting. With CHM=1, these bits 0 control the portion of fast decay for each chopper 1…15 cycle. Comment slow decay only duration of fast decay phase OFFSET (HEND) Sine wave offset. With CHM=1, these bits control 0…2 the sine wave offset. A positive offset corrects for 3 zero crossing error.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 51 8.4 chopSync2 for Quiet Motors While a frequency adaptive chopper like spreadCycle provides excellent high velocity operation, in some applications, a constant frequency chopper is preferred rather than a frequency adaptive chopper. This may be due to chopper noise in motor standstill, or due to electro-magnetic emission. chopSync provides a means to synchronize the choppers for both coils with a common clock, by extending the off time of the coils.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 9 52 Driver Diagnostic Flags The TMC5062 drivers supply a complete set of diagnostic and protection capabilities, like short to GND protection and undervoltage detection. A detection of an open load condition allows testing if a motor coil connection is interrupted. See the DRV_STATUS table for details. 9.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 53 10 Ramp Generator The ramp generator allows motion based on target position or target velocity. It automatically calculates the optimum motion profile taking into account acceleration and velocity settings. The TMC5062 integrates a new type of ramp generator, which offers faster machine operation compared to the classical linear acceleration ramps.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 54 10.2 Motion Profiles For the ramp generator register set, please refer to the chapter 6.2. 10.2.1 Ramp Mode The ramp generator delivers two phase acceleration and two phase deceleration ramps with additional programmable start and stop velocities (see Figure 10.1). Note The start velocity can be set to zero, if not used. The stop velocity can be set to ten (or down to one), if not used. Take care to always set VSTOP identical to or above VSTART.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 55 torque high deceleration 2xMFRICT MNOM2 Torque for VSTART MNOM1 high acceleration Torque available for acceleration A1 VMAX Torque required for static loads V1 0 reduced accel. Torque available for AMAX VSTART MFRICT reduced decel. motor torque MMAX velocity [RPM] MFRICT Portion of torque required for friction and static load within the system MMAX Motor pull-out torque at v=0 MNOM1/2 Torque available at V1 resp.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 56 motor going to standby motor in standby motor stand still microstepping coolStep + DM AX microstep coolStep + microstep VSTOP VSTART 0 AX AM D1 VCOOLTHRS A1 V1 microstepping VHIGH motor in standby VMAX high velocity fullstep v t RMS current coolStep current reduction dI * IHOLDDELAY VACTUAL TZEROWAIT current I_RUN I_HOLD Figure 10.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 57 10.5 Reference Switches Prior to normal operation of the drive an absolute reference position must be set. The reference position can be found using a mechanical stop which can be detected by stall detection, or by a reference switch. In case of a linear drive, the mechanical motion range must not be left. This can be ensured also for abnormal situations by enabling the stop switch functions for the left and the right reference switch.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 5. 6. 58 by the read and clear (R+C) function, be sure to execute step 5 within the time range set by TZEROWAIT. Switch the ramp generator to hold mode and calculate the difference between the latched position and the actual position. For stallGuard based homing or when using hard stop, XACTUAL stops exactly at the home position, so there is no difference (0). Write the calculated difference into the actual position register. Now, homing is finished.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 4. 5. 59 Set AMAX to 65535 (0xFFFF) and set VMAX to zero to finally stop the motor. This will stop the motor within a few microseconds. Wait until the motor is actually stopped (vzero flag active) before starting a new motion. Remember to set AMAX back to the original value before starting the next motion. Step (3.) and (4.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 60 Optional Detection and Correction This option risks the occurrence of the error and detects and corrects it. The irregularity of the position counter can easily be detected by reading the counter twice whenever the motor is brought to standstill (VZERO flag set). In case, two subsequent read accesses of XACTUAL show a different result during standstill, the position is lost. Trigger a new homing sequence.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 61 11 stallGuard2 Load Measurement stallGuard2 provides an accurate measurement of the load on the motor. It can be used for stall detection as well as other uses at loads below those which stall the motor, such as coolStep loadadaptive current reduction. The stallGuard2 measurement value changes linearly over a wide range of load, velocity, and current settings, as shown in Figure 11.1. At maximum motor load, the value goes to zero or near to zero.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 62 11.1 Tuning the stallGuard2 Threshold SGT The stallGuard2 value SG is affected by motor-specific characteristics and application-specific demands on load and velocity. Therefore the easiest way to tune the stallGuard2 threshold SGT for a specific motor type and operating conditions is interactive tuning in the actual application. INITIAL PROCEDURE FOR TUNING STALLGUARD SGT 1. 2. 3. 4.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 63 11.1.1 Variable Velocity Operation The SGT setting chosen as a result of the previously described SGT tuning can be used for a certain velocity range. Outside this range, a stall may not be detected safely, and coolStep might not give the optimum result.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 64 11.2 stallGuard2 Update Rate and Filter The stallGuard2 measurement value SG is updated with each full step of the motor. This is enough to safely detect a stall, because a stall always means the loss of four full steps. In a practical application, especially when using coolStep, a more precise measurement might be more important than an update for each fullstep because the mechanical load never changes instantaneously from one step to the next.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 65 12 coolStep Operation coolStep is an automatic smart energy optimization for stepper motors based on the motor mechanical load, making them “green”. 12.
stallGuard2 reading mechanical load 66 motor current TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) current setting I_RUN (upper limit) motor current reduction area SEMAX+SEMIN+1 SEMIN ½ or ¼ I_RUN (lower limit) motor current increment area 0=maximum load load angle optimized Zeit slow current reduction due to reduced motor load load angle optimized current increment due to increased load stall possible load angle optimized Figure 12.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 67 12.3 Tuning coolStep Before tuning coolStep, first tune the stallGuard2 threshold level SGT, which affects the range of the load measurement value SG. coolStep uses SG to operate the motor near the optimum load angle of +90°. The current increment speed is specified in SEUP, and the current decrement speed is specified in SEDN. They can be tuned separately because they are triggered by different events that may need different responses.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 68 13 dcStep dcStep is an automatic commutation mode for the stepper motor. It allows the stepper to run with its target velocity as commanded by the ramp generator as long as it can cope with the load. In case the motor becomes overloaded, it slows down to a velocity, where the motor can still drive the load. This way, the stepper motor never stalls and can drive heavy loads as fast as possible.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 69 13.3 Enabling dcStep dcStep requires only a few settings. It directly feeds back motor motion to the ramp generator, so that it becomes seamlessly integrated into the motion ramp, even if the motor becomes overloaded with respect to the target velocity. dcStep operates the motor in fullstep mode at the ramp generator target velocity VACTUAL or at reduced velocity if the motor becomes overloaded. It requires setting the minimum operation velocity VDCMIN.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) Parameter vhighfs & vhighchm TOFF VDCMIN DC_TIME DC_SG Description These chopper configuration flags in CHOPCONF need to be set for dcStep operation. As soon as VDCMIN becomes exceeded, the chopper becomes switched to fullstepping. dcStep often benefits from an increased off time value in CHOPCONF. Settings >2 should be preferred. This is the lower threshold for dcStep operation. Below this threshold, the motor operates in normal microstep mode.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 71 14 Sine-Wave Look-up Table Each of the TMC5062 drivers provides a programmable look-up table for storing the microstep current wave. As a default, the tables are pre-programmed with a sine wave, which is a good starting point for most stepper motors. Reprogramming the table to a motor specific wave allows drastically improved microstepping especially with low-cost motors. 14.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 72 When the microstep sequencer advances within the table, it calculates the actual current values for the motor coils with each microstep and stores them to the registers CUR_A and CUR_B. However the incremental coding requires an absolute initialization, especially when the microstep table becomes modified. Therefore CUR_A and CUR_B become initialized whenever MSCNT passes zero.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 73 15 ABN Incremental Encoder Interface The TMC5062 is equipped with two incremental encoder interfaces for ABN encoders. The encoder inputs are multiplexed with other signals in order to keep the pin count of the device low. The basic selection of the peripheral configuration is set by the register GCONF.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 74 THE ENCODER COUNTER X_ENC The encoder counter X_ENC holds the current encoder position ready for read out. Different modes concerning handling of the signals A, B, and N take into account active low and active high signals found with different types of encoders. For more details please refer to the register mapping in section 6.3.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 75 allows increased positioning precision by positioning directly to encoder positions. The application can modify target positions based on the deviation, or even regularly update the actual position with the encoder position. www.trinamic.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 76 16 Quick Configuration Guide This guide is meant as a practical tool to come to a first configuration and do a minimum set of measurements and decisions for tuning the driver. It does not cover all advanced functionalities, but concentrates on the basic function set to make a motor run smoothly. Once the motor runs, you may decide to explore additional features, e.g. freewheeling and further functionality in more detail.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 77 MOVING THE MOTOR USING THE MOTION CONTROLLER Move Motor Move to Target Configure Ramp Parameters RAMPMODE set velocity_positive RAMPMODE set position Start Velocity Set VSTART=1. Higher velcoity for abrupt start (limited by motor). Set AMAX=1000, set VMAX=100000 or different values Configure ramp parameters Stop Velocity Set VSTOP=2, but not below VSTART. Higher velocity for abrupt stop.
TMC5062 DATASHEET (Rev. 1.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 79 SETTING UP DCSTEP Enable dcStep Configure dcStep Stall Detection CHOPCONF Make sure, that TOFF is not less than 3. Use lowest good TBL.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 80 17 Getting Started Please refer to the TMC5062 evaluation board to allow a quick start with the device, and in order to allow interactive tuning of the device setup in your application. Chapter 16 will guide you through the process of correctly setting up all registers. 17.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 81 18 Clock Oscillator and Clock Input The clock is the timing reference for all functions: the chopper, the velocity, the acceleration control, etc. Many parameters are scaled with the clock frequency, thus a precise reference allows a more deterministic result. The on-chip clock oscillator provides timing in case no external clock is easily available. 18.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 82 MHz should be sufficient for most applications. For reduced requirements concerning the motor dynamics, a clock frequency of down to 8 MHz can be considered. www.trinamic.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 83 19 Absolute Maximum Ratings The maximum ratings may not be exceeded under any circumstances. Operating the circuit at or near more than one maximum rating at a time for extended periods shall be avoided by application design.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 84 20.2 DC Characteristics and Timing Characteristics DC characteristics contain the spread of values guaranteed within the specified supply voltage range unless otherwise specified. Typical values represent the average value of all parts measured at +25°C. Temperature variation also causes stray to some values. A device with typical values will not leave Min/Max range within the full temperature range. Power supply current DC-Characteristics VVS = 16.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) Clock oscillator and input Timing-Characteristics Parameter Clock oscillator frequency Clock oscillator frequency Clock oscillator frequency External clock frequency (operating) External clock high / low level time Symbol fCLKOSC fCLKOSC fCLKOSC fCLK Conditions tJ=-50°C tJ=50°C tJ=150°C tCLKL/tCLKH CLK driven to 0.1 VVIO / 0.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 86 20.3 Thermal Characteristics The following table shall give an idea on the thermal resistance of the QFN-48 package. The thermal resistance for a four layer board will provide a good idea on a typical application. The single layer board example is kind of a worst case condition, as the typical application will require a 4 layer board. Actual thermal characteristics will depend on the PCB layout, PCB type and PCB size.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 87 21 Layout Considerations 21.1 Exposed Die Pad The TMC5062 uses its die attach pad to dissipate heat from the drivers and the linear regulator to the board. For best electrical and thermal performance, use a reasonable amount of solid, thermally conducting vias between the die attach pad and the ground plane. The printed circuit board should have a solid ground plane spreading heat into the board and providing for a stable GND reference. 21.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 88 21.4 Layout Example Schematic 1- Top Layer (assembly side) 2- Inner Layer (GND) 3- Inner Layer (supply VS) 4- Bottom Layer Components Figure 21.1 Layout example www.trinamic.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 89 22 Package Mechanical Data 22.1 Dimensional Drawings Attention: Drawings not to scale. Figure 22.1 Dimensional drawings Parameter [mm] total thickness stand off mold thickness lead frame thickness lead width body size X body size Y lead pitch exposed die pad size X exposed die pad size Y lead length package edge tolerance mold flatness coplanarity lead offset exposed pad offset Ref A A1 A2 A3 b D E e J K L aaa bbb ccc ddd eee Min 0.80 0.00 0.2 5.2 5.2 0.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 90 23 Disclaimer 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.
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 91 25 Table of Figures Figure 1.1 Basic application and block diagram .......................................................................................................... 5 Figure 1.2 Energy efficiency with coolStep (example) ............................................................................................... 8 Figure 2.1 TMC5062 pin assignments. ....................................................................................................
TMC5062 DATASHEET (Rev. 1.11 / 2017-MAY-16) 92 26 Revision History Version Date Author Description BD – Bernhard Dwersteg SD – Sonja Dwersteg 1.04 2012_NOV-14 BD 1.05 1.06 2012-DEC-11 2014-FEB-28 JP SD 1.07 2014-MAY-12 SD 1.08 1.09 2014-JUL-01 2015-MAR-23 BD BD 1.10 2016-APR-28 BD 1.11 2017-MAY-16 BD First version of product TMC5062 datasheet based on TMC562 prototype datasheet.