设计说明书
总字数:17000+
摘要
在现代出行场景中,行李箱作为重要的随身储物工具,其安全性、便利性与可追溯性成为用户核心需求。当前传统行李箱普遍存在功能单一的问题:重量需手动称重、位置难以实时追踪、开锁方式传统且安全性不足,且缺乏距离预警机制,易出现行李丢失、错拿或遗忘等情况,给用户出行带来极大困扰。因此,研发一款集成重量监测、定位追踪、智能开锁与安全预警功能的智能化行李箱,对提升出行体验、保障行李安全具有重要意义。
本设计提出一种基于 STM32F103C8T6 单片机的智能行李箱。系统主要功能包括:通过 HX711 重量检测模块实时测量行李箱重量,重量数据经单片机处理后,通过 4G 模块传输至手机 APP,用户可在 APP 端直观查看行李重量;借助 ATGM332D GPS 模块获取行李箱实时经纬度信息,手机 APP 支持一键调取位置数据,实现行李定位追踪;手机 APP 内置声光报警控制功能,用户可通过 APP 一键触发行李箱声光报警,同时结合 GPS 定位快速查找行李位置;支持双开锁方式,一是通过指纹识别模块完成指纹开锁,二是通过手机 APP 一键控制继电器实现开锁,且 APP 端设有添加指纹与删除指纹按键,方便用户管理开锁权限;系统具备布防与撤防两种模式,布防状态下,通过 GPS 经纬度计算行李箱与手机的距离,当距离大于 10m 时,行李箱自动触发声光报警提醒,用户可通过手机端取消报警;撤防状态下,即使检测到距离较远,系统也不会启动报警,避免不必要的干扰;此外,管理人员可通过 RFID-RC522 刷卡验证,经 ULN2003A 驱动四相五线步进电机模拟开启行李箱,满足特定场景下的管理需求。
该基于单片机的智能行李箱,为用户出行提供了全方位的行李管理解决方案。通过重量实时监测,帮助用户避免行李超重;定位追踪与声光报警功能,有效降低行李丢失风险;多种智能开锁方式兼顾安全性与便利性;距离预警机制进一步提升行李安全性。整体设计提升了行李箱的智能化水平,为用户出行保驾护航,具有较高的实用价值。
关键词:单片机;智能行李箱;重量监测;GPS 定位;智能开锁;距离预警
Luggage compartment based on microcontroller
Abstract
In modern travel scenarios, luggage, as an important portable storage tool, has become a core requirement for users in terms of safety, convenience, and traceability. The current traditional luggage generally has the problem of single function: the weight needs to be manually weighed, the position is difficult to track in real time, the unlocking method is traditional and lacks safety, and there is a lack of distance warning mechanism, which easily leads to luggage loss, misplacement or forgetting, causing great inconvenience to users’ travel. Therefore, developing an intelligent luggage compartment that integrates weight monitoring, positioning tracking, intelligent unlocking, and security warning functions is of great significance for improving travel experience and ensuring luggage safety.
This design proposes an intelligent luggage compartment based on STM32F103C8T6 microcontroller. The main functions of the system include: real-time measurement of luggage weight through the HX711 weight detection module, weight data processed by the microcontroller, and transmitted to the mobile APP through the 4G module. Users can intuitively view luggage weight on the APP end; Using the ATGM332D GPS module to obtain real-time latitude and longitude information of the luggage, the mobile app supports one click retrieval of location data to achieve luggage positioning and tracking; The mobile app has a built-in sound and light alarm control function. Users can trigger the luggage sound and light alarm with one click through the app, and quickly find the luggage location by combining GPS positioning; Support dual lock mode, one is to complete fingerprint unlocking through the fingerprint recognition module, and the other is to control the relay with one click through the mobile APP to achieve unlocking. The APP also has buttons for adding and deleting fingerprints, making it convenient for users to manage unlocking permissions; The system has two modes: arming and disarming. In the arming state, the distance between the luggage and the mobile phone is calculated through GPS latitude and longitude. When the distance is greater than 10m, the luggage automatically triggers an audible and visual alarm reminder, and the user can cancel the alarm through the mobile phone; In the disarmed state, even if a long distance is detected, the system will not trigger an alarm to avoid unnecessary interference; In addition, management personnel can verify through RFID-RC522 card swiping, and simulate the opening of a luggage compartment using a four phase five wire stepper motor driven by ULN2003A, meeting the management needs in specific scenarios.
This intelligent luggage based on a microcontroller provides users with a comprehensive luggage management solution for travel. Real time weight monitoring helps users avoid overweight luggage; Positioning tracking and sound and light alarm functions effectively reduce the risk of luggage loss; Multiple intelligent unlocking methods that balance safety and convenience; The distance warning mechanism further enhances luggage safety. The overall design has improved the intelligence level of the luggage, providing protection for users’ travel and having high practical value.
Keywords:microcontroller; Smart luggage; Weight monitoring; GPS positioning; Intelligent unlocking; Distance warning
目 录
1 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 主要内容
2 系统总体方案设计
2.1系统总体设计
2.2 主要模块方案选择
3 系统硬件设计
3.1 总体硬件框架
3.2 主控模块电路设计
3.3 重量检测模块电路设计
3.4 GPS 定位模块电路设计
3.5 4G 通信模块电路设计
3.6 指纹模块电路设计
3.7 继电器模块电路设计
3.8 声光报警模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 称重模块子流程设计
4.4 指纹模块子流程设计
4.5 GPS模块子流程设计
4.6 4G模块联网子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 重量检测与 4G 数据上传功能测试
5.3 GPS 定位与 APP 位置查看功能测试
5.4 声光报警功能测试
5.5 指纹与 APP 一键开锁功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!