Need Help Please ( Arduino + L298N Dual Motor Controller) Working then not after

Good day!
I need help for my simple project.

my Materials:
Arduino Uno
L298N Dual motor controller
2 DC geared motor with wheels
2 pcs 9v battery


I already uploaded my code and it run good at first time.
and it like sucks the battery, because the motor run slower. then not working now when i reset.

Thanks

Use a better power source. Like a 6 AA battery pack.

so that's really my mistake? :frowning: because I used 9v?
9v for arduino.
9v for motor driver.

I'll change both for AA's?

thank you very much :slight_smile:

Here's the image attached to the top post.

How to insert uploaded images.

You might get away with using a single set of batteries.

I know a lot of people suggest using separate batteries for the motors and microcontroller but I have a bunch of robots myself and I always use a single battery pack.

Here's a tutorial I made awhile back showing how to use those L298N motor controllers.

Technically, your motor supply voltage is supposed to be 2.5V higher than the logic voltage. If you're using a 5V microcontroller, your motor supply should be at least 7.5V.

Those 9V batteries belong in smoke detectors, not robots.