设计说明书
总字数:23000+
摘要
随着道路交通行业的快速发展,行车安全已成为保障驾乘人员生命财产安全的核心议题。酒驾、未系安全带、驾驶员身体异常(体温过高、心率异常)及行车中突发明火等问题,均可能引发严重交通事故,若不能及时监测与干预,将给驾乘人员及道路安全带来极大隐患。因此,研发一种能全面、实时监测行车安全隐患并主动预警的系统十分必要。
本设计提出一种基于 STM32F103C8T6S 单片机的行车安全监测系统。系统主要功能包括:通过 FSR402 薄膜式压力传感器检测座位是否有人,若有人且红外对射式计数模块检测到未系安全带,每隔 10s 通过 CN-TTS 语音提醒 “请系好安全带”;通过 MQ-3 检测酒精值,超过设定最大值时,语音提醒 “酒精浓度过高,禁止驾车”,并通过 4G 模块(Air780e)将酒精值及 ATGM332D-5N GPS 定位发送至手机端;通过 MLX90614 检测体温,超过设定最大值时,语音提醒 “体温过高,请停车休息”,并通过 4G 模块发送体温及 GPS 定位;通过 MAX30102 检测心率,超过设定最大值时黄灯预警,几分钟后二次检测仍超标则红灯警告并语音提醒 “心率过高,请停车休息”,同时通过 4G 模块发送心率及 GPS 定位;通过 YS-17 火焰传感器检测明火,发现明火后自动驱动继电器控制水泵灭火,并通过 4G 模块发送明火信息及 GPS 定位;用户可通过按键设置各参数阈值,所有监测数据通过 OLED 实时显示。
该行车安全监测系统的作用在于,为行车过程提供全方位、多维度的安全监测与主动预警服务。通过实时捕捉酒驾、未系安全带、身体异常及明火等安全隐患,结合语音提醒、灯光预警、自动灭火及远程数据传输,帮助驾乘人员及时规避风险,同时让家属或相关人员远程掌握行车安全状态,有效降低交通事故发生概率,保障行车安全。
关键词:STM32F103C8T6S;行车安全;传感器;无线通信
Driving Safety Monitoring System Based on Single Chip Microcomputer
Abstract
With the rapid development of the road transportation industry, driving safety has become a core issue in ensuring the safety of drivers and passengers’ lives and property. Drunk driving, failure to fasten seat belts, abnormal body temperature and heart rate of drivers, and sudden open flames while driving can all cause serious traffic accidents. If not monitored and intervened in a timely manner, it will bring great hidden dangers to drivers, passengers, and road safety. Therefore, it is necessary to develop a system that can comprehensively and real-time monitor driving safety hazards and proactively warn them.
This design proposes a driving safety monitoring system based on STM32F103C8T6S microcontroller. The main functions of the system include: detecting whether there is a person in the seat through the FSR402 thin film pressure sensor. If there is a person and the infrared counter module detects that the seat belt is not fastened, it will remind “please fasten seat belt” through CN-TTS voice every 10 seconds; By using MQ-3 to detect alcohol levels, when the set maximum value is exceeded, a voice prompt will be given stating ‘high alcohol concentration, no driving allowed’, and the alcohol level and ATGM332D-5N GPS location will be sent to the mobile phone through the 4G module (Air780e); By using MLX90614 to detect body temperature, when it exceeds the set maximum value, a voice prompt will be sent saying “body temperature is too high, please stop and rest”, and the body temperature and GPS positioning will be sent through the 4G module; By using MAX30102 to detect heart rate, if it exceeds the set maximum value, a yellow light warning will be displayed. If it still exceeds the limit after a few minutes of secondary detection, a red light warning will be displayed and a voice reminder will be sent saying “Heart rate too high, please stop and rest”. At the same time, the heart rate and GPS positioning will be sent through the 4G module; Detecting open flames through the YS-17 flame sensor, automatically driving the relay to control the water pump to extinguish the fire, and sending open flame information and GPS positioning through the 4G module; Users can set various parameter thresholds through buttons, and all monitoring data is displayed in real-time through OLED.
The function of this driving safety monitoring system is to provide comprehensive and multi-dimensional safety monitoring and proactive warning services for the driving process. By capturing safety hazards such as drunk driving, not wearing seat belts, physical abnormalities, and open flames in real time, combined with voice reminders, light warnings, automatic fire extinguishing, and remote data transmission, it helps drivers and passengers avoid risks in a timely manner, while allowing family members or relevant personnel to remotely grasp the driving safety status, effectively reducing the probability of traffic accidents and ensuring driving safety.
Keywords:STM32F103C8T6S; Driving safety; Sensors; wireless communication
目 录
1 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 主要内容
2 系统总体方案设计
2.1系统总体设计
2.2 主要模块方案选择
3 系统硬件设计
3.1 总体硬件框架
3.2 主控模块电路设计
3.3 FSR402 薄膜式压力传感器模块电路设计
3.4 红外对射式计数模块电路设计
3.5 MQ-3 酒精检测模块电路设计
3.6 MLX90614 体温传感器模块电路设计
3.7 MAX30102 心率传感器模块电路设计
3.8 YS-17 火焰传感器模块电路设计
3.9 灭火控制模块电路设计
3.10 ATGM332D-5N GPS 模块电路设计
3.11 Air780e 4G 模块电路设计
3.12 CN-TTS 语音模块电路设计
3.13 按键模块电路设计
3.14 OLED 显示模块电路设计
3.15 灯光预警模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键
4.4 薄膜压力检测模块子流程设计
4.5 红外对射模块子流程设计
4.6 酒精检测模块子流程设计
4.7 红外测温模块子流程设计
4.8 心率血氧模块子流程设计
4.9 火焰检测模块子流程设计
4.10 GPS模块子流程设计
4.11 4G模块联网子流程设计
4.12 语音播报模块子流程设计
4.13 OLED显示流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 座位与安全带监测及语音提醒功能测试
5.3 酒精检测与远程报警功能测试
5.4 体温监测与远程报警功能测试
5.5 心率监测与分级预警功能测试
5.6 火焰检测与自动灭火功能测试
5.7 阈值设置与 OLED 显示功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!