Line follower is an autonomous robot which follows either black line in white area or white line in black area. Robot must be able to detect particular line and keep following it.
For special situations such as cross over’s where robot can have more than one path which can be followed, predefined path must be followed by the robot.
Line following is a task in which robot has to follow the line. It must be capable of taking various degrees of turns to follow the curved lines also.
Fig. 1: Prototype of LM324 IC based Line Following Robot
Image: Line Follower Robot without Microcontroller
The Line following Robot moves to follow a line drawn on the floor. This Robot follows the black line which is drawn over the white surface .The line sensors are used to sense the line. When the signal falls on the white surface, it gets reflected and if it falls on the black surface, it is not reflected this principle is used to scan the Lines for the Robot.
The Robot should be capable of taking various degrees of turns and must be insensitive to environmental factors such as lighting and noise.
Principal of Operation
Principal of operation
Fig. 2: Block Diagram of LM324 IC based Line Following Robot
Explanation of block diagram
Stage 1
Line sensor plate
Reflection of light
This stage consists of reflection of light phenomena in which light reflect from the plane surface.
LED:
LEDs are used as indicator lamps in many devices and are increasingly used for general lighting.
Long leg is positive.
Fig. 3: Image showing polarity of LED
Short leg is negative.
LDR:
A photoresistor light dependent resistor (LDR) or is a resistor whose resistance decreases as with increasing incident light intensity.
Fig. 4: Typical Image of Light Dependant Resistor (LDR)
Reflection of light on any plane surface
Fig. 5: Image showing mutual assembly of LED and LDR Sensor against a plane surface
Reflection of light on white surface is More.
Reflection of light on black surface is Less.
Line sensor
Line sensor is a combination of LDR (Light Dependent Resistor) and LED (Light Emitting Diode) which works on phenomenon of Reflection and Absorption.
White color surface reflects the most of the color falling on them while Black color surface absorbs all the light falling on them.
So, a major part of light emitted by LED is reflected by white surface and so, LDR detects it.
Image of line sensor
Fig. 6: Image of Line Sensor built using LED and LDR on a PCB
Stage 2
Logic circuit Section
Logic circuit consists of LM324 ic which is used for to generate logic signal. It take input from the line sensor and generate the output signal which is used for to drive the motors.
LM324 IC
LM324 is a 14pin IC consisting of four independent operational amplifiers (op-amps) compensated in a single package. Op-amps are high gain electronic voltage amplifier with differential input and, usually, a single-ended output. The output voltage is many times higher than the voltage difference between input terminals of an op-amp.
Pin Diagram
Fig. 7: Pin Diagram of LM324 OPAMP IC
Pin Description:
Pin No |
Function |
Name |
1 |
Output of 1st comparator |
Output 1 |
2 |
Inverting input of 1st comparator |
Input 1- |
3 |
Non-inverting input of 1st comparator |
Input 1+ |
4 |
Supply voltage; 5V (up to 32V) |
Vcc |
5 |
Non-inverting input of 2nd comparator |
Input 2+ |
6 |
Inverting input of 2nd comparator |
Input 2- |
7 |
Output of 2nd comparator |
Output 2 |
8 |
Output of 3rd comparator |
Output 3 |
9 |
Inverting input of 3rd comparator |
Input 3- |
10 |
Non-inverting input of 3rd comparator |
Input 3+ |
11 |
Ground (0V) |
Ground |
12 |
Non-inverting input of 4th comparator |
Input 4+ |
13 |
Inverting input of 4th comparator |
Input 4- |
14 |
Output of 4th comparator |
Output 4 |
Logic inverter circuit section
In this logic inverter circuit section 74HC04D IC is used for to invert the logic. The logic is given to it ’s input terminal in the form of logic 0 and logic 1.
74HC04 IC
This IC is used for to invert the logic. The input are given from the output of LM324 IC and this IC output are used for to drive the motor. It also provide buffering that is amplification for the motor driver IC.
Fig. 8: Pin Diagram of LM7404 Logic Inverter IC
Stage 4
Motor Driving Stage
In this stage the motor driver l293D IC is used for to drive the motor. As the signal comes from the inverter IC it drives the motor according to signals comes.
L293D IC
L293D is a dual H-bridge motor driver integrated circuit (IC). Motor drivers act as current amplifiers since they take a low-current control signal and provide a higher-current signal. This higher current signal is used to drive the motors.
L293D contains two inbuilt H-bridge driver circuits. In its common mode of operation, two DC motors can be driven simultaneously, both in forward and reverse direction. The motor operations of two motors can be controlled by input logic at pins 2 & 7 and 10 & 15. Input logic 00 or 11 will stop the corresponding motor. Logic 01 and 10 will rotate it in clockwise and anticlockwise directions, respectively.
Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to start operating. When an enable input is high, the associated driver gets enabled. As a result, the outputs become active and work in phase with their inputs. Similarly, when the enable input is low, that driver is disabled, and their outputs are off and in the high-impedance state.
Fig. 9: Pin Diagram of L29D Motor Driver IC
Truth table for robot Movement
Sr.No |
IN1 |
IN2 |
IN3 |
IN4 |
Movement of robot |
1 |
1 |
0 |
0 |
1 |
Forward |
2 |
0 |
1 |
1 |
0 |
Backward |
3 |
0 |
1 |
0 |
1 |
Left |
4 |
1 |
0 |
1 |
0 |
Right |
Note
You can exchange the motor wire with output pins to make the above respective movement.
Accessories Required to make line follower robot
Sr.No. |
Component Name |
Quantity |
1. |
Double AA batteries cell holder |
1 |
2. |
Chassis ( Robotic Platform) |
1 |
3 |
Breadboard |
1 |
4 |
Nipper |
1 |
5. |
Stripper |
1 |
6. |
One core wire |
1 |
7. |
Nose pliers |
1 |
8 |
Screw driver |
1 |
Mechanical assembly of robotic chassis
Step 1:
Take a robotic chassis.
Fig. 10: Representational Image of Main Chassis of Robot
Step 2:
Take the BO motor as shown in the diagram.
Step 3:
Take a M2.5 (25) screw to fit the BO motor on the chassis. Fit the motor in upward direction as shown in the figure. Here the last hole of the chassis are used to fit the motor.
Fig. 11: Image showing motor attachment to robot’s chassis
Note
Here kept the motor screw M2.5 (25) in the separate polyethene and also don’t mix it with other screw.
Fig. 12: Image showing motor attachment on both sides of robot’s chassis
Step 4
Fit the both wheel on the both motor shaft as shown in figure. Fix the motor with self tapping red wheel screw.
Fig. 13: Image showing attachment of wheels to motors on robot’
Step 5
Take the caster wheel and caster wheel strip as shown in the diagram.
Fig. 14: Representational Image of Caster Wheel and Strip for Robot
Step 6
Inset three M3 -10 screw into the caster wheel. Now fit the caster wheel into the caster wheel strip in the outward direction as shown in the figure.
Fig. 15: Image showing attachment of Caster Wheel to Strip for Robot
Step 7
Now fit the caster wheel strip on the middle position of the chassis as shown in the diagram by using two M3-10 screw.
Fig. 16: Image showing attachment of Caster Wheel strip to Chassis of Robot
Now your robotic platform is ready to be used.
Breadboard Connection
Breadboard Connection
Fig. 17: Image showing rows and columns of breadboard
· Give positive +5 volt supply in first row.
· Connect the GND in the second row of the breadboard.
· Connect + 5 volt upper row with the below row to make below line +5 volt .
· Connect the upper gnd line with the lower gnd line to make the below row gnd line.
· Short the below middle rows as connect the +5 volt to +5volt line and gnd line with the gnd line.
Fig. 18: Typical image of Breadboard
Construction of line follower robot on breadboard
· Power Supply
· Motor Driver
· Logic sensor ( Comparator + Line sensor plate)
· Inverter IC section
Power Supply
General Description
Power supply is used for to give power to the whole circuit assembly. The below component are used for to make power supply section.
Component list for power supply
Sr.No. |
Component Name |
Component list |
1 |
DC jack |
1 |
2 |
7805 voltage regulator IC |
1 |
3 |
3 mm Led |
1 |
4 |
Resistor (220 ? ) (Red, Red, Black, Black ) |
1 |
Explanation of component
Make the below connection for power supply as given in below image.
DC jack
Fig. 19: Typical Image of DC Jack
7805 Connection pin diagram
Sr .No |
7805 Pin No |
7805 Pin name |
1 |
Pin 1 |
+12 volt (Given by battery) |
2 |
Pin 2 |
Gnd |
3 |
Pin3 |
+ 5 (output to give whole circuit ) |
By referring below images you can make the power supply circuit.
1. Breadboard Image
Fig. 20: Representational Image of Power Supply Circuit on Breadboard
2. Schematic Diagram for power supply
Fig. 21: Circuit Diagram of Power Supply for Robot
3. Actual image of power Supply
Fig. 22: Image of Power Supply Circuit designed on Breadboard
Testing of power Supply Section
If the led will be glow it means the power supply circuit connection is correct. and now you can able to give power to whole the assembly.
Motor Drive Section
General Description
Now you have make a motor driver section which is used for to drive the motor. Here to drive the motor you have use L293D IC.
Component List for Motor Driver Section
Sr No |
Component Name |
1. |
L29D3 IC Section |
2. |
One core wire |
Designing of motor driver section
By referring below images and table you can make and test the motor driver section.
L293D pin connection
Sr.No |
L293 D pin |
Supply voltage |
1 |
Pin no 1 |
+5 volt |
2 |
Pin no 9 |
+5 volt |
3 |
Pin no 16 |
+5 volt |
4 |
Pin no 8 |
+12 volt |
5 |
Pin no 4 & 5 |
Gnd |
6 |
Pin no 12 & 13 |
Gnd |
Connection of Motor with L293D IC
Sr. No. |
Output pins |
Motor Wire |
1 |
o/p1 |
First wire of first motor |
2 |
o/p2 |
Second wire of first motor |
3 |
o/p3 |
First wire of second motor |
4 |
o/p4 |
Second wire of second motor |
Breadboard Image
Fig. 23: Representational Image of Motor Driver Circuit on Breadboard
Schematic image of motor driver section
Fig. 24: Circuit Diagram of L293D IC based Motor Driver
Actual image of motor driver section
Fig. 25: Image of L293D Motor Driver circuit on Breadboard
Give the below supply at input terminal of L293d IC to test the motor
Sr.No. |
Pins Name |
Given supply |
1 |
In1 |
+5 |
2 |
In2 |
Gnd |
3 |
In3 |
+5 |
4 |
In4 |
Gnd |
Note
· Short 4 (gnd) and 5 (gnd) pin with the jumper. Jumper can be taken from the wire.
· In the same way also short pin no 12 (gnd) and 13(gnd) of the l293D IC.
Testing of motor driver section
Fig. 26: Representational Image of Motor Driver Circuit on Breadboard
Step 1
Connect one wire of first motor with the o/p1 pin of L293D IC. And second one is with second o/p2 of L293D IC.
The motor should be rotate in clockwise direction from your front side. If the motor rotate in anticlockwise direction than make it in clockwise direction by exchanging it’s wire with L293 o/p pins.
Step 2
Connect one wire of second motor with the o/p3 pin of L293D IC. And second one with second o/p4 of L293D IC.
Now the motor should be rotate in anticlockwise direction from your front side. If the motor rotate in clockwise direction than make it in anticlockwise direction by exchanging it’s wire with L293D o/p pins.
Now the chassis should be moves in the forward direction.
Logic Circuit
General Discription
This section consists of two parts one is comparator section and another one is line sensor plate section.
Part 1
Comparator Section
Comparator LM324 IC is used to generate logic which is used to drive the motor and led. Here the comparator IC is used to perform comparison between the reference voltage which is set at it’s non inverting input terminal and it’s inverting terminal voltage.
Component required to make logic circuit is as given below table.
Sr.No. |
Component Name |
Quantity |
1. |
LM324 IC |
1 |
2. |
20 k preset (Metallic) |
2 |
3. |
Led ( 3mm ) |
2 |
4. |
10 k ? ( Brown, Black ,Black, Red) |
4 |
Component Explanation
20 k preset
Fig. 27: Image showing pin connections for 2K Preset
Here two potentiometer are used to set reference voltage at the non inverting terminal of pcb.
Note:
You can exchange the 5 volt and Gnd pin with each other.
LM 324 IC section
Sr.No |
Pin no |
Component Connection |
1 |
1 (Output pin) |
Negative terminal of led |
2 |
2 (Inverting pin) |
o/p of LDR sensor 1 from zero pcb |
3 |
3 (Non inverting terminal) |
o/p pin of potentiometer 1 |
4 |
4 (vcc) |
+5 volt |
5 |
11 |
GND |
6 |
14(Output pin) |
Negative terminal of led |
7 |
13 (Inverting pin) |
o/p of LDR sensor 2 from zero pcb |
8 |
12 (Non inverting terminal) |
o/p pin of potentiometer 2 |
Make also below connection
· Connect the positive terminal of both led with the one terminal of 10 k ? resistance and another terminal of resistance with the +5 volt.
· Connect the one terminal of 10 k? resistance with the pin no 2 & pin no 13 of the LM324 ic and another terminal of both resistance with the + 5volt.
· Also insert the 220 ? resistance in breadboard where it’s one terminal is connected to +5 volt and another will be connected with the Zero pcb +5 volt pin.
1. Breadboard image of logic section
Fig. 28: Representational Image of LM324 based Logic Circuit for Robot
2. Schematic layout of logic section
Fig. 29: Circuit Diagram of LM324 based Line Follower Logic Controller
3. Actual Image of comparator Section
Fig. 30: Image of LM324 based Line Follower Logic Controller
Part 2
Sensor plate section
Sensor plate section consists of two LDR sensor and two led. Make the positive terminal of led and ldr are common and negative terminal of led and LDR are common.
Note
You can connect the LDR are sensor in any way in any direction. You can use ten core wire to make connection.
Component list for sensor plate
Sr.No. |
Component Required |
Quantity |
1 |
3mm led |
2 |
2 |
LDR |
2 |
3 |
Ten core wire |
As per use |
Note
Please make the connection on the zero pcb.
Breadboard image of sensor plate
Fig. 31: Representational Image of Sensor Plate
Schematic layout for sensor plate.
Fig. 32: Circuit Diagram of Sensor Plate
Actual image of sensor plate
Fig. 33: Image of Sensor Plate used on Line Following Robot
Calibration of line sensor
Take a line sensor plate and make connection with the LM324 IC as given below.
· Here one +5 volt pin of line sensor will be connected through the 220 ? resistance on breadboard and gnd pin will be connected through gnd pin on breadboard.
· Two signal pin which are coming from two ldr sensor o/p (B & C) will be connected through lM324 pin ( 2 & 13 ).
· Now take a white paper and stretch black tape on it.
· Put the line sensor above the white sheet and perform calibration on it.
· Set the both preset in this way that both output led’s of LM324 IC will becomes on at the black surface and will becomes off on white surface as the sensor comes on the white sheet.
Note
You can set the preset by revolving it through screw driver.
· Try the above step number of times until the both led will becomes on at the black surface and remains off at the white surface.
Sr.No. |
Color |
Logic generate at LM324 output pin |
1 |
Black |
0 |
2 |
White |
1 |
Check your calibration step from below table as output generate on color.
Sr.no |
LDR_sensor1 On |
LDR_ sensor 2 On |
Led1 of LM324 IC |
Led 2 of LM324 IC
|
1 |
White |
White |
Off |
Off
|
2 |
Black |
White |
On |
Off
|
3 |
White |
Black |
Off |
On
|
4 |
Black |
Black |
On |
On
|
Inverting IC stage
Inverting IC stage of (HD74LS04) IC
General Description
This section is used for to drive the motor by converting signal into the it’s invert form. If you have give 1 on it than it’s outcome will be 0 and if you have give 0 than it’s outcomes will be 1.
Component list
Sr.No. |
Component Name |
Quantity |
1 |
HD74LS04 inverting IC |
1 |
Make connection as given below in the table and as image given below
Short the inverter( HD74LS04) IC pin with each other as given in below table
Sr. No. |
Pin of inverting IC |
Pin of inverting IC |
1 |
Pin no 1 |
Pin no 5 |
2 |
Pin no 2 |
Pin no 3 |
3 |
Pin no 14 |
Pin no 9 |
4 |
Pin no 12 |
Pin no 11 |
Breadboard Image of inverter section
Fig. 34: Representational Image of Inverter Section
Schematic image of inverter section
Fig. 35: Circuit Diagram of Inverter Section
Actual image of inverter section
Fig. 36: Image of Inverter Section used on Line Following Robot
Fully connected circuit for line follower robot
First make the connection of inverting IC with the L293D IC
Inverter IC connection with L293D IC
Sr. No. |
Pin of inverting IC |
Pin of L293D IC |
1 |
Pin no 4 |
Pin no 3 |
2 |
Pin no 6 |
Pin no 7 |
3 |
Pin no 10 |
Pin no 14 |
4 |
Pin no 8 |
Pin no 10 |
Inverter IC connection with comparator IC
Sr.No |
Output pin of LM324 IC |
Inverting pin ic no |
1 |
LM 324 o/p pin 1 ( pin no 16) |
Pin no 1 |
2 |
LM 324 o/p pin 2 ( pin no 1) |
Pin no 13 |
Breadboard and Schematic Layout
Breadboard image of complete assembly
Fig. 37: Representational Image of complete breadboard circuit for Line Follower Robot
Schematic layout of complete image
Fig. 38: Circuit Diagram of Line Following Robot
Actual Image of Complete Circuit
Fig. 39: Image of LM324 based Line Follower Logic Controller
Now connect the Motor with the L293D as given below in table.
Connection of Motor with L293D IC
Sr. No. |
Output pins |
Motor Wire |
1 |
o/p1 |
First wire of first motor |
2 |
o/p2 |
Second wire of first motor |
3 |
o/p3 |
First wire of second motor |
4 |
o/p4 |
Second wire of second motor |
Movement of robotic platform
Sr.No. |
LDR_Sensor 1 |
LDR_Sensor 2 |
Output |
1 |
White |
White |
Forward Movement |
2 |
White |
Black |
Left /Right Movement |
3 |
Black |
White |
Right/Left Movement |
4 |
Black |
Black |
Backward Movement |
Complete Assembly of Line Follower Robot
· Now take the robotic platform to fit the zero line sensor PCB on the robotic platform.
Fig. 40: Representational Image of Robot Chassis
· Take the M-60 screw and bolts to fit the zero pcb with the robotic platform.
Fig. 41: Image of screws used to fit wheels on Robot
· Take the line sensor zero pcb and make drill on it’s corner point.
Fig. 42: Image of Sensor Plate used on Line Following Robot
· Now take a robotic platform and fit the zero pcb on the robotic platform with the M-60 screw driver. The sensors direction should be in downward direction.
· Also fit the breadboard on the robotic platform. The complete assembly of the line robotic platform as given below.
Fig. 43: Image showing complete prototype of Line Follower Robot
· Also take a battery cell holder and put it on the robotic platform.
Fig. 44: Image showing Line Follower Robot in action
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.