43A H-bridge Highpower Motor Driver Module Double BTS7960

The drive uses an H-bridge driver module that composed by Infineon power drive chip BTS7960, with overheating and overcurrent protection. Double BTS7960 H-bridge driver circuit, with strong drive and braking effect, use 74HC244 chip effectively isolate the microcontroller and the motor drive! High Current up to 43A!

Specifications
Input voltage: 6V-27V
Model: IBT-2
Maximum current: 43A
Input level: 3.3-5V
Control mode: PWM or level
Duty cycle: 0-100%

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 
Applications
Current diagnostic
Slope adjustment
Dead Time generation
Overtemperature, overvoltage, undervoltage, overcurrent protection
Short circuit protection

detail link : 
https://www.instructables.com/id/Motor-Driver-BTS7960-43A/

When you Build Your project , Sometimes you faced some issue with Motor driving Control , Specially if you want to control High Power Motor , I want to write about a nice Motor driver Module , it's BTS7960 half bridge motor controller .
The BTS 7960 is a fully integrated high current half , bridge for motor drive applications , comes with Two package as in pictures .
The Operating Voltage of 24V And Continuous current of 43A Max  , PWM capability of up to 25 kHz combined with active freewheeling 
In this artical I want to show you How we can use it with arduino and control High power Motor , And change The PWM Frequency of the arduino .

The datasheet for this IC Give us useful data 

this IC Have a good protection  circuit such as :

1) Undervoltage Shut Down: To avoid uncontrolled motion of the driven motor at low voltages the device shuts off . 

if the Supply voltage VUV(OFF) droped under 5.4V , The Motor driver will switched Off , And won't turned on untill the Supply voltage increased to 5.5V Or more .

2)Overtemperature Protection: The BTS 7960 is protected against overtemperature by an integrated temperature

sensor. Overtemperature leads to a shut down of both output stages.

3)Current Limitation : The current in the bridge is measured in both switches, High and Low side ,if The current reaching the limit current (Iclx)  the switch is deactivated and the other switch is activated for a certain time(Tcls).

 

You can read The datasheet for more info 

The connection of  this module to Arduino Board is shown in schematic Below , 2 PWM Pin must connected to PWM Pin on the arduino , EN pin connected to digital pin on the arduino , The motor driver channel Will be disable if EN Pin is LOW .

 

Simple code for arduino below .

 

/*........................

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);

  }

   for(int i=5;i<9;i++){

   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);

 

}