SlideShare a Scribd company logo
1 of 6
Download to read offline
1
Line Follower Robot
Using AT89S52 Microcontroller
SUBMITTED TO
Engr.Saif Uddin Hirani
SUBMITTED BY:
NAME: Danish Amin ROLL NO:BEES/S13/0161
NAME: Abdul Moiz ROLL NO:BEES/S13/0178
NAME:Hunain Shuja ROLL NO:BEES/S13/0170
NAME: Ammar Imran ROLL NO:BEES/S13/0171
DATED: 20-jan-2015
2
Sensor Circuit
The sensor part consists of a set of IR sensor pairs for the left
side and right sides. In the circuit, resistors R1 and R4 limits the
current through the illuminating LEDs.Resistors R2, R6 and R3, R5 forms
a voltage divider network together with the corresponding Ir receiver
the output of the sensor circuit is taken from the points labelled left
and right in the circuit diagram.
The table below shows the voltage at nodes left and right for the
possible orientations of the sensor module.
3
Comparator circuit.
The job of the comparator circuit is to convert analog voltage
output of the sensor into a digital format for the microcontroller to
read. The comparator circuit is built around opamp IC LM324 (IC1).
LM324 is a general purpose quad opamp.
Preset resistor R10 and R11 are used to set the 1V reference for the
left and right comparators respectively. Output from the left and right
sensors (node A and B) are connected to the non-inverting input on the
left and right comparators. Output of the left comparator is connected
to P1.o of the microcontroller and output of the right comparator is
connected to P1.1 of the microcontroller. The table given below shows
their output voltage with respect to the possible input voltage
combinations.
4
Microcontroller (AT89S52)
The task of the microcontroller here is to control the left and
right motors according to the feedback signals from the left and right
comparators so that the robot remains on the correct path (the black
line). The logic executed by the microcontroller for keeping the robot
in track is illustrated in the table below.
Optocoupler (4N25)
The Output from the microcontroller goes to the Optocoupler.
Optocoupler is used here to just protect the microcontroller from and
high voltage. In this project we used to two power supply one for
microcontroller and other for motor. Both supply are separate from each
other.
5
Motor driver circuit
The job of the motor driver circuit is to drive the motors according
to the output signals from the optocoupler. The motor driver circuit
is based on Tip142 (NPN DARLINGTON TRANSISTOR). Tip142 is a high
current (10A), high voltage (50V).
Assembly Code.
ORG 000H ;origin
MOV P1,#00000011B ;sets port 1 as input port
MOV P0,#00000000B ;sets port 0 as output port
BACK: MOV P0,#00000000B ;starts both motors
JB P1.0, LABEL1 ;branches to LABEL1 if left sensor is ON
setb P0.0 ;stops left motor
clr P0.1 ;runs right motor
ACALL WAIT1 ;calls WAIT1 subroutine
SJMP BACK ;jumps back to the BACK loop
LABEL1: JB P1.1, LABEL2 ;branches to LABEL2 if right sensor is ON
clr P0.0 ;runs left motor
setb P0.1 ;stops right motor
ACALL WAIT2 ;calls WAIT2 subroutine
SJMP BACK ;jumps back to the BACK loop
LABEL2: SJMP BACK ;jumps back to the BACK loop
WAIT1:JNB P1.0,WAIT1 ;waits until robot is back from rightward
RET ;returns from WAIT1 subroutine
WAIT2:JNB P1.1,WAIT2 ;waits until robot is back from leftward
RET ;returns from WAIT2 subroutine
END ;end statement
6
Complete circuit diagram.

More Related Content

Viewers also liked

psycology story line.pptx
psycology story line.pptxpsycology story line.pptx
psycology story line.pptx
rivenhau
 
Bhs. Indo Kelas 2 MTs Bab 6 menemukan pokok berita
Bhs. Indo Kelas 2 MTs Bab 6 menemukan pokok beritaBhs. Indo Kelas 2 MTs Bab 6 menemukan pokok berita
Bhs. Indo Kelas 2 MTs Bab 6 menemukan pokok berita
Ade Kusnadi
 
Youtube marketing for musicians
Youtube marketing for musiciansYoutube marketing for musicians
Youtube marketing for musicians
selinasimpson876
 
Qsqs 141129025329-conversion-gate01
Qsqs 141129025329-conversion-gate01Qsqs 141129025329-conversion-gate01
Qsqs 141129025329-conversion-gate01
rivenhau
 
Graficas de Funciones
Graficas de FuncionesGraficas de Funciones
Graficas de Funciones
omaar23
 
Qsqs 141129025329-conversion-gate01121212
Qsqs 141129025329-conversion-gate01121212Qsqs 141129025329-conversion-gate01121212
Qsqs 141129025329-conversion-gate01121212
rivenhau
 
Intro to Biz Topic 6 Group Activity.ppt
Intro to Biz Topic 6 Group Activity.pptIntro to Biz Topic 6 Group Activity.ppt
Intro to Biz Topic 6 Group Activity.ppt
rivenhau
 

Viewers also liked (15)

Final integrated project EPC
Final integrated project EPC Final integrated project EPC
Final integrated project EPC
 
Equip superannuation presentation to under 335YO 0914
Equip superannuation presentation to under 335YO  0914Equip superannuation presentation to under 335YO  0914
Equip superannuation presentation to under 335YO 0914
 
psycology story line.pptx
psycology story line.pptxpsycology story line.pptx
psycology story line.pptx
 
