Documente Academic
Documente Profesional
Documente Cultură
Abstract
Homesecurityhasbeenamajorissuewherecrimeisincreasingandeverybodywantstotake propermeasurestopreventintrusion.Inadditiontherewasaneedtoautomatehomesothatuser cantakeadvantageofthetechnologicaladvancementinsuchawaythatapersongettingoffthe officedoesnotgetmeltedwiththehotclimate.
Introduction
TheprojectisaimedatdevelopingthesecurityofHomeagainstIntruders,GasLeakandFire. In any of the above three cases any one met while you are out of your home than the device sendsSMStotheemergencynoprovidedtoit. The report consists of a background into the area of 8051 microcontroller and mobile communication,howtheyareinterfacedtoeachotherandAT(Attention)commandssetusedin communication.
HARDWARE USED 1.ATcommandsupportingGSMmobilephone. 2.89S52Microcontroller 3.Max232IC. 4.Relays 5.RelaydriverICULN2803 6.Voltageregulator7805. 7.DiodeIN4007 8.GSMPhone 9.LPGGasSensor
SOFTWARE USED 1.Keil u-Vision 3.0 KeilSoftwareisusedprovideyouwithsoftwaredevelopmenttoolsfor8051based microcontrollers.WiththeKeiltools,youcangenerateembeddedapplicationsforvirtuallyevery 8051derivative.Thesupportedmicrocontrollersarelistedinthe-vision 2.PRO51 Programmer Software
THEORY OF OPERATION
In this project we interfaced 8051 microcontroller with Motorolas C168 GSM mobile phone to decode the received message and do the required action. The protocol used for the communication between the two is AT command. The microcontroller pulls the SMS received by phone, decode it, recognizes the Mobile no. and then switches on the relays attached to its port to control the appliances. After successful operation, controller sends back the acknowledgement to the users mobile through SMS.
AT-Command set
ThefollowingsectiondescribestheAT-Commandset.Thecommandscanbetriedoutby connectingaGSMmodemtooneofthePCsCOMports.Typeinthetest-command,adding CR+LF(Carriagereturn+Linefeed=\r\n)beforeexecuting.Tablegivesanoverviewofthe implementedAT-Commandsinthisapplication.Theuseofthecommandsisdescribedinthe latersections. AT-Commandsetoverview Command Description CheckifserialinterfaceandGSMmodemis AT working. ATE0 Turnechooff,lesstrafficonserialline. AT+CNMI DisplayofnewincomingSMS. AT+CPMS SelectionofSMSmemory. AT+CMGF SMSstringformat,howtheyarecompressed. Readnewmessagefromagivenmemory AT+CMGR location. AT+CMGS Sendmessagetoagivenrecipient. AT+CMGD Deletemessage.
ABRIEFINTRODUCTIONTO8051 MICROCONTROLLER:
Whenwehavetolearnaboutanewcomputerwehavetofamiliarizeaboutthemachine capabilityweareusing,andwecandoitbystudyingtheinternalhardwaredesign(devices architecture),andalsotoknowaboutthesize,numberandthesizeoftheregisters. A microcontroller is a single chip that contains the processor (the CPU), non-volatile memoryfortheprogram(ROMorflash),volatilememoryforinputandoutput(RAM),aclock
and an I/O control unit. Also called a "computer on a chip," billions of microcontroller units (MCUs)areembeddedeachyearinamyriadofproductsfromtoystoappliancestoautomobiles. For example, a single vehicle can use 70 or more microcontrollers. The following picture describesageneralblockdiagramofmicrocontroller.
The hardware is driven by a set of program instructions, or software. Once familiar with hardwareandsoftware,theusercanthenapplythemicrocontrollertotheproblemseasily. Thepindiagramofthe8051showsalloftheinput/outputpinsuniquetomicrocontrollers:
Thefollowingaresomeofthecapabilitiesof8051microcontroller. InternalROMandRAM I/Oportswithprogrammablepins Timersandcounters Serialdatacommunication The8051architectureconsistsofthesespecificfeatures: 16bitPC&datapointer(DPTR) 8bitprogramstatusword(PSW) 8bitstackpointer(SP) InternalROM4k InternalRAMof128bytes. 4registerbanks,eachcontaining8registers 80bitsofgeneralpurposedatamemory 32 input/output pins arranged as four 8 bit ports:P0-P3
BLOCK DIAGRAM:
8051
Level Converter
SMS
IR Sensor Fire