Arduino RC car only works with the USB cable, not with the battery

When using the 9V battery you feel the motor tugging very slightly and temporarily, because of the delays in the code I wrote, but its not moving at all. When using the USB cable to power the arduino, the RC car moves in a full motion.
Have anyone ran into this problem, how did you fix it?

Most of the hundreds of people who ask the same question find that just using a better battery, something like 4 x AA batteries, solves all their problems. Those little 9V batteries are useless for running motors.


Yes I know that, when I tried it it didn’t work. It acts the same way as when I use a 9V battery. Pin 13 is always blinking but the motors don’t run.

Im using four gearbox motors with one L298n motor controller, could that be the problem?

it runs with 5x AA, any lower it doesn't run. It doesn't follow the delays which is frustrating.

Unless they're VERY SMALL motors then it probably is much of the problem. The old L298N is probably losing around 2V to 4V of whatever voltage you supply just heating the chip up.

I have no idea what " It doesn't follow the delays" means. I can't see any delays.


the delays in the code, such as "delay(50);", but I solved it, it was just a battery problem.

You need more amps.
A 9v battery has 500-600mAh.
Look at the consumption of the motors, the arduino, the l298.
Try with 18650 batteries