Problem with Motor Shield L298N

Hi!

I've been making a line follower using two of those yellow 3-6V dc motors, a QTR-8RC Reflectance Sensor Array a L298N motor shield driver and a Arduino Nano, all powered with a 9V battery.

Thing is, after just like 2 minutes the robot starts to loose speed, and eventually it stops completely. (Might be because this motor shield driver only operates with voltage up to 5V). On the L298N datasheet we can see the motor driver operates with a current ranging from 0 to 36mA. However, the battery i'm using has 200mAh and can hold up to 2/4 hours before it starts losing Voltage at 50mA!!, as you can see on this graph. I think the problem here is the motor driver, and I've seen some alternatives such as the Adafruit DRV8871 DC Motor Driver or the Motor Driver - Dual TB6612FNG (1A). Can you tell me if the problem is really from the L298N motor driver, or if I am doing something wrong?

Thanks! :slight_smile:

There could be a thousand posts by now telling you to not use a 9volt smoke alarm battery to power motors.
Average motor current could be 500mA for each motor, and that will be hard on the battery.
Must use AA batteries if you want more than a few minutes playing time.

The L298 is old/inefficient, and looses a few volts with that current,
meaning you need one or two AA batteries more in the pack to just heat up the L298.
Try a six AA battery holder.
Leo..

Wawa:
There could be a thousand posts by now telling you to not use a 9volt smoke alarm battery to power motors.
Average motor current could be 500mA for each motor, and that will be hard on the battery.
Must use AA batteries if you want more than a few minutes playing time.

The L298 is old/inefficient, and looses a few volts with that current,
meaning you need one or two AA batteries more in the pack to just heat up the L298.
Try a six AA battery holder.
Leo…

So, my best option is to use six rechargeable AA batteries so that I won’t need to be buying these every now and then? And, if somehow I can’t make it work more for than just a few minutes would you recommend one of those motor drivers i mentioned above?

Change one thing at a time. The battery in this case. Then you can find out if you need more hardware.

Modern motor drivers, like these from Pololu, waste much less energy than the ancient L298 driver.

Your robot will move faster and the batteries may last longer.

andrewww00:
On the L298N datasheet we can see the motor driver operates with a current ranging from 0 to 36mA

What you posted wasn’t the L298 datasheet, it was a garbled translation of a fragment of a fancy.
If you look at the manufacturer’s datasheet -see here L298 , you’ll see that 36mA is the maximum quiescent current, i.e. worst case current used by the chip without driving a motor. Always search around for the full manufacturer’s datasheet, if the chip is specified.

Hey guys,

So just to keep you updated, I've used 8x AA batteries because I didn't have any 6x battery holder so I used a 8x one. The batteries have 2500mAh and as far as I can see they're doing great. The only problem I saw was the weight of the batteries, however if i place them right above the motors there shouldn't be any issue.

All things considered I don't think i need to buy a new Motor driver (for now), thanks guys!

There are other battery options, like 2S LiPo and LiFePO4 which could be lighter.