Motors just turn left and right

Hello there, I´m making a project thats about a Bluetooth controlled car with a gas sensor. When the car is attached to the USB, I upload the code and it all works fine! When I unplug it, the motor driver does not distribuctes any energy and I just cant controll the car. Wanting some help, please! Thank you.

Components:

Arduino Uno;
L298N Dual H-Bridge Motor Driver;
Battery pack (4);
4 wheels;
Bluetooth Hc-06

Image from Original Post so we don't have to download it. See this Simple Image Posting Guide

...R

You seem to have the 5v output from the L298 connected to the Arduino Vin pin. It should be connected to the Arduino 5v pin.

However I'm not sure if the L298 5v output is sufficient for an Uno.

Why not connect the battery + to the Vin pin as well as to the 12v on the L298? Then you would not need the 5v connection from the L298

...R

I'm sorry, but im kinda bad with eletronics, could u make a simple simple circuit please? Thank you so much.

Hello guys. I build a bluetooth controlled car. Unfortunately it only goes to the right and to the left and it doesnt respond to going forward and backward, can someone help me out?

Sure I can.

zwieblum:
Sure I can.

When the car is connected with the USB cable, everything works fine, but without it, it doesnt work, it just turns left and right and doesnt go forward.

Good afternoon, friend, I told you that if you are using 1.5V AA batteries as shown in the test image, you are missing voltage, it would be suggested that you use 3 rechargeable batteries model (1865), connected in series, each one at its average charge It has a voltage of 3.7V and at its maximum charge reaches 4.2V if you add the voltage of the 3 batteries it will give you a = 12.6V more than enough to power the arduino board and the L298N Motor controller.
The batteries will be placed by the series which will give you each battery that the negative pole with a positive pole, and so on. up to (+ - + - + -)

The positive pole of the end of the first battery will connect it both to the input (+) of the arduino which is the one marked with the yellow stripe, and you will also connect to the L298N at the 12V input, the GND of both together with those of the battery will also connect!
on the other hand, verify the connection of the
Bluetooth Hc-06, there could be your problem!
The above is for you to make a good connection to the circuit!

This is the same project as your other Thread. Please don't double post. I have suggested to the Moderator to merge them

...R

alborosie1a1:
Good afternoon, friend, I told you that if you are using 1.5V AA batteries as shown in the test image, you are missing voltage, it would be suggested that you use 3 rechargeable batteries model (1865), connected in series, each one at its average charge It has a voltage of 3.7V and at its maximum charge reaches 4.2V if you add the voltage of the 3 batteries it will give you a = 12.6V more than enough to power the arduino board and the L298N Motor controller.
The batteries will be placed by the series which will give you each battery that the negative pole with a positive pole, and so on. up to (+ - + - + -)

The positive pole of the end of the first battery will connect it both to the input (+) of the arduino which is the one marked with the yellow stripe, and you will also connect to the L298N at the 12V input, the GND of both together with those of the battery will also connect!
on the other hand, verify the connection of the
Bluetooth Hc-06, there could be your problem!
The above is for you to make a good connection to the circuit!

Now I have everything connected. It works without the USB cable but there´s a problem, it just turns right and left. What can it be? Thank you.

miguelportugal:
When the car is connected with the USB cable, everything works fine, but without it, it doesnt work, it just turns left and right and doesnt go forward.

maybe you should stop pulling the cable?

miguelportugal:
I'm sorry, but im kinda bad with eletronics, could u make a simple simple circuit please? Thank you so much.

It will be a better learning experience if you post a diagram that represents what you think I have suggested. Then I can confirm whether it is correct.

...R

@miguelportugal

Due to the MULTIPLE cross postings you have 48 hours to follow up on the links below.

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting HAS reulted in a time out from the forum.

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.