0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
TMC2226-SA-T

TMC2226-SA-T

  • 厂商:

    TRINAMIC

  • 封装:

    TSSOP28_9.8X4.5MM_EP

  • 描述:

    IC MTR DRV 4.75-29V HTSSOP28

  • 数据手册
  • 价格&库存
TMC2226-SA-T 数据手册
POWER DRIVER FOR STEPPER MOTORS INTEGRATED CIRCUITS TMC2226 Datasheet Step/Dir Drivers for Two-Phase Bipolar Stepper Motors up to 2.8A peak – StealthChop™ for Quiet Movement – UART Interface Option – Sensorless Stall Detection StallGuard4. APPLICATIONS Compatible Design Upgrade 3D Printers Printers, POS Office and home automation Textile, Sewing Machines CCTV, Security ATM, Cash recycler HVAC Battery Operated Equipment 4 FEATURES AND BENEFITS 2-phase stepper motors up to 2.8A coil current (peak), 2A RMS STEP/DIR Interface with 8, 16, 32 or 64 microstep pin setting Smooth Running 256 microsteps by MicroPlyer™ interpolation StealthChop2™ silent motor operation SpreadCycle™ highly dynamic motor control chopper StallGuard4™ load and stall detection for StealthChop CoolStep™ current control for energy savings up to 75% Low RDSon, Low Heat-Up LS 170mΩ & HS 170mΩ (typ. at 25°C) Voltage Range 4.75… 29V DC Low Power Standby to fit standby energy regulations Internal Sense Resistor option (no sense resistors required) Passive Braking, Freewheeling, and automatic power down Single Wire UART & OTP for advanced configuration options Integrated Pulse Generator for standalone motion Full Protection & Diagnostics Thermally optimized HTSSOP package for optical inspection BLOCK DIAGRAM TRINAMIC Motion Control GmbH & Co. KG Hamburg, Germany DESCRIPTION The TMC2226 is an ultra-silent motor driver IC for two phase stepper motors. TRINAMICs sophisticated StealthChop2 chopper ensures noiseless operation, maximum efficiency and best motor torque. Its fast current regulation and optional combination with SpreadCycle allow highly dynamic motion while adding. StallGuard for sensorless homing. The integrated power MOSFETs handle motor currents up to 2A RMS with protection and diagnostic features for robust and reliable operation. A simple to use UART interface opens up tuning and control options. Store application tuning to OTP memory. Industries’ most advanced STEP/DIR stepper motor driver family upgrades designs to noiseless and most precise operation for cost-effective and highly competitive solutions. TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 2 APPLICATION EXAMPLES: SIMPLE SOLUTIONS – HIGHLY EFFECTIVE The TMC22xx family scores with power density, integrated power MOSFETs, smooth and quiet operation, and a congenial simplicity. The TMC2226 covers a wide spectrum of applications from battery systems to embedded applications with up to 2A motor current per coil. TRINAMICs unique chopper modes SpreadCycle and StealthChop2 optimize drive performance. StealthChop reduces motor noise to the point of silence at low velocities. Standby current reduction keeps costs for power dissipation and cooling down. Extensive support enables rapid design cycles and fast time-to-market with competitive products. STANDALONE REPLACEMENT FOR LEGACY STEPPER DRIVER 0A+ S/D ERROR, INDEX TMC22xx S 0A- N 0B+ 0B- UART INTERFACE FOR FULL DIAGNOSTICS AND CONTROL 0A+ S/D High-Level Interface CPU UART TMC22xx 0A0B+ 0B- Sense Resistors may be omitted S N In this example, configuration is hard wired via pins. Software based motion control generates STEP and DIR (direction) signals, INDEX and ERROR signals report back status information. A CPU operates the driver via step and direction signals. It accesses diagnostic information and configures the TMC2226 via the UART interface. The CPU manages motion control and the TMC2226 drives the motor and smoothens and optimizes drive performance. The TMC2226-EVAL is part of TRINAMICs universal evaluation board system which provides a convenient handling of the hardware as well as a userfriendly software tool for evaluation. The TMC2226 evaluation board system consists of three parts: STARTRAMPE (base board), ESELSBRÜCKE (connector board with several test points and stand-alone settings), and TMC2226EVAL. ORDER CODES Order code TMC2226-SA TMC2226-SA-T TMC2226-EVAL ESELSBRÜCKE LANDUNGSBRÜCKE www.trinamic.com PN 00-0199 00-0199-T 40-0204 40-0098 40-0167 Description StealthChop standalone driver; HTSSOP (RoHS compliant) -T denotes tape on reel packing of devices Evaluation board for TMC2226 stepper motor driver Connector board fitting to Landungsbrücke Baseboard for TMC2226-EVAL & further evaluation boards Size [mm2] 9.7 x 6.4 85 x 55 61 x 38 85 x 55 TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 3 Table of Contents 1 PRINCIPLES OF OPERATION ......................... 4 1.1 1.2 1.3 1.4 1.5 KEY CONCEPTS ................................................ 5 CONTROL INTERFACES ..................................... 6 MOVING AND CONTROLLING THE MOTOR ........ 6 STEALTHCHOP2 & SPREADCYCLE DRIVER ....... 6 STALLGUARD4 – MECHANICAL LOAD SENSING . ....................................................................... 7 1.6 COOLSTEP – LOAD ADAPTIVE CURRENT CONTROL ...................................................................... 7 1.7 AUTOMATIC STANDSTILL POWER DOWN......... 7 1.8 INDEX OUTPUT ................................................ 8 1.9 PRECISE CLOCK GENERATOR AND CLK INPUT... 8 2 PIN ASSIGNMENTS ........................................... 9 2.1 2.2 3 SAMPLE CIRCUITS ..........................................11 3.1 3.2 3.3 3.4 3.5 3.6 3.7 4 10 INTERNAL SENSE RESISTORS ..................... 53 11 STALLGUARD4 LOAD MEASUREMENT ....... 55 11.1 11.2 11.3 11.4 11.5 12 COOLSTEP OPERATION ................................. 57 12.1 12.2 12.3 13 STALLGUARD4 VS. STALLGUARD2 ................ 55 TUNING STALLGUARD4................................. 56 STALLGUARD4 UPDATE RATE ....................... 56 DETECTING A MOTOR STALL ......................... 56 LIMITS OF STALLGUARD4 OPERATION .......... 56 USER BENEFITS............................................. 57 SETTING UP FOR COOLSTEP .......................... 57 TUNING COOLSTEP ....................................... 59 STEP/DIR INTERFACE .................................... 60 13.1 TIMING ......................................................... 60 13.2 CHANGING RESOLUTION ............................... 61 13.3 MICROPLYER STEP INTERPOLATOR AND STAND STILL DETECTION ....................................................... 62 13.4 INDEX OUTPUT ............................................. 63 14 INTERNAL STEP PULSE GENERATOR ......... 64 15 DRIVER DIAGNOSTIC FLAGS ...................... 65 15.1 15.2 15.3 15.4 TEMPERATURE MEASUREMENT ....................... 65 SHORT PROTECTION ...................................... 65 OPEN LOAD DIAGNOSTICS ........................... 66 DIAGNOSTIC OUTPUT ................................... 66 16 QUICK CONFIGURATION GUIDE ................ 67 17 EXTERNAL RESET ............................................. 71 REGISTER MAP .................................................19 18 CLOCK OSCILLATOR AND INPUT ............... 71 19 ABSOLUTE MAXIMUM RATINGS ................. 72 20 ELECTRICAL CHARACTERISTICS ................. 72 GENERAL REGISTERS .....................................20 VELOCITY DEPENDENT CONTROL ...................25 STALLGUARD CONTROL .................................26 SEQUENCER REGISTERS .................................28 CHOPPER CONTROL REGISTERS .....................29 STEALTHCHOP™ ..............................................35 6.1 6.2 6.3 6.4 6.5 6.6 6.7 7 ANALOG CURRENT SCALING VREF ............... 51 DATAGRAM STRUCTURE .................................15 CRC CALCULATION .......................................17 UART SIGNALS ............................................17 ADDRESSING MULTIPLE SLAVES ....................18 5.1 5.2 5.3 5.4 5.5 6 STANDARD APPLICATION CIRCUIT ................11 INTERNAL RDSON SENSING..........................11 5V ONLY SUPPLY..........................................12 CONFIGURATION PINS ..................................13 HIGH MOTOR CURRENT .................................13 LOW POWER STANDBY .................................14 DRIVER PROTECTION AND EME CIRCUITRY ...14 UART SINGLE WIRE INTERFACE ................14 4.1 4.2 4.3 4.4 5 PACKAGE OUTLINE TMC2226 ........................ 9 SIGNAL DESCRIPTIONS TMC2226 .................. 9 9.1 AUTOMATIC TUNING .....................................35 STEALTHCHOP OPTIONS ................................37 STEALTHCHOP CURRENT REGULATOR.............37 VELOCITY BASED SCALING ............................39 COMBINE STEALTHCHOP AND SPREADCYCLE .41 FLAGS IN STEALTHCHOP ...............................42 FREEWHEELING AND PASSIVE BRAKING ........43 SPREADCYCLE CHOPPER ...............................45 7.1 SPREADCYCLE SETTINGS ...............................46 8 SELECTING SENSE RESISTORS ....................49 9 MOTOR CURRENT CONTROL ........................50 www.trinamic.com 20.1 20.2 20.3 21 LAYOUT CONSIDERATIONS ......................... 78 21.1 21.2 21.3 21.4 22 OPERATIONAL RANGE ................................... 72 DC AND TIMING CHARACTERISTICS .............. 73 THERMAL CHARACTERISTICS.......................... 77 EXPOSED DIE PAD ........................................ 78 WIRING GND .............................................. 78 SUPPLY FILTERING........................................ 78 LAYOUT EXAMPLE TMC2226 ........................ 79 PACKAGE MECHANICAL DATA .................... 80 22.1 22.2 DIMENSIONAL DRAWINGS HTSSOP28 ........ 80 PACKAGE CODES ........................................... 81 23 TABLE OF FIGURES ......................................... 82 24 REVISION HISTORY ....................................... 83 25 REFERENCES ...................................................... 83 TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 1 4 Principles of Operation The TMC22xx family of stepper drivers is intended as a drop-in upgrade for existing low-cost stepper driver applications. Their silent drive technology StealthChop enables non-bugging motion control for home and office applications. A highly efficient power stage enables high current from a tiny package. The TMC2226 requires just a few control pins on its tiny package. It allows selection of the most important setting: the desired microstep resolution. A choice of 8, 16, 32 or 64 microsteps, or from fullstep up to 1/256 step adapts the driver to the capabilities of the motion controller. STEP DIR 5V Voltage regulator Step&Dir input Analog Scaling VREF PDN/UART Configuration Interface B. Dwersteg, © TRINAMIC 2016 UART interface + Register Block DIAG INDEX opt. ext. clock 10-16MHz CLK_IN 3.3V or 5V I/O voltage VCC_IO VCP OA2 BRA stealthChop2 256 Microstep Sequencer Driver Integrated Rsense S N stepper motor RSA IREF Connect directly to GND plane Use low inductivity SMD type, e.g. 1206, 0.5W for RSA and RSB spreadCycle Programmable Diagnostic Outputs 100µF Low ESR type Full Bridge A OB1 coolStep Full Bridge B OB2 stallGuard4 Trimmed CLK oscillator/ selector BRB RSB Connect directly to GND plane opt. low power standby opt. driver enable GND 100n ENN Driver error Index pulse 100n OA1 STDBY optional UART interface MS2 SPREAD 100n charge pump IREF Stand Still Current Reduction Configuration Memory (OTP) microPlyer MS1 +VM VS Step Pulse Generator Configuration (GND or VCC_IO) 100n 16V TMC2226 DIE PAD Step and Direction motion control 22n 50V CPI 2.2µ 6.3V 5VOUT Place near IC with short path to die pad CPO VREF Analog current scaling or leave open Even at low microstepping rate, the TMC2226 offers a number of unique enhancements over comparable products: TRINAMICs sophisticated StealthChop2 chopper plus the microstep enhancement MicroPlyer ensure noiseless operation, maximum efficiency and best motor torque. Its fast current regulation and optional combination with SpreadCycle allow for highly dynamic motion. Protection and diagnostic features support robust and reliable operation. A simple-to-use 8 bit UART interface opens up more tuning and control options. Application specific tuning can be stored to on-chip OTP memory. Industries’ most advanced step & direction stepper motor driver family upgrades designs to noiseless and most precise operation for cost-effective and highly competitive solutions. Figure 1.1 TMC2226 basic application block diagram THREE MODES OF OPERATION: OPTION 1: Standalone STEP/DIR Driver (Legacy Mode) A CPU (µC) generates step & direction signals synchronized to additional motors and other components within the system. The TMC2226 operates the motor as commanded by the configuration pins and STEP/DIR signals. Motor run-current either is fixed, or set by the CPU using the analog input VREF. The pin PDN_UART selects automatic standstill current reduction. Feedback from the driver to the CPU is granted by the INDEX and DIAG output signals. Enable or disable the motor using the ENN pin. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 5 OPTION 2: Standalone STEP/DIR Driver with OTP pre-configuration Additional options enabled by pre-programming OTP memory (label UART & OTP): + + + UART OTP Tuning of the chopper to the application for application tailored performance Cost reduction by switching the driver to internal sense resistor mode Adapting the automatic power down level and timing for best application efficiency 0A+ S/D High-Level Interface CPU ERROR, INDEX TMC22xx 0A- S N 0B+ TXD only or bit bang UART Other drivers 0B- External preprogramming Figure 1.2 Stand-alone driver with pre-configuration To enable the additional options, either one-time program the driver’s OTP memory, or store configuration in the CPU and transfer it to the on-chip registers following each power-up. Operation uses the same signals as Option 1. Programming does not need to be done within the application - it can be executed during testing of the PCB! Alternatively, use bit-banging by CPU firmware to configure the driver. Multiple drivers can be programmed at the same time using a single TXD line. OPTION 3: STEP/DIR Driver with Full Diagnostics and Control Similar to Option 2, but pin PDN_UART is connected to the CPU UART interface. UART Additional options (label UART): + + + + + Detailed diagnostics and thermal management Passive braking and freewheeling for flexible, lowest power stop modes More options for microstep resolution setting (fullstep to 256 microstep) Software controlled motor current setting and more chopper options Use StallGuard for sensorless homing and CoolStep for adaptive motor current and cool motor This mode allows replacing all control lines like ENN, DIAG, INDEX, MS1, MS2, and analog current setting VREF by a single interface line. This way, only three signals are required for full control: STEP, DIR and PDN_UART. Even motion without external STEP pulses is provided by an internal programmable step pulse generator: Just set the desired motor velocity. However, no ramping is provided by the TMC2226. 1.1 Key Concepts The TMC2226 implements advanced features which are exclusive to TRINAMIC products. These features contribute toward greater precision, greater energy efficiency, higher reliability, smoother motion, and cooler operation in many stepper motor applications. StealthChop2™ No-noise, high-precision chopper algorithm for inaudible motion and inaudible standstill of the motor. Allows faster motor acceleration and deceleration than StealthChop™ and extends StealthChop to low stand still motor currents. SpreadCycle™ High-precision cycle-by-cycle current control for highest dynamic movements. MicroPlyer™ Microstep interpolator for obtaining full 256 microstep smoothness with lower resolution step inputs starting from fullstep StallGuard4™ Sensorless homing safes end switches and warns in case of motor overload CoolStep™ Uses StallGuard measurement in order to adapt the motor current for best efficiency and lowest heat-up of motor and driver In addition to these performance enhancements, TRINAMIC motor drivers offer safeguards to detect and protect against shorted outputs, output open-circuit, overtemperature, and undervoltage conditions for enhancing safety and recovery from equipment malfunctions. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 6 1.2 Control Interfaces The TMC2226 supports both, discrete control lines for basic mode selection and a UART based single wire interface with CRC checking. The UART interface automatically becomes enabled when correct UART data is sent. When using UART, the pin selection may be disabled by control bits. 1.2.1 UART Interface UART The single wire interface allows unidirectional operation (for parameter setting only), or bi-directional operation for full control and diagnostics. It can be driven by any standard microcontroller UART or even by bit banging in software. Baud rates from 9600 Baud to 500k Baud or even higher (when using an external clock) may be used. No baud rate configuration is required, as the TMC2226 automatically adapts to the masters’ baud rate. The frame format is identical to the intelligent TRINAMIC controller & driver ICs TMC5130, TMC516x and TMC5072. A CRC checksum allows data transmission over longer distance. For fixed initialization sequences, store the data including CRC into the µC, thus consuming only a few 100 bytes of code for a full initialization. CRC may be ignored during read access, if not desired. This makes CRC use an optional feature! The IC supports four address settings to access up to four ICs on a single bus. Even more drivers can be programmed in parallel by tying together all interface pins, in case no read access is required. An optional addressing can be provided by analog multiplexers, like 74HC4066. From a software point of view the TMC2226 is a peripheral with a number of control and status registers. Most of them can either be written only or are read only. Some of the registers allow both, read and write access. In case read-modify-write access is desired for a write only register, realize a shadow register in master software. 1.3 Moving and Controlling the Motor 1.3.1 STEP/DIR Interface The motor is controlled by a step and direction input. Active edges on the STEP input can be rising edges or both rising and falling edges as controlled by a special mode bit (DEDGE). Using both edges cuts the toggle rate of the STEP signal in half, which is useful for communication over slow interfaces such as optically isolated interfaces. The state sampled from the DIR input upon an active STEP edge determines whether to step forward or back. Each step can be a fullstep or a microstep, in which there are 2, 4, 8, 16, 32, 64, 128, or 256 microsteps per fullstep. A step impulse with a low state on DIR increases the microstep counter. With a high state, it decreases the counter by an amount controlled by the microstep resolution. An internal table translates the counter value into the sine and cosine values which control the motor current for microstepping. 1.3.2 Internal Step Pulse Generator UART Some applications do not require a precisely co-ordinate motion – the motor just is required to move for a certain time and at a certain velocity. The TMC2226 comes with an internal pulse generator for these applications: Just provide the velocity via UART interface to move the motor. The velocity sign automatically controls the direction of the motion. However, the pulse generator does not integrate a ramping function. Motion at higher velocities will require ramping up and ramping down the velocity value via software. STEP/DIR mode and internal pulse generator mode can be mixed in an application! 1.4 StealthChop2 & SpreadCycle Driver StealthChop is a voltage-chopper based principle. It especially guarantees that the motor is absolutely quiet in standstill and in slow motion, except for noise generated by ball bearings. Unlike other voltage mode choppers, StealthChop2 does not require any configuration. It automatically learns the best settings during the first motion after power up and further optimizes the settings in subsequent motions. An initial homing sequence is sufficient for learning. Optionally, initial learning parameters can be stored to OTP. StealthChop2 allows high motor dynamics, by reacting at once to a change of motor velocity. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 7 For highest velocity applications, SpreadCycle is an option to StealthChop2. It can be enabled via input pin or via UART and OTP. StealthChop2 and SpreadCycle may even be used in a combined configuration for the best of both worlds: StealthChop2 for no-noise stand still, silent and smooth performance, SpreadCycle at higher velocity for high dynamics and highest peak velocity at low vibration. SpreadCycle is an advanced cycle-by-cycle chopper mode. It offers smooth operation and good resonance dampening over a wide range of speed and load. The SpreadCycle chopper scheme automatically integrates and tunes fast decay cycles to guarantee smooth zero crossing performance. Benefits of using StealthChop2: - Significantly improved microstepping with low cost motors - Motor runs smooth and quiet - Absolutely no standby noise - Reduced mechanical resonance yields improved torque 1.5 StallGuard4 – Mechanical Load Sensing StallGuard4 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. This gives more information on the drive allowing functions like sensorless homing and diagnostics of the drive mechanics. 1.6 CoolStep – Load Adaptive Current Control coolStep drives the motor at the optimum current. It uses the stallGuard4 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. Benefits are: - Energy efficiency - Motor generates less heat - Less or no cooling - Use of smaller motor - Less motor noise power consumption decreased up to 75% improved mechanical precision improved reliability less torque reserve required → cheaper motor does the job Due to less energy exciting motor resonances Figure 1.3 shows the efficiency gain of a 42mm stepper motor when using coolStep compared to standard operation with 50% of torque reserve. coolStep is enabled above 60RPM in the example. 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.3 Energy efficiency with coolStep (example) 1.7 Automatic Standstill Power Down An automatic current reduction drastically reduces application power dissipation and cooling requirements. Per default, the stand still current reduction is enabled by pulling PDN_UART input to www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 8 GND. It reduces standstill power dissipation to less than 33% by going to slightly more than half of the run current. Modify stand still current, delay time and decay via UART, or pre-programmed via internal OTP. Automatic freewheeling and passive motor braking are provided as an option for stand still. Passive braking reduces motor standstill power consumption to zero, while still providing effective dampening and braking! STEP CURRENT IRUN IHOLD RMS motor current trace with pin PDN=0 TPOWERDOWN IHOLDDELAY power down power down ramp time delay time t Figure 1.4 Automatic Motor Current Power Down 1.8 Index Output The index output gives one pulse per electrical rotation, i.e. one pulse per each four fullsteps. It shows the internal sequencer microstep 0 position (MSTEP near 0). This is the power on position. In combination with a mechanical home switch, a more precise homing is enabled. 1.9 Precise clock generator and CLK input The TMC2226 provides a factory trimmed internal clock generator for precise chopper frequency and performance. However, an optional external clock input is available for cases, where quartz precision is desired, or where a lower or higher frequency is required. For safety, the clock input features timeout detection, and switches back to internal clock upon fail of the external source. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 2 9 Pin Assignments The TMC2226 comes in a thermally optimized HTSSOP-package. 22 19 10 11 18 9 20 8 © B. Dwersteg, TRINAMIC 12 14 15 13 16 Pad=GND 17 7 TMC2226 HTSSOP28 21 6 23 5 24 4 25 3 26 2 27 1 OB1 BRB VS OB2 ENN GND CPO CPI VCP SPREAD 5VOUT MS1_AD0 MS2_AD1 28 2.1 Package Outline TMC2226 OA1 BRA VS OA2 STDBY DIR GND VREF STEP VCC_IO PDN_UART CLK INDEX DIAG Figure 2.1 TMC2226 Pinning Top View – type: HTSSOP 28, 9.7x6.4mm² over pins, 0.65mm pitch 2.2 Signal Descriptions TMC2226 Pin OB1 Number 1 BRB 2 VS 3, 26 OB2 4 ENN 5 GND CPO CPI VCP 6, 22 7 8 9 SPREAD 10 5VOUT 11 MS1_AD0 12 DI (pd) MS2_AD1 14 DI (pd) DIAG 15 DO INDEX 16 DO CLK 17 DI www.trinamic.com Type DI DI (pd) Function Motor coil B output 1 Sense resistor connection for coil B. Place sense resistor to GND near pin. Tie to GND when using internal sense resistor. Motor supply voltage. Provide filtering capacity near pin with shortest possible loop to GND pad. Motor coil B output 2 Enable not input. The power stage becomes switched off (all motor outputs floating) when this pin becomes driven to a high level. GND. Connect to GND plane near pin. Charge pump capacitor output. Charge pump capacitor input. Tie to CPO using 22nF 50V capacitor. Charge pump voltage. Tie to VS using 100nF capacitor. Chopper mode selection: Low=StealthChop, High=SpreadCycle (may be left unconnected) Output of internal 5V regulator. Attach 2.2µF to 4.7µF ceramic capacitor to GND near to pin for best performance. Provide the shortest possible loop to the GND pad. Microstep resolution configuration (internal pull-down resistors) MS2, MS1: 00: 1/8, 01: 1/32, 10: 1/64 11: 1/16 For UART based configuration selection of UART Address 0…3 Diagnostic and StallGuard output. Hi level upon stall detection or driver error. Reset error condition by ENN=high. Configurable index output. Provides index pulse. CLK input. Tie to GND using short wire for internal clock or supply external clock. TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) Pin Number Type PDN_UART 18 DIO VCC_IO STEP 19 20 DI VREF 21 AI DIR 23 DI (pd) STDBY 24 DI (pd) OA2 25 BRA 27 OA1 - 28 13 Exposed die pad - www.trinamic.com unused 10 Function Power down not control input (low = automatic standstill current reduction). Optional UART Input/Output. Power down function can be disabled in UART mode. 3.3V to 5V IO supply voltage for all digital pins. STEP input Analog reference voltage for current scaling or reference current for use of internal sense resistors (optional mode) DIR input (internal pull-down resistor) STANDBY input. Pull up to disable driver internal supply regulator. This will bring the driver into a low power dissipation state. 100kOhm pulldown. (may be left unconnected) Hint: Also shut down VREF voltage and ENN to 0V during standby. Motor coil A output 2 Sense resistor connection for coil A. Place sense resistor to GND near pin. Tie to GND when using internal sense resistor. Motor coil A output 1 May be connected to GND for better PCB routing Connect the exposed die pad to a GND plane. Provide as many as possible vias for heat transfer to GND plane. Serves as GND pin for power drivers and analogue circuitry. TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 3 11 Sample Circuits The sample circuits show the connection of external components in different operation and supply modes. The connection of the bus interface and further digital signals is left out for clarity. STEP DIR 5V Voltage regulator Step&Dir input Analog Scaling PDN/UART Configuration Memory (OTP) B. Dwersteg, © TRINAMIC 2016 DIAG INDEX opt. ext. clock 10-16MHz CLK_IN 3.3V or 5V I/O voltage VCC_IO CPI VCP OA2 BRA Driver Integrated Rsense S N stepper motor RSA IREF Connect directly to GND plane Use low inductivity SMD type, e.g. 1206, 0.5W for RSA and RSB spreadCycle Programmable Diagnostic Outputs 100µF Low ESR type Full Bridge A OB1 coolStep Full Bridge B OB2 stallGuard4 Trimmed CLK oscillator/ selector BRB RSB Connect directly to GND plane opt. low power standby opt. driver enable GND ENN 100n STDBY Index pulse 256 Microstep Sequencer 100n OA1 stealthChop2 Configuration Interface UART interface + Register Block Driver error 100n charge pump IREF Stand Still Current Reduction microPlyer optional UART interface MS2 SPREAD +VM VS VREF Configuration (GND or VCC_IO) 100n 16V TMC2226 Step Pulse Generator MS1 22n 50V DIE PAD Step and Direction motion control CPO 2.2µ 6.3V 5VOUT Place near IC with short path to die pad VREF Analog current scaling or leave open 3.1 Standard Application Circuit Figure 3.1 Standard application circuit The standard application circuit uses a minimum set of additional components. Two sense resistors set the motor coil current. See chapter 8 to choose the right sense resistors. Use low ESR capacitors for filtering the power supply. The capacitors need to cope with the current ripple cause by chopper operation. A minimum capacity of 100µF near the driver is recommended for best performance. Current ripple in the supply capacitors also depends on the power supply internal resistance and cable length. VCC_IO can be supplied from 5VOUT, or from an external source, e.g. a 3.3V regulator. Basic layout hints Place sense resistors and all filter capacitors as close as possible to the related IC pins. Use a solid common GND for all GND connections, also for sense resistor GND. Connect 5VOUT filtering capacitor directly to 5VOUT and the die pad. See layout hints for more details. Low ESR electrolytic capacitors are recommended for VS filtering. 3.2 Internal RDSon Sensing For cost critical or space limited applications, sense resistors can be omitted. For internal current sensing, a reference current set by a tiny external resistor programs the output current. For calculation of the reference resistor, refer chapter 9.1. Attention Be sure to switch the IC to RDSon mode, before enabling drivers: Set otp_internalRsense = 1. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 12 STEP Step and Direction motion control DIR Configuration Interface PDN/UART B. Dwersteg, © TRINAMIC 2016 UART interface + Register Block DIAG INDEX opt. ext. clock 10-16MHz CLK_IN 3.3V or 5V I/O voltage VCC_IO 100µF IREF Low ESR type OA1 Full Bridge A 256 Microstep Sequencer OA2 BRA Integrated Rsense Driver S N stepper motor Connect directly to GND plane IREF Attention: Start with ENN=high! Set GCONF.1 or OTP0.6 prior to enabling the driver! spreadCycle Programmable Diagnostic Outputs 100n charge pump stealthChop2 microPlyer MS2 100n Analog Scaling Stand Still Current Reduction Configuration Memory (OTP) SPREAD Driver error CPO VREF 5V Voltage regulator Step&Dir input MS1 Index pulse +VM VS VREF OB1 coolStep Full Bridge B OB2 stallGuard4 Trimmed CLK oscillator/ selector BRB Connect directly to GND plane opt. low power standby opt. driver enable GND ENN DIE PAD 100n STDBY optional UART interface 100n 16V TMC2226 Step Pulse Generator Configuration (GND/open or VCC_IO) 22n 50V VCP RREF 5VOUT 2.2µ 6.3V CPI Place near IC with short path to die pad Figure 3.2 Application circuit using RDSon based sensing STEP DIR 5V Voltage regulator Step&Dir input Configuration Interface PDN/UART B. Dwersteg, © TRINAMIC 2016 UART interface + Register Block INDEX opt. ext. clock 10-16MHz CLK_IN 3.3V or 5V I/O voltage VCC_IO VCP IREF 256 Microstep Sequencer 100µF Low ESR type Full Bridge A OA2 BRA Driver Integrated Rsense S N stepper motor RSA IREF Connect directly to GND plane Use low inductivity SMD type, e.g. 1206, 0.5W for RSA and RSB spreadCycle Programmable Diagnostic Outputs 100n OA1 OB1 coolStep Full Bridge B OB2 stallGuard4 Trimmed CLK oscillator/ selector BRB RSB Connect directly to GND plane opt. low power standby opt. driver enable GND ENN 100n STDBY Driver error 100n charge pump stealthChop2 microPlyer MS2 SPREAD Index pulse CPO Analog Scaling Stand Still Current Reduction Configuration Memory (OTP) MS1 DIAG 4.7-5.4V VS VREF optional UART interface 100n 16V TMC2226 Step Pulse Generator Configuration (GND/open or VCC_IO) 22n 50V DIE PAD Step and Direction motion control 10R Optional – bridges the internal 5V reference – leave away if standby is desired VREF 10µ 6.3V 5VOUT Place near IC with short path to die pad CPI 3.3 5V Only Supply Figure 3.3 5V only operation While the standard application circuit is limited to roughly 5.2 V lower supply voltage, a 5 V only application lets the IC run from a 5 V +/-5% supply. In this application, linear regulator drop must be www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 13 minimized. Therefore, the internal 5V regulator is filtered with a higher capacitance. An optional resistor bridges the internal 5V regulator by connecting 5VOUT to the external power supply. This RC filter keeps chopper ripple away from 5VOUT. With this resistor, the external supply is the reference for the absolute motor current and must not exceed 5.5V. Standby function will not work in this application, because the 5V regulator is bridged. 3.4 Configuration Pins The TMC2226 provides four configuration pins. These pins allow quick configuration for standalone operation. Several additional options can be set by OTP programming. In UART mode, the configuration pins can be disabled in order to set a different configuration via registers. PDN_UART: CONFIGURATION OF STANDSTILL POWER DOWN PDN_UART GND VCC_IO UART interface Current Setting Enable automatic power down in standstill periods Disable When using the UART interface, the configuration pin should be disabled via GCONF.pdn_disable = 1. Program IHOLD as desired for standstill periods. MS1/MS2: CONFIGURATION OF MICROSTEP RESOLUTION FOR STEP INPUT MS2 GND GND VCC_IO VCC_IO MS1 GND VCC_IO GND VCC_IO Microstep Setting 8 microsteps 32 microsteps (different to TMC2208!) 64 microsteps (different to TMC2208!) 16 microsteps SPREAD: SELECTION OF CHOPPER MODE SPREAD GND or Pin open / not available VCC_IO Chopper Setting StealthChop is selected. Automatic switching to SpreadCycle in dependence of the step frequency can be programmed via OTP. SpreadCycle operation. 3.5 High Motor Current When operating at a high motor current, the driver power dissipation due to MOSFET switch onresistance significantly heats up the driver. This power dissipation will significantly heat up the PCB cooling infrastructure, if operated at an increased duty cycle. This in turn leads to a further increase of driver temperature. An increase of temperature by about 100°C increases MOSFET resistance by roughly 50%. This is a typical behavior of MOSFET switches. Therefore, under high duty cycle, high load conditions, thermal characteristics have to be carefully taken into account, especially when increased environment temperatures are to be supported. Refer the thermal characteristics and the layout hints for more information. As a thumb rule, thermal properties of the PCB design become critical for the HTSSOP package at or above 1.6A RMS motor current for increased periods of time. Keep in mind that resistive power dissipation rises with the square of the motor current. On the other hand, this means that a small reduction of motor current significantly saves heat dissipation and energy. Pay special attention to good thermal properties of your PCB layout, when going for 1.4A RMS current or more. An effect which might be perceived at medium motor velocities and motor sine wave peak currents above roughly 2A peak is a slight sine distortion of the current wave when using SpreadCycle. It results from an increasing negative impact of parasitic internal diode conduction, which in turn negatively influences the duration of the fast decay cycle of the SpreadCycle chopper. This is, because the current www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 14 measurement does not see the full coil current during this phase of the sine wave, because an increasing part of the current flows directly from the power MOSFETs’ drain to GND and does not flow through the sense resistor. This effect with most motors does not negatively influence the smoothness of operation, as it does not impact the critical current zero transition. The effect does not occur with StealthChop. 3.6 Low Power Standby Battery powered applications, and mains powered applications conforming to standby energy saving rules, often require a standby operation, where the power-supply remains on, but current draw goes down to a low value. The TMC2226 supports standby operation of roughly 2mW (at 12V supply), or TPWMTHRS - CoolStep is enabled, if configured (only with StealthChop) - Stall output signal on pin DIAG is enabled SGTHRS Detection threshold for stall. The StallGuard value SG_RESULT becomes compared to the double of this threshold. A stall is signaled with SG_RESULT ≤ SGTHRS*2 StallGuard result. SG_RESULT becomes updated with each fullstep, independent of TCOOLTHRS and SGTHRS. A higher value signals a lower motor load and more torque headroom. Intended for StealthChop mode, only. Bits 9 and 0 will always show 0. Scaling to 10 bit is for compatibility to StallGuard2. CoolStep configuration See separate table! TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 5.3.1 27 COOLCONF – Smart Energy Control CoolStep 0X42: COOLCONF – SMART ENERGY CONTROL COOLSTEP AND STALLGUARD Bit … 15 Name Function Comment seimin minimum current for smart current control 14 13 sedn1 sedn0 current down step speed 12 11 10 9 8 7 6 5 4 3 2 1 0 semax3 semax2 semax1 semax0 seup1 seup0 semin3 semin2 semin1 semin0 reserved StallGuard hysteresis value for smart current control 0: 1/2 of current setting (IRUN) Attention: use with IRUN≥10 1: 1/4 of current setting (IRUN) Attention: use with IRUN≥20 %00: For each 32 StallGuard4 values decrease by one %01: For each 8 StallGuard4 values decrease by one %10: For each 2 StallGuard4 values decrease by one %11: For each StallGuard4 value decrease by one set to 0 If the StallGuard4 result is equal to or above (SEMIN+SEMAX+1)*32, the motor current becomes decreased to save energy. %0000 … %1111: 0 … 15 set to 0 Current increment steps per measured StallGuard value %00 … %11: 1, 2, 4, 8 set to 0 If the StallGuard4 result falls below SEMIN*32, the motor current becomes increased to reduce motor load angle. %0000: smart current control CoolStep off %0001 … %1111: 1 … 15 www.trinamic.com reserved current up step width reserved minimum StallGuard value for smart current control and smart current enable TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 28 5.4 Sequencer Registers The sequencer registers have a pure informative character and are read-only. They help for special cases like storing the last motor position before power off in battery powered applications. MICROSTEPPING CONTROL REGISTER SET (0X60…0X6B) R/W Addr n Register R 0x6A 10 MSCNT R 0x6B www.trinamic.com 9 + 9 MSCURACT Description / bit names Microstep counter. Indicates actual position in the microstep table for CUR_A. CUR_B uses an offset of 256 into the table. Reading out MSCNT allows determination of the motor position within the electrical wave. bit 8… 0: CUR_A (signed): Actual microstep current for motor phase A as read from the internal sine wave table (not scaled by current setting) bit 24… 16: CUR_B (signed): Actual microstep current for motor phase B as read from the internal sine wave table (not scaled by current setting) Range [Unit] 0…1023 +/-0...255 TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 29 5.5 Chopper Control Registers DRIVER REGISTER SET (0X6C…0X7F) R/W Addr n Register RW 0x6C 32 CHOPCONF R 0x6F 32 DRV_ STATUS RW 0x70 22 PWMCONF R R 0x71 0x72 9+8 8+8 www.trinamic.com PWM_SCALE PWM_AUTO Description / bit names Chopper and driver configuration See separate table! Driver status flags and current level read back See separate table! StealthChop PWM chopper configuration See separate table! Results of StealthChop amplitude regulator. These values can be used to monitor automatic PWM amplitude scaling (255=max. voltage). bit 7… 0 PWM_SCALE_SUM: Actual PWM duty cycle. This value is used for scaling the values CUR_A and CUR_B read from the sine wave table. bit 24… 16 PWM_SCALE_AUTO: 9 Bit signed offset added to the calculated PWM duty cycle. This is the result of the automatic amplitude regulation based on current measurement. These automatically generated values can be read out in order to determine a default / power up setting for PWM_GRAD and PWM_OFS. bit 7… 0 PWM_OFS_AUTO: Automatically determined offset value bit 23… 16 PWM_GRAD_AUTO: Automatically determined gradient value Range [Unit] Reset default= 0x10000053 Reset default= 0xC10D0024 0…255 signed -255…+255 0…255 0…255 TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 5.5.1 30 CHOPCONF – Chopper Configuration 0X6C: CHOPCONF – CHOPPER CONFIGURATION Bit 31 Name diss2vs 30 diss2g 29 dedge 28 intpol interpolation to 256 microsteps 27 26 25 24 mres3 mres2 mres1 mres0 MRES micro step resolution 23 22 21 20 19 18 17 - reserved vsense 16 15 tbl1 tbl0 sense resistor voltage based current scaling TBL blank time select 14 13 12 11 10 9 8 7 - reserved hend3 hend2 hend1 hend0 HEND hysteresis low value OFFSET sine wave offset 6 5 4 hstrt2 hstrt1 hstrt0 HSTRT hysteresis start value added to HEND www.trinamic.com Function Low side short protection disable short to GND protection disable enable double edge step pulses Comment 0: Short protection low side is on 1: Short protection low side is disabled 0: Short to GND protection is on 1: Short to GND protection is disabled 1: Enable step impulse at each step edge to reduce step frequency requirement. This mode is not compatible with the step filtering function (multistep_filt) 1: The actual microstep resolution (MRES) becomes extrapolated to 256 microsteps for smoothest motor operation. (Default: 1) %0000: Native 256 microstep setting. %0001 … %1000: 128, 64, 32, 16, 8, 4, 2, FULLSTEP Reduced microstep resolution. The resolution gives the number of microstep entries per sine quarter wave. When choosing a lower microstep resolution, the driver automatically uses microstep positions which result in a symmetrical wave. Number of microsteps per step pulse = 2^MRES (Selection by pins unless disabled by GCONF. mstep_reg_select) set to 0 0: Low sensitivity, high sense resistor voltage 1: High sensitivity, low sense resistor voltage %00 … %11: Set comparator blank time to 16, 24, 32 or 40 clocks Hint: %00 or %01 is recommended for most applications (Default: OTP) set to 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. (Default: OTP, resp. 5 in StealthChop mode) %000 … %111: Add 1, 2, …, 8 to hysteresis low value HEND (1/512 of this setting adds to current setting) Attention: Effective HEND+HSTRT ≤ 16. Hint: Hysteresis decrement is done each 16 clocks TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 31 0X6C: CHOPCONF – CHOPPER CONFIGURATION Bit Name Function Comment (Default: OTP, resp. 0 in StealthChop mode) 3 2 1 0 toff3 toff2 toff1 toff0 TOFF off time and driver enable Off time setting controls duration of slow decay phase NCLK= 24 + 32*TOFF %0000: Driver disable, all bridges off %0001: 1 – use only with TBL ≥ 2 %0010 … %1111: 2 … 15 (Default: OTP, resp. 3 in StealthChop mode) www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 5.5.2 32 PWMCONF – Voltage PWM Mode StealthChop 0X70: PWMCONF – VOLTAGE MODE PWM STEALTHCHOP Bit 31 30 29 28 Name PWM_LIM Function PWM automatic scale amplitude limit when switching on 27 26 25 24 PWM_REG Regulation loop gradient 23 22 21 20 freewheel1 freewheel0 reserved reserved Allows different standstill modes 19 pwm_ autograd PWM automatic gradient adaptation 18 pwm_ autoscale PWM automatic amplitude scaling 17 pwm_freq1 www.trinamic.com Comment Limit for PWM_SCALE_AUTO when switching back from SpreadCycle to StealthChop. This value defines the upper limit for bits 7 to 4 of the automatic current control when switching back. It can be set to reduce the current jerk during mode change back to StealthChop. It does not limit PWM_GRAD or PWM_GRAD_AUTO offset. (Default = 12) User defined maximum PWM amplitude change per half wave when using pwm_autoscale=1. (1…15): 1: 0.5 increments (slowest regulation) 2: 1 increment (default with OTP2.1=1) 3: 1.5 increments 4: 2 increments … 8: 4 increments (default with OTP2.1=0) ... 15: 7.5 increments (fastest regulation) set to 0 set to 0 Stand still option when motor current setting is zero (I_HOLD=0). %00: Normal operation %01: Freewheeling %10: Coil shorted using LS drivers %11: Coil shorted using HS drivers 0 Fixed value for PWM_GRAD (PWM_GRAD_AUTO = PWM_GRAD) 1 Automatic tuning (only with pwm_autoscale=1) PWM_GRAD_AUTO is initialized with PWM_GRAD and becomes optimized automatically during motion. Preconditions 1. PWM_OFS_AUTO has been automatically initialized. This requires standstill at IRUN for >130ms in order to a) detect standstill b) wait > 128 chopper cycles at IRUN and c) regulate PWM_OFS_AUTO so that -1 < PWM_SCALE_AUTO < 1 2. Motor running and 1.5 * PWM_OFS_AUTO < PWM_SCALE_SUM < 4* PWM_OFS_AUTO and PWM_SCALE_SUM < 255. Time required for tuning PWM_GRAD_AUTO About 8 fullsteps per change of +/-1. 0 User defined feed forward PWM amplitude. The current settings IRUN and IHOLD have no influence! The resulting PWM amplitude (limited to 0…255) is: PWM_OFS * ((CS_ACTUAL+1) / 32) + PWM_GRAD * 256 / TSTEP 1 Enable automatic current control (Reset default) %00: fPWM=2/1024 fCLK TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 33 0X70: PWMCONF – VOLTAGE MODE PWM STEALTHCHOP Bit 16 Name pwm_freq0 Function PWM frequency selection 15 14 13 12 11 10 9 8 PWM_ GRAD User defined amplitude gradient 7 6 5 4 3 2 1 0 PWM_ OFS User defined amplitude (offset) Comment %01: fPWM=2/683 fCLK %10: fPWM=2/512 fCLK %11: fPWM=2/410 fCLK Velocity dependent gradient for PWM amplitude: PWM_GRAD * 256 / TSTEP This value is added to PWM_AMPL to compensate for the velocity-dependent motor back-EMF. With automatic scaling (pwm_autoscale=1) the value is used for first initialization, only. Set PWM_GRAD to the application specific value (it can be read out from PWM_GRAD_AUTO) to speed up the automatic tuning process. An approximate value can be stored to OTP by programming OTP_PWM_GRAD. User defined PWM amplitude offset (0-255) related to full motor current (CS_ACTUAL=31) in stand still. (Reset default=36) When using automatic scaling (pwm_autoscale=1) the value is used for initialization, only. The autoscale function starts with PWM_SCALE_AUTO=PWM_OFS and finds the required offset to yield the target current automatically. PWM_OFS = 0 will disable scaling down motor current below a motor specific lower measurement threshold. This setting should only be used under certain conditions, i.e. when the power supply voltage can vary up and down by a factor of two or more. It prevents the motor going out of regulation, but it also prevents power down below the regulation limit. PWM_OFS > 0 allows automatic scaling to low PWM duty cycles even below the lower regulation threshold. This allows low (standstill) current settings based on the actual (hold) current scale (register IHOLD_IRUN). www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 5.5.3 34 DRV_STATUS – Driver Status Flags 0X6F: DRV_STATUS – DRIVER STATUS FLAGS AND CURRENT LEVEL READ BACK Bit 31 Name stst Function standstill indicator 30 stealth StealthChop indicator 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 - reserved Comment This flag indicates motor stand still in each operation mode. This occurs 2^20 clocks after the last step pulse. 1: Driver operates in StealthChop mode 0: Driver operates in SpreadCycle mode Ignore these bits. - reserved Ignore these bits. CS_ ACTUAL actual motor current / smart energy current Actual current control scaling, for monitoring the function of the automatic current scaling. - reserved Ignore these bits. t157 t150 t143 t120 olb 6 ola 5 s2vsb 4 s2vsa 3 s2gb 2 s2ga 1 ot 157°C comparator 150°C comparator 143°C comparator 120°C comparator open load indicator phase B open load indicator phase A low side short indicator phase B low side short indicator phase A short to ground indicator phase B short to ground indicator phase A overtemperature flag 0 otpw 1: Temperature threshold is exceeded 1: Temperature threshold is exceeded 1: Temperature threshold is exceeded 1: Temperature threshold is exceeded 1: Open load detected on phase A or B. Hint: This is just an informative flag. The driver takes no action upon it. False detection may occur in fast motion and standstill. Check during slow motion, only. 1: Short on low-side MOSFET detected on phase A or B. The driver becomes disabled. The flags stay active, until the driver is disabled by software (TOFF=0) or by the ENN input. Flags are separate for both chopper modes. 1: Short to GND detected on phase A or B. The driver becomes disabled. The flags stay active, until the driver is disabled by software (TOFF=0) or by the ENN input. Flags are separate for both chopper modes. 1: The selected overtemperature limit has been reached. Drivers become disabled until otpw is also cleared due to cooling down of the IC. The overtemperature flag is common for both bridges. 1: The selected overtemperature pre-warning threshold is exceeded. The overtemperature pre-warning flag is common for both bridges. www.trinamic.com overtemperature prewarning flag TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 6 35 StealthChop™ StealthChop is an extremely quiet mode of operation for stepper motors. It is based on a voltage mode PWM. In case of standstill and at low velocities, the motor is absolutely noiseless. Thus, StealthChop operated stepper motor applications are very suitable for indoor or home use. The motor operates absolutely free of vibration at low velocities. With StealthChop, the motor current is applied by driving a certain effective voltage into the coil, using a voltage mode PWM. With the enhanced StealthChop2, the driver automatically adapts to the application for best performance. No more configurations are required. Optional configuration allows for tuning the setting in special cases, or for storing initial values for the automatic adaptation algorithm. For high velocity consider SpreadCycle in combination with StealthChop. Figure 6.1 Motor coil sine wave current with StealthChop (measured with current probe) 6.1 Automatic Tuning StealthChop2 integrates an automatic tuning procedure (AT), which adapts the most important operating parameters to the motor automatically. This way, StealthChop2 allows high motor dynamics and supports powering down the motor to very low currents. Just two steps have to be respected by the motion controller for best results: Start with the motor in standstill, but powered with nominal run current (AT#1). Move the motor at a medium velocity, e.g. as part of a homing procedure (AT#2). Figure 6.2 shows the tuning procedure. Border conditions in for AT#1 and AT#2 are shown in the following table: AUTOMATIC TUNING TIMING AND BORDER CONDITIONS Step AT#1 Parameter PWM_ OFS_AUTO AT#2 PWM_ GRAD_AUTO www.trinamic.com Conditions - Motor in standstill and actual current scale (CS) is identical to run current (IRUN). - If standstill reduction is enabled (pin PDN_UART=0), an initial step pulse switches the drive back to run current. - Pins VS and VREF at operating level. - Motor must move at a velocity, where a significant amount of back EMF is generated and where the full run current can be reached. Conditions: - 1.5 * PWM_OFS_AUTO < PWM_SCALE_SUM < 4 * PWM_OFS_AUTO - PWM_SCALE_SUM < 255. Hint: A typical range is 60-300 RPM. Determine best conditions with the evaluation board and monitor PWM_SCALE_AUTO going down to zero during tuning. Duration ≤ 2^20+2*2^18 tCLK, ≤ 130ms (with internal clock) 8 fullsteps are required for a change of +/-1. For a typical motor with PWM_GRAD_AUTO optimum at 64 or less, up to 400 fullsteps are required when starting from OTP default 14. TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 36 Power Up PWM_GRAD_AUTO becomes initialized by OTP Driver Enabled? N Y Stand still N Y N AT#1 Driver Enabled? Standstill reduction enabled? Y Issue (at least) a single step pulse and stop again, to power motor to run current stealthChop2 regulates to nominal current and stores result to PWM_OFS_AUTO (Requires stand still for >130ms) PWM_ GRAD_AUTO stored in OTP? Y N AT#2 Homing Move the motor, e.g. for homing. Include a constant, medium velocity ramp segment. stealthChop2 regulates to nominal current and optimizes PWM_GRAD_AUTO (requires 8 fullsteps per change of 1, typically a few 100 fullsteps in sum) Ready stealthChop2 settings are optimized! Option with UART Store PWM_GRAD_AUTO or write to OTP for faster tuning procedure stealthChop2 keeps tuning during subsequent motion and stand still periods adapting to motor heating, supply variations, etc. Figure 6.2 StealthChop2 automatic tuning procedure Attention Modifying VREF or the supply voltage VS invalidates the result of the automatic tuning process. Motor current regulation cannot compensate significant changes until next AT#1 phase. Automatic tuning adapts to changed conditions whenever AT#1 and AT#2 conditions are fulfilled in the later operation. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 37 6.2 StealthChop Options UART In order to match the motor current to a certain level, the effective PWM voltage becomes scaled depending on the actual motor velocity. Several additional factors influence the required voltage level to drive the motor at the target current: The motor resistance, its back EMF (i.e. directly proportional to its velocity) as well as the actual level of the supply voltage. Two modes of PWM regulation are provided: The automatic tuning mode (AT) using current feedback (pwm_autoscale = 1, pwm_autograd = 1) and a feed forward velocity-controlled mode (pwm_autoscale = 0). The feed forward velocity-controlled mode will not react to a change of the supply voltage or to events like a motor stall, but it provides very stable amplitude. It does not use nor require any means of current measurement. This is perfect when motor type and supply voltage are well known. Therefore, we recommend the automatic mode, unless current regulation is not satisfying in the given operating conditions. It is recommended to operate in automatic tuning mode. Non-automatic mode (pwm_autoscale=0) should be considered only with well-known motor and operating conditions. In this case, programming via the UART interface is required. The operating parameters PWM_GRAD and PWM_OFS can be determined in automatic tuning mode initially. Hint: In non-automatic mode the power supply current directly reflects mechanical load on the motor. The StealthChop PWM frequency can be chosen in four steps in order to adapt the frequency divider to the frequency of the clock source. A setting in the range of 20-50kHz is good for most applications. It balances low current ripple and good higher velocity performance vs. dynamic power dissipation. CHOICE OF PWM FREQUENCY FOR STEALTHCHOP Clock frequency fCLK PWM_FREQ=%00 fPWM=2/1024 fCLK 18MHz 16MHz 12MHz (internal) 10MHz 8MHz 35.2kHz 31.3kHz 23.4kHz 19.5kHz 15.6kHz PWM_FREQ=%01 fPWM=2/683 fCLK (default) 52.7kHz 46.9kHz 35.1kHz 29.3kHz 23.4kHz PWM_FREQ=%10 fPWM=2/512 fCLK (OTP option) 70.3kHz 62.5kHz 46.9kHz 39.1kHz 31.2kHz PWM_FREQ=%11 fPWM=2/410 fCLK 87.8kHz 78.0kHz 58.5kHz 48.8kHz 39.0kHz Table 6.1 Choice of PWM frequency – green / light green: recommended 6.3 StealthChop Current Regulator In StealthChop voltage PWM mode, the autoscaling function (pwm_autoscale = 1, pwm_autograd = 1) regulates the motor current to the desired current setting. Automatic scaling is used as part of the automatic tuning process (AT), and for subsequent tracking of changes within the motor parameters. The driver measures the motor current during the chopper on time and uses a proportional regulator to regulate PWM_SCALE_AUTO in order match the motor current to the target current. PWM_REG is the proportionality coefficient for this regulator. Basically, the proportionality coefficient should be as small as possible in order to get a stable and soft regulation behavior, but it must be large enough to allow the driver to quickly react to changes caused by variation of the motor target current (e.g. change of VREF). During initial tuning step AT#2, PWM_REG also compensates for the change of motor velocity. Therefore, a high acceleration during AT#2 will require a higher setting of PWM_REG. With careful selection of homing velocity and acceleration, a minimum setting of the regulation gradient often is sufficient (PWM_REG=1). PWM_REG setting should be optimized for the fastest required acceleration and deceleration ramp (compare Figure 6.3 and Figure 6.4). The quality of the setting PWM_REG in phase AT#2 and the finished automatic tuning procedure (or non-automatic settings for PWM_OFS and PWM_GRAD) can be examined when monitoring motor current during an acceleration phase Figure 6.5. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 38 Figure 6.3 Scope shot: good setting for PWM_REG Figure 6.4 Scope shot: too small setting for PWM_REG during AT#2 Motor Current PWM scale Motor Velocity PWM reaches max. amplitude RMS current constant (IRUN) PW M_ Nominal Current (sine wave RMS) Stand still PWM scale PWM_OFS_(AUTO) ok ok O) UT (_A AD GR M_ PW GR (P AD W M_ (_A RE UT G O) du ok rin g AT #2 ok ) 255 Current may drop due to high velocity IHOLD PWM_OFS_(AUTO) ok 0 0 Figure 6.5 Successfully determined PWM_GRAD(_AUTO) and PWM_OFS(_AUTO) www.trinamic.com Time TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 39 Quick Start For a quick start, see the Quick Configuration Guide in chapter 16. 6.3.1 Lower Current Limit The StealthChop current regulator imposes a lower limit for motor current regulation. As the coil current can be measured in the shunt resistor during chopper on phase only, a minimum chopper duty cycle allowing coil current regulation is given by the blank time as set by TBL and by the chopper frequency setting. Therefore, the motor specific minimum coil current in StealthChop autoscaling mode rises with the supply voltage and with the chopper frequency. A lower blanking time allows a lower current limit. It is important for the correct determination of PWM_OFS_AUTO, that in AT#1 the run current set by the sense resistor, VREF and IRUN is well within the regulation range. Lower currents (e.g. for standstill power down) are automatically realized based on PWM_OFS_AUTO and PWM_GRAD_AUTO respectively based on PWM_OFS and PWM_GRAD with non-automatic current scaling. The freewheeling option allows going to zero motor current. Lower motor coil current limit for StealthChop2 automatic tuning: 𝐼𝐿𝑜𝑤𝑒𝑟 𝐿𝑖𝑚𝑖𝑡 = 𝑡𝐵𝐿𝐴𝑁𝐾 ∗ 𝑓𝑃𝑊𝑀 ∗ 𝑉𝑀 𝑅𝐶𝑂𝐼𝐿 With VM the motor supply voltage and RCOIL the motor coil resistance. ILower Limit can be treated as a thumb value for the minimum nominal IRUN motor current setting. EXAMPLE: A motor has a coil resistance of 5Ω, the supply voltage is 24V. With TBL=%01 and PWM_FREQ=%00, tBLANK is 24 clock cycles, fPWM is 2/(1024 clock cycles): 𝐼𝐿𝑜𝑤𝑒𝑟 𝐿𝑖𝑚𝑖𝑡 = 24 𝑡𝐶𝐿𝐾 ∗ 2 24𝑉 24 24𝑉 ∗ = ∗ = 225𝑚𝐴 1024 𝑡𝐶𝐿𝐾 5Ω 512 5Ω This means, the motor target current for automatic tuning must be 225mA or more, taking into account all relevant settings. This lower current limit also applies for modification of the motor current via the analog input VREF. Attention For automatic tuning, a lower coil current limit applies. The motor current in automatic tuning phase AT#1 must exceed this lower limit. ILOWER LIMIT can be calculated or measured using a current probe. Setting the motor run-current or hold-current below the lower current limit during operation by modifying IRUN and IHOLD is possible after successful automatic tuning. With StealthChop, ensure that IRUN is in the range 8 to 31. Set vsense to yield lower current setting! The lower current limit also limits the capability of the driver to respond to changes of VREF. 6.4 Velocity Based Scaling UART Velocity based scaling scales the StealthChop amplitude based on the time between each two steps, i.e. based on TSTEP, measured in clock cycles. This concept basically does not require a current measurement, because no regulation loop is necessary. A pure velocity-based scaling is available via UART programming, only, when setting pwm_autoscale = 0. The basic idea is to have a linear approximation of the voltage required to drive the target current into the motor. The stepper motor has a certain coil resistance and thus needs a certain voltage amplitude to yield a target current based on the basic formula I=U/R. With R being the coil resistance, U the supply voltage scaled by the PWM value, the current I results. The initial value for PWM_AMPL can be calculated: www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 𝑃𝑊𝑀_𝐴𝑀𝑃𝐿 = 40 374 ∗ 𝑅𝐶𝑂𝐼𝐿 ∗ 𝐼𝐶𝑂𝐼𝐿 𝑉𝑀 With VM the motor supply voltage and ICOIL the target RMS current The effective PWM voltage UPWM (1/SQRT(2) x peak value) results considering the 8 bit resolution and 248 sine wave peak for the actual PWM amplitude shown as PWM_SCALE: 𝑈𝑃𝑊𝑀 = 𝑉𝑀 ∗ 𝑃𝑊𝑀_𝑆𝐶𝐴𝐿𝐸 248 1 𝑃𝑊𝑀_𝑆𝐶𝐴𝐿𝐸 ∗ ∗ = 𝑉𝑀 ∗ 256 256 √2 374 With rising motor velocity, the motor generates an increasing back EMF voltage. The back EMF voltage is proportional to the motor velocity. It reduces the PWM voltage effective at the coil resistance and thus current decreases. The TMC2226 provides a second velocity dependent factor (PWM_GRAD) to compensate for this. The overall effective PWM amplitude (PWM_SCALE_SUM) in this mode automatically is calculated in dependence of the microstep frequency as: 𝑓𝑆𝑇𝐸𝑃 𝑓𝐶𝐿𝐾 With fSTEP being the microstep frequency for 256 microstep resolution equivalent and fCLK the clock frequency supplied to the driver or the actual internal frequency 𝑃𝑊𝑀_𝑆𝐶𝐴𝐿𝐸_𝑆𝑈𝑀 = 𝑃𝑊𝑀_𝑂𝐹𝑆 + 𝑃𝑊𝑀_𝐺𝑅𝐴𝐷 ∗ 256 ∗ As a first approximation, the back EMF subtracts from the supply voltage and thus the effective current amplitude decreases. This way, a first approximation for PWM_GRAD setting can be calculated: 𝑃𝑊𝑀_𝐺𝑅𝐴𝐷 = 𝐶𝐵𝐸𝑀𝐹 [ 𝑉 𝑓𝐶𝐿𝐾 ∗ 1.46 ] ∗ 2𝜋 ∗ 𝑟𝑎𝑑 𝑉𝑀 ∗ 𝑀𝑆𝑃𝑅 𝑠 CBEMF is the back EMF constant of the motor in Volts per radian/second. MSPR is the number of microsteps per rotation, e.g. 51200 = 256µsteps multiplied by 200 fullsteps for a 1.8° motor. Motor current PWM scaling (PWM_SCALE_SUM) 255 PWM reaches max. amplitude Constant motor RMS current Nominal current (e.g. sine wave RMS) AD GR _ M PW Cur r (de ent dr p en ops mo d tor s on loa d) PWM_OFS 0 0 VPWMMAX Figure 6.6 Velocity based PWM scaling (pwm_autoscale=0) www.trinamic.com Velocity TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 41 Hint The values for PWM_OFS and PWM_GRAD can easily be optimized by tracing the motor current with a current probe on the oscilloscope. Alternatively, automatic tuning determines these values and they can be read out from PWM_OFS_AUTO and PWM_GRAD_AUTO. UNDERSTANDING THE BACK EMF CONSTANT OF A MOTOR The back EMF constant is the voltage a motor generates when turned with a certain velocity. Often motor datasheets do not specify this value, as it can be deducted from motor torque and coil current rating. Within SI units, the back EMF constant CBEMF has the same numeric value as the torque constant. For example, a motor with a torque constant of 1 Nm/A would have a CBEMF of 1V/rad/s. Turning such a motor with 1 rps (1 rps = 1 revolution per second = 6.28 rad/s) generates a back EMF voltage of 6.28V. Thus, the back EMF constant can be calculated as: 𝐶𝐵𝐸𝑀𝐹 [ 𝑉 𝐻𝑜𝑙𝑑𝑖𝑛𝑔𝑇𝑜𝑟𝑞𝑢𝑒[𝑁𝑚] ]= 𝑟𝑎𝑑/𝑠 2 ∗ 𝐼𝐶𝑂𝐼𝐿𝑁𝑂𝑀 [𝐴] ICOILNOM is the motor’s rated phase current for the specified holding torque HoldingTorque is the motor specific holding torque, i.e. the torque reached at ICOILNOM on both coils. The torque unit is [Nm] where 1Nm = 100Ncm = 1000mNm. The BEMF voltage is valid as RMS voltage per coil, thus the nominal current has a factor of 2 in this formula. 6.5 Combine StealthChop and SpreadCycle UART OTP For applications requiring high velocity motion, SpreadCycle may bring more stable operation in the upper velocity range. To combine no-noise operation with highest dynamic performance, the TMC2226 allows combining StealthChop and SpreadCycle based on a velocity threshold (Figure 6.7). A velocity threshold (TPWMTHRS) can be preprogrammed to OTP to support this mode even in standalone operation. With this, StealthChop is only active at low velocities. Chopper mode stealthChop spreadCycle option option motor going to standby motor in standby motor stand still Running low speed Running high speed Running low speed TSTEP < TPWMTHRS*16/16 TSTEP > TPWMTHRS motor in standby v 0 t RMS current TRINAMIC, B. Dwersteg, 14.3.14 Figure 6.7 TPWMTHRS for optional switching to SpreadCycle www.trinamic.com dI * IHOLDDELAY VACTUAL ~1/TSTEP TPOWERDOWN current I_RUN I_HOLD TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 42 As a first step, both chopper principles should be parameterized and optimized individually (SpreadCycle settings may be programmed to OTP memory). In a next step, a transfer velocity has to be fixed. For example, StealthChop operation is used for precise low speed positioning, while SpreadCycle shall be used for highly dynamic motion. TPWMTHRS determines the transition velocity. Read out TSTEP when moving at the desired velocity and program the resulting value to TPWMTHRS. Use a low transfer velocity to avoid a jerk at the switching point. A jerk occurs when switching at higher velocities, because the back-EMF of the motor (which rises with the velocity) causes a phase shift of up to 90° between motor voltage and motor current. So when switching at higher velocities between voltage PWM and current PWM mode, this jerk will occur with increased intensity. A high jerk may even produce a temporary overcurrent condition (depending on the motor coil resistance). At low velocities (e.g. 1 to a few 10 RPM), it can be completely neglected for most motors. Therefore, consider the switching jerk when choosing TPWMTHRS. Set TPWMTHRS zero if you want to work with StealthChop only. When enabling the StealthChop mode the first time using automatic current regulation, the motor must be at stand still in order to allow a proper current regulation. When the drive switches to StealthChop at a higher velocity, StealthChop logic stores the last current regulation setting until the motor returns to a lower velocity again. This way, the regulation has a known starting point when returning to a lower velocity, where StealthChop becomes re-enabled. Therefore, neither the velocity threshold nor the supply voltage must be considerably changed during the phase while the chopper is switched to a different mode, because otherwise the motor might lose steps or the instantaneous current might be too high or too low. A motor stall or a sudden change in the motor velocity may lead to the driver detecting a short circuit or to a state of automatic current regulation, from which it cannot recover. Clear the error flags and restart the motor from zero velocity to recover from this situation. Hint Start the motor from standstill when switching on StealthChop the first time and keep it stopped for at least 128 chopper periods to allow StealthChop to do initial standstill current control. 6.6 Flags in StealthChop UART As StealthChop uses voltage mode driving, status flags based on current measurement respond slower, respectively the driver reacts delayed to sudden changes of back EMF, like on a motor stall. Attention A motor stall, or abrupt stop of the motion during operation in StealthChop can trigger an overcurrent condition. Depending on the previous motor velocity, and on the coil resistance of the motor, it significantly increases motor current for a time of several 10ms. With low velocities, where the back EMF is just a fraction of the supply voltage, there is no danger of triggering the short detection. When homing using StallGuard4 to stop the motor upon stall, this is basically avoided. 6.6.1 Open Load Flags In StealthChop mode, status information is different from the cycle-by-cycle regulated SpreadCycle mode. OLA and OLB show if the current regulation sees that the nominal current can be reached on both coils. - A flickering OLA or OLB can result from asymmetries in the sense resistors or in the motor coils. An interrupted motor coil leads to a continuously active open load flag for the coil. One or both flags are active, if the current regulation did not succeed in scaling up to the full target current within the last few fullsteps (because no motor is attached or a high velocity exceeds the PWM limit). If desired, do an on-demand open load test using the SpreadCycle chopper, as it delivers the safest result. With StealthChop, PWM_SCALE_SUM can be checked to detect the correct coil resistance. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 6.6.2 43 PWM_SCALE_SUM Informs about the Motor State Information about the motor state is available with automatic scaling by reading out PWM_SCALE_SUM. As this parameter reflects the actual voltage required to drive the target current into the motor, it depends on several factors: motor load, coil resistance, supply voltage, and current setting. Therefore, an evaluation of the PWM_SCALE_SUM value allows checking the motor operation point. When reaching the limit (255), the current regulator cannot sustain the full motor current, e.g. due to a drop in supply volage. 6.7 Freewheeling and Passive Braking UART StealthChop provides different options for motor standstill. These options can be enabled by setting the standstill current IHOLD to zero and choosing the desired option using the FREEWHEEL setting. The desired option becomes enabled after a time period specified by TPOWERDOWN and IHOLD_DELAY. Current regulation becomes frozen once the motor target current is at zero current in order to ensure a quick startup. With the freewheeling options, both freewheeling and passive braking can be realized. Passive braking is an effective eddy current motor braking, which consumes a minimum of energy, because no active current is driven into the coils. However, passive braking will allow slow turning of the motor when a continuous torque is applied. Hint Operate the motor within your application when exploring StealthChop. Motor performance often is better with a mechanical load, because it prevents the motor from stalling due mechanical oscillations which can occur without load. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 44 PARAMETERS RELATED TO STEALTHCHOP Parameter en_spread_ cycle TPWMTHRS PWM_LIM pwm_ autoscale pwm_ autograd Description General disable for use of StealthChop (register GCONF). The input SPREAD is XORed to this flag. Specifies the upper velocity for operation in StealthChop. Entry the TSTEP reading (time between two microsteps) when operating at the desired threshold velocity. Limiting value for limiting the current jerk when switching from SpreadCycle to StealthChop. Reduce the value to yield a lower current jerk. Enable automatic current scaling using current measurement or use forward controlled velocity based mode. Enable automatic tuning of PWM_GRAD_AUTO Setting 1 0 0… 1048575 Comment Do not use StealthChop StealthChop enabled StealthChop is disabled if TSTEP falls TPWMTHRS 0 … 15 Upper four bits of 8 bit amplitude limit (Default=12) Forward controlled mode Automatic scaling with current regulator disable, use PWM_GRAD from register instead enable fPWM=2/1024 fCLK fPWM=2/683 fCLK fPWM=2/512 fCLK fPWM=2/410 fCLK Results in 0.5 to 7.5 steps for PWM_SCALE_AUTO regulator per fullstep PWM_OFS=0 disables linear current scaling based on current setting Reset value can be preprogrammed by OTP 0 1 0 1 0 1 2 3 PWM_REG User defined PWM amplitude (gradient) for velocity 1 … 15 based scaling or regulation loop gradient when pwm_autoscale=1. PWM_OFS User defined PWM amplitude (offset) for velocity 0 … 255 based scaling and initialization value for automatic tuning of PWM_OFFS_AUTO. PWM_GRAD User defined PWM amplitude (gradient) for velocity 0 … 255 based scaling and initialization value for automatic tuning of PWM_GRAD_AUTO. FREEWHEEL Stand still option when motor current setting is 0 zero (I_HOLD=0). Only available with StealthChop 1 enabled. The freewheeling option makes the motor 2 easy movable, while both coil short options realize 3 a passive brake. PWM_SCALE Read back of the actual StealthChop voltage PWM -255 … _AUTO scaling correction as determined by the current 255 regulator. Should regulate to a value close to 0 during tuning procedure. PWM_GRAD Allow monitoring of the automatic tuning and 0 … 255 _AUTO determination of initial values for PWM_OFS and PWM_OFS PWM_GRAD. _AUTO TOFF General enable for the motor driver, the actual 0 value does not influence StealthChop 1 … 15 TBL Comparator blank time. This time needs to safely 0 cover the switching event and the duration of the 1 ringing on the sense resistor. Choose a setting of 1 2 or 2 for typical applications. For higher capacitive 3 loads, 3 may be required. Lower settings allow StealthChop to regulate down to lower coil current values. PWM_FREQ PWM frequency selection. Use the lowest setting giving good results. The frequency measured at each of the chopper outputs is half of the effective chopper frequency fPWM. www.trinamic.com Normal operation Freewheeling Coil short via LS drivers Coil short cia HS drivers (read only) Scaling value becomes frozen when operating in SpreadCycle (read only) Driver off Driver enabled 16 tCLK 24 tCLK 32 tCLK 40 tCLK TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 7 45 SpreadCycle Chopper While StealthChop is a voltage mode PWM controlled chopper, SpreadCycle is a cycle-by-cycle current control. Therefore, it can react extremely fast to changes in motor velocity or motor load. SpreadCycle will give better performance in medium to high velocity range for motors and applications which tend to resonance. 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.1 Chopper phases Although the current could be regulated using only on phases and fast decay phases, insertion of the slow decay phase is important to reduce electrical losses and current ripple in the motor. The duration of the slow decay phase is specified in a control parameter and sets an upper limit on the chopper frequency. The current comparator can measure coil current during phases when the current flows through the sense resistor, but not during the slow decay phase, so the slow decay phase is terminated by a timer. The on phase is terminated by the comparator when the current through the coil reaches the target current. The fast decay phase may be terminated by either the comparator or another timer. When the coil current is switched, spikes at the sense resistors occur due to charging and discharging parasitic capacitances. During this time, typically one or two microseconds, the current cannot be measured. Blanking is the time when the input to the comparator is masked to block these spikes. The SpreadCycle chopper mode cycles through four phases: on, slow decay, fast decay, and a second slow decay. The chopper frequency is an important parameter for a chopped motor driver. A too low frequency might generate audible noise. A higher frequency reduces current ripple in the motor, but with a too high frequency magnetic losses may rise. Also power dissipation in the driver rises with increasing frequency due to the increased influence of switching slopes causing dynamic dissipation. Therefore, a compromise needs to be found. Most motors are optimally working in a frequency range of 16 kHz to 30 kHz. The chopper frequency is influenced by a number of parameter settings as well as by the motor inductivity and supply voltage. Hint A chopper frequency in the range of 16 kHz to 30 kHz gives a good result for most motors when using SpreadCycle. A higher frequency leads to increased switching losses. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 7.1 SpreadCycle Settings 46 UART OTP The SpreadCycle (patented) chopper algorithm is a precise and simple to use chopper mode which automatically determines the optimum length for the fast-decay phase. The SpreadCycle will provide superior microstepping quality even with default settings. Several parameters are available to optimize the chopper to the application. Each chopper cycle is comprised of an on phase, a slow decay phase, a fast decay phase and a second slow decay phase (see Figure 7.3). The two slow decay phases and the two blank times per chopper cycle put an upper limit to the chopper frequency. The slow decay phases typically make up for about 30%-70% of the chopper cycle in standstill and are important for low motor and driver power dissipation. Calculation of a starting value for the slow decay time TOFF: EXAMPLE: Target Chopper frequency: 25kHz. Assumption: Two slow decay cycles make up for 50% of overall chopper cycle time 𝑡𝑂𝐹𝐹 = For the TOFF setting this means: 1 50 1 ∗ ∗ = 10µ𝑠 25𝑘𝐻𝑧 100 2 𝑇𝑂𝐹𝐹 = (𝑡𝑂𝐹𝐹 ∗ 𝑓𝐶𝐿𝐾 − 24)/32 With 12 MHz clock this gives a setting of TOFF=3.0, i.e. 3. With 16 MHz clock this gives a setting of TOFF=4.25, i.e. 4 or 5. The hysteresis start setting forces the driver to introduce a minimum amount of current ripple into the motor coils. The current ripple must be higher than the current ripple which is caused by resistive losses in the motor in order to give best microstepping results. This will allow the chopper to precisely regulate the current both for rising and for falling target current. The time required to introduce the current ripple into the motor coil also reduces the chopper frequency. Therefore, a higher hysteresis setting will lead to a lower chopper frequency. The motor inductance limits the ability of the chopper to follow a changing motor current. Further the duration of the on phase and the fast decay must be longer than the blanking time, because the current comparator is disabled during blanking. It is easiest to find the best setting by starting from a low hysteresis setting (e.g. HSTRT=0, HEND=0) and increasing HSTRT, until the motor runs smoothly at low velocity settings. This can best be checked when measuring the motor current either with a current probe or by probing the sense resistor voltages (see Figure 7.2). Checking the sine wave shape near zero transition will show a small ledge between both half waves in case the hysteresis setting is too small. At medium velocities (i.e. 100 to 400 fullsteps per second), a too low hysteresis setting will lead to increased humming and vibration of the motor. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 47 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. Quick Start For a quick start, see the Quick Configuration Guide in chapter 16. For detail procedure see Application Note AN001 - Parameterization of SpreadCycle As experiments show, the setting is quite independent of the motor, because higher current motors typically also have a lower coil resistance. Therefore, choosing a low to medium default value for the hysteresis (for example, effective hysteresis = 4) normally fits most applications. The setting can be optimized by experimenting with the motor: A too low setting will result in reduced microstep accuracy, while a too high setting will lead to more chopper noise and motor power dissipation. When measuring the sense resistor voltage in motor standstill at a medium coil current with an oscilloscope, a too low setting shows a fast decay phase not longer than the blanking time. When the fast decay time becomes slightly longer than the blanking time, the setting is optimum. You can reduce the off-time setting, if this is hard to reach. The hysteresis principle could in some cases lead to the chopper frequency becoming too low, e.g. when the coil resistance is high when compared to the supply voltage. This is avoided by splitting the hysteresis setting into a start setting (HSTRT+HEND) and an end setting (HEND). An automatic hysteresis decrementer (HDEC) interpolates between both settings, by decrementing the hysteresis value stepwise each 16 system clocks. At the beginning of each chopper cycle, the hysteresis begins with a value which is the sum of the start and the end values (HSTRT+HEND), and decrements during the cycle, until either the chopper cycle ends or the hysteresis end value (HEND) is reached. This way, the chopper frequency is stabilized at high amplitudes and low supply voltage situations, if the frequency gets too low. This avoids the frequency reaching the audible range. Hint Highest motor velocities sometimes benefit from setting TOFF to 1 or 2 and a short TBL of 1 or 0. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 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 7.3 SpreadCycle chopper scheme showing coil current during a chopper cycle These parameters control SpreadCycle mode: Parameter TOFF TBL HSTRT HEND Description Sets the slow decay time (off time). This setting also limits the maximum chopper frequency. For operation with StealthChop, this parameter is not used, but it is required to enable the motor. In case of operation with StealthChop only, any setting is OK. Setting this parameter to zero completely disables all driver transistors and the motor can free-wheel. Comparator blank time. This time needs to safely cover the switching event and the duration of the ringing on the sense resistor. For most applications, a setting of 1 or 2 is good. For highly capacitive loads, a setting of 2 or 3 will be required. Setting 0 1…15 Comment chopper off off time setting NCLK= 24 + 32*TOFF (1 will work with minimum blank time of 24 clocks) 0 16 tCLK 1 24 tCLK 2 32 tCLK 3 40 tCLK Hysteresis start setting. This value is an offset from 0…7 the hysteresis end value HEND. HSTRT=1…8 Hysteresis end setting. Sets the hysteresis end value 0…2 after a number of decrements. The sum HSTRT+HEND 3 must be ≤16. At a current setting of max. 30 (amplitude 4…15 reduced to 240), the sum is not limited. -3…-1: negative HEND This value adds to HEND. 0: zero HEND 1…12: positive HEND Even at HSTRT=0 and HEND=0, the TMC2226 sets a minimum hysteresis via analog circuitry. EXAMPLE: A hysteresis of 4 has been chosen. You might decide to not use hysteresis decrement. In this case set: HEND=6 HSTRT=0 (sets an effective end value of 6-3=3) (sets minimum hysteresis, i.e. 1: 3+1=4) In order to take advantage of the variable hysteresis, we can set most of the value to the HSTRT, i.e. 4, and the remaining 1 to hysteresis end. The resulting configuration register values are as follows: HEND=0 HSTRT=6 www.trinamic.com (sets an effective end value of -3) (sets an effective start value of hysteresis end +7: 7-3=4) TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 8 49 Selecting Sense Resistors Set the desired maximum motor current by selecting an appropriate value for the sense resistor. The following table shows the RMS current values which can be reached using standard resistors and motor types fitting without additional motor current scaling. CHOICE OF RSENSE AND RESULTING MAX. MOTOR CURRENT RSENSE [Ω] 1.00 0.82 0.75 0.68 0.50 470m 390m 330m 270m 220m 180m 150m 120m 100m 75m *) Value RMS current [A] Fitting motor type VREF=2.5V (or open), (examples) IRUN=31, vsense=0 (standard) 0.23 0.27 0.30 300mA motor 0.33 400mA motor 0.44 0.47 500mA motor 0.56 600mA motor 0.66 700mA motor 0.79 800mA motor 0.96 1A motor 1.15 1.2A motor 1.35 1.5A motor 1.64 1.7A motor 1.92 2A motor 2.4*) exceeds upper current rating, scaling down required, e.g. by reduced VREF. Sense resistors should be carefully selected. The full motor current flows through the sense resistors. Due to chopper operation the sense resistors see pulsed current from the MOSFET bridges. Therefore, a low-inductance type such as film or composition resistors is required to prevent voltage spikes causing ringing on the sense voltage inputs leading to unstable measurement results. Also, a low-inductance, low-resistance PCB layout is essential. Any common GND path for the two sense resistors must be avoided, because this would lead to coupling between the two current sense signals. A massive ground plane is best. Please also refer to layout considerations in chapter 21. The sense resistor needs to be able to conduct the peak motor coil current in motor standstill conditions, unless standby power is reduced. Under normal conditions, the sense resistor conducts less than the coil RMS current, because no current flows through the sense resistor during the slow decay phases. A 0.5W type is sufficient for most applications up to 1.2A RMS current. Attention Be sure to use a symmetrical sense resistor layout and short and straight sense resistor traces of identical length. Well matching sense resistors ensure best performance. A compact layout with massive ground plane is best to avoid parasitic resistance effects. Check the resulting motor current in a practical application and with the desired motor. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 9 50 Motor Current Control The basic motor current is set by the resistance of the sense resistors. Several possibilities allow scaling down motor current, e.g. to adapt for different motors, or to reduce motor current in standstill or low load situations. METHODS FOR SCALING MOTOR CURRENT Method Pin VREF voltage (chapter 9.1) Parameters VREF input scales IRUN and IHOLD. Can be disabled by GCONF.i_scale_analog Range 2.5V: 100% … 0.5V: 20% >2.5V or open: 100% 20kHz 0-2.4V for current scaling 22k 1µ R1+R2»10K Analog Scaling Fixed resistor divider to set current scale (use external reference for enhanced precision) Analog Scaling Precision current scaler Figure 9.1 Scaling the motor current using the analog input www.trinamic.com VREF BC847 VREF 100k VREF Optional digital control Analog Scaling Simple PWM based current scaler TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 53 10 Internal Sense Resistors UART OTP The TMC2226 provides the option to eliminate external sense resistors. In this mode the external sense resistors become omitted (shorted) and the internal on-resistance of the power MOSFETs is used for current measurement (see chapter 3.2). As MOSFETs are both, temperature dependent and subject to production stray, a tiny external resistor connected from +5VOUT to VREF provides a precise absolute current reference. This resistor converts the 5V voltage into a reference current. Be sure to directly attach BRA and BRB pins to GND in this mode near the IC package. The mode is enabled by setting internal_Rsense in GCONF (OTP option). COMPARING INTERNAL SENSE RESISTORS VS. SENSE RESISTORS Item Ease of use Cost Current precision Current Range Recommended Recommended chopper Internal Sense Resistors Need to set OTP parameter before motor enable (+) Save cost for sense resistors Slightly reduced 200mA RMS to 1.4A RMS External Sense Resistors (+) Default StealthChop or SpreadCycle SpreadCycle shows slightly more distortion at >1.4A RMS StealthChop or SpreadCycle (+) Good 50mA to 2A RMS While the RDSon based measurements bring benefits concerning cost and size of the driver, it gives slightly less precise coil current regulation when compared to external sense resistors. The internal sense resistors have a certain temperature dependence, which is automatically compensated by the driver IC. However, for high current motors, a temperature gradient between the ICs internal sense resistors and the compensation circuit will lead to an initial current overshoot of some 10% during driver IC heat up. While this phenomenon shows for roughly a second, it might even be beneficial to enable increased torque during initial motor acceleration. PRINCIPLE OF OPERATION A reference current into the VREF pin is used as reference for the motor current. In order to realize a certain current, a single resistor (RREF) can be connected between 5VOUT and VREF (pls. refer the table for the choice of the resistor). VREF input resistance is about 0.45kOhm. The resulting current into VREF is amplified 3000 times. Thus, a current of 0.33mA yields a motor current of 1.0A peak, or 0.7A RMS. For calculation of the reference resistor, the internal resistance of VREF needs to be considered additionally. CHOICE OF RREF FOR OPERATION WITHOUT SENSE RESISTORS RREF [Ω] 6k2 6k8 7k5 8k2 9k1 10k 12k 15k 18k 22k 27k 33k Peak current [A] (CS=31, vsense=0) 2.26 1.92 1.76 1.63 1.49 1.36 1.15 0.94 0.79 0.65 0.60 0.54 www.trinamic.com RMS current [A] (CS=31, vsense=0) 1.59 1.35 1.24 1.15 1.05 0.96 0.81 0.66 0.55 0.45 0.42 0.38 TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 54 vsense=1 allows a lower peak current setting of about 55% of the value yielded with vsense=0 (as specified by VSRTH / VSRTL). In RDSon measurement mode, connect the BRA and BRB pins to GND using the shortest possible path (i.e. shortest possible PCB path). RDSon based measurement gives best results when combined with StealthChop. When using SpreadCycle with RDSon based current measurement, slightly asymmetric current measurement for positive currents (on phase) and negative currents (fast decay phase) may result in chopper noise. This especially occurs at high die temperature and increased motor current. Note The absolute current levels achieved with RDSon based current sensing may depend on PCB layout exactly like with external sense resistors, because trace resistance on BR pins will add to the effective sense resistance. Therefore, we recommend to measure and calibrate the current setting within the application. Thumb rule RDSon based current sensing works best for motors with up to 1.4A RMS current. The best results are yielded with StealthChop operation in combination with RDSon based current sensing. For most precise current control and for best results with SpreadCycle, it is recommended to use external 1% sense resistors rather than RDSon based current control. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 55 11 StallGuard4 Load Measurement UART StallGuard4 provides an accurate measurement of the load on the motor. It is developed for operation in conjunction with StealthChop. StallGuard can be used for stall detection as well as other uses at loads below those which stall the motor, such as CoolStep load-adaptive current reduction. The StallGuard4 measurement value changes linearly over a wide range of load, velocity, and current settings, as shown in Figure 11.1. When approaching maximum motor load, the value goes down to a motor-specific lower value. This corresponds to a load angle of 90° between the magnetic field of the coils and magnets in the rotor. This also is the most energy-efficient point of operation for the motor. 500 StallGuard4 reading SG_RESULT 450 Start value depends on motor, velocity and operating current 400 350 SG_RESULT reaches compare value and indicates danger of stall. This point is set by stallGuard threshold value SGTHRS. 300 100% load value depends on motor, operating current and velocity 250 200 Stall detection 150 threshold SGTHRS*2 high 100 Stall Output low 50 0 Motor stalls above this point. Load angle exceeds 90° and available torque sinks. 10 20 30 40 50 60 70 80 90 100 motor load (% max. torque) Figure 11.1 Function principle of StallGuard4 Parameter SGTHRS Description Setting This value controls the StallGuard4 threshold level 0… 255 for stall detection. It compensates for motor specific characteristics and controls sensitivity. A higher value gives a higher sensitivity. A higher value makes StallGuard4 more sensitive and requires less torque to indicate a stall. Comment The double of this value is compared to SG_RESULT. The stall output becomes active if SG_RESULT fall below this value. Status word SG_RESULT Description Range This is the StallGuard4 result. A higher reading 0… 510 indicates less mechanical load. A lower reading indicates a higher load and thus a higher load angle. Comment Low value: highest load High value: high load In order to use StallGuard4, check the sensitivity of the motor at border conditions. 11.1 StallGuard4 vs. StallGuard2 StallGuard4 is optimized for operation with StealthChop, its predecessor StallGuard2 works with SpreadCycle. The function is similar: Both deliver a load value, going from a high value at low load, to a low value at high load. While StallGuard2 becomes tuned to show a “0”-reading for stall detection, StallGuard4 uses a comparison-value to trigger stall detection, rather than shifting SG_RESULT itself. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 56 11.2 Tuning StallGuard4 The StallGuard4 value SG_RESULT is affected by motor-specific characteristics and application-specific demands on load, coil current, and velocity. Therefore, the easiest way to tune the StallGuard4 threshold SGTHRS for a specific motor type and operating conditions is interactive tuning in the actual application. INITIAL PROCEDURE FOR TUNING STALLGUARD SGTHRS 1. 2. 3. 4. Operate the motor at the normal operation velocity for your application and monitor SG_RESULT. Apply slowly increasing mechanical load to the motor. Check the lowest value of SG_RESULT before the motor stalls. Use this value as starting value for SGTHRS (apply half of the value). Now monitor the StallGuard output signal via DIAG output (configure properly, also set TCOOLTHRS to match the lower velocity limit for operation) and stop the motor when a pulse is seen on the respective output. Make sure, that the motor is safely stopped whenever it is stalled. Increase SGTHRS if the motor becomes stopped before a stall occurs. The optimum setting is reached when a stall is safely detected and leads to a pulse at DIAG in the moment where the stall occurs. SGTHRS in most cases can be tuned for a certain motion velocity or a velocity range. Make sure, that the setting works reliable in a certain range (e.g. 80% to 120% of desired velocity) and also under extreme motor conditions (lowest and highest applicable temperature). DIAG is pulsed by StallGuard, when SG_RESULT falls below SGTHRS. It is only enabled in StealthChop mode, and when TCOOLTHRS ≥ TSTEP > TPWMTHRS The external motion controller should react to a single pulse by stopping the motor if desired. Set TCOOLTHRS to match the lower velocity threshold where StallGuard delivers a good result. SG_RESULT measurement has a high resolution, and there are a few ways to enhance its accuracy, as described in the following sections. 11.3 StallGuard4 Update Rate The StallGuard4 measurement value SG_RESULT 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. 11.4 Detecting a Motor Stall To safely detect a motor stall, the stall threshold must be determined using a specific SGTHRS setting and a specific motor velocity or velocity range. Further, the motor current setting has a certain influence and should not be modified, once optimum values are determined. Therefore, the maximum load needs to be determined the motor can drive without stalling. At the same time, monitor SG_RESULT at this load. The stall threshold should be a value safely within the operating limits, to allow for parameter stray. More refined evaluation may also react to a change of SG_RESULT rather than comparing to a fixed threshold. This will rule out certain effects which influence the absolute value. 11.5 Limits of StallGuard4 Operation StallGuard4 does not operate reliably at extreme motor velocities: Very low motor velocities (for many motors, less than one revolution per second) generate a low back EMF and make the measurement unstable and dependent on environment conditions (temperature, etc.). Other conditions will also lead to a poor response of the measurement value SG_RESULT to the motor load. Very high motor velocities, in which the full sinusoidal current is not driven into the motor coils also leads to poor response. These velocities are typically characterized by the motor back EMF exceeding the supply voltage. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 57 12 CoolStep Operation UART CoolStep is an automatic smart energy optimization for stepper motors based on the motor mechanical load, making them “green”. 12.1 User Benefits Energy efficiency Motor generates less heat Less cooling infrastructure Cheaper motor – – – – consumption decreased up to 75% improved mechanical precision for motor and driver does the job! CoolStep allows substantial energy savings, especially for motors which see varying loads or operate at a high duty cycle. Because a stepper motor application needs to work with a torque reserve of 30% to 50%, even a constant-load application allows significant energy savings because CoolStep automatically enables torque reserve when required. Reducing power consumption keeps the system cooler, increases motor life, and allows reducing cost in the power supply and cooling components. Reducing motor current by half results in reducing power by a factor of four. 12.2 Setting up for CoolStep CoolStep is controlled by several parameters, but two are critical for understanding how it works: Parameter Description SEMIN 4-bit unsigned integer that sets a lower threshold. 0 If SG_RESULT goes below this threshold, CoolStep 1…15 increases the current to both coils. The 4-bit SEMIN value is scaled by 32 to cover the lower half of the range of the 10-bit SG value. (The name of this parameter is derived from SmartEnergy, which is an earlier name for CoolStep.) 4-bit unsigned integer that controls an upper 0…15 threshold. If SG is sampled equal to or above this threshold enough times, CoolStep decreases the current to both coils. The upper threshold is (SEMIN + SEMAX + 1)*32. SEMAX Figure - Range Comment disable CoolStep threshold is SEMIN*32 Once SGTHRS has been determined, use 1/16*SGTHRS+1 as a starting point for SEMIN. threshold is (SEMIN+SEMAX+1)*32 0 to 2 recommended 12.1 shows the operating regions of CoolStep: The black line represents the SG_RESULT measurement value. The blue line represents the mechanical load applied to the motor. The red line represents the current into the motor coils. When the load increases, SG_RESULT falls below SEMIN, and CoolStep increases the current. When the load decreases, SG_RESULT rises above (SEMIN + SEMAX + 1) * 32, and the current is reduced. www.trinamic.com stallGuard2 reading mechanical load 58 motor current TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 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.1 CoolStep adapts motor current to the load Five more parameters control CoolStep and one status value is returned: Parameter SEUP SEDN SEIMIN TCOOLTHRS TPWMTHRS Status word CSACTUAL Description Range Sets the current increment step. The current 0…3 becomes incremented for each measured StallGuard value below the lower threshold. Sets the number of StallGuard readings above the 0…3 upper threshold necessary for each current decrement of the motor current. Sets the lower motor current limit for CoolStep operation by scaling the IRUN current setting. Operate well above the minimum motor current as determined for StealthChop current regulation. Lower velocity threshold for switching on CoolStep and stall output. Below this velocity CoolStep becomes disabled (not used in STEP/DIR mode). Adapt to the lower limit of the velocity range where StallGuard gives a stable result. Upper velocity threshold value for CoolStep and stop on stall. Above this velocity the driver switches to SpreadCycle. This also disables CoolStep and StallGuard. Description 0 1 1… 2^20-1 1… 2^20-1 Range This status value provides the actual motor current 0…31 scale as controlled by CoolStep. The value goes up to the IRUN value and down to the portion of IRUN as specified by SEIMIN. www.trinamic.com Comment step width is 1, 2, 4, 8 number of StallGuard measurements per decrement: 32, 8, 2, 1 0: 1/2 of IRUN Attention: use IRUN≥10 1: 1/4 of IRUN Attention: use IRUN≥20 Specifies lower CoolStep velocity by comparing the threshold value to TSTEP This setting typically is used during chopper mode configuration, only. Comment 1/32, 2/32, … 32/32 TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 59 12.3 Tuning CoolStep CoolStep uses SG_RESULT to operate the motor near the optimum load angle of +90°. The basic setting to be tuned is SEMIN. Set SEMIN to a value which safely activates CoolStep current increment before the motor stalls. In case SGTHRS has been tuned before, a lower starting value is SEMIN = 1+SGTHRS/16. 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. The encodings for these parameters allow the coil currents to be increased much more quickly than decreased, because crossing the lower threshold is a more serious event that may require a faster response. If the response is too slow, the motor may stall. In contrast, a slow response to crossing the upper threshold does not risk anything more serious than missing an opportunity to save power. CoolStep operates between limits controlled by the current scale parameter IRUN and the seimin bit. Attention When CoolStep increases motor current, spurious detection of motor stall may occur. For best results, disable CoolStep during StallGuard based homing. In case StallGuard is desired in combination with CoolStep, try increasing coolStep lower threshold SEMIN as required. 12.3.1 Response Time For fast response to increasing motor load, use a high current increment step SEUP. If the motor load changes slowly, a lower current increment step can be used to avoid motor oscillations. Hint The most common and most beneficial use is to adapt CoolStep for operation at the typical system target operation velocity and to set the velocity thresholds according. As acceleration and decelerations normally shall be quick, they will require the full motor current, while they have only a small contribution to overall power consumption due to their short duration. 12.3.2 Low Velocity and Standby Operation Because CoolStep is not able to measure the motor load in standstill and at very low RPM, a lower velocity threshold is provided for enabling CoolStep. It should be set to an application specific default value. Below this threshold the normal current setting via IRUN respectively IHOLD is valid. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 60 13 STEP/DIR Interface The STEP and DIR inputs provide a simple, standard interface compatible with many existing motion controllers. The MicroPlyer step pulse interpolator brings the smooth motor operation of high-resolution microstepping to applications originally designed for coarser stepping. 13.1 Timing Figure 13.1 shows the timing parameters for the STEP and DIR signals, and the table below gives their specifications. Only rising edges are active. STEP and DIR are sampled and synchronized to the system clock. An internal analog filter removes glitches on the signals, such as those caused by long PCB traces. If the signal source is far from the chip, and especially if the signals are carried on cables, the signals should be filtered or differentially transmitted. +VCC_IO DIR SchmittTrigger tSH tDSU tSL tDSH STEP or DIR Input STEP 83k 0.56 VCC_IO 0.44 VCC_IO Internal Signal Active edge (DEDGE=0) Active edge (DEDGE=0) C Input filter R*C = 20ns +-30% Figure 13.1 STEP and DIR timing, Input pin filter STEP and DIR interface timing AC-Characteristics clock period is tCLK Parameter step frequency (at maximum microstep resolution) fullstep frequency STEP input minimum low time Symbol fSTEP STEP input minimum high time tSH DIR to STEP setup time DIR after STEP hold time STEP and DIR spike filtering time *) STEP and DIR sampling relative to rising CLK input tDSU tDSH Conditions fFS tSL tFILTSD tSDCLKHI Min Typ Max ½ fCLK max(tFILTSD, tCLK+20) max(tFILTSD, tCLK+20) 100 ns 100 ns 20 ns ns ns fCLK/512 rising and falling edge before rising edge of CLK input 20 20 13 30 tFILTSD *) These values are valid with full input logic level swing, only. Asymmetric logic levels will increase filtering delay tFILTSD, due to an internal input RC filter. www.trinamic.com Unit ns TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 61 13.2 Changing Resolution The TMC2226 includes an internal microstep table with 1024 sine wave entries to generate sinusoidal motor coil currents. These 1024 entries correspond to one electrical revolution or four fullsteps. The microstep resolution setting determines the step width taken within the table. Depending on the DIR input, the microstep counter is increased (DIR=0) or decreased (DIR=1) with each STEP pulse by the step width. The microstep resolution determines the increment respectively the decrement. At maximum resolution, the sequencer advances one step for each step pulse. At half resolution, it advances two steps. Increment is up to 256 steps for fullstepping. The sequencer has special provision to allow seamless switching between different microstep rates at any time. When switching to a lower microstep resolution, it calculates the nearest step within the target resolution and reads the current vector at that position. This behavior especially is important for low resolutions like fullstep and halfstep, because any failure in the step sequence would lead to asymmetrical run when comparing a motor running clockwise and counterclockwise. EXAMPLES: Fullstep: Cycles through table positions: 128, 384, 640 and 896 (45°, 135°, 225° and 315° electrical position, both coils on at identical current). The coil current in each position corresponds to the RMS-Value (0.71 * amplitude). Step size is 256 (90° electrical) Half step: The first table position is 64 (22.5° electrical), Step size is 128 (45° steps) Quarter step: The first table position is 32 (90°/8=11.25° electrical), Step size is 64 (22.5° steps) This way equidistant steps result and they are identical in both rotation directions. Some older drivers also use zero current (table entry 0, 0°) as well as full current (90°) within the step tables. This kind of stepping is avoided because it provides less torque and has a worse power dissipation in driver and motor. Step position Half step 0 Full step 0 Half step 1 Half step 2 Full step 1 Half step 3 Half step 4 Full step 2 Half step 5 Half step 6 Full step 3 Half step 7 table position 64 128 192 320 384 448 576 640 704 832 896 960 current coil A 38.3% 70.7% 92.4% 92.4% 70.7% 38.3% -38.3% -70.7% -92.4% -92.4% -70.7% -38.3% current coil B 92.4% 70.7% 38.3% -38.3% -70.7% -92.4% -92.4% -70.7% -38.3% 38.3% 70.7% 92.4% See chapter 3.4 for resolution settings available in stand-alone mode. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 62 13.3 MicroPlyer Step Interpolator and Stand Still Detection For each active edge on STEP, MicroPlyer produces microsteps at 256x resolution, as shown in Figure 13.2. It interpolates the time in between of two step impulses at the step input based on the last step interval. This way, from 2 microsteps (128 microstep to 256 microstep interpolation) up to 256 microsteps (full step input to 256 microsteps) are driven for a single step pulse. The step rate for the interpolated 2 to 256 microsteps is determined by measuring the time interval of the previous step period and dividing it into up to 256 equal parts. The maximum time between two microsteps corresponds to 220 (roughly one million system clock cycles), for an even distribution of 256 microsteps. At 12 MHz system clock frequency, this results in a minimum step input frequency of roughly 12 Hz for MicroPlyer operation. A lower step rate causes a standstill event to be detected. At that frequency, microsteps occur at a rate of (system clock frequency)/2 16 ~ 256 Hz. When a stand still is detected, the driver automatically begins standby current reduction if selected by pin PDN. Active edge (dedge=0) Active edge (dedge=0) Active edge (dedge=0) Active edge (dedge=0) Attention MicroPlyer only works perfectly with a jitter-free STEP frequency. STEP Interpolated microstep 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 Motor angle 2^20 tCLK STANDSTILL (stst) active Figure 13.2 MicroPlyer microstep interpolation with rising STEP frequency (Example: 16 to 256) In Figure 13.2, the first STEP cycle is long enough to set the stst bit standstill. Detection of standstill will enable the standby current reduction. This bit is cleared on the next STEP active edge. Then, the external STEP frequency increases. After one cycle at the higher rate MicroPlyer adapts the interpolated microstep rate to the higher frequency. During the last cycle at the slower rate, MicroPlyer did not generate all 16 microsteps, so there is a small jump in motor angle between the first and second cycles at the higher rate. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 63 13.4 Index Output An active INDEX output signals that the sine curve of motor coil A is at its positive zero transition. This correlates to the zero point of the microstep sequence. Usually, the cosine curve of coil B is at its maximum at the same time. Thus, the index signal is active once within each electrical period, and corresponds to a defined position of the motor within a sequence of four fullsteps. The INDEX output this way allows the detection of a certain microstep pattern, and thus helps to detect a position with more precision than a stop switch can do. Current COIL A 0 COIL B Time INDEX Current Time STEPS Time Figure 13.3 Index signal at positive zero transition of the coil A sine curve Hint The index output allows precise detection of the microstep position within one electrical wave, i.e. within a range of four fullsteps. With this, homing accuracy and reproducibility can be enhanced to microstep accuracy, even when using an inexpensive home switch. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 64 14 Internal Step Pulse Generator UART The TMC22xx family integrates a high-resolution step pulse generator, allowing motor motion via the UART interface. However, no velocity ramping is provided. Ramping is not required, if the target motion velocity is smaller than the start & stop frequency of the motor. For higher velocities, ramp up the frequency in small steps to accelerate the motor, and ramp down again to decelerate the motor. Figure 14.1 shows an example motion profile ramping up the motion velocity in discrete steps. Choose the ramp velocity steps considerably smaller than the maximum start velocity of the motor, because motor torque drops at higher velocity, and motor load at higher velocity typically increases. motor stop v acceleration constant velocity deceleration Th eo re t ica l pr of ile Target Velocity Stop velocity Start velocity 0 t VACTUAL Figure 14.1 Software generated motion profile PARAMETER VS. UNITS Parameter / Symbol fCLK[Hz] Unit [Hz] µstep velocity v[Hz] µsteps / s USC microstep count counts rotations per second v[rps] rotations / s TSTEP, TPWMTHRS - VACTUAL Two’s complement signed internal velocity calculation / description / comment clock frequency of the TMC2226 in [Hz] v[Hz] = VACTUAL[2226] * ( fCLK[Hz]/2 / 2^23 ) With internal oscillator: v[Hz] = VACTUAL[2226] * 0.715Hz microstep resolution in number of microsteps (i.e. the number of microsteps between two fullsteps – normally 256) v[rps] = v[Hz] / USC / FSC FSC: motor fullsteps per rotation, e.g. 200 TSTEP = fCLK / fSTEP The time reference for velocity threshold is referred to the actual microstep frequency of the step input respectively velocity v[Hz]. VACTUAL[2226] = ( fCLK[Hz]/2 / 2^23 ) / v[Hz] With internal oscillator: VACTUAL[2226] = 0.715Hz / v[Hz] Hint To monitor internal step pulse execution, program the INDEX output to provide step pulses (GCONF.index_step). It toggles upon each step. Use a timer input on your CPU to count pulses. Alternatively, regularly poll MSCNT to grasp steps done in the previous polling interval. It wraps around from 1023 to 0. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 65 15 Driver Diagnostic Flags The TMC2226 drivers supply a complete set of diagnostic and protection capabilities, like short to GND protection, short to VS 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. 15.1 Temperature Measurement The driver integrates a four-level temperature sensor (pre-warning and thermal shutdown) for diagnostics and for protection of the IC against excess heat. The thresholds can be adapted by UART or OTP programming. Heat is mainly generated by the motor driver stages, and, at increased voltage, by the internal voltage regulator. Most critical situations, where the driver MOSFETs could be overheated, are avoided by the short to GND protection. For many applications, the overtemperature pre-warning will indicate an abnormal operation situation and can be used to initiate user warning or power reduction measures like motor current reduction. The thermal shutdown is just an emergency measure and temperature rising to the shutdown level should be prevented by design. TEMPERATURE THRESHOLDS Overtemperature Setting 143°C (OTPW: 120°C) 150°C (OTPW: 120°C or 143°C) 157°C (OTPW: 143°C) Comment Default setting. This setting is safest to switch off the driver stage before the IC can be destroyed by overheating. On a large PCB, the power MOSFETs reach roughly 150°C peak temperature when the temperature detector is triggered with this setting. This is a trip typical point for overtemperature shut down. The overtemperature pre-warning threshold of 120°C gives lots of headroom to react to high driver temperature, e.g. by reducing motor current. Optional setting (OTP or UART). For small PCBs with high thermal resistance between PCB and environment, this setting provides some additional headroom. The small PCB shows less temperature difference between the MOSFETs and the sensor. Optional setting (UART). For applications, where a stop of the motor cannot be tolerated, this setting provides highest headroom, e.g. at high environment temperature ratings. Using the 143°C overtemperature pre-warning to reduce motor current ensures that the motor is not switched off by the thermal threshold. Attention Overtemperature protection cannot in all cases avoid thermal destruction of the IC. In case the rated motor current is exceed, e.g. by operating a motor in StealthChop with wrong parameters, or with automatic tuning parameters not fitting the operating conditions, excess heat generation can quickly heat up the driver before the overtemperature sensor can react. This is due to a delay in heat conduction over the IC die. After triggering the overtemperature sensor (ot flag), the driver remains switched off until the system temperature falls below the pre-warning level (otpw) to avoid continuous heating to the shutdown level. 15.2 Short Protection The TMC2226 power stages are protected against a short circuit condition by an additional measurement of the current flowing through each of the power stage MOSFETs. This is important, as most short circuit conditions result from a motor cable insulation defect, e.g. when touching the conducting parts connected to the system ground. The short detection is protected against spurious triggering, e.g. by ESD discharges, by retrying three times before switching off the motor. www.trinamic.com TMC2226 DATASHEET (Rev. 1.06 / 2020-MAY-18) 66 Once a short condition is safely detected, the corresponding driver bridge (A or B) becomes switched off, and the s2ga or s2gb flag, respectively s2vsa or s2vsb becomes set. In order to restart the motor, disable and re-enable the driver. Note, that short protection cannot protect the system and the power stages for all possible short events, as a short event is rather undefined and a complex network of external components may be involved. Therefore, short circuits should basically be avoided. 15.3 Open Load Diagnostics UART Interrupted cables are a common cause for systems failing, e.g. when connectors are not firmly plugged. The TMC2226 detects open load conditions by checking, if it can reach the desired motor coil current. This way, also undervoltage conditions, high motor velocity settings or short and overtemperature conditions may cause triggering of the open load flag, and inform the user, that motor torque may suffer. In motor stand still, open load cannot always be measured, as the coils might eventually have zero current. Open load detection is provided for system debugging. In order to safely detect an interrupted coil connection, read out the open load flags at low or nominal motor velocity operation, only. If possible, use SpreadCycle for testing, as it provides the most accurate test. However, the ola and olb flags have just informative character and do not cause any action of the driver. 15.4 Diagnostic Output The diagnostic output DIAG and the index output INDEX provide important status information. An active DIAG output shows that the driver cannot work normally, or that a motor stall is detected, when StallGuard is enabled. The INDEX output signals the microstep counter zero position, to allow referencing (homing) a drive to a certain current pattern. The function set of the INDEX output can be modified by UART. Figure 15.1 shows the available signals and control bits. StallDetection (gated by TPWMTHRS
TMC2226-SA-T 价格&库存

很抱歉,暂时无法提供与“TMC2226-SA-T”相匹配的价格&库存,您可以联系我们找货

免费人工找货
TMC2226-SA-T
  •  国内价格
  • 1+10.35905
  • 10+9.50293
  • 30+9.33171

库存:1113

TMC2226-SA-T
    •  国内价格
    • 1+11.83350
    • 500+11.66450

    库存:1159