How to connect H bridge for its protection features

Thread Starter

mikeoz

Joined Sep 25, 2017
86
Hi,

I've finally resolved the problems with the IBT-2 (BTS7960) H bridge - It turned out I was sent a faulty module :mad:
I'd like to take advantage of the protection features which the BTS7960 chips have, such as overcurrent, shortcircuit etc. Does the module need to be connected in a certain way to take advantage of this?

I've currently got it connected to my Arduino as described below in usage one:



As with all the examples I've found online, R_IS and L_IS are not connected, but I believe these are the current sensing/fault pins. Do these need to be connected to my Arduino for the protection features to work - and if so, how?
I've attached the datasheet to this post if anyone can help with this. Page 13 describes the protection functions but I'm still unclear on how it should be connected.

Many thanks

Michael
 

Attachments

tsan

Joined Sep 6, 2014
138
I have never used this device so I'm just interpreting the datasheet, but description of current sense is on page 17, chapter "4.4.4 Status Flag Diagnosis With Current Sense Capability". There is a current source, which is shown in figure 10 on page 18.

Maximum current is 7 mA -with 13,5 V Vs and 1 kohm Ris- according to data on page 20, "4.4.7 Maximum analog sense current, sense current in fault condition". 7 mA*1 kohm = 7 V, which is too much for Arduino analog input. You could try using smaller resistance Ris resistor. Voltage Vis shown on Figure 10 is connected to Arduino analog input.

Connections on IBT-2 when assuming that resistance of Ris is 500 ohm (suitable for Arduino UNO):
-500 ohm resistor is connected between R_IS and ground. R_IS is connected to Arduino analog input.
-second 500 ohm resistor is connected between L_IS and ground. L_IS is connected to second Arduino analog input.
 

Thread Starter

mikeoz

Joined Sep 25, 2017
86
Thanks a lot for the replies.

So just to be clear, for these protection features to work, the IS pins need to be connected?

tsan, that's really helpful. When you say '500 ohm resistor is connected between R_IS and ground', is that the GND pin of the Arduino Uno I would need to connect to?

Thanks for that link dendad, I'll have a read through it.

Michael
 

tsan

Joined Sep 6, 2014
138
So just to be clear, for these protection features to work, the IS pins need to be connected?Michael
IS pin has a dual purpose:
a) During normal run, current to resistor Ris is proportional to load current (actually current of high side switch). Nominal/typical scaling factor listed on the datasheet is 8500. So with 15 A current, current to resistor Ris is 15 A/8500 = 1,8 mA. If this is supplied to 500 ohm resistor, voltage to Arduino analog input is 1,8 mA*500 = 0,9 V.

b) On fault condition, about 7 mA is supplied to Ris. This makes 7 mA*500 = 3,5 V on analog input.

When you say '500 ohm resistor is connected between R_IS and ground', is that the GND pin of the Arduino Uno I would need to connect to?
Arduino ground pin has to be connected to pin 8 GND in any case, so 500 ohm resistor is effectively connected to both grounds. First line of usage one is: VCC pick MCU 5 V power supply, GND connected microcontroller GND.

Timo
 

Thread Starter

mikeoz

Joined Sep 25, 2017
86
Thanks for your help Timo.

I've added a quick drawing below using L_IS as an example of the required connections - just to make sure I understand you correctly. Let me know if I've misunderstood.
IS pin connection.jpg

So although I'm connecting to the Analog input of the Arduino Uno, there isn't actually any code required?
I did some more research and came across this thread: https://forum.arduino.cc/index.php?topic=493595.0 you'll probably understand it better than me, but it talks about analog filtering. Would this be necessary in my situation where I just want the basic protection features of the driver?

Thanks again,

Michael
 

tsan

Joined Sep 6, 2014
138
So although I'm connecting to the Analog input of the Arduino Uno, there isn't actually any code required?
There has to be code to read analog input.
I did some more research and came across this thread: https://forum.arduino.cc/index.php?topic=493595.0 you'll probably understand it better than me, but it talks about analog filtering. Would this be necessary in my situation where I just want the basic protection features of the driver?
It is possible, that it works without filtering. If noise causes nuisance fault detection, then some filtering is required. You can use RC filter like on the thread, or just connect for example 1-10 uF capacitor in parallel with 500 ohm resistor. Close to Arduino analog pin is better than close to IBT-2.

Timo
 

Thread Starter

mikeoz

Joined Sep 25, 2017
86
Thanks for that Timo,

I'll order the resistors and get it set up. I've not had any luck finding examples of code to read the input so that's something I'll have to look into further.

Michael
 

Thread Starter

mikeoz

Joined Sep 25, 2017
86
Thanks Dendad,

Yes, I've seen the analogRead function. I'm using it to read the potentiometer input on my Arduino - this controls the speed of the motor. I guess what's thrown me is that I thought these protection features on the BTS7960 chips - such as overvoltage, overcurrent etc, operated automatically and didn't require code from the Arduino to function.

Michael
 

dendad

Joined Feb 20, 2016
4,451
Thanks Dendad,

Yes, I've seen the analogRead function. I'm using it to read the potentiometer input on my Arduino - this controls the speed of the motor. I guess what's thrown me is that I thought these protection features on the BTS7960 chips - such as overvoltage, overcurrent etc, operated automatically and didn't require code from the Arduino to function.

Michael
They probably do operate automatically but are max overload values of the chip. If you want to limit the current to a lower value , reading it with the Arduino and backing off the PWM when the current gets to your required current will allow that.
 

Thread Starter

mikeoz

Joined Sep 25, 2017
86
I see, so if I wanted the maximum current limited to under the 43A the driver is rated to I'd use the the IS pins along with Arduino code. Does the Arduino react quickly enough with the analogRead to prevent motor damage in the event of a stall?

Michael
 

dendad

Joined Feb 20, 2016
4,451
I see, so if I wanted the maximum current limited to under the 43A the driver is rated to I'd use the the IS pins along with Arduino code. Does the Arduino react quickly enough with the analogRead to prevent motor damage in the event of a stall?

Michael
Yes, the Arduino will be fast enough as long as you don't write in line delays.
 

Thread Starter

mikeoz

Joined Sep 25, 2017
86
Thanks Dendad, I've been looking further into this - particularly what arduino code would be required. Should I be looking at sketches for current sensing as an example?

Michael
 

dendad

Joined Feb 20, 2016
4,451
You may be able to find some code. My quick look failed buy I'm sure there is some out in the wild.
Try a simple R/C low pass filter to an analog in and have a play. If you are already reading a pot you have the code you need. Start with reading the motor current and sending it to the serial port for a display. Or have a limit set and light an LED when it is over.
The reading will jump around a lot I would think.
After you get a good reading, use it to modify the PWM value so if the current goes up to far, the PWM is reduced.
 
Top