Stufin
Home Quick Cart Profile

DRV8825 Stepper Motor Driver Module

Buy Now

Microstepping mode

The motor moves in smaller steps, with up to 32,768 microsteps per revolution, allowing for smoother and more precise motion.

The module features a built-in translator that converts step and direction inputs into motor phase signals, making it easy to control the motor using a microcontroller or other control systems.

Key Features

  • High Current Handling: The module can handle up to 2.5A of current per phase, making it suitable for driving larger stepper motors.
  • Microstepping Capability: The module supports microstepping up to 32,768 steps per revolution, enabling smooth and precise motor control.
  • Adjustable Current Limiting: The module features an adjustable current limiting function, allowing users to set the maximum current limit according to their motor's specifications.
  • Overcurrent Protection: The module provides overcurrent protection to prevent motor damage in case of excessive current draw.
  • Thermal Protection: The module has built-in thermal protection to prevent overheating and motor damage.
  • Low RDS(ON) MOSFETs: The module uses low RDS(ON) MOSFETs to minimize power losses and reduce heat generation.
  • 5V Logic Compatibility: The module's logic inputs are 5V tolerant, making it compatible with a wide range of microcontrollers and control systems.
  • Small Form Factor: The module has a compact design, making it ideal for space-constrained applications.

Specifications

Input Voltage

8.2V to 45V

Output Current

Up to 2.5A per phase

Microstepping Resolution

Up to 32,768 steps per revolution

Logic Voltage

5V

Operating Temperature

-20C to +85C

Dimensions

15mm x 20mm x 3mm (L x W x H)

Applications

The DRV8825 Stepper Motor Driver Module is suitable for a wide range of applications, including

3D printers

CNC machines

Robotics

Automation systems

Medical devices

Industrial control systems

Conclusion

The DRV8825 Stepper Motor Driver Module is a high-performance, feature-rich module designed to control bipolar stepper motors with precision and accuracy. Its advanced features, high current handling capabilities, and compact design make it an ideal choice for a wide range of applications requiring precise motor control.

Pin Configuration

  • DRV8825 Stepper Motor Driver Module Pinout Explanation
  • The DRV8825 Stepper Motor Driver Module is a popular and versatile stepper motor driver module used in various IoT and robotics applications. The module has a total of 16 pins, which are explained below:
  • Pin Structure:
  • 1. VMOT (Pin 1): Input voltage pin for the motor. This pin supplies power to the motor. The recommended voltage range is 8.2V to 45V.
  • 2. GND (Pin 2): Ground pin. Connect to the negative terminal of the power supply or the ground of the microcontroller.
  • 3. VCC (Pin 3): Input voltage pin for the logic circuitry. This pin supplies power to the internal logic circuitry. The recommended voltage range is 3.3V to 5V.
  • 4. GND (Pin 4): Ground pin. Connect to the negative terminal of the power supply or the ground of the microcontroller.
  • 5. ENABLE (Pin 5): Enable pin. This pin enables or disables the motor driver. A high logic level (VCC) enables the driver, while a low logic level (GND) disables it.
  • 6. MS1 (Pin 6): Microstepping selection pin 1. This pin, along with MS2 and MS3, sets the microstepping resolution of the driver. See the microstepping mode table below for more information.
  • 7. MS2 (Pin 7): Microstepping selection pin 2. This pin, along with MS1 and MS3, sets the microstepping resolution of the driver.
  • 8. MS3 (Pin 8): Microstepping selection pin 3. This pin, along with MS1 and MS2, sets the microstepping resolution of the driver.
  • 9. DIR (Pin 9): Direction pin. This pin sets the direction of the motor rotation. A high logic level (VCC) sets the direction as clockwise, while a low logic level (GND) sets it as counterclockwise.
  • 10. STEP (Pin 10): Step pin. This pin triggers the motor to take a step. A rising edge (low to high) on this pin causes the motor to move one step.
  • 11. MOTxA (Pin 11): Motor coil A output pin.
  • 12. MOTxB (Pin 12): Motor coil B output pin.
  • 13. MOTxC (Pin 13): Motor coil C output pin.
  • 14. MOTxD (Pin 14): Motor coil D output pin.
  • 15. NC (Pin 15): Not connected. This pin is not used and should be left unconnected.
  • 16. NC (Pin 16): Not connected. This pin is not used and should be left unconnected.
  • Microstepping Mode Table:
  • | MS1 | MS2 | MS3 | Microstepping Resolution |
  • | --- | --- | --- | --- |
  • | Low | Low | Low | Full step (1 step/rotation) |
  • | High | Low | Low | Half step (2 steps/rotation) |
  • | Low | High | Low | Quarter step (4 steps/rotation) |
  • | High | High | Low | Eighth step (8 steps/rotation) |
  • | Low | Low | High | Sixteenth step (16 steps/rotation) |
  • Connection Structure:
  • To connect the DRV8825 Stepper Motor Driver Module to a microcontroller and a stepper motor, follow these steps:
  • 1. Connect the VMOT pin to a power supply (8.2V to 45V) that can handle the motor's current requirements.
  • 2. Connect the GND pins (2 and 4) to the negative terminal of the power supply and the ground of the microcontroller.
  • 3. Connect the VCC pin to a power supply (3.3V to 5V) that can handle the logic circuitry's current requirements.
  • 4. Connect the ENABLE pin to a digital output pin on the microcontroller to enable or disable the motor driver.
  • 5. Connect the MS1, MS2, and MS3 pins to digital output pins on the microcontroller to set the microstepping resolution.
  • 6. Connect the DIR pin to a digital output pin on the microcontroller to set the motor direction.
  • 7. Connect the STEP pin to a digital output pin on the microcontroller to trigger the motor to take a step.
  • 8. Connect the MOTxA, MOTxB, MOTxC, and MOTxD pins to the corresponding motor coil terminals on the stepper motor.
  • Important Notes:
  • Make sure to connect the motor coil wires to the correct motor terminals (A, B, C, and D) to ensure proper motor operation.
  • The DRV8825 Stepper Motor Driver Module can handle up to 2.5A per coil, so ensure the motor current requirements do not exceed this limit.
  • Use a suitable heat sink on the driver module to prevent overheating, especially when driving high-current motors.
  • Consult the datasheet and application notes for more information on using the DRV8825 Stepper Motor Driver Module.

