设计说明书
总字数:14000+
摘要
在农业种植、园艺培育等场景中,土壤温湿度及环境气体浓度的精准监测是保障植物健康生长的关键。土壤温湿度异常若不能及时调控,可能导致作物生长迟缓、产量下降;环境中 CO₂浓度失衡也会影响植物光合作用效率。因此,研发一种能实时监测、自动调控且便于远程管理的土壤环境检测系统具有重要实用价值。
本设计提出一种基于 STM32F103C8T6 单片机的土壤温湿度检测系统。系统主要功能包括:通过防水式 DS18B20 传感器检测当前土壤的温度数据;借助 YL-69 土壤湿度检测模块获取土壤湿度值,当湿度小于预设最小值时自动驱动继电器开启灌溉,直至湿度达到最大值后停止;通过 SGP30 传感器检测环境中的 CO₂浓度;用户可通过按键设置土壤湿度的上下阈值;OLED 显示屏实时展示温度、湿度、CO₂浓度等数据;通过 WIFI 模块将测量数据上传至手机端,支持远程设置阈值、控制灌溉操作、查询历史数据及查看历史数据折线图;系统采用锂电池供电,保障便携性与持续工作能力。
该系统的作用在于构建了 “实时监测 – 自动调控 – 远程管理” 的土壤环境管理体系。通过多参数同步检测全面掌握土壤与环境状况,自动灌溉功能减少人工干预;远程数据交互与历史分析功能为种植决策提供数据支持。为农业生产、园艺管理等场景提供了便捷、高效的土壤环境监测解决方案,助力提升种植管理的科学性与智能化水平。
关键词:单片机;土壤检测;温湿度监测;自动灌溉;
Soil temperature and humidity detection system based on single-chip microcomputer
Abstract
Accurate monitoring of soil temperature, humidity, and environmental gas concentration is crucial for ensuring the healthy growth of plants in agricultural planting, horticultural cultivation, and other scenarios. If soil temperature and humidity are not regulated in a timely manner, it may lead to delayed crop growth and decreased yield; The imbalance of CO ₂ concentration in the environment can also affect the efficiency of plant photosynthesis. Therefore, developing a soil environment detection system that can monitor in real-time, automatically regulate, and facilitate remote management has important practical value.
This design proposes a soil temperature and humidity detection system based on STM32F103C8T6 microcontroller. The main functions of the system include: detecting the current soil temperature data through a waterproof DS18B20 sensor; Using the YL-69 soil moisture detection module to obtain soil moisture values, the relay is automatically driven to start irrigation when the humidity is below the preset minimum value, and stops when the humidity reaches the maximum value; Detecting the concentration of CO ₂ in the environment through SGP30 sensor; Users can set the upper and lower threshold values for soil moisture through buttons; OLED display screen displays real-time data such as temperature, humidity, CO ₂ concentration, etc; Upload measurement data to the mobile phone through the WIFI module, supporting remote setting of thresholds, control of irrigation operations, querying historical data, and viewing historical data line charts; The system is powered by lithium batteries to ensure portability and continuous operation capability.
The purpose of this system is to establish a soil environment management system that includes real-time monitoring, automatic regulation, and remote management. Comprehensive understanding of soil and environmental conditions through multi parameter synchronous detection, automatic irrigation function reduces manual intervention; The remote data exchange and historical analysis functions provide data support for planting decisions. Provided convenient and efficient soil environment monitoring solutions for agricultural production, horticultural management, and other scenarios, helping to enhance the scientific and intelligent level of planting management.
Keywords: microcontroller; Soil testing; Temperature and humidity monitoring; Automatic irrigation
目 录
1 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 主要内容
2 系统总体方案设计
2.1系统总体设计
2.2 主要模块方案选择
3 系统硬件设计
3.1 总体硬件框架
3.2 主控模块电路设计
3.3 温度检测模块电路设计
3.4 湿度检测模块电路设计
3.5 CO₂浓度检测模块电路设计
3.6 显示模块电路设计
3.7 按键模块电路设计
3.8 继电器模块电路设计
3.9 WiFi 模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 OLED显示流程设计
4.5 WiFi模块子流程设计
4.6 温度检测模块子流程
4.7 ADC模数转换子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 温度检测功能测试
5.3 湿度检测与自动灌溉功能测试
5.4 CO₂浓度检测功能测试
5.5 阈值设置功能测试
5.6 显示功能测试
5.7 WiFi 远程控制功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!