Arduino Bluetooth Controlled Car

Introduction: Step into the world of wireless control and innovation with Robotshapers' Bluetooth Powered Car! This cutting-edge robot car utilizes the seamless connectivity of Bluetooth technology to offer an unparalleled level of control and versatility. By leveraging mechanical components like wheels and motors alongside electronic components such as microcontrollers and Bluetooth modules, this futuristic creation opens up a world of possibilities.

Arduino Bluetooth Controlled Car

In this blog post, we delve into two vital components of the Bluetooth Powered Car: the HC-05 Bluetooth Module and the L298N Driver Module. We uncover their functionalities, specifications, and the immense potential they unlock for remote control and automation. But first, let's take a closer look at the HC-05 Bluetooth Module and how it forms the backbone of this groundbreaking innovation.

HC-05 Bluetooth Module: The HC-05 module serves as the bridge between the robot car and a Bluetooth-enabled device, such as your smartphone or tablet. Its wireless communication prowess allows you to effortlessly control the Bluetooth Powered Car with ease. From its compatibility with various devices and microcontrollers to its versatile working modes, the HC-05 module takes connectivity to new heights.

Bluetooth robot car is a robot car that can be controlled wirelessly using Bluetooth technology. The chassis consists of mechanical components such as wheels and motors and electronic components such as microcontrollers or controller boards and Bluetooth modules. The Bluetooth module allows communication between the robot car and a Bluetooth-enabled device that acts as a controller, such as a smartphone or tablet.
HC05 Bluetooth Module: The
HC-05 is a popular Bluetooth module used for wireless communication in a variety of applications. Here are some details of HC-05 Bluetooth module:

Function: The HC-05 module is designed to establish a wireless Bluetooth connection between devices. It can be a master or slave, allowing it to interact with other Bluetooth devices such as smartphones, tablets, computers and microcontrollers.

Bluetooth version: The HC-05 module is based on the Bluetooth 2.0 + EDR (Enhanced Data Rate) specification.
It supports various Bluetooth profiles, including the Serial Port Profile (SPP), which allows it to send and receive serial data.

Communication Interface: The module uses a communication interface, usually UART (Universal Asynchronous Transceiver) to send and receive data. This makes it easy to connect with microcontrollers or other devices that support serial communication.

Range: The HC-05 module has a maximum range of approximately 10 meters (30 feet) in an open environment. This range varies depending on the environment and affects the signal path.

Operating Voltage: The module usually works at 3.3V, but its serial interface can tolerate 5V logic level.
Some models of this model may have a built-in generator that allows them to be used directly from the 5V supply.

Pairing and Configuration: The HC-05 module can be paired with other Bluetooth devices using a PIN code. By default, the PIN number is usually "1234" or "0000". The module can be configured using AT commands that allow you to change settings such as Bluetooth device name, baud rate and operating mode.

Working mode: The HC-05 module supports various working modes, including data transmission and command mode. In data transfer mode, it acts as a transparent bridge, allowing data to be sent and received between connected devices. In command mode, AT commands can be used to configure the module.

Compatibility: The HC-05 module is widely used with various microcontrollers and devices that support communication. It can be used with Arduino boards, Raspberry Pi and other development platforms.

Components Required:

  1. Arduino Uno
  2. HC05 Bluetooth Module
  3. L298N Motor Driver Module
  4. B.O. motor (2 nos)
  5. Wheel (2 nos)
  6. Caster wheel
  7. 12v DC Battery 

HC05 bluetooth module:

HC-05 Bluetooth modules usually have six pins, each with a specific purpose. Here are the details of the pins of the HC-05 Bluetooth module:

  1. VCC: This pin is used to power the module.
    It must have a 3.3V power supply. Some models of this model can tolerate 5V, but 3.3V is generally recommended to prevent damage.
  2. GND: The GND pin is the ground connection of the module. It must be connected to the ground of the circuit or power supply.
  3. TXD: The TXD pin is the transmit pin for serial communication. It is used to send data from the module to another device.
    It must be connected to the receiver (RX) pin of the device you are communicating with.
     
  4. RXD: The RXD pin is the receiver pin for serial communication. It is used to receive data from other devices. It must be connected to the transmit (TX) pin of the device you are communicating with.
  5. STATE: The STATE pin is optional and not always available on all HC-05 modules. If yes, indicate the current state of the Bluetooth module, such as whether it is in discoverable mode or connected to a device.
  6. EN (Enable): The EN pin is another optional pin that may or may not be available on all HC-05 modules.

