沈阳理工大学学士学位论文
摘 要
随着现代科技术的进步,公路交通呈现出行驶高速化、车流密集化的趋势。同时,随着汽车工业的飞速发展,汽车的产量和保有量都在急剧增加。但公路发展、交通管理相对落后,导致了交通事故与日俱增,城市交通拥堵成为城市管理的难题。
本设计在汽车前端放置超声波检测装置,通过对前方汽车车距的检测,送到中心控制器作出判断,进行车辆车速控制,从而达到车辆主动安全行驶,避免不必要的碰撞。设计利用智能小车来模拟真实车辆行驶环境,采用红外对管检测黑线实现循迹,超声波传感器测距实现避障,采用MSP430G2553作为主控制芯片,电动车电机驱动采用L298N芯片,根据内置的程序分别控制小车四个直流电机运转,实现小车自动识别路线循迹行驶,能较有效的控制其在碰上障碍物时能及时停车。本设计结构简单,较容易实现,具有一定的智能性。
这个系统安装在汽车上,能探测车辆前方的行人、车辆或周围障碍物,能向司机提前发出即将发生撞车危险的信号,促使司机采取应急措施来应付特殊险情,避免损失,在日常交通环境中提高了车辆行驶安全性,具有一定的市场推广价值。
关键词:智能小车;msp430单片机;L298N;超声波传感器;红外传感器
I
沈阳理工大学学士学位论文
Abstract
Along with the progress of modern science and technology, the trend of highway transportation is the trend of high speed and traffic flow.. At the same time, with the rapid development of the automobile industry, the output and the quantity of the automobile are increasing sharply.. However, the development of highway, traffic management is relatively backward, resulting in the traffic accident growing, urban traffic congestion become the city management problems.
The design at the front end of the car placed ultrasonic detection device, through the distance to the front vehicle detection, sent to the central controller to judge, vehicle speed control, so as to achieve vehicle active safety driving, avoid unnecessary collision. Design using the smart car to simulate the real vehicle driving environment, using infrared to detect black line pipe to achieve the tracking, ultrasonic ranging sensor to achieve obstacle avoidance and the msp430g2553 as the main control chip, motor drive using L298N chip, built-in procedures according to respectively control car four DC motor running, achieve automatic car identification route tracking driving, can more effectively control the run into obstacles can stop in time. This design is simple and easy to achieve, with a certain intelligence.
The system was installed in the car, can detect vehicles in front of the pedestrians, vehicles, or around obstacles., to the driver in advance from the impending collision danger signal, to urge the driver to take emergency measures to cope with the special danger, avoid losses, in daily traffic environment improves the vehicle driving safety, has a certain market popularization value.
Keywords: Intelligent car; MSP430 microcontroller; L298N; ultrasonic sensor; infrared tube
II
沈阳理工大学学士学位论文
目录
1 绪论 ............................................................ 1 1.1 课题背景 ..................................................... 1 1.2 课题研究意义 ................................................. 2 1.3 超声波技术 ................................................... 3 1.3.1 超声波测距原理 ........................................... 3 1.3.2 超声波传感器的分类 ....................................... 4 1.3.3 超声波测距的特点 ......................................... 4 2 元器件介绍 ...................................................... 5 2.1 红外传感器TCRT5000 .......................................... 5 2.2 比较器LM393 ................................................. 6 2.3 LM7805稳压芯片 .............................................. 7 2.4 L298N电机驱动芯片 ........................................... 8 3 硬件系统设计 ................................................... 10 3.1 电源模块 .................................................... 10 3.2 电机驱动模块 ................................................ 11 3.3 循迹模块 .................................................... 12 3.4 超声波模块 .................................................. 13 3.4.1 超声波测距基本工作原理 .................................. 14 3.4.2 HC-SR04主要技术参数 .................................... 14 3.5 MSP430单片机最小系统 ....................................... 15 3.5.1 电源电路 ................................................ 15 3.5.2 晶振电路、复位电路及接口电路 ............................ 15 4 软件系统设计 ................................................... 17 4.1 主程序 ...................................................... 17 4.2 电机转向控制程序 ............................................ 18
III