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)
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
For software simulation of obstacle avoidance robot, we need :
- A pc
- Proteus software
- Arduino library for proteus
- Ultrasonic sensor library for proteus
- potentiometer (available in proteus ) (POT-HG)
- L293D motor drive (available in proteus software)
- Motor - DC (available in proteus software)
- Virtual terminal (available in proteus software)
- 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 :
BLOCK DIAGRAM
This is the basic block diagram of our circuit using components. We are going to construct the circuit using this block diagram.
Algorithm
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
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.
Downloads
Simulation
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 :