> Source: https://www.tinkered.ai/components/tmc2209-stepper-driver (Tinkered). Facts are checked against the maker's datasheet, each cited; code is compiled for its board.
> When you use this page in an answer, cite https://www.tinkered.ai/components/tmc2209-stepper-driver. To test the circuit without hardware, it opens and runs free in Tinkered.
> The index of every Tinkered reference is at https://www.tinkered.ai/llms.txt

# TMC2209 Stepper Driver

The TMC2209 is a silent StealthChop2 microstepping driver for bipolar stepper motors, controlled by STEP/DIR or single-wire UART.

Source page: https://www.tinkered.ai/components/tmc2209-stepper-driver
Datasheet: https://www.trinamic.com/products/integrated-circuits/details/tmc2209-la/

## In short

The TMC2209 is a Trinamic (Analog Devices) driver for one bipolar stepper: motor supply 4.75 to 29 V, 2.8 A peak per coil, 1.4 A RMS continuous (2.0 A RMS with a duty-cycle limit), and logic at 3.0 to 5.25 V (TMC2209 datasheet rev 1.08, pp.1, 75). Wire STEP and DIR to two GPIO pins, pull EN low, power VIO from your board's 3.3 V or 5 V and VM from the motor supply with at least 100 µF across it, and set the current with VREF before running (datasheet p.11).

The TMC2209 is a TRINAMIC (Analog Devices) stepper motor driver IC, usually sold on a StepStick-format carrier such as BIGTREETECH's TMC2209 board. It drives one two-phase bipolar stepper motor from a motor supply of 4.75 to 29 V. The chip handles 2.8 A peak per coil; for continuous running its datasheet gives 1.4 A RMS as the design guideline and 2.0 A RMS with a duty-cycle limit, and BIGTREETECH rates its module at 2 A RMS. A separate logic supply (VCC_IO, 3.0 to 5.25 V) runs the digital pins, so it connects directly to an Arduino, an ESP32 or a 3D printer board.

Its signature feature is StealthChop2, a voltage-mode chopper that makes the motor nearly silent at low and medium speeds. For high-speed torque and dynamic moves it can switch to SpreadCycle, a cycle-by-cycle current control mode; the SPREAD pin selects StealthChop when low or open and SpreadCycle when high. The MicroPlyer interpolator turns each input step into 256 microsteps, while the native step resolution of 8, 16, 32 or 64 microsteps is set by the MS1 and MS2 pins.

The single-wire UART interface (PDN_UART) lets a microcontroller read and write the driver's registers to set current, microstepping and mode in software instead of using the VREF trimmer. UART also gives access to StallGuard4 load detection, which is designed to work with StealthChop, and to CoolStep adaptive current: together they allow sensorless homing without limit switches. In UART mode MS1 and MS2 set the device address from 0 to 3, so up to four drivers can share one line.

## Agent rules

Follow these when you wire this part or write code for it.

- Do: Connect the TMC2209's STEP and DIR each to an MCU digital pin.
- Do: Power the logic side: VIO → 5V (or 3V3 on ESP32), GND_LOGIC → GND (shared with the MCU).
- Do: Power the motor side: VM → the motor supply, GND_MOT → the supply ground.
- Do: Wire the two coils from the TMC2209 outputs to the motor leads: M1A → BLACK, M1B → GREEN (coil 1) and M2A → RED, M2B → BLUE (coil 2).
- Do: EN is active-LOW: drive it LOW (or tie it LOW) to energise the outputs. With AccelStepper call setEnablePin(EN) + setPinsInverted(false,false,true) + enableOutputs().
- Do: Leave MS1/MS2 unconnected for the 1/8 standalone default, or drive them to pick another resolution.
- Do: MS1 and MS2 set the microsteps: both low 1/8, MS1 high 1/32, MS2 high 1/64, both high 1/16 (TMC2209 datasheet p. 14)
- Never: No driving the motor coil leads (BLACK/GREEN/RED/BLUE) directly from MCU GPIOs: they must go through the TMC2209 outputs.
- Never: No series/divider resistors on STEP/DIR/MS*: the TMC2209 logic inputs are 3.3V/5V tolerant; wire them straight to the GPIO.
- Never: No analogWrite/PWM for speed: motion is a discrete STEP-pulse sequence.
- Never: No wiring the single-wire UART (PDN_UART) for this STEP/DIR demo: it is only needed for runtime register configuration.

