家居环境可燃气体监测系统设计摘要:本设计提出了一个基于MQ-2传感器和STC12C5604AD单片机的家居环境可燃气体监测系统的设计方案。本设计主要包括七个组成部分:电源模块、传感器电路模块、MCU控制模块、LCD显示模块、报警电路模块、串口通信模块和上位机模块。本系统的MCU采用自带ADC功能的增强型51单片机STC12C5604AD。传感器MQ-2将可燃气体浓度信息转换成电压信号,由MCU的ADC采集电压,将电压值通过换算转换成对应的浓度值用于LCD显示,并通过串口将浓度值发送给上位机。上位机部分实现对可燃气体浓度曲线的动态显示,报警浓度门限设置以及对报警装置的控制等功能。关键词:可燃气体监测系统,MQ-2,STC12C5604AD,上位机Abstract:ThisdesignputsforwardaschemeofcombustiblegasmonitorbasedonsensorofMQ-2andSTC12C5604ADmicrocontroller.Thisdesignmainlyincludessevenparts:powersupplymodule,sensormodule,MCUcontrolmodule,LCDmodule,alarmcircuitmodule,serialportcommunicationmoduleandaPCmodule.ThesystemUSEStheMCUofSTC12C5604ADwhichincludeADCfunction.SensorMQ-2willconvertflammablegasconcentrationinformationintovoltagesignal,UsingtheADCtocollectthevoltage,TheMCUconvertthevoltagevalueintothecorrespondingconcentrationvaluesforLCDdisplay,AndsenttheconcentrationvaluestoPCthroughtheserialport.ThePCrealizecombustiblegasconcentrationcurvedynamicdisplayfunction,alarmvaluesettingandthealarmdevicecontrolandotherfunctions.Keywords:Combustiblegasmonitoringsystem,MQ-2,STC12C5604AD,PC目录1前言..........................................................................................................................................12总体方案设计..........................................................................................................................22.1设计方案比较...................................................................................................................22.2方案论证...........................................................................................................................32.3方案选择...........................................................................................................................33单元模块设计..........................................................................................................................43.1特殊器件介绍...................................................................................................................43.2电路参数的计算及元器件的选择...................................................................................73.3各单元模块功能介绍及电路设计...................................................................................83.4各单元模块的联接.........................................................................................................124软件设计................................................................................................................................134.1软件设计原理及设计所用工具.....................................................................................134.2系统软件设计结构图及其功能.....................................................................................134.3主要软件设计流程框图及说明.....................................................................................145系统调试................................................................................................................................185.1硬件调试.........................................................