*
BTS7960B H-bridge 43A high-power motor driver Module
Overview:
This driver uses chips BTS7960 composed of high-power drive full H-bridge driver module with thermal over-current protection. Double BTS7960 H-bridge driver circuit, with a strong drive and braking, effectively isolating the microcontroller and motor driver! High-current 43A
Features:
Double BTS7960 large current (43 A) H bridge driver;
5V isolate with MCU, and effectively protect MCU;
5V power indicator on board;
voltage indication of motor driver output end;
can solder heat sink;
PIN Definition:
1. RPWM: Right Turn PWM
2. LPWM: Left Turn PWM
3. R_EN: Right Turn Enable (High Active)
4. L_EN: Left Turn Enable (High Active)
5. R_IS: Right Turn Current Warning (May Leave Floating)
6. L_IS: Left Turn Current Warning (May Leave Floating)
7. VCC: (5V)
8. GND
Connections:
Method 1:
VCC: 5V from Microcontroller(MCU)
GND: GND from Microcontroller(MCU)
L_PWM: PWM or 5V from Microcontroller(MCU) for CCW(CW) Turns
R_PWM: PWM or 5V from Microcontroller(MCU) for CW(CCW) Turns
R_EN and L_EN: 5V from Microcontroller(MCU)
Method 2:
VCC: 5V from Microcontroller(MCU)
GND: GND from Microcontroller(MCU)
L_PWM: 5V from Microcontroller(MCU) for CCW(CW) Turns
R_PWM: 5V from Microcontroller(MCU) for CW(CCW) Turns
R_EN and L_EN: PWM from Microcontroller(MCU)

*





*


*
/*........................
BTS7960 Motor Driver Test
Written By : Mohannad Rawashdeh
Code for :
https://www.instructables.com/member/Mohannad+Rawashdeh/
*/
int RPWM=5;
int LPWM=6;
// timer 0
int L_EN=7;
int R_EN=8;
void setup() {
// put your setup code here, to run once:
for(int i=5;i<9;i++){
pinMode(i,OUTPUT);
digitalWrite(i,LOW);
}
delay(1000);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("EN High");
digitalWrite(R_EN,HIGH);
digitalWrite(L_EN,HIGH);
delay(1000);
for(int i=0;i<256;i++){
analogWrite(RPWM,i);
// analogWrite(LPWM,255-i);
delay(100);
}
delay(500);
for(int i=255;i>0;i--){
analogWrite(RPWM,i);
// analogWrite(LPWM,255-i);
delay(100);
}
delay(500);
Serial.println("EN LOW");
digitalWrite(R_EN,LOW);
digitalWrite(L_EN,LOW);
delay(1000);
for(int i=0;i<256;i++){
analogWrite(RPWM,i);
delay(100);
}
delay(500);
for(int i=255;i>0;i--){
analogWrite(RPWM,i);
delay(100);
}
delay(500);
}