L298N Driver Module:

The L298N is a popular dual H-bridge driver module that allows you to control the speed and direction of two DC motors or a stepper motor. It provides a simple way to interface a motor with a microcontroller or other control system. Here are some details about the L298N Driver Module:



Motor control: The L298N module can control the rotation and speed of two DC motors or a stepper motor. It uses an H-bridge circuit that allows the motor to drive in both directions (forward and reverse) and uses pulse width modulation (PWM) to control the speed of the motor.
Rated current: The maximum current of each channel of the L298N module is usually about 2A per channel. When both methods are used simultaneously, the total measured current is up to 4A. This allows you to drive motors with higher current requirements.
Input voltage: The L298N module works over a wide input voltage range, usually 5V to 35V. It can handle a wide range of motor voltages, allowing for motor flexibility.
Control Signals: The L298N module must control signals to determine the direction and speed of the motor.
Each motor channel uses two digital inputs for control (IN1, IN2 for one motor and IN3, IN4 for another motor) and a PWM input for speed control (ENA for one motor and ENB for the other motors).
Logic Levels: The control signals of L298N modules generally operate at TTL logic levels, ie they are compatible with 5V microcontrollers or digital systems. However, some models of the module support 3.3V logic level, so the voltage required for the particular module must be verified.
Activation and Standby Mode: Each motor channel of the L298N module has an enable input (EN) that allows you to enable or disable the motor. It also provides a standby input (STBY) that can be used to put the drive in a low power state.
Heat sink: L298N modules usually have a built-in heat sink to dissipate the heat generated during generator operation.
This helps prevent overheating and protect the drive from damage.
Wiring and Connections: The L298N module has terminals or screw terminals for motor, motor output, and control input. It also provides additional pins for connecting external power supplies, such as separate power supplies for the motor.

Remote control application:


Link to download the application: https://play.google.com/store/apps/details?id=braulio.calle.bluetoothRCcontroller&hl=en_US

App screen looks like this:

All you have to do is turn on bluetooth on your phone and pass the number "1234". After pairing, open the app, press the star icon and choose "Connect to Car", you will see "HC05" in the list, click on it and it will pair. Then you can control your robot with your phone.

Circuit Diagram:

Code:

const int IN1 =2;
const int IN2 =3;
const int IN3 =4;
const int IN4 =5;
char val;
void setup() {
  pinMode(IN1,OUTPUT);
  pinMode(IN2,OUTPUT);
  pinMode(IN3,OUTPUT);
  pinMode(IN4,OUTPUT);
 
  Serial.begin(9600);
}
void loop() {
  if (Serial.available()) {
    val = Serial.read();
    Serial.println(val);
  }
  if (val == 'F')
  { 
  digitalWrite(IN1, HIGH);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, HIGH);
  digitalWrite(IN4, LOW);
  }
  else if (val == 'B')
  {
   digitalWrite(IN1, LOW);
  digitalWrite(IN2, HIGH);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, HIGH);
  }
  else if (val == 'L')
  {
 digitalWrite(IN1, HIGH);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, HIGH);
  }
  else if (val == 'R')
  {
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, HIGH);
  digitalWrite(IN3, HIGH);
  digitalWrite(IN4, LOW);
  
  }
else if (val == 'S')
  {
  digitalWrite(IN2, LOW);
  digitalWrite(IN1, LOW);
  digitalWrite(IN4, LOW);
  digitalWrite(IN3, LOW);
  }
}

Applications:

Bluetooth controlled robots have different applications in different fields. Here are some applications for Bluetooth controlled robots:

  1. Education and Training: Bluetooth controlled robots can be used in education to teach business, robotics and engineering concepts.
  2. Home automation: Bluetooth controlled robots can be integrated into home automation systems. They can be used for tasks such as remote monitoring, security monitoring, and home assistance. 
  3. Fun and games: Bluetooth-controlled robots can provide interactive and fun activities. They can be used in robot competitions, robot battles or as interactive toys. 
  4. Research and Investigation: Bluetooth-controlled robots can be used to investigate and examine the situation. 
  5. Assistance and medical applications: Bluetooth-controlled robots can assist people with reduced mobility or physical problems.
    They can be used as vehicles or tools that work on behalf of people with disabilities. 
  6. Automation: Bluetooth controlled robots are used in industrial automation and manufacturing processes. 
  7. Agriculture and farming: Bluetooth-controlled robots can be used for many tasks in agriculture.