Admin 08 Jun 2026 00:18

 

TMC220x/TMC222x Velocity Calculation Spreadsheet

The TMC220x and TMC222x families of stepper motor drivers (including the popular TMC2209, TMC2226, etc.) are widely used in 3D printers, CNC machines and other motioncontrol projects. Their sophisticated features stealthChop2, spreadCycle, current scaling, and microstepping give designers great flexibility, but they also introduce a number of parameters that must be balanced to achieve reliable, highspeed motion.

This page explains how a spreadsheet can be used to calculate the maximum achievable velocity for a given configuration, taking into account motor, driver and firmware settings. The same spreadsheet can be adapted for any steppermotordriven axis (X, Y, Z, extruder, etc.).

Why a Spreadsheet?

  • Transparency: All the calculations are visible and can be tweaked instantly.
  • Speed: Changing a single cell updates every derived value, making iteration fast.
  • Safety: The sheet can flag values that exceed driver limits, preventing damage.
  • Portability: A single Excel/GoogleSheets file can be shared across the team.

Key Parameters

Parameter Typical Range Description
Motor step angle 0.9 1.8 Number of degrees the rotor moves per full step.
Microstepping mode 1, 2, 4, 8, 16, 32, 64, 128, 256 Set by MS1/MTDI pins or via UART.
Steps per mm 80 400 (depends on belt/pulley, lead screw, etc.) Calculated from mechanical travel per step.
Clock frequency (fCLK) 12MHz 24MHz (internal oscillator) Core timer that drives the step pulse generator.
Maximum step rate (fSTEP_MAX) Up to 1MHz (depends on driver, supply voltage) Highest pulse frequency the driver can reliably handle.
Acceleration (mm/s) 500 5000 Set in firmware (e.g., Marlin's DEFAULT_MAX_ACCELERATION).
Junction deviation / jerk 5 20mm/s Controls how quickly direction changes are allowed.
Supply voltage (VCC) 12V 24V Higher voltage permits higher step rates without overheating.

Core Equations

The spreadsheet uses three main equations. They are kept separate so you can see where each limit originates.

1. Steps per mm

steps_per_mm = (360 / step_angle) * microstep_factor / travel_per_rev

For a GT2 belt with a 20T pulley, travel_per_rev = 20T 2mm = 40mm. If the motor is 1.8 (200 steps/rev) and microstepping is 16, the calculation becomes:

steps_per_mm = (360/1.8)  16 / 40 = 200  16 / 40 = 80 steps/mm

2. Maximum feedrate (mm/s)

max_feedrate = fSTEP_MAX / steps_per_mm

If the driver can handle 500kHz step pulses and you have 80 steps/mm, the theoretical ceiling is:

max_feedrate = 500000 / 80  6250mm/s

In practice youll be limited by acceleration, jerk, and firmware safety clamps.

3. Accelerationlimited velocity

v_accel = sqrt(2  a  d)

Where a is acceleration (mm/s) and d is the distance over which the move occurs. The spreadsheet computes the longest possible straightline segment at a given acceleration before hitting the steprate ceiling.

Spreadsheet Layout

  1. Input Section Cells for motor step angle, microstep ratio, pulley/leadscrew pitch, voltage, desired acceleration, and any firmware limits (e.g., MAX_FEEDRATE_X).
  2. Derived Values Steps per mm, theoretical max step rate, max feedrate, and safe feedrate after applying acceleration/jerk limits.
  3. Safety Checks Conditional formatting highlights when:
    • Required step frequency exceeds fSTEP_MAX.
    • Current draw (calculated from RMS current setting) surpasses driver rating.
    • Calculated voltage drop on the motor leads would cause overheating.
  4. Graphical Output Optional chart showing velocity vs. distance for a sample move, visualising the acceleration curve and the flattop at the driverlimited speed.

Example Calculation

Assume a typical CoreXY printer configuration:

  • Motor: 1.8 step angle (200 steps/rev)
  • Microstepping: 16
  • Pulley: 20T GT2 (40mm travel/rev)
  • Desired acceleration: 1500mm/s
  • Driver stepfrequency limit: 400kHz (conservative for 24V supply)
Calculated ItemResult
Steps per mm80steps/mm
Theoretical max feedrate5000mm/s (400000Hz 80)
Accelerationlimited speed for 100mm move547mm/s ((21500100))
Firmware safe feedrate (Marlin default 300mm/s)300mm/s (overrides higher value)

Result: The driver can comfortably provide the necessary step rate for a 300mm/s print speed. If you raise acceleration to 3000mm/s, the accelerationlimited speed becomes ~774mm/s, still under the driver ceiling, so the bottleneck shifts to firmware limits.

How to Use the Spreadsheet

  1. Open the file in Excel, LibreOffice or GoogleSheets.
  2. Enter your hardware specifics in the Input block (motor, pulley, driver model, supply voltage).
  3. Set the firmware limits you intend to use (Marlin, Klipper, RepRapFirmware, etc.).
  4. Watch the Derived block automatically compute safe maximum feedrates for each axis.
  5. If any cell turns red, review the associated warning (steprate too high, current out of range, etc.).
  6. Adjust microstepping, acceleration, or voltage until all warnings disappear and the desired speed is achieved.

Advanced Topics

UART / SPI Configuration

The TMC220x/TMC222x can be programmed via UART. The spreadsheet includes optional columns for hysteresis_end, hysteresis_start, chop_tune, and coolstep values. Changing these influences the drivers ability to sustain high step rates without excessive heating.

SpreadCycle vs. stealthChop2

SpreadCycle provides higher torque at high speeds but generates audible noise. stealthChop2 is quieter but may limit the top speed for some motors. The sheet has a toggle that swaps the torquevsspeed curve, letting you see the resulting change in safe velocity.

Voltage Dependency

Motor inductance determines how fast current can rise. The spreadsheet implements the simplified relation:

f_max  VCC / (2LI_RMS)

Enter motor inductance (L) and RMS current (I_RMS) to see a more realistic stepfrequency ceiling.

Tips for Getting the Most Out of Your TMC Driver

  • Start Conservative: Use lower microstepping (e.g., 16) and modest acceleration, then raise them gradually while monitoring temperature.
  • Coolstep: Enable CoolStep to reduce current automatically when load drops, keeping heat low during long highspeed runs.
  • Thermal Protection: Set OTPW (overtemperature prewarning) thresholds slightly below the drivers absolute max to give the firmware time to throttle.
  • Check Wiring: Long or thin wires add resistance, which effectively lowers the VCC seen by the driver. Keep leads short and wellgauge.
  • Firmware Integration: When using Klipper, you can export the spreadsheet values directly into the [tmc2209] or [tmc2226] sections of printer.cfg.

Download

The latest version of the spreadsheet (compatible with Excel, LibreOffice Calc, and Google Sheets) can be downloaded from the following link:

TMC220x/TMC222x Velocity Calculation Spreadsheet (XLSX)

Note: The provided file contains sample data for a 1.8 motor with 16 microstepping. Replace those entries with the values that match your own hardware before trusting the results.

Conclusion

Understanding the interplay between motor mechanics, driver capabilities and firmware limits is essential for extracting reliable high speeds from TMC220x and TMC222x drivers. A wellstructured spreadsheet makes that process transparent, repeatable, and safe. By entering a few key parameters, you can instantly see whether your target feedrate is realistic, where the bottlenecks lie, and what adjustments are required to reach it without overheating or losing steps.

Feel free to modify the spreadsheet to suit your workflowadd columns for dualZ synchronisation, multiextruder setups, or even realtime data logging from the printers UART output. With the right numbers at hand, youll spend less time guessing and more time printing.

Reference Files For **TMC220x/TMC222x Velocity Calculation Spreadsheet**
Screenshoot
File Name
tmc220x_tmc222x_calculations.xlsx

File Size
0.04 MB

File Type
XLSX

File Site
Description
This file is just a reference file for **TMC220x/TMC222x Velocity Calculation Spreadsheet**. Does not guarantee that the specific things you want are included in it.
Direct download (wait 10 seconds)

**TMC220x/TMC222x Velocity Calculation Spreadsheet** and Reference File Download Link


admin
Admin
2026-06-08 00:18:06

Blended Calculation Spreadsheet and Reference File Download Link


admin
Admin
2026-06-06 03:48:09

WBGT & UTCI Calculation Spreadsheet and Reference File Download Link


admin
Admin
2026-06-07 09:44:05

Peak Particle Velocity Test and Reference File Download Link


admin
Admin
2026-05-30 10:38:04

Velocity Structure Functions and Reference File Download Link


admin
Admin
2026-06-08 04:24:16