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:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the simplest way to implement a IBT-2 BTS7960 motor controller
#14
(2021-04-13, 07:17 PM)damien Wrote: I am currently testing an IBT-2 with the latest motor.ino available on github repository with almost no code modifications. It works fine (after the usual dismantling of the radiator to ensure electrical isolation and apply thermal conductive paste before reassembling).

As Sean exposed, uncommenting #define VNH2SP30 is enough. Here are some notes taken:

   * IBT2 is supported but may require some adjustments for current image accuracy
   * Motor current is given by formula Il=Is*Kilis with Kilis=[3000,14000] centered on 8500.
   * This is a quite wide range and require calibration thanks to a potentiometer to avoid code modification
   * The current signal is at PWM frequency and may require a low pass filter (to be tested)
      IBT2 <-> arduino
       1. RPWM         D2
       2. LPWM       D3
       3. R_EN        D9
       4. L_EN         D9
       5. R_IS          R_IS & L_IS are connected together and linked to GND by 200ohm+1k potentiometer
       6. L_IS          A low pass RC filter based on 1uF and 1K resistor may be needed
       7. VCC         5V
       8. GND         GND

The sole modification required is the computation of the current image to match the output given by the IS resistor to GND.
if(pwm_style == 2) // VNH2SP30
       return v * 9 / 34 / 16;
The last line need to be updated.

I have chosen to keep the PWM frequency low to enable low velocities and limit BTS7960 dissipation.

Independently of the value of Kilis, I still have to check the accuracy of the current image vs PWM cycle (ie, at various velocities). This is on the list as well as a PWM on the Clutch to limit the power drawn by solenoids such as the ones of hydraulic pilots (the solenoid need to be energized full rate just a few seconds and then a PWM cycle between 50-70% is enough).

All in all and should Sean agree, I can propose some (very minor) mods to the code to support explicitly the IBT-2 based on #define options and Clutch PWM. It would be nice to have a hold-on and pwm as parameters through the various interfaces such as pypilot, web and opencpn but I have not looked at these codes yet.

Regards,

Xavier.

Hi, apologies for the noob question: I've followed your instructions (thanks Xavier, Sean and everyone else who has contributed! Smile ) with this motor controller and finally managed to get tiny pilot to drive my motor forwards or in reverse. The only thing is that I don't have a 1k potentiometer, so I just connected L_IS and R_IS to ground via a 680 ohm resistor which seems to work. Can anyone tell me what the resistance here is controlling, (motor noise pitch? Or something more critical?) and if the 680 ohms seems like a reasonable value? Or would a (lower?) value be better?

Thanks,

Manu
Reply


Messages In This Thread
RE: What is the simplest way to implement a IBT-2 BTS7960 motor controller - by Munz - 2021-12-05, 04:53 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)