基于STM32与机器视觉检测的粮仓环境监管系统设计
Design of a Grain Storage Environment Monitoring System Based on STM32 and Machine Vision Inspection
DOI: 10.12677/jsta.2026.142026, PDF,    科研立项经费支持
作者: 刘 正, 王利众:中央民族大学信息工程学院,北京
关键词: 粮仓监管远程控制物联网视觉检测STM32Grain Silo Monitoring Remote Control Internet of Things Visual Inspection STM32
摘要: 粮食安全是农业生产与仓储管理的核心诉求,当前粮仓环境监管中,数据检测不准确、不及时及人工抽样检测易遗漏等问题频发,不仅影响监管效率,还可能引发粮食霉变、虫害泛滥等风险,直接威胁粮食储存安全与经济效益。为破解这一难题,本文设计了一种基于STM32F103系列微控制器的主控单元监管系统,通过DHT11温湿度传感器、MQ-2烟雾传感器及SGP30二氧化碳模块,精准采集粮仓内温湿度、烟雾浓度、二氧化碳含量等关键环境数据,再借助ESP8266-01S无线Wi-Fi模块,基于稳定高效的MQTT协议将本地传感器数据上传至云端平台,并同步更新至手机APP端实现实时可视化显示。此外,在K230视觉识别模块上部署基于改进YOLOv8n算法自训练的虫害检测模型,该模型优化了检测精度与实时性,可精准识别粮仓内老鼠、麻雀、蟑螂三类常见有害生物,检测结果同步至手机端供管理人员查看。当粮仓内任意环境参数超出预设安全阈值时,系统将自动触发声光报警,为粮仓环境的协同监管提供全流程、智能化的有力保障。
Abstract: Food security constitutes the core imperative of agricultural production and storage management. Current grain storage environment monitoring frequently encounters issues such as inaccurate and untimely data detection, alongside the risk of omission in manual sampling inspections. These shortcomings not only compromise regulatory efficiency but may also precipitate risks including grain moulding and pest infestations, directly jeopardising storage safety and economic viability. To address this challenge, this paper proposes a monitoring system centred on an STM32F103 series microcontroller. Utilising the DHT11 temperature and humidity sensor, MQ-2 smoke sensor, and SGP30 carbon dioxide module to precisely collect critical environmental data including temperature, humidity, smoke concentration, and carbon dioxide levels within the silo. Utilising an ESP8266-01S wireless Wi-Fi module, the system transmits local sensor data to a cloud platform via the stable and efficient MQTT protocol, synchronising updates to a mobile application for real-time visualisation. Furthermore, the K230 visual recognition module deploys a self-trained pest detection model based on an enhanced YOLOv8n algorithm. This model optimises detection accuracy and real-time performance, precisely identifying three common pests within the silo: rodents, sparrows, and cockroaches. Detection results are synchronised to the mobile interface for management personnel to review. Should any environmental parameter within the silo exceed preset safety thresholds, the system automatically triggers audible and visual alarms. This provides comprehensive, intelligent safeguards for collaborative monitoring of the silo environment throughout its entire operational lifecycle.
文章引用:刘正, 王利众. 基于STM32与机器视觉检测的粮仓环境监管系统设计 [J]. 传感器技术与应用, 2026, 14(2): 258-268. https://doi.org/10.12677/jsta.2026.142026

参考文献

[1] 钱生越, 张旭东, 孔爱民, 等. 粮食烘干储藏一体化物联网监控系统初探[J]. 农业开发与装备, 2023(2): 20-23.
[2] Baig, M.J.A., Iqbal, M.T., Jamil, M. and Khan, J. (2021) Design and Implementation of an Open-Source IoT and Blockchain-Based Peer-to-Peer Energy Trading Platform Using ESP32-S2, Node-Red and, MQTT Protocol. Energy Reports, 7, 5733-5746. [Google Scholar] [CrossRef
[3] 孙洁, 许清河, 刘晓悦. 基于NB-IoT技术的远程粮情监控系统设计[J]. 自动化与仪表, 2020, 35(4): 86-89+93.
[4] 杨莹莹, 唐朝, 卢月静, 等. 基于单片机的粮仓温湿度检测与示警系统设计[J]. 农业工程, 2025, 15(5):126-130.
[5] 刘阳, 剡海静. 基于物联网技术的智慧粮仓系统架构设计与实现[J]. 物联网技术, 2025, 15(20): 133-136+140.
[6] Chong, J.L., Chew, K.W., Peter, A.P., Ting, H.Y. and Show, P.L. (2023) Internet of Things (IoT)-Based Environmental Monitoring and Control System for Home-Based Mushroom Cultivation. Biosensors, 13, Article 98. [Google Scholar] [CrossRef] [PubMed]
[7] 周瑾, 周爱平. 基于人工智能的虫情监测系统设计[J]. 软件, 2023, 44(8) : 72-75.
[8] Akinwumi, S.A., Okey-Amadi, O., Ayara, W.A. and Akinwumi, O.A. (2024) Eco-friendly Weather Monitoring Device Using Arduino Mega and Sensor Integration. IOP Conference Series: Earth and Environmental Science, 1428, Article 012006. [Google Scholar] [CrossRef
[9] Zhang, S., Chen, Y., Wang, B., Pan, D., Zhang, W. and Li, A. (2024) SPTNet: Sparse Convolution and Transformer Network for Woody and Foliage Components Separation from Point Clouds. IEEE Transactions on Geoscience and Remote Sensing, 62, 1-18. [Google Scholar] [CrossRef
[10] 李智峰, 毕文洋, 谷瑞军. 空调节能与监管一体化平台设计与实现[J]. 电脑知识与技术, 2023, 19(15) : 87-89+95.
[11] 何启明, 刘鹏来, 钟志国, 等. 基于多传感器融合的智能避障系统设计与实现[J]. 现代信息科技, 2025, 9(23): 23-28+34.