news 2026/9/6 12:09:13

【dz-1014】基于单片机的智能药箱

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【dz-1014】基于单片机的智能药箱

摘 要

日常生活中,按时服药对治疗和康复至关重要,特别是老年人或慢性病患者。但记忆力下降或生活忙碌常导致忘记服药或混淆药品。因此,设计一款智能多功能储药箱具有重要意义。

本设计以STM32F103C8T6单片机为控制合作,通过RTC获取实时时间;通过手机配置5组吃药时间、药品种类和数量;通过光敏电阻检测药箱内光照值,当光照低于设定最小值时自动开启补光灯;通过DHT11检测药箱内温湿度,当湿度高于设定最大值时进行除湿,温度高于设定最大值时自动控制制冷片打开;通过OLED显示测量数据,吃药时间到后显示吃药种类和数量,关闭药箱后恢复显示测量数据;通过WIFI模块将监测数据发送到手机端,并可在手机端设置吃药时间和种类。

测试结果表明,该系统运行稳定,能够准确提醒用户按时服药,有效避免了因忘记服药或混淆药品种类和剂量而导致的问题,为老年人或患有慢性疾病的人群提供了极大的便利。

关键词 储药箱;单片机;传感器;WiFi;远程控制

Abstract

In daily life, taking medication on time is crucial for treatment and rehabilitation, especially for elderly or chronic disease patients. But memory decline or busy life often leads to forgetting to take medication or confusing drugs. Therefore, designing an intelligent multifunctional medicine storage box is of great significance.

This design is controlled by the STM32F103C8T6 microcontroller and utilizes RTC to obtain real-time time; Configure 5 sets of medication times, types, and quantities through mobile phones; Detect the light level inside the medicine box through a photoresistor, and automatically turn on the supplementary light when the light level is below the set minimum value; By using DHT11 to detect the temperature and humidity inside the medicine box, dehumidification is carried out when the humidity is higher than the set maximum value. When the temperature is higher than the set maximum value, the refrigeration unit is automatically controlled to turn on; Display measurement data through OLED, display the type and quantity of medication after the medication time is up, and restore the display of measurement data after closing the medicine box; Send monitoring data to the mobile phone through the WIFI module, and set the medication time and type on the mobile phone.

The test results show that the system runs stably and can accurately remind users to take medication on time, effectively avoiding problems caused by forgetting to take medication or confusing the types and doses of drugs, providing great convenience for the elderly or people with chronic diseases.

Keywords:medicine storage box; singlechip; Sensors; WiFi; Remote control

目 录

摘 要

Abstract

1 绪论

1.1 研究背景及研究意义

1.2 国内外发展现状

1.3 本系统的主要功能

2 系统的整体结构设计

2.1 控制系统结构

2.2 硬件介绍

2.2.1 单片机

2.2.2 时钟模块-DS1302

2.2.3 光照监测5516

2.2.4 温湿度-DHT11

2.2.4 舵机-SG90

2.2.5 语音播报-TTS

2.2.6 按键-独立按键

2.2.7 显示-OLED

2.2.8 继电器模块

2.2.9 无线通信WiFi

2.3 本章小结

3 系统硬件设计

3.1 单片机最小系统设计

3.2 模块电路设计

3.2.1 时钟模块-DS1302

3.2.2 光照监测5516

3.2.3 温湿度-DHT11

3.2.4 舵机-SG90

3.2.5 语音播报-TTS

3.2.6 按键-独立按键

3.2.7 显示-OLED

3.2.8 继电器模块

3.2.9 无线通信WiFi

3.3 本章小结

4 系统软件设计

4.1 系统主流程设计

4.2 温湿度检测模块子流程

4.3 光照检测模块子流程

4.4 舵机模块子流程

4.5 OLED显示子流程设计

4.6语音播报模块子流程设计

4.7 本章小结

5 系统调试与测试

5.1 硬件调试

5.2 软件调试

5.3 实物功能测试

5.3.1 定时检测实物测试

5.3.2 语音播报实物测试

5.3.3 药箱开关实物测试

5.3.4 补光实物测试

5.3.5 加热除湿实物测试

5.3.6 云平台部分测试

结 论

参考文献

谢 辞

附 录A

附 录B

附 录C

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/9/2 23:35:01

【数据分享】安徽省路网数据安徽省路网分类数据(2025年)

而今天要说明数据就是安徽省路网数据安徽省路网分类数据(2025年) 数据概况 数据含城市次干道、城市支路、城市主干道、高架及快速路、郊区乡村道路、内部道路、人行道路、自行车道等(具体请看截图,有些省份可能无法分类出自行车道)。 详情…

作者头像 李华
网站建设 2026/9/2 22:49:22

没显卡怎么跑Qwen3-Reranker?云端GPU 1小时1块,小白5分钟上手

没显卡怎么跑Qwen3-Reranker?云端GPU 1小时1块,小白5分钟上手 作为一个前端开发者,你可能经常被各种新技术吸引,比如最近发布的Qwen3-Reranker模型。但当你兴冲冲地想体验一下时,却发现自己的MacBook没有独立显卡&…

作者头像 李华
网站建设 2026/9/3 0:20:46

FLUX.1-dev创意工作流:自由职业者用云端GPU接单神器

FLUX.1-dev创意工作流:自由职业者用云端GPU接单神器 你是不是也遇到过这种情况:客户发来一个复杂的插画需求,提示词写得满满当当,刚点下“生成”按钮,电脑风扇就疯狂咆哮,几秒后直接蓝屏重启?攒…

作者头像 李华
网站建设 2026/9/3 1:24:05

年龄性别识别模型部署的3种省钱姿势

年龄性别识别模型部署的3种省钱姿势 你是不是也遇到过这样的情况:作为自由开发者,接了多个客户的人脸分析项目,有的要做美颜App的用户画像,有的是商场客流统计,还有的是互动娱乐小程序。每个项目都要求部署年龄性别识…

作者头像 李华
网站建设 2026/9/5 1:14:14

Qwen3-4B多模态体验:预装好所有依赖,打开浏览器就用

Qwen3-4B多模态体验:预装好所有依赖,打开浏览器就用 你是不是也遇到过这种情况?作为一名多媒体专业的学生,想测试一下最新的Qwen3-4B模型对图片的理解能力——比如让它分析一张海报的设计风格、识别照片中的物体关系,…

作者头像 李华