A simple project on Obstacle Avoiding Robot is designed here. Robotics is an interesting and fast growing field. Being a branch of engineering, the applications of robotics are increasing with the advancement of technology.
With varied applications, the notion of mobile robots is rapidly changing, and the number of mobile robots and their complexities are increasing.
Path planning, self-localization, and map interpretation are only a few examples of mobile robot navigation strategies. Obstacle Avoiding Robots are self-driving mobile robots that avoid colliding with unexpected impediments.
An Obstacle Avoiding Robot is created in this project. It’s an Arduino-based robot that avoids collisions by using Ultrasonic range finder sensors.
- Circuit Diagram
- Hardware Required
- Component Description
- Arduino Uno
- HC – SR04
- Servo Motor
- Design of Obstacle Avoiding Robot using Arduino
- Arduino Uno [Buy Here]
- Ultrasonic Range Finder Sensor – HC – SR04
- Motor Driver IC – L293D [Buy Here]
- Servo Motor (Tower Pro SG90)
- Geared Motors x 2
- Robot Chassis
- Power Supply
- Battery Connector
- Battery Holder
Arduino Uno is an ATmega 328p Microcontroller based prototyping board. It is an open source electronic prototyping platform that can be used with various sensors and actuators.
Arduino Uno has 14 digital I/O pins out of which 6 pins are used in this project.
HC – SR04
It is an Ultrasonic Range Finder Sensor. It is a non-contact based distance measurement system and can measure distance of 2cm to 4m.
It is a motor driver which can provide bi-directional drive current for two motors.
The Tower Pro SG90 is a simple Servo Motor which can rotate 90 degrees in each direction (approximately 180 degrees in total).
Arduino is the main processing unit of the robot. Out of the 14 available digital I/O pins, 7 pins are used in this project design.
The ultrasonic sensor has 4 pins: Vcc, Trig, Echo and Gnd. Vcc and Gnd are connected to the +5v and GND pins of the Arduino. Trig (Trigger) is connected to the 9th pin and Echo is connected to 8th pin of the Arduino UNO respectively. A Servo Motor is used to rotate the Ultrasonic Sensor to scan for obstacles. It has three pins namely Control, VCC and GND. The Servo Control Pin is connected to pin 11 of Arduino while the VCC and GND are connected to +5V and GND.
Design of Obstacle Avoiding Robot using Arduino
The robot’s main processing unit is the Arduino. This project design makes use of 7 of the 14 accessible digital I/O pins.
Vcc, Trig, Echo, and Gnd are the four pins on the ultrasonic sensor. Vcc and Gnd are connected to the Arduino’s +5v and GND pins. Trig (Trigger) is attached to the Arduino UNO’s 9th pin, whereas Echo is connected to the Arduino UNO’s 8th pin.
To scan for obstructions, a Servo Motor rotates the Ultrasonic Sensor. Control, VCC, and GND are the three pins. The Servo Control Pin is connected to Arduino pin 11, and VCC and GND are connected to +5V and GND, respectively.
The L293D is a 16-pin integrated circuit. The enable pins are pins 1 and 9. +5V is applied to these pins. Pins 2 and 7 are microcontroller control inputs for the first motor. They are wired to Arduino pins 6 and 7, respectively.
Pins 10 and 15 are also microcontroller control inputs for the second motor. They are attached to Arduino pins 5 and 4. Ground pins 4, 5, 12, and 13 of the L293D are linked to Gnd.
The first motor (consider it the left wheel’s motor) is linked to L293D’s pins 3 and 6. The right wheel motor is controlled by the second motor, which is coupled to pins 11 and 14 of the L293D.
Vcc1 is the L293D’s 16th pin. This is connected to a power supply of 5 volts. Vcc2 is the eighth pin. This is the voltage at which the motor is powered. This can be powered from a voltage range of 4.7 to 36 volts. If the L293D is linked to a +5V supply, pin 8 is used in this project.
NOTE: The Motor Driver’s power supply, which includes Pins 1 (enable 1), 8 (VCC2), 9 (enable 2), and 16 (VCC1), should be given its own power supply.
On-board 5V voltage regulators are provided on Motor Driver boards. In the project, a similar one is used.
If the Circuit Diagram of the Obstacle Avoiding Robot above isn’t apparent, the graphic below could assist.
It’s crucial to understand how the ultrasonic sensor works before getting started on the project. The following is the core idea of how an ultrasonic sensor works:
The Trig pin on the ultrasonic sensor is set logic high for at least 10s using an external trigger signal. The transmitter module sends a sound burst. This is made up of eight 40KHz pulses.
After hitting a surface, the signals bounce back and are detected by the receiver. From the time the signal is sent to the time it is received, the Echo pin is high. With the right calculations, this time may be translated to distance.
The aim of this project is to implement an obstacle avoiding robot using ultrasonic sensor and Arduino. All the connections are made as per the circuit diagram. The working of the project is explained below.
When the robot is powered on, both the motors of the robot will run normally and the robot moves forward. During this time, the ultrasonic sensor continuously calculate the distance between the robot and the reflective surface.
The Arduino is in charge of processing this data. If the distance between the robot and the obstruction is less than 15cm, the robot comes to a halt and uses the Servo Motor and Ultrasonic Sensor to scan in both directions for a new distance. The robot will prepare for a left turn if the distance to the left is greater than the distance to the right. However, it first backs up a little and then activates the Left Wheel Motor in reverse.
In the same way, if the right distance exceeds the left distance, the Robot will prepare a right revolution. This process repeats indefinitely, and the robot continues to move without colliding with any obstacles.
- As the project is based on Arduino, the programming is very easy and can be easily modified.
- Doesn’t require the Arduino Motor Shield.
- When using a 9V battery, at least 2 such batteries are needed to power the robot. It is better to use 2 9V batteries (one for Arduino, Ultrasonic sensor, Servo Motor and the other one for L293D and motors).
- The Ultrasonic sensor should not be connected directly to power supply as it might affect the normal performance.
- Instead of ultrasonic sensor, an IR transmitter – receiver pair can also be used.
- Obstacle avoiding robots can be used in almost all mobile robot navigation systems.
- They can be used for household work like automatic vacuum cleaning.
- They can also be used in dangerous environments, where human penetration could be fatal.
You learned how to create an obstacle avoidance robot and how to programme it by the end of this article. We’ve also included Robot vacuum cleaners with anti-collision and obstacle avoidance sensors, which may surprise you. Learn more about the remarkable benefits of Robot Vacuum Cleaners with only a click.
Previously, robots moved in all directions in response to commands. They later discovered that it became trapped when an unanticipated obstruction appeared in front of it. As a result, they conducted extensive study and developed the Obstacle Avoidance Arduino robots.
You learned about its functions, applications, and the hardware components that needed to be assembled. You’ve tried it several times and haven’t gotten the results you want from other sources. The Arduino Robot Kits are ideal for you.
These kits are a terrific way for engineers and beginners to learn about Arduino and Robotics while creating fascinating projects. It comes with a guidebook that walks you through the assembly process, working theories, and project concepts.
To learn more about Arduino robot kits, read the whole article. Kits for Arduino Robots