Part

TMC2209 stepper driver

The TMC2208 with 1/32 and 1/64 on its mode pins, a SPREAD pin, and 29 V at most.

or see every part
  • 16 pins
  • 2 settings
  • In 2 projects
Drawn live by the editor's own code, at the size you see it.
At a glance

The TMC2209 stepper driver in brief

What it is, and every setting the properties panel gives it.

The TMC2209 is the quiet Trinamic driver on SilentStepStick boards, in the A4988’s footprint: STEP, DIR and an active-low EN on the logic side, VM at 5.5 to 29 V, M1A, M1B, M2A and M2B for the motor’s two coils, and VIO at 3 to 5.25 V for the logic. Its inputs switch at 0.3 and 0.7 of VIO, so VIO goes to 5 V on an Uno and to 3.3 V on an ESP32. There is no RST or SLP to link. MS1 and MS2 are pulled down, and left alone the board is at 1/8 step, not full step, so 1600 pulses turn a 200-step motor once; MS1 high alone is 1/32, MS2 high alone 1/64 and both 1/16, a different table from the TMC2208’s. Mokxi models that table, the enable pin and Trinamic’s current formula on the board’s 0.11 ohm sense resistors: 1 A peak at the default VREF of 1 V, and 1.77 A RMS at 2.5 V. The classic mistake is reusing a full-step A4988 sketch and turning an eighth as far. The UART, stealthChop, spreadCycle, StallGuard, the standstill power-down and the 1/256 interpolation are not modeled.

Family
Outputs
Pins
16
vref
1
rsense
0.11
Pins

16 pins

Named as the editor names them, so a wire lands where you expect it.

  • EN
  • MS1
  • MS2
  • SPREAD
  • PDN_UART
  • NC
  • STEP
  • DIR
  • VM
  • GNDM
  • M2B
  • M2A
  • M1A
  • M1B
  • VIO
  • GND
How to use it

How to use the TMC2209 stepper driver with an Arduino

STEP to pin 2, DIR to pin 3 and EN to pin 4, VIO to 5 V, GND to GND, VM to 12 V, and the motor’s coils on M1A and M1B and on M2A and M2B. There is no RST or SLP to link: write EN LOW and the outputs are on.

With MS1 and MS2 left open the TMC2209 is at 1/8 step, not full step, so this sketch sends 1600 pulses for one turn of a 200-step NEMA 17. MS1 high alone is 1/32, MS2 high alone 1/64, and both high 1/16, which is not the TMC2208’s table, so check which chip is on the board before you count pulses. A sketch written for a full-step A4988 turns an eighth as far here. AccelStepper’s DRIVER mode drives it the same way, with setEnablePin(4) and setPinsInverted(false, false, true) for the active-low EN.

Part pin
Board pin
STEP
Pin 2
DIR
Pin 3
EN
Pin 4
VIO
5 V
GND
GND
VM
12 V supply

On an ESP32 put VIO on 3.3 V. The inputs switch at 0.3 and 0.7 of VIO, so the logic supply has to match the board’s pins.

Arduino Uno: TMC2209 stepper driverlive0.000 s 0.00x
Click to open it in the editor
This is the simulator itself, running here. Click anything to open it in the editor.
One turn at 1/8 step, from the TMC2209 sketch
const int PER_TURN = 200 * 8;
digitalWrite(EN_PIN, LOW);
digitalWrite(DIR_PIN, HIGH);
for (int i = 0; i < PER_TURN; i++) {
  digitalWrite(STEP_PIN, HIGH);
  delayMicroseconds(5);
  digitalWrite(STEP_PIN, LOW);
  delayMicroseconds(620);
}
How it is modeled

What is true about the TMC2209 stepper driver, here

In its help article’s own words: what the simulation gets right, and where it stops.

Not modeled

The Trinamic chips' UART (PDN_UART), stealthChop, spreadCycle (SPREAD), StallGuard, the standstill power-down and the 1/256 interpolation: one pulse on STEP is one step at the pins' resolution. On the TMC boards EN unwired is taken as on, from the chips' input pulls, which the boards' pin pages do not state. The DRV8834's phase/enable mode (CONFIG low), the DRV8880's AutoTune and its V3P3 and TOFF pins. As on the A4988: the chopper's ripple, inductance, faults and heat.

From TMC2208, TMC2209, TMC2100, DRV8834, DRV8880, in full.

Projects

See the TMC2209 stepper driver in a project

2 built-in projects use it. Each opens in the editor, already wired.

Boards

The boards it is shown on

This board has a built-in project with the TMC2209 stepper driver in it.

Libraries

Arduino libraries for the TMC2209 stepper driver

Built in, so the sketch compiles with nothing to install. Each page has the calls, the wiring and an example to run.

Wire up the TMC2209 stepper driver

Open the editor and push it into the breadboard. It is free, and it runs on your own machine.