设计说明书
总字数:20000+
摘要
随着粮食仓储行业的发展,粮仓环境的安全稳定对保障粮食质量至关重要。传统的粮仓管理依赖人工巡检,存在响应滞后、监测不及时、人力成本高等问题,难以满足现代化粮仓的安全管控需求。
基于 STM32F103C8T6 单片机的智能粮仓设计,由两台从机和一台主机组成。从机 1 整合了人体红外传感器、温湿度检测模块、烟雾检测模块、声光报警模块、水泵及 ZigBee 模块;从机 2 包含防水式温度检测模块、湿度检测模块、风扇、声光报警模块及 ZigBee 模块;主机则配备 ZigBee 模块、按键、OLED 显示屏、WiFi 模块及报警模块。系统核心功能包括:从机 1 通过人体红外传感器检测是否有人,布防模式下检测到人时触发声光报警;实时监测环境温湿度并传输至主机;检测到烟雾浓度超最大值时,启动声光报警并打开水泵。从机 2 检测粮食温度,超上限时启动风扇散热;检测粮食湿度,超上限时进行声光报警;两台从机均通过 ZigBee 将数据发送至主机。主机接收数据后,通过 OLED 显示检测值,参数超限时报警;支持按键设置阈值及布防撤防;通过 WiFi 将数据传输至手机端,实现手机端设置阈值、布防撤防及远程控制设备。
该设计的实现,有效提升了粮仓管理的自动化与智能化水平,减少了人工干预,确保了粮仓环境的安全稳定,为粮食仓储提供了可靠保障,同时为同类智能仓储设备的研发提供了参考,具有较高的实际应用价值。
关键词:STM32F103C8T6;智能粮仓;环境监测;ZigBee;WiFi 通信;安全管控
ABSTRACT
With the development of the grain storage industry, the safety and stability of the granary environment are crucial for ensuring grain quality. Traditional granary management relies on manual inspections, which have problems such as delayed response, untimely monitoring, and high labor costs, making it difficult to meet the safety control needs of modern granaries.
The STM32F103C8T6 microcontroller-based intelligent granary design consists of two slaves and one master. Slave 1 integrates a human infrared sensor, temperature and humidity detection module, smoke detection module, sound and light alarm module, water pump, and ZigBee module; Slave 2 includes a waterproof temperature detection module, humidity detection module, fan, sound and light alarm module, and ZigBee module; The master is equipped with a ZigBee module, buttons, OLED display, WiFi module, and alarm module. The core functions of the system include: Slave 1 detects the presence of people through a human infrared sensor, triggering an audible and visual alarm in arming mode when a person is detected; real-time monitoring of environmental temperature and humidity and transmitting data to the master; when smoke concentration exceeds the maximum value, activating the sound and light alarm and turning on the water pump. Slave 2 detects the temperature of grain, starting a fan to dissipate heat when the temperature exceeds the set maximum; detects the humidity of grain, issuing an audible and visual alarm when the humidity exceeds the set maximum; both slaves send data to the master via ZigBee. After receiving the data, the master displays the detected values on the OLED, with an alarm when parameters are out of range; supports button setting of thresholds and arming/disarming; transmits data to the mobile phone via WiFi, enabling the mobile phone to set thresholds, arm/disarm, and remotely control devices.
The implementation of this design effectively improves the automation and intelligence level of granary management, reduces manual intervention, ensures the safety and stability of the granary environment, provides a reliable guarantee for grain storage, and also offers a reference for the research and development of similar intelligent storage equipment, with high practical application value.
Keywords:STM32F103C8T6; Intelligent granary; Environmental monitoring; ZigBee; WiFi communication; Safety control
目录
第 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.1.8WiFi 模块选择
2.1.9 显示模块选择
2.1.10 按键模块选择
2.2整体设计方案
第 3 章 硬件设计
3.1 从机 1 主控电路模块
3.2 从机 1 人体红外传感器电路
3.3 从机 1 温湿度检测模块电路
3.4 从机 1 烟雾检测与水泵驱动电路
3.5 从机 2 主控电路模块
3.6 从机 2 粮食温度检测模块电路
3.7 从机 2 粮食湿度检测模块电路
3.8 ZigBee 通信模块电路(从机)
3.9 主机主控电路模块
3.10 主机显示模块电路
3.11 主机按键模块电路
3.12 主机 WiFi 模块电路
3.13 声光报警模块电路
第4章 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 从机1系统主流程设计
4.4 从机2系统主流程设计
4.5 独立按键
4.6 OLED显示流程设计
4.7 ADC模数转换子流程设计
4.8 温湿度检测模块子流程设计
4.9 zigbee模块子流程设计
4.10 温度检测模块子流程设计
第 5 章 实物测试
5.1 整体实物测试
5.2 从机 1 功能测试
5.2.1 人体红外传感器功能测试
5.2.2 温湿度检测模块功能测试
5.2.3 烟雾检测与水泵联动测试
5.3 粮食温度检测与风扇联动测试
5.5 WiFi 远程控制功能测试
5.6 主机按键与显示功能测试
5.7 声光报警模块联动测试
第 6 章 总结与展望
6.1 总结
6.2 展望
致谢
参考文献
附录
附录一:原理图
附录二:PCB
附录三:主程序
购买后可查看具体内容!