I'm trying to assemble a L298N module with Arduino and 4 gear motors.
I have 6v (1.5v x4 batteries) and also a 9v battery to try with.
Connections:
Connecting two motors to one side(Out1,Out2), and two motors to the other side(Out3,Out4)
Connecting Arduino 5V pin to the L298N 5v pin
Connecting Arduino's AND Batteries ground pin to L298N ground pin
Connecting Battries (+) pin to L298N 12v pin
Connecting Arduino's 3,4,5,6 Digital PWM pins to L298N's IN1,IN2,IN3,IN4.
Then compiling and uploading this code. (Attached to this thread).
Also I'm uploading a picture (top-down view)
The problem: After uploading the code to Arduino, disconnecting the cable from the computer, I hear that the motor module does work (it makes some noise), but the motors don't rotate. What possibly am I missing here to make this work?
An L298 can only control 2 motors. And I don't think it will work with a voltage as low as 6v. From my brief reading of the datasheet I think the motor supply voltage needs to be a minimum of 2.5v above the Arduino's voltage.
And if you mean one of the small PP3 style of 9v batteries then that is not suitable - it cannot provide enough current for a motor. A pack of 6 x AA alkaline cells - 9v - should be OK.
Robin2:
An L298 can only control 2 motors. And I don't think it will work with a voltage as low as 6v. From my brief reading of the datasheet I think the motor supply voltage needs to be a minimum of 2.5v above the Arduino's voltage.
And if you mean one of the small PP3 style of 9v batteries then that is not suitable - it cannot provide enough current for a motor. A pack of 6 x AA alkaline cells - 9v - should be OK.
...R
Hey Robin2,
thanks for your reply. Here's a picture taken from a YouTube video, he connects the 4 motors to one module.
two motors to the out1,out2 and two motors to out2,out3.
The ancient, inefficient L298 driver can lose as much as 4V internally, so very little gets to the motors. The motor power supply has to be at least 9V (NOT block batteries, they won't work at all, use 6x or 7x NiMH AA batteries instead).
Furthermore, motors like that can have a stall or startup current of over 2 Amperes, and but the L298 won't deliver that much continuously. You should use a much better motor driver, like this one.
Alkaline AA batteries can supply about only about 2 Amperes even if they are brand new, so better to use NiMH AA.
Post a link to the product page or data sheet for your motors.
jremington:
There are many things wrong with that design.
The ancient, inefficient L298 driver can lose as much as 4V internally, so very little gets to the motors. The motor power supply has to be at least 9V (NOT block batteries, they won't work at all, use 6x or 7x NiMH AA batteries instead).
Furthermore, motors like that can have a stall or startup current of over 2 Amperes, and but the L298 won't deliver that much continuously. You should use a much better motor driver, like this one.
Alkaline AA batteries can supply about only about 2 Amperes even if they are brand new, so better to use NiMH AA.
Post a link to the product page or data sheet for your motors.
6x and 7x NiMH AA wouldn't be enough then. 1.2V each battery is (7.2V and 8,4V respectively).
Anyways I'm going to get new batteries soon, all shops are closed at the moment. I hope you're right.
Btw, the motor doesn't do any noise now, I think the batteries don't give enough current now.
AnaRhisT:
I have a 9V battery I'm also trying with. Super Heavy Duty 6F22, 9V
This is also a losing strategy.
9v smoke detector batteries are adequate for applications that require very small current.
But any application with a motor pulls more current than the battery can provide you you get voltage drop very soon.
Get a battery that can provide the voltage and current your application requires. The AAs were close but probably less voltage that needed. More AAs in series would help. Not sure how long they will last.
vinceherman:
This is also a losing strategy.
9v smoke detector batteries are adequate for applications that require very small current.
But any application with a motor pulls more current than the battery can provide you you get voltage drop very soon.
Get a battery that can provide the voltage and current your application requires. The AAs were close but probably less voltage that needed. More AAs in series would help. Not sure how long they will last.
I see, well I'll need a 6-battery placeholder or somehow to connect to more AA batteries.
The motor module doesn't do any noise now, I hope it's ONLY because there isn't enough voltage and current
AnaRhisT:
I see, well I'll need a 6-battery placeholder or somehow to connect to more AA batteries.
The motor module doesn't do any noise now, I hope it's ONLY because there isn't enough voltage and current
You can get motor drivers that will work perfectly happily at 6v - such as the link in Reply #8
Anarish plz may i knw what u did finally to make this car function...today i also faced the same problem and i saw u also did the same that i was trying to do .... plz reply me so that i can be sure of which battery should i buy and how many because i was also trying with 9V
nivi_pandey:
so that i can be sure of which battery should i buy and how many because i was also trying with 9V
I presume you have read and taken account of all the Replies in this Thread.
If you are still having a problem then please describe exactly what equipment you have, what battery you have and give exact details of the problem you are experiencing.
I am trying to drive 4 motors with L298 motor driver using 9V battery supply but it's not working..earlier when i cheked two motors with just motor driver and 9V battery it was working but when i connected arduino and Bluetooth module with it, it's not working...i exactly want to know which battery i will have to use to make it drive..
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.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
What sort of 9V battery are you using?
If it is one like used in smoke detectors and DMMs then it will not be powerful enough for your project.