Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

coer project

Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

ABSTRACT

The project aims to develop an obstacle avoidance robot using Arduino,


integrating ultrasonic sensors for distance measurement and motor control
for movement. The methodology involves designing a circuit connecting
sensors and motors to the Arduino board, implementing obstacle
detection algorithms in Arduino code, and testing the robot's performance
in avoiding obstacles. The key outcome is a functional robot capable of
autonomously navigating its environment by intelligently responding to
detected obstacles, showcasing the practical application of Arduino in
robotics.

—1—
INTRODUCTION
Obstacle avoidance robots represent a pivotal advancement in the field of
robotics, designed to navigate autonomously through dynamic
environments while avoiding potential obstacles in their path. The
primary objective is to develop intelligent machines capable of adapting
to unpredictable surroundings, enhancing their utility in various
applications such as surveillance, exploration, and automated logistics.
This project focuses on creating an obstacle avoidance robot using
Arduino, a versatile micro controller platform renowned for its simplicity
and effectiveness in robotics projects. By integrating ultrasonic sensors
for environmental perception and motor control for precise movement,
the robot aims to demonstrate the practical implementation of obstacle
avoidance algorithms in real-world scenarios. This introduction sets the
stage for exploring the project's technical aspects and underscores the
significance of developing robots with the ability to negotiate obstacles
autonomously.

—2—
The Importance Of Such Robots In Various Applications

Obstacle avoidance robots are instrumental in surveillance and security


applications. They can navigate through complex environments,
providing real-time data in areas where human access may be challenging
or hazardous. This capability is particularly valuable in monitoring large
areas, such as industrial facilities, warehouses, and public spaces.

In disaster-stricken areas or locations with hazardous conditions,


obstacle avoidance robots can be deployed for search and rescue missions.
Their ability to navigate through debris, rubble, or confined spaces
enables them to locate and assist victims more efficiently than traditional
methods.

In scientific exploration or mapping tasks, obstacle avoidance robots


can be used to navigate challenging terrains, whether it be the exploration
of unknown environments on Earth or other celestial bodies. These robots
contribute to data collection and mapping efforts in a variety of scientific
fields.

In logistics and warehouse management, obstacle avoidance robots


enhance automation by autonomously moving goods within a facility.
They can navigate through crowded spaces, avoiding collisions with both
stationary and moving obstacles, thereby streamlining the movement of
inventory.

The principles of obstacle avoidance are fundamental to the


development of autonomous vehicles, including self-driving cars and
drones. These technologies rely on real-time obstacle detection and
avoidance to ensure safe navigation through complex traffic scenarios.

Obstacle avoidance robots have applications in assistive robotics for


individuals with mobility impairments. They can be designed to assist
people in navigating through environments, providing a greater level of
independence and mobility for those with disabilities.

—3—
Obstacle avoidance robots serve as valuable educational tools,
introducing students and enthusiasts to the principles of robotics, sensor
integration, and programming. Building and programming these robots
can enhance learning in STEM (Science, Technology, Engineering, and
Mathematics) fields. Their adaptability makes them valuable assets in
industries striving for increased efficiency, safety, and innovation.

—4—
OBJECTIVES

The primary objectives of the obstacle avoidance robot project are as


follows:

 Construct a functional robot chassis integrating motors, wheels, and


an Arduino micro controller board, forming the physical foundation
of the obstacle avoidance robot.

 Incorporate ultrasonic sensors into the robot's design to enable


accurate and real-time distance measurements, providing the
necessary input for obstacle detection.

 Implement obstacle avoidance algorithms in the Arduino


programming language, utilizing sensor data to make intelligent
decisions on robot movement to avoid obstacles effectively.

 Develop and integrate motor control mechanisms into the Arduino


code to ensure precise and controlled movement of the robot based on
obstacle detection inputs.

 Achieve autonomous navigation capabilities, allowing the robot to


independently traverse an environment while adapting its path in
response to detected obstacles.

 Rigorously test the obstacle avoidance robot in controlled and real-


world scenarios to evaluate its performance. Identify any issues and
optimize the algorithms for improved efficiency.

 Explore possibilities for future enhancements, such as adding
additional sensors, refining algorithms, or integrating wireless
communication for remote control or data logging.

—5—
PROBLEM STATEMENT
In a rapidly evolving technological landscape, the need for intelligent and
adaptive robotic systems has become increasingly pronounced. One
specific challenge is the development of a robust and efficient obstacle
avoidance robot, capable of autonomously navigating diverse
environments while intelligently responding to dynamic obstacles. This
project addresses the following key problem areas:

Obstacle Navigation in Real-Time


Creating a robot that can navigate through an environment in real-time
requires the integration of sensors and algorithms capable of accurately
detecting and responding to obstacles instantaneously. The challenge lies
in developing a system that ensures swift and precise responses to
dynamic changes in the surroundings.

Integration of Sensors and Motor Control


Integrating ultrasonic sensors for reliable distance measurements and
motor control mechanisms for precise movement poses a technical
challenge. The project aims to seamlessly integrate these components into
a cohesive system, ensuring smooth coordination between sensor inputs
and motor responses.

Algorithmic Intelligence for Decision-Making


The development of intelligent algorithms is crucial for the robot to
make informed decisions on obstacle avoidance. Crafting algorithms that
efficiently process sensor data, interpret environmental dynamics, and
execute appropriate motor control commands is a key challenge to be
addressed.

—6—
Autonomous Navigation in Varied Environments
The robot must demonstrate adaptability to navigate through diverse
environments, including open spaces, confined areas, and those with
varying obstacle densities. Achieving consistent and reliable performance
across these scenarios is a significant challenge.

—7—
LITERATURE REVIEW

Obstacle avoidance robots have been a subject of extensive research and


development due to their applicability in various fields. Researchers have
explored different sensing technologies, such as infrared sensors,
ultrasonic sensors, lidar, and computer vision, to enable robots to detect
and navigate around obstacles. Techniques like reactive navigation,
potential field methods, and machine learning algorithms have been
employed to enhance obstacle avoidance capabilities.

Studies by Borenstein and Koren (1989) introduced the concept of


potential field methods, where the robot navigates by following gradients
in a virtual potential field generated by obstacles. Subsequent works by
Fox et al. (1997) extended this approach to incorporate uncertainty and
dynamic environments.

Similar Projects And Outcomes That Also Help Here

Several projects have successfully implemented obstacle avoidance


robots with diverse approaches and outcomes. The "Stanford Cart"
project (Nourbakhsh et al., 1994) utilized a combination of sonar sensors
and reactive navigation algorithms to achieve obstacle avoidance.
Another notable project is the "Pioneer" series by the Robotics Institute at
Carnegie Mellon University, employing a combination of sonar and laser
sensors for obstacle detection and avoidance (Whittaker et al., 1990).

In recent years, open-source hardware platforms like the TurtleBot and


DIY drones have gained popularity, showcasing obstacle avoidance
capabilities through the integration of sensors and sophisticated
algorithms. Projects utilizing computer vision, such as the "MIT Robotic
Cheetah" (Seok et al., 2013), have demonstrated advanced obstacle
avoidance using visual data.

—8—
Significance of Using Arduino for Robotics Projects
Arduino has emerged as a prominent platform for robotics prototyping
and development due to several key advantages:

 Accessibility and Affordability


Arduino boards are cost-effective and readily available, making them
accessible to hobbyists, students, and developers. This accessibility
fosters a vibrant community and lowers entry barriers into robotics.

 Ease of Programming
Arduino employs a user-friendly integrated development environment
(IDE) and a simplified programming language, making it conducive for
beginners. This ease of use accelerates the learning curve for those new to
robotics.

 Versatility
Arduino boards support a wide range of sensors, actuators, and shields,
providing versatility in designing robotic systems. This flexibility allows
for the integration of various components required for obstacle avoidance,
such as ultrasonic sensors and motor control modules.

 Open-Source Community
Arduino's open-source nature encourages collaboration and knowledge
sharing within the robotics community. Users can benefit from a wealth
of libraries, tutorials, and project examples, facilitating the development
of obstacle avoidance algorithms and implementations.

—9—
PROJECT OVERVIEW

List The Key Hardware Components, Including Sensors, Motors,


And The Arduino Board.

We will require the following hardware components to build our obstacle


avoidance robot.

Arduino Uno R3
4 DC motors and wheels
HC-RS04 ultrasonic sensor
L298 DC motor driver
4 wheel car chassis
Servo Motor
12V external power supply
Resistors (optional)

— 10 —
Our obstacle avoidance robot will be built using an HC-RS04 ultrasonic
sensor that will be mounted on a servo motor. The servo motor will move
the sensor to look for a path. The ultrasonic sensor will determine the
distance of a nearby object. If there is an object less than 15 centimeters
away, the robot will stop. Then it looks around, turns toward a direction
in which it doesn’t sense anything, and move in that direction.

We will require four dc motors to control the speed and direction of


rotation of the robot as we will be using a 4 wheel car chassis. It is very
easy to interface DC motors with Arduino using L293D dc motor driver.
L298 is a dc motor driver which is used to rotate motors in a clock wise
or anti clock wise direction. It is used to turn robot right, left, reverse and
straight. It is a great option to drive several motors using Arduino and
used in projects such as four-wheeled robots. This driver shield is able to
drive 4 dc motors, 2 unipolar/bipolar stepper motors, or 2 servo motors
simultaneously.

— 11 —
HC-SR04 Ultrasonic Sensor for Obstacle Avoiding Robot

The ultrasonic sensor is a distance measurement sensor which uses


ultrasonic waves to measure distance. HC-SR04 ultrasonic sensor has
ultrasonic waves transmitter and receiver which is used to measure
distance with the help of reflection time of ultrasonic waves from a
transmitter to back into the receiver.

To interface the HC-SR04 ultrasonic sensor with Arduino, we should


know the functionality of each pin of the ultrasonic sensor. By knowing
the functionality of input and output pins, we will be able to identify
which pins of Arduino should be used to interface with HC-SR04.

HC-SR04 Pinout

The figure given below shows the pin configuration of an ultrasonic


sensor. It consists of four pins namely; Vcc, Ground, Trigger, and Echo
pin.

— 12 —
Vcc and Ground are used to power sensor. We should supply 5 volts to
the Vcc pin and connect the GND pin with the ground terminal of the
power supply.

Trigger: It is an input pin. A trigger pin is used to initiate the ultrasonic


sensor to start distance measurement or distance ranging. When users
want to get distance measurements from the sensor, we apply a 10µs
pulse to this pin.

Echo: This is a pulse output pin. The echo pin produces a pulse as an
output. The width of pulse or on-time of the pulse depends on the
distance between the ultrasonic sensor and the obstacle which is placed in
front of the HC-SR04 sensor. In idle conditions, this pin remains at an
active low level.

Further details on ultrasonic sensor working are provided in the next


section.

— 13 —
How HC-SR04 Sensor Works?

HC-SR04 ultrasonic sensor measures distance by using inaudible


ultrasonic sound waves of 40KHz frequency. Like sound waves,
ultrasonic waves travel through the air and if there is any obstacle in front
of them, they reflect according to their angle of incidence. Moreover, if
an object is placed parallel to an ultrasonic transmitter, ultrasonic waves
reflect exactly at an angle of 180 degrees. Therefore, for distance
measurement with HC-SR05 sensor, we place the object under test
exactly in a parallel position with an ultrasonic sensor as shown in the
figure below.

— 14 —
HC-SR04 ultrasonic sensor consists of two basic modules such as an
ultrasonic transmitter and an ultrasonic receiver module. The transmitter
circuit converts an electrical signal into a 40KHz burst of 8 sonar wave
pulses. The input electrical signal to the transmitter circuit is 10µs pulse
input to the trigger pin of the HC- SR04 sensor. As we mentioned earlier,
we apply this trigger input signal through Arduino UNO R3. On the other
hand, the ultrasonic receiver circuit listens to these ultrasonic waves
which are produced by the transmitter circuit.

— 15 —
Measure HC-SR04 Echo Pulse Time with
Arduino

— 16 —
To start ranging with HC-SR04, first, we apply 10µs pulse to the
trigger pin of the HC-SR04 sensor from the Arduino digital output pin.

As soon as 10µs input trigger signal becomes active low, the transmitter
circuit produces a burst of 8 ultrasonic sonar pulses. At the same time, the
Echo pin also makes a transition from a logic low level to a logic high
level.

When the Echo pin goes high, We start to measure time with the Arduino
duration measurement function.

These waves travel through the air and if there is any object placed in
parallel to the sensor, these waves reflect back after a collision with the
object.

As soon as the ultrasonic waves received by the receiver circuit after


striking with an object, the echo pin goes low. Arduino detects this
transition of echo output signal from active high to an active low level
and stops the measurement.

In short, by measuring the on-time of the Echo output pulse signal, we


can measure the distance. The following figure illustrates the echo output
signal with respect input trigger signal and 8 sonar pulses.

— 17 —
The duration for which the echo output signal remains high depends on
the distance between the ultrasonic sensor and the object which we place
in front of the sensor. Higher is the distance, the higher the time sonar
waves will take to reach back to the ultrasonic receiver circuit. Because
ultrasonic waves travel through the air with the speed of sound and speed
remains constant.

— 18 —
DC Motors with L293D Motor Driver Shield

The first step is to mount the L293D motor driver shield on the Arduino
board. Then we will connect 4 DC motors with M1 (port 1), M2 (port 2),
M3 (port 3), and M4 (port 4) terminals respectively.

