0% found this document useful (0 votes)
7 views13 pages

Projects 2

This document outlines the design and implementation of an obstacle avoidance robot using an Atmega 328P microcontroller and ultrasonic sensors for navigation. The robot autonomously detects and avoids obstacles, utilizing a servo motor for precise movement and a motor driver for controlling its motion. Testing results indicate the robot achieves high accuracy in obstacle detection and avoidance across various environments.

Uploaded by

gaurishanker9162
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views13 pages

Projects 2

This document outlines the design and implementation of an obstacle avoidance robot using an Atmega 328P microcontroller and ultrasonic sensors for navigation. The robot autonomously detects and avoids obstacles, utilizing a servo motor for precise movement and a motor driver for controlling its motion. Testing results indicate the robot achieves high accuracy in obstacle detection and avoidance across various environments.

Uploaded by

gaurishanker9162
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

To design a circuit for Robot for Object

Avoidance using Microcontroller


IMPLEMENTATION OF AN OBSTACLE AVOIDANCE ROBOT
FOR SURVEILLANCE

Abstract
This project is aimed at implementing an obstacle avoidance robot using
ultrasonic sensor mounted on a servo motor for its movement and
navigation without damaging itself. Atmega 328P microcontroller is
used to achieve the desired operation and Arduino software was used
to carry out the programming. The word “Robot” simply means any
man-made machine that can perform work or other actions normally
done by humans, either automatically or by remote control.
Robotics is the blend of computational intelligence and physical
machines (motors). In this project differential drive method will be
used as the obstacle avoidance algorithm and the algorithm is
implemented in the main microcontroller which is on the mobile robot.
The Algorithm implemented is used to avoid the obstacle and to drive
the robot to a locally generated goal. The use of servomotor provides
great precision rotation as a scanner mechanism for the ultrasonic
sensor. This autonomous robot, successfully maneuvered in
any given environment without collision, the hardware used in this
project is commonly available and inexpensive which makes the robot
easily replicable.

Keywords: Ultrasonic Sensor, Microcontroller, Robotics.


1. Introduction

Robotics Evolution: Robots, derived from the Czech word "robota"


meaning "forced labor," are machines designed to perform hazardous
tasks, such as in automotive plants, hospitals, and military operations.

Key Functionality: Obstacle detection and avoidance are essential for


enabling robots to navigate autonomously while adhering to positional
constraints.

Demand and Applications: The rise of unmanned vehicles in military and


urban settings has highlighted the need for advanced obstacle
avoidance systems.

Historical Milestones: Advances like the mobile nursing robot (1988) and
sensor- driven navigation have revolutionized robotic capabilities.

Autonomous Intelligence: Robots equipped with sensors and


algorithms can operate in unstructured environments without human
intervention.

Sensors' Role: Ultrasonicsensors are widely used for their reliability


and efficiency in sensing environmental data despite dust, dirt, and
moisture.
Research Objective: Develop a robot that merges obstacle avoidance
and path
planning using ultrasonic sensors and a random walk algorithm
for efficient
navigation.

2. Robotics and Robots

• Definition: Robotics involves designing, constructing, and


operating robots using computer systems for sensory, control,
information processing, and feedback.
• Knowledge Requirements: Combines mechanics, electronics,
and
programming to create automated machines.
• Applications: Robots replace humans in hazardous
environments or
manufacturing, mimicking human-like behavior and appearance

Types of Robots:
3.Components of Obstacle Avoidance Robots

Power Supply Unit: Provides necessary energy to the


system

Sensing Unit: Detects obstacles using sensors like


ultrasonic or
infrared.

Controller Unit: Processes data and commands robot


actions.

Motor Driver Unit: Drives motors for movement


based on controller inputs

Figure 1: interconnection diagram of obstacle


avoidance robot.
3.1 Power Supply Unit: Lithium-Ion Battery:
Lithium-ion (Li-ion) batteries, known for their high energy density, are
the primary power source for portable electronics. Over decades,
advancements in materials science and electrochemistry have made
these batteries more robust, enabling faster and safer charging.
Modern Li-ion batteries follow a precise charging regimen: starting
with a constant current phase until the voltage reaches 4.1–4.2 V, then
transitioning to a constant voltage phase to prevent overcharging.
Features like “pre-conditioning” for deeply discharged batteries and
improved ion mobility enhance safety, longevity, and performance,
making Li-ion batteries a reliable choice for today’s devices.

Figure 2: Power Supply Unit


