Android Bluetooth Controlled Robot Using Arduino

In this project, I will be going to show you a Bluetooth Controlled Robot using an Arduino and HC-05 Bluetooth module. I will use a smartphone and an android app that can operate the robotic car.

Robotics is consistently a fancy topic for understudies, hobbyists, and DIYers. As a learner, constructing a robot is most likely one of the significant activities to do subsequent to finding out about the nuts and bolts. Android controlled robots make use of a smartphone for robotic control with the help of Bluetooth technology. This is a very simple robotics project using a microcontroller.

Principle Behind Bluetooth Controlled Robot

This Bluetooth controlled robot is operated simply using Bluetooth technology and also with the user command. The user has to install an app on his/her smartphone for controlling this robot. After pairing with a smartphone and Bluetooth controlled robot, the user can operate it via commands like forward, backward, right, left, and stop. Also, it has some extra features like forward and backward light indicators, a horn and speed control. These all commands are sent to the Bluetooth receiver from the smartphone. After receiving the command through the Bluetooth receiver, it sends the analog signal to the Arduino for decoding the code. And then after processing the right code the Arduino controls the motors, lights and horns of the robot.

Must Read Obstacle Avoiding Line Follower Robot

What is Bluetooth Controlled Robot?

Android Bluetooth controlled robot is a humanoid-assisted robotic system which can be easily controlled by using an android smartphone instead of any other methods like buttons, gestures, etc. For moving the robot, we just need to touch the forward, backward, right and left buttons of the app. Also, we can control it using the gesture function which is in-built in the app.

Project

Arduino Bluetooth Controlled Robot
Arduino Bluetooth Controlled Robot

Circuit Diagram

Bluetooth Controlled Robot Circuit Diagram
Bluetooth Controlled Robot Circuit Diagram

Components Required

  • Arduino Nano
  • HC-05 Bluetooth Module
  • L298N Motor Driver
  • BO Motor (x2)
  • LED (White, Red)
  • Buzzer (As Horn)
  • Smartphone
  • Bluetooth Controlled App
  • Jumper Wires
  • Mini Breadboard
  • Chasis
  • 9V Battery

About Parts

Arduino

arduino-nano
Arduino Nano

For the compact build, I choose Arduino Nano despite Arduino UNO. Arduino Nano is a small, flexible microcontroller board using an Atmega328p chip. It can also use as a substitute for UNO. All the functions are the same in these two boards. The size of its PCB is 18×45 mm. The clock speed is 16Mhz. Its input voltage is 5-12V. There are 30 pins including power pins, data pins, analog pins, and serial pins on this board.

HC-05 Bluetooth Module

HC-05 Bluetooth Module
HC-05 Bluetooth Module

The HC-05 Bluetooth Module is liable for empowering Bluetooth communication among Arduino and android phone. It has already a default baud rate of 9600 bps. We just need to connect RX and TX with a serial converter of the Arduino and that’s it.

HC-05 Bluetooth module has two modes that are one in master mode and another one in slave mode. We can set any mode by using some AT commands. Even we can set the module’s settings by using AT command. First, we need to enter AT mode with a 38400 bps baud rate by pressing Enable button at the Bluetooth module or by giving a HIGH level at Enable pin.

L298N Motor Driver

L298N Motor Driver
L298N Motor Driver Module

The L298N motor driver module is liable for giving the vital drive current to the engines of the robotic car.

N.B: I am using an L298N motor driver in this project, but you can also use an L293D motor driver as we use only two BO motors here. But in the case of four BO motors, we should use the L298N motor driver.

Circuit Connection

Going to build this Bluetooth controlled robot, at first we should look for the HC-05 Bluetooth module where the +5V and GND pins are directly connected to the 5V power supply or Arduino 5V supply.

After that, we need to connect the TX pin of the Bluetooth module to the RX pin of the Arduino as we know that we should only transmit data from the smartphone to the Bluetooth module of the Bluetooth controlled robot and don’t need to receive any kind of information from Arduino.

This RX pin of the Arduino depends on the SoftwareSerial library (Pin 0 and Pin 1 are arranged as RX and TX pins of the Arduino.)

Presently, the L298N motor driver module’s digital I/O pin 2 to pin 5 of Arduino are designed as to output pins of the motor driver and are associated with IN1 through IN4 of the L298N motor driver module.

Arduino NanoHC-05 Module
+5V VCC
GNDGND
TXRX
RXTX
Arduino NanoL298N Motor Driver
D2IN1
D3IN2
D4IN3
D5IN4

Android Application for Controlling The Robot

Here I have used a simple Bluetooth controlled app named “Arduino Bluetooth RC Car” available in the Playstore, which can communicate with a Bluetooth module using serial communication. After installing the app, we need to turn on Bluetooth and location in the smartphone to work it properly.

Now tap on the settings tab and then scan to find the correct Bluetooth module. There are some basic keys listed in the settings tab which I included in the Arduino code to work its basic functions which are forward, backward, right, left, etc. The following codes are mentioned below. We can also control this robot using gesture control with this same app.

FunctionCode
ForwardF
BackwardB
LeftL
RightR
Forward LeftG
Forward RightI
Backward LeftH
Backward RightJ
StopS
Front Light ONW
Front Light OFFw
Back Light ONU
Back Light OFFu
Horn ONV
Horn OFFv

Working Principle of Bluetooth Controlled Robot

To begin with, for this Bluetooth controlled robot, I have utilized 7 keys forward, backward, left, right, light ON/OFF, horn, and speed.

At the point when a key is pressed by the user, the comparing information is transmitted to the Bluetooth module from the smartphone over Bluetooth serial communication.

In the Arduino code, the Arduino gets any of this information from the Bluetooth module (according to the key mapping) and plays out a simple switch case activity, where each case is related with suitable directions to the motor driver input pins.

As an example, if the forward key is pressed in the smartphone app, then the Arduino will activate IN1 and IN3 from the motor driver module to move the robot in the forward direction while IN2 and IN4 are in deactivation mode.

Application of Bluetooth Controlled Robot

  • Low range mobile operated Bluetooth controlled robot.
  • Military spy robot application.
  • Home automation robots like a wheelchair.

Disadvantages of Bluetooth Controlled Robot

  • As we know the connectivity range of Bluetooth communication is approximately 10 meters, so the controlling range of this robot is also limited.
  • If the power is not sufficient for all the modules, especially the Bluetooth module, then the whole process will not work. Also, we can’t attach more than 3 batteries to the small chassis. So we need powerful batteries.

Future Development

  • In future, we can add more sensors to work it efficiently.
  • We can also add a wireless camera and display to view the sight where the robot will be moving.

Arduino Code

5 thoughts on “Android Bluetooth Controlled Robot Using Arduino”

  1. Sir, from where I could get material for Arduino Bluetooth Controlled Robot Car
    From I purchase material at right rate

Leave a Comment