A line-follower is an autonomous vehicle which follows a line drawn on a contrast surface, say white line on a black surface.
For many TRUE robotics competitions, which require an autonomous vehicle, a line-follower is a pre-requisite. And unbelievably, a line-follower can be constructed without using any microprocessor/controller and is a mere game of two sensors, a comparator IC, and DC motors to move your vehicle!!
Let’s see how the simplest of line followers can be constructed…
Working Principles:
__________________
A comparator can always be connected in inverting or non-inverting mode.
One i/p to a comparator is fixed, called ‘reference’ and the other i/p is dynamic.
Depending upon the mode of operation (inv/n-inv) the o/p toggles between HIGH and LOW states with the changes in i/p. As we are not using any ‘intelligent’ device such as a uC, the mode of operation of comparator depends upon the colors of the line to be followed and the surrounding surface. For example, to trace a white line on a black surface, the comparator is connected in non-inv mode. To trace a black line on a white surface, the mode of operation will be inverting!
Now about the sensors…Here we will use simple optical sensors. Generally, the problem-statement of the competition states to follow a white line on a black surface (or the other way round!). The light emitted by LED will be reflected from white color and will be absorbed by black surface. The problem statement specifies (well, it has to) the thickness of the line. In the construction of our vehicle, we ensure that the distance between the two sensor-pairs is slightly greater than the thickness of the line. The o/p of the photodiode is fed to the comparator.
Now we’ll drive the motors…Generally the dc motors are driven at 12V
and max 150mA consumption. These motors can be driven by the comparator IC through transistors used as switches! Just a trick — the o/p of the LEFT comparator (the one connected to LEFT sensor) drive the RIGHT motor and vice versa — and you are done with it!!
Here’s the working, be sure to get it— We assume that the
line-to-be-followed is between the two sensor-pairs. We also assume to follow a white line on a black surface. When the line is under LEFT sensor, the LEFT comparator will trip, giving HIGH o/p. This, in turn, drives RIGHT motor. At the same time, the RIGHT sensor will not sense any line under it and RIGHT comparator will be untripped, LOW o/p. Thus, as per our cross-connection, LEFT motor will be idle. The net effect of this operation is — the vehicle takes a LEFT TURN. As the distance between sensors and the thickness of the line differ slightly, the RIGHT sensor will be tripped (untripping the LEFT one) soon after the prev LEFT turn and the same cross-action will be repeated!!! The net result of these operations will be—the vehicle follows the line, slightly
in a zig-zag manner, but doesn’t leave the line! Well, that’s after all a line follower!!
Few hints for the actual construction—
- The o/p of comparator is connected to one end of dc motor, the other end is kept grounded.
- O/p of L339 is open-collector, may need an external pull-up resistor for proper working of transistor.
- Make sure to match current capacities of ICs, transistors and motors used. Refer datasheets widely available on internet (and on the RSC CD)
- The sensitivity can be changed by varying the ref voltage to comparators, which is necessarily identical to both comparators.
- Make sure to shield the sensors of ambient light as it will cause false triggering.
Once we construct a ‘white line follower on a black surface’ the same can be
used as ‘black line follower on white surface’ simply by connecting the other terminals of dc motors (those not connected to comparator) to +ve of supply!
Limitations of our vehicle:
__________________________
1. As it uses only two sensor-pairs, the resolution is low. It will follow a zig-zag
path about the line instead of strictly following it.
2. The ready-to-go vehicle will only love smooth curves and will necessarily fail at
sharp turns and 90deg turns.
3. As there is no ‘intelligence’, if ‘blanked out’ it will do nothing to ’search’
the line.
A small investment in power supply/batteries will make your life easier in the world of robotics
-Amey S. Deshpande



u didnt specify ehich lines it gonna follow…….will the sensors sense the side lines or the centr ones……..please reply
By: harshad on September 10, 2006
at 6:43 am
Not sure what lines you mean. Check out this link
The above article describes the second one (The Line Avoider)
By: The Co-Ordinator on September 10, 2006
at 2:49 pm
GREAT !!
By: Nikhil on September 11, 2006
at 9:10 am
hey can u suggest any measures for it to trace a right angle..i tried my luck at line tracer using your given guidelines but the vehicle failed at 90′ turn..the curvatures and discontinuity part is perfectly traced just the sharp turn is a problem…
By: krithika on September 16, 2006
at 3:48 pm
The two-sensor design actually works for right angled turns. Just make sure that the alignment of the sensors is okay and they are well spaced apart.
Also one problem seen is that the motor corresponding to the sensor under line does not stop immediately but slows down and stops. This usually is the problem for it to not trace the line at right angles while it doesn’t matter at gradual curves.
Check with your machine if this is the problem. Try increasing the weight on the motors to rectify this issue.
By: The Co-Ordinator on September 22, 2006
at 8:17 am
Iam not a COEP student, just came across the site..i have a circuit diagram for a similar line follower, only it uses a L293D connected to the output of the comparator. Does this make any difference in the working of the line follower i.e., is it more accurate at turns this way?
By: raghav on November 7, 2006
at 3:50 pm
A typical line follower robot relies on line sensors to determine its navigation. However, as the navigation requirements becomes more difficult if comes to 90 degree junction as compared to curved lines. A simple line detector sensors configuration may not function well.Different sensor configuration would effect the performance of the line follower robot.What can be done to solve this situation?Can you help me on this please.Im working on project.Thanks
By: harvin on July 23, 2007
at 6:05 pm
in your example when both sides r under the black surface both opamps will not be tripped right?.so both the wheels remain stationary how does the bot move then?
By: nick on October 31, 2008
at 4:45 pm
can i have an circuit diagram of the above said line follower
By: prateek435 on December 23, 2008
at 7:31 am
can i have a circuit diagram of the connections of the comparator and the pull up resistors.
By: ARUN on February 3, 2009
at 3:46 pm
how to constuct the followers other colours
By: ajay on August 15, 2009
at 7:12 am
pls send me thebasic block diagram of this line follower
By: rahul on August 27, 2009
at 4:30 am
send block diagram of this project
By: rahul on August 27, 2009
at 4:31 am
Hai can you send the details of line follower robot
By: JUSTIN JOSE on September 17, 2009
at 6:12 am