设计说明书
总字数:15000+
随着城市交通流量的不断增加,路口车辆通行的高效性和安全性成为交通管理领域关注的重要问题。在城市道路的关键路口,若不能根据两侧车道车辆数量的动态变化及时调整通行资源,容易导致一侧车道拥堵、另一侧车道资源浪费的情况,甚至可能引发交通事故。因此,研发一种能自动感知车辆数量并动态调整护栏位置的智能系统十分必要。
本设计提出了一种基于 STM32F103C8T6 单片机的物联网智能护栏系统。系统主要功能包括:通过两个 JS 红外对射管分别检测护栏两侧车道的车辆数量,每 10 秒对两侧车辆数进行一次比较;当左侧车道车辆数高于右侧 5 辆及以上时,控制步进电机带动护栏右转,模拟护栏向右侧移动以增加左侧车道通行空间;当右侧车道车辆数高于左侧 5 辆及以上时,控制步进电机带动护栏左转,模拟护栏向左侧移动以增加右侧车道通行空间;同时,通过两个 BZ 红外避障管实时检测护栏移动过程中是否存在障碍物,若检测到障碍物,系统立即控制护栏停止移动,直至障碍物移除后再继续执行移动操作。
该物联网智能护栏系统的作用在于,为城市交通路口管理提供了一种自动化、智能化的解决方案。通过实时感知车辆数量并动态调整护栏位置,能够有效优化路口车道通行资源分配,缓解交通拥堵,同时借助避障功能保障护栏移动过程中的安全性,提升路口整体通行效率和交通管理水平。
关键词:物联网;智能护栏系统;STM32F103C8T6 单片机;车辆检测;避障控制
Design of IoT Intelligent Barrier System
Abstract
With the continuous increase of urban traffic flow, the efficiency and safety of vehicle passage at intersections have become important issues in the field of traffic management. At key intersections of urban roads, if the traffic resources cannot be adjusted in a timely manner according to the dynamic changes in the number of vehicles in the lanes on both sides, it is easy to cause congestion in one lane and waste of resources in the other lane, and may even lead to traffic accidents. Therefore, it is very necessary to develop an intelligent system that can automatically sense the number of vehicles and dynamically adjust the position of the barrier.
This design proposes an IoT intelligent barrier system based on the STM32F103C8T6 single-chip microcomputer. The main functions of the system include: two JS infrared correlation tubes are used to detect the number of vehicles in the lanes on both sides of the barrier respectively, and the number of vehicles on both sides is compared once every 10 seconds; when the number of vehicles in the left lane is 5 or more than that in the right lane, the stepping motor is controlled to drive the barrier to turn right, simulating the barrier moving to the right to increase the traffic space of the left lane; when the number of vehicles in the right lane is 5 or more than that in the left lane, the stepping motor is controlled to drive the barrier to turn left, simulating the barrier moving to the left to increase the traffic space of the right lane; at the same time, two BZ infrared obstacle avoidance tubes are used to detect in real time whether there are obstacles during the movement of the barrier. If an obstacle is detected, the system immediately controls the barrier to stop moving, and continues to perform the movement operation only after the obstacle is removed.
The role of this IoT intelligent barrier system is to provide an automated and intelligent solution for urban traffic intersection management. By real-time sensing the number of vehicles and dynamically adjusting the position of the barrier, it can effectively optimize the allocation of traffic resources in the intersection lanes, alleviate traffic congestion, and at the same time ensure the safety of the barrier during movement with the help of the obstacle avoidance function, thereby improving the overall traffic efficiency of the intersection and the level of traffic management.
Key words: Internet of Things (IoT); Intelligent Barrier System; STM32F103C8T6 Single-Chip Microcomputer; Vehicle Detection; Obstacle Avoidance Control
目 录
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 供电模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 红外对射模块子流程设计
4.4 红外避障模块子流程设计
4.5 步进电机子流程设计
5 实物制作与功能测试
5.1 实物制作
5.2 车辆计数与护栏调整功能测试
5.3 避障保护功能测试
5.4 系统整体协同功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!