The Adafruit DRV8871 is a robust motor driver board designed to control a single brushed DC motor. It is based on the DRV8871 chip from Texas Instruments, which offers high-efficiency motor driving with advanced protection features. This board is ideal for DIY enthusiasts and professionals looking to drive motors in their projects, such as robotics, automated equipment, and custom vehicles.
Pin Number | Name | Description |
---|---|---|
1 | VMOT | Motor power supply (6.5 V to 45 V) |
2 | GND | Ground connection |
3 | AIN1 | Logic input 1, controls motor direction |
4 | AIN2 | Logic input 2, controls motor direction |
5 | VCC | Logic power supply (2.7 V to 7 V) |
6 | OUT1 | Motor output 1 |
7 | OUT2 | Motor output 2 |
8 | FAULT | Fault indicator output (open-drain) |
// Example code to control a DC motor with the Adafruit DRV8871 and Arduino UNO
const int AIN1 = 2; // Connect to AIN1 on the DRV8871
const int AIN2 = 3; // Connect to AIN2 on the DRV8871
void setup() {
pinMode(AIN1, OUTPUT);
pinMode(AIN2, OUTPUT);
}
void loop() {
// Set motor direction to clockwise
digitalWrite(AIN1, HIGH);
digitalWrite(AIN2, LOW);
delay(1000); // Run motor for 1 second
// Set motor direction to counterclockwise
digitalWrite(AIN1, LOW);
digitalWrite(AIN2, HIGH);
delay(1000); // Run motor for 1 second
// Stop the motor
digitalWrite(AIN1, LOW);
digitalWrite(AIN2, LOW);
delay(1000); // Stop motor for 1 second
}
Q: Can I use the DRV8871 to drive a stepper motor? A: No, the DRV8871 is designed for brushed DC motors, not stepper motors.
Q: What should I do if the motor is drawing too much current? A: Check if the motor is stalled or if there is mechanical resistance. Use a current limiting power supply or add a current sensing resistor to prevent overcurrent conditions.
Q: How can I reverse the motor direction? A: To reverse the motor direction, swap the logic levels on AIN1 and AIN2.
Q: Can I control the speed of the motor with the DRV8871? A: Yes, you can control the speed by applying a PWM signal to one of the AIN pins while keeping the other pin at a logic low level.
Q: Is it necessary to use a heat sink with the DRV8871? A: It depends on the current your motor is drawing. For high current applications, a heat sink is recommended to prevent overheating.
This documentation provides a comprehensive guide to using the Adafruit DRV8871 motor driver board. For further assistance or technical support, please refer to the manufacturer's resources or community forums.