南京理工大学毕业设计说明书(论文)作者:笑嘻嘻学号:08042101学习学院(系):电子工程与光电技术学院专业:电子信息工程题目:基于51单片机室内煤气,天然气泄漏警报器的设计指导者:(姓名)(专业技术职务)评阅者:(姓名)(专业技术职务)2012年6月张文青工程师毕业设计说明书(论文)中文摘要随着天然气的大量使用,每一座居民大楼都被天然气所“笼罩”。天然气的普及给公共生活带来了方便,减少了城市的污染,提高了生活质量和效率,但是同时,天然气也是潜在的“危险品”,一旦发生大面积泄漏,处置不及时就可能引发大爆炸,给居民的生命财产安全带来巨大的威胁。面对燃气泄漏而造成的种种事故威胁,我们需要一个解决办法。使用天然气报警器是对付燃气无形杀手的重要手段之一。本论文以半导体气敏传感器和单片机技术为核心设计的气体报警器可实现声光报警功能,是一种结构简单、性能稳定、使用方便、价格低廉、智能化的气体报警器,具有一定的实用价值。其中选用MQ-2传感器实现对气体的检测,具有灵敏度高、响应快、抗干扰能力强等优点,而且价格低廉,使用寿命长。经AT89C51单片机处理,并对处理后的数据进行分析,是否大于或等于某个预设值(也就是报警限),如果大于则会自动启动报警电路发出报警声音,反之则为正常状态,而且在此设计中我们通过DS18B20温度传感器和AT89C51单片机进行连接,将温度信号转换成单片机可识别的数字信号,经过单片机处理并对其进行分析,最终将温度还有气体的浓度显示在LED的显示管中。关键词气敏传感器报警器单片机温度传感器毕业设计说明书(论文)外文摘要TitleDesignofindoorgas&naturalgasalarmbasedon51microcontrollerAbstractWiththewideuseofnaturalgas,eachresidentialtowerswereenvelopedbythegas.Thepopularityofnaturalgastopubliclifebroughtconvenient,reducethecity'spollutionandimprovethelifequalityandefficiency,butatthesametime,naturalgasisalsopotentialdangerous,onceproducelargeleak,disposalnottimelycouldtrigger,thebigbangtopeople'slifeandpropertysafetybroughtgreatthreat.Facingthegasleakallkindsofaccidentscausedbythreats,weneedasolution.Useofnaturalgasalarmisdealwithgasinvisiblekilleroneoftheimportantmeans.Thispaperstothesemiconductorgassensorsandsinglechipmicrocomputerasthecoredesigncanrealizethegasalarmsound-lightalarmfunctions,isakindofsimplestructure,stableperformance,easytouse,inexpensiveandintelligentgasalarm,hascertainpracticalvalue.AmongthemwechooseMQ-2ofgasdetectionsensor,ithasahighsensitivity,fastresponse,stronganti-jammingcapabilityetc,andthepriceislow,servicelifelong.byAT89C51forprocessingthedataandanalysis,whetherisequaltoorgreaterthantheadefaultvalue(thatis,thealarmlimit),ifbeyondthelimitthanitwillautomaticallystartalarmcircuitwarningvoice,otherwiseconverselyfornormalstate.Inthisdesign,weconnectedDS18B20temperaturesensorandtheAT89C51micr-ocontroller,itturnsthetemperaturesignalsintothedigitalsignalwhichthemicrocontrollercanidentify.FinallythetemperatureofgaswillbedisplayedontheLEDdisplaytube.Keywords:gassensoralarmsinglechipmicrocomputertemperaturesensor本科毕业设计说明书(论文)第I页共II页目录1.1、课题研究的背景............................................................................................11.2、课题研究的意义............................................................................................21.3国内外研究情况及其发展...............................................................................21.3.1、可燃性气体泄漏报警器种类与结构..................................................21.3.2、国内外情况及其发展趋势..................................................................22天燃气泄漏报警系统的方案设计............................................................................32.1方案的选择.......................................................................................................32.2对于该警报器设计的要求...............................................................................32.3气体传感器的选型..........................................................................................42.3.1气体传感器介绍.....................................................................................42.3.2气体传感器的选定.................................................................................72.4天燃气泄露报警系统的整体设计方案..........................................................82.4.1天燃气泄露报警器工作原理.................................................................82.4.2天燃气泄露报警器的结构.....................................................................82.4.3气体检测报警器的功能.........................................................................93天燃气泄漏报警系统的硬件部分设计..................................................................103.1主控电路的设计............................................................................................103.1.1半导体气敏传感器...............................................................................103.1.2单片机的选择.......................................................................................153.1.3AT89C51单片机的介绍......................................................................163.1.4AT89C51单片机的时钟电路..............................................................193.1.5AT89C51单片机的复位电路..............................................................213.2外围接口电路的设计....................................................................................223.2.1驱动模块的选择..................................................................................223.2.2DS18B20温度传感器的介绍..............................................................233.2.3声音报警电路......................................................................................273.2.4气体检测模块和光报警电路...............................................................293.3总电路设计....................................................................................................314燃气泄漏报警系统的软件部分设计......................................................................324.1主程序设计流程与编程................................................................................324.1.1主程序设计流程图............................................................................