Connecting 2 DC motors to a L298N motor driver

I am trying to connect two DC motors to a L298N. They are 12V motors but the datasheet says that they can work on 6V-15V range. Because of this, I decided to use a 9V Duracell battery to go to the L298N. I connect this battery to Arduino and get the (v that I feed to the L298N from the Vin pin.

The issue that I have is that when connecting only one motor it works properly, but when both of the motors are connected they don't rotate fully but kinda stutter. What is the issue? Am I not supplying enough voltage, enough current or is there any other problem? This is for a school project and they have set a very limited budget for what we can use, so I cannot afford any fancy solution. Thank you in advance.

The L298N has a relatively large voltage drop. If your battery is 4V then you get literally zero power out of the L298N because it's all lost in the voltage drop. If you started with 12V then the motors see something more like 8V.

Also the common 9V "smoke alarm" batteries are terrible at running motors. They can't supply the current. If you test the battery voltage while attempting to run, you may find it goes as low as 5V. Drop 4V through the L298N and your motor is getting almost nothing.

Get a real battery. A bunch of AA cells is supremely better than a 9V.

Small 9V batteries are able to power small low-current devices like smoke alarms and portable radios,
they cannot provide much current and you should expect one to power even a single motor.

I didn't know that the 9V was used for the smoke alarms. Guess I will use 8 AA batteries to power the L298N with 12V. I thought of using a (V in the first place since place-wise is smaller than connecting 8AA in series.

But why are AA batteries better than a 9V? Does the current they supply change between the two?

AA batteries can produce much higher current (they have much lower internal resistance).

Li-ion batteries can do even better in that respect. 3 Li-Ion batteries would be great for your motors (2 is not enough due to the high losses on this motor driver - there are much better ones out there for only marginally higher cost).

I looked some Li-ion batteries online and it seems that they can output up to 10A. Would that cause any problem when connected to the L298N, because to me it seems a pretty large amount, or is there no problem?

That makes them so good for motors and other high current loads.

Of course they will only supply as much current as the load actually takes.

I'm facing the same problem. I have to supply two of these motors with L298N

Rated Voltage: DC 6V
No-load Speed: 210RPM 0.13A
Max Efficiency:
Max Power:
Stall Torque: 3.2A
Retarder Reduction Ratio: 1 :34
Hall Resolution Hall x Ratio 34.02 = 341.2PPR

I bought two 3.7V Li-ion batteries. Wha do you think? I need to add an extra battery?

Stall current is more than the L298N can handle.

Batteries should be OK - 7.4V minus losses of the L298N leaves 5-6V for the motors.

I have another question. Since Li-ion batteries were quite expensive for our project, I am going to use 8 AA batteries which the school provides us for free to run the 2 DC motors. These batteries can supply around 50mA from what I saw online. Since the batteries are connected in series doesn't that mean that only 50mA will go to the motors? Isn't that too low?

AA batteries should be able to supply a few A in current. Even a 9V block battery can supply more than 50 mA!

It does depend a little on the battery chemistry. NiCd (old, old rechargeables) can supply just staggering amps from a small battery. Over 80 Amps for the best ones. Of course the battery is flat in a few seconds but it's fun while it lasts. Modern lithiums are almost as frightening and their vastly bigger capacities add more energy to the fire.

50mA might appear in the capacity specifications, like they discharge it relatively slowly so the measured mAh capacity is higher. This rating can be safely ignored.

So how about a link to what you've seen online? Without that we can't know what it is that you're possibly misunderstanding.

Any AA battery can provide much more than 50mA at maximum. Even really cheap consumer batteries. Alkaline AAs are better. NiMH rechargeables are better still (in terms of producing current).