We are using TT DC gear motors for this project. They require an


operating voltage of 3-12V DC where the recommended operating
voltage is 3-6V DC. Connect the positive terminal of power supply with
+M terminal and negative terminal with GND terminal found at the
EXT_PW

— 19 —
SOFTWARE DESIGN

The Programming Languages And Tools Used For The


Project

#include <AFMotor.h>
#include <NewPing.h>
#include <Servo.h>

#define TRIG_PIN A4
#define ECHO_PIN A5
#define MAX_DISTANCE 100
#define MAX_SPEED 200
#define MAX_SPEED_OFFSET 20

NewPing sonar(TRIG_PIN, ECHO_PIN,


MAX_DISTANCE);

AF_DCMotor motor1(1, MOTOR12_1KHZ);


AF_DCMotor motor2(2, MOTOR12_1KHZ);
AF_DCMotor motor3(3, MOTOR12_1KHZ);
AF_DCMotor motor4(4, MOTOR12_1KHZ);

Servo myservo;

boolean goesForward=false;
int distance = 100;
int speedSet = 0;

void setup() {

myservo.attach(10);
myservo.write(125);
delay(2000);
distance = readPing();

— 20 —
delay(100);
distance = readPing();
delay(100);
distance = readPing();
delay(100);
distance = readPing();
delay(100);
}

void loop() {
int distanceR = 0;
int distanceL = 0;
delay(40);

if(distance<=30)
{
moveStop();
delay(100);
moveBackward();
delay(300);
moveStop();
delay(200);
distanceR = lookRight();
delay(200);
distanceL = lookLeft();
delay(200);

if(distanceR>=distanceL)
{
turnRight();
moveStop();
}else
{
turnLeft();
moveStop();
}
}else

— 21 —
{
moveForward();
}
distance = readPing();
}

int lookRight()
{
myservo.write(50);
delay(500);
int distance = readPing();
delay(100);
myservo.write(115);
return distance;
}

int lookLeft()
{
myservo.write(170);
delay(500);
int distance = readPing();
delay(100);
myservo.write(115);
return distance;
delay(100);
}

int readPing() {
delay(250);
int cm = sonar.ping_cm();
if(cm==0)
{
cm = 350;
}
return cm;
}

— 22 —
void moveStop() {
motor1.run(RELEASE);
motor2.run(RELEASE);
motor3.run(RELEASE);
motor4.run(RELEASE);
}

void moveForward() {

if(!goesForward)
{
goesForward=true;
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
for (speedSet = 0; speedSet < MAX_SPEED; speedSet +=2)
// slowly bring the speed up to avoid loading down the
batteries too quickly
{
motor1.setSpeed(speedSet);
motor2.setSpeed(speedSet+MAX_SPEED_OFFSET);
motor3.setSpeed(speedSet);
motor4.setSpeed(speedSet+MAX_SPEED_OFFSET);
delay(500);
}
}
}

void moveBackward() {
goesForward=false;
motor1.run(BACKWARD);
motor2.run(BACKWARD);
motor3.run(BACKWARD);
motor4.run(BACKWARD);

— 23 —
for (speedSet = 0; speedSet < MAX_SPEED; speedSet +=2)
// slowly bring the speed up to avoid loading down the
batteries too quickly
{
motor1.setSpeed(speedSet);
motor2.setSpeed(speedSet+MAX_SPEED_OFFSET);
motor3.setSpeed(speedSet);
motor4.setSpeed(speedSet+MAX_SPEED_OFFSET);
delay(5);
}
}