Bhs. Indo Kelas 2 MTs Bab 6 menemukan pokok berita
Bhs. Indo Kelas 2 MTs Bab 6 menemukan pokok beritaBhs. Indo Kelas 2 MTs Bab 6 menemukan pokok berita
Bhs. Indo Kelas 2 MTs Bab 6 menemukan pokok berita
 
Youtube marketing for musicians
Youtube marketing for musiciansYoutube marketing for musicians
Youtube marketing for musicians
 
Qsqs 141129025329-conversion-gate01
Qsqs 141129025329-conversion-gate01Qsqs 141129025329-conversion-gate01
Qsqs 141129025329-conversion-gate01
 
Graficas de Funciones
Graficas de FuncionesGraficas de Funciones
Graficas de Funciones
 
Qsqs 141129025329-conversion-gate01121212
Qsqs 141129025329-conversion-gate01121212Qsqs 141129025329-conversion-gate01121212
Qsqs 141129025329-conversion-gate01121212
 
Dealing with depression
Dealing with depressionDealing with depression
Dealing with depression
 
Drawing project 3(brief 2014)
Drawing project 3(brief 2014)Drawing project 3(brief 2014)
Drawing project 3(brief 2014)
 
c&c final project brief Project 3 (jan 2015) (1)
c&c final project brief Project 3 (jan 2015) (1)c&c final project brief Project 3 (jan 2015) (1)
c&c final project brief Project 3 (jan 2015) (1)
 
Cinderella
Cinderella Cinderella
Cinderella
 
Крокодил
КрокодилКрокодил
Крокодил
 
Intro to Biz Topic 6 Group Activity.ppt
Intro to Biz Topic 6 Group Activity.pptIntro to Biz Topic 6 Group Activity.ppt
Intro to Biz Topic 6 Group Activity.ppt
 
اللغة العربية للفصل الاوال
اللغة العربية للفصل الاوالاللغة العربية للفصل الاوال
اللغة العربية للفصل الاوال
 

Recently uploaded

result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Dr.Costas Sachpazis
 

Recently uploaded (20)

UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 

Line Follower Robot Using At89S52 Microcontroller

  • 1. 1 Line Follower Robot Using AT89S52 Microcontroller SUBMITTED TO Engr.Saif Uddin Hirani SUBMITTED BY: NAME: Danish Amin ROLL NO:BEES/S13/0161 NAME: Abdul Moiz ROLL NO:BEES/S13/0178 NAME:Hunain Shuja ROLL NO:BEES/S13/0170 NAME: Ammar Imran ROLL NO:BEES/S13/0171 DATED: 20-jan-2015
  • 2. 2 Sensor Circuit The sensor part consists of a set of IR sensor pairs for the left side and right sides. In the circuit, resistors R1 and R4 limits the current through the illuminating LEDs.Resistors R2, R6 and R3, R5 forms a voltage divider network together with the corresponding Ir receiver the output of the sensor circuit is taken from the points labelled left and right in the circuit diagram. The table below shows the voltage at nodes left and right for the possible orientations of the sensor module.
  • 3. 3 Comparator circuit. The job of the comparator circuit is to convert analog voltage output of the sensor into a digital format for the microcontroller to read. The comparator circuit is built around opamp IC LM324 (IC1). LM324 is a general purpose quad opamp. Preset resistor R10 and R11 are used to set the 1V reference for the left and right comparators respectively. Output from the left and right sensors (node A and B) are connected to the non-inverting input on the left and right comparators. Output of the left comparator is connected to P1.o of the microcontroller and output of the right comparator is connected to P1.1 of the microcontroller. The table given below shows their output voltage with respect to the possible input voltage combinations.
  • 4. 4 Microcontroller (AT89S52) The task of the microcontroller here is to control the left and right motors according to the feedback signals from the left and right comparators so that the robot remains on the correct path (the black line). The logic executed by the microcontroller for keeping the robot in track is illustrated in the table below. Optocoupler (4N25) The Output from the microcontroller goes to the Optocoupler. Optocoupler is used here to just protect the microcontroller from and high voltage. In this project we used to two power supply one for microcontroller and other for motor. Both supply are separate from each other.
  • 5. 5 Motor driver circuit The job of the motor driver circuit is to drive the motors according to the output signals from the optocoupler. The motor driver circuit is based on Tip142 (NPN DARLINGTON TRANSISTOR). Tip142 is a high current (10A), high voltage (50V). Assembly Code. ORG 000H ;origin MOV P1,#00000011B ;sets port 1 as input port MOV P0,#00000000B ;sets port 0 as output port BACK: MOV P0,#00000000B ;starts both motors JB P1.0, LABEL1 ;branches to LABEL1 if left sensor is ON setb P0.0 ;stops left motor clr P0.1 ;runs right motor ACALL WAIT1 ;calls WAIT1 subroutine SJMP BACK ;jumps back to the BACK loop LABEL1: JB P1.1, LABEL2 ;branches to LABEL2 if right sensor is ON clr P0.0 ;runs left motor setb P0.1 ;stops right motor ACALL WAIT2 ;calls WAIT2 subroutine SJMP BACK ;jumps back to the BACK loop LABEL2: SJMP BACK ;jumps back to the BACK loop WAIT1:JNB P1.0,WAIT1 ;waits until robot is back from rightward RET ;returns from WAIT1 subroutine WAIT2:JNB P1.1,WAIT2 ;waits until robot is back from leftward RET ;returns from WAIT2 subroutine END ;end statement