Introduction: Bluetooth Controlled Car Using Arduino

Welcome to the fascinating world of robotics and DIY electronics! In this exciting project, we’ll take you on a thrilling journey of building your very own “Bluetooth Controlled Robot using Arduino.” Harnessing the power of Arduino and the versatility of Bluetooth technology, you’ll be able to control your robot effortlessly from your smartphone or tablet.

This project is perfect for tech enthusiasts, robotics hobbyists, students, and anyone curious about exploring the realms of automation and remote control. By the end of this guide, you’ll have a fully functional robot that responds to your commands through a seamless Bluetooth connection.

With step-by-step instructions, detailed illustrations, and hands-on demonstrations, you’ll not only learn how to assemble the robot but also gain valuable insights into programming and electronics. From maneuvering the robot in different directions to adding cool features like obstacle detection, the possibilities are endless.


FULL PROJECT LINK:

https://electronicsworkshops.com/2023/07/25/bluetooth-controlled-car-using-arduino/


Supplies

1 Arduino BoardArduino nano 1 https://amzn.to/3Qe71y5

2 Connecting wiresjumper wiresome https://amzn.to/3fMoSw7

3 BreadboardNormal 1 https://amzn.to/3FUQlXe

4 Bluetooth ModuleHC051 https://amzn.to/3ocCncV

5 Motor Driver L293DL293D1 https://amzn.to/47bnuZN

6 Battery Holderbig 1 https://amzn.to/456PEDC

Step 1: Block Diagram

The block diagram of Bluetooth Controlled Car Using Arduino is :

Block diagram of Bluetooth Controlled Car Using Arduino

Explanation of the components:

Bluetooth Device: This component represents a device capable of Bluetooth communication, such as a smartphone or a Bluetooth remote control. The user interacts with this device to send commands to the car wirelessly.

Bluetooth Communication: The Bluetooth module, usually an HC-05, enables wireless communication between the Arduino and the Bluetooth device. It receives the commands from the Bluetooth device and sends them to the Arduino for processing.

Arduino Board: The Arduino serves as the brain of the system. It receives the commands from the Bluetooth module and processes them to control the motors and react to sensor inputs, if any.

Motor Driver: The motor driver (e.g., L298N) is an essential component for controlling the motors. It takes the control signals from the Arduino and converts them into appropriate voltage levels and currents to drive the motors.

Motorized Wheels: These are the wheels of the car that are connected to the DC motors. The motorized wheels are responsible for the car’s movement.

Motor Control Signals: These signals are generated by the Arduino and control the speed and direction of the DC motors. By varying these signals, the Arduino can make the car move forward, backward, turn left, turn right, or stop.

Motor Drivers: The motor drivers receive the control signals from the Arduino and act as power amplifiers to drive the DC motors connected to the wheels. They provide the necessary current and voltage levels to make the motors rotate as per the commands from the Arduino.

Power Supply: This is the power source for the entire system. It supplies power to the Arduino, the motor driver, and the motors. Usually, a battery pack is used to power the car.

Working Principle

The Bluetooth controlled car receives commands from a Bluetooth-enabled device (smartphone, remote control, etc.), and these commands are processed by the Arduino. The Arduino then generates motor control signals, which are sent to the motor driver to drive the DC motors. The motorized wheels move the car accordingly. Additionally, if there are any sensor inputs, the Arduino can use this feedback to adapt the car’s movement, such as avoiding obstacles when detected by the sensors.

Step 2: PCB Manufacturer

PCBWAY is a highly skilled company specializing in PCB manufacturing. They offer their services at incredibly low prices, such as providing 10 PCBs for only $5. Additionally, new members receive a $5 bonus. The website allows customers to upload their Gerber Files and place orders.

ORDER LINK

PCBWAY is known for producing PCBs of exceptional quality and maintaining high standards, which is why many people trust them for their PCB and PCBA needs.

Below are some of my PCB’S manufactured by PCBWAY and I am fully satisfied by their Quality of service they provide.

Step 3: Schematic Diagram

Step 4: PCB Diagram

PCB of Bluetooth Controlled Car

3D file

3D file front

3D of Bluetooth Controlled Car

3D file back

3D OF Bluetooth Controlled Car


Step 5: Source Code

/* Arduino Bluetooth Car
 * Created by Vasilakis Michalis // updated: 31/7/2019
 * More information at www.ardumotive.com
 */
#include <SoftwareSerial.h>
//Software serial connection for bt module
SoftwareSerial btSerial(A2,A3); // RX & TX
 
