Trying to Build an RC car with an UNO

Hi all,

I made a bluetooth RC car using the instructions on this link:

I followed all the steps however I am using an Arduino Uno instead of an Arduino Nano and i'm using 2 motors instead of 4. When I power up the car everything lights up and the bluetooth module connects to my phone. When the app is connected to the car the correct values on the serial monitor so i think its working. The only thing not working is the motors for the car. It wont drive. What should I do?

I don't see a real question here...

Read this: http://forum.arduino.cc/index.php/topic,148850.0.html

Then describe what you did and what's wrong.

I made a bluetooth RC car using the instructions on this link:

I followed all the steps however I am using an Arduino Uno instead of an Arduino Nano and i'm using 2 motors instead of 4. When I power up the car everything lights up and the bluetooth module connects to my phone. When the app is connected to the car the correct values on the serial monitor so i think its working. The only thing not working is the motors for the car. It wont drive. What should I do?

1 Like

Well... show us your code and some good pictures, so we can see your wiring

pictures and code is in this folder

Please read the "how to use this forum" above, especially how to include code and pictures.
You can upload your pictures e.g. to imgbb.com
and include the generated "BBCode full linked" in your post.

include code using code tags

sorry.

Here you go:

// Smartphone Controlled Arduino Robot
int izqA = 5;
int izqB = 6;
int derA = 9;
int derB = 10;
int vel = 255; // Velocidad de los motores (0-255)
int estado = 'g'; // inicia detenido
void setup() {
Serial.begin(9600); // inicia el puerto serial para comunicacion con el Bluetooth
pinMode(derA, OUTPUT);
pinMode(derB, OUTPUT);
pinMode(izqA, OUTPUT);
pinMode(izqB, OUTPUT);
}
void loop() {
if(Serial.available()>0){ // lee el bluetooth y almacena en estado
estado = Serial.read();
}
if(estado=='a'){ // Forward
 Serial.println(estado);
analogWrite(derB, 0);
analogWrite(izqB, 0);
analogWrite(derA, vel);
analogWrite(izqA, vel);
}
if(estado=='d'){ // right
 Serial.println(estado);
analogWrite(derB, vel); 
analogWrite(izqB, 0);
analogWrite(derA, 0);
analogWrite(izqA, vel);
}
if(estado=='c'){ // Stop
 Serial.println(estado);
analogWrite(derB, 0);
analogWrite(izqB, 0);
analogWrite(derA, 0);
analogWrite(izqA, 0);
}
if(estado=='b'){ // left
 Serial.println(estado);
analogWrite(derB, 0);
analogWrite(izqB, vel);
analogWrite(izqA, 0);
analogWrite(derA, vel);
}
if(estado=='e'){ // Reverse
 Serial.println(estado);
analogWrite(derA, 0);
analogWrite(izqA, 0);
analogWrite(derB, vel);
analogWrite(izqB, vel);
}
if (estado =='f'){ // Boton ON se mueve sensando distancia
}
if (estado=='g'){ // Boton OFF, detiene los motores no hace nada
}
}
1 Like






You need to make a simple pencil drawing showing how everything is connected and post a photo of the drawing. It is too easy to make a mistake when trying to figure out the connections from photos of the hardware.

A Nano is just a small version of an Uno so there should be no difficulty using an Uno.

It looks as if you are trying to power stuff from a 9v PP3 style battery. They are completely useless as they can't provide enough current. Use a pack of 6 x AA alkaline cells

...R

One problem I believe to see is that your code uses pins 5, 6, 9, 10 for the motors, but you connected 3, 5, 9, 10.

Also 9V Block batteries are shit, you can't run motors of of them.

This is how I connected everything:

Motors Connection:

Out1 -> Left Side Motor Red Wire (+ )

Out2 -> Left Side Motor Black Wire ( - )

Out3 -> Right Side Motor Red Wire ( + )

Out4 -> Right Side Motor Black Wire ( - )

LM298 - > Arduino

IN1 -> 5

IN2-> 6

IN2 ->9

IN2-> 10

Bluetooth Module -> Arduino

Rx-> Tx

Tx ->Rx

GND -> GND

Vcc -> 3.3V

Power

12V - > Connect Battery Red Wire

GND -> Connect Battery Black wire and Arduino GND pin

5V -> Connect to Arduino 5V pin

Does it matter what pins I used to connect my H Bridge ( LM 298 Module ) to? I read somewhere that for each motor one of the pins needs to be PWM and the other needs to be digital. Also, does it matter what kind of Double AA batteries I use?

As well as all the above, appears the motor is directly connected to the wheel which will never work successfully.
Some gear reduction unit would be required here.

So I need to get a gear motor to make it work? I can't use the motor I have to make it run?

I tried it with 6 double A batteries. Still not working. :frowning:

couka:
One problem I believe to see is that your code uses pins 5, 6, 9, 10 for the motors, but you connected 3, 5, 9, 10.

Also 9V Block batteries are shit, you can't run motors of of them.

OP, did you see this?

frasheed:
So I need to get a gear motor to make it work? I can't use the motor I have to make it run?

No, that's why I brought it up.

Those motors are designed to run at maybe 3,000 to 6,000 rpm and you have it connected to a wheel of possibly 40mm diameter.
Motor will simply stall and draw wacks of current.

You still didn't say what the Arduino was supposed to be doing either.

frasheed:
This is how I connected everything:

Speaking personally I would feel a great deal more confident giving advice if you present a diagram of the connections rather than a verbal description. To make sense of your verbal description I would need to make a diagram and I am not at all confident that my digram would be the same as the one you would make.

In my experience the process of drawing the diagram can often bring anomalies to light.

...R

Thanks - yes I also made these adjustments, still nothing.

Simple test - take the wheels off, hold the chassis in the air so the motor spindles aren't touching anything and use the 6 x AA batteries NOT the useless little 9V battery. Try it and see if the motors will spin. If not either your connections or the code are wrong.

If they do spin then there's nothing wrong except that those motors (which are nothing like the ones used in the instructable that you say you "followed") are completely wrong for what you're trying to do with them.

Steve

frasheed:
Thanks - yes I also made these adjustments, still nothing.

What adjustments?

It makes it easier to follow your comments if you mention the number of the Reply you are referring to.

...R