Problem: bts7960 motor driver arduino uno

Hello! I'm an engineering student and I'm working to automate a wheelchair using voice commands with auto-navigation.

I am using 2 24V DC motors with a rated current of 14A and I used 2 BTS7960 motor driver to control it. At first it is working fine, however, when I inserted the Arduino USB cord to another port in my laptop it does not work anymore. I have done serious wiring inspections and I am sure my wirings are correct. And I am sure that the problem is not with the DC motors since I directly connected my DC motors into a 2 12V batteries connected in series.

I guess the main problem is my motor drivers. If anyone can help me on how can I test and determine if my motor drivers are fried or not?

Below is my code to initially test my dc motors:
#define LeftRPWM 12
#define LeftLPWM 13
#define RightRPWM 9
#define RightLPWM 10
#define PWM 11

void motor_cw() //Clockwise
{
digitalWrite (LeftLPWM, HIGH);
digitalWrite (LeftRPWM, LOW);
digitalWrite (RightLPWM, LOW);
digitalWrite (RightRPWM, HIGH);
analogWrite (PWM, 100); //0 - 255
Serial.println ("MOTOR RUNS CLOCKWISE");
}

void motor_ccw() //Counter-clockwise
{

digitalWrite (LeftLPWM, LOW);
digitalWrite (LeftRPWM, HIGH);
digitalWrite (RightLPWM, HIGH);
digitalWrite (RightRPWM, LOW);
analogWrite (PWM, 100);
Serial.println ("MOTOR RUNS COUNTER-CLOCKWISE");
}

void motor_stop()
{
digitalWrite (LeftLPWM, LOW);
digitalWrite (LeftRPWM, LOW);
digitalWrite (RightLPWM, LOW);
digitalWrite (RightRPWM, LOW);
analogWrite (PWM, 0);
Serial.println ("MOTOR STOPS");
}

void setup()
{
Serial.begin (9600);
Serial.println ("START");
pinMode (LeftRPWM, OUTPUT);
pinMode (LeftLPWM, OUTPUT);
pinMode (RightRPWM, OUTPUT);
pinMode (RightLPWM, OUTPUT);
pinMode (PWM, OUTPUT);
}

void loop()
{
delay(800);
motor_stop();

delay(2000);
motor_cw();

delay(2000);
motor_stop();

delay(2000);
motor_ccw();

delay(2000);
motor_stop();
}

If someone can give me any suggestions, thank you in advance

Please post schematics of the failing setup. Please check up the use of code tags when posting code.

1 Like

You can put back to back LEDs in place of the motor, I use two different colors. when in one direction I get color A and when in reverse I get color B. This will let you know if it is working. Also those devices will work well with 24V no problem however the ground for the logic is connected to the ground for the motor. They also have 5V HCMOS logic chips and overvoltage on the logic will fry them. I would expect the HC stuff to fail, the BTS chips are very tough. If you lifted a ground all bets are off. The data sheet warns you about that.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.