3.2 The Servo Motor
Servo motors serve as rotary actuators, enabling precise control
over angular
position, velocity, and acceleration in robots based on input from
ultrasonic sensors. Their built-in control circuit provides feedback on
the shaft's current position, ensuring highly accurate rotation.
Servo motors are ideal for rotating objects to specific angles or
distances. They
consist of a simple motor coupled with a servo mechanism. When
powered by a DC supply, they are referred to as DC servo motors, and
when powered by an AC
source, they are called AC servo motors. Besides these primary
categories, servo
motors are further classified based on gear arrangements and
operating
characteristics.
A typical servo motor includes a gear system that delivers high
torque while maintaining a compact and lightweight form. These
attributes make them suitable
for diverse applications such as toy cars, RC helicopters and planes, and
robotics.
3.2.1 The Working Principle of a Servo Motor
A servo motor operates through a combination of components, including
an electric motor (either DC or AC), a potentiometer, a gear assembly,
and a control circuit. The gear assembly reduces the motor's speed
while increasing torque, essential for precise movements. The system
begins with the potentiometer at a neutral position, generating no
electrical output. When an external electrical signal is applied to the
error detector amplifier, the difference between this signal and the
feedback from the potentiometer is processed. This difference, known as
the error signal, acts as the motor’s input, causing it to rotate.
As the motor shaft turns, it moves the potentiometer, which generates
a feedback signal proportional to its angular position. The motor
continues to rotate until the potentiometer's output matches the
external signal. At this point, the error signal becomes zero, stopping
the motor. This feedback mechanism ensures precise positioning and
control.
Servo motors, such as the MG995 Metal Gear Servo Motor commonly
used in RC cars, humanoid robots, and other applications, are easy to
interface with an MCU. They have three wires: two for power supply
(positive and negative) and one for the control signal from the MCU.
This straightforward design, combined with robust performance, makes
servo motors indispensable in robotics and automation.

Figure 3: Pictorial view of Servo motor


Servo Motors and Their Operation:
Servo motors operate on a +5V supply rail and use PWM
(Pulse Width Modulation) for precise angular control. Each servo motor
has three wires: two for power supply (positive and negative) and one
for the control signal sent from the MCU. When using more than
two servo motors, a proper servo shield is necessary to manage
the current consumption efficiently.
The motor's rotation is determined by the PWM signal's pulse width.
A pulse is
sent every 20 milliseconds, with its duration dictating the motor's
position. For instance, a 1 ms pulse rotates the motor to 0°, a 1.5
ms pulse sets it to 90° (neutral position), and a 2 ms pulse
rotates it to 180°. Depending on the manufacturer, some motors
can rotate up to 210°.
Internally, the servo motor consists of a DC motor, a potentiometer,
and gears.
The high speed of the DC motor is reduced by the gears to
increase torque, ensuring greater force with limited movement. The
potentiometer, connected to the motor shaft, provides feedback to the
control circuit, which adjusts the motor's position to match the desired
angle.
Servo motors are highly versatile and essential for applications
requiring precise
movements. However, proper current management and
careful design considerations, such as using shields, are necessary
when integrating multiple servo motors into a system.

Figure 4: Servo Motor Rotational Operation


3. Microcontroller
A single-board microcontroller coordinates and controls the servo
motor and
ultrasonic sensor functions. It provides angular information to the
servo motor, enabling the robot to move in a specified direction,
while synchronizing sensor operations in relation to that direction.
The Arduino microcontroller drives the motors based on sensor
outputs, facilitating precise control and movement.

4. Motor Driver
The motor driver is based on the L298 motor shield, designed for
driving DC and
stepper motors. This module addresses the insufficient voltage and
current supply of the Arduino by amplifying its output to drive the
motors effectively. The Arduino
sends commands to the motor driver, which then controls the motors
to move in
the desired direction.
The microcontroller connects the ultrasonic sensor, servo motor, and
motor driver
in a coordinated system. It reads digital inputs from the
ultrasonic sensor, processes them, and sends signals to the motor
driver and servo motor. The
ultrasonic sensor emits sound waves, detects echoes from objects
within a specific
range, and calculates the time for the signal to return. Using this
data, the microcontroller determines the distance of obstacles,
enabling the robot to move right or left to avoid collisions.

5. Acrylic Sheet
Acrylic sheets are used to construct the robot's body due to their
excellent physical properties and performance characteristics.
Lightweight yet highly durable, acrylic sheets also provide excellent
insulation, protecting the robot's electronic and electrical
components from potential electrical hazards
.
6. Wheels
Wheels form the final stage of the drivetrain, providing the primary
means of propulsion for the robot. Larger-diameter wheels cover more
distance per motor
revolution compared to smaller ones, resulting in greater speed at the
same motor RPM. The choice of wheel size directly affects the
robot's speed and range,
Figure 5: Wheels

4. Methodology
This research focuses on the hardware and software
implementation for an obstacle-avoidance robot. The methodology
includes designing, assembling, and programming the robot using
specified components for efficient obstacle detection and avoidance.

1. Hardware Implementation
The hardware implementation is based on carefully selected
components to meet the requirements of the ultrasonic
sensor and robot specifications. These
components include the Arduino Uno microcontroller, ultrasonic
sensor, motor
driver, servo motor, lithium battery, acrylic sheets, and wheels.

