Object Detecting Android Mobile Phone Controlled Bluetooth Robot Using PIC Microcontroller 16F877A

Last time we had a project on Arduino robots with Bluetooth and Android, and in that one our readers Mr. Paul asked how he can make an obstacle avoidance robot. So today I came up with another engineering project for electronics and communication students, Android and Bluetooth controlled robot using PIC Microcontroller with object detecting capability.

After installing MikroElectron’s Robot Control App from Play Store you should be able to control the robot with your android phone/ tablet over bluetooth signal. The eye catching feature of this project is the ‘objects detection’ capability with the help of Ultrasonic sensor, so you don’t have to worry about the robot hitting any object or wall in front of it. Robot will navigate safely without touching any obstacles. Moreover it will make beep sounds if any obstacle is found and a LCD screen is used to display distance to the specified object.

Speaking about the hardware, I’ve used PIC16F877A to control the robot, ultrasonic sensor will generate ultrasonic pulses to detect objects and calculate the distance, LCD screen to display distance, HC-06 / HC-05 Bluetooth module for communicating to Robot wirelessly.

Android_Controlled_Bluetooth_Robot

Well let’s see how to make a mobile robot for your academic project.

Components for Android Robot

  1. PIC16F877A
  2. L293D IC
  3. 7805 IC
  4. LCD 16×2
  5. Ultrasonic Sensor HC-SR04
  6. Crystal 20MHz
  7. Transistor BC548
  8. Resistor (10Kx2, 1Kx2)
  9. Capacitor (33pfx2, 10uF/16V)
  10. PCB
  11. DC gear motor (100 rpm x 2)
  12. Robot frame and wheels

Circuit Diagram of Bluetooth Controlled Robot

PIC_Android_robot_object_detection_ultrasonic_sensor_SR04_circuit_diagram

Working of Obstacle avoidance robot

For simplicity let’s consider this project having 2 parts- Bluetooth navigation section and object detection section.

Bluetooth Wireless Navigation

  • HC-06 / HC-05 Bluetooth module is used to receive data from android based device.
  • After pairing (connecting) the Bluetooth module with android phone or tablet, open the application and connect to the paired device HC-06 or HC-05.
  • Android application will send letters ‘F’, ‘B’, ‘R’ and ‘L’ to move robot forward, backward, right and left respectively.
  • These are received by the Bluetooth receiver, those letters are available in TX pin of HC-06.
  • TX pin of Bluetooth module is connected to RX pin (26) of PIC microcontroller, which receives information from the Bluetooth module.
  • That information is used as an interrupt to switch between user defined functions that we have specified.
  • We have written different functions to perform assigned tasks viz Move forward, backward, turn left and right. These functions will change the values of pins RC0, RC1, RC2 and RC3. Wheel rotations are controlled by these pins.
  • Here we are using IC L293D to drive wheel motor, which is capable of driving 2 motors at a time.

Object Detection

  • HC-SR04 ultrasonic sensor is used measure the distance between object and robot.
  • HC-SR04 ultrasonic sensor has 4 pins- Vcc, Ground, TIRGGER and ECHO.

HC-SR04_Ultrasonic_Sensor

  • ECHO is connected to Pin 23 and TIRGGER to Pin 24 of PIC Microcontroller respectively.
  • Initially we may trigger the ultrasonic sensor by applying a TRIGGER pulse via Pin 23 of PIC MCU.
  • This will initiate the sensor to transmit out 8 cycles of ultrasonic burst at 40 kHz and then it waits for the reflected ultrasonic burs. When the sensor detects ultrasonic from receiver, it will set the ECHO pin to high (5V) and delay for a period (width) which is in proportion to the distance.
  • The time difference between transmitted and reflected ultrasonic burst is calculated using TIMER1 module of PIC.

The distance is calculated by the formula
Object_Detecting_Robot_Design
Where,
Speed= Velocity of light.
Time= Time between transmitted and reflected wave.

  • If the distance is less than 25 cms, robot will rotate right 90 degree and produces a beep sound to inform that an object has been found. This will help to avoid objects and acquire safe path.

I have used 12V /1.2Ah rechargeable battery to operate the robot.

Android Robot Program (Hi-Tech C)

This is highly recommended project for Final year Engineering students, we are providing the Circuit diagram and working totally free but program codes are available for a cheap price.

Android_Robot_Program_CircuitsGallery

 

Please visit our CircuitsGallery Project Store (see number 12) to buy program codes. This program is compiled by Hi-Tech C.

Video Demo of Android Bluetooth Robot

I have recorded a video for this robot, but due to the lack of time I couldn’t edit the video. I will be updating it soon. Meanwhile you may checkout some of our other project demos at CircuitsGallery Video Lab

By the way did you get robotics basics? Have you built your own robot? Share your comments here.

14 thoughts on “Object Detecting Android Mobile Phone Controlled Bluetooth Robot Using PIC Microcontroller 16F877A

  1. Sir, i am an engineering final year student.I am so intrested in thus project.we are duscussing about doing this project.so can you please give me some more information about this project and the correct circuit diagram…..i am waiting for your reply.
    .please help me sir…

  2. hi am eyasu i live in Ethiopia and i like ur project i am so interst for ur project but i need ur help, like electronics material would you like to help me. finally tank you very much my friends.

  3. please help me to write the codes for object detect in 5cm distance in mikroc,to operate a servo motor Using PIC Microcontroller 16F877A

  4. what is the cost of this project sir because iam a finalier engg. student so in our group we discuss it to do so plese tell sir what is the cost

  5. I’m currently working with voice controlled Bluetooth bot Using android. The pree available app in play store let’s me send the string of data through my voice (eg. When I say move i want an if condition to execute and so on)
    Please help me with this.
    I want the program written in mikro c

Leave a Reply

Your email address will not be published. Required fields are marked *