设计说明书
总字数:13000+
摘要
随着智能移动设备技术的发展,智能小车在教育、物流、安防等领域的应用日益广泛,而防撞性能作为智能小车安全运行的核心指标,直接影响其运行可靠性与应用场景拓展。当前多数简易智能小车缺乏精准的距离检测与动态防撞机制,易因障碍物识别不及时或反应滞后发生碰撞,导致设备损坏甚至任务失败。因此,研发一种具备实时测距、智能调速及分级报警功能的防撞系统十分必要。
本设计提出一种基于 STM32F103C8T6 单片机的智能小车防撞系统。系统主要功能包括:通过超声波传感器获取小车与障碍物的实时距离,当距离处于 40-100cm 区间时自动缓慢降低车速;通过温度传感器进行温度补偿,提升测距精度;通过按键实现小车的启停控制;通过 OLED 显示屏实时显示测距值及设定参数;当距离小于 60cm 时触发缓慢声光报警,距离小于 40cm 时切换为急促声光报警。
该智能小车防撞系统的作用在于,为智能小车提供了一套精准、高效的防撞解决方案。通过实时测距与动态调速相结合,有效避免碰撞风险;分级报警机制可直观提示危险等级,助力用户或控制系统及时干预,提升智能小车运行的安全性与稳定性。
关键词:单片机;智能小车;超声波测距;防撞系统;温度补偿
Design of an Anti-Collision System for Smart Cars Based on Single-Chip Microcomputers
Abstract
With the advancement of intelligent mobile device technology, the application of smart cars in fields such as education, logistics, and security has become increasingly widespread. Collision avoidance performance, as a core indicator for the safe operation of smart cars, directly affects their operational reliability and the expansion of application scenarios. Currently, most simple smart cars lack precise distance detection and dynamic collision avoidance mechanisms, making them prone to collisions due to delayed obstacle recognition or response lag, which can lead to equipment damage or even mission failure. Therefore, it is essential to develop a collision avoidance system with real-time distance measurement, intelligent speed adjustment, and multi-level alarm functions.
This design proposes a smart car collision avoidance system based on the STM32F103C8T6 microcontroller. The system’s main functions include:
– Obtaining real-time distance between the car and obstacles via an ultrasonic sensor, automatically slowing down the car when the distance falls within the 40–100 cm range.
– Enhancing distance measurement accuracy through temperature compensation using a temperature sensor.
– Controlling the car’s start and stop via buttons.
– Displaying real-time distance measurements and set parameters on an OLED screen.
– Triggering a slow audio-visual alarm when the distance is less than 60 cm and switching to an urgent audio-visual alarm when the distance is below 40 cm.
The significance of this smart car collision avoidance system lies in providing a precise and efficient collision avoidance solution for smart cars. By combining real-time distance measurement with dynamic speed adjustment, it effectively mitigates collision risks. The multi-level alarm mechanism offers intuitive danger-level alerts, assisting users or control systems in timely intervention, thereby improving the safety and stability of smart car operations.
Keywords:Microcontroller; Smart Car; Ultrasonic Ranging; Anti-Collision System; Temperature Compensation
目 录
1 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 主要内容
2 系统总体方案设计
2.1 系统总体设计
2.2 主要模块方案选择
3 系统硬件设计
3.1 总体硬件框架
3.2 主控模块电路设计
3.3 超声波测距模块电路设计
3.4 温度补偿模块电路设计
3.5 人机交互模块电路设计
3.6 执行控制模块电路设计
3.7 电源模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 主程序流程设计
4.3 独立按键
4.4 OLED显示流程设计
4.5 超声波检测模块子流程
4.6 温度检测模块子流程
4.7 直流电机-MX1508驱动模块子流程
5 实物制作与功能测试
5.1 实物制作
5.2 距离检测与温度补偿功能测试
5.3 按键控制与速度调节功能测试
5.4 分级声光报警功能测试
5.5 自动减速防撞功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!