The TMC2226 is a high-performance stepper motor driver manufactured by Trinamic (TMC). It is designed for precise and efficient control of stepper motors, offering advanced features such as microstepping, current control, and low-noise operation. The TMC2226 is particularly well-suited for applications requiring smooth and quiet motor operation, such as 3D printers, CNC machines, and robotics.
The TMC2226 is a versatile and feature-rich stepper driver. Below are its key technical specifications:
Parameter | Value |
---|---|
Supply Voltage (V_M) | 4.75V to 29V |
Logic Voltage (V_IO) | 3.3V or 5V |
Maximum Motor Current | Up to 2.8A (peak) per phase |
Microstepping Resolution | Up to 1/256 steps |
Communication Interface | UART |
Standby Current | Ultra-low standby current |
Operating Temperature | -40°C to +125°C |
Features | StealthChop2™, SpreadCycle™, CoolStep™, StallGuard4™ |
The TMC2226 comes in a 28-pin HTSSOP package. Below is the pin configuration and description:
Pin Number | Pin Name | Description |
---|---|---|
1 | V_M | Motor power supply (4.75V to 29V) |
2 | GND | Ground connection |
3 | ENN | Enable input (active low) |
4 | DIR | Direction input for motor rotation |
5 | STEP | Step pulse input |
6 | UART | UART data input/output for configuration and diagnostics |
7 | V_IO | Logic voltage supply (3.3V or 5V) |
8 | MS1 | Microstep resolution selection input 1 |
9 | MS2 | Microstep resolution selection input 2 |
10 | DIAG | Diagnostic output (e.g., stall detection) |
11-28 | Various | Motor phase outputs, additional configuration, and power connections |
Refer to the TMC2226 datasheet for a complete pinout and detailed descriptions.
Below is an example of how to control a stepper motor using the TMC2226 and an Arduino UNO:
// Include necessary libraries
#include <TMCStepper.h>
// Define TMC2226 pins
#define EN_PIN 8 // Enable pin
#define DIR_PIN 5 // Direction pin
#define STEP_PIN 6 // Step pin
#define SERIAL_PORT Serial // UART communication port
// Define motor current (in milliamps)
#define R_SENSE 0.11 // Sense resistor value
TMC2226Stepper driver(&SERIAL_PORT, R_SENSE); // Initialize driver
void setup() {
pinMode(EN_PIN, OUTPUT);
pinMode(DIR_PIN, OUTPUT);
pinMode(STEP_PIN, OUTPUT);
digitalWrite(EN_PIN, LOW); // Enable the driver
SERIAL_PORT.begin(115200); // Initialize UART communication
driver.begin(); // Initialize TMC2226
driver.toff(5); // Enable driver
driver.rms_current(800); // Set motor current to 800mA
driver.microsteps(16); // Set microstepping to 1/16
}
void loop() {
digitalWrite(DIR_PIN, HIGH); // Set direction
for (int i = 0; i < 200; i++) {
digitalWrite(STEP_PIN, HIGH);
delayMicroseconds(1000); // Step delay
digitalWrite(STEP_PIN, LOW);
delayMicroseconds(1000);
}
delay(1000); // Wait before changing direction
digitalWrite(DIR_PIN, LOW); // Reverse direction
for (int i = 0; i < 200; i++) {
digitalWrite(STEP_PIN, HIGH);
delayMicroseconds(1000);
digitalWrite(STEP_PIN, LOW);
delayMicroseconds(1000);
}
delay(1000);
}
Motor Not Moving:
Overheating:
Noisy Operation:
Stall Detection Not Working:
Q: Can the TMC2226 operate without UART?
A: Yes, the TMC2226 can operate in standalone mode using the STEP, DIR, and microstepping pins. However, UART is required for advanced features like StealthChop2™ and StallGuard4™.
Q: What is the maximum microstepping resolution?
A: The TMC2226 supports up to 1/256 microstepping for ultra-smooth motor operation.
Q: How do I set the motor current limit?
A: The motor current limit can be set via UART or by adjusting the sense resistor value (R_SENSE).
Q: Is the TMC2226 compatible with 5V logic?
A: Yes, the TMC2226 supports both 3.3V and 5V logic levels for compatibility with a wide range of microcontrollers.