L293D rotates very slow

Hello, I have an RC car which has 2 motors (one to accelerate/brake, one for left/right). These motors are controlled by an L293D controller. I have tested many times and it was working fine but yesterday I made a final test (nothing changed in code or wiring) and I realized that the accelerate/brake motor rotates very slowly and the other one is just shaking.

I was thinking that maybe just my battery discharged so I tried with a brand new and I still have the same output. I measured the supply pins of the L293D and it gets 9V so I have no idea what happened.

My sketch is the following:

  int enablePinMotorAF = 6; 
  int in1PinMotorAF = 5;
  int in2PinMotorAF = 3;
  int enablePinMotorLR = 11;
  int in1PinMotorLR = 10;
  int in2PinMotorLR = 9;

  boolean reverse = true;

void setup() {
  pinMode(enablePinMotorAF, OUTPUT);
  pinMode(in1PinMotorAF, OUTPUT);
  pinMode(in2PinMotorAF, OUTPUT);
  pinMode(enablePinMotorLR, OUTPUT);
  pinMode(in1PinMotorLR, OUTPUT);
  pinMode(in2PinMotorLR, OUTPUT);

void loop() {
  //go forward  ->not working 
  analogWrite(enablePinMotorAF, 230);
  digitalWrite(in1PinMotorAF, reverse);
  digitalWrite(in2PinMotorAF, !reverse);


  //go back -> working
  analogWrite(enablePinMotorAF, 230);
  digitalWrite(in1PinMotorAF, !reverse);
  digitalWrite(in2PinMotorAF, reverse);


  //go right -> working
  analogWrite(enablePinMotorLR, 230);
  digitalWrite(in1PinMotorLR, !reverse);
  digitalWrite(in2PinMotorLR, reverse);


  //go left  -> working
  analogWrite(enablePinMotorLR, 230);
  digitalWrite(in1PinMotorLR, reverse);
  digitalWrite(in2PinMotorLR, !reverse);


The schematic is attached.

Can you please help mi to find out what can cause the problem?

You cannot use a 9V block battery for that (besides running motor without load). Your (9V) power supply needs enough C rating which is typically the case for eg. LiPos.


You're using the same "reverse" for both motors? Try: boolean afReverse = true, lrReverse = true; A different "reverse" for each motor