Bts7960 43a using speed control system

Hi friends I need help plz

I am using bts7960 43a two motor controller plus potanciometer using speed control.

My problem is left side speed control OK
Right speed control not working

Blz help

By gosh I see the problem in about the middle of the schematic, it sure is nice it is a real schematic not a frizzy thing. The links to the hardware parts helped a lot. OOPS wrong answer but post the items mentioned it will help us help you.

Thank for replying


This is hardware part

This is code plz help


int senspin = A5; // periya Motor (Top) - Speed Controller Pin
int senspin1 = A4; // Bad moter (Bottom) - Speed Controller Pin
int potPin = A3; // Timer

int right = 2; // Periya Motor right pin
int left = 3; // Periya motor left pin
int right1 = 4; // Bad Motor right pin
int left1 = 5; // Bad Motor left pin

boolean z,z1,z3, z4; 
int sensorValue,sensorValue1;
int pwm,pwm1;    
int val = 0; 
void setup()
{
 pinMode(right, OUTPUT);
 pinMode(left, OUTPUT);
 pinMode(right1, OUTPUT);
 pinMode(left1, OUTPUT);
 pinMode(7,INPUT_PULLUP);
 pinMode(1,INPUT_PULLUP);
 pinMode(0,INPUT_PULLUP);
 pinMode(6,INPUT_PULLUP);
 z,z1=false;
}
void loop()
{
  val = analogRead(potPin);
int a= digitalRead(7); // All Control Switch

int emer= digitalRead(6); // Emergancy Switch pin


 if(emer==0)
 {

  z4=true;
   delay(100);

 analogWrite(left1, 0);
 analogWrite(right1, 0); 
 analogWrite(left, 0);
 analogWrite(right1, 0);
  }
 while(z4)
{
 int sensorValue = analogRead(senspin);
 int pwm= sensorValue/4;
 analogWrite(left, pwm);
 analogWrite(right, 0);
 
 int c=digitalRead(0);  // down switch limit pin
 if(c==0)
 {
  z4=false;
  z1=true;
  
  }
 while(z1)
 {
 analogWrite(left, 0);
 analogWrite(right, 0);
 z1=false;
  }
  }

if(a==0)
{
   
  z3=true;
  while(z3){
 sensorValue = analogRead(senspin);
 pwm= sensorValue/4;
 sensorValue1 = analogRead(senspin1);
 pwm1= sensorValue1/4;
 analogWrite(left, 0);
 analogWrite(right, pwm);
 analogWrite(right1, pwm1);
 delay(val);
 analogWrite(left, 0);
 analogWrite(right, 0);
  analogWrite(right1, 0);  
  break;
 analogWrite(left, 0);
 analogWrite(right, pwm);
 analogWrite(left1, 0);
 analogWrite(right1, pwm1);
 
}

int b=digitalRead(1); // Up limit switch pin
 if(b==0)
 {
  z3=false;
  z=true;
   delay(100);

 analogWrite(left1, 0);
 analogWrite(right1, 0); 
 analogWrite(left, 0);
 analogWrite(right1, 0);
  }
 while(z)
{
 int sensorValue = analogRead(senspin);
 int pwm= sensorValue/4;
 analogWrite(left, pwm);
 analogWrite(right, 0);
 
 int c=digitalRead(0);  // down switch limit pin
 if(c==0)
 {
  z=false;
  z1=true;
  
  }
 while(z1)
 {
 analogWrite(left, 0);
 analogWrite(right, 0);
 z1=false;
  }
  }
  }}```

Plz reply

UNO pins 2 and 4 are NOT pwm pins, you have limit switches connected to pins 0 and 1, they are for serial comms, use 2 others. PWM pins are 3,5,6,9,10,11. Use 9, 10 for one motor, 3,11 for other.

Thank for replying
This is big help thanks
Now perfectly work thank you :pray::pray::ok_hand::smiley: