Presented here is a straightforward project centered around an Obstacle Avoiding Robot, showcasing the fascinating and rapidly evolving realm of robotics. As a field within engineering, the scope of robotics continues to expand alongside technological advancements.
The landscape of mobile robots is undergoing a dynamic transformation, witnessing an upsurge in both the quantity and intricacy of these robotic systems. Within this domain, a range of navigation strategies such as path planning, self-localization, and map interpretation are continually evolving. Among these strategies, Obstacle Avoiding Robots stand out as autonomous mobile robots designed to navigate their environment while avoiding collisions with unforeseen obstacles.
In this project, we delve into the creation of an Obstacle Avoiding Robot. This robot, which relies on Arduino technology, employs Ultrasonic range finder sensors to autonomously detect obstacles and navigate its surroundings without encountering collisions.
- 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 stands as a straightforward Servo Motor with the capability to rotate approximately 90 degrees in both directions, offering a total range of about 180 degrees.
The Arduino serves as the primary processing unit for the robot. In the context of this project’s design, seven out of the available 14 digital I/O pins are put to use.
The ultrasonic sensor comprises four pins: Vcc, Trig, Echo, and Gnd. Vcc and Gnd are linked to the +5v and GND pins of the Arduino, while Trig (Trigger) is connected to the 9th pin and Echo is connected to the 8th pin of the Arduino UNO, respectively. To enable scanning for obstacles, a Servo Motor is employed to rotate the Ultrasonic Sensor. This Servo Motor features three pins: Control, VCC, and GND. The Servo Control Pin is connected to pin 11 of the Arduino, whereas the VCC and GND pins are connected to +5V and GND, respectively.
Design of Obstacle Avoiding Robot using Arduino
The Arduino serves as the central processing unit for the robot, and in this project’s design, seven of the available 14 digital I/O pins are utilized.
The ultrasonic sensor features four distinct pins: Vcc, Trig, Echo, and Gnd. Vcc and Gnd are connected to the Arduino’s +5v and GND pins, respectively. Meanwhile, Trig (Trigger) is affixed to the 9th pin of the Arduino UNO, and Echo is linked to the 8th pin of the Arduino UNO.
To facilitate obstacle detection, a Servo Motor is responsible for rotating the Ultrasonic Sensor. This Servo Motor comprises three pins: Control, VCC, and GND. The Servo Control Pin interfaces with Arduino’s pin 11, while the VCC and GND pins are connected to +5V and GND, respectively.
The L293D, a 16-pin integrated circuit, plays a pivotal role in motor control. The enable pins, found at pins 1 and 9, receive a +5V supply. Pins 2 and 7 are microcontroller control inputs for the first motor and are connected to Arduino pins 6 and 7, respectively. Likewise, pins 10 and 15 serve as microcontroller control inputs for the second motor, tied to Arduino pins 5 and 4. Ground pins 4, 5, 12, and 13 of the L293D are linked to the Gnd.
The first motor, responsible for the left wheel’s movement, connects to L293D’s pins 3 and 6. The second motor, controlling the right wheel, is linked to pins 11 and 14 of the L293D.
Within the L293D, Vcc1 at the 16th pin is connected to a 5-volt power source. Vcc2, situated at the eighth pin, provides power to the motors, capable of accepting voltage within a range of 4.7 to 36 volts. In this project, pin 8 is used since the L293D is connected to a +5V supply.
It’s important to note that the Motor Driver’s power supply, encompassing Pins 1 (enable 1), 8 (VCC2), 9 (enable 2), and 16 (VCC1), necessitates a dedicated power source. Motor Driver boards typically feature onboard 5V voltage regulators, with a similar one employed in this project.
If the Circuit Diagram of the Obstacle Avoiding Robot is not entirely clear, please refer to the accompanying graphic below for assistance.
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