The BTS7960 Motor Driver is a high-power, high-efficiency H-bridge driver module that is capable of driving brushed DC motors. It integrates two H-bridge channels and is capable of providing a continuous current of up to 43A. The BTS7960 is commonly used in robotics, automotive applications, and in any system requiring the control of high-power DC motors.
Pin Number | Pin Name | Description |
---|---|---|
1 | RPWM | Right PWM input for speed and direction control |
2 | LPWM | Left PWM input for speed and direction control |
3 | R_EN | Right enable input; active high |
4 | L_EN | Left enable input; active high |
5 | Vcc | Logic supply voltage (5V typically) |
6 | GND | Ground connection |
7 | R_IS | Right current sense output |
8 | L_IS | Left current sense output |
9 | Motor+ | Motor power supply positive |
10 | Motor- | Motor power supply negative |
Power Connections:
Logic Connections:
Control:
Q: Can I control two motors with one BTS7960? A: Yes, the BTS7960 has two H-bridge channels, allowing you to control two motors independently.
Q: What is the maximum PWM frequency the BTS7960 can handle? A: The BTS7960 can handle PWM frequencies up to 25kHz.
Q: How do I use the current sense output? A: The current sense outputs (R_IS and L_IS) can be connected to an analog input on a microcontroller to monitor the current through the motor.
// Define the BTS7960 control pins
const int RPWM = 3; // Right PWM pin connected to Arduino pin 3
const int LPWM = 5; // Left PWM pin connected to Arduino pin 5
const int R_EN = 2; // Right Enable pin connected to Arduino pin 2
const int L_EN = 4; // Left Enable pin connected to Arduino pin 4
void setup() {
// Set the control pins as outputs
pinMode(RPWM, OUTPUT);
pinMode(LPWM, OUTPUT);
pinMode(R_EN, OUTPUT);
pinMode(L_EN, OUTPUT);
// Enable the motor driver
digitalWrite(R_EN, HIGH);
digitalWrite(L_EN, HIGH);
}
void loop() {
// Drive motor forward at full speed
analogWrite(RPWM, 255); // Full speed forward
digitalWrite(LPWM, LOW); // Ensure LPWM is LOW when driving forward
delay(2000); // Run for 2 seconds
// Brake the motor
digitalWrite(RPWM, LOW);
digitalWrite(LPWM, LOW);
delay(1000); // Brake for 1 second
// Drive motor in reverse at half speed
digitalWrite(RPWM, LOW); // Ensure RPWM is LOW when driving in reverse
analogWrite(LPWM, 127); // Half speed reverse
delay(2000); // Run for 2 seconds
// Brake the motor
digitalWrite(RPWM, LOW);
digitalWrite(LPWM, LOW);
delay(1000); // Brake for 1 second
}
This example demonstrates basic forward and reverse motor control using the BTS7960 motor driver with an Arduino UNO. Adjust the PWM values to control the speed of the motor.