Obstacle Avoidance Robot Using Ultrasonic Sensor (Proteus)

by Karthik Bhogi in Circuits > Electronics

6591 Views, 2 Favorites, 0 Comments

Obstacle Avoidance Robot Using Ultrasonic Sensor (Proteus)

5.png

We generally come across obstacle avoidance robot every where. Hardware simulation of this robot is part of competition in many colleges and in many events. But software simulation of obstacle robot is rare. Even though if we can find it somewhere, the information provided by them was not at all insufficient to do our project.

So, without further delay, Let's get started !

Introduction

If u came here , you will already know what is an obstacle avoidance robot and what does it do. In short, Obstacle Avoidance Robot is an intelligent robot, which can automatically sense and overcome obstacles on its path. For sensing an obstacle, robot needs to use sensors. The ultrasonic sensor and Ir sensor can be used for detecting objects or obstacles in between the path.

Obstacle Avoidance Robot has dynamic steering algorithm which ensures that the robot doesn't have to stop in front of an obstacle which allows robot to navigate smoothly in an unknown environment, avoiding collisions. The main motto of this robot is to avoid the accident which will generally happen in congested Areas by applying emergency brake.

Requirements

6.png

For software simulation of obstacle avoidance robot, we need :

  1. A pc
  2. Proteus software
  3. Arduino library for proteus
  4. Ultrasonic sensor library for proteus
  5. potentiometer (available in proteus ) (POT-HG)
  6. L293D motor drive (available in proteus software)
  7. Motor - DC (available in proteus software)
  8. Virtual terminal (available in proteus software)
  9. power and ground (available in proteus software)

I have made my first Arduino robot using proteus software. I will provide the links for downloading the proteus software and required libraries for build obstacle avoidance robot. It is a obstacle avoidance using 3 ultrasonic sensors. Most of the libraries will be available in www.theengineeringprojects.com. I did lot of work on the arduino code and made the best algorithm.

Adding Components in Proteus Software

By clicking on "p" , we can add components. Above pictures are for your reference for adding components into the schematic capture of proteus software.

Adding a library in the proteus software can be learnt using this video :

https://www.youtube.com/watch?v=hkpoSDUDMKw

BLOCK DIAGRAM

7.png

This is the basic block diagram of our circuit using components. We are going to construct the circuit using this block diagram.

Algorithm

8.png

This is the algorithm when you use three ultrasonic sensors. Follow this algorithm clearly, while writing your arduino code. I will provide arduino code as well, don't worry.

Algorithm Explanation :

  • start the simulation.
  • If distance between the middle sensor and the object is greater than max range then it moves forward irrespective of distance between the other two ultrasonic sensors and objects. Forward movement is strictly accepted.
  • If distance between right & middle sensor is less than max range and distance between left sensor and object is more then it moves left .
  • If distance between left & middle sensor is less than max range and distance between right sensor and object is more then it moves right
  • If all the sensors have less than max range then it checks which is greater in them. If right sensor have more distance than other two then it moves right. If left sensor have more distance than other two then it moves left. If middle sensor have more distance than other two then it moves forward. If all the sensors have equal distances then it stops.
  • If distance between right, left sensor and object are greater than max range and distance between middle sensor is less than max range then it checks which is greater in distance between right and left sensors. If right sensor distance is greater than left sensor distance then it moves right and If left sensor distance is greater than right sensor distance then it moves left.

Circuit Diagram

WhatsApp Image 2020-12-05 at 11.34.01.jpeg

Make your connections according to the above circuit diagram in the proteus software. Go through each and every connection slowly and make connections properly.

Code

Download the below code and run it in the arduino ide before pasting it in the source code of the proteus. If any library not installed, install it by going to Sketch > Include library > Manage libraries > search the required library. Paste it in the source code of the arduino in the proteus software. you can check youtube tutorials to know how to paste the code in proteus software.


Simulation

WhatsApp Image 2020-12-05 at 11.35.46.jpeg
WhatsApp Image 2020-12-05 at 11.36.47.jpeg
WhatsApp Image 2020-12-05 at 11.37.35.jpeg

The above three examples shown are the robot movement in all the possible directions i.e Forward movement, Left movement, Right movement.

Video Simulation

This is the real time simulation obstacle avoidance robot in Proteus software. I changed distance between the sensors and the objects using potentiometer attached to the ultrasonic sensor.

Library Files

Installation

Follow the steps in the videos to install the required softwares for simulating the obstacle avoidance robot using software.

Proteus Software :

https://www.youtube.com/watch?v=31EabTgBnG8&feature=emb_logo

Arduino Software :

https://youtu.be/TbHsOgtCMDc

17.png