Obstacle detection and avoiding robots are intelligent robots that can perform desired tasks in an unstructured environment by finding and overcoming obstacles in their way without continuous human guidance.
CIRCUIT DESIGN:
STEP 1: Robot chassis DC motors connection to Motor Shield
Each motor has +ve and –ve terminals. Two +ve and –ve terminals of both left side and right side DC motors are shorted separately to be connected to the ports of motor shield A+, A-( 2 +ve terminals of left side DC motors are connected to A+ and 2 -ve terminals of left side DC motors are connected to A- ) and B+, B-( 2 +ve terminals of right side DC motors are connected to B+ and 2 -ve terminals of right side DC motors are connected to B- ) respectively.
STEP 2: Servo motor connection
The Servo motor we used was TowerPro SG90 9G Micro Small Servo Motor to control movement 0-180 degrees. This controls the ultrasonic head movement for sensing an obstacle. It has three wire :
Red = +5v
Brown = GND
Orange = Signal (pin 10 for our code)
STEP 3: Ultrasonic Sensor Connection
The ultrasonic Sensor we used was HC-SR04. It consists of 4 wires for the following connection:
STEP 4: Horn and Light Connection
Horn and Light we used here. It consists of 3 wires for the following connection:
By following the above procedure, we completed our circuit designing of Obstacle avoiding robot.
Working Principle of this Obstacle Avoiding Robot
The Obstacle avoiding robot we created was mainly based on the working principle of
Ultrasonic sensor. Our robot initially goes on moving forward direction until it gets any kind of obstacle. During moving, every time it will check if there is any obstacle nearby by continuously sending and receiving distance-related information. The Trig pin will be used to send the signal and the Echo pin will be used to listen for returning signal.
So, For every check, we are seeing if there is an object closer than 30 cm to our robot. The check has two possible outcomes, yes or no. Yes, meaning that there is indeed some object closer than 30 cm. No, meaning that there are no objects detected within 30 cm. If there is nothing within 30 cm the robot can simply move forward as the path is clear. If there is something closer than 30 cm the robot must perform obstacle avoidance maneuvers.
Another check occurs to see what direction is the best way to go. If left is the way to go it has to turn back to the left and then go forward. If the right is the way to go the robot simply moves forward as it is already facing in the right direction.
All we have done is converting that diagram into Arduino code and that's it. So, easily, the obstacle avoidance code was done.
Post a Comment