You are on page 1of 45

MOHD.

KAMAL BIN HAT


JKM PSAS
What is a line follower?
Line follower is a machine that can follow a
path. The path can be visible like a black
line on a white surface (or vice-versa) or it
can be invisible like a magnetic field.
Sensing a line and maneuvering the robot to stay
on course, while constantly correcting
wrong moves using feedback mechanism forms a
simple yet effective closed loop
system. As a programmer you get an opportunity
to teach the robot how to follow the line thus
giving it a human-like property of responding to
stimuli.
Practical applications of a line follower :
Automated cars running on roads with
embedded magnets; guidance system for
industrial robots moving on shop floor etc.
Knowledge of basic digital and analog
electronics.
(A course on Digital Design and Electronic
Devices & Circuits would be helpful)
C Programming
Sheer interest, an innovative brain and
perseverance!
Input:
What type of line detection sensors? White
light, LEDs, infrared, or ???
How many sensors?
What sensor configuration? Straight line? Vee?
Inverted Vee?
How do light readings get relayed to the MPU
in a useful form?
Digital, analog?
What processor to use? (PIC18F8680
Predetermined)
What programming language? (C with a little
assembler predetermined)
What line following algorithm to use???
(Depends on the sensor arrangement.)
DC motors, servos or stepper motors?
Voltage and power (battery) requirements??
Will there be one power supply or two?
What about motor speed control issues?
Steering!?! Two wheels and a caster yes, but
motor control?
PID Steering control or not?

Power supply or supplies, when determined
will have a big effect on mass. Batteries:
Probably the heaviest part of the robot. How
to factor this in?
1. Microcontroller
2. Motor Driver
3. Sensors
4. Batteries
5. Mechanical parts
i. wheels


When we say motor, we actually mean D.C.
motor.
There are different types of DC motors
available in the market such as DC geared
motor, servo motor and stepper motor, but
for this project, we will be focusing on DC
motor.
To move the motor, just connect the power
supply to the terminal on the motor while to
move it in
opposite direction, change the polarity of the
connection between the power supply and the
terminal. For this line following robot, we will
be using two motors
In a line following robot, usually the motor is
powered by a different source from the main
circuit the motor will move faster and more
powerful.
From the schematics below, you can see that
there is 6 pins connected to the
microcontroller and 2 pins to each motor. Out
of which is the microcontroller. Therefore, an
additional component is required to enable
the microcontroller to control the motors.
From the 3 pins, 2 pins is for the direction of
the motor and 1 pin (connected to Pin C1 or
C2) is for PWM which is to control the speed
of the motor.

WHAT IS PWM..?
(Pulse Width Modulation) A modulation
technique that uses a digital circuit to create a
variable
analog signal. PWM is a simple concept: open
and close a switch at uniform, repeatable
intervals.
For this project, we will be using three pairs
of IR sensors which will be attached to the
bottom of the robot. These 3 sensors will be
classified as left sensor, middle sensor and
right sensor.
A view of the placement of the sensors is as
above
The distance between 2 sensor depends on
the width.
The sensor should be placed in such a way
that maximum distance of two sensors is
equal to the width of the line as shown in
figure below.
This is the concept of a line following robot. We
can see that when the middle sensor detects the
line, the
robot will move forward.
This is because the line is in the center of the
robot. But when the left sensor or the right
sensor detects the black line, this means that the
robot have strayed from the line.
If the robot strayed to the right, the left sensor
will detect the line and the brain will react by
turning left to go back to the line.
As for the right sensor, it reacts in the opposite
way.



TQ

You might also like