With ATMega8 μc
Introduction 
This robot is designed to continuously 
follow a black line painted on a bright 
surface or a white line on a dark surface 
and take the turns along with the line 
automatically.
Hardware Components Required 
 Microcontroller development board (ATMega8) 
 IR Sensor 
 Comparator (LM358) 
 DC motor 
 Motor driver IC (L293D) 
 Wheels 
 Power adopter
ATMega8 Development Board
IR Sensors 
 IR sensors give output by receiving the reflected rays 
transmitted by the transmitting diode. 
 If the surface is black, the transmitted 
ray will be absorbed and will not be 
received and if the surface is white then 
receiver will get the reflected ray and generate output.
IR Sensor Circuit
Motor Driver IC (L293D) 
 It is required to supply sufficient 
current to motors as microcontrollers 
can’t supply that much current. 
 It is a dual H-Bridge motor 
means it can drive two DC 
motors simultaneously in both 
clockwise and anticlockwise 
direction. 
 Its input terminals are controlled 
by the microcontroller. 
It also includes the protection 
circuit against back EMF.
Block Diagram 
IR Sensor 1 
IR Sensor 2 
Variable DC 
voltage 
Compar 
ator 
Compa 
rator 
Variable DC 
voltage 
Microcont 
roller 
Motor 
with 
wheel 
Motor 
with 
wheel 
Motor 
Driver IC 
(L293D)
Overview 
AT Mega8 μc 
Chassis Board 
IR sensors 
Comparator 
(LM358) 
Voltage 
regulator IC 
Wheel 
attached 
with motor 
shaft 
DC Motor
Description 
 It works with the signal generated by the sensors. 
To follow black line, sensors are mounted in front 
of robot keeping black line in between them. 
 Each sensor has a motor associated with it. If it 
gets the reflected light(means sensors are facing 
bright background), the comparator sends logic 1 
to microcontroller and vice versa.
CONTI…. 
 The program loaded into microcontroller takes the 
decision of switching any motor ON or OFF 
according to the inputs coming from the 
comparators connected after each sensor. 
 The robot turns in the direction of the sensor 
detecting the black line, for this microcontroller 
turns ON only the motor opposite to that sensor.
Line follower robot

Line follower robot

  • 1.
  • 2.
    Introduction This robotis designed to continuously follow a black line painted on a bright surface or a white line on a dark surface and take the turns along with the line automatically.
  • 3.
    Hardware Components Required  Microcontroller development board (ATMega8)  IR Sensor  Comparator (LM358)  DC motor  Motor driver IC (L293D)  Wheels  Power adopter
  • 4.
  • 5.
    IR Sensors IR sensors give output by receiving the reflected rays transmitted by the transmitting diode.  If the surface is black, the transmitted ray will be absorbed and will not be received and if the surface is white then receiver will get the reflected ray and generate output.
  • 6.
  • 7.
    Motor Driver IC(L293D)  It is required to supply sufficient current to motors as microcontrollers can’t supply that much current.  It is a dual H-Bridge motor means it can drive two DC motors simultaneously in both clockwise and anticlockwise direction.  Its input terminals are controlled by the microcontroller. It also includes the protection circuit against back EMF.
  • 8.
    Block Diagram IRSensor 1 IR Sensor 2 Variable DC voltage Compar ator Compa rator Variable DC voltage Microcont roller Motor with wheel Motor with wheel Motor Driver IC (L293D)
  • 9.
    Overview AT Mega8μc Chassis Board IR sensors Comparator (LM358) Voltage regulator IC Wheel attached with motor shaft DC Motor
  • 10.
    Description  Itworks with the signal generated by the sensors. To follow black line, sensors are mounted in front of robot keeping black line in between them.  Each sensor has a motor associated with it. If it gets the reflected light(means sensors are facing bright background), the comparator sends logic 1 to microcontroller and vice versa.
  • 11.
    CONTI….  Theprogram loaded into microcontroller takes the decision of switching any motor ON or OFF according to the inputs coming from the comparators connected after each sensor.  The robot turns in the direction of the sensor detecting the black line, for this microcontroller turns ON only the motor opposite to that sensor.