(FIRE FIGHTING ROBOT Design) 1 DECLARATION I hereby declare that the project work entitled (!ire !i"htin" #obot $e%i"n&) i% an authentic record o' my own work carried out a% re(uirement% o' )ap%tone Project 'or the award o' de"ree o' *-tech M-tech +)+ 'rom ,o-ely Pro'e%%ional .ni-er%ity/ Pha"wara/ under the "uidance o' (Mr0 1*2I32+4 4.M1# 3#I513T151)/ durin" January to May/ 2011)0 (3i"nature o' %tudent) 6ame o' 3tudent% (1) P1641J 376I #e"i%tration no8-90:00;00<= (2) 16I#.$2 616$1 #e"i%tration no8-90:00;00>< (9) 6ITTI6 321#M1 #e"i%tration no8-90:00;00>9 $ate8 2=-0?-2011 Thi% i% to certi'y that the abo-e %tatement made by the %tudent i% correct to the be%t o' my knowled"e and belie'0 (Name : Mr. ABHISHEK KUMAR SRIVASTAVA) Facu!" Me#!$r 2 ACKNO%LED&EMENT There are numerou% per%on% we would like to thank 'or their contribution to our team@% %ucce%% in the !ire !i"htin" robot0 6othin" concrete can be achie-ed without an optimal combination o' in%piration and per%piration0 6o work can be accompli%hed without takin" the "uidance o' the eApert%0 It i% only the criti(ue% 'rom in"eniou% intellectual% that help tran%'orm a product into a (uality product0 It ha% been "ood to work on thi% project and a "reat eAperience in it%el'0
Name $' S!u(e#!% (1) P1641J 376I #e"i%tration no8-90:00;00<= (2) 16I#.$2 616$1 #e"i%tration no8-90:00;00>< (9) 6ITTI6 321#M1 #e"i%tration no8-90:00;00>9 Pr$)ramme 8-*-tech M-tech +)+ Sec!*$# 8-B:;M1 LOVEL+ PROFESSIONAL UNIVERSIT+ INDE, 9 $eclarationCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC2 1cknowled"ementCCCCCCCCCCCCCCCCCCCCCCCCCCCCC9 -. Pr$'*e $' !.e Pr$/em ? To de%i"n and con%truct a !ire-!i"htin" #obot which would eAtin"ui%h multiple candle% or match %tick% whil%t a-oidin" any ob%tacle% in the robot@% path0 Thi% project wa% a "roup project and wa% to be completed be'ore the end date o' 2= May 20110 The main %tructure o' the robot wa% made o' li"ht aluminum plate0 The dri-e line wa% pro-ided by two low %peed motor% with connected "earboAe% and two #) wheel%0 De decided on !I#+ 3+637#(thermi%tor) %en%or% to pro-ide the di%tance we were 'rom object%0 The brain% o' our robot were pro-ided by a microcontroller 0 +ach member o' the "roup wa% allocated a di''erent %ection o' the project to complete0 De had allocated time% to work on the project in the lab0 The %ection% we %plit the robot up into were// Mechanical/ +lectrical and 'inal the 3o'tware0 The%e area% are di%cu%%ed in "reater detail in the report0 De belie-e the 'actor% in'luencin" the %ucce%% o' the robot were "ood teamwork and %tartin" the project a% %oon a% practically po%%ible0 7n completion o' the initial pro"rammin" o' the robot we had a te%tin" proce%% to undertake0 The initial te%tin" wa% conducted in %ta"e%0 !ir%tly we needed to "et the ob%tacle a-oidance workin" a% re(uired then we incorporated the 'lame detection circuit at a later date0 De conducted a 'ine tunin" %e%%ion where we adju%ted our code to en%ure the robot@% %en%or% were operatin" a% e''iciently a% po%%ible0 De encountered numerou% problem% with the con%truction o' our robot0 De had wheel% %lippin" on the %ha't under load/ the %en%or wire% mo-in" durin" operation (thu% not "i-in" a correct readin") and %tability problem% a% we only u%ed two wheel% to dri-e the robot0 1ll problem% were o-ercome in the later %ta"e% o' then project0 E0*1!*#) S"1!em I#!r$(uc!*$# = Thi% year the project wa% to de%i"n and build a !ire-!i"htin" #obot0 The robot wa% re(uired to mo-e around ob%tacle% and detect and eAtin"ui%h %mall 'ire%/ which were %imulated by candle%0 The robot% were re(uired to be built by the end o' %eme%ter one with a competition a"ain%t the other "roup% a% a 'inal a%%e%%ment0 1% to buildin" the robot it%el' we were al%o re(uired to complete a report 'or our robot0 The%e were to "i-e "reater eAplanation o' the de%i"n and con%truction pha%e% o' the robot a% well a% to -i%ually %how dia"ram% o' the robot we con%tructed0 Pr$2ec! S3ec*'*ca!*$#1 Initially there were a number o' %peci'ication% that needed to be met in order to %ucce%%'ully complete the project0 The 'ire 'i"htin" robot we produced wa% de%i"ned/ built and operated with the%e project %peci'ication% in mind0 The%e %peci'ication% are li%ted below8 E The !ire-!i"htin" #obot i% a "roup project - "roup% are to be cho%en by the %tudent% with a maAimum o' 'i-e in each "roup0 E The robot i% to be autonomou% when in run mode/ and no human inter-ention i% to take place throu"hout the entire a%%e%%ment time0 E The robot i% re(uired to 'ind and eAtin"ui%h two candle% randomly placed on any %ur'ace0 E The robot i% to implement ob%tacle a-oidance at all time% whil%t trackin" and eAtin"ui%hin" the candle%0 E The robot i% not to u%e any de%tructi-e method% to eAtin"ui%h the candle0 The candle i% not to be touched by the robot at any time durin" the a%%e%%ment0 E The %iFe and the dimen%ion% o' both the robot and candle% i% determined by u%0 O/2ec!*4e Many hou%e 'ire% ori"inate when %omeone i% either %leepin" or not home %o our objecti-e i%8- To a-oid the dama"e cau%ed by 'ire0 MinimiFe the air pollution ROBOTICS: : BASIC STRUCTURE OF ROBOTICS 1 mechanical de-ice that %ometime% re%emble% a human and i% capable o' per'ormin" a -ariety o' o'ten compleA human ta%k% on command or by bein" pro"rammed in ad-ance i% de'ined a% a #7*7T 1 #obot ne-er become% 'ul'ill until it can take deci%ion%0 De can@t "o 'or computer% 'or the computation G intelli"ence0 *ut we can u%e %in"le chip microcontroller% 'or controllin"0 Thi% robot i% not "oin" to do any bi" ta%k% there will only be prede'ined ta%k%0 The robot@% 'ull control i% embedded into one chip which i% otherwi%e known a% embedded %y%tem% de%i"nin"0 To make a robot we mu%t %urely know to at lea%t u%e a %in"le microcontroller0 3o let u% %ee about +mbedded 3y%tem thru <0=10 %.a! *1 O3e# S+STEM5 1n open %y%tem i% the normal de%ktop computer where you can u%e it 'or any ta%k%0 I' you want to proce%% teAt document% you can in%tall M%-word i' you want to %end mail you can u%e outlook eApre%% and count% on0 %.a! *1 Em/e((e( S"1!em 5 1n embedded %y%tem i% the %y%tem where you can u%e it 'or a %peci'ic ta%k0 ; 678- MICROCONTROLLER In 1><1/ Intel )orporation introduced an <-bit microcontroller called the <0=10 Thi% microcontroller had 12< byte% o' #1M/ ?4 byte% o' on-chip #7M/ two timer%/ one %erial port/ and 'our port% (each <-bit% wide) all on a %in"le chip0 The <0=1 i% an <-bit proce%%or/ meanin" that the )P. can work on only < bit% o' data at a time0 $ata lar"er than < bit% ha% to broken into <-bit piece% to be proce%%ed by the )P.0 The <0=1 ha% a total o' 'our IH7 port%/ each < bit% wide0 1lthou"h the <0=1 can ha-e a maAimum o' :?4 byte% o' on-chip #7M/ many manu'acturer% ha-e put only ?4 byte% on the chip0 There are di''erent 'la-or% o' the <0=1 in term% o' %peed and amount o' on-chip #7M/ but they are all compatible with the ori"inal <0=1 a% 'ar a% the in%truction% are concerned0 The -ariou% member% o' the <0=1 'amily are <0=1 microcontroller/ <0=2 microcontroller and <091 microcontroller0 *lock $ia"ram <
*lock dia"ram o' in%ide the microcontroller <0=1 <0=1 Microcontroller The <0=1 i% the ori"inal member o' the <0=1 'amily0 !i"ure 201 %how% the block dia"ram o' the <0=1 microcontroller0 The 1T<>)=1 i% a low-power/ hi"h-per'ormance )M73 <-bit microcomputer with ?4 byte% o' !la%h pro"rammable and era%able read only memory (P+#7M)0 The de-ice i% manu'actured u%in" 1tmel@% hi"h-den%ity non-olatile memory technolo"y and i% compatible with the indu%try-%tandard M)3-=1 in%truction %et and pin out0 The on-chip !la%h allow% the pro"ram memory to be repro"rammed in-%y%tem or by a con-entional non-olatile memory pro"rammer0 *y combinin" a -er%atile <-bit )P. with !la%h on a monolithic chip/ the 1tmel 1T<>)=1 i% a power'ul microcomputer which pro-ide% a hi"hly-'leAible and co%t-e''ecti-e %olution to many embedded control application%0 The 1T<>)=1 pro-ide% the 'ollowin" %tandard > 'eature%8 ?4byte% o' !la%h/ 12< byte% o' #1M/ 92 IH7 line%/ two 1:-bittimerHcounter%/ 'i-e -ector two-le-el interrupt architecture/ a 'ull dupleA %erial port/ and on-chip o%cillator and clock circuitry0 In addition/ the 1T<>)=1 i% de%i"ned with %tatic lo"ic 'or operation down to Fero 're(uency and %upport% two %o'tware %electable power %a-in" mode%0 The Idle Mode %top% the )P. while allowin" the #1M/ timerHcounter%/ %erial port and interrupt %y%tem to continue 'unctionin"0 The Power-down Mode %a-e% the #1M content% but 'reeFe% the o%cillator di%ablin" all other chip 'unction% until the neAt hardware re%et0 Pin $e%cription 5)) 3upply -olta"e0 B6$ Bround0 10 Pin dia"ram 'or microcontroller <0=1 Port 0 Port 0 i% an <-bit open-drain bi-directional IH7 port0 1% an output port/ each pin can %ink ei"ht TT, input%0 Dhen 1% are written to port 0 pin%/ the pin% can be u%ed a% hi"h-impedance input%0 Port 0 may al%o be con'i"ured to be the multipleAed low- order addre%%Hdata bu% durin" acce%%e% to eAternal pro"ram and data memory0 In thi% mode P0 ha% internal pull-up%0 Port 0 al%o recei-e% the code byte% durin" !la%h pro"rammin"/ and output% the code byte% durin" pro"ram -eri'ication0 +Aternal pull-up% are re(uired durin" pro"ram -eri'ication0 Port 1 11 Port 1 i% an <-bit bi-directional IH7 port with internal pull-up%0 The Port 1 output bu''er% can %inkH%ource 'our TT, input%0 Dhen 1% are written to Port 1 pin% they are pulled hi"h by the internal pull-up% and can be u%ed a% input%0 1% input%/ Port 1 pin% that are eAternally bein" pulled low will %ource current (II,) becau%e o' the internal pull-up%0 Port 1 al%o recei-e% the low-order addre%% byte% durin" !la%h pro"rammin" and -eri'ication0 Port 2 Port 2 i% an <-bit bi-directional IH7 port with internal pull-up%0 The Port 2 output bu''er% can %inkH%ource 'our TT, input%0 Dhen 1% are written to Port 2 pin% they are pulled hi"h by the internal pull-up% and can be u%ed a% input%0 1% input%/ Port 2 pin% that are eAternally bein" pulled low will %ource current (II,) becau%e o' the internal pull-up%0 Port 2 emit% the hi"h-order addre%% byte durin" 'etche% 'rom eAternal pro"ram memory and durin" acce%%e% to eAternal data memory that u%e% 1:- bit addre%%e% (M75I J$PT#)0 In thi% application/ it u%e% %tron" internal pull-up% when emittin" 1%0 $urin" acce%%e% to eAternal data memory that u%e% <-bit addre%%e% (M75I J #I)/ Port 2 emit% the content% o' the P2 3pecial !unction #e"i%ter0 Port 2 al%o recei-e% the hi"h-order addre%% bit% and %ome control %i"nal% durin" !la%h pro"rammin" and -eri'ication0 Port 9 Port 9 i% an <-bit bi-directional IH7 port with internal pull-up%0 The Port 9 output bu''er %can %inkH%ource 'our TT, input%0 Dhen 1% are written to Port 9 pin% they are pulled hi"h by the internal pull-up% and can be u%ed a% input%0 1% input%/ Port 9 pin% that are eAternally bein" pulled low will %ource current (II,) becau%e o' the pull-up%0 Port 9 al%o %er-e% the 'unction% o' -ariou% %pecial 'eature% o' the 1T<>)=1 a% li%ted below8 12 Table 201'unction o' port 9 Port 9 al%o recei-e% %ome control %i"nal% 'or !la%h pro"rammin" and -eri'ication0 #3T #e%et input0 1 hi"h on thi% pin 'or two machine cycle% while the o%cillator i% runnin" re%et% the de-ice0 1,+HP#7B 1ddre%% ,atch +nable output pul%e 'or latchin" the low byte o' the addre%% durin" acce%%e% to eAternal memory0 Thi% pin i% al%o the pro"ram pul%e input (P#7B) durin" !la%h pro"rammin"0 In normal operation 1,+ i% emitted at a con%tant rate o' 1H: the o%cillator 're(uency/ and may be u%ed 'or eAternal timin" or clockin" purpo%e%0 6ote/ howe-er/ that one 1,+ pul%e i% %kipped durin" each acce%% to eAternal $ata Memory0 I' de%ired/ 1,+ operation can be di%abled by %ettin" bit 0 o' 3!# location <+20 Dith the bit %et/ 1,+ i% acti-e only durin" a M75I or M75) in%truction0 7therwi%e/ the pin i% weakly pulled hi"h0 3ettin" the 1,+-di%able bit ha% no e''ect i' the microcontroller i% in eAternal eAecution mode0 P3+6 Pro"ram 3tore +nable i% the read %trobe to eAternal pro"ram memory0Dhen the 1T<>)=1 i% eAecutin" code 'rom eAternal pro"ram memory/ P3+6 i% acti-ated twice each machine cycle/ eAcept that two P3+6 acti-ation% are %kipped durin" each acce%% to eAternal data memory0 +1H5PP +Aternal 1cce%% +nable0 +1 mu%t be %trapped to B6$ in order to enable the de-ice to 'etch code 'rom eAternal pro"ram memory location% %tartin" at 00002 up to !!!!20 6ote/ howe-er/ that i' lock bit 1 i% pro"rammed/ +1 will be internally latched on re%et0 +1 %hould be %trapped to 5)) 'or internal pro"ram eAecution%0 Thi% pin al%o recei-e% the 12--olt pro"rammin" enable -olta"e (5PP) durin" !la%h pro"rammin"/ 'or part% that re(uire 12--olt 5PP0 IT1,1 Input to the in-ertin" o%cillator ampli'ier and input to the internal clock operatin" circuit0 IT1,2 19 7utput 'rom the in-ertin" o%cillator ampli'ier0 7%cillator )haracteri%tic% IT1,1 and IT1,2 are the input and output/ re%pecti-ely/ o' an in-ertin" ampli'ier which can be con'i"ured 'or u%e a% an on-chip o%cillator/ a% %hown in !i"ure 10 +ither a (uartF cry%tal or ceramic re%onator may be u%ed0 To dri-e the de-ice 'rom an eAternal clock %ource/ IT1,2 %hould be le't unconnected while IT1,1 i% dri-en a% %hown0 )ry%tal 7%cillator )onnection% There are no re(uirement% on the duty cycle o' the eAternal clock %i"nal/ %ince the input to the internal clockin" circuitry i% throu"h a di-ide-by-two 'lip-'lop/ but minimum and maAimum -olta"e hi"h and low time %peci'ication% mu%t be ob%er-ed0 Pro"rammin" o' Microcontroller <0=1 De are u%in" embedded ) pro"rammin" lan"ua"e to pro"ram the central unit i0e0 microcontroller <0=1/ %o that it per'orm% the %peci'ic ta%k accordin" to the re(uirement0 6eed o' ) )ompiler produce% heA 'ile that we download into #7M o' microcontroller0 The %iFe o' heA 'ile produced by compiler i% one o' the main concern% o' microcontroller pro"rammer% 'or two rea%on%8 Microcontroller ha% limited on -chip #7M The code %pace 'or <0=1 i% limited to :? 4* Pro"rammin" in a%%embly lan"ua"e i% tediou% and time con%umin"0 ) i% a hi"h le-el pro"rammin" lan"ua"e that i% portable acro%% many hardware architecture%0 1? 3o 'or 'ollowin" rea%on% we u%e ) It i% ea%ier and le%% time con%umin" to write in ) than a%%embly0 ) i% ea%ier to modi'y and update0 Kou can u%e code a-ailable in 'unction librarie%0 ) code i% portable to other microcontroller% with little or no modi'ication0 De u%e re"=10h a% a header 'ile a% Linclude Mre"=10hN&0 The%e 'ile% contain all the de'inition% o' the <0)=1 re"i%ter%0 Thi% 'ile i% included in your project and will be a%%embled to"ether with the compiled output o' your ) pro"ram0 B$c9 D*a)ram 1= Se#1$r1 3ar!:: T.e IR Se#1$r It i% the %ame principle in 1,, In'ra-#ed %en%or%0 The ba%ic idea i% to %end in'ra red li"ht throu"h I#-,+$%/ which i% then re'lected by any object in 'ront o' the %en%or0 1: Then all you ha-e to do i% to pick-up the re'lected I# li"ht0 !or detectin" the re'lected I# li"ht/ we are "oin" to u%e a -ery ori"inal techni(ue8 we are "oin" to u%e another I#-,+$/ to detect the I# li"ht that wa% emitted 'rom another led o' the eAact %ame typeO Thi% i% an electrical property o' ,i"ht +mittin" $iode% (,+$%) which i% the 'act that a led Produce a -olta"e di''erence acro%% it% lead% when it i% %ubjected to li"ht0 1% i' it wa% a photo-cell/ but with much lower output current0 In other word%/ the -olta"e "enerated by the led% canPt be - in any way - u%ed to "enerate electrical power 'rom li"ht/ It can barely be detected0 thatP% why a% you will notice in the %chematic/ we are "oin" to u%e a 7p-1mp (operational 1mpli'ier) to accurately detect -ery %mall -olta"e chan"e%0 1; Dhen the %en%or i% controlled by a microcontroller to "enerate the low duty cycle pul%e%/ you can bene'it 'rom the 2i"h and ,ow pul%e% to be able to detect any 'al%e readin"% due to ambient li"ht0 Thi% i% done by recordin" 2 di''erent output% o' the %en%or/ one o' them durin" the 76 pul%e (the %en%or i% emittin" in'ra red li"ht) and the other durin" the 7!! time0 and compare the re%ult%0 The Idea i% enli"htened by thi% "raph/ where in the 'ir%t period/ there i% low ambient noi%e/ %o the microcontroller record% a Q1Q durin" the on cycle/ meanin" that an object re'lected the emitted I# ,i"ht/ and then the microcontroller record% a Q0Q meanin" that durin" the 7!! time/ it didnPt recei-e anythin"/ which i% lo"ic becau%e the emitter ,+$ wa% 7!!0 *ut %tudy the %econd period o' the "raph/ where the %en%or i% put in a hi"h ambient li"ht en-ironment0 1% you can %ee/ the the microcontroller record% Q1Q in both condition% (7!! or 76)0 Thi% mean% that we canPt be %ure whether the %en%or reception wa% cau%ed by an object that re'lected the %ent I# li"ht/ or it i% %imply recei-in" too much ambient li"ht/ and i% "i-in" Q1Q whether there i% an ob%tacle or not0 The 'ollowin" table %how the po%%ible outcome% o' thi% method0 7utput recorded durin"8 3o'tware ba%ed deduction 7n plu%e 7'' time 1 0 There i% de'initely an 7b%tacle in 'ront o' the %en%or 1 1 The %en%or i% %aturated by ambient li"ht/ thu% we canPt know i' there i% an ob%tacle 0 0 There i% de'initely 6othin" in 'ront o' the %en%or/ the way i% clear 0 1 Thi% readin" i% un lo"ical/ there i% %omethin" wron" with the %en%or0 1< FIRE SENSOR(!.erm*1!$r):: 2ow doe% it operateR .%ually the temperature %en%or produce% a -olta"e %i"nal that increa%e% a% the temperature increa%e%0 The in-erted temperature %en%or (cold %en%or) produce% a -olta"e %i"nal that increa%e% a% the temperature decrea%e%0 I' the temperature %en%or i% bein" u%ed with a di"ital proce%% unit then it need% to be 'ollowed by a comparator or 3chmitt in-erter to "i-e a %harp chan"e o' %i"nal 'rom low to hi"h0 6ormal circuit In-erted circuit The temperature %en%in" circuit u%e% an 6T) (ne"ati-e-temperature coe''icient) thermi%tor to monitor temperature0 The re%i%tance o' a 6T) thermi%tor 'all% a% it% temperature increa%e%0 )lick on the circuit dia"ram to download a ,i-ewire 'ile o' the circuit that you can in-e%ti"ate and add to your own circuit0 The temperature %en%or circuit i% a potential di-ider who%e output -olta"e i% determined by the upper and lower part% o' the circuit0 In the normal circuit/ the thermi%tor i% placed in the upper hal' o' the potential di-ider0 In the in-erted circuit/ the thermi%tor i% placed in the lower hal' o' the potential di-ider0 1> 20 6. DC &EAR MOTOR The two type% o' motor@% that you are likely to u%e in robotic ad-enture are $) motor% and #) %er-o motor%0 The mo%t common motor 'or robotic% i% the $) "ear motor/ which work% by "earin" down a 'a%t $c motor to make the motor turn at a %lower %peed and "i-e the motor a hi"her tor(ue %uitable 'or robot locomotion0 1 dc "ear motor i% ba%ically a re"ular $) motor with a %pecial "ear boA attached to the output %ha't 0 Kour robot electrical dri-e circuitary can control the dc "ear motor to rotate the wheel% o' your robot 'or locomotion0 Kou can "et a $) motor without a "ear head/ but "enerally the%e are too 'a%t ( around 1=/000 #PM)0 !or a robot to mo-e at a rea%onable rate you ha-e to "ear down a $) motor to about 90 to <0 #PM 0 Dhen you "ear down a $) motor/ you "et a %lower %peed and plenty o' tor(ue0 H BRID&E CIRCUIT. 7ne o' the mo%t popular motor controller circuit% i% an 2 brid"e circuit0 1n 2 brid"e circuit turn% a motor on and o''/ allow% a computer or proce%%or to control a motor@% direction and re"ulate %peed/ and may e-en pro-ide a breakin" mechani%m 0 1 dc "ear motor@% rotation direction i% u%ually controlled with an 2 brid"e circuit0 1 proce%%or can not control a motor directly 'or a %e-eral rea%on%0 !ir%t/ a computer doe%not output enou"h power to dri-e a motor0 3econd/ a computer cannot control direction becau%e it ha% only output%0 Third/ motor% are noi%y electrically %peakin"/ and would (uickly dama"e a computer 0 e%%entially/ the computer %end%/ %i"nal% to the 2 brid"e to tell it to "o 'orward/ re-er%e/ brake or add %peed0 The 2 brid"e then %tep% up the -olta"e and power 'or the motor0 The 2 brid"e circuit% al%o i%olate% the computer or proce%%or 'rom de%truti-e -olta"e %pike% and noi%e/ which ari%e maily 'rom motor%0 In addition to u%in" an 2 brid"e circuit/ you mi"ht want to ha-e two %et% o' batterie%8 one 'or your electronic% and another 'or your motor%0 21
T.e H:Br*()e C*rcu*! Thi% circuit known a% the 2-brid"e (named 'or it% topolo"ical %imilarity to the letter Q2Q) i% commonly u%ed to dri-e motor%0 In thi% circuit two o' 'our tran%i%tor% are %electi-ely enabled to control current 'low throu"h a motor0
22 oppo%ite pair o' tran%i%tor% (Tran%i%tor 7ne and Tran%i%tor Three) i% enabled/ allowin" current to 'low throu"h the motor0 The other pair i% di%abled/ and can be thou"ht o' a% out o' the circuit0 *y determinin" which pair o' tran%i%tor% i% enabled/ current can be made to 'low in either o' the two direction% throu"h the motor0 *ecau%e permanent-ma"net motor% re-er%e their direction o' turn when the current 'low i% re-er%ed/ thi% circuit allow% bidirectional control o' the motor0 T.e H:Br*()e ;*!. E#a/e C*rcu*!r"
29 It %hould be clear that one would ne-er want to enable Tran%i%tor% 7ne and Two or Tran%i%tor% Three and !our %imultaneou%ly0 Thi% would cau%e current to 'low 'rom Power S to Power - throu"h the tran%i%tor%/ and not the motor%/ at the maAimum current-handlin" capacity o' either the power %upply or the tran%i%tor%0 Thi% u%ually re%ult% in 'ailure o' the 2-*rid"e0 To pre-ent the po%%ibility o' thi% 'ailure/ enable circuitry a% depicted in !i"ure i% typically u%ed0 In thi% circuit/ the internal in-erter% en%ure that the -ertical pair% o' tran%i%tor% are ne-er enabled %imultaneou%ly0 The +nable input determine% whether or not the whole circuit i% operational0 I' thi% input i% 'al%e/ then none o' the tran%i%tor% are enabled/ and the motor i% 'ree to coa%t to a %top0 *y turnin" on the +nable input and controllin" the two $irection input%/ the motor can be made to turn in either direction0 6ote that i' both direction input% are the %ame %tate (either true or 'al%e) and the circuit i% enabled/ both terminal% will be brou"ht to the %ame -olta"e (Power S or Power - / re%pecti-ely)0 Thi% operation will acti-ely brake the motor/ due to a property o' motor% known a% back em'/ in which a motor that i% turnin" "enerate% a -olta"e counter to it% rotation0 Dhen both terminal% o' the motor are brou"ht to the %ame electrical potential/ the back em' cau%e% re%i%tance to the motorP% rotation0 S$'!;are De1*)# 2? Har(;are Dr*4er1 S3ec*'*ca!*$#1 The hardware dri-er% are the low-le-el portion% o' the robot@% code0 The purpo%e o' the%e dri-er% i% to pro-ide a hardware to %o'tware inter'ace that enable% acce%% to %uch hardware a% the %en%or and motor% 'rom within the beha-ioural code0 The %peci'ication% 'or the%e 'unction% were determined by the %o'tware de-elopment team be'ore the codin" proce%% %tarted0 Thi% wa% to en%ure that the code would be compatible between the upper and lower layer% o' %o't-ware0 7nly two main hardware dri-er% were nece%%ary 'or thi% project0 In addition to the%e dri-er% %e-eral internal routine% were written to handle %uch thin"% a% timer interrupt% and M). initialiFation0 Thi% 'unction i% the low-le-el dri-er that communicate% with the di%-tance %en%or% and load% "lobal -ariable% with the returned re%ult%0 Thi% dri-er i% re%pon%ible 'or initialiFin" the %en%or% 'or each readin"/ takin" the readin"%/ proce%%in" them/ and then loadin" them 'or u%e by the hi"her le-el %o'tware0 It had been our under%tandin" that the I# 3en%or% returned a binary -alue that repre%ented a di%tance0 De al%o eApected that thi% relation%hip would be linear0 10 Tabulate the relation%hip 'or a ran"e o' mea%ured di%tance% 20 Braph thi% relation%hip 90 .%e mathematical %o'tware to model the "raph a% an e(uation ?0 Put thi% e(uation and it% parameter% into the code and per'orm the con-er%ion 'or each o' the three %en%or% Mec.a#*ca C.a11*1 S3ec*'*ca!*$#1 !ir%tly we needed to analy%e what the robot needed to achie-e and how we were to de%i"n and build a cha%%i% to meet tho%e re(uirement%0 De decided to keep the robot cha%%i% a% %imple a% po%%ible to achie-e the ta%k% it needed to0 De di%cu%%ed the %peci'ication% o' the robot and came to a number o' 2= conclu%ion%0 The robot needed to be8 li"ht in wei"ht/ %mall and an ea%y %hape to mo-e around the table and a-oid ob%tacle% and cheap to manu'acture0 Initial concept% De had two initial idea% 'or the %hape o' the cha%%i%0 The 'ir%t wa% a rectan"ular plat'orm with two dri-e wheel% and a pi-ot bearin" at the rear0 SOFT%ARE DETAILS 3o'tware u%ed in our project i% keilc0 It% detail% are a% 'ollow%8 Ke* (IDE) M*cr$V*1*$#< 4eil 3o'tware de-elopment tool% are u%ed to create product% 'or practically e-ery indu%try8 con%umer electronic%/ indu%trial control/ networkin"/ o''ice automation/ automoti-e/ %pace eAploration0 Micro 5i%ion Two i% a %econd "eneration I$+ that %impli'ie% project de-elopment and application te%tin"0 Dith Micro 5i%ion Two/ we can ea%ily create embedded application% in a miAture o' ) and a%%embly0 #eal-time application% bene'it 'rom our hi"hly optimiFed ) librarie% and real-time kernel%0 Micro5i%ion9 pro-ide% a centraliFed 'ront-end inter'ace 'or the compiler/ a%%embler/ linker/ debu""er/ and other de-elopment tool%0 The Project Dindow in Micro5i%ion9 di%play% the current tar"et/ "roup%/ and %ource 'ile% that compri%e our project0 #ather than creatin" a %in"le tar"et 'or each project/ Micro5i%ion2allow% multiple tar"et% 'or each project 'ile0 3o/ with a %in"le project 'ile/ we can create a tar"et 'or %imulatin"/ a tar"et 'or our emulator/ and a production tar"et 'or pro"rammin" into +P#7M T+-P#7MU0 +ach tar"et i% compo%ed o' one or more "roup% which are in turn compo%ed o' one or more %ource 'ile%0 Broup% let u% di-ide the %ource 'ile% into 'unctional block% or a%%i"n %ource 'ile% to di''erent team member%0 7ption% may be con'i"ured at each le-el o' the project0 Thi% "i-e% u% a "reat deal o' 'reedom and 'leAibility when or"aniFin" our application0 In addition to the on-line help/ Micro5i%ion9 pro-ide% on-line -er%ion% o' the de-elopment tool manual% a% well a% the de-ice manual%0 4eil ) )ompiler% are ba%ed on the 163I %tandard and include eAten%ion% nece%%ary to %upport the <0=1/ 2=1/ and 1:: microcontroller 'amilie%0 The optimiFer in our compiler i% tuned 'or each %peci'ic architecture and pro-ide% the hi"he%t le-el o' code den%ity and eAecution %peed0 2: The 4eil ) compiler% "i-e 'ull u% control o-er our embedded plat'orm0 De decide which re"i%ter bank% are u%ed/ when to acce%% certain memory area%/ which -ariable% are %tored in bit%/ when and how to u%e %pecial 'unction re"i%ter%/ and %o on0 Dithout e-er writin" any a%%embly code we may e-en write interrupt %er-ice routine% in )0 )ode "enerated by the 4eil ) )ompiler compare% with that o' a pro'e%%ional a%%embly pro"rammer0 Thi% i% due to the le-el o' optimiFation% that are per'ormed0 7ne %uch optimiFation i% "lobal re"i%ter optimiFation0 *y analyFin" which re"i%ter% are u%ed in each 'unction/ the compiler can better optimiFe re"i%ter u%a"e pro"ram-wide and "enerate %maller/ 'a%ter pro"ram%0 Thi% i% accompli%hed by iterati-e compilation %tep% durin" the make proce%%0 The Micro5i%ion9 debu""er i% de%i"ned to make te%tin" your pro"ram% a% e''icient a% po%%ible0 Dhile editin" and debu""in" your pro"ram%/ teAt and code attribute% are di%played in the %ource window0 1% you %tep throu"h your pro"ram/ the current line i% marked with a yellow arrow0 )ode co-era"e %how% you which line% o' your pro"ram ha-e been eAecuted0 Breen mean% the line ha% been run0 Brey mean% i% ha% not0 *reakpoint% are clearly marked in the %ource window0 #ed 'or enabled/ white 'or di%abled0 The%e attribute% make 'ollowin" pro"ram 'low ea%ier than e-er0 The 'eature% o' the Micro 5i%ion Two debu""er don@t %top there0 Dhen %imulatin" your pro"ram%/ you not only "et %ource-le-el/ %ymbolic %imulation0 Kou al%o "et on-chip peripheral %imulation0 $ialo" boAe% di%play the condition o' all peripheral% and on-chip component%0 S$urce C$(e or" 0000h mo- p1/L''h HHiHp port mo- p2/L00h HH oHp port back8mo- a/p1 cjne a/L02h/l1 acall delay mo- p2/L0=h acall delay %jmp back 2; l18cjne a/L0?h/l2 acall delay mo- p2/L0<h acall delay %jmp back l28 cjne a/L0<h/l9 acall delay mo- p2/L0ah acall delay %jmp back l98 cjne a/L0=h/l? acall delay mo- p2/L00h acall delay %jmp back l?8 cjne a/L0:h/l= acall delay mo- p2/L01h acall delay %jmp back l=8 nop %jmp back delay8 mo- r2/L2== a"ain8mo- r1/L=0 here8djnF r1/here djnF r2/a"ain ret 2< end SIMULATION 3imulation o' our project i% done with help o' Proteu%0 It% detail% are a% 'ollow%8 PROTEUS Proteus 7.4 SP3 Portable i% a %o'tware technolo"y that allow% creatin" clinical eAecutable deci%ion %upport "uideline% with little e''ort0 1 %o'tware tool that allow% creatin" and eAecutin" clinical deci%ion %upport "uideline% u%in" the Proteu% approach i% a-ailable0 The tool called Protean may be downloaded 'rom here0 Protean allow% creatin" new "uideline% or editin" eAi%tin" one% -ery ea%ily0 Much o' the editin" i% done by dra""in" and droppin"0 The Proteu% "uideline% are created with modular entitie% called 4nowled"e )omponent% (4)%)0 +ach 4) repre%ent% a clinical acti-ity and i% a-ailable to the clinician a% a module o' eAecutable knowled"e with it% own intelli"ence0 +Apert% at remote location% may mana"e indi-idual 4)%/ keepin" them in %ync with the current medical concept%/ while the clinician% automatically "et the %tate-o'-the-art eAecutable knowled"e0 Thi% i% akin to openin" a web pa"e u%in" a hyperlinkV the u%er "et% the 're%h content by clickin" on the %ame .#, when the author o' the web pa"e update% it0 .nlike a web pa"e howe-er/ the Proteu% 4)% are eAecutable knowled"e and not pa%%i-e in'ormation0 +ach "uideline may ha-e many 4)%/ each bein" updated by a di''erent eApert or a "roup o' eApert%0 The intelli"ent deci%ion-makin" in the 4) come% 'rom the In'erence Tool% in the Proteu% approach0 1nythin" that can make the in'erence% that a 4) need% can be declared it% in'erence tool0 3imple %o'tware al"orithm%/ %ophi%ticated arti'icial intelli"ence tool% or e-en remote human eApert% can be %peci'ied a% in'erence tool% 'or 4)%0 The in'erence tool can be a% ea%ily %wapped a% they can be declared0 There'ore/ i' a tool with better in'erencin" capabilitie% become% a-ailable/ it can be u%ed to replace the pre-iou% one in a 'ew %imple %tep%0 2> SIMULATION 90 COMPONENT COST )omponent% Wuantity Price MI)#7)76T#7,,+# <0=1 1 ;0 P)* 1 120 *13+-?0 PI6 1 : $) B+1# M7T7# 2 900 I# 3+637# 2 9= .,62<09 1 1= <-PI6 *13+ 2 : ,+$ 2 2 T2+#MI3T+# 2 20 )13T+# Dheel 1 2= D2++,3 2 :0 P.MP 1 1=0 )2+3I3 1 ;0 104 ? ? #+,1K(125) 1 10 ;<0= 1 ; 1100=>M2X 1 = ,M9=< 2 10 20k pot 2 10 99p' 2 ? M1,+ )766+)T7# 1 = !+M1,+ )766+)T7# 1 = ,2>9$ 1 190 91 M7T7# Dith !16 1 ;= *1TT+#K 1 1= *1TT+#K )1P 1 = F$;c.ar!1 E1ca3e The aim o' the e%cape beha-iour i% to pre-ent the robot 'rom collidin" with ob%tacle% when a-oid 'ail%0 +%cape work% by takin" the di%tance% 'rom both %en%or%V i' one i% under a %a'ety thre%hold/ the beha-iour take% o-er0 !ir%t it re-er%e% the robot 'or a %hort period o' timeV it then turn% %li"htly le%% than >0 de"ree% away 'rom the %en%or which wa% clo%e%t (an object on the ri"ht "et% too clo%e/ the robot will turn le't) I' thi% beha-iour become% acti-e it will pre-ent the 3earch 'or 'lame& beha-iour 'rom acti-atin" 'or another = %econd%0 92 F$$; Fame Thi% beha-iour will "uide the robot to a 'lame %o it can be eAtin"ui%hed0 $ue to the 'act that our 'lame detector could only "i-e a %in"le output a% to whether there wa% a 'lame in 'ront o' it or not thi% ta%k became more di''icult0 To track the 'lame we needed to know where it wa% in 'ront o' the robot/ %o to do thi% we made a %can like motion/ whereby the robot would %ee a 'lame/ turn away 'rom it 'or a "i-en time a'ter it 99 la%t %aw the 'lame/ then re-er%e the %can/ %eein" the 'lame a"ain and continue to turn 'or a "i-en amount o' time a'ter the 'lame dropped out o' -iew/ then turned back/ and %o on0 The %en%or did per'orm (althou"h -ery inaccurately) the 'unction o' reportin" the di%tance to the 'lame0 !rom thi% we were able to %ay we are clo%e enou"h to the 'lame and put it out/ which we did by turnin" on the 'an (which then tri""ered the +Atin"ui%h 'lame& beha-iour0) 9? Te1!*#) I#*!*a !e1!*#) The pro"rammin" o' the control %y%tem wa% a continuou% proce%%V thi% in-ol-ed implementin" a new component/ a% 'ew were introduced at a time a% po%%ible0 7'ten we would 'ind that the new component wouldn@t act a% eApected0 Thi% would lead to the need to comment out the new control code and "o thou"h it line by line/ makin" %ure that it wa% not cau%in" the problem0 1lon" with the te%tin" o' new component% we needed to te%t indi-idual beha-iour%0 $ue to the nature o' a beha-iour ba%ed %y%tem it wa% relati-ely ea%y to comment out eAi%tin" and 'ully 'unctional beha-iour%/ lea-in" only the one which wa% in de-elopment0 Thi% made it po%%ible 'or u% to identi'y i%%ue% that we would probably ha-e mi%%ed i' tryin" to complete the entire project at once0 7ne o' the major thin"% we 'ound wa% that i' a candle wa% too 'ar 'rom the robot to be eAtin"ui%hed yet the 'ire %en%ir could %till %ee it the robot would continue to attempt to put it out0 To %ol-e thi% we added a maAimum number o' time% the 'an could be turned on without ha-in" a break o' %ome time in between0 Thi% meant that i' the robot attempted to put out the %ame 'lame more than 'our time% the 'an beha-iour would be di%abledV thi% in turn would allow 'ollow 'lame to take o-er and brin" the robot clo%er/ until the time when the eAtin"ui%hin" beha-iour wa% re-enabled0 9= '*):: c$m3e!e 3*c!ure $' r$/$!. Pr$/em1 E#c$u#!ere( Dr*4e M$!$r1 (e1*)# :: There were numerou% problem% with the motor and "earboA packa"e% we u%ed 'or the !ire-!i"htin" #obot0 The motor% pro-ided %u''icient dri-in" tor(ue and %peed but where our problem% %tarted wa% attachin" the motor% to the wheel%0De could not drill the %ha't and in%ert a "rub %crew %o we opted to "lue the motor %ha't% to the wheel%0 M$u#!*#) $' 1e#1$r1 :: di''icult to ali"n ir %en%or and 'ire %en%or in 'ront o' the 'lame0 Fame 1e#1$r8- not able to hone in on the 'lame 0 . C$#cu1*$# 9: .%e% %en%or% to pinpoint eAact location o' candle0The robot accurately and e''iciently 'ind% the 'ire within the allotted time a'ter the 'ire alarm i% heard and return% to a %a'e place (2ome)0 The cha%%i% combined with the centrally located wheel% worked eAtremely well 'or the robot and it% ability to na-i"ate the world in which it wa% placed0 The !I#+ 3+637# (thermi%tor) created %ome di''iculty in that it wa% not ori"inally direction %en%iti-e/ and thu% re(uired the addition o' a cu%tom de%i"ned %hell0 It wa% eAtremely reliable once we had completed thi% phy%ical modi'ication B*/*$)ra3." The%e are %ome o' the %ite% we -i%ited8- http8HHwww0hobbyen"ineerin"0comHrmapIndeA0html http8HHwww0rid"e%o't0comHbuildin"bot%0htm http8HHwww0%eattlerobotic%0or"H"uideHin'rared0html http8HHwww0m%tracey0btinternet0co0ukHintere%t0htm http8HHwww0dudi900republika0plH"aleriaHindeA0html HH6ew robot e-ery week http8HHwww0robotic%0comHrobomenuHindeA0html 9;
[Doi 10.1109%2FISIE.2011.46] Xu, Hongke; Chen, Hao; Cai, Chao; Guo, Xunzhao; Fang, Jianwu; Su -- [IEEE 2011 International Conference on Intelligence Science and Information Engineering (ISIE) - Wuhan, China (2011.08.20-2