基于单片机的气体质量检测系统的设计摘要本论文研究设计了一种用于公共场所及室内具有检测及超限报警功能的室内空气质量检测系统。其设计方案基于89C51单片机,选择瑞士蒙巴波公司的CH20/S-10甲醛传感器和MQ-5气体传感器。系统将传感器输出的4~20mA的标准信号通过以AD0832为核心的A/D转换电路调理后,经由单片机进行数据处理,最后由LCD显示甲醛浓度值。文中详细介绍了数据采集子系统、数据处理过程以及数据显示子系统和报警电路的设计方法和过程。系统对于采样地点超出规定的甲醛容许浓度和天然气规定浓度时采用三极管驱动的单音频报警电路提醒监测人员。同时,操作人员对于具体报警点的上限值可以通过单片机编程进行设置。另外,该系统对浓度信号进行了信号补偿等处理,减少了测量误差,因此,具有较高的测量精度,而且结构简单,性能优良。本系统的量程为0-10ppm,精度为0.039ppm。关键词:甲醛检测/天然气检测/AT89C52单片机IABSTRACTThisthesisdesignofapaperforpublicplacesandindoortestingandover-limitalarmfunctionswithindoorairqualitytestingsystem.Itsdesignisbasedon89C51singlechip,withthechoiceofMQ-5gassensorsandCH20/S-10formaldehydesensorfromSwitzerlandmengbabocompany.Sensorsystemwilloutput4~20mAstandardsignalthroughthecoreADC0832forA/Dconversioncircuitafterconditioning,bythesingle-chipmicrocomputerfordataprocessing,atlastdisplaytheformaldehydeconcentrationontheLCD.Thearticledetailedthedataacquisitionsubsystem,dataprocessinganddatadisplayandalarmsystemcircuitdesignmethodandprocess.WhenthesamplingsiteswhentheformaldehydeandNaturalgasconcentrationexceeded,Tothesingle-transistordrivecircuitaudioalarmwillsoundthealarm,Testingstafftoremind.Atthesametime,Theconcentrationofformaldehyde,Canbesetthroughthesingle-chipprogramming.Inaddition,thesystemsignalsaconcentrationcompensationsignalprocessing,areductionofmeasurementerror,therefore,haveahighmeasurementaccuracy,andsimplestructure,excellentperformance.Therangeofthesystemfor0-10ppm,accuracy0.039ppm.Keywords:Formaldehydedetection,Naturalgasdetection,AT89C52single-chipII目录中文摘要.............................................................................................I英文摘要...........................................................................................II1绪论.................................................................................................11.1引言................................................................................................12概述............................................................................................22.1系统总概述....................................................................................22.2总体方案设计................................................................................22.3硬件设计........................................................................................22.4软件设计........................................................................................32.5硬件结构........................................................................................32.6软件结构........................................................................................33硬件设计........................................................................................43.1硬件设计主电路图.......................................................................43.2硬件选择.......................................................................................43.2.1MCU的选择与简介.......................................