Line Follower Robot. 03doc
-
Upload
bilal-malik -
Category
Documents
-
view
257 -
download
0
Transcript of Line Follower Robot. 03doc
-
8/19/2019 Line Follower Robot. 03doc
1/30
Line follower with arm lifter
PROJECT REPORT
Line Follower With Arm Lifter
Submitted To :
Sir Azhar Zaidi
Submitted By :
Nida Afaq 08-EE-128
Qurat ul-ain 08-EE-137
Mohsin Majeed 08-EE-17
a!za Shahid 08-EE-11"
Abstr!t:
1
-
8/19/2019 Line Follower Robot. 03doc
2/30
Line follower with arm lifter
#his $roje%t is an i!$le!entation of a line follo&in' ro(ot) &ith !odifi%ation of !etal rods
%onne%ted to it* +t senses and follo&s a $ath of &hite %olor and lifts an, (o that %o!es in its
&a,*.+/188 is the !i%ro%ontroller used *Sensors are used to dete%t the ri'ht %olor and
let the ro(ot follo& it* Sensors are also $la%ed at the ri'ht side of ro(ot) &hi%h dete%ts a jun%tion* #his ro(ot 'ies (asis for an, t,$e of ro(ot &hi%h is not re!ote %ontrolled* So it
%an (e used in an, adan%ed ro(ot &ith in%reased %o!$leit, and lar'er size*
A!"nowled#ement:
2
-
8/19/2019 Line Follower Robot. 03doc
3/30
Line follower with arm lifter
Tble Of Contents:
Pro$e!t des!ri%tion:
#he $roje%t !ainl, %o!$rises of three se%tions*
• !i%ro/ontroller se%tion
• Me%hani%al se%tion
• Sensors
3
-
8/19/2019 Line Follower Robot. 03doc
4/30
Line follower with arm lifter
&i!ro'Controller Se!tion:
#his se%tion %o!$rises of all the %odin' that is done to !a4e the ro(ot follo& the line and lift
(o*P(C )*F+,*) is the !i%ro%ontroller used* &i"roC is used for $ro'ra!!in' in /
lan'ua'e*
&i!ro!ontroller:
5ifferent !i%ro%ontrollers are aaila(le li4e Motorola)+ntel6s 802)At!el6s A)Zilo'6s Z8 and
.+/*.+/ is %hosen for this $roje%t as
• +t is %ost effe%tie*
• Soft&are and hard&are deelo$!ent tools li4e %o!$ilers) asse!(lers)
de(u''ers and e!ulators are easil, aaila(le*• +t !eets our %o!$utin' needs !ore effi%ientl,*
P(C:
.+/ has different fa!ilies 10)12)1)1")17 and 18*the, all are 8 (it
$ro%essors *data lar'er than 8 (it is (ro4en into 8-(it $ie%es to (e $ro%essed*.+/ 18
fa!il, is used as it has the hi'hest $erfor!an%e of all the fa!ilies of 8-(it .+/
!i%ro%ontrollers and it is aaila(le in 18- t$o 80- $in $a%4a'es &ith eas, !i'ration to !ore$o&erful ersion of %hi$ &ithout losin' soft&are %o!$ati(ilit,*
P(C)*F+,*:
.+/ 18 has a +S/ ar%hite%ture that %o!es &ith so!e standard features su%h as on-%hi$
$ro'ra!9%ode: ;M) data AM) data EE.;M) ti!ers )A5/ and
-
8/19/2019 Line Follower Robot. 03doc
5/30
Line follower with arm lifter
desi'nated as dd )@N5 9ss:);S/1);S/2 and M/>9!aster %lear:*in this $roje%t &e are
usin' .+/ 188 in 5+. $a%4a'in'*
&e!hni!l se!tion:
#he !e%hani%al se%tor %o!$rises of !otors) &heels) and alu!inu! sheet and ar! lifter*
#he fi'ure (elo& sho&s the full !e%hani% al stru%ture
*
&otors:
5
-
8/19/2019 Line Follower Robot. 03doc
6/30
Line follower with arm lifter
#he !otors used are the !otors of $o&er &indo& of %ar *three !otors are used in total )t&o
for !oin' the line follo&er and one is used for raisin' and lo&erin' the ar! lifter* #he
s$eed of !otor is !ore than our require!ent so it is %ou$led &ith the 'ear to in%rease the
torque and %onsequentl, redu%e the s$eed to our required leel*the out$ut of the 'ear is
%onne%ted to the shaft &hi%h is $assin' throu'h the &heels*
Rtin#s:
#he !otor is of 12 and 1* A*
Wheels:
6
-
8/19/2019 Line Follower Robot. 03doc
7/30
Line follower with arm lifter
#he &heels are !ade u$ of n,lon !aterial hain' a 'rooed surfa%e* #he &heels are
&ra$$ed &ith ru((er to redu%e the fri%tion and !oe the ro(ot easil,*
Arm lifter
+t is !ade u$ of alu!iniu! sheets and &ith the hel$ of nut it is %onne%ted to shaft of !otor*
#he ar! !oes u$ and do&n (, the %lo%4&ise and anti%lo%4&ise rotation of !otor*
s$e%ifi%ations of !otor are sa!e 912 B 1* A:
7
-
8/19/2019 Line Follower Robot. 03doc
8/30
Line follower with arm lifter
8
-
8/19/2019 Line Follower Robot. 03doc
9/30
Line follower with arm lifter
Aluminum sheets :
#he sheets used are of 1C 'ua'e*the sheet &hi%h is used to $la%e !otors and (atteries is of &idth 1" in%hes and of len'th 1C in%hes* #he alu!inu! rods &hi%h %onne%t the (ase sheet
&ith to$ sheet are of 10 in%hes* #he to$ sheet is used to $la%e ./? s*#he alu!inu! sheets
are (ended to in%rease the !e%hani%al stren'th*
Btteries:
+n this $roje%t t&o (atteries are used to $o&er the %ir%uit and these are of 12 )A=20*
9
-
8/19/2019 Line Follower Robot. 03doc
10/30
Line follower with arm lifter
Sensors:
Seen sensors are used in total* ie of the! are used to 4ee$ the ro(ot in line and t&o of
the! are used to dete%t jun%tion* #he sensin' utilizes the $ro$erties of >5s
ie sensors used are la(eled as S%) Sl ) Sl ) Sr ) Sr* +f S% and one of Sr is a%tie it !eans
ro(ot is turnin' ri'ht so s$eed of left !otor is in%reased to (rin' it (a%4 onto %enter line and
if S% and one of S l is a%tie it !eans it is turnin' to&ards left so s$eed of ri'ht !otor is
in%reased to (rin' it (a%4 onto %entre line*
Jun!tion sensor:
Sensors at jun%tion are la(eled as D l and Dr*if Dl 'ies 0 out$ut follo&ed (, 0 out$ut of j r it
!eans that ro(ot hae %rossed so!e jun%tion*
S!hemti!:
10
-
8/19/2019 Line Follower Robot. 03doc
11/30
Line follower with arm lifter
or sensor %ir%uit >M32 +/ is used* +t is a 1 $in +/) ;ut of &hi%h 3) )10)12 are in$ut $ins*
So for seen sensors t&o su%h +/s are used* #he fi'ure (elo& just sho&in' one sensor
%ir%uit* #his +/ needs s to fun%tion $ro$erl,*
PCB -esi#nin#:
./? desi'ns of $roje%t is as follo&
11
-
8/19/2019 Line Follower Robot. 03doc
12/30
Line follower with arm lifter
Al#orithm of %ro$e!t
Code:12
-
8/19/2019 Line Follower Robot. 03doc
13/30
Line follower with arm lifter
#he follo&in' %ode is used to !oe the line follo&er and lift o(je%t $la%ed at
jun%tion*
==ta4e f12hz
== for left h (rid'e E0) 1 n 50) 1
==for ri'ht (0) 1 n 52) 3
==-?rid'e
==>E#
Fdefine A .;#5*0G
Fdefine ? .;#5*1G
Fdefine / .;#E*0G
Fdefine 5 .;#E*1G
==+@#
Fdefine A2 .;#5*2G
Fdefine ?2 .;#5*3G
Fdefine /2 .;#?*0G
Fdefine 52 .;#?*1G
==fie sesors
Fdefine sll .;#A*0G
Fdefine sl .;#A*1G
Fdefine s% .;#A*2G13
-
8/19/2019 Line Follower Robot. 03doc
14/30
Line follower with arm lifter
Fdefine sr .;#A*3G
Fdefine srr .;#A*G
Fdefine jr .;#?*G
Fdefine jl .;#?*G
unsi'ned %har D0G
unsi'ned %har D>0G
oid start9:G
oid sto$9:G
oid linetr9:G
oid ar!9int:G
oid turnr'ht9:G
oid turnlft9:G
oid reerse9:G
oid r'ht"9:G
oid r'ht9:G
oid r'ht29:G
oid r'ht19:G
oid lft"9:G
oid lft9:G
14
-
8/19/2019 Line Follower Robot. 03doc
15/30
Line follower with arm lifter
oid lft29:G
oid lft19:G
==F$ra'!a %ode
==F$ra'!a interru$t !ultiH%h4Hisr
oid !ultiH%h4Hisr9:
I
if9+N#/;N*01:
I
DJJG
D>JJG
K
if 9D2 BB D>2:
I
sto$9:G
ar!91:G
start9:G
reerse9:G
+N#/;N*00G
K
15
-
8/19/2019 Line Follower Robot. 03doc
16/30
Line follower with arm lifter
if 9D BB D>:
I
sto$9:G
start9:G
&hile9.;#A*2L0:
Iturnr'ht9:GK
linetr9:G
+N#/;N*00G
K
if 9D" BB D>":
I
sto$9:G
ar!92:G
start9:G
reerse9:G
+N#/;N*00G
K
16
-
8/19/2019 Line Follower Robot. 03doc
17/30
Line follower with arm lifter
if9D8 BB D>8:
I
sto$9:G
start9:G
&hile9.;#A*2L0:
Iturnr'ht9:GK
linetr9:G
+N#/;N*00G
K
K
oid linetr9oid: I start9:G
&hile91:
I
if 9.;#A*0 1 BB .;#A*11 BB .;#A*20 BB .;#A*31 BB
.;#A*1:
I
==strai'ht
==for left !otor
.;#5*01G
.;#E*00G
.;#5*11G17
-
8/19/2019 Line Follower Robot. 03doc
18/30
Line follower with arm lifter
.;#E*10G
==for ri'ht !otor
.;#5*21G
.;#?*00G
.;#5*11G
.;#?*10G K
else if9.;#A*01 BB .;#A*11 BB .;#A*20 BB
.;#A*30 BB .;#A*1:
I
==sli'ht ri'ht
r'ht"9:G
K
else if 9.;#A*01 BB .;#A*11 BB .;#A*21 BB
.;#A*30 BB .;#A*1:
I
==!ediu! ri'ht
r'ht9:G K
else if 9.;#A*01 BB .;#A*11 BB .;#A*21 BB
.;#A*30BB .;#A*0:
18
-
8/19/2019 Line Follower Robot. 03doc
19/30
Line follower with arm lifter
I==!id etre!e ri'ht
r'ht29:G
K
else if 9.;#A*01 BB .;#A*11 BB .;#A*21 BB .;#A*31
BB .;#A*0:
I
==etre!e ri'ht
r'ht19:GK
==EN5 ; +@# #E# #
-
8/19/2019 Line Follower Robot. 03doc
20/30
Line follower with arm lifter
lft9:G
K
else if 9.;#A*00 BB .;#A*10 BB .;#A*21 BB
.;#A*31 BB .;#A*1:
I
==!ed-etre!e left
lft29:G
K
else if 9.;#A*00 BB .;#A*11 BB .;#A*21 BB
.;#A*31 BB .;#A*1:
I
==etre!e left
lft19:G
K
K
K
oid r'ht"9:
I
20
-
8/19/2019 Line Follower Robot. 03doc
21/30
Line follower with arm lifter
==hile9srL1:
.;#5*01G
.;#E*00 G
.;#5*11 G
.;#E*10G
dela,H!s9":G
.;#5*00G
==unsi'ned int e2-dG
dela,H!s92:G
K
oid r'ht9:
I
==hile9srL1:
.;#5*01G
.;#E*00 G
.;#5*11 G
.;#E*10G
dela,H!s9:G
.;#5*00G
==unsi'ned int e2-dG
21
-
8/19/2019 Line Follower Robot. 03doc
22/30
Line follower with arm lifter
dela,H!s9:G
K
oid r'ht29:
I
==hile9srL1:
.;#5*01G
.;#E*00 G
.;#5*11 G
.;#E*10G
dela,H!s92:G
.;#5*00G
==unsi'ned int e2-dG
dela,H!s9":G
K
oid r'ht19:
I
==hile9srL1:
.;#5*01G
.;#E*00 G
.;#5*11 G
22
-
8/19/2019 Line Follower Robot. 03doc
23/30
Line follower with arm lifter
.;#E*10G
dela,H!s91:G
.;#5*00G
==unsi'ned int e2-dG
dela,H!s97:G
K
oid lft9:
I
==hile9slL1:
I
.;#5*21G
.;#?*00G
.;#5*31G
.;#?*10G
dela,H!s9:G
.;#5*20G
dela,H!s9:GK
K
oid lft"9:
I
23
-
8/19/2019 Line Follower Robot. 03doc
24/30
Line follower with arm lifter
==hile9slL1:
I
.;#5*21G
.;#?*00G
.;#5*31G
.;#?*10G
dela,H!s9":G
.;#5*20G
dela,H!s92:GK
K
oid lft29:
I
==hile9slL1:
I
.;#5*21G
.;#?*00G
.;#5*11G
.;#?*10G
dela,H!s92:G
.;#5*20G
24
-
8/19/2019 Line Follower Robot. 03doc
25/30
Line follower with arm lifter
dela,H!s9":GK
K
oid lft19:
I
==hile9slL1:
I
.;#5*21G
.;#?*00G
.;#5*11G
.;#?*10G
dela,H!s91:G
.;#5*20G
dela,H!s97:GK
K
oid ar!9int a:
I
.212CG
E//.1>12CG
#+S5000G
#2/;N001G
25
-
8/19/2019 Line Follower Robot. 03doc
26/30
Line follower with arm lifter
#M20G
if9a1:
I
E//.1/;N05G
#2/;N*#M2;N1G K
if 9a2:
I E//.1/;N0/EG
#2/;N*#M2;N1G K
K
oid turnr'ht9:I
.;#5*01G .;#E*00G==># +N > S.EE5
.;#5*11G.;#E*10G
.;#5*21G.;#?*00G.;#5*11G.;#?*10G
dela,H!s91:G
.;#5*20G==r'ht 12* dut, %,%le
K
oid turnlft9:
I
.;#5*21G.;#?*00G.;#5*11G.;#?*10G==r'ht +N > S.EE5
.;#5*01G.;#E*00G.;#5*11G.;#E*10G
26
-
8/19/2019 Line Follower Robot. 03doc
27/30
Line follower with arm lifter
dela,H!s91:G
.;#5*00G==lft 12* dut, %,%le
K
oid reerse9:I
.;#5*00G .;#5*20G
.;#E*01G.;#?*01G
dela,H!s920:G
.;#E*11G.;#5*10G
.;#?*11G .;#5*10GK
oid start9:
I
.;#5*01G
.;#E*00G
.;#5*11G.;#E*10G
.;#5*21G
.;#?*00G
.;#5*11G
.;#?*10G
K
27
-
8/19/2019 Line Follower Robot. 03doc
28/30
Line follower with arm lifter
oid sto$9:I
.;#5*00G
.;#E*01G
.;#5*10G.;#E*11G
.;#5*20G
.;#?*01G
.;#5*10G
.;#?*11G
E//.1/;N000GK
oid !ain9:
I
#+S5000G
#+SE0G
+N#/;N*00G
+N#/;N*31G
+N#/;N*71G
==#M2+E1G
#+SA*"0G
#+SA*70G
28
-
8/19/2019 Line Follower Robot. 03doc
29/30
Line follower with arm lifter
#+S?*00G
#+S?*10G
#+S?*1G
#+S?*1G
#+SA*1G
#+SA*1G
#+SA*1G
#+SA*1G
#+SA*1G
linetr9:G
K
Future d.n!ements:
29
-
8/19/2019 Line Follower Robot. 03doc
30/30
Line follower with arm lifter
30