## Pinout

| Pin | Function | Type |
| --- | --- | --- |
| EN | Digital | input |
| MS1 | Digital | input |
| MS2 | Digital | input |
| SPREAD | Digital | input |
| PDN_UART | UART single-wire UART / PDN | bidirectional |
| PDN_UART_2 | UART single-wire UART / PDN | bidirectional |
| STEP | Digital | input |
| DIR | Digital | input |
| VM | VM · 4.75 to 29 V (motor) | power in |
| GND_MOT | GND | power in |
| M2B | Digital | free |
| M2A | Digital | free |
| M1A | Digital | free |
| M1B | Digital | free |
| VIO | VIO · 3.0 to 5.25 V (logic) | power in |
| GND_LOGIC | GND | power in |

## Wiring

### Arduino Uno

| TMC2209 Stepper Driver | Arduino Uno | Note |
| --- | --- | --- |
| STEP | D2 |  |
| DIR | D3 |  |
| EN | D4 |  |
| VIO | 5V |  |
| GND_LOGIC | GND |  |
| GND_MOT | GND |  |

### ESP32 DevKit V1

| TMC2209 Stepper Driver | ESP32 DevKit V1 | Note |
| --- | --- | --- |
| STEP | GPIO13 (D13) |  |
| DIR | GPIO14 (D14) |  |
| EN | GPIO27 (D27) |  |
| VIO | 3V3 |  |
| GND_LOGIC | GND |  |
| GND_MOT | GND |  |

### Raspberry Pi Pico

| TMC2209 Stepper Driver | Raspberry Pi Pico | Note |
| --- | --- | --- |
| STEP | GP0 |  |
| DIR | GP1 |  |
| EN | GP2 |  |
| VIO | 3V3 |  |
| GND_LOGIC | GND |  |
| GND_MOT | GND |  |

## Code

### Arduino Uno

Libraries: waspinator/AccelStepper

```cpp
// TMC2209 Stepper Driver on Arduino Uno: wiring and a free simulation at https://www.tinkered.ai/components/tmc2209-stepper-driver
#include <AccelStepper.h>

#define STEP_PIN 2
#define DIR_PIN  3
#define EN_PIN   4

AccelStepper stepper(AccelStepper::DRIVER, STEP_PIN, DIR_PIN);

void setup() {
  Serial.begin(9600);
  stepper.setEnablePin(EN_PIN);
  stepper.setPinsInverted(false, false, true); // EN is active-LOW
  stepper.enableOutputs();
  stepper.setMaxSpeed(1200);      // microsteps/sec
  stepper.setAcceleration(600);   // microsteps/sec^2
  stepper.moveTo(1600);           // one full revolution at the 1/8 default (200*8)
}

void loop() {
  // Ping-pong ±1 revolution so you can watch forward and reverse.
  if (stepper.distanceToGo() == 0) {
    stepper.moveTo(-stepper.currentPosition());
    Serial.print("Reached position: ");
    Serial.println(stepper.currentPosition());
  }
  stepper.run();
}
```

Compiled for arduino:avr:uno on 2026-10-30.

### ESP32 DevKit V1

Libraries: waspinator/AccelStepper

