กลับไปหน้ารวมไฟล์
bluetooth-controlled-obstacle-avoidance-robot-9ecb75-en.md

The project uses a mobile phone to communicate with a robot via bluetooth. I always wanted to build a robot and control it via mobile phone. After a long gap of more than 12 years, I took up the task of building a robot and operate it. This is also my first project in the Arduino Project Hub. Electronics and robotics is one of my favourite hobbies and therefore I took the task of building the robot in this time of lockdown due to Covid19.

Bluetooth Controlled Obstacle Avoidance Robot.

The robot senses bluetooth signals transmitted from the mobile phone. It uses the HC-05 bluetooth module to sense the command signals from the mobile phone and controls the robot. I used the ArduinoBlueControl app to control the robot.

Screenshot of the Arduino BlueControl App.

Controls available in the Arduino BlueControl App

Buttons for Controlling the Robot.

The heart of the robot is the Arduino Nano. It receives the signals from the HC-05 module via serial communication and controls the motors via L298N motor driver module for motion in forward, reverse, left and right directions.

Arduino Nano for controlling the robot.

Care should be taken to connect the TX and RX pins of the HC-05 module with the Arduino Nano. A logic level converter is used for the same.

The robot uses HC SR-04 ultrasonic sensor module to detect obstacles in its path. On sensing any obstacle during its forward motion, the robot stops.An RGB LED is used to show the status of the robot.

HC-SR04 Ultrasonic Sensor Module.

The robot is assembled in a 2-wheel base consisting of two geared drive motors. The circuitry is assembled over a breadboard with power supply (3.3v and 5v). The Arduino Nano cannot drive the motors directly due to much higher current requirement for the motors. Therefore the L298N motor driver module is used to drive the motors. The PWM signals from the Arduino Nano is used to control the speed of the motors via the ENA and ENB pins of the L298N motor driver module.

Bottom of the robot showing the L298N motor driver module.

Top view of the robot.

Here is a short video of the robot in operation:

Short video of the Bluetooth Controlled Robot.

Hope you liked my bluetooth controlled obstacle avoidance robot. This robot can be modified and extended for uses in home automation, obstacle avoidance vehicles for the shop floor etc. and many more uses.


🛠️ Deep Dive / Technical Analysis

The Smart Obstacle / Bluetooth 4WD Car is the final evolution of the basic robot kits. It is a "Hybrid" project: It isn't entirely autonomous, nor is it entirely manual. It represents modern Drive-by-Wire technology—you drive using an app, but the car will override your bad decisions to ensure safety.

Fusing Comm Logic with Sensor Math

The structure of the loop() must be perfectly timed.

  1. The Radar Check: First, the HC-SR04 ping sensor mounted on the front bumper checks the distance.
  2. The Override Check: If distance is < 20cm, the Arduino fires an interrupt. It forces speed = 0 to all four motors, spins an alarm buzzer, and completely ignores any forward commands coming from your phone!
  3. The Listening Phase: If clear (> 20cm), it checks Serial.read() for incoming Bluetooth packets.
  4. The Execution: If the phone transmits "Forward", the L298N pushes current to all four motors simultaneously.

Pan/Tilt Scanning (Optional Upgrade)

To make the car truly intelligent, the ultrasonic sensor is often mounted on a Micro Servo (SG90). When the car auto-stops before hitting a wall, it:

  1. Turns the servo left and pings. (60cm clear).
  2. Turns the servo right and pings. (10cm blocked).
  3. The Arduino decides the safest route is Left, spins the wheels, and continues its autonomous mission!

Central Hardware List

  • Arduino Uno/Mega: The hybrid processor.
  • L298N Motor Driver Module: Necessary for massive current draw.
  • 4WD Chassis Kit (4 Motors, 4 Wheels).
  • HC-SR04 Ultrasonic Sensor.
  • HC-05 Bluetooth Module.
  • Dual 18650 Battery Pack: 7.4 Volts minimum is required to beat the stall current of four engaged motors.

ข้อมูล Frontmatter ดั้งเดิม

title: "Bluetooth Controlled Obstacle Avoidance Robot"
description: "This project uses mobile phone to communicate with a robot via bluetooth. It also senses obstacles and stops to avoid collision."
author: "alokmech007"
category: "Motors & Robotics"
tags:
  - "home automation"
  - "internet of things"
  - "robots"
views: 48623
likes: 19
price: 2450
difficulty: "Intermediate"
components:
  - "1x Ultrasonic Sensor - HC-SR04 (Generic)"
  - "1x Male/Female Jumper Wires"
  - "2x DC Motor, 12 V"
  - "1x Dual H-Bridge motor drivers L298"
  - "1x Resistor 330 ohm"
  - "1x Arduino Nano R3"
  - "1x SparkFun Breadboard Power Supply Stick 5V/3.3V"
  - "1x SparkFun Logic Level Converter - Bi-Directional"
  - "1x RGB Diffused Common Anode"
  - "1x HC-05 Bluetooth Module"
  - "1x Breadboard (generic)"
tools: []
apps:
  - "1x Arduino BlueControl"
  - "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "57c88bc184ec352a29b5ddf716baea51790b228b2471f6123b3aaf568e3bc132"
encryptedPayload: "U2FsdGVkX18Hf4n1zb+77fjEtSpvESBbdMj7tlACAHNzlUQXxeguU/8PEHOmXmoaerY5W2LjqCk905/h8SykLXM5WWetgVsEqzszj9ZNGjyJcO4TTTc2vVU2TUT+r+J42MX6hFdWxHewIYgXjH5tFkVhNsqP54f/jk/uTnPQAzgCXJTPbvYayQGwd3ZOx2Yc"
seoDescription: "Build a Bluetooth controlled obstacle avoidance Robot using Arduino. Control via mobile phone with automatic stop feature."
videoLinks:
  - "https://www.youtube.com/embed/5rQxAnh1cow"
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/bluetooth-controlled-obstacle-avoidance-robot-9ecb75_cover.jpg"
lang: "en"