POWER DRIVER FOR STEPPER MOTORS INTEGRATED CIRCUITS TMC5031 DATASHEET Dual, cost-effective controller and driver for up to two 2-phase bipolar stepper motors. Integrated motion controller with SPI interface.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 2 APPLICATION EXAMPLES: HIGH FLEXIBILITY – MULTIPURPOSE USE The TMC5031 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 current per motor. The small form factor keeps costs down and allows for miniaturized layouts.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 3 TABLE OF CONTENTS 1 PRINCIPLES OF OPERATION 1.1 1.2 1.3 1.4 1.5 1.6 1.7 2 KEY CONCEPTS 4 SPI CONTROL INTERFACE 5 SOFTWARE 5 MOVING AND CONTROLLING THE MOTOR 5 PRECISION DRIVER WITH PROGRAMMABLE MICROSTEPPING WAVE 5 STALLGUARD2 – MECHANICAL LOAD SENSING 5 COOLSTEP – LOAD ADAPTIVE CURRENT CONTROL 6 PIN ASSIGNMENTS 2.1 2.2 3 PACKAGE OUTLINE SIGNAL DESCRIPTIONS SAMPLE CIRCUITS 3.1 3.2 3.3 3.4 3.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 1 4 Principles of Operation REFL1 REFR1 ref. / stop switches motor 1 +VM F tor p mo e t S l coo river d F reference switch processing VCP CPI 100n charge pump CPO VSA 5VOUT 100n 5V Voltage regulator VCC 4.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 1.2 5 SPI Control Interface The SPI interface is a bit-serial interface synchronous to a bus clock. For every bit sent from the bus master to the bus slave, another bit is sent simultaneously from the slave to the master. Communication between an SPI master and the TMC5031 slave always consists of sending one 40-bit command word and receiving one 40-bit status word. The SPI command rate typically is a few commands per complete motor motion. 1.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 1.7 6 coolStep – Load Adaptive Current Control coolStep drives the motor at the optimum current. It uses the stallGuard2 load measurement information to adjust the motor current to the minimum amount required in the actual load situation. This saves energy and keeps the components cool, making the drive an efficient and precise solution.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) Pin Assignments TST_MODE O1A1 BR1A O1A2 VS GNDP VS O1B1 BR1B O1B2 - VCP 47 46 45 44 43 42 41 40 39 38 37 Package Outline 48 2.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) Pin VCC Number 33 Type DIE_PAD - GND 8 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 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 9 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 3 10 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 CPI 22n REFL1 Standard Application Circuit CPO +VM +VM VS VSA 5VOUT 100n reference switch processing 100n O1A1 Full Bridge A 5V Voltage regulator 4.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 3.1.1 11 VCC_IO Requirements For a reliable start-up it is essential that VCC_IO comes up to a minimum of 1.5V before the TMC5031 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) REFR1 CPI 22n REFL1 5 V Only Supply CPO +5V VS +5V 100n VSA 5VOUT reference switch processing 100n O1A1 Full Bridge A 5V Voltage regulator 4.7µ O1A2 Controller 1 Driver 1 Full Bridge B N stepper motor #1 N stepper motor #2 O1B2 470n BR1A BR1B TMC5031 SPI interface S O1B1 VCC CSN SCK SDI SDO 100µF VS RS1A charge pump DRV_ENN VCP RS1B 3.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 3.3 13 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 (16 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 TMC5031.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 3.4 14 Optimizing Analog Precision CPI 22n CPO The 5VOUT pin is used as an analog reference for operation of the TMC5031. Performance will degrade when there is voltage ripple on this pin. Most of the high frequency ripple in a TMC5031 design results from the operation of the internal digital logic. The digital logic switches with each edge of the clock signal.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 3.5 15 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 4 16 SPI Interface 4.1 SPI Datagram Structure The TMC5031 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 TMC5031 must be handled in a way, that it stays active (low) for the complete duration of the datagram transmission.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 17 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 4.3 18 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 5 19 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 5.1 20 General Configuration Registers GENERAL CONFIGURATION REGISTERS (0X00…0X1F) R/W Addr n Register Description / bit names Bit GCONF – Global configuration flags 0..2 Reserved, set to 0 3 poscmp_enable 0: Outputs INT and PP are tristated. 1: Position compare pulse (PP) and interrupt output (INT) are available 4..6 7 RW 0x00 11 GCONF 8 9 10 Bit 0 1 R+C 0x01 4 GSTAT 2 3 Bit 3..0 W R 0x03 0x04 4 8 + 8 www.trinamic.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 21 GENERAL CONFIGURATION REGISTERS (0X00…0X1F) R/W Addr n Register W 0x05 32 X_COMPARE Description / bit names Position comparison register for motor 1 position strobe. Activate poscmp_enable to get position pulse on output PP. XACTUAL = X_COMPARE: - 5.2 Output PP becomes high. It returns to a low state, if the positions mismatch. Ramp Generator Registers Addresses Addr are specified for motor 1 (upper value) and motor 2 (second address). 5.2.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 22 RAMP GENERATOR MOTION CONTROL REGISTER SET (MOTOR 1: 0X20…0X2D, MOTOR 2: 0X40…0X4D) R/W Addr n Register W 0x27 0x47 23 VMAX 0x28 0x48 16 W W W W 0x2A 0x4A 0x2B 0x4B 0x2C 0x4C DMAX Description / bit names Motion ramp target velocity (for positioning ensure VMAX ≥ VSTART) (unsigned) This is the target velocity in velocity mode. It can be changed any time during a motion.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 5.2.2 23 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..
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 24 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 25 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 5.3 26 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...
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 27 MOTOR DRIVER REGISTER SET (MOTOR 1: 0X60…0X6F, MOTOR 2: 0X70…0X7F) R/W Addr 0x6F 0x7F R n 32 Register DRV_ STATUS Description / bit names stallGuard2 value and driver error flags See separate table! Range [Unit] MIRCOSTEP TABLE CALCULATION FOR A SINE WAVE EQUIVALENT TO THE POWER ON DEFAULT: 𝑟𝑜𝑢𝑛𝑑 (248 ∗ 𝑠𝑖𝑛 (2 ∗ 𝑃𝐼 ∗ 𝑖 𝑃𝐼 + )) − 1 1024 1024 i:[0… 255] is the table index The amplitude of the wave is 248.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 5.3.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 29 0X6C, 0X7C: CHOPCONF – CHOPPER CONFIGURATION Bit 10 Name hend3 9 hend2 8 hend1 7 hend0 Function HEND hysteresis low value OFFSET sine wave offset Comment 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..
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 5.3.3 30 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 5.3.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 6 32 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) Parameter IRUN IHOLD IHOLD DELAY vsense 6.1 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 7 34 Chopper Operation The currents through both motor coils are controlled using choppers. The choppers work independently of each other. In Figure 7.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 7.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 35 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 36 100 to 400 fullsteps per second), a too low hysteresis setting will lead to increased humming and vibration of the motor. Figure 7.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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) I target current + hysteresis start 37 HDEC target current + hysteresis end target current target current - hysteresis end target current - hysteresis start on sd fd sd t Figure 7.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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 7.2 38 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 is best when using the high velocity switch to fullstepping option. The classic constant off-time chopper uses a fixed-time fast decay following each on phase.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 39 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 7.4 40 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 8 41 Driver Diagnostic Flags The TMC5031 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. 8.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 42 9 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 TMC5031 integrates a new type of ramp generator, which offers faster machine operation compared to the classical linear acceleration ramps.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 9.2 43 Motion Profiles For the ramp generator register set, please refer to the chapter 0. 9.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 9.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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 44 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 45 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 9.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 9.5 46 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 5. 6. 47 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 4. 5. 48 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 49 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 50 10 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 10.1. At maximum motor load, the value goes to zero or near to zero.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 51 10.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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 52 10.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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 53 10.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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 54 11 coolStep Operation coolStep is an automatic smart energy optimization for stepper motors based on the motor mechanical load, making them “green”. 11.
stallGuard2 reading mechanical load 55 motor current TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 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 11.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 56 11.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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 57 12 Sine-Wave Look-up Table Each of the TMC5031 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. 12.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 58 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 59 13 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 60 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.
TMC5031 DATASHEET (Rev. 1.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 62 14 Getting Started Please refer to the TMC5031 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 13 will guide you through the process of correctly setting up all registers. 14.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 63 15 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. 15.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 64 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 65 16 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 66 17.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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 67 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 68 17.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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 69 18 Layout Considerations 18.1 Exposed Die Pad The TMC5031 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. 18.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 70 18.4 Layout Example Schematic 1- Top Layer (assembly side) 2- Inner Layer (GND) 3- Inner Layer (supply VS) 4- Bottom Layer Components Figure 18.1 Layout example www.trinamic.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 71 19 Package Mechanical Data 19.1 Dimensional Drawings Attention: Drawings not to scale. Figure 19.1 Dimensional drawings Parameter 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 72 20 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.
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 73 22 Table of Figures Figure 1.1 Basic application and block diagram .......................................................................................................... 4 Figure 1.2 Energy efficiency with coolStep (example) ............................................................................................... 6 Figure 2.1 TMC5031 pin assignments. ....................................................................................................
TMC5031 DATASHEET (Rev. 1.11 / 2016-APR-28) 74 23 Revision History Version Date Author Description BD – Bernhard Dwersteg SD – Sonja Dwersteg 1.04 2012_NOV-18 BD / SD 1.05 1.06 2013_FEB-22 2013-MAR-25 JP SD 1.07 1.08 2013-APR-30 2014-MAY-12 SD SD 1.09 2014-JUL-01 BD 1.10 2015-MAR-24 BD 1.11 2016-APR-28 BD First version of product TMC5031 datasheet based on TMC562 prototype datasheet V1.04 Product Image changed - Chapter 17.3 (thermal characteristics) added. - Chapter 10.