The DRV8874 from Texas Instruments is a high-performance brushed DC motor driver designed for a wide range of applications requiring precise control of motor speed and direction. It is commonly used in robotics, industrial automation, and consumer electronics. The DRV8874 simplifies the process of driving a DC motor by integrating most of the components required for motor control into a single IC, thus reducing the complexity and footprint of the motor control circuitry.
Pin Number | Name | Description |
---|---|---|
1 | VM | Motor power supply voltage (6.5 V to 45 V) |
2 | GND | Ground |
3 | OUT1 | Motor output 1 |
4 | OUT2 | Motor output 2 |
5 | VPROPI | Proportional current regulation voltage input |
6 | ISENSE | Current sense output |
7 | nFAULT | Fault condition indicator |
8 | EN/IN1 | Enable/motor direction input 1 |
9 | PH/IN2 | Phase/motor direction input 2 |
10 | VREF | Reference voltage for current regulation |
11 | GND | Ground |
12 | VCP | Charge pump output |
13 | VCC | 3.3 V to 5 V logic supply voltage |
14 | SLEEP | Low-power sleep mode |
// Define the control pins for the DRV8874
#define EN_IN1 2
#define PH_IN2 3
void setup() {
// Set the control pins as outputs
pinMode(EN_IN1, OUTPUT);
pinMode(PH_IN2, OUTPUT);
}
void loop() {
// Set the motor direction to clockwise
digitalWrite(EN_IN1, HIGH);
digitalWrite(PH_IN2, LOW);
delay(1000); // Run the motor for 1 second
// Set the motor direction to counter-clockwise
digitalWrite(EN_IN1, HIGH);
digitalWrite(PH_IN2, HIGH);
delay(1000); // Run the motor for 1 second
// Stop the motor
digitalWrite(EN_IN1, LOW);
delay(1000); // Stop the motor for 1 second
}
Q: Can the DRV8874 be used to drive two motors? A: No, the DRV8874 is designed to drive a single brushed DC motor.
Q: What is the function of the VREF pin? A: The VREF pin sets the reference voltage for the current regulation feature, allowing control over the maximum current supplied to the motor.
Q: How do I put the DRV8874 into sleep mode? A: Drive the SLEEP pin low to put the DRV8874 into a low-power sleep mode.
Q: How can I reverse the motor direction? A: Change the logic levels on the PH/IN2 and EN/IN1 pins to reverse the motor direction.
For further assistance or technical support, please contact Texas Instruments customer support or refer to the DRV8874 datasheet for more detailed information.