Mechatronics Mini Report 1 PDF
Mechatronics Mini Report 1 PDF
SCHOOL OF ENGINEERING
DEPARTMENT OF MECHANICAL ENGINEERING
PROJECT REPORT ON
PREPARED BY:
DIPAK KHADKA
ISHWOR ACHARYA
MANOJ RAI
NIKESH BHANDARI
UTSHAV PANDEY
DATE: 15-03-2017
ABSTRACT
The Line Following Robot Project combines mechanical, electrical and coding aspects in a single
project. It is designed to continuously follow a black line painted on a bright surface or white line
on a dark surface and take the turns along with the line automatically. For situations such as
cross over where the robot can have more than one path that can be followed, predefined path
must be followed by the robot.
Table of Content
ABSTRACT.................................................................................................................................... 2
LIST OF FIGURES ........................................................................................................................ 4
INTRODUCTION .......................................................................................................................... 5
BACKGROUND ........................................................................................................................ 5
APPLICATIONS ........................................................................................................................ 6
OBJECTIVES ............................................................................................................................. 6
LITERATURE REVIEW ............................................................................................................... 7
HARDWARE COMPONENTS REQUIRED ............................................................................ 7
ARDUINO MICRO-CONTROLLER .................................................................................... 7
IR SENSOR ............................................................................................................................ 8
COMPARATOR ..................................................................................................................... 8
DC MOTOR............................................................................................................................ 9
MOTOR DRIVING IC (L298N) ................................................................................................ 9
WHEELS .............................................................................................................................. 10
BATTERIES ......................................................................................................................... 10
JUMPER WIRES .................................................................................................................. 10
MINI BREADBOARD ......................................................................................................... 11
ARDUINO PROGRAMMING ............................................................................................. 12
CONCLUSION ............................................................................................................................. 14
REFERENCES ............................................................................................................................. 15
LIST OF FIGURES
Figure 1 Arduino micro-controller.................................................................................................. 7
Figure 2 IR Sensor .......................................................................................................................... 8
Figure 3 DC motor .......................................................................................................................... 9
Figure 4 L298N ............................................................................................................................... 9
Figure 5 Wheels ............................................................................................................................ 10
Figure 6 Jumper Wires .................................................................................................................. 11
Figure 7 Mini Breadboard ............................................................................................................. 12
INTRODUCTION
BACKGROUND
The purpose of this project is to design and fabricate a robot that is capable to follow the black
line and reach the destination. A robot is a mechanical or virtual agent, usually an electro-
mechanical machine that is guided by a computer program or electronic circuitry. Robots can be
autonomous or semi-autonomous and range from humanoids to industrial robots. By mimicking
a lifelike appearance or automating movements, a robot may convey a sense of intelligence or
thought of its own.
Many robots have been built and operated, so their technical feasibility is proven, but the
technology is still immature in nations like Nepal due to economic and technical unfeasibility.
Significant technical developments coupled with cost reduction are being achieved and it can be
expected that reliable and economically viable robots will be available in the near future.
A line follower robot is designed to continuously follow a black line painted on a bright surface
or white line on a dark surface and take the turns along with the line automatically. For situations
such as cross over where the robot can have more than one path that can be followed, predefined
path must be followed by the robot.
Basically, there are two types of line following robots, one is black line follower which follows
black line and second is white line follower which follows white line. Line follower senses the
line and run over it.
A line follower robot mainly consists of the following parts:
i) A micro-controller (the brain of the robot)
ii) Motors (to move its wheels, arms, and most movable components)
iii) Sensors (to sense the environment around it)
iv) Motor Driving IC (L298N)
v) Batteries (to power the robot)
vi) Mini Breadboard
vii) Jumper wires (for connections)
APPLICATIONS
OBJECTIVES
The main objectives of this project are as follows:
Arduino micro-controller
IR Sensor
Comparator
DC motor
Motor Driver IC (L298N)
Wheels
Batteries
Jumper Wires
Mini Breadboard
ARDUINO MICRO-CONTROLLER
An Infrared Sensor (IR Sensor) is an electronic device, that emits in order to sense some aspects
of the surroundings. An IR Sensor can measure the heat of an object as well as detects the
motion. These types of sensors measure only infrared radiation, rather than emitting it that is
called as a passive IR sensor.
This senses whether there is platform in front of the robot or an edge is arrived and sends the
appropriate signal to the comparator.
Figure 2 IR Sensor
COMPARATOR
A comparator is a device that compares two voltages or currents and outputs a digital signal
indicating which is larger.
This gets input from the sensor, compare it with predefined voltage and send logic 1 to
microcontroller if there is detected a still platform and logic 0 if edge of platform is there.
DC MOTOR
A DC motor is any of a class of rotary electrical machines that converts direct current electrical
power into mechanical power. The most common types rely on the forces produced by magnetic
fields. Nearly all types of DC motors have some internal mechanism, either electromechanical or
electronic to periodically change the direction of current flow in part of the motor.
Figure 3 DC motor
L293D is a typical Motor driver or Motor Driver IC which allows DC motor to drive on either
direction. L293D is a 16-pin IC which can control a set of two DC motors simultaneously in any
direction. It means that you can control two DC motor with a single L293D IC.
Figure 4 L298N
WHEELS
Most common wheels used in robotics is standard wheels. This type of wheels is characterized
by two degrees of freedom and can run in front and back. The angle between the robot frame and
the wheel is constant while the center of the wheel is fixed to the robot frame.
Figure 5 Wheels
BATTERIES
An electric battery is a device consisting of one or more electrochemical cells with external
connections provided to power electrical devices such as flashlights, smartphones, and electric
cars. When a battery is supplying electric power, its positive terminal is the cathode and its
negative terminal is the anode.
JUMPER WIRES
A jumper wire (also known as jump wire or jumper cable) is an electrical wire or group of them
in a cable with a connector or pin at each end (or sometimes without them) which is normally
used to interconnect the components of a breadboard or other prototype or test circuit, internally
or with other equipment or components, without soldering.
Three types of jumper wires were encountered during the project work; Male-to-Male and Male-
to-Female and Female-to-Female.
The end of the wire with external pin is considered as the male part and the other is considered as
the female part.
Figure 6 Jumper Wires
MINI BREADBOARD
ARDUINO PROGRAMMING
int lmotorf=9;
int lmotorb=8;
int rmotorf=10;
int rmotorb=11;
int lsensor;
int rsensor;
void setup()
{
pinMode(lmotorf,OUTPUT);
pinMode(rmotorf,OUTPUT);
pinMode(lmotorb,OUTPUT);
pinMode(rmotorb,OUTPUT);
pinMode(6,INPUT);
pinMode(7,INPUT);
Serial.begin(9600);
}
void loop()
{
lsensor=!digitalRead(6);
rsensor=!digitalRead(7);
Serial.print("6llll");
Serial.println(lsensor);
Serial.print("7rrrr");
Serial.println(rsensor);
if((lsensor==HIGH)&&(rsensor==HIGH))
{
//both sensors on white // go forward
Serial.println("Forward");
digitalWrite(lmotorf,HIGH);
digitalWrite(rmotorf,HIGH);
digitalWrite(lmotorb,LOW);
digitalWrite(rmotorb,LOW);
}
else if((lsensor==HIGH)&& (rsensor==LOW))
{
//right sensor on black line // turn right
Serial.println("left");
digitalWrite(lmotorf,HIGH);
digitalWrite(rmotorf,LOW);
digitalWrite(lmotorb,LOW);
digitalWrite(rmotorb,HIGH);
}
else if((lsensor==LOW)&&(rsensor==HIGH))
{
//left sensor on black line // turn left
Serial.println("right");
digitalWrite(lmotorf,LOW);
digitalWrite(rmotorf,HIGH);
digitalWrite(lmotorb,HIGH);
digitalWrite(rmotorb,LOW);
}
else
{
Serial.println("stop");
digitalWrite(lmotorf,LOW);
digitalWrite(rmotorf,LOW);
digitalWrite(lmotorb,LOW);
digitalWrite(rmotorb,LOW);
}
}
CONCLUSION
Line follower robots can be very useful as they can travel to destinations where the multiple
colored tracks are involved. Building complex robots can be difficult and challenging, but it is a
beneficial portion of engineering and technology. Here, within this course, we plan to build this
robot as it can give much information about the electronics and mechanical components
combined together.
REFERENCES
https://www.engineersgarage.com/contribution/line-follower-robot
http://www.instructables.com/id/Line-Follower-Robot/
https://create.arduino.cc/projecthub/16336/line-follower-robot-using-arduino-5f5698
http://www.circuitstoday.com/line-follower-robot-using-arduino
https://www.slideshare.net/ViswanadhIvaturi/line-following-robot-using-arduino-uno