安徽建筑大学毕业设计(论文)专业:测控技术与仪器班级:二班学生姓名:胡磊学号:09210040203课题:锅炉温度控制系统设计指导老师:纪明伟2013年06月14日安徽建筑大学毕业设计(论文)摘要在调查对当前采暖需求情况的基础上,根据小型家用燃气锅炉的工作特点,再结合工程实际需要,研究了基于MCS-51单片机的家用燃气锅炉温度控制系统,旨在解决使用燃煤锅炉集中采暖时所遇到的锅炉温度不易控制的问题,改进家庭采暖的控制方式,提高采暖的经济性。利用Protel99se软件设计电路,对智能控制器的电源电路、报警电路、时钟电路、复位电路、LCD液晶显示电路以及控制器的核心—温度采集电路进行了设计。电源采用三端集成稳压器W7800(W7900)系列元件7805,交流220v电压转换为单片机所需要的5V电压;利用AT89S51作为控制器的核心器件;利用集成电路温度传感器DS18B20测量锅炉水温;并将测量的水温与设定值比较,另外系统使用LCD液晶显示器显示当前水位、水位的上下限值、当前采集的温度值和预先设定的温度报警值。当温度超过所设定的报警温度值,系统将发出报警声音,同时关闭锅炉燃烧器。等待温度降到下限值,这时就可以重新锅炉燃烧器通电,继续加温,如此反复监控温度。这样就可以提高能源的使用率,节约能源。针对系统的特点和要求,在上述硬件电路及实现方法的基础上,利用汇编语言,设计了基于单片机的锅炉温度控制系统。控制软件主要包括温度和温度采集子程序、水位控制程序、LCD液晶显示子程序等。关键词:单片机;温度控制;DS18B20;燃气锅炉;LCD;安徽建筑大学毕业设计(论文)ABSTRACTAccordingtothemarketdemandandthecharacteristicsofdomesticheating,thispaperdevelopsMCUintelligencecontrollerfortheminorgas-firedboilerwhichisdomesticheatingequipmentonthebasisofinvestigationofheatingdemandwidely.Theresearchpurposeistochangetheinconvenienceoftemperaturecontrolbringbyusingcoalfiredboilerforcentralizedheating,toincreaseeconomicsofheating.ThesoftwarecalledProtel99seforcircuitdesignedisusedtodevelopthehardwareofthecontroller.Thehardwareincludesthepowersupplycircuit,theresetcircuit,theclockcircuit,thealarmcircuit,theLCDdisplaycircuit,andthetemperaturecollectionwhichisthecoreofthiscontroller.Thethree-pinintegrated-circuitvoltageregulatorW7800(7900)seriescomponent7805isusedforthepowersupply.TheAtmelAT89S51chipisthecorechipofthecontroller.TheintegratedtemperaturesensorDS18B20isusedtomeasurewatertemperatureinboiler.Thekeycircuitisusedtosetthealermtemperatureandanalogwaterinorout.Inaddition,LCDisusedtodisplaywaterlevelbound,currentwaterlevel,temperaturealermvaluebypresuppositionandcurrenttemperature.Whenwaterlevelbeyonditsboundorwhencurrenttemperaturebeyonditsalermvalue,thesystemgivesanalermandmakesboilerburneroff.Whenwatertemperatureisdown,thesystemreleasesalermandmakesboilerbureneron.Thesystemdoesitagainandagain.Sothesystemcansaveenergyandimproveenergyutilizationrate.Aimatthedemandandcharacteristicofthesystem,onthebasisofthesehardwareandimplementmethod,usingassemblelanguage,systemdesignsboilertemperaturecontrolsystemdesignbasedonsinglechip.Thissoftwareincludestemperatureandwaterlevelmonitormainprogram,temperaturecollectionsubprogram,analoywaterinandoutsubprogram,keyboardscansubprogram,LCDdisplaysubprogrametc.Keywords:MCU;Temperaturecontrol;DS18B20;Gasboiler;LiquidCrystalDisplay;安徽建筑大学毕业设计(论文)目录1绪论.....................................................................................................................................................11.1课题背景.................................................................11.2课题研究的目的及意义......................................................21.3系统的总体设计思想........................................................22系统方案选择及工作原理....................................................................................................................42.1系统设计方案..............................................................42.2系统结构框图..............................................................52.2.1主要器件的选择......................................................72.2.2辅助器件选择........................................................73硬件电路设计.......................................................................................................................................83.1主控单片机AT89S51芯片介绍................................................83.1.1主要性能特点........................................................83.1.2AT89S51管脚说明....................................................93.2单片机最小系统...........................................................11图3.2最小单片机系统....................................................113.2.1时钟电路...........................................................113.2.2复位电路...........................................................123.3温度控制电路设计.........................................................123.4按键电路设计.............................................................133.5水位检测电路设计.........................................................133.6稳压电源电路设计.........................................................143.7温度传感器选择及温度采集电路.............................................163.7.1DS18B20简介.......................................................163.7.2温度采集电路.......................................................173.8输出模块.................................................................173.8.1固态继电器SSR.....................................................173.8.2报警电路设计.......................................................193.8.3液晶显示电路设计...................................................194系统软件的设计.................................................................................................................................224.1系统主程序..............................................................224.2子模块软件设计...........................................................224.2.1A/D转换环节子程序设计.............................................234.2.2DS18B20温度采集子程序设计.........................................244.2.3LCD