This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
strange behaivour
Hi, I realize some of you might not have the issue anymore or the possibility to test, but I have a question about the current sense for the IBT-2.

About the IS pins, I've bridged them to measure along one pin to the arduino.
I have seen the following comment about calculating the resistors, so we have prepared the resistors accordingly:

As indeed the voltage in current limit mode might be 7 volt and you want to get a good reading on pypilot and keep the arduino alive you should then use a voltage divider. The downside of this is that these resistors will be parallel to the 1 k resistor and will be of some influence (resistance will be lower than 1k) to the 8.5 factor that is why I suggest to keep a high value for these resistors (174k) so you should have a 100K resistor on IS as well in series with a 74K resistor connected to ground.

The point where the 100k and the 74K resistor meet will be the current sense input on the arduino. With these values you should be good if you keep the current up to 20 Amps. Just as in the software low current 20 Amps max will be 1.1 volt (Vref). If you do go above 20 Amps (you do get above the 1.1 Volt) you can use one of the other settings in the software by putting the pins D4/D5 (see motor.ino) high or low and/or chance the voltage divider accordingly.


Just before connecting it, just to be safe I tested the IS pins what they outputted. I have engaged the autopilot with a Pypilot setting of 20 amps, but the IS pins only outputted 0.4 volts maximum. So if I connect the resistors of 100k and 74k it will be even less.

So now, I have some doubts:

- should I just connect the IS pins directly to the pins? I understand from what you said and the documentation potentially the IS pins can go to 7v on the ibt-2 board
- should i connect the resistors, and just see what pypilot measures as current?

Glad to hear your thoughts or experiences with this board.
I would add at least one resistor from the current sense to the analog input, this is a form of protection. Then if you are sure the voltage will not exceed AVCC (usually 5v) then you dont need the divider.
I hope the following help to measure the current flowing through our motors connected to an IBT_2 H-Bridge (using two BTS7960).
A lot of very interesting things were said on this thread, I suggest a slightly different approach.
Let's start from the BTS7960 current sense schematic found in the datasheet



In case of fault condition, Iis can rise up to 7mA which means Vis rise to 3.3V (with 470 ohm resistor)


That all folks !


PS1: take care of the initial accuracy, Kilis parameter range is more than +/-60%.

PS2: as said by Sean, put a 100 ohm serial resistor between IS and the Arduino analog input is a good idea.

PS3: Vis is a digital signal, so put RC lowpass filter (10Kohm + 1uF) in place of serial resistor could be also a good idea.


Forum Jump:

Users browsing this thread: 1 Guest(s)