设计说明书
总字数:18000+
摘要
在马铃薯种植过程中,环境温湿度、二氧化碳浓度等参数的稳定与适宜,对马铃薯的生长发育、产量及品质有着至关重要的影响。传统的马铃薯环境监测主要依靠人工巡检,不仅耗时费力、效率低下,且难以实现对环境变化的实时响应和精准调控,无法满足规模化、精细化种植的需求。
基于 STM32F103C8T6 单片机的马铃薯环境监测系统,由两个从机和一个主机组成。从机整合了 DHT11 温湿度传感器、SGP30 二氧化碳传感器、通风机、风窗、加热装置、加湿装置、声光报警模块及 RS485 通信模块;主机则包含 RS485 通信模块、3 个独立按键、OLED 显示屏及 ESP8266WiFi 模块,实现了马铃薯种植环境的自动化监测与智能调控。系统核心功能包括:从机通过 DHT11 实时监测环境温湿度,通过 SGP30 监测二氧化碳浓度;当温度、湿度、二氧化碳浓度中任意一个高于设置最大值时,通风机快速转动且风窗完全打开,否则通风机低速转动且风窗打开一点;当温度低于设置最小值时,打开加热装置,否则关闭;当湿度低于设置最小值时,打开加湿装置,否则关闭;任意参数异常时触发声光报警,并通过 RS485 将数据发送至主机。主机通过 RS485 接收各从机数据,支持通过 3 个独立按键设置各参数值,以及按键控制各从机的通风机、风窗、加热装置和加湿装置;通过 OLED 显示屏实时显示各项监测数据;利用 ESP8266WiFi 模块将数据发送至手机端,手机端可设置各参数值及控制通风机、风窗、加热装置和加湿装置。
该系统的实现,有效提升了马铃薯种植环境调控的自动化与智能化水平,减少了人工干预,确保了环境参数的稳定与适宜,为马铃薯规模化种植提供了高效、可靠的解决方案,同时为同类作物环境监测设备的研发提供了参考,具有较高的实际应用价值。
关键词:STM32F103C8T6;马铃薯;环境监测系统;传感器;智能调控;RS485 通信
ABSTRACT
In the process of potato cultivation, the stability and suitability of environmental parameters such as temperature, humidity, and carbon dioxide concentration are crucial to the growth, yield, and quality of potatoes. Traditional potato environment monitoring mainly relies on manual inspection, which is not only time-consuming, labor-intensive, and inefficient, but also difficult to achieve real-time response and precise regulation to environmental changes, failing to meet the needs of large-scale and refined cultivation.
The potato environment monitoring system based on the STM32F103C8T6 microcontroller consists of two slaves and one master. The slaves integrate DHT11 temperature and humidity sensors, SGP30 carbon dioxide sensors, ventilators, air windows, heating devices, humidifying devices, sound and light alarm modules, and RS485 communication modules; the master includes an RS485 communication module, 3 independent buttons, an OLED display, and an ESP8266WiFi module, realizing automatic monitoring and intelligent regulation of the potato growing environment. The core functions of the system include: the slaves monitor the environmental temperature and humidity in real-time through DHT11 and the carbon dioxide concentration through SGP30; when any one of temperature, humidity, or carbon dioxide concentration is higher than the set maximum value, the ventilator rotates rapidly and the air window is fully opened, otherwise, the ventilator rotates at a low speed and the air window is slightly opened; when the temperature is lower than the set minimum value, the heating device is turned on, otherwise, it is turned off; when the humidity is lower than the set minimum value, the humidifying device is turned on, otherwise, it is turned off; when any parameter is abnormal, an audible and visual alarm is triggered, and data is sent to the master through RS485. The master receives data from each slave through RS485, supports setting various parameter values through 3 independent buttons, and controlling the ventilators, air windows, heating devices, and humidifying devices of each slave through buttons; displays various monitoring data in real-time through the OLED display; sends data to the mobile phone through the ESP8266WiFi module, and the mobile phone can set various parameter values and control the ventilators, air windows, heating devices, and humidifying devices.
The implementation of this system effectively improves the automation and intelligence level of environmental regulation in potato cultivation, reduces manual intervention, ensures the stability and suitability of environmental parameters, provides an efficient and reliable solution for large-scale potato cultivation, and also offers a reference for the research and development of environmental monitoring equipment for similar crops, with high practical application value.
Keywords: STM32F103C8T6; Potato; Environmental monitoring system; Sensor; Intelligent regulation; RS485 communication
目录
第 1 章 绪论
1.1 研究的目的及意义
1.2 国内外发展情况
1.3 本文主要研究内容
第2章 设计思路与方案论证
2.1 主要元器件选择
2.1.1 主控芯片选择
2.1.2 温湿度传感器选择
2.1.3 二氧化碳传感器选择
2.1.4 RS485 通信模块选择
2.1.5 按键模块选择
2.1.6 显示模块选择
2.1.7 WiFi 模块选择
2.1.8 声光报警模块选择
2.2整体设计方案
第 3 章 硬件设计
3.1 主控电路模块
3.2 温湿度传感器电路
3.3 二氧化碳传感器电路
3.4 RS485 通信模块电路
3.5 显示模块电路
3.6 WiFi 模块电路
3.7 按键模块电路
3.8 执行设备驱动电路
第4章 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 从机系统主流程设计
4.4 独立按键
4.5 OLED显示流程设计
4.6 温湿度检测模块子流程设计
4.7 SGP30模块子流程设计
4.8 RS485模块子流程设计
4.9 WiFi模块子流程设计
第 5 章 实物测试
5.1 整体实物测试
5.2 温湿度传感器功能测试
5.3 二氧化碳传感器功能测试
5.4 RS485 通信模块功能测试
5.5 WiFi 模块功能测试
5.6 声光报警模块功能测试
5.7 按键设置与显示功能测试
第 6 章 总结与展望
6.1 总结
6.2 展望
致谢
参考文献
附录
附录一:原理图
附录二:PCB
附录三:主程序
购买后可查看具体内容!