基于单片机的空气质量检测仪的设计与实现Designandimplementationofairqualitydetectorbasedonsinglechipmicrocomputer摘要随着社会的不断发展与科学技术的日新月异,家庭住所作为人们日常起居生活最核心的区域越来越被人们所关注。特别是近年来,外界环境污染愈发严重,人们越来越渴望自己的居所在满足日常基本起居的同时更能够为自己提供一个安全、舒适、温馨的环境。为此,人们在需要相应的空气净化设备同时,更需要一种简洁、方便、有效、功能齐全、面向家居的空气质量检测设备。将检测与控制相结合,实现设备间的智能联动。本文所构建了家居的空气质量监控系统面向于现代家居环境能够检测并显示出温度,湿度和PM2.5各项实时数据。本系统以STC89C52单片机为核心,主要包括传感器温湿度采集,传感器PM2.5采集,LCD液晶显示,声光报警和按键设置等部分。系统通过搭建的传感器元件采集家居中温度、湿度和PM2.5浓度,并实时显示上述采集数据。此外,采集上来的数据与单片机内部设定的整定值比较。当数据不合标准时发出报警信号并开启相应设备通知家居主人。最后,本文将设计的系统在PROTUES环境下进行了仿真,验证了设计的正确性,可行性。本设计借鉴了市场现有的产品以及环境质量现有的研究成果。集实用性,高效性,经济性于一身。为今后智能家居的发展提供了新的思路。关键词:单片机空气质量传感器AbstractWiththedevelopmentofthetimesandtheadvancementofscienceandtechnology,familyresidenceisakeyareainpeople'sdailylivesandhasattractedwidespreadattention.Especiallyinthepastfewyears,thepollutionoftheexternallivingenvironmenthasbecomemoreandmorefrequent.Peopleexpectthattheirresidencecanprovideabetterenvironmentalconditionfortheirresidencewhilemeetingtheirdailylivingneeds.Anairpurifierisneededinlife.Thispurificationequipmentcanpurifytheairveryefficiently,conciselyandconveniently,anditisconvenientforhomeuse.Thisdevicecanalsorealizetheinteractionbetweendevices.Thehomeairqualitymonitoringsystemdesignedinthisarticlecandetectthemodernhomelivingenvironment.STC89C52isusedasthesystemcontroller,whichcontainstemperaturesensorsandhumiditysensorstocollectambienttemperatureandhumidityandPM2.5data,andthesystemusesTheLEDscreendisplaysthedata,andalsoincludesdifferentpartssuchassoundandlightalarmsandkeyconfiguration.Thesystemusesandsensorsoftwaretocollectthedataintheenvironmentanddisplayitinrealtime.Ifthecollecteddatadoesnotmeettherelevantstandards,analarmwillbeissuedtoinformthepeopleathome.Afterusingthesystemdesignedbyit,simulationwascarriedoutunderthePROTUESenvironment,whichconfirmedthescientificandreasonabledesign.Thissystemhasstrongpracticalvalueandeconomicvaluebyvirtueoftheproductsalreadyinthecashmarketandthescientificresearchresultsofenvironmentalqualitymonitoring.Itprovidesanewmethodandwayforthefurtherdevelopmentofsmarthomesinthefuture.Keywords:Single-Chip-Micro-computeAir-qualitySensorII目录第1章绪论..................................................11.1设计背景及意义.........................................11.2家居环境监测系统现状...................................11.3设计目的及内容.........................................2第2章系统总体方案设计......................................42.1设计要求...............................................42.2方案选择...............................................42.2.1温湿度传感器的选择..................................42.2.2PM2.5传感器的选择..................................42.2.3单片机的选择........................................5第3章系统硬件设计..........................................63.1整体方案设计...........................................6...