设计说明书
总字数:20000+
摘要
随着教育事业的发展与家校出行需求的增加,校车作为学生上下学的重要交通工具,其运行安全与车内环境保障成为社会关注的核心议题。校车超速行驶易引发交通安全事故,车内温湿度异常、空气质量不佳会影响学生身体健康,而学生乘车考勤管理不当可能导致遗漏或错领问题,这些安全隐患若不能及时监测与处理,将对学生生命安全与健康造成严重威胁。因此,研发一套能全面监测校车运行状态、车内环境及学生考勤的智能化系统,对提升校车安全管理水平具有重要现实意义。
本设计提出一种基于 STM32F103C8T6 单片机的 RFID 校车安全检测系统。系统核心功能涵盖多维度安全监测、智能控制与数据传输:通过 ATGM332D-5N GPS 模块获取校车实时经纬度信息,实现车辆定位追踪;借助 MX1508 驱动直流电机,搭配 KY-003 霍尔传感器测量车速,车速超预设最大值时触发蜂鸣器报警,且支持两个按键手动调节速度阈值;通过 DHT11 温湿度传感器采集车内温湿度,温度超最大值时控制制冷继电器工作,低于最小值时启动加热继电器,维持车内适宜温度;利用 MQ-135 空气质量传感器检测车内空气质量,数值超最大值时触发风扇继电器进行通风;通过 RFID-RC522 模块实现学生刷卡考勤,模拟 3 张学生卡检测人员是否到齐;支持按键一键报警功能,紧急情况下可快速触发警示;用户可通过按键设置车速、温湿度、空气质量等参数的阈值;OLED 显示屏实时显示各项监测数据(定位、车速、温湿度、空气质量、考勤状态)与设置阈值;同时,系统通过 ESP8266-12F-WiFi 模块将监测数据发送至手机端,实现远程实时监控。
该基于 RFID 的校车安全检测系统的应用价值在于,构建了 “运行安全 – 环境安全 – 人员考勤” 三位一体的校车安全监测体系。通过实时监测与智能控制,能及时规避超速、温湿度异常、空气质量差等风险,保障学生乘车安全与健康;RFID 考勤与远程数据传输功能,便于学校与家长实时掌握学生乘车状态与校车位置,提升校车管理的透明度与效率,为学生出行安全提供全方位保障。
关键词:STM32F103C8T6 单片机;RFID 校车安全检测;GPS 定位;车速监测;环境监测;WiFi 数据传输;考勤管理
RFID based School Bus Safety Detection System
Abstract
With the development of education and the increasing demand for home school travel, school buses, as an important means of transportation for students to go to and from school, have become a core issue of social concern in terms of operational safety and in car environmental protection. School bus speeding can easily lead to traffic safety accidents. Abnormal temperature and humidity inside the bus, as well as poor air quality, can affect students’ physical health. Improper management of student attendance may result in omissions or incorrect receipts. If these safety hazards are not monitored and dealt with in a timely manner, they will pose a serious threat to students’ life safety and health. Therefore, developing an intelligent system that can comprehensively monitor the operation status, interior environment, and student attendance of school buses is of great practical significance for improving the level of school bus safety management.
This design proposes an RFID school bus safety detection system based on STM32F103C8T6 microcontroller. The core functions of the system include multi-dimensional safety monitoring, intelligent control, and data transmission: obtaining real-time latitude and longitude information of school buses through the ATGM332D-5N GPS module to achieve vehicle positioning and tracking; Using MX1508 to drive a DC motor, coupled with KY-003 Hall sensor to measure vehicle speed, triggering a buzzer alarm when the vehicle speed exceeds the preset maximum value, and supporting two buttons to manually adjust the speed threshold; Collect the temperature and humidity inside the car through the DHT11 temperature and humidity sensor. When the temperature exceeds the maximum value, control the refrigeration relay to work. When it falls below the minimum value, activate the heating relay to maintain a suitable temperature inside the car; Using MQ-135 air quality sensor to detect the air quality inside the car, triggering the fan relay for ventilation when the value exceeds the maximum value; Implement student card attendance through the RFID-RC522 module, simulate three student cards to check if all personnel are present; Support one button alarm function, which can quickly trigger warnings in emergency situations; Users can set thresholds for parameters such as vehicle speed, temperature and humidity, and air quality through buttons; OLED display screen displays real-time monitoring data (positioning, vehicle speed, temperature and humidity, air quality, attendance status) and set thresholds; At the same time, the system sends monitoring data to the mobile phone through the ESP8266-12F-WiFi module to achieve remote real-time monitoring.
The application value of the RFID based school bus safety detection system lies in the construction of a three in one school bus safety monitoring system that integrates operational safety, environmental safety, and personnel attendance. By real-time monitoring and intelligent control, risks such as speeding, abnormal temperature and humidity, and poor air quality can be avoided in a timely manner, ensuring the safety and health of students while riding; The RFID attendance and remote data transmission function enables schools and parents to real-time monitor students’ boarding status and school bus location, improving the transparency and efficiency of school bus management and providing comprehensive protection for students’ travel safety.
Keywords:STM32F103C8T6 microcontroller; RFID school bus safety inspection; GPS positioning; Vehicle speed monitoring; Environmental monitoring; WiFi data transmission; Attendance Management
目 录
1 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 主要内容
2 系统总体方案设计
2.1系统总体设计
2.2 主要模块方案选择
3 系统硬件设计
3.1 总体硬件框架
3.2 主控模块电路设计
3.3 GPS 定位模块电路设计
3.4 车速监测模块电路设计
3.5 电机驱动模块电路设计
3.6 温湿度检测模块电路设计
3.7 继电器控制模块电路设计
3.8 空气质量检测模块电路设计
3.9 风扇控制模块电路设计
3.10 RFID 考勤模块电路设计
3.11 按键模块电路设计
3.12 显示模块电路设计
3.13 声光报警模块电路设计
3.14 WiFi 通信模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 GPS模块子流程设计
4.4 RFID模块子流程设计
4.5 速度检测子流程设计
4.6 空气质量检测模块子流程设计
4.7 温湿度检测模块子流程设计
4.8 GPS模块子流程设计
4.9 OLED显示屏子流程设计
4.10 独立按键子流程设计
4.11 WiFi模块子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 GPS 定位与数据显示功能测试
5.3 车速监测、电机驱动与超速报警功能测试
5.4 温湿度检测与继电器控制功能测试
5.5 空气质量检测与风扇控制功能测试
5.6 RFID 考勤与学生到齐检测功能测试
5.7 阈值设置与一键报警功能测试
5.8 WiFi 数据传输与手机端监控功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序