Motor Voltage issue

i am building an arduino car using 2 tt motors 6-3 v 200 rpm, joystick control and the l298n motor driver. currently i am using 2 duracell 9v batteries to power to power the project but it is not working with stability. any ideas for what I should to fix this?

First of all - please show your connections in detail.

Most 9v batteries has a very little capacity and unsuitable for anything but low-current circuits.

This is my circuit..

If 9v batteries are not good enough, which should i use?

i forgot to mention but the arduino vin pin and gnd is connected to the motor driver 5v and gnd
and an joystick is connected to a0 and a1 of arduino

The diagram not show how the arduino is powered

i have mentioned it in my last post... i have connected the arudino vin pin and the gnd to motor driver 5v and gnd

NEVER NEVER put batteries in parallel!!

Use 4 AA batteries to power the motors
Use one good quality alkaline 9V battery connected to Vin on the Uno or use a 5V battery bank connected to the USB connector.

i have put the batteries in series... the circuit software did that automatically.(i am still a noob)

i'll try that once

Take your time.

The VIN pin of the Arduino Uno require a voltage above 7v, supplying a 5v there will get you a unstable behaviour as a result.

Hope you did not put the 9V batteries in series...

Why not use a plug supply, they can be gotten for the cost of a few 9V batteries and will outlast probably hundreds to thousands of batteries if not overloaded.

Good advice for 9 volt smoke alarm batteries. Not for all batteries or cells they may be built from.

I just got done returning a 56 volt nominal 2S14P Li-Ion battery of 18650 cells to a good storage voltage.

I was kinda freaked out when I first saw it, but Lithium Polymer and Lithium Ion cells are routinely wired in parallel and charged, used and stored as such.

a7

what do u mean by plug supply

the motors were not spinning

Many call them chargers or wall warts.
image

if i attach a wall wart then how will the car actually move? because then it would make the car needed to be plugged in the socket to actually operate.

Consider upgrading to a modern motor driver, rather than the basically obsolete but still common (because they've got to get rid of the old ones?) L298N driver. They have huge losses, dropping a few volts in the driver itself, so a large part of your already very limited 9V battery power goes to heating up the chip rather than moving your robot.

Use a pair of LiPo batteries instead, they are rechargeable and have no problem delivering the current needed. To use the L298N add a third LiPo cell, to compensate for the losses in the driver.

That will give you a stable power source until you get the code working.