基于 STM32 与 ADXL345 的自动刹车灯系统设计

打开文本图片集
中图分类号:TP368.1
文献标志码:A
文章编号:2095-2945(2026)11-0136-04
Abstract: The traditional mechanical contact brake light relies on the driver's operation, which has the problems of 200~300 ms response delay and contact wear failure, which may lead to untimely braking of the rear vehicle and increase the risk of traffic accidents. In this study, an automatic brake light system based on STM32 and ADXL345 acceleration sensor is designed to realize the early triggering of the brake light during emergency braking and shorten the response time of the rear vehicle by real-time monitoring of vehicle acceleration changes. The system uses I2C protocol to collect ADXL345 three-axis acceleration data, combines with the threshold judgment algorithm to reach a fast response during emergency braking, and controls the LED brightness change through PWM (Pulse Width Modulation) to enhance the warning effect. Experimental results demonstrate that the system maintains a response time within 100 ms under a ±4 g threshold conditions, with a false trigger rate below 0.3%, and the lighting switching accuracy rate under different states reaches 98%, significantly improving traffic safety. The system is low-cost, highly reliable, and has good application prospects.
Keywords: STM32; ADXL345; acceleration monitoring; automatic brake light; traffic accident
机械触点式刹车灯因成本低而被广泛应用,但其以驾驶员主动操作作为触发条件,存在几个明显的问题:一是响应延迟高;驾驶员反应时间和机械触点动作总延迟约为200~350 ms。(剩余3868字)