Good day fellows,
I am using a BTS7960 motor driver with a dc motor. I got the motor running. All I care for now is the current measurement. According to the datasheet you are supposed to put a resistor from pin R_IS or L_IS to ground and measure the voltage, which is proportinal to the current. When I measure the voltage drop with analogRead I get sequences of around 3 values, then a couple 0 and so on. Did anybody work with the BTS7960 and used the current sensing?
Do you have any analog filtering on the current sense? If you give the driver a PWM input, analogRead() won't work very well unless you filter out the PWM frequency.
Here's a circuit I've used on VNH2SP30, BTS5120 and other similar devices:
R6 is the current sense resistor, R5 and the capacitor form the filter.
The pin samples the current in the high-side driver, so it gets modulated just like the high side
driver. If you low-pass filter you'll get the average current, if you don't then you'll get readings
that vary between zero and the peak current.