设计说明书
总字数:17000+
本论文设计了一种基于单片机的大棚环境监测系统,旨在实现对大棚内温度、湿度、光照、CO2浓度和水质pH值等参数的监测和控制。所采用的单片机为STM32F103C8T6,并通过各种传感器和功能模块实现了以下功能:温度控制功能:利用DS18B20温度传感器测量环境温度,当温度超出设定范围时,系统将启动加热或制冷装置,并触发声光报警以调节温度。湿度控制功能:通过土壤湿度传感器测量土壤湿度,当湿度低于设定最小值时,系统将启动水泵进行加水直至达到最大值,并触发声光报警以维持适宜的土壤湿度。光照控制功能:通过光敏电阻检测光照值,当光照不足时,系统将启动补光装置以提供足够的光照。CO2控制功能:利用SGP30传感器检测CO2浓度,当CO2值超出设定上限时,系统将启动通风换气装置,并触发声光报警以保持室内空气质量。pH控制功能:通过pH传感器检测水质pH值,当pH值超出设定范围时,系统将触发声光报警以提醒用户调整水质。按键控制功能:通过按键可以设置各种阈值,手动控制各个继电器的开关状态,并切换系统的工作模式。数据显示功能:通过OLED显示屏可以实时显示各项测量值,方便用户观察和监测。远程控制功能:通过WIFI模块,将数据远程发送到手机端,用户可以通过手机端调整各项阈值、远程控制继电器的开关状态,并切换系统的工作模式。通过以上功能的实现,该大棚环境监测系统可以实时监测和控制大棚内的关键环境参数,提供智能化的环境管理和调节,有助于提高农作物的生长质量和产量,并提供便捷的远程控制和监测方式。未来的研究方向可以包括进一步优化系统算法、增加更多传感器和功能模块,以及进行实际应用测试,验证系统的可行性和效果。
This paper presents the design of a greenhouse environmental monitoring system based on a microcontroller, aiming to monitor and control parameters such as temperature, humidity, light intensity, CO2 concentration, and pH level inside the greenhouse. The microcontroller used in the system is STM32F103C8T6, and various sensors and functional modules are employed to achieve the following functionalities:Temperature control: The DS18B20 temperature sensor is used to measure the environmental temperature. When the temperature exceeds the set range, the system activates heating or cooling devices and triggers audio-visual alarms to adjust the temperature.Humidity control: The soil moisture sensor is used to measure the soil humidity. When the humidity falls below the set minimum value, the system starts the water pump to irrigate the soil until it reaches the maximum value, accompanied by audio-visual alarms to maintain optimal soil moisture.Light control: The system utilizes a photosensitive resistor to detect the light intensity. If the light intensity is insufficient, the system activates supplementary lighting to provide adequate illumination.CO2 control: The SGP30 sensor is employed to measure the CO2 concentration. When the CO2 value exceeds the set upper limit, the system initiates ventilation and exhaust systems while triggering audio-visual alarms to maintain indoor air quality.pH control: The pH sensor is used to monitor the water pH level. If the pH value exceeds the set range, the system triggers audio-visual alarms to prompt users to adjust the water quality.Keypad control: Various thresholds can be set using a keypad, allowing manual control of relays and mode switching within the system.Data display: Real-time measurement values are displayed on an OLED screen, facilitating user observation and monitoring.Remote control: The system incorporates a WiFi module to enable remote data transmission to a mobile device. Users can adjust thresholds, remotely control relay switches, and switch system modes via a mobile application.By implementing the above functionalities, the greenhouse environmental monitoring system provides real-time monitoring and control of crucial environmental parameters, offering intelligent environmental management and regulation. It contributes to improving crop growth quality and yield while providing convenient remote control and monitoring capabilities. Future research directions may include further algorithm optimization, integration of additional sensors and functional modules, and practical application testing to validate the system’s feasibility and effectiveness.
Keywords:microcontroller;WiFi fan;environmental monitoring; remote control;sensors
目 录
摘要
Abstract
第1章 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 论文的主要内容
第2章 系统总体设计方案
2.1系统总体设计
2.2主要模块方案选择
2.2.1 主控模块方案选择
2.2.2 显示模块方案选择
第3章 硬件设计
3.1 主控模块电路设计
3.2 环境温度模块电路设计
3.3 土壤湿度模块电路设计
3.4 CO2监测模块电路设计
3.5 PH检测模块电路设计
3.6 光照强度模块电路设计
3.7 继电器模块电路设计
3.8 显示模块电路设计
3.9 声光报警模块电路设计
3.10 按键模块电路设计
第4章 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 温度检测模块子流程
4.5 OLED显示流程设计
4.6 A/D模数转换子流程
第5章 实物测试
5.1 整体实物焊接图
5.2 环境温度检测实物测试
5.3 土壤湿度检测实物测试
5.4 CO2检测实物测试
5.5 PH值检测实物测试
5.6 光照强度检测实物测试
第6章 总结展望
参考文献
附录
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!