I'm trying to power a 24 volt motor using an arduino and L298N module. In the code it shows me no errors but when I run it, nothing is moving. I was originally using 2 motors, but I am just trying to get one up and running. This is my code.
void turnOnMotors(){
//Turns on Motor A
digitalWrite(in1,HIGH);
digitalWrite(in2,LOW);
//Turns on Motor B
//digitalWrite(in3,HIGH);
//digitalWrite(in4,LOW);
}
void turnOffMotors(){
//Turns on Motor A
digitalWrite(in1,LOW);
digitalWrite(in2,LOW);
//Turns on Motor B
//digitalWrite(in3,LOW);
//digitalWrite(in4,LOW);
}
void moveForward(){
//set Motor speed to 200 in all motors
analogWrite(enA,200);
//analogWrite(enB,200)
}
I'm trying to power a 24 volt motor using an arduino and L298N module. In the code it shows me no errors but when I run it, nothing is moving. I was originally using 2 motors, but I am just trying to get one up and running.
Please give full details of the hardware involved - motor, power supply, L298 module.
Posting in the programming section of the forum clearly shows you have failed to suspect the
hardware, which is usually the problem with motors - people severely underestimate the current
and power needed by even small motors. 24V motors can be upto several kW, so my first guess
is the motor needs lots more current than you suspect.