news 2026/6/15 13:48:40

【dz-661】基于单片机的大棚环境监测系统

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【dz-661】基于单片机的大棚环境监测系统

摘要

随着现代化农业的快速发展,大棚环境的精准调控对提升作物产量、改善农产品品质具有重要意义。传统的人工管理方式不仅依赖经验判断、响应滞后,还存在劳动强度大、参数控制不一致等问题,难以满足规模化、智能化种植的需求。​

基于 STM32F103C8T6 单片机的大棚环境测控系统,整合了 DHT11 温湿度传感器、MH-Z19 二氧化碳传感器、FC-28 土壤湿度传感器、5516 光照检测模块、RTC 时钟模块、按键、OLED 显示屏、ECB02 蓝牙模块及执行设备(通风装置、加热装置、降温装置、灌溉设备、补光设备等),实现了大棚环境的自动化监测与智能调控。系统核心功能包括:通过 DHT11 实时监测温湿度,当温度过高时启动通风或降温装置,温度过低时触发加热,湿度过低时联动灌溉设备增湿;通过 MH-Z19 检测二氧化碳浓度,低于阈值时启动增施装置,过高时启动通风;借助内部 RTC 同步时间并设定补光时段,结合光照检测模块,当光照值低于阈值且处于补光时段时自动补光;通过 FC-28 检测土壤湿度,低于阈值时控制灌溉设备浇水;支持通过按键修正时间、设置各参数阈值,以及手动控制通风、加热、降温、灌溉、补光和模式切换;通过 OLED 显示屏实时显示各项监测数据及设备状态;利用蓝牙模块将数据同步至手机端,实现远程监测与设备控制(通风、加热、降温、灌溉、补光及模式切换)。​

该系统的实现,有效提升了大棚环境调控的自动化与智能化水平,减少了人工干预,确保了环境参数的稳定与精准,为规模化作物种植提供了高效、可靠的解决方案,同时为同类农业环境测控设备的研发提供了参考,具有较高的实际应用价值。

关键词:STM32F103C8T6;大棚环境;测控系统;传感器;智能调控;蓝牙通信

ABSTRACT

With the rapid development of modern agriculture, precise regulation of greenhouse environments is of great significance for improving crop yield and enhancing agricultural product quality. Traditional manual management methods not only rely on empirical judgment with delayed responses but also suffer from high labor intensity and inconsistent parameter control, making them difficult to meet the needs of large-scale and intelligent cultivation.​

The greenhouse environment measurement and control system based on the STM32F103C8T6 microcontroller integrates hardware such as DHT11 temperature and humidity sensors, MH-Z19 carbon dioxide sensors, FC-28 soil moisture sensors, 5516 light detection modules, RTC clock modules, buttons, OLED displays, ECB02 Bluetooth modules, and executive devices (ventilation devices, heating devices, cooling devices, irrigation equipment, supplementary lighting equipment, etc.), realizing automatic monitoring and intelligent regulation of the greenhouse environment. The core functions of the system include: real-time monitoring of temperature and humidity through DHT11, activating ventilation or cooling devices when the temperature is too high, triggering heating when the temperature is too low, and linking irrigation equipment to increase humidity when the humidity is too low; detecting carbon dioxide concentration through MH-Z19, starting fertilization devices when it is below the threshold, and activating ventilation when it is too high; synchronizing time with the internal RTC and setting supplementary lighting periods, and combining with the light detection module to automatically supplement light when the light value is lower than the threshold and within the supplementary lighting period; detecting soil moisture through FC-28 and controlling irrigation equipment to water when it is below the threshold; supporting time correction, setting of various parameter thresholds through buttons, as well as manual control of ventilation, heating, cooling, irrigation, supplementary lighting, and mode switching; real-time display of various monitoring data and equipment status through the OLED display; synchronizing data to the mobile phone via the Bluetooth module to achieve remote monitoring and equipment control (ventilation, heating, cooling, irrigation, supplementary lighting, and mode switching).​

The implementation of this system effectively improves the automation and intelligence level of greenhouse environment regulation, reduces manual intervention, ensures the stability and accuracy of environmental parameters, provides an efficient and reliable solution for large-scale crop cultivation, and also offers a reference for the research and development of similar agricultural environment measurement and control equipment, with high practical application value.

Keywords:STM32F103C8T6; Greenhouse environment; Measurement and control system; Sensor; Intelligent regulation; Bluetooth communication

目录

第1章 绪论

1.1 研究的目的及意义

1.2 国内外发展情况

1.3 本文主要研究内容

第2章 设计思路与方案论证

2.1 主要元器件选择

2.1.1 主控芯片选择

2.1.2 二氧化碳传感器选择

2.1.3 光照检测模块选择

2.1.4 氮磷钾及多参数检测模块选择

2.1.5 按键模块选择

2.1.6 显示模块选择

2.1.7 蓝牙模块选择

2.2整体设计方案

第 3 章 硬件设计

3.1 主控电路模块

3.2 二氧化碳传感器电路

3.3 光照检测模块电路

3.4 ZTS-300Z 多参数检测模块电路

3.5 显示模块电路

3.6 蓝牙模块电路

3.7 按键模块电路

3.8 执行设备驱动电路

第4章 系统程序设计

4.1 编程软件介绍

4.2 系统主流程设计

4.3 OLED显示子流程设计

4.4 独立按键子流程设计

4.5 SGP30模块子流程设计

4.6 ADC模数转换子流程设计

4.7 土壤环境检测模块子流程设计

4.8 蓝牙模块子流程设计

第 5 章 实物测试

5.1 整体实物测试

5.2 二氧化碳传感器功能测试

5.3 光照检测模块功能测试

5.4 ZTS-300Z 多参数检测模块功能测试

5.5 蓝牙模块功能测试

5.6 执行设备功能测试

5.7 按键设置与显示功能测试

第6章 总结与展望

6.1 总结

6.2 展望

致谢

参考文献

附录

附录一:原理图

附录二:PCB

附录三:主程序

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/6/15 11:44:05

【芯片寿命的隐形裁判:深入解析TDDB失效机制与防护策略】

一层薄至纳米级的栅氧化层,如何决定芯片的寿命?在芯片可靠性领域,时间相关介质击穿(TDDB)被视为影响长期可靠性的关键因素之一。随着工艺节点不断缩小,栅氧化层厚度已接近物理极限,TDDB问题变得…

作者头像 李华
网站建设 2026/6/15 11:46:44

【风电光伏功率预测】别再只盯“准确率”了:把不确定性变成收益,分布式预测怎么决定报量“偏保守”还是“偏进攻”?

很多新能源场站现在最痛的一件事,不是“预测不够准”,而是——明明误差差不多,结算出来的钱却差很多。原因很简单:在电力市场越来越“日清月结、偏差结算”的环境里,你报的不是一条曲线,你报的是一张“风险…

作者头像 李华
网站建设 2026/6/15 11:50:18

Hunyuan-MT-7B翻译模型5分钟快速部署指南:支持33种语言互译

Hunyuan-MT-7B翻译模型5分钟快速部署指南:支持33种语言互译 1. 为什么你需要这个5分钟部署指南? 你是否试过下载一个号称“开箱即用”的翻译模型,结果卡在环境配置、依赖冲突、显存报错上整整一上午?或者明明看到文档写着“支持…

作者头像 李华