Copy-Project Report On Line-Following Robot 1
Copy-Project Report On Line-Following Robot 1
The content of this project has not been submitted to any university or institute for award
of any degree or diploma.
-------------------------- ----------------------
Head of Department
(Electrical Engineering)
II
A PROJECT REPORT
ON
“MOBILE ROBOT”
Session: 2020-2023
This is certifying that, we have personally worked on the dissertation entitled “MOBILE
ROBOT”. A case study and data mentioned in this report was obtained during genuine
work done and collected by us.
Any other data and information in this report, which has been collected from outside
agency, has been duly acknowledged.
STUDENTS:
------------------------------------------------
Chandan Kumar (EE-20)
------------------------------------------------
------------------------------------------------
I
ACKNOWLEDGEMENT
Who also helped me in completing my project. I came to know about so many new
things I am really thankful to them.
Secondly, I would like also like to thank my parents and friends who helped me a lot in
finalizing this project within the limited time frame.
Students:
-----------------------------------------
Chandan Kumar (EE-20)
------------------------------------------
Shanu Kumar (EE-19)
------------------------------------------
Saurav Raj (EE-08)
III
ABSTRACT
A line following robot is a type of mobile robot that is designed to follow a line or track
on the ground or other flat surfaces.
The robot is equipped with sensors that detect the line and enable the robot to stay on
track. The sensors can be either reflection or non-reflective, depending on the type of
line that robot is designed to follow.
Reflective sensors use infrared light to detect changes in reflectivity between the line and
the surrounding surface. Non-reflective sensors use a combination of light and shadow to
detect the line. Both types of sensors can be used in a variety of configurations, such as
arrays or single sensors mounted on the bottom of the robot.
The robot is typically programmed with a set of instruction that tell it how to follow the
line. This can include simple algorithms that keep robot centered on the line, or more
complex algorithms that enable the robot to adjust its speed and direction in response to
changes in the line or other environmental factors.
They are also used in robotics competitions, where teams compete to design and build
the fastest and most accurate line following robots.
IV
TABLE OF CONTENT
Declaration I
Certificate II
Acknowledgement III
Abstract IV
Table of Content V
List of Figures VI
Reference VII
2.4 IR sensors 9
2.5 Lithium-ion Batteries 10
2.6 Cost of Components 11
3.2 Code 13
*****
LIST OF FIGURES
1. INTRODUCTION 1-4
1.11 INDUSTRIAL ROBOT 2
1.12 HUMANOID 2
1.21 A MOBILE ROBOT 3
1.31 LINE-FOLLOWING ROBOT 4
*****
VI
CHAPTER 1
INTRODUCTION
Robots are machines designed to carry out specific tasks. They can range in size from
small, handheld devices to large industrial machines. They are typically composed of
several components, such as sensors, actuators, and controllers.
There are different types of robot, each designed to perform specific functions. Some
of the most common types of robots include industrial robots, service robots, medical
robots, and humanoid robots.
Industrial robots are used in manufacturing to perform tasks such as welding,
painting, and assembly.
Services robots are used in a variety of industries to perform tasks such as cleaning,
cooking, and security.
Medical robots are used in healthcare to assist with surgery and other medical
procedure.
Humanoid robots are designed to look and behave like humans, and they are often
used in research and entertainment.
1
Fig- 1.11 Industrial Robot
2
1.2 MOBILE ROBOTS
A mobile robot is type of robot that is designed to move around and perform tasks in
different environments. These robots are equipped with wheels or tracks that allow
them to navigate through various surfaces and terrains.
In summary, mobile robots are an essential tool for various applications and
industries, and their importance is expected to grow with the advancement of
technology.
3
1.3 LINE-FOLLOWING ROBOT
The line-following process typically involves using a sensor to detect the line, then
sending a signal to the microcontroller to adjust the direction of the robot. The robot
can be programmed to follow different types of lines, including straight lines, curves,
and even intersections.
There are many different types of sensors that can be used for line following,
including infrared sensors, reflective sensors, and color sensors. Each type of sensor
has its own strengths and weaknesses, and the choice of sensor depends on the
specific application.
*****
4
CHAPTER 2
The board comes with 14digital input/output pins, 6analog input pins, a 16MHz quartz
crystal, a USB connection, a power jack, and a reset button. The digital pins can be used
for controlling LEDs, motors, and other electronic components, while the analog pins
can be used for reading values from sensors such as temperature, light, and sound
sensors.
The board can be programmed using the Arduino Integrated Development Environment
(IDE), which is available for free on the C++ programming language and allows users to
write and upload code to the board via the USB connection.
Arduino Uno can be used for wide range of projects, from simple LED blinking to more
complex projects such as robotics, home automation, and Internet of Things (IoT)
applications. Its versatility, ease of use, and low cost has made it popular choice among
hobbyists and professionals alike.
5
2.2 BO MOTOR AND WHEELS
BO (Brushed DC) motors and wheels are commonly used in robotics and other
mechatronic applications. Brushed DC motors are simple and efficient, consisting of a
rotor, a stator, and a commutator that switches the direction of current flow in the rotor
windings to create rotation.
BO motors are available in a variety of sizes and torques ratings, making them suitable
for a wide range of applications. They can be controlled using various techniques such as
pulse width modulation (PWM), which allows for precise speed control, and H-bridge
circuits, which enable the motor to rotate in both directions.
Wheels are essential component of BO motor system, providing traction and support for
the robot or vehicle. Wheels can be made from various materials such as plastic, rubber,
or metal, can have different sizes and shapes depending on the application.
In robotics, BO motor and wheels are often used in mobile robots, such as rovers, and
drones, to provide propulsion and maneuverability. The wheels can be attached directly
to the motor shaft, or indirectly through gears or pulleys to increase torque or adjust the
speed.
6
2.3 L298 MOTOR DRIVER
The L298 motor driver is a popular choice for controlling motors in robotics applications
due to its ability to control the speed and direction of DC motors and stepper motors.
Here are some key points to consider when using L298 in a robot applications.
i. Dual H-bridge: The L298 consists of two H-bridge circuit, which means it can
control two motors independently. This is useful in robotics application where
multiple motors need to be controlled.
ii. High current handling: The L298 can handle up to 2A of currents per channel,
which makes it suitable for driving motors of different sizes.
iii. Input signals: The L298 can be controlled using various input signals, including
digital logic signals, PMW signals, and analog voltage signals. This makes it
easy to interface with microcontroller and other electronic components
commonly used in robotics.
iv. Protection features: The L298 includes built-in protection features such as
thermal shutdown, over-current protection, and under-voltage lockout. These
features protect the motor driver and the motors from damage due to excessive
current or voltage.
v. Easy to use: The L298 is easy to use and requires minimal external components
to get started. This makes it a popular choice for hobbyists and beginners who
want to experiment with robotics.
Overall, the L298 is a reliable and versatile motor driver that can be used in a variety of
robotics applications. It provides high current handling, protection features, and easy
interfacing with microcontrollers, making it a popular choice for hobbyist and
professionals alike.
7
Fig 2.31 A L298 MOTOR DRIVER
8
2.4 IR SENSORS
In a line-following robot, IR sensors are commonly used to detect a line on the ground
and guide the robot along its path. IR sensors can detect changes in reflectivity between
the line and the surface of the ground, and the robot can use this information to stay on
the line.
Typically, the IR sensors are positioned underneath the robot, close to the ground, and
space a certain distance apart. The number of sensors and their positioning can vary
depending on the specific robot and the complexity of the line to be followed.
The sensors work by emitting infrared light and measuring the amount of light reflected
back. The reflectivity of the surface of the ground changes depending on the color of the
line, and the sensors can detect this change in reflectivity.
The output of the sensor is then processed by a microcontroller or other control system,
which can make decisions about how to adjust the robot’s movement based on the sensor
readings. For example, if the robot senses that, it is moving too far to the right of the line,
t may adjust its movement to the left to get back on track.
Overall, IR sensors are a popular choice for line-following robots because they are
relatively inexpensive and can provide accurate readings even in low-light environments.
However, they may be less effective on surfaces with low reflectivity, such as black or
very dark lines, and may require some calibration and adjustment to work effectively in
different environments.
9
2.5 Li-Ion Battery of Robots
A line following robot is a type of mobile robot that is designed to follow a line or a path,
usually using sensors to detect the line or path and make necessary adjustments to stay
on course. Lithium-ion batteries are commonly used in line following robots because
they are lightweight, rechargeable, and have a high energy density, making them ideal
for powering small, mobile devices like robots.
One of the primary advantages of using a lithium-ion battery in a line following robot is
its ability to provide a consistent and reliable source of power. Lithium-ion batteries can
deliver a steady voltage output over a long period of time, which is essential for ensuring
that the robot can follow the line accurately and reliably.
In addition, lithium-ion batteries are generally much lighter than other types of batteries,
which is important for mobile robots that need to be agile and maneuverable. This makes
them ideal for line following robots, which often need to be able to navigate tight turns
and narrow paths.
Overall, a lithium-ion is a great choice for powering a line following robot because of its
reliability, consistency, and lightweight design. By using a lithium-ion battery, designers
can create robots that are efficient, fast, and agile, with the ability to navigate complex
paths and obstacles with ease.
10
2.6 COST OF COMPONENTS
*****
11
CHAPTER 3
3.1 CONNECTION
12
3.2 PROGRAMMING / CODE
// Define the pins used for the L298 motor driver module
13
void setup() {
pinMode(ENA, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
pinMode(ENB, OUTPUT);
pinMode(IR_LEFT, INPUT);
pinMode(IR_RIGHT, INPUT);
analogWrite(ENA, 0);
analogWrite(ENB, 0);
void loop() {
14
// Determine the motor speeds based on the sensor readings
int speed_left = 0;
int speed_right = 0;
speed_left = MAX_SPEED / 2;
speed_right = MAX_SPEED;
speed_left = MAX_SPEED;
speed_right = MAX_SPEED / 2;
} else {
speed_left = MAX_SPEED;
speed_right = MAX_SPEED;
analogWrite(ENA, speed_left);
analogWrite(ENB, speed_right);
15
// Set the motor directions
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
This code is for a line-following robot using two IR sensors, a L298 motor driver, and an
Arduino Uno.
In the setup function, the pins for the L298 motor driver and IR sensors are defined as
either input or output pins using the pinMode() function. The motor speeds are set to
zero using analogWrite().
In the loop function, the values of the IR sensors are read using analogRead(). Based on
the sensor readings, the code determines the appropriate motor speeds and directions. If
the left sensor sees the line, the robot turns left by setting the left motor speed to half the
maximum speed and the right motor speed to the maximum speed. If the right sensor
sees the line, the robot turns right by setting the left motor speed to the maximum speed
and the right motor speed to half the maximum speed. If neither sensor sees the line, the
robot goes straight by setting both motor speeds to the maximum speed.
The motor speeds are then set using analogWrite() and the motor directions are set using
digitalWrite(). The robot will continue to follow the line until the program is stopped or
the robot is turned off.
*****
16
SUGGESTION FOR FUTURE WORK
Advanced Sensors: Consider using advanced sensors like LiDAR, Infrared (IR)
sensors, or Time-of-Flight (ToF) sensors to improve the accuracy and reliability
of the line-following mechanism.
Machine Learning: Implement machine learning algorithms such as
Convolutional Neural Networks (CNN) or Support Vector Machines (SVM) to
improve the line-following algorithm's accuracy, adaptability, and robustness.
Obstacle Detection: Incorporate obstacle detection sensors like ultrasonic
sensors, infrared sensors, or LiDAR to detect obstacles along the robot's path and
avoid them.
Localization and Mapping: Implement localization and mapping techniques
like Simultaneous Localization and Mapping (SLAM) to enable the robot to
navigate through complex environments and map its surroundings.
Autonomous Navigation: Add autonomous navigation capabilities to the robot
using Artificial Intelligence (AI) and Reinforcement Learning (RL) algorithms to
enable it to navigate and follow a line without human intervention.
Communication and Control: Implement wireless communication and control
mechanisms such as Bluetooth, Wi-Fi, or Zigbee to enable remote control and
monitoring of the robot's activities.
Power Management: Implement efficient power management techniques like
energy harvesting or rechargeable batteries to extend the robot's runtime and
increase its operational efficiency.
Modularity and Scalability: Design the robot in a modular and scalable way so
that it can be easily modified or expanded to accommodate new sensors,
controllers, or actuators for future applications.
*****
17
REFERENCE
https://www.google.com/search?q=connection+diagram+of+line+following+robo
t+using+4+motor%2C+2+Iar+sensor&rlz=1CDGOYI_enIN955IN955&oq=conne
ction+diagram+of+line+following+robot+using+4+motor%2C+2+Iar+sensor&aq
s=chrome..69i57.19571j1j7&hl=en-GB&sourceid=chrome-mobile&ie=UTF-
8#imgrc=NZSeus5cLUVJNM&lnspr=W10=
https://blog.technavio.org/blog/top-21-companies-in-the-industrial-robotics-
market
https://www.electronicshub.org/arduino-line-follower-robot/
https://robu.in/product/bak-nmc-18650-2500mah-8c-lithium-ion-battery/
https://robu.in/product/ir-infrared-obstacle-avoidance-sensor-module/
https://robocraze.com/products/100-rpm-dual-shaft-bo-motor-straight
https://www.flipkart.com/ds-robotics-wheels-bo-motors-robot-durable-rubber-
tyre-wheel-65mmx30mm-dc-motor-pack-4-educational-electronic-hobby-
kit/p/itm9847cae421c95
https://chat.openai.com/chat
*****
VII