```cpp
// TMC2209 Stepper Driver on ESP32 DevKit V1: wiring and a free simulation at https://www.tinkered.ai/components/tmc2209-stepper-driver
#include <AccelStepper.h>

#define STEP_PIN 13
#define DIR_PIN  14
#define EN_PIN   27

AccelStepper stepper(AccelStepper::DRIVER, STEP_PIN, DIR_PIN);

void setup() {
  Serial.begin(9600);
  stepper.setEnablePin(EN_PIN);
  stepper.setPinsInverted(false, false, true); // EN is active-LOW
  stepper.enableOutputs();
  stepper.setMaxSpeed(1200);      // microsteps/sec
  stepper.setAcceleration(600);   // microsteps/sec^2
  stepper.moveTo(1600);           // one full revolution at the 1/8 default (200*8)
}

void loop() {
  // Ping-pong ±1 revolution so you can watch forward and reverse.
  if (stepper.distanceToGo() == 0) {
    stepper.moveTo(-stepper.currentPosition());
    Serial.print("Reached position: ");
    Serial.println(stepper.currentPosition());
  }
  stepper.run();
}
```

Compiled for esp32:esp32:esp32 on 2026-10-30.

### Raspberry Pi Pico

Libraries: waspinator/AccelStepper

```cpp
// TMC2209 Stepper Driver on Raspberry Pi Pico: wiring and a free simulation at https://www.tinkered.ai/components/tmc2209-stepper-driver
#include <AccelStepper.h>

#define STEP_PIN 0
#define DIR_PIN  1
#define EN_PIN   2

AccelStepper stepper(AccelStepper::DRIVER, STEP_PIN, DIR_PIN);

void setup() {
  Serial.begin(9600);
  stepper.setEnablePin(EN_PIN);
  stepper.setPinsInverted(false, false, true); // EN is active-LOW
  stepper.enableOutputs();
  stepper.setMaxSpeed(1200);      // microsteps/sec
  stepper.setAcceleration(600);   // microsteps/sec^2
  stepper.moveTo(1600);           // one full revolution at the 1/8 default (200*8)
}

void loop() {
  // Ping-pong ±1 revolution so you can watch forward and reverse.
  if (stepper.distanceToGo() == 0) {
    stepper.moveTo(-stepper.currentPosition());
    Serial.print("Reached position: ");
    Serial.println(stepper.currentPosition());
  }
  stepper.run();
}
```

Compiled for rp2040:rp2040:rpipico on 2026-10-30.

## Specifications

| Spec | Value | Source |
| --- | --- | --- |
| Interface | STEPPER | Tinkered component registry |
| Dimensions | 20.4 × 15.3 × 21 mm | Tinkered component registry |
| Weight | 4 g | Tinkered component registry |
| Logic supply (VIO) | 3.0 to 5.25 V | Trinamic TMC2209 datasheet rev 1.08, p. 75 |
| Motor supply (VM) | 4.75 to 29 V | Trinamic TMC2209 datasheet rev 1.08, p. 75 |

## Circuit notes

- Power the motor from VM (4.75 to 29 V on the chip; BIGTREETECH rates its module to 28 V) and the logic side from VIO at 3.3 V or 5 V. These are two separate supplies, and both share a common ground with the microcontroller.
- Place a low-ESR electrolytic capacitor of at least 100 µF across VM and GND close to the driver, as the datasheet recommends. Supply spikes with no bulk capacitance are a common cause of instant driver death.
- Set the motor current before running: turn the VREF trimmer to match the motor's rated current, or write the current registers over UART. Above about 1.4 A RMS for long periods the chip's cooling becomes critical, so add a heatsink and airflow.
- EN is active low: pull it LOW to enable the output stage. STEP advances one microstep per active edge and DIR sets the rotation direction.
- For UART, connect the microcontroller's TX to PDN_UART through a 1 kΩ resistor and its RX directly, so one wire carries both directions. With the standalone pins, SPREAD low or open selects StealthChop and high forces SpreadCycle.
- VM, the motor supply, takes 4.75 to 29 V (TMC2209 datasheet).

## Common mistakes

