设计说明书
总字数:20000+
摘要
随着生活品质提升,花卉种植成为家庭与办公场景的常见需求,但传统养护方式依赖人工经验,易因环境参数(土壤温湿度、PH 值、光照、雨水)把控不当导致花卉生长不良。土壤过干或过湿、PH 值失衡、光照不足或过强、雨水浸泡等问题,会直接影响花卉根系发育与光合作用,尤其对名贵花卉或批量种植场景,人工养护不仅耗时费力,还难以实现环境参数的精准调控与及时响应。因此,研发一套能自动监测环境、智能执行养护动作且支持远程控制的系统,对提升花卉养护效率与成活率具有重要现实意义。
本设计提出一种基于 STM32F103C8T6 单片机的智能花卉养护系统,整合多模块实现全场景自动化养护与远程管控。系统核心功能包括:通过 RS485 土壤环境检测模块实时采集土壤温度值、湿度值与 PH 值,当温度高于预设最大值时,控制继电器驱动风扇降温;湿度低于预设最小值时,触发继电器启动水泵浇水;PH 值超出预设范围(大于最大值或小于最小值)时,通过继电器控制水泵浇水中和;借助 5516 光照检测模块获取光照值,光照低于最小值时自动启动补光设备(继电器控制),光照高于最大值时,通过 ULN2003A 驱动四相步进电机模拟遮雨棚展开实现遮光;通过电压式雨水检测模块判断是否下雨,下雨时自动控制遮雨棚展开防护;支持按键操作设定各环境参数阈值,适配不同花卉生长需求;通过 OLED 显示屏直观展示土壤温湿度、PH 值、光照值等实时测量数据;同时,系统通过 ECBO2 蓝牙模块将监测数据远程发送至手机端,用户可在手机端查看数据,还能远程控制风扇、水泵、补光设备、遮雨棚的启停及系统工作模式切换。
该智能花卉养护系统的应用,为花卉养护提供了 “自动监测 – 智能响应 – 远程管控” 的一体化解决方案。通过实时监测与自动执行养护动作,避免人工养护的滞后性与误差,保障花卉生长环境稳定;手机端远程控制功能则突破时空限制,方便用户随时掌握花卉状态并灵活调整养护策略,有效降低养护难度、提升养护效率,助力花卉健康生长,为家庭园艺、小型花圃等场景提供便捷、高效的智能化养护工具。
关键词:STM32F103C8T6;智能花卉养护;环境参数监测;自动执行;蓝牙远程控制
Intelligent Flower Maintenance System
Abstract
With the improvement of living standards, flower cultivation has become a common demand in both home and office settings. However, traditional maintenance methods rely on manual experience and are prone to poor growth of flowers due to improper control of environmental parameters (soil temperature and humidity, pH value, light, rainwater). The problems of soil being too dry or too wet, pH imbalance, insufficient or too strong light, and rainwater immersion can directly affect the development of flower roots and photosynthesis, especially for precious flowers or large-scale planting scenarios. Artificial maintenance is not only time-consuming and laborious, but also difficult to achieve precise control and timely response of environmental parameters. Therefore, developing a system that can automatically monitor the environment, intelligently execute maintenance actions, and support remote control is of great practical significance for improving the efficiency and survival rate of flower maintenance.
This design proposes an intelligent flower maintenance system based on STM32F103C8T6 microcontroller, which integrates multiple modules to achieve full scene automated maintenance and remote control. The core functions of the system include: real-time collection of soil temperature, humidity, and pH values through the RS485 soil environment detection module. When the temperature exceeds the preset maximum value, the relay is controlled to drive the fan to cool down; When the humidity is below the preset minimum value, trigger the relay to start the water pump for watering; When the pH value exceeds the preset range (greater than the maximum value or less than the minimum value), the relay controls the water pump to water and neutralize it; Using the 5516 lighting detection module to obtain lighting values, the supplementary lighting equipment (relay control) is automatically activated when the lighting is below the minimum value. When the lighting is above the maximum value, the ULN2003A drives a four phase stepper motor to simulate the deployment of a rain shelter and achieve shading; Determine whether it is raining through a voltage based rainwater detection module, and automatically control the rain shelter to deploy protection when it is raining; Support button operation to set various environmental parameter thresholds and adapt to different flower growth needs; Display real-time measurement data such as soil temperature, humidity, pH value, and light intensity through an OLED display screen; At the same time, the system remotely sends monitoring data to the mobile phone through the ECBO2 Bluetooth module. Users can view the data on the mobile phone and remotely control the start and stop of fans, water pumps, lighting equipment, rain shelters, and switch system working modes.
The application of this intelligent flower maintenance system provides an integrated solution of “automatic monitoring intelligent response remote control” for flower maintenance. By real-time monitoring and automatic execution of maintenance actions, the lag and errors of manual maintenance are avoided, ensuring a stable environment for flower growth; The remote control function on the mobile phone breaks through the limitations of time and space, making it convenient for users to grasp the status of flowers at any time and flexibly adjust maintenance strategies, effectively reducing maintenance difficulty and improving maintenance efficiency, helping flowers grow healthily, and providing convenient and efficient intelligent maintenance tools for home gardening, small flower gardens and other scenarios.
Keywords: STM32F103C8T6; Intelligent flower maintenance; Environmental parameter monitoring; Automatic execution; bluetooth remote control
目 录
1 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 主要内容
2 系统总体方案设计
2.1系统总体设计
2.2 主要模块方案选择
3 系统硬件设计
3.1 总体硬件框架
3.2 主控模块电路设计
3.3 RS485 土壤环境检测模块电路设计
3.4 光照与雨水检测模块电路设计
3.5 OLED 显示模块电路设计
3.6 按键模块电路设计
3.7 继电器与步进电机驱动模块电路设计
3.8 ECBO2 蓝牙模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3土壤环境检测模块子流程设计
4.4 光照检测模块子流程设计
4.4 雨水检测模块子流程设计
4.6 步进电机子流程设计
4.3 独立按键
4.4 OLED显示流程设计
4.8 蓝牙模块子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 土壤环境检测与调控功能测试
5.3 光照检测与补光、遮光功能测试
5.4 雨水检测与遮雨棚控制功能测试
5.5 按键阈值设定与 OLED 显示功能测试
5.6 蓝牙数据传输与远程控制功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!