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

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

Hello guys, Welcome back to my SriTu Hobby blog. Today we are going to talk about how to make a Bluetooth control 4WD car. For this, we mainly need Bluetooth technology. Today we are using a Bluetooth module for our project. You can control this car through your smartphone. For that, we need a small app. We’ll talk about that later. What is Bluetooth? How does it work? I have given you a complete description of this in a previous article. If you want you can read that article from this link. Read me.

Next, we need the power to move this car. For that, I used four-gear motors. This is why we can call this car a 4WD (Four-wheel) car. The next question we have is how to control these motors through an Arduino board. Of course, we can’t do this directly through the Arduino board. For this, we need the help of another device. That means we need a motor driver board. If you do not know what a motor driver board is, click on this link. Read me.

Now let’s see what other components are needed to create this smart car.

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

OK, let’s do this project step by step.

Step 1

Firstly, identify these components.

Step 2

Secondly, attach the gear motors to the dot board. For that, I used a glue gun. You can use any method.

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

Step 3

Then, connect the motor drive shield to the Arduino board and install it to the center of the dot board.

Step 4

Next, connect these four motors to the motor driver shield. For that, use the circuit diagram below.

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

Step 5

OK, now connect the Bluetooth module using the jumper wire. For that, use the Serial communication pins. Then, connect this car to the computer.

Step 6

Remember to remove the RX and TX jumper before uploading the code.

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

Step 7

OK, let’s look at the code below. First, you need to download the motor driver shield library. Download it.

  • The complete program of this project – Download
#include <AFMotor.h>
AF_DCMotor motor1(1);
AF_DCMotor motor2(2);
AF_DCMotor motor3(3);
AF_DCMotor motor4(4);
 
int Speed = 230;
char value;
void setup() {
  Serial.begin(9600);
  motor1.setSpeed(Speed);
  motor2.setSpeed(Speed);
  motor3.setSpeed(Speed);
  motor4.setSpeed(Speed);
}
 
void loop() {
  if (Serial.available() > 0) {
    value = Serial.read();
  }
  if (value == 'F') {
    motor1.run(FORWARD);
    motor2.run(FORWARD);
    motor3.run(FORWARD);
    motor4.run(FORWARD);
  } else if (value == 'B') {
    motor1.run(BACKWARD);
    motor2.run(BACKWARD);
    motor3.run(BACKWARD);
    motor4.run(BACKWARD);
  } else if (value == 'L') {
    motor1.run(BACKWARD);
    motor2.run(BACKWARD);
    motor3.run(FORWARD);
    motor4.run(FORWARD);
  } else if (value == 'R') {
    motor1.run(FORWARD);
    motor2.run(FORWARD);
    motor3.run(BACKWARD);
    motor4.run(BACKWARD);
  } else {
    motor1.run(RELEASE);
    motor2.run(RELEASE);
    motor3.run(RELEASE);
    motor4.run(RELEASE);
  }
}
  • Afterward, select the correct board and port. Then upload this code.
  • When uploading the code, Reconnect the RX and TX jumper wires.
How to make a Bluetooth control 4WD car | Step by step instructions

Step 8

Now, attach the Li-ion battery holder on the back and connect the power wires. For that, use the circuit diagram above.

Step 9

Next, connect the robot wheels to the gear motors. Finally, insert the battery into the battery holder and turn on the Smart car.

Step 10

Okay, now let’s set up the mobile app. First, you need to download and install the Arduino Bluetooth RC Car app.

  • Also, you can control it using the SriTu Hobby app easily — Download it
  • Next, we need to connect to the Bluetooth module. For that, use the steps below.

If the Bluetooth module is connected correctly, the circle on the left will be green. Right now click the arrow buttons. Then look at the smart car movement. The full video guide is below. We will meet in the next article. Have a good day.

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

Similar Posts

Leave a Reply

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