L298N working a few seconds

Hi!
My L298N motor driver has stopped working after I dismantled and rebuild the robot.

I did this connection:

That is, I connected the L298N to 4 AA batteries and try to turn on the motors by using the 5V output on the board. It runs a few seconds, and works better on Motor A side (IN1, IN2)

I tried another battery (9V) and I could see from the LED that the power dropped when I tried to apply power on the IN1, IN2, IN3 and IN4.

What can be the cause of that? I assume the connection to the motors is still working since the wheels move a few seconds....

Hi,

What motors are you using? DC or stepper? I'm assuming it's a stepper since you have the 4 wires in the image.

Do you have the wires in the same order as on the image? All the wires connecting to the arduino board from the L298N that I have seen:

IN1: 8
IN2: 9
IN3: 10
IN4: 11

(all DC signals as you know).

Is your stepper motor a 12v/9v motor? That's the main reason you should change the power supply (and you would ofc need to supply enough voltage to drive the motors). I don't see a design online like the one you are trying to use (with the connected 5v)

Have you connected the ground of the L298N to the arduino? (Common ground) :slight_smile:

If all those are fine, check the motor without the wheels see if it can continuously rotate without them.

I'd suggest not using that setup since there are annotations on it and its not very clear...but that's just preference :slight_smile:

Are you saying that the L298N worked before you rebuilt the robot? What was it powered with then? Has the code changed? Where is the code?

Your problem sounds like insufficient power. The L298N loses 2-4V so trying to run it on only 4AAs rarely works well. And if your (9V) is a little smoke-detector battery then that can't supply enough current to run motors.

Steve

Thank you Kathy and Steve,

It is not connected to an arduino. I use two DC motors (of the most basic type: Yellow DC Motor 3-12VDC 2 Flats Shaft | Wiltronics). My bad!! When I linked that image, I was very tired and missed that it was a picture of something else: it looks more like this, except that I tried both 9V and 4 1.5AA batteries:
Imgur: The magic of the Internet

Before the rebuilding it worked fine on 4 AA 1.5V batteries.
When the L298 works you can try your motors by applying 5V to the IN pins. For example here at 2:40: L298N Robot! Learn how to drive DC motors with L298N and Arduino (From Banggood) - YouTube, so the code is not in cause. So you can quickly take a look without implementing any logic.

It really stopped working (I mean I see a reaction when I touch the IN pins, but it's very short) after the rebuilding. It makes a sharp move forward when touching IN1, a sharp move backwards when touching IN2, and almost no movement when I touch IN3 and IN4.

When I connect the Arduino with common ground through a breadboard I could hear a beeping sound. I tried to google the possible cause of the sound - I assume I did a short circuit. That's why I decided to test only the motor driver.

Okie dokie, I'd still try and apply the power supply directly to the motors to see if the motors work without the L298N. It's a simple test just to see if the power supply is able to drive the motors or not (the 9v since you said the 4 AA batteries worked). If they do work, its something to do with your driver! ^^

The video looks snazzy! I get what you mean. Were you able to make secure connections like he did in the video (with a screwdriver etc). The jumper from the 12v to 5v seems like the tricky bit to make sure it is connected. Did you create the jumper wire yourself and is the wire long enough to be properly pushed into the headers? It also looks like you only need that jumper to act as the signals for the motor - you don't need them when connecting to the arduino board (you probably already know that).

I'm not sure, but the difference between using a 9V battery and the 4 AA batteries could be the power it provides - the voltages are the same but the current is different. Try researching and see if the battery is 'powerful' enough.

Try each motor each side also just in case - as the left (IN1 & IN2) control the left motor and the right (IN3 & IN4) control the right motor. See if it makes any difference - note whether its the side of the motor driver or whether its the motors themselves.

Hopefully you are able to fix it!!!

Hello,

Thank you for your great suggestions, you solved my problem :). I mounted the screws the wrong ways and they got stuck in the wheels, but I couldn't see it. So checking the motors without the wheels was the solution :slight_smile:

You do not need the jumper between the 12V (which is an input) and the 5V (which is an output that is used to provide current for logic). Did it dozen times, you can try :slight_smile:

The difference between 4 * 1.5V and a one 9V: 9V batteries contain smaller AAAA batteries, they are not suited to drive the motors. (Arduino won't run well on 9v battery - Electrical Engineering Stack Exchange) I just did it to test the motor driver quickly, and the led shined less (indicating current drop).

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.

Ops image:

Tom.. :slight_smile: