My first stepper driver module was
A4988
and recently I have decided to give TMC2209 a try hearing how silent and
energy efficient it is. Driving the A4988 is simple - just set direction,
pulse the step pin and the motor moves. You can do the same thing with TMC2209
but this thing can do much more. It has UART interface, registers, algorithms
and an 83 pages datasheet. I might be slow but I had to read the datasheet 3
times to wrap my head around on what things can this thing do. In my opinion
it is a very good stepper driver so I made a library for it and also this
tutorial to better help in using the library. Although the IC presented in
this tutorial is TMC2209, most information can still be applied to other TMC
ICs.
Contents
- TMC2209 description
- Modes of operation
- TMC2209 module pinout
- Attaching the TMC2209 to a microcontroller UART
- Setting the analog motor current
- Setting the digital motor current
- Automatic Standstill Power Down
- StealthChop2 and SpreadCycle Driver
- Combine StealthChop and SpreadCycle
- StallGuard4 Load Measurement
- StallGuard4 vs. StallGuard2
- Tuning StallGuard4
- StallGuard4 Update Rate
- Detecting a Motor Stall
- Limits of StallGuard4 Operation
- CoolStep Operation
- Driver Diagnostic Flags
- Internal Step Pulse Generator
- External Reset
- Links
TMC2209 description
The TMC2209 is an ultra-silent motor driver IC for two phase stepper motors, developed by trinamic. TMC2209 pinning is compatible to other drivers as well as to the TMC2208.
Multiple versions of modules can be found that are using this IC, however the stand-alone chip can be used for a DIY module that could provide some cost savings.Features:
- 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
- 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