Code Examples

DRV8825 Stepper Motor Driver Module Documentation
Overview
The DRV8825 Stepper Motor Driver Module is a high-current, microstepping driver designed for applications requiring precise control of stepper motors. This module is based on the Texas Instruments DRV8825 IC, which provides advanced features such as adjustable current limiting, overcurrent protection, and microstepping.
Pinout and Connections
| Pin | Function |
| --- | --- |
| VMOT | Motor Voltage (Up to 45V) |
| GND | Ground |
| DIR | Direction Input |
| STEP | Step Input |
| ENABLE | Enable Input (Active Low) |
| MS1, MS2, MS3 | Microstepping Select Inputs |
| RST | Reset Input (Active Low) |
Example 1: Basic Stepper Motor Control using Arduino
This example demonstrates how to control a stepper motor using the DRV8825 module with an Arduino board.
```cpp
#include <arduino.h>
#define DIR_PIN 2
#define STEP_PIN 3
#define ENABLE_PIN 4
void setup() {
  pinMode(DIR_PIN, OUTPUT);
  pinMode(STEP_PIN, OUTPUT);
  pinMode(ENABLE_PIN, OUTPUT);
  digitalWrite(ENABLE_PIN, LOW); // Enable the driver
}
void loop() {
  digitalWrite(DIR_PIN, HIGH); // Set direction (clockwise)
  for (int i = 0; i < 200; i++) {
    digitalWrite(STEP_PIN, HIGH);
    delayMicroseconds(500);
    digitalWrite(STEP_PIN, LOW);
    delayMicroseconds(500);
  }
digitalWrite(DIR_PIN, LOW); // Set direction (counterclockwise)
  for (int i = 0; i < 200; i++) {
    digitalWrite(STEP_PIN, HIGH);
    delayMicroseconds(500);
    digitalWrite(STEP_PIN, LOW);
    delayMicroseconds(500);
  }
}
```
Example 2: Microstepping with Raspberry Pi (Python)
This example demonstrates how to control a stepper motor using the DRV8825 module with a Raspberry Pi board, taking advantage of microstepping.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
MS1_PIN = 17
MS2_PIN = 23
MS3_PIN = 24
DIR_PIN = 25
STEP_PIN = 8
ENABLE_PIN = 7
GPIO.setup(MS1_PIN, GPIO.OUT)
GPIO.setup(MS2_PIN, GPIO.OUT)
GPIO.setup(MS3_PIN, GPIO.OUT)
GPIO.setup(DIR_PIN, GPIO.OUT)
GPIO.setup(STEP_PIN, GPIO.OUT)
GPIO.setup(ENABLE_PIN, GPIO.OUT)
# Set microstepping mode (1/4 step)
GPIO.output(MS1_PIN, GPIO.HIGH)
GPIO.output(MS2_PIN, GPIO.HIGH)
GPIO.output(MS3_PIN, GPIO.LOW)
GPIO.output(ENABLE_PIN, GPIO.LOW)  # Enable the driver
while True:
    GPIO.output(DIR_PIN, GPIO.HIGH)  # Set direction (clockwise)
    for i in range(400):
        GPIO.output(STEP_PIN, GPIO.HIGH)
        time.sleep(0.001)
        GPIO.output(STEP_PIN, GPIO.LOW)
        time.sleep(0.001)
GPIO.output(DIR_PIN, GPIO.LOW)  # Set direction (counterclockwise)
    for i in range(400):
        GPIO.output(STEP_PIN, GPIO.HIGH)
        time.sleep(0.001)
        GPIO.output(STEP_PIN, GPIO.LOW)
        time.sleep(0.001)
```
Example 3: Adjusting Current Limit using I2C (Arduino)
This example demonstrates how to adjust the current limit of the DRV8825 module using I2C communication with an Arduino board.
```cpp
#include <Wire.h>
#define DRV8825_I2C_ADDRESS 0x57
void setup() {
  Wire.begin();
}
void loop() {
  // Set current limit to 1.5A
  Wire.beginTransmission(DRV8825_I2C_ADDRESS);
  Wire.write(0x1C);  // Register address for current limit
  Wire.write(0x05);  // Value for 1.5A current limit
  Wire.endTransmission();
delay(1000);
// Set current limit to 2.5A
  Wire.beginTransmission(DRV8825_I2C_ADDRESS);
  Wire.write(0x1C);  // Register address for current limit
  Wire.write(0x09);  // Value for 2.5A current limit
  Wire.endTransmission();
delay(1000);
}
```
Note: Make sure to adjust the pin connections and I2C addresses according to your specific setup and requirements. Additionally, consult the DRV8825 datasheet for detailed information on microstepping, current limiting, and other advanced features.