How to make a Bluetooth controlled car using an Arduino UNO board

How to make a Bluetooth controlled car using an Arduino UNO board

Hello and welcome back. In this project, we will learn how to make a Bluetooth-controlled car using an Arduino UNO board. This car can be controlled using a mobile phone through Bluetooth. For this project, I used four gear motors to move the car. I also used an HC-05 Bluetooth module and SriTu Hobby remote for Bluetooth communication. To control the motors, I used a L293D motor driver shield. For the car chassis, I used cardboard, so this project is very low budget and easy to make at home.

Ok, let’s do this project step by step. The required components are given below.

Disclosure: These Amazon links are Affiliate links. As an Amazon Associate, I earn from qualifying purchases.

Step 1

Firstly, identify these components.

Step 2

Secondly, let’s prepare the chassis for this car. For this purpose, I used a piece of cardboard to make a simple and low-cost chassis.

Step 3

Thirdly, cut another cardboard piece of the same size and glue them together. This will give us a strong chassis.

Step 4

Now, connect the wheels to the gear motors. After that, glue the motors onto the chassis.

Step 5

Afterward, drill holes near the motors and put the wires through these holes.

Step 6

Next, connect the motor driver shield to the Arduino UNO board. After that, place it on the chassis and connect the motor wires to the terminals.

Step 7

Now, attach the Li-ion battery holder to the chassis and connect its power wires to the motor driver shield.

Step 8

Afterward, connect the Bluetooth module and install it on the chassis. For this, use the circuit diagram below.

How to make a Bluetooth control 4WD car | Step by step instructions

Step 9

Next, connect the Arduino board to the computer. Then, copy and paste the following program into the Arduino IDE.

//Include the AFmotor library
#include <AFMotor.h>
//Define the speed of the motors
#define Speed 170

//Create the motor objects
AF_DCMotor M1(1);
AF_DCMotor M2(2);
AF_DCMotor M3(3);
AF_DCMotor M4(4);

void setup() {
  //Start the serial communication
  Serial.begin(9600);
  //Set the motor speeds
  M1.setSpeed(Speed);
  M2.setSpeed(Speed);
  M3.setSpeed(Speed);
  M4.setSpeed(Speed);
}
void loop() {
  bluetoothControl();//Bluetooth control function
}

void bluetoothControl() {
  //Get the Bluetooth control remote values
  if (Serial.available() > 0) {
    char value = Serial.read();
    Serial.println(value);

    if (value == 'U') {
      forward();
    } else if (value == 'D') {
      backward();
    } else if (value == 'L') {
      left();
    } else if (value == 'R') {
      right();
    } else if (value == 'S') {
      Stop();
    }
  }
}

/******************Motor functions*****************/
void forward() {
  M1.run(FORWARD);
  M2.run(FORWARD);
  M3.run(FORWARD);
  M4.run(FORWARD);
}
void backward() {
  M1.run(BACKWARD);
  M2.run(BACKWARD);
  M3.run(BACKWARD);
  M4.run(BACKWARD);
}
void right() {
  M1.run(FORWARD);
  M2.run(BACKWARD);
  M3.run(BACKWARD);
  M4.run(FORWARD);
}
void left() {
  M1.run(BACKWARD);
  M2.run(FORWARD);
  M3.run(FORWARD);
  M4.run(BACKWARD);
}
void Stop() {
  M1.run(RELEASE);
  M2.run(RELEASE);
  M3.run(RELEASE);
  M4.run(RELEASE);
}

Step 10

Now, remove the RX and TX jumper wires. Next, select the board and port, and then click the upload button.

Step 11

Afterward, reconnect the RX and TX jumper wires. Next, disconnect the USB cable and insert the batteries into the battery holder.

Step 12

Okay, now it’s time to download and install the SRITU HOBBY app from the Google Play Store.

  • SRITU HOBBY App — Download
  • Next, open the SRITU HOBBY app and navigate to the Controllers tab. After that, choose the Bluetooth Car Remote from the list.
  • Afterward, click the gear wheel icon and find your device name. In this step, make sure to enable location and allow location permission. Then, you will see a green indicator on the remote.

Ok, everything is done. Now you can control your Bluetooth RC car using your smartphone. Enjoy this project! The full video guide is below. We hope to see you in the next project.

How to make a Bluetooth controlled car using an Arduino UNO board

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *