河南理工大学毕业设计(论文)说明书I摘要随着工业水平和科技水平的提高,人们越来越多的开始关注安全问题,尤其是日常生活实用的煤气存储问题,近年来每年都会有这样的报道,由于煤气泄漏造成的人员伤亡和财产损失。尽管市场上已经存在一些煤气警报器,但是简单的报警无法从根本上解决问题,无法及时的自动的处理险情并且报警寻求帮助。目前互联网、物联网已经成为大势所趋,因此本文介绍了一个基于局域网络的煤气监控系统,该系统以STM32F103ZET6为核心,采用TCP/IP协议,利用下位机的WIFI模块,通过局域网将检测到的信息实时传输给上位机。该系统下位机配以煤气传感器、温湿度传感器、WiFi传输模块、排风扇、TFT_LCD显示模块等,上位机为以C++为基础的MFC编程,利用VC++6.0平台,建立可视化窗口,完成对下位机传输数据的实时显示,及时了解煤气罐存储的环境信息,实时检测煤气是否发生泄漏,气体存储的条件是否适宜。该系统可完成对煤气浓度的采集,显示,数据处理,声光报警,控制执行机构等功能,同时还对煤气存储的条件进行监控,确保气体在存储时环境适宜。本系统对煤气的检测利用的是半导体气敏元件MQ_2气体传感器,MQ_2气体传感器使用的气敏材料,这种气敏材料是电阻值较高的二氧化锡(SnO2)。当传感器所处环境中存在可燃气体时,传感器的电阻值随空气中可燃气体浓度的增加而减小。使用简单的电路即可测量,其原理是将电阻值的变化转换为与该气体浓度相对应的输出信号。存储环境的检测采用DHT11传感器,该传感器包括一个电阻式感湿元件,还有一个NTC测温元件,能准确对存储环境的温湿度进行测量。该系统集成度高,可靠性好,工作稳定,信息传输安全可靠,实时性好,操作简单方便,便于煤气罐存储环境的监测。关键词:局域网;C++上位机;液化气浓度检测;气体环境检测;河南理工大学毕业设计(论文)说明书IIabstractWithimprovementofindustriallevelandthelevelofscienceandtechnology,moreandmorepeoplebegantoattentiontosecurityissues,especiallyinthedailylifeandpracticalgasstorageproblems,inrecentyearseveryyearreportedduetoagasleakcausedcasualtiesandpropertylosses.Althoughtherearesomegasalarmsonthemarket,butthesimplealarmcannotfundamentallysolvetheproblem,cannotbetimelyautomatichandlingofdangeroussituationsandthepolicetoseekhelp.TheInternet,Internethasbecomethetrendofthetimes.Therefore,thispaperintroducestheagasmonitoringsystembasedonlocalareanetwork,thesystemstm32f103zet6asthecore,theuseofTCP/IPprotocol,usingWiFimoduleofthelowerpositionmachine,throughtheLANwilldetectinformationreal-timetransmissiontothehostcomputer.Thehypogynousmachinetogassensors,temperatureandhumiditysensors,WiFitransmissionmodule,exhaustfan,TFTLCDdisplaymodule,PCisinC++isbasedontheMFCprogramming,usingVC++6.0platform,avisualizationwindow,onthelowerpositionmachinedatatransmissionreal-timedisplaying,timelyunderstandingofthegasstoragetankofenvironmentalinformation,thereal-timedetectionofthegasleak,gasstoragesuitability.Thesystemcancompletetheacquisitionofgasconcentration,display,dataprocessing,soundandlightalarm,controltheactuatorandconditionsofgasstoragemonitoring,ensurethatgasisstoredinasuitableenvironment.ThesystemofgasdetectionanduseofthesemiconductorgassensorMQ_2gassensor,MQ_2gassensorusingthegassensitivematerialisinthecleanairresistanceofthehighervalueoftwotinoxide(SnO2).Thechangeoftheresistancevaluecanbeconvertedintoanoutputsignalcorrespondingtothegasconcentrationbyusingasimplecircuit.TheDHT11sensorisusedfordetectingthestorageenvironment,thesensorcomprisesaresistivesensorandaNTCtemperaturemeasuringelement,whichcanaccuratelymeasurethetemperatureandhumidityofthestorageenvironment.Thesystemhastheadvantagesofhighintegration,goodreliability,stableoperation,reliableinformationtransmission,goodreal-timeperformance,simpleoperationandconvenientmonitoringofthestorageenvironmentofthegastank.Keywords:localareanetwork;C++hostcomputer;liquefiedgasconcentrationdetection;河南理工大学毕业设计(论文)说明书III目录第一章绪论...............................................................11.1课题研究的背景......................................................11.2煤气罐存储安全研究的意义............................................2第二章煤气罐仓库环境监控系统总体方案设计.................................32.1煤气罐仓库环境监控系统设计的总体原则................................32.2煤气罐仓库环境监控系统设计的基本功能................................32.3煤气罐仓库监控系统元器件选取原则....................................4第三章煤气罐监控系统硬件电路设计..........................................63.1煤气罐仓库监控系统系统硬件总体框图..................................63.2STM32单片机的特点及应用.............................................63.3系统检测装置简介....................................................83.3.1烟雾传感器MQ-2..................................................83.3.2温湿度传感器DHT11..............................................93.3.312位AD转换....................................................113.4通信及显示模块.....................................................133.4.1显示模块.......................................................133.4.1.1TFT-LCD....................................................133.4.1.2可变静态存储器FSMC.........................................143.4.2通信模块ESP8266................................................163.5电源转换电路.......................................................173.6通风报警电路.......................................................18第四章煤气罐仓库环境监控系统软件设计....................................204.1煤气罐仓库环境监控系统下位机设计...................................204.1.1下位机程序设计思路及流程图......................................204.1.2下位机通讯协议TCP/IP...........................................244.1.3下位机环境信息检测及传输........................................264.2煤气罐仓库环境监控系统上位机设计...................................284.2.1上位机编写平台及语言简介........................................284.2.2上位机编程语言的简介...........................................304.2.3上位机功能及实现...............................................31第五章结论与展望.........................................................375.1结论...............................................................375.2展望...............................................................37致谢.....................................................................39参考文献...............