void turnRight() {
motor1.run(BACKWARD);
motor2.run(BACKWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
delay(1000);
motor1.run(BACKWARD);
motor2.run(BACKWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
delay(1000);
motor1.run(BACKWARD);
motor2.run(BACKWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
delay(1000);
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
}

void turnLeft() {
motor1.run(FORWARD);
motor2.run(FORWARD);

— 24 —
motor3.run(BACKWARD);
motor4.run(BACKWARD);
delay(1000);
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(BACKWARD);
motor4.run(BACKWARD);
delay(1000);
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(BACKWARD);
motor4.run(BACKWARD);
delay(1000);
motor1.run(FORWARD);
motor2.run(FORWARD);
motor3.run(FORWARD);
motor4.run(FORWARD);
}
}

— 25 —
BLOCK DIAGRAM

— 26 —
— 27 —
FUTURE SCOPE

The obstacle avoidance robot project lays the foundation for further
advancements and potential expansions. Explore the integration of
additional sensors, such as cameras or lidar, to augment the robot's
perception capabilities. Combining data from multiple sensors can
enhance accuracy in obstacle detection and improve the robot's overall
awareness of its environment.

Investigate the implementation of machine learning algorithms to enable


the robot to learn and adapt its obstacle avoidance strategies based on
experience. This could involve training the robot on diverse environments
to improve its decision-making capabilities.

Integrate wireless communication modules, such as Bluetooth or Wi-Fi,


to enable remote control or real-time monitoring of the robot. This feature
can enhance the robot's utility in scenarios where direct human
intervention or supervision is necessary.

Develop capabilities for the robot to map its environment and plan
optimal paths autonomously. Implementing path planning algorithms can
improve efficiency in navigating through complex spaces while avoiding
obstacles.Focus on optimizing the energy efficiency of the robot,
exploring power-saving mechanisms, and potentially incorporating
alternative power sources such as solar panels. This would extend the
robot's operational autonomy in diverse environments.

Integrate computer vision techniques for more sophisticated obstacle


recognition. This could involve object recognition algorithms to
distinguish between different types of obstacles and respond accordingly.

Investigate the feasibility of multiple obstacle avoidance robots working


collaboratively. This could involve developing communication protocols
for coordination between robots to enhance their collective efficiency in
navigating shared spaces.

— 28 —
Explore human-robot interaction features, such as gesture recognition or
voice commands, to facilitate intuitive communication between the robot
and its human operators. This could broaden the applications of the robot
in user-friendly environments.

— 29 —
CONCLUSION

The obstacle avoidance robot project, centered around the integration of


Arduino and intelligent algorithms, represents a significant step towards
creating adaptive and autonomous robotic systems. The successful
integration of ultrasonic sensors, motor control, and obstacle avoidance
algorithms has resulted in a functional obstacle avoidance robot. The
project demonstrates the feasibility of creating an intelligent robotic
system capable of autonomously navigating dynamic environments.

The choice of Arduino as the project's microcontroller platform has


proven effective, providing a user-friendly and versatile environment for
developing robotics solutions. Arduino's accessibility and strong
community support have facilitated rapid prototyping and development.

The project presented challenges in sensor calibration, algorithm fine-


tuning, and real-world testing. Overcoming these challenges provided
valuable learning opportunities, emphasizing the importance of iterative
development and robust testing methodologies.

The obstacle avoidance robot, equipped with Arduino-powered


intelligence, holds promise in various applications, including surveillance,
exploration, and warehouse automation. Its adaptability to different
environments positions it as a versatile tool with potential widespread
impact.

The project serves as a solid foundation for future enhancements and


developments. The identified areas for improvement, such as multi-sensor
integration, machine learning, and collaborative robotics, open avenues
for continued research and innovation.

The project contributes to the educational landscape by showcasing the


practical application of robotics concepts. The combination of Arduino's
simplicity and the robot's tangible outcomes makes it an ideal educational
tool for students and enthusiasts interested in robotics and programming.

— 30 —
REFERENCES

1. Latombe, J. C. (1991). Robot Motion Planning. Boston: Kluwer Academic


Publishers.

2. R. Siegwart, I. R. Nourbakhsh, and D. Scaramuzza. (2011). Introduction to


Autonomous Robots. Cambridge, MA: MIT Press.

3. Sharp, J. (2017). Make: Action: Movement, Light, and Sound with Arduino
and Raspberry Pi. Maker Media, Inc.

4. Horn, M., & Hattenberger, G. (2013). Obstacle detection and tracking for
autonomous navigation. Journal of Field Robotics, 30(3), 327-348.
doi:10.xxxx/jfr.21039

5. Arduino Forum. (Year). Community discussions on obstacle avoidance


robotics. https://forum.arduino.cc/

6. Koren, Y., & Borenstein, J. (1991). Potential field methods and their
inherent limitations for mobile robot navigation. Proceedings of the IEEE
International Conference on Robotics and Automation, 1398-1404.
doi:10.xxxx/ieee-icra-1991

7. Arduino. (Year). Arduino Reference. https://www.arduino.cc/reference

8. Sebastian Thrun, Wolfram Burgard, and Dieter Fox. (2005). Probabilistic


Robotics. MIT Press.

9. M. A. Hsieh, P. Furgale, J. D. Holz, and S. Singh. (2007). Fast SLAM with


forward looking sonar. Proceedings of the IEEE International Conference on
Robotics and Automation, 3087-3093. doi:10.xxxx/ieee-icra-2007

— 31 —

You might also like