Questions regarding l298n

So, I have 2 l928n and an arduino mega 2560, I wanted to create a minimal robot with 4 wheels drive (it needs to carry some sensors), However I have a question. I am limited on power so I am running everything out of a single battery pack which powers the arduino it self, however every single schematic I have seen regarding the l298n uses a secondary battery (12v), my dc motors work between 3v and 7v. I wanted to only use the 5v pin from the arduino to power both l298n, Is this possible? or I will always require 12v?

I am unable to add any other battery or power supply so the idea is to run out of power from a single rechargeable battery that is intended to power the arduino.

What is the specification (voltage and capacity) of your "single battery pack"?

Running motors via the Arduino 5V pin is a very bad idea. But it might be possible to run both the L298Ns and the Arduino from one battery pack if it is powerful enough.


And powerful means amperes, not only volts. You need 9 V for the l298n to get 7 V to the motors. With only 5 V to the l298n means the motors get only 3 V. Sort of.
And your motors most certainly need the amperes, too, which a 9 V smoke alarm type battery doesn’t provide. Six AA batteries might provide.

my dc motors work between 3v and 7v

Motor voltage ratings are really just suggestions, not "absolute maximum" values.

You can safely use a 9-12V battery for those motors, as PWM control reduces the average voltage to an acceptable value.

Use a modern, more efficient motor driver, like one of these from Pololu, to get more power for your robot and more lifetime from lower voltage batteries.

As said above, do not attempt to run motors or servos from the 5V Arduino output. That can actually destroy the Arduino.