Using the BTS7960 H-Bridge Driver to control a jack motor

Hey everyone,

So I have this big jack motor that is rated at 90 W, and 36 V. We’re using it to drive two solar thermal collectors (PTC) for tracking.

Now the problem here is that we used the famous L298N to try and drive it and we fried three of those h-bridges. The first time we used it, it worked for a few hours, driving the motor with the sun’s position, only it changed its position A LOT and went back and forth, maybe because the tolerance value that we defined in the arduino’s code (I think it was 50) was too low (or too high?) and the starting current that the motor needed was too much for the L298N, anyways it stopped working completely.

The second one wasn’t working for some reason, and the third h-bridge got fried after 15 seconds of connecting the power.

Keep in mind we gave the H-Bridge 24 Volts (even though the motor says it needs 36 volts), and 5 volts for the logic circuit, with the jumper removed.

Now we decided to use BTS7960 h-bridge driver as we think it’ll solve the problem of the motor draining too much current for the previous driver to handle, and my question is as follows:

  • Does it work exactly as the L298N driver? Do we just connect the pins where IN1 and IN2 were connected to LPWM and RPWM?
  • What exactly do the pins that are R_EN, L_EN, R_IS and L_IS do? I read in a control sheet that we should just connect the first two pins with 5 volts from the arduino and the last two pins are unneeded.

I don’t have a schematic, but the connections will be as follows:

  • 24 volts supplied to B+, and B- going to a ground rail on a breadboard.
  • The positive and negative wires of the jack motor connected to M+ and M- of the BTS7690 driver.
  • The LPWM and RPWM connected to pins 8 and 9 on an arduino mega 2560, respectively.
  • 12 Volts supplied to Vin into the arduino.
  • 3.3 volts supplied to a positive rail on the breadboard from the arduino’s 3.3 volt pin, where the LDRs that are going to track the sun’s position will be connected to.
  • 5 volts supplied to another positive rail on the breadboard from the arduino’s 5 volt pin, where the pins Vcc, L_EN and R_EN are going to be connected to.

And here’s the code:

int LDR_reading1 = A0;
int LDR_reading2 = A1;

int in1 = 8;
int in2 = 9;
int tol = 10;
void setup() {
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
}

void loop() {
  int x1 = analogRead(LDR_reading1);
  int x2 = analogRead(LDR_reading2);
  int xd = x1 - x2;
  if(abs(x1 - x2) <= tol) {
    TurnMotorOFF();
  } else {
    if(x1<x2) {
      TurnMotorCW();
    }
    if(x2<x1) {
      TurnMotorCCW();
    }
  }
  delay(1000);
}

void TurnMotorCW () {
  digitalWrite(in1, LOW);
  digitalWrite(in2, HIGH);
}

void TurnMotorCCW() {
  digitalWrite(in1, HIGH);
  digitalWrite(in2, LOW);
}

void TurnMotorOFF() {
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW);
}

I doubt the name of the variables have any effect here right?
Will this connection work? Or is the h-bridge driver also going to fry?

Please if someone has any clue if there’s something wrong with the code that’ll affect the functionality of the driver and the motor (make it move a lot or make it move back and forth), like maybe the tolerance value or the way the functions are written and laid out in that if statement, then please tell me about it so that I can fix it.

Thanks!

Please post a link to the datasheet for your H-bridge.

If you can find a link for the datasheet for the motor that would also be useful.

If the jack is under load when the motor starts the motor will draw close to its stall current for a short period and the stall current will be several times higher than the running current - maybe 10 times as much. Your motor driver must be capable of handling the stall current.

…R

Make life easy go to eBay and look for BTS7960B DC 43A Stepper Motor Driver H-Bridge PWM, they can be gotten for less then $6 and come complete with a heat sink and all the interface built in so you can connect directly to an arduino. If you want to do it on a chip level go for the BTS7960, it is on the Infineon website https://www.infineon.com/dgdl/bts7960b-pb-final.pdf?folderId=db3a3043156fd5730116144c5d101c30&fileId=db3a30431ed1d7b2011efe782ebd6b60
Good Luck & Have Fun!
Gil

gilshultz: Make life easy go to eBay and look for BTS7960B DC 43A Stepper Motor Driver H-Bridge PWM,

Isn't that the part the OP already has?

If you know how to use it maybe you can help the OP?

...R

Just programmed the arduino with what I posted in the OP, and connected everything as I laid it out in the OP as well, and it "worked", kind of...

The only problem is that the motor kept going back and forth, in an effort to keep the difference between the analog readings below 10, and I don't want it to be that way as it can screw with the positioning of the collector and it won't reflect light as effectively, and it's extremely annoying to listen to and look at.

How exactly do I go about fixing this? Does increasing the value of the tolerance work? Should I put a delay of 3 minutes inside the first if block in order to fix this? Does the resistor that is connected to the LDR have any significance here?

Any ideas?

To start with the the BTS7960 is actually 1/2 bridge. They started selling them on the china marked as a bridge but the assembly they sell has two BTS7960 on it complete with interface circuits etc. The L_EN is the left enable and must be + as is the R_EN. The L_IS and R_IS are each current mirrors and fault indicators, just leave them open. VCC and ground are your logic 5 volts. L_PWM and R_PWM are the inputs for the PWM signal, that takes care of the header. The power connects to the terminal strips and remember there are two devices which can be operated independently but connected to the same power supply which is supplied by power + and power -. If you are driving a motor Out_A and Out_B go to the motor. I use them mainly to drive LEDs as a high side driver as the RDS(on) is lower in that mode. Remember the outputs are active and sink or source. I simply enable them and connect the arduino PWM outputs to the PWM inputs to drive LEDs. Good Luck & Have Fun! Gil

Adrammelech: Just programmed the arduino with what I posted in the OP, and connected everything as I laid it out in the OP as well, and it "worked", kind of...

Isn't that something that should have been done before you posted the OP ? The Arduino system is great for learning-by-doing.

...R