DC Motor not rotating on their own, L293D motor driver

I have a L293D motor driver shield. I want to rotate the DC Motors with it. But when I give power to the driver, the motor does not move, It makes noise.

Details :
Arduino Mega 2560
L293D Motor Driver Shield
DC Motor
Powered by : 9v battery (common power supply)

Code :

#include <AFMotor.h>
AF_DCMotor M1(1);
//AF_DCMotor M2(2);
 
void setup() {
  M1.setSpeed(150);
  //M2.setSpeed(150);
}
 
void loop() {
  M1.run(FORWARD);
  //M2.run(FORWARD);
  delay(2000);
  M1.run(BACKWARD);
  //M2.run(BACKWARD);
  delay(2000);
  M1.run(RELEASE);
  //M2.run(RELEASE);
  delay(500);
}

I want to use it for a project but the motor is not working its stuttering.
Please Help

Links to the datasheets of the motor and that 9 volt supply please.

Battery like the one below? Those batteries have very little current capability. It is no wonder that the motor will not turn.

You need a power source that will supply the stall current of the motor. The stall current will be drawn, briefly, every time that the motor is started. The stall current can be 10 times, or more, the running current. The stall current should be listed on the motor's data sheet. Choose a power source and motor driver based on the motor stall current.

It's exactly the same, Thanks for helping

Though cheap and plentiful, the L293 (and cousin L298) are far from the best choice for a DC motor driver. They use ancient and inefficient Darlington transistor output stages that drop 2V to over 4V of the motor power and dissipate it as heat. Much more efficient modern motor drivers use MOSFETs in the output stages. Pololu has a good line of DC motor drivers.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.