Introduction to Line Follower
A Line follower is a robot that automatically traces a line on the ground,
preferably a dark line on a light background or vice versa.
This in itself is a simple concept. Higher end robots like maze solvers and
micro mice have this line follower as the base.
Ok, into the line follower. The components are
1) A sensor circuit to trace the line,
2) A motor driver circuit to drive the robot thru the line, and
3) A microcontroller circuit to get input from sensor, make a decision and drive the motor based on the decision.
Sensor Circuit:
Basically two types of sensors can be used. One is based on IR (Infra red)
rays and the other is based on LDR’s (Light Dependent Resistors).
IR based sensors can be used when the line to be traced is a dark line with
a light background or vice versa. ie, the principle behind IR sensor is that,
when IR sensor emits IR rays, different colors absorb IR rays with different
affinity.
Black absorbs IR rays. White reflects IR rays. So, if IR rays fall on black,
nothing is returned. If it falls on white, everything is returned.
This is true to other dark-light pairs. If black line with yellow background is
used, black absorbs everything and yellow reflects part of the incident
energy. This can be used to differentiate the line and the background.
But if lines like yellow line with violet background is used or some other
thing where IR rays can’t provide the necessary difference, then LDR based
sensors are used. Here, the principle used is that, white light is flooded
over the line. Different colored lines reflect white light in a different way.
So, the intensity of light that falls on the LDR when it senses yellow is
different from that when it senses violet.
In an LDR, the resistance of the device changes with respect to the
amount of light that falls on it. So, with the different intensities, we can
differentiate yellow from violet.
This is the basis of selecting the type of sensor to be used. Next comes the
calibration part. Here, we use a simple circuit called a “Comparator”. A
comparator is just an Opamp with two inputs. One is an inverting input and
the other is a non inverting input. It compares the two inputs. If the
inverting input is higher, it returns zero. If the non inverting input is higher,
it returns one. Well, we can make it work the other way around to.
In a line follower, this is used as follows. We fix a threshold voltage level
and give it to the inverting input. And we give the output from the sensor
to the non inverting input. So, whenever the sensor output is higher than
the threshold voltage, the comparator output is high.
We measure the highest possible value black can give. This is the
threshold. If the sensor output is greater than the threshold, then the
sensor is on white. If it’s less than or equal to threshold, then it’s on black.
This is the algorithm we are going to use. Note that, the same is possible
while using LDR based sensors too.
Then there’s the trivial matter of the number of sensors to use. This varies
widely based on the characteristics of the line we need to follow. We’ll
discuss about this later.
Below is a simple IR based sensor circuit.
This is a simple, plain IR sensor. The one in black color is the IR emitter or IR LED. The white colored thing is the IR receiver or photodetector.
The IR LED is covered in black tape to provide shielding.
Here also, the tape is provided for shielding. This is a LDR based sensor.
This is an IR range finder. This is a sophisticated IR sensor used for range finding and route mapping. We'll discuss this later.
That's all about sensors. I thnk this is enough for now. I'll cover motors and controller in the next post. Wat say ya??
So, how was it this time?? As usual, pour in your doubts, however trivial it may seem to be. And get interested in basic electronics and brush up about simple transistors and all, because we will need those as we go further.
Till next post, then. Cheers😁😁