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.).
| 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. |
The spreadsheet uses three main equations. They are kept separate so you can see where each limit originates.
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
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.
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.
MAX_FEEDRATE_X).fSTEP_MAX.Assume a typical CoreXY printer configuration:
| Calculated Item | Result |
|---|---|
| Steps per mm | 80steps/mm |
| Theoretical max feedrate | 5000mm/s (400000Hz 80) |
| Accelerationlimited speed for 100mm move | 547mm/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.
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 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.
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.
OTPW (overtemperature prewarning) thresholds slightly below the drivers absolute max to give the firmware time to throttle.VCC seen by the driver. Keep leads short and wellgauge.[tmc2209] or [tmc2226] sections of printer.cfg.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)
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.
