Go Down

Topic: [ SOLVED ] need help on using Ibt_2 (BTs7960 based driver) (Read 239 times) previous topic - next topic

hardik_khatri

Mar 01, 2019, 03:42 am Last Edit: Mar 01, 2019, 08:30 pm by hardik_khatri
Code: [Select]
void setup() {
  pinMode(12, OUTPUT); //rpwm
  pinMode(13, OUTPUT); //Lpwm
  pinMode(22, OUTPUT); //L_en
  pinMode(23, OUTPUT); //R_en


  digitalWrite(22, HIGH); //setting L_en high
  digitalWrite(23, HIGH); //setting R_en high

}

void loop() {
digitalWrite(12,HIGH);//setting rpwm high
digitalWrite(13,LOW);//setting Lpwm LOW
delay(2000);
digitalWrite(12,LOW); //setting rpwm low
delay(2000);
digitalWrite(13,HIGH); //setting Lpwm high
delay(2000);
}


I am using the above mentioned code to try and move the motor in both the directions.
I am not able to figure out how the driver works actually.



this is the driver I am using:https://robokits.co.in/motor-drives-drivers/bts7960-high-power-driver-module-43a?cPath=73_110&


what are the changes I need to make to make the motor move in both forwards and reverse direction?

hardik_khatri

#1
Mar 01, 2019, 07:41 am Last Edit: Mar 01, 2019, 07:43 am by hardik_khatri
okay I got the program working with one little change.

I swapped both rpwm and Lpwm with L_en and R_en pins position.

direction controlling using the L_en and R_en pins.

To moderators-"please mark this one as solved"

elvon_blunden

To moderators-"please mark this one as solved"
Just put "solved" in title of your opening post.



MarkT

okay I got the program working with one little change.

I swapped both rpwm and Lpwm with L_en and R_en pins position.

direction controlling using the L_en and R_en pins.

To moderators-"please mark this one as solved"
Yes, enabling both L_en and R_en as in your first attempt will just cause active braking!
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up