


摘 ?要: 設(shè)計(jì)了一種基于STM32F103C8T6單片機(jī)的室內(nèi)有害氣體云端監(jiān)測系統(tǒng)。硬件部分包括環(huán)境參數(shù)感知單元、報(bào)警與控制單元、無線數(shù)據(jù)傳輸單元;軟件部分包括云服務(wù)器設(shè)計(jì),數(shù)據(jù)庫交互,監(jiān)測界面設(shè)計(jì)。硬件部分采用ESP8266的透傳模式進(jìn)行wifi傳輸,并使用Json打包技術(shù)保證數(shù)據(jù)的準(zhǔn)確性和完整性。云服務(wù)器端使用jsonToBean對json包進(jìn)行解析,并使用Springboot和mybatis框架對接收數(shù)據(jù)進(jìn)行控制和處理,前端采用http協(xié)議和thymeleaf模板實(shí)時(shí)展示數(shù)據(jù)庫存儲(chǔ)的數(shù)據(jù)。
關(guān)鍵詞: 有害氣體檢測;無線數(shù)據(jù)傳輸;云服務(wù)器;數(shù)據(jù)庫
中圖分類號(hào): TP311 ? ?文獻(xiàn)標(biāo)識(shí)碼: A ? ?DOI:10.3969/j.issn.1003-6970.2019.12.035
本文著錄格式:呂斌,孫玉國. 室內(nèi)有害氣體云端監(jiān)測系統(tǒng)設(shè)計(jì)[J]. 軟件,2019,40(12):158162
Design of Cloud Monitoring System for Indoor Hazardous Gases
LV Bin, SUN Yu-guo*
(School of Optical-Electrical and Computer Engineering, University of Shanghai for Science and Technology, Shanghai 200093)
【Abstract】: A cloud monitoring system for indoor hazardous gases based on STM32F103C8T6 microcontroller is designed. The hardware part includes the environmental parameter perception unit, the alarm and control unit, the wireless data transmission unit, and the software part includes the cloud server design, the database interaction, and the monitoring interface design. The hardware portion uses ESP8266's transmission mode for wifi transmission and uses Json packaging technology to ensure the accuracy and completeness of the data. The cloud server ?uses jsonToBean to parse the json package, controling and processing the receiving data using the Springboot and mybatis frameworks, with the front end using http protocols and thymeleaf templates to present the data stored in the database in real time.
【Key words】: Harmful gas detection; Wireless data transmission; Cloud servers; Database
0 ?引言
隨著人們生活水平日漸提高,室內(nèi)裝飾材料及家具的污染是目前造成室內(nèi)空氣污染的主要方面,主要包括甲醛、苯、甲苯、乙醇、氯仿等有機(jī)蒸 ? ? 氣[1-4]。同時(shí),室內(nèi)烹飪與吸煙的燃燒產(chǎn)物具有致癌性。因此,如何可靠、及時(shí)、安全地監(jiān)測出有毒有害氣體,并及時(shí)為監(jiān)測人員提供決策依據(jù)顯得尤為關(guān)鍵。
為了解決上述問題,提出了有害氣體云端監(jiān)測系統(tǒng)的設(shè)想,該系統(tǒng)是將傳感器、無線通信技術(shù)、計(jì)算機(jī)軟件編程等技術(shù)融為一體,以科學(xué)的方法監(jiān)測有害氣體濃度值變化。云平臺(tái)可以保證24小時(shí)對應(yīng)用服務(wù)的運(yùn)維監(jiān)控,公共外網(wǎng)可以實(shí)現(xiàn)隨時(shí)隨地
對服務(wù)器端進(jìn)行http請求,并查詢數(shù)據(jù)庫。云平臺(tái)具有多地域、全方位、立體式、智能化的IT運(yùn)維監(jiān)控的特點(diǎn)[5]。本文借助云平臺(tái)搭建了一套全方位發(fā)揮作用的高效、準(zhǔn)確、實(shí)時(shí)的有害氣體云端監(jiān)測 ? 系統(tǒng)?!?br>