AutomaticfirealarmsystembasedonMCUAbstract:Thepaperintroducedanautomaticwarehousefirea1armsystembasedonMCU.ThesystemwasmainlymadeupofATmega16,temperaturesensors,smokesensors,andEX-1autodialedalarmmodule.Inthesystem,temperaturesignalsweretransformedtoserialdata,andsmokesignalsweretransformedtovoltagesignals.AllthedatawereprocessedbyMCU.Whenthesurveillancesystemcheckedfireinwarehouse,alarmsignalwasturnon,meanwhilethemessagesweretransmittedtomanagersthroughEX-1.Applicationofthesystemwasconvenienttodealwithfirein-time,efficientlybywarehousemanager.Keywords:firealarmtransducer;smokesensorsystem;ATmega16;temperaturetransducer;smokesensorI.INTRODUCTIONAutomaticfirealarmcontrolsystemhasexperiencedaprocessfromthesimpletothecomplexandintelligencesystemincreasinglyinChina.Thecharacteristicisautomaticfiredetectionandalarmtechnologyhasagreatprogressalongwithcomputinganddetectiontechnologydevelopment.Atpresent,automaticfirealarmcontrolsystemwasusedinbulkstorageplant,shoppingmalls,high-levelofficebuildings,hotelsandotherplaces.Theywereusedinanumberofcollectionsfocusedononeareaofintelligentalarmcontrolmethodwithhigherlevelsofbus-typealarmcontrolsystem,andinsomeresidentialareasandcommercialbuildingswereinstalledbyasingleautomaticfirealarmdetectiondevice.Thesealarmdetectiondevicesfailtoreportsometimes,ormisinformation.Itsreliabilityisnothighbecauseofusingsinglesensor.Therefore,itisneededtodevelopasimplestructure,lowcost,highreliability,fastresponding,automaticfiredetectionsystem.II.GENERALPROJECTOFTHESYSTEMThehardwareblockdiagramshowninFigure1,hardwarebytemperaturesensors,smokesensors,signalprocessingmodule,MCUmodulesandautomaticalarmmodule.Nonelectricalquantitythatisthroughthesensingelementsensors(smokesensorsandtemperaturesensors)willbeon-sitetemperature,smokeandothernon-electricalsignalintoanelectricalsignal,aswellassignalsforsignalprocessingtoconvertanalogquantitytodigitalquantity.Finally,thesampleddatawereprocessedandcomparedwiththelimitsbyMCUsystem.Thissystemcanproducelocalandremoteauto-alarmsignals.TemperatureIonizationTransducersmokedetectorsignalprocessingPD0PD1SCMautoalarmmoduleTephoneelInterface…Figure1.AutomaticfirealarmsystemstructureⅢ.THEHARDWARECOMPONENTSA.Atmega16ThesystemusedbytheU.S.Atmel’smicrocontrollerATmega16microcontroller.ATmega16isbasedontheAVRRISCarchitecturetoenhancelow-power8-bitCMOSmicrocontroller.Becauseofitsadvancedinstructionsetandasingleclockcycleinstructionexecutiontime,ATmega16datathroughputofupto1MIPS/MHz.Therebymitigatethesysteminthepowerandthecontradictionbetweentheprocessingrate.ATmega16hasthefollowingcharacteristics:16Kbytesin-systemprogrammableFlash(withtheabilitytoreadandwriteatthesametime,thatis,RWW),512bytesEEPROM,1KbytesSRAM,32general-purposeI/Oportlines,32general-purposeworkingregisters,fortheJTAGboundaryscaninterface,supporttheon-chipdebuggingandprogramming,3hasamoreflexiblemodeoftimer/counter(T/C),chipinternal/externalinterrupts,programmableserialUSART,thereareinitialconditionsdetectoruniversalserialinterface,8-channel10-bitwithoptionaldifferentialinputstageprogrammablegain(TQFPpackage)oftheADC,withon-chiposcillatorofprogrammablewatchdogtimer,anSPIserialport,aswellassixcanbeselectedbysoftwarepower-savingmode.ThechipisbasedonAtmelhigh-densitynonvolatilememorytechnologyproductionon-chipISPFlashallowstheprogrammemorythroughtheISPserialinterfaceorageneral-purposeprogrammerforprogramming;youcanalsorunontheAVRcoreamongthebootstraptoprogram.BootprogramcanuseanyinterfacetodownloadtheapplicationtotheFlashmemoryarea(ApplicationFlashMemory).ApplicationofFlashstorageareaisupdatedwhenthebootFlasharea(BootFlashMemory)programcontinuestorun,RWWoperationachieved.ATmega16tobecomeapowerfulmicrocontrollerby8-bitRISCCPUandthesystemprogrammableflashinasinglechip,formanyembeddedcontrolapplicationsprovidesaflexibleandcost-effectivesolution.ATmega16hasasetofprogrammingandsystemdevelopmenttools,including:Clanguagecompiler,macroassembler,programdebugger/softwareemulator,emulatorsandevaluationboards.B.TemperatureSensorTemperaturesensormanufacturedbyDALLASSemiconductorDS18B20-typesingleintelligencetemperaturesensor,itsperformancefeaturesinclude:1)Thissensorhavesingle-bus-specifictechnology,eitherthroughtheserialportcablealsothroughotherI/Oportlinesandcomputerinterfaces,withoutgoingthroughotherconversioncircuitsDirectoutputmeasuredtemperaturevalue(9-bitbinarynumber,withsignbit).2)Temperaturerangeis-55℃~+125℃,measurementresolutionof0.0625℃.3)Containing64asamendedthroughthelaser-read-onlymemoryROM.4)FitavarietyofSCMorsystemmachine.5)Userscansetseparatewayseachtemperatureupperandlowerlimit.6)Includesparasiticpower.DS18B20andthemainchipconnectiondiagramshowninFigure2:DS18B20numberonepingrounded,thenonthe3rdpinhighandthe2ndpinthena5.1Kofthepull-upresistor,atthesametimereceivedasingleoutputsignalofthePD0pin.Pull-upistopulltheuncertaintysignalthrougharesistorembeddedinthehighplaces,resistanceatthesametimecurrent-limited.ProgramfromtheDQpininhighimpedancestatetoensurethatthebeginning,sothatyoucanpullonthepull-upres