1. Arduino Uno Microcontroller


The Arduino Uno, powered by the ATmega328P microcontroller,
serves as the central processing unit for this project. Its primary
functions are:

5. Reading Digital Input: It processes the digital signals received from the
ultrasonic
sensor, which detects obstacles.

2. Sending Control Signals: It sends commands to the motor driver for the
correct
positioning of the servo motors, ensuring accurate robot navigation.
4.1.2 Motor Driver:

The L298N motor driver module, used in this research, is a high-


power driver designed to control DC and stepper motors. It integrates
an L298 motor driver IC, a 78M05 5V voltage regulator, capacitors,
resistors, a power LED, and a 5V jumper in a compact module. This
driver can manage up to four DC motors or two DC motors with both
directional and speed control. When the power supply is
≤12V, the 5V voltage regulator powers the internal circuitry, and the 5V
pin can be
used to power the microcontroller. For supplies greater than 12V, the
jumper is
removed, and an external 5V source must be supplied. The module's
ENA and ENB pins control the speed of Motor A and Motor B, while the
IN1, IN2, IN3, and IN4 pins manage the direction of both motors.
This versatile motor driver is essential for the precise control of the
robot’s movement.

Figure 6: Motor Driver Circuit Diagram


Ultrasonic sensor is the main component that causes the vehicle to avoid obstacle. This
sensor is mounted on the servo motor to scan it environment for possible obstacle location.

Figure 7: Ultrasonic Sensor


The HC-SR04 ultrasonic sensor uses sonar to determine distance to an object like bats do. It
offers excellent non-contact range detection with high accuracy and stable readings in an
easy-to-use package. It comes complete with ultrasonic transmitter and receiver modules.
The transmitter (trig pin) sends a signal: a high-frequency sound. When the signal finds an
object, it is reflected
and the transmitter (echo pin) receives it. The time between the transmission and reception of
the signal allows us to calculate the distance to an object. This is possible because we know
the sound’s velocity in the air.

10 cm

Figure 8: Object distance from the sensor

For example, if the object is 10 cm away from the sensor as shown in figure 8, and the speed of the sound is
340 m/s or 0.034 cm/μs the sound wave will need to travel about 294μ seconds.
Distance =
294μs
Speed
That is, Time = =
10
0.034
Figure 9: The flow chart representation for an obstacle
avoidance robot.
9V

MOTOR 1

ULTRASONIC
SENSOR
MCU MOTOR
MOTOR 2
ATMEGA DRIVER

SCANNING 328P L293D


MOTOR 3
SERVO MOTOR

MOTOR 4

Figure 10: The Hardware Implementation of an obstacle avoidance


Robot.

5.Testing and Results


Several testing process was conducted ranging from the component testing and
implementation stage. i.Bread boarding testing: In this method components were used in
real time hardware to do the circuit interconnections without soldering work. The purpose
for this type of testing is to conduct testing for every stages of the design work, to see if
they will respond to the design intentions.
ii. Component testing: Involves testing each individual component, checking to see whether the
component values are correct.

A Testing of Equipment
Electronic test equipment’s are used to create signals and capture responses from the device under test.
There are various types of test equipment used during for this research work. The following are the type of
test tools used to create stimulus for the circuit under test.
i. Power supply unit.
ii. Signal generator.
iii. Pulse generator.
While digital multi-meter was used to capture the responses from the test conducted.

5.2 Testing Procedures


The work was tested after the construction was completed; the testing procedure is as follows:
iii. After the construction work was done continuity testing was carried out using digital multi-meter,
to check for possible short circuits.
ii. After this procedure dc power was applied, the voltage across the PSU was tested using multi-
meter to see if the supply is at the rated volt.
5.3 Performance evaluation
Table 1: Performance evaluation table
Type of Obstacle Detect obstacle Avoid obstacle Accuracy(%)
Environment
Well-lighted room Solid objects Yes Yes 98%

Dark room Solid and semi Yes Yes 80%


solid objects
Semi-lighted room Solid objects Yes Yes 90%
scattered
Clear terrain Solid objects Yes Yes 98%
Unclear terrain Tightly clustered Yes No 47%
objects

6.0 Conclusion
The implementation of obstacle avoidance was constructed with the aid of an ultrasonic sensor that helps to
sense the environment and giving back report to microcontroller (Ardino-uno) with the help of the written
program language in the Microcontroller unit. The robot was able to produce the basic walking movements
using DC motors capable of sensing obstacle and perfectly maneuvering obstacles on its path at a distance
range of 30cm. the robot uses the left, right, forward and backward movement to avoid the obstacle
autonomously. The accuracy recorded from several testing trials showed that the robot performed well scoring
85% considering the scope under which it was examined.

You might also like