I'm trying to control a re used DC motor from a drill (3,6V) with a L298N and a Arduino. It's powered with a 5V - 60A power supply.
I tried to follow this step by step tutorial (https://www.youtube.com/watch?v=dyjo_ggEtVU) but the motor is not spinning..yet. I can ear a noise, it starts to spin a micron and then stops.
I though that it could be something wrong with the power supply but I connected the 4V battery from the drill and the same thing is happening. If I connect the motor directly to the battery it is spinning nicely...
I though then that it was a code issue but I tried a no load test and measured the voltage without the motor -> I've the 4V required voltage. When the motor is connected I have 300mV instead of 4V.
Do you know what could go wrong? Is the L298 dead? just got it a few hours ago...
Would be nice if you have any clue.
Many thanks.
// Commande moteur int enA = 9; int in1 = 8; int in2 = 7;
void setup()
{
// Définition des sorties
pinMode(enA, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
//Sens de rotation du moteur
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
//Vitesse de rotation du moteur
analogWrite(enA, 200);
//Delay
delay(5000);
//Arrêt du moteur
digitalWrite(in1, LOW);
digitalWrite(in2, LOW);
}
void loop() {
// put your main code here, to run repeatedly:
}