Sunteți pe pagina 1din 7

GSM Based Home Security System

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.

89s52: The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with


8Kbytesofin-systemprogrammableFlashmemory.ThedeviceismanufacturedusingAtmels high-densitynonvolatilememorytechnologyandiscompatiblewiththeindustry-standard80C51 instructionsetandpinout.Theon-chipFlashallowstheprogrammemorytobereprogrammed in-system or by a conventional nonvolatile memory pro-grammer. By combining a versatile 8bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerfulmicrocontroller,whichprovidesahighlyflexibleandcost-effectivesolutiontomany, embeddedcontrolapplications.TheAT89S52providesthefollowingstandardfeatures:8Kbytes ofFlash,256bytesofRAM,32I/Olines,Watchdogtimer,twodatapointers,three16-bittimer/ counters,asix-vectortwo-levelinterruptarchitecture,afullduplexserialport,on-chiposcillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continuefunctioning.ThePower-downmodesavestheRAMcon-tentsbutfreezestheoscillator, disablingallotherchipfunctionsuntilthenextinterrupt

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

Two16bittimer/counters:T0-T1 Two external and three internal interruptsourcesOscillatorandclockcircuits.

BLOCK DIAGRAM:

8051

Level Converter

SMS
IR Sensor Fire

Sensor LPG Gas Sensor PORT1

BUYTHISPROJECTNOW CALLUSAT+91-9013296909 Emailusat-Freshersblog@gmail.com VisitUsatwww.IndianEngineer.in

S-ar putea să vă placă și