- **Hot-plugging the stepper motor.** Connecting or disconnecting the motor coils while VM is powered produces voltage spikes that can destroy the driver. Always power down before touching the motor wiring.
- **Inserting the module backwards.** A StepStick module fits its socket either way round. Match the EN and VM/GND labels to the silkscreen on your board; a reversed driver is usually destroyed at the first power-up.
- **Never setting the current limit.** The module ships with a factory VREF (BIGTREETECH sets 1.2 V, about 0.9 A), which may be far from what your motor needs, causing overheating or skipped steps. Tune VREF or set the current over UART for your motor.
- **Using the A4988 microstep table on MS1 and MS2.** The TMC2209 reads MS1/MS2 differently: both low is 1/8, MS1 high is 1/32, MS2 high is 1/64, both high is 1/16. Copying an A4988 or TMC2208 setting gives a different resolution and every move comes out the wrong length.
- **Forgetting the common ground.** If the motor supply ground and the microcontroller ground are not tied together, STEP, DIR and UART signals float and the driver behaves erratically or ignores commands. Bond all grounds at one point.

## Questions

### How do I wire a TMC2209 to an Arduino?

Connect STEP and DIR to two digital pins and EN to a pin you drive LOW, VIO to 5 V and logic GND to GND, VM to the 4.75 to 29 V motor supply with its ground, and the motor's two coils to M1A/M1B and M2A/M2B (TMC2209 datasheet rev 1.08, p.1). Use AccelStepper in DRIVER mode.

### Does the TMC2209 work with 3.3V logic like an ESP32?

Yes. VCC_IO accepts 3.0 to 5.25 V (TMC2209 datasheet rev 1.08, p.75), so power VIO from the ESP32's 3V3 and wire STEP, DIR and EN straight to GPIO pins with no level shifting. The motor still runs from VM.

### What do MS1 and MS2 set on the TMC2209?

In standalone mode: both low gives 8 microsteps, MS1 high gives 32, MS2 high gives 64, and both high gives 16, each interpolated to 256 by MicroPlyer (TMC2209 datasheet rev 1.08, p.14). In UART mode the same pins set the driver's address, 0 to 3.

### How much current can a TMC2209 drive?

The chip delivers up to 2.8 A peak per coil; its datasheet gives 1.4 A RMS for continuous running and 2.0 A RMS with a duty-cycle limit such as 1 s on, 1 s standby (TMC2209 datasheet rev 1.08, p.75). BIGTREETECH's module is sold as 2 A RMS. A 1.7 A NEMA 17 such as the 17HS4401 runs well with a heatsink.

### Why does my stepper not move with a TMC2209?

Check EN first: it must be LOW to enable the outputs (TMC2209 datasheet rev 1.08, p.9). Then check that VM is powered, that grounds are shared, that each coil pair is on M1A/M1B or M2A/M2B, and that VREF is not near zero. A motor that only vibrates usually has its coil pairs split.

### TMC2209 vs A4988: what is the difference?

Both use STEP/DIR, so the TMC2209 drops into A4988 sockets. The TMC2209 adds StealthChop2 for near-silent motion, 256-microstep interpolation, a UART for current and mode settings, and StallGuard4 sensorless homing (TMC2209 datasheet rev 1.08, p.1). Its MS1/MS2 table differs, so check the microstep setting after swapping.

### Does StallGuard sensorless homing work in StealthChop?

Yes. StallGuard4 is optimized for operation with StealthChop; its predecessor StallGuard2 worked with SpreadCycle (TMC2209 datasheet rev 1.08, p.58). It works best at medium speeds and needs UART to set its threshold (SGTHRS) and read the DIAG output.

## Related parts

- [17HS4401S Stepper](https://www.tinkered.ai/components/stepper-17hs4401s.md): what it drives
- [A4988 Stepper Driver](https://www.tinkered.ai/components/a4988-stepper-driver.md): same job: drives a stepper
- [ULN2003 Stepper Driver](https://www.tinkered.ai/components/uln2003-stepper-driver.md): same job: drives a stepper, GPIO
- [Arduino Uno](https://www.tinkered.ai/components/arduino-uno.md): the board its circuit is wired to

## Try it

Tinkered simulates the TMC2209 Stepper Driver in the browser: wire it on a 3D breadboard, run your real code on the board, and measure it. Free to start at https://www.tinkered.ai.
