Beruflich Dokumente
Kultur Dokumente
CHAPTER I INTRODUCTION
%he e!!ectiveness o! metal detectors is inhibited by mines with e)tremely low metal content or by soils with high !errous content, and hence other detection techni"ues have been &and are being' investigated. 3ne such techni"ue which is widely used is the detection o! e)plosive material by smell using a dog .4ogs can be trained to identi!y the presence o! e)plosives which are leaked by landmines, although the e)plosives can be detected up to 10 meters !rom the mine resulting in only the appro)imate position being identi!ied. In addition, e)perience with dogs seems to show that mines do not release signi!icant %5%vapour a!ter 1- months o! burial. %his techni"ue, however, appears to have potential !or the identi!ication o! the boundaries o! a mine eld.3nce detected, landmines are generally destroyed in situ as the risks associated with neutralizing or disarming them are too great.
VCC
R8 R7 R6 R5 R4 R3 R2 R1 C
C R1 R2 R3 R4 R5 R6 R7 R8
10< ;6LL6;
10< ;6LL6;
VCC 487<
GND
1 GND 2 VCC 3 VEE 4 RS 5 RW 6 EN 7 D0 8 D1 9 D2 10 D3 11 D4 12 D5 13 D6 14 D7 15 VCC 16 GND VCC
VCC CL<9"C;3201: D76T9"C;3201: CS9"C;3201: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 9T2: ;180 9T2 E?: ;181 ;182 ;183 ;184 9"7SI: ;185 9"IS7: ;186 9SC<: ;187 RST 9R?D: ;380 9T?D: ;381 9I0T0: ;382 9I0T1: ;383 9T0: ;384 9T1: ;385 9WR: ;386 9RD: ;387 ?T!L2 ?T!L1 50D VCC ;080/!D0 ;081/!D1 ;082/!D2 ;083/!D3 ;084/!D4 ;085/!D5 ;086/!D6 ;087/!D7 E!/V;; !LE/;R75 ;SE0 ;287/!15 ;286/!14 ;285/!13 ;284/!12 ;283/!11 ;282/!10 ;281/!9 ;280/!8 40 39 38 37 36 35 34 33 32 31 30 VCC 29 28 27 26 25 24 23 22 21 ;081 50D ;083
>R7" IS; >R7" IS; >R7" IS; RST R276T 9"!?232: T2I09"!?232:
GND
GND
VCC 10uf/63v 1 DC "7T7R 10uf/63v 2 VCC 10uf/63v 3 4 5 10uf/63v 3 2 1 6 7 8
LCD
VCC
?T!L2 ?T!L1
VCC GND
16 15 14 13 12 11 10 9 ;3819T?D: ;3809R?D:
GND
!T89S52
9 8 7 6 5 4 3 2 1
10< ;6LL6;
GSM M DEM
=RID5E RECTI>IER
$P
GND
"!?232
VCC
2 1
7805 RE56L!T7R
4 1 VI0 V76T 3
VCC = 5V
230V'!8C
!RANS% RMER 3
GND 2
33pf 1000uf/35V 104pf
220 o3/
DC M ! R
(9V,1 AMP)
LED
;281 1<
=C 109
GND
VCC SWITCH
GND
C
I S P
2 4 6 8 10
10 uf/63V
RST T*+,-
VCC
GND
882<
!T89S52 IS;
!T89S52 CR4ST!L
GND
S*.!
RESET
D%+-2
9 8 7 6 5 4 3 2 1
VCC
1 2 3 4 5 6 7 8 9
C R1 R2 R3 R4 R5 R6 R7 R8
Complete studies o! all the above points are use!ul to develop this pro#ect.
1.3.3:SELECTION OF MICROCONTROLLER:
,s we know that there so many types o! micro controller !amilies that are available in the market. %hose are 1' -0?1 2amily 2' ,@7 microcontroller 2amily ;' 9IC microcontroller 2amily =' ,7M 2amily <asic -0?1 !amily is enough !or our applicationB hence we are not concentrating on higher end controller !amilies. In order to !ul!ill our application basic that is ,%-AC?1 controller is enough. <ut still we selected ,%-A0?2 controller because o! inbuilt I09 &in system programmer' option. %here are minimum si) re"uirements !or proper operation o! microcontroller. ECE Dept. SCCE ?
1.3.4:CONNECTIONS OF DC MOTOR:
In this pro#ect we are using one driver IC $2A;4 to 35E322 the dc motor. %he terminals o! this $2A;4 is connected to the 937%2.1 &92.1' o! microcontroller.
2.1.1CHARACTERISTICS:
%wo ma#or areas o! di!!erences are cost and power consumption. 0ince many embedded systems are produced in tens o! thousands to millions o! units range, reducing cost is a ma#or concern. (mbedded systems o!ten use a &relatively' slow processor and small memory si1e to minimi1e costs. %he slowness is not #ust clock speed. %he whole architecture o! the computer is o!ten intentionally simpli!ied to lower costs. 2or e)ample, embedded systems o!ten use peripherals controlled by synchronous serial inter!aces, which are ten to hundreds o! times slower than comparable peripherals used in 9Cs. 9rograms on an embedded system o!ten run with real time constraints with limited hardware resources8 o!ten there is no disk drive, operating system, keyboard or screen. , !lash drive may replace rotating media, and a small keypad and $C4 screen may be used instead o! a 9CGs keyboard and screen. 2irmware is the name !or so!tware that is embedded in hardware devices, e.g. in one or more 73M+2lash memory IC chips. (mbedded systems are routinely e)pected to maintain 100. reliability while running continuously !or long periods, sometimes measured in years. 2irmware is usually developed and tested too much harsher re"uirements than is general purpose so!tware, which can usually be easily restarted i! a problem occurs.
PLATFORM: %here are many di!!erent C96 architectures used in embedded designs. %his in contrast to the desktop computer market which is limited to #ust a !ew competing architectures mainly the Intel+,M4 )-6 and the ,pple+Motorola+I<M 9ower 9CDs which are used in the ,pple Macintosh. 3ne common con!iguration !or embedded ECE Dept. SCCE -
TOOLS: $ike a typical computer programmer, embedded system designers use compilers, assemblers and debuggers to develop an embedded system. %hose so!tware tools can come !rom several sources8 0o!tware companies that speciali1e in the embedded market 9orted !rom the *56 so!tware development tools. 0ometimes, development tools !or a personal computer can be used i! the embedded processor is a close relative to a common 9C processor. (mbedded system designers also use a !ew so!tware tools rarely used by typical computer programmers. 0ome designers keep a utility program to turn data !iles into code, so that they can include any kind o! data in a program. Most designers also have utility programs to add a checksum or C7C to a program, so it can check its program data be!ore e)ecuting it.
OPERATING SYSTEM: %hey o!ten have no operating system, or a speciali1ed embedded operating system &o!ten a real time operating system', or the programmer is assigned to port one o! these to the new system.
DEBUGGING: 4ebugging is usually per!ormed with an in circuit emulator, or some type o! debugger that can interrupt the micro controllerDs internal microcode. %he microcode interrupt lets the debugger operate in hardware in which only the C96 works. %he C96 based debugger can be used to test and debug the electronics o! the computer !rom the viewpoint o! the C96. 4evelopers should insist on debugging which shows the high level language, with breakpoints and single stepping, because these !eatures are widely available. ,lso, developers should write and use simple logging !acilities to debug se"uences o! real ECE Dept. SCCE A
START-UP: ,ll embedded systems have start up code. 6sually it disables interrupts, sets up the electronics, tests the computer &7,M, C96 and so!tware', and then starts the application code. Many embedded systems recover !rom short term power !ailures by restarting &without recent sel! tests'. 7estart times under a tenth o! a second are common. Many designers have !ound one o! more hardware plus so!tware controlled $(4Ds use!ul to indicate errors during development &and in some instances, a!ter product release, to produce troubleshooting diagnostics'. , common scheme is to have the electronics turn o!! the $(4&s' at reset, whereupon the so!tware turns it on at the !irst opportunity, to prove that the hardware and start up so!tware have per!ormed their #ob so !ar. ,!ter that, the so!tware blinks the $(4&s' or sets up light patterns during normal operation, to indicate program e)ecution progress and+or errors. %his serves to reassure most technicians+engineers and some users. THE CONTROL LOOP: In this design, the so!tware has a loop. %he loop calls subroutines. (ach subroutine manages a part o! the hardware or so!tware. Interrupts generally set !lags, or update counters that are read by the rest o! the so!tware. , simple ,9I disables and enables interrupts. 4one right, it handles nested calls in nested subroutines, and restores the preceding interrupt state in the outermost enable. %his is one o! the simplest methods o! creating an e)ocrine.
10
11
12
Microcontrollers as the name suggests are small controllers. %hey are like single chip computers that are o!ten embedded into other systems to !unction as processing+controlling unit. 2or e)ample the remote control you are using probably has microcontrollers inside that do decoding and other controlling !unctions. %hey are also used in automobiles, washing machines, microwave ovens, toys ... etc, where automation is needed. Micro controllers are use!ul to the e)tent that they communicate with other devices, such as sensors, motors, switches, keypads, displays, memory and even other micro controllers. Many inter!ace methods have been developed over the years to solve the comple) problem o! balancing circuit design criteria such as !eatures, cost, si1e, weight, power consumption, reliability, availability, manu!acturability. Many microcontroller designs typically mi) multiple inter!acing methods. In a very simplistic !orm, a micro controller system can be viewed as a system that reads !rom &monitors' inputs, per!orms processing and writes to &controls' outputs. (mbedded system means the processor is embedded into the re"uired application. ,n embedded product uses a microprocessor or microcontroller to do one task only. In an embedded system, there is only one application so!tware that is typically burned into 73M. ()ample8 printer, keyboard, video game player Microprocessor , single chip that contains the C96 or most o! the computer Microcontroller , single chip used to control other devices Microcontroller di!!ers !rom a microprocessor in many ways. 2irst and the most important is its !unctionality. In order !or a microprocessor to be used, other components such as memory, or components !or receiving and sending data must be added to it. In short that means that microprocessor is the very heart o! the computer. 3n the other hand, microcontroller is designed to be all o! that in one. 5o other e)ternal ECE Dept. SCCE 1;
2.2.1:MICROPROCESSOR VS MICROCONTROLLER:
Mi !"#!" $%%"!: C96 is stand alone, 7,M, 73M, I+3, timer are separate 4esigner can decide on the amount o! 73M, 7,M and I+3 ports. e)pensive versatility general purpose
Mi !" "&'!"(($!:
C96, 7,M, 73M, I+3 and timer are all on a single chip !i) amount o! on chip 73M, 7,M, I+3 ports !or applications in which cost, power and space are critical single purpose
DEBUGGING AN APPLICATION IN UVISION2: %o debug an application created using u@ision2, you must8 . . . . 0elect 4ebug 0tart+0top 4ebug 0ession. 6se the 0tep toolbar buttons to single step through your program. Iou may enter *, main in the 3utput Findow to e)ecute to the main C !unction. 3pen the 0erial Findow using the 0erial M1 button on the toolbar. 4ebug your program using standard options like 0tep, *o, <reak, and so on.
EVALUATION SOFTWARE: . . . Code <anking $inker+$ocator $ibrary Manager. 7%L ?1 %iny 7eal %ime 3perating 0ystem
2.3.3:PERIPHERAL SIMULATION:
16
1-
3.1.3:PIN DESCRIPTION:
VCC - 0upply voltage. GND - *round. P"!' -: 9ort 0 is an - bit open drain bi directional I+3 port. ,s an output port, each pin can sink eight %%$ inputs. Fhen 1s are written to port 0 pins, the pins can be used as high impedance inputs. 9ort 0 can also be con!igured to be the multiple)ed low order address+data bus during accesses to e)ternal program and data memory. In this mode, 90 has internal pull ups. 9ort 0 also receives the code bytes during 2lash programming and outputs the code bytes during program veri!ication. ()ternal pull ups are re"uired during program veri!ication. P"!' 1: 9ort 1 is an - bit bi directional I+3 port with internal pull ups. %he 9ort 1 output bu!!ers can sink+source !our %%$ inputs. Fhen 1s are written to 9ort 1 pins, they are pulled high by the internal pull ups and can be used as inputs. ,s inputs, 9ort 1 pins that are e)ternally being pulled low will source current &II$' because o! the internal pull ups. In addition, 91.0 and 91.1 can be con!igured to be ECE Dept. SCCE 1A
P"!' 2: 9ort 2 is an - bit bi directional I+3 port with internal pull ups. %he 9ort 2 output bu!!ers can sink+source !our %%$ inputs. Fhen 1s are written to 9ort 2 pins, they are pulled high by the internal pull ups and can be used as inputs. ,s inputs, 9ort 2 pins that are e)ternally being pulled low will source current &I I$' because o! the internal pull ups. 9ort 2 emits the high order address byte during !etches !rom e)ternal program memory and during accesses to e)ternal data memory that uses 16 bit addresses &M3@L O 49%7'. In this application, 9ort 2 uses strong internal pull ups when emitting 1s. 4uring accesses to e)ternal data memory that uses - bit addresses &M3@L O 7I'B 9ort 2 emits the contents o! the 92 0pecial 2unction 7egister. 9ort 2 also receives the high order address bits and some control signals during 2lash programming and veri!ication. P"!' 3: 9ort ; is an - bit bi directional I+3 port with internal pull ups. %he 9ort ; output bu!!ers can sink+source !our %%$ inputs. Fhen 1s are written to 9ort ; pins, they are pulled high by the internal pull ups and can be used as inputs. ,s inputs, 9ort ; pins that are e)ternally being pulled low will source current &I I$' because o! the pull ups. 9ort ; also serves the !unctions o! various special !eatures o! the ,%-AC?1. 9ort ; also receives some control signals !or 2lash programming and veri!ication. PORT PIN ALTERNATE FUNCTIONS: ECE Dept. SCCE 20
9;.0 7L4 &serial input port' 9;.1 %L4 &serial output port' 9;.2 I5%0 &e)ternal interrupt 0' 9;.; I5%1 &e)ternal interrupt 1' 9;.= %0 &timer 0 e)ternal input' 9;.? %1 &timer 1 e)ternal input' 9;.6 F7 &e)ternal data memory write strobe' 9;.C 74 &e)ternal data memory read strobe'.
RST: 7eset input. , high on this pin !or two machine cycles while the oscillator is running resets the device.
ALE3PROG: ,ddress $atch (nable is an output pulse !or latching the low byte o! the address during accesses to e)ternal memory. %his pin is also the program pulse input &973*' during !lash programming. In normal operation, ,$( is emitted at a constant rate o! 1+6 the oscillator !re"uency and may be used !or e)ternal timing or clocking purposes. :owever, that one ,$( pulse is skipped during each access to e)ternal data memory. I! desired, ,$( operation can be disabled by setting bit 0 o! 027 location -(:. Fith the bit set, ,$( is active only during a M3@L or M3@C instruction. 3therwise, the pin is weakly pulled high. 0etting the ,$( disable bit has no e!!ect i! the microcontroller is in e)ternal e)ecution mode. PSEN: 9rogram 0tore (nable is the read strobe to e)ternal program memory. Fhen the ,%-AC?2 is e)ecuting code !rom e)ternal program memory, 90(5 is activated twice each machine cycle, e)cept that two 90(5 activations are skipped during each access to e)ternal data memory.
21
22
INTERRUPT CONTROL
TIMER 1 TIMER 0
COUNTER INPUTS
OSC
P0 P1 P2 P3
Tx
Rx
2;
OSCILLATOR CHARACTERISTICS:
2=
OSCILLATOR CONNECTIONS:
2?
26
2C
2-
2A
$3*IC 4I,*7,M8
2I*67( ;.A8 0C:(M,%IC0 I596%0 ,54 36%96%0 32 $2A;4 ECE Dept. SCCE ;0
;1
;2
4.2: APPLICATIONS:
Metal detectors capable o! !inding low metal contents mines in minerali1ed soil. In de!ence. :ighly e!!ective !or detecting.
;;
CONCLUSION
, landmine detection robot was designed in the pro#ect. %his pro#ect presents a landmine detecting robot and it is designed and implemented with ,tmel -A0?2 MC6 in embedded system domain. . ()perimental work has been carried out care!ully. %he result shows that higher e!!iciency is indeed achieved using the embedded system. %he proposed method is veri!ied to be highly bene!icial !or the security purpose and industrial purpose. In this prototype pro#ect we concentrate on the detection o! weapons &$andmine' and hence bombs using appropriate sensors and there will be an indication !rom the microcontroller whenever there is a detection o! weapons $andmine, hence appro)imate precautions can be taken when $andmine is detected. %his pro#ect is very much use!ul in every public places like bus stands, parks, auditoriums etc., this pro#ect is also very much help!ul to the police department in order to prevent bomb e)plore and prevent anti social activities in the society %he need !or a concealed weapons and e)plosive detection systems in uncontrolled environments has increased in recent years. %raditional metal detector inspection systems are limited to controlled environments such as security check points and cannot detect plastic e)plosives
;=
FUTURE SCOPE
$ighter plastic based !rame <etter sensor technology <etter strategy to deal with large obstacles Fider wheels (asier usability such that private persons can map their own land In this landmine detector, robot is connected and self controlled and it will sound the Bu er when it finds the landmine.
&C.
;?
REFERENCES
WEBSITES VIEWED:
www.atmel.com www.beyondlogic.org www.dallassemiconductors.com www.ma)im ic.com www.alldatasheets.com www.howstu!!works.com
;6
SOURCE CODE MincludeUreg?2.hV ++include at-Ac?1 microcontroller header !ile sbit bu1erP92WCB sbit M71 P 92W0B sbit M72 P 92W1B sbit M$1 P 92W2B sbit M$2 P 92W;B unsigned char chB void mov!&'B void movb&'B void movr&'B void movl&'B void stop&'B void delayXmicro&unsigned int'B void delayXms&unsigned int'B void main &void' Y mov!&'B stop&'B ECE Dept. SCCE ;C
movb&'B delayXms&2?0'B stop&'B movl&'B delayXms&2?0'B stop&'B movr&'B delayXms&2?0'B stop&'B movl&'B delayXms&100'B stop&'B movr&'B delayXms&100'B stop&'B
Z void mov!&' Y M71 P 1B M72 P 0B Z void movb&' Y M71 P 0B M72 P 1B ECE Dept. SCCE ;-
;A
=0