摘 要
本论文聚焦于药品柜环境管理需求,设计并实现了一套基于STM32F407ZGT6单片机的温湿度自动控制系统。系统以SHT31-DIS传感器为核心实现高精度数据采集,通过LCD1602液晶屏实时显示环境参数,并采用WiFi模块构建远程监控通道。当温湿度超出设定阈值时,系统自动触发本地声光报警,同时推送警报信息至用户手机APP,支持通过独立按键或移动终端远程调整控制参数。设计过程中运用Proteus仿真软件完成逻辑验证,实际测试表明系统可稳定维持仓库温湿度在GSP规范要求的10-30℃、30%-75%RH范围内,较传统管理方式提升设备储存合格率12%,降低人工巡检成本40%。系统采用模块化设计,具备扩展接口,可兼容多类型传感器接入,为智慧药品柜管理提供了低成本解决方案。
关键词:STM32F407ZGT6;药品柜;温湿度调控;SHT31-DIS传感器;远程监控;智能报警
Abstract
This research focuses on environmental management requirements for pharmaceutical cabinets, designing and implementing an automatic temperature and humidity control system based on the STM32F407ZGT6 microcontroller. The system employs the SHT31-DIS sensor as the core component for high-precision data acquisition, with real-time environmental parameter display via an LCD1602 screen and remote monitoring via a WiFi module. When temperature or humidity exceeds preset thresholds, the system automatically triggers local audio-visual alarms while sending alert notifications to the user's mobile app. Remote adjustment of control parameters can be performed through dedicated buttons or mobile terminals. During development, logic verification was conducted using Proteus simulation software. Practical tests demonstrated that the system stably maintains warehouse conditions within the GSP-compliant range of 10-30°C and 30%-75% RH, achieving a 12% improvement in equipment storage compliance rate compared to traditional management methods while reducing manual inspection costs by 40%. Featuring modular design with expandable interfaces for multi-sensor compatibility, the system provides a cost-effective solution for intelligent medical cabinet management.
Keywords: STM32F407ZGT6; medicine cabinet; temperature and humidity control; SHT31-DIS sensor; remote monitoring; intelligent alarm
目 录
摘 要
Abstract
目 录
1 绪论
1.1 选题背景及意义
1.2 国内外研究现状及发展趋势
1.3 研究主要内容
2 总体方案设计
2.1 温湿度控制系统的设计指标要求
2.2 系统设计的原则
2.2.1 可靠性
2.2.2 性价比
2.3 方案比较
2.3.1 方案一
图2.1 用PLC作为主控制器的控制系统
2.3.2 方案二
图2.2 用单片机作为主控制器的控制系统
2.4 方案论证
2.5 方案选择
3 单元模块设计
3.1 各单元模块功能介绍及电路设计
3.1.1 单片机最小系统
3.1.2 液晶显示模块
3.1.3 温湿度传感器模块
3.1.4 报警电路的设计
3.1.5 输出电路设计
3.1.6 电源的设计
3.1.7 按键电路设计
3.1.8 串口通信电路
3.1.9 WIFI模块的设计与实现
3.1.10 分布式传感器网络的设计与实现
3.2 元件清单
3.3 关键器件的介绍
3.3.1 STM32F407ZGT6
3.3.2 SHT31-DIS温湿度传感器
4 系统软件设计
4.1 软件设计的总体结构
4.2 主要模块的设计流程框图
4.2.1 主程序流程图
4.2.2 SHT31-DIS子程序流程图
4.2.3 LCD1602子程序流程图
4.2.4 输出控制子程序流程图
4.2.5 键盘扫描子程序流程图
4.3 软件设计所用工具
4.3.1 Keil uVision4
4.3.2 Proteus
5 系统调试
5.1 用Proteus搭建仿真总图
5.2 用Keil对程序进行调试、编译
6 结论
6.1 系统的功能
6.2 系统的指标参数
6.3 系统功能分析
7 总结与体会
8 致谢
9 参考文献
附录1 系统的电路原理图
附录2 系统仿真总图
附录3 系统实物照片
附录4 系统源程序

















