Project tutorial
Bluetooth Controlled Car

Bluetooth Controlled Car © GPL3+

This project shows how you can build a car which can be controlled by your smartphone using an android application via Bluetooth.

  • 2,282 views
  • 7 comments
  • 15 respects

Components and supplies

Apps and online services

About this project

Hello there!

Anything that can be controlled is great. Isn't it? We humans love controlling stuff and that is why automation and robotics so fascinating.

This tutorial will teach you how to create your own Bluetooth controlled car. So lets get started.

This will be a Bluetooth controlled car so for this project we will be using HC-05 Bluetooth module to receive the controlling data packets.

We will also need an android app which will be sending the controlling data packets to the Bluetooth module. We will use a third party application (click here to download) for this purpose.

  • -> Okay folks! Let's build the hardware.
  • -> Body of the car.

The car which we are building for this project will be a dual motor car. I used two 12 v 200 rpm DC motors. You can use a ready made chassis. I used a PVC sheet as chassis.

Thus the basic structure of our car is ready. You can use this design or you can develop your very own design but remember keep the weight as low as possible as this is a two motor design.

--> Circuit

Now let us build the circuit

Follow the schematic to make the connections. This is how it will look after all connections are made.

--> Power supply

Now this is a bit crucial.

For powering the Arduino Uno is used a power bank with 5v output voltage. This is not enough to drive those 12v dc motors. So we need an addition power source.

I used two 9v batteries in series to get 18v supply. The major problem here was that here a good amount of current was also required.

My batteries were not able to supply sufficient current and so the performance of this car was not 100% satisfactory. It was working but the motors ran at very low speed.

So I recommend to use a 12v battery or else you would have to compromise with the speed.

-->Code

Here we will use the direction of rotation of motors to control the direction of the car.

Forward - Both motors move in forward direction

Backward - Both motors move in backward direction

Left - Left motor moves backwards and right motor moves Forward

Right - Left motor moves forwards and right motor moves backward

Stop - Both motors stop


void forward()
{
    motor1.run(FORWARD);
    motor2.run(FORWARD);
}
void backward()
{
    motor1.run(BACKWARD);
    motor2.run(BACKWARD);
}
void left()
{
    motor1.run(BACKWARD);
    motor2.run(FORWARD);
}
void right()
{
     motor1.run(FORWARD);
     motor2.run(BACKWARD);
}
void Stop()
{
     motor1.run(RELEASE);
     motor2.run(RELEASE);
}

--------------------------------------------------------------------------------------

So that was it!

1. Just upload the code on to the Arduino.

2. Make the connections.

3. Launch the app.

4. Connect your phone to the car.

Here is our finished BEAUTY!

I hope this tutorial was good enough to get you going. If you got any suggestions for some changes or further addition to this project then please let me know in the comment section.

Code

The codeC/C++
This code has to uploaded on Arduino Uno
#include <AFMotor.h>

AF_DCMotor motor1(1);  //motor1 is the left motor
AF_DCMotor motor2(2);  //motor2 is the right motor

int val;
void setup()
{
  Serial.begin(9600); 
 
  motor1.setSpeed(255); //motor speed is set
  motor2.setSpeed(255);
  Stop();
}


void loop() {
 
bt=Serial.read();

if(val=='1')  //when the bluetooth module recieves 1 the car moves forward
{
 forward(); 
}

if(val=='2')  //when the bluetooth module recieves 2 the car moves backward
{
 backward(); 
}

if(val=='3') //when the bluetooth module recieves 3 the car moves left
{
 left(); 
}

if(val=='4')  //when the bluetooth module recieves 4 the car moves right
{
 right(); 
}

if(val=='5') //when the bluetooth module recieves 5 the car stops
{
 Stop(); 
}

}
void forward()
{
     motor1.run(FORWARD);
  motor2.run(FORWARD);
}

void backward()
{
     motor1.run(BACKWARD);
  motor2.run(BACKWARD);
}
void left()
{
  motor1.run(BACKWARD);
  motor2.run(FORWARD);
}
void right()
{
  motor1.run(FORWARD);
  motor2.run(BACKWARD);
}
void Stop()
{
  motor1.run(RELEASE);
  motor2.run(RELEASE);
}

Schematics

The circuit
These are the connections. Connect 12v power source to the motor driver shield. Please note that the schematic does not include the external power source.
Car 2zmqlclauv

Comments

Similar projects you might like

Bluetooth Controlled Servo

Project tutorial by JANAK13

  • 2,722 views
  • 9 comments
  • 18 respects

Mobile Controlled Bluetooth Car || Easy || Simple || HC-05

Project tutorial by Team Vishal soni

  • 7,514 views
  • 2 comments
  • 10 respects

Robotic Car Controlled over Bluetooth by Andriod Phone

Project showcase by S.Ranjith Reddy

  • 4,429 views
  • 0 comments
  • 9 respects

Bluetooth Controlled Car

Project showcase by Ian St. Louis

  • 10,739 views
  • 3 comments
  • 12 respects

Robotic Car controlledover Bluetooth with Obstacle Avoidance

Project showcase by S.Ranjith Reddy

  • 9,582 views
  • 5 comments
  • 17 respects
Add projectSign up / Login