//L293 Connection   
const int motorA1  = 5;  // Pin  2 of L293
const int motorA2  = 3;  // Pin  7 of L293
const int motorB1  = 11; // Pin 10 of L293
const int motorB2  = 10;  // Pin 14 of L293  
 
//Useful Variables
int i=0;
int j=0;
char state;
 
void setup() {
  // Initialize serial communication at 9600 bits per second:
  btSerial.begin(9600);
  Serial.begin(9600); // Only for debugging
  // Set pins as outputs:
  pinMode(motorA1, OUTPUT);
  pinMode(motorA2, OUTPUT);
  pinMode(motorB1, OUTPUT);
  pinMode(motorB2, OUTPUT);
  pinMode(front_lights, OUTPUT);
  pinMode(back_lights, OUTPUT);
  delay(500);
  //Stop all motors
  digitalWrite(motorA1, LOW);
  digitalWrite(motorA2, LOW);
  digitalWrite(motorB1, LOW);
  digitalWrite(motorB2, LOW);
}
  
void loop() {
  //Save income data to variable 'state'
    if(btSerial.available() > 0){     
      state = btSerial.read(); 
      Serial.println(state);  
    }     
  /***********************Forward****************************/
  //If state is equal with letter 'F', car will go forward!
    if (state == 'F') {
        digitalWrite(motorA1, HIGH); digitalWrite(motorA2, 0);
      digitalWrite(motorB1, 0);      digitalWrite(motorB2, 0); 
      Serial.println("Moving Forward");
    }
  /**********************Forward Left************************/
  //If state is equal with letter 'G', car will go forward left
    else if (state == 'G') {
        digitalWrite(motorA1, HIGH); digitalWrite(motorA2, 0);  
      digitalWrite(motorB1, HIGH);    digitalWrite(motorB2, 0);
      Serial.println("Moving Forward Left"); 
    }
  /**********************Forward Right************************/
  //If state is equal with letter 'I', car will go forward right
    else if (state == 'I') {
      digitalWrite(motorA1, HIGH); digitalWrite(motorA2, 0); 
      digitalWrite(motorB1, 0);      digitalWrite(motorB2, HIGH); 
      Serial.println("Moving Forward Right");
    }
  /***********************Backward****************************/
  //If state is equal with letter 'B', car will go backward
    else if (state == 'B') {
        digitalWrite(motorA1, 0);   digitalWrite(motorA2, HIGH); 
      digitalWrite(motorB1, 0);   digitalWrite(motorB2, 0); 
      Serial.println("Moving Backward");
    }
  /**********************Backward Left************************/
  //If state is equal with letter 'H', car will go backward left
    else if (state == 'H') {
        digitalWrite(motorA1, 0);   digitalWrite(motorA2, HIGH); 
      digitalWrite(motorB1, HIGH); digitalWrite(motorB2, 0);
      Serial.println("Moving Backward Left"); 
    }
  /**********************Backward Right************************/
  //If state is equal with letter 'J', car will go backward right
    else if (state == 'J') {
        digitalWrite(motorA1, 0);   digitalWrite(motorA2, HIGH); 
      digitalWrite(motorB1, 0);   digitalWrite(motorB2, HIGH); 
      Serial.println("Moving Backward Right");
    }
  /***************************Left*****************************/
  //If state is equal with letter 'L', wheels will turn left
    else if (state == 'L') {
        digitalWrite(motorA1, 0);   digitalWrite(motorA2, 0); 
      digitalWrite(motorB1, HIGH); digitalWrite(motorB2, 0); 
      Serial.println("Turn Left");
    }
  /***************************Right*****************************/
  //If state is equal with letter 'R', wheels will turn right
    else if (state == 'R') {
        digitalWrite(motorA1, 0);   digitalWrite(motorA2, 0); 
      digitalWrite(motorB1, 0);   digitalWrite(motorB2, HIGH); 
      Serial.println("Turn Right");     
    }
 
  /************************Stop*****************************/
  //If state is equal with letter 'S', stop the car
    else if (state == 'S'){
        digitalWrite(motorA1, 0);  digitalWrite(motorA2, 0); 
        digitalWrite(motorB1, 0);  digitalWrite(motorB2, 0);
        Serial.println("STOP");
    }  
}

Step 6: Manufacturing Files

BOM Files

bluetooth-control-carDownload

Position Files

bluetooth-control-car-top-posDownload

Order Directly from PCB WAY

I have already uploaded all these required manufacturing files in PCBWAY website. You can easily go to the below link and place you order, and get your Own Home Automation PCB manufactured from one of the best pcb manufacturer PCBWAY.

Order It Directly From PCBWAY…