Home > Projects > Robotics – Automation Projects > Robot using Arduino and Bluetooth Module (Obstacle Avoidance Robot)

Robot using Arduino and Bluetooth Module (Obstacle Avoidance Robot)

Summary of Robot using Arduino and Bluetooth Module (Obstacle Avoidance Robot)


This project builds an Arduino UNO-based obstacle avoidance robot that navigates safely by detecting obstacles with an ultrasonic sensor. The sensor, mounted on a servo motor, scans different angles to find the clearest path. A Bluetooth module allows optional manual control via an Android app and displays status updates in automatic mode.

Parts used in the Obstacle Avoidance Robot:

  • Arduino UNO board
  • Ultrasonic sensor (HC SR04)
  • Motor driver IC (L293D)
  • 2 DC motors
  • Servo motor
  • Bluetooth module (HC05)
  • Android smartphone

This project is designed to build a robot that automatically detects the obstacle on its path and guides itself whenever an obstacle comes ahead of it. This robotic vehicle is built, using Arduino UNO board. An ultrasonic sensor is used to detect any obstacle ahead of it. A motor driver IC and 2 DC motors are used for controlling the movement of the robot. A servo motor is also used in this project. The ultrasonic sensor is then mounted on the servo and by rotating the servo to different angles we will obtain the readings from the ultrasonic sensor in those angles. This will help the controller to detect the exact path to navigate. A Bluetooth module is also added to the project (which is optional ) in order to control the robot from your android phone when it is in manual mode.

Robot_Arduino_Bluetooth

Objectives of the Project

  • Navigate safely by avoiding obstacles comes ahead.
  • Detecting the exact path by checking the sensor readings in different angles.
  • Send status of the robot movement (using Bluetooth module) to the nearby android phone when the robot is in automatic mode.
  • Navigate in manual mode by receiving signals from the phone.

Let’s begin to build our project – Obstacle Avoidance Robot

Circuit Diagram

Robot_Arduino_Bluetooth_module_circuit

Assemble the circuit as shown in the diagram! Important connections are explained below.

HC SR04 is the ultrasonic sensor that we are using here. The ultrasonic sensor has 4 pins: Vcc, Trig, Echo and Gnd. Vcc and Gnd are connected to the supply pins of the Arduino. Trig is connected to the 11th pin and Echo is connected to 10th pin of the Arduino.

As mentioned earlier a motor driver IC called L293D is used for controlling the DC motors. It is a 16 pin IC which can drive two motors simultaneously.  1st and 9th pin are the enable pins, which are connected to the 5th and 6th pins of the Arduino board. Pins 2 and 7 are control inputs from microcontroller for first motor. They are connected to pins A0 and A1 of Arduino respectively. Similarly, pins 10 and 15 are control inputs from microcontroller for second motor. They are connected to pins A2 and A3 of Arduino.

When the robot is switched ON, both the motors of the robot will run and the robot moves forward.  During this time, the ultrasonic sensor continuously calculate the distance between the robot and the obstacle in front of it. If the distance between the robot and the obstacle is less than 30cm, the robot will stop moving and rotate the sensor using servo motor to take readings in different angles.  The correct turn which is to be taken can be decided by simply checking the angle in  which sensor gives maximum reading. That will be the path with less obstacle. Servo motor have a signal line , which is connected to the 9th pin of  arduino. The  rotation of the servo is done by generating pwm signal on its signal line.

A Bluetooth module called HC05  is also used in this project (optional). It is connected to the RX and TX pins of Arduino. It is used here for controlling the robot with your android phone. We developed  simple android app for this. The .apk file of the application is attached with this article. You can simply download and install it on your phone. By using the app , you can switch the robot to automatic or manual mode with a single click. And also shows the status of the robot when it is in automatic mode.

Read More: Robot using Arduino and Bluetooth Module (Obstacle Avoidance Robot)

Quick Solutions to Questions related to Obstacle Avoidance Robot:

  • How does the robot detect obstacles?
    The robot uses an HC SR04 ultrasonic sensor to continuously calculate the distance between itself and any object ahead.
  • Can I control the robot manually?
    Yes, an optional Bluetooth module allows you to control the robot from an Android phone using a specific app.
  • What happens when an obstacle is detected?
    If the distance is less than 30cm, the robot stops and rotates the sensor using a servo motor to scan for the best path.
  • Which pins connect the ultrasonic sensor to the Arduino?
    The Trig pin connects to Arduino pin 11 and the Echo pin connects to Arduino pin 10.
  • How does the robot decide which direction to turn?
    The controller checks the angle where the sensor gives the maximum reading to identify the path with fewer obstacles.
  • Does the robot send status updates to the phone?
    Yes, the system sends the status of the robot movement to the nearby Android phone when it is in automatic mode.
  • What component drives the two DC motors?
    A 16-pin L293D motor driver IC is used to control the simultaneous movement of the two DC motors.
  • Is the Bluetooth module mandatory for this project?
    No, the Bluetooth module is optional and is only needed if you want to operate the robot in manual mode.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top