成都理工大学工程技术学院毕业论文基于单片机的智能家居防火防盗报警系统基于单片机的智能家居防火防盗报警系统I摘要随着社会的不断进步和科学技术、经济的发展,人们的生活水平得到很大的提高,人们愈加注重人身安全,因而也对防火防盗措施提出了新的要求。本设计所做的智能家居控制系统包括室内信息智能监控功能、输入与实时显示功能、声光报警功能等。本文利用单片机结合传感器技术而开发设计了这一防火防盗报警系统。本设计采用DYP-ME003人体红外感应模块、18B20温度传感器和MQ_2烟雾传感器检测信号,然后将信号传送给单片机处理,实现声光报警。该系统通过按键对系统的温度和烟雾的浓度进行初始化设置,利用LED显示模块对系统的温度和烟雾的浓度进行实时显示。该系统结构简单、性能稳定、使用方便、价格低廉,具有一定的实用价值。关键字:防火防盗报警18B20MQ_2DYP-ME003基于单片机的智能家居防火防盗报警系统IIAbstractWithsociety’sprogressanddevelopmentofscienceandtechnology,economy,people'slivingstandardhasbeengreatlyimproved.Peoplepaymoreattentiontopersonalsafety,thustheyputforwardnewrequirementsforthefireandsecuritymeasures.Inthisdesign,theintelligentfamily-housecontrolsystemincludesthisfunction:indoorinformationintelligentmonitoring,theinputandreal-timedisplay,soundandlightalarm,andsoon.Thedesignisafireandsecuritysystem,whichcombinessensortechnologywithmicrocontroller.ThisdesignadoptstheDYP-ME003humanbodyinfraredsensormodule,18b20temperaturesensorandMQ_2smokesensortodetectionsignal.Thesesensorsendthesignalstomicrocontroller.Themicrocontrollerprocessthesesignalanddrivealarmcircuittoachievesoundandlightalarm.Thefirtemperatureandsmokeconcentrationareinitializedinthissystem.,andaredisplayedintheLEDdisplay.Thesystemhastheadvantagesofsimplestructure,stableperformance,conventionaloperation,lowprice,andhasacertainpracticalvalue.Keywords:Thefireandsecuritysystem,18b20,MQ_2,DYP-ME003基于单片机的智能家居防火防盗报警系统III目录摘要...........................................................IAbstract.................................................................................................II目录.......................................................................................................III1绪论.................................................................................................-1-2系统总设计.......................................................................................-2-2.1设计内容与要求.......................................................................-2-2.2系统设计的总体思路.................................................................-2-3方案论证与比较................................................................................-4-4系统硬件结构...................................................................................-5-4.1整体硬件设计思路....................................................................-5-4.2单片机电路AT89S52..................................................................-5-4.2.1主要性能参数...................................................................-5-4.2.2管脚说明..........................................................................-6-4.2.3单片机最小系统................................................................-8-4.3温度传感电路............................................................................-9-4.3.1DS18B20介绍...................................................................-9-4.3.2DS18B20工作电路..........................................................-10-4.4烟雾传感电路..........................................................................-10-4.4.1烟雾传感器MQ-2............................................................-10-4.4.2MQ-2传感器的特性及主要技术指标..................................-11-4.4.3ADC0832介绍................................................................-12-基于单片机的智能家居防火防盗报警系统IV4.4.4.A/D转换电路..................................................................-14-4.5非法入侵电路..........................................................................-14-4.5.1DYP-ME003红外人体传感器............................................-14-4.6报警电路.................................................................................-15-4.6.1蜂鸣器...........................................................................-16-4.6.2按键..............................................................................-16-4.6.3LED灯...........................................................................-17-4.7显示电路.................................................................................-17-5系统软件设计.................................................................................-18-5.1主程序模块.............................................................................-19-5.2温度采集处理模块...................................................................-20-5.3烟雾采集处理模块..................................................................-22-6程序调试与分析..............................................................................-27-总结..................................................................................................-31-致谢..................................................................................................-32-参考文献...........................................................................................-33-附录1基于单片机的智能家居防火防盗报警系统仿真图...................-34-附录2基于单片机的智能家居防火防盗报警系统程序源代码............-35-基于单片机的智能家居防火防盗报警系统-1-1绪论现代化的建筑规模大、标准高、人员密集、设备众多,对防火要求极为严格。随着我国经济建设的发展,各种高层建筑、大中型商业建筑、厂房不断涌现,对消防报警系统提出了更高更严的要求。为了早期发现和通报火灾,防止和减少火灾危害,保护人身和财产安全,保卫社会主义现代化建设,在现代化的工业民用建筑、宾馆、图书馆、科研和商业部门,火灾自动报警系统已成为必不可少的设施。工程设计、安装和使用是否正确不仅直接影响到建筑的消防安全而且也直接关系到各种消防设施能否真正发挥作用。因此,火灾报警系统