基于红外探测器及单片机的智能循迹小车设计毕业论文

 2021-04-15 12:04

摘 要

随着计算机技术和信息化技术的飞速发展,智能技术的发展日新月异。由于智能化的程度越来越高,因此其应用范围也在不断的扩展。本文介绍了一种基于STC89C52单片机为控制核心的智能循迹小车的设计,该智能小车能自动沿黑色固定轨迹运行。以STC89C52单片机为控制核心,并联左右两侧电机,通过控制1个L298N电机驱动模块,控制左右两侧电机的正反转以及输出电平,进行二轮驱动,实现智能车的差速控制。利用5个红外光电传感器均匀分布布置在智能车前部,用于采集轨道信息以实现循迹功能。本设计能够实现小车“前进”、“左转”、“右转”、“停止”等运行方式。单片机根据红外传感器采集路面信息输出的不同电平,发出不同的控制信号给电机驱动模块,使小车自动循迹。

实验证明,所设计的小车结构简单,该系统能很好的满足智能车对矩形,椭圆形,钝角多边形,锐角多边形等黑线跑道的要求,易于调试且左转直角弯,右转直角弯都可以实现。

关键词:STC89C52单片机;智能循迹小车;红外探测器

Design of Intelligent Tracing Car Based on Infrared Detector and Single Chip Microcomputer

ABSTRACT

With the rapid development of computer technology and information technology, the development of intelligent technology is changing with each passing day. As the degree of intelligence is getting higher and higher, so its scope of application is also constantly expanding. This article describes a STC89C52 microcontroller based on the control of the core of the intelligent tracking car design, the smart car can automatically run along the black fixed track. To STC89C52 microcontroller as the control core, parallel to the left and right sides of the motor, by controlling a L298N motor drive module to control the right and left sides of the motor forward and reverse and the output level, the second wheel drive to achieve intelligent vehicle differential control. Using five infrared photoelectric sensors evenly distributed in the front of the smart car, used to capture track information to achieve tracking function. The design can achieve the car "forward", "turn left", "turn right", "stop" and other modes of operation. SCM according to the infrared sensor to collect the different levels of road information output, issued a different control signal to the motor drive module, so that the car automatically track.

Experiments show that the design of the car structure is simple, the system can be very good to meet the smart car on the rectangular, oval, obtuse angle polygon, acute angle polygon and other requirements of the black line runway, easy to debug and turn right angle, right turn right can be realized.

Key Words:STC89C52 microcontroller;Intelligent tracking car;Infrared sensor

目 录

1 前 言 1

1.1研究目的及意义 1

1.2研究概况 1

1.2.1主控模块 1

1.2.2循迹模块 2

1.2.3电机驱动模块 2

1.2.4电源模块 2

1.3 本课题研究内容 3

1.4 章节安排 3

2 智能循迹小车硬件总体方案设计 5

2.1循迹小车设计思想 5

2.2系统硬件结构图 5

2.3硬件原理图 5

2.4所用器件名称型号 7

3 智能循迹小车硬件设计 8

3.1主控模块 8

3.2循迹模块 8

3.3电机驱动模块 10

3.4电源模块 11

3.5报警模块 12

4 智能循迹小车软件设计 13

4.1智能循迹小车工作流程图 13

4,2 电机驱动模块子程序 14

4.2.1小车前进子程序模块 14

4.2.2小车左转子程序模块 14

4.2.3小车右转子程序模块 14

4.2.4小车停止子程序模块 14

4.2.5小车调速子程序模块 14

4.3循迹算法设计 17

4.4其他程序 19

5 调试过程与实验结果 21

5.1调试过程 21

5.1.1系统电路硬件调试 21

5.1.2系统软件调试 22

5.2实验结果 23

第6章 结论与展望 26

6.1 结论 26

6.2 展望 26

致 谢 27

参考文献 28

附 录 29

1智能小车循迹系统总程序 29

1 前 言

1.1研究目的及意义

智能车辆系统的基本功能是利用各类传感器感知环境信息,做出控制决策,使得车辆按照期望路线行驶或到达期望目标位置。智能车辆适应不同的外部环境,不会受温度、湿度、空间、磁场、辐射等条件的影响,在人类无法进入的或者无法在里面生存的复杂的环境里,智能车辆可以代替人类完成相对应的工作、探测任务,适用于国防和民用等多个领域。智能车辆应用了微处理器、红外传感器、自动控制、测量控制、信息处理、机械设计、模式识别等技术,已成为人工智能领域研究和发展的热点。有关智能车的设计、功能的实现和相关技术的研究等更是成为培养大学生创新能力的有效途径。
本课题研究基于红外探测器及单片机的智能循迹小车设计,以单片机为核心控制单元,应用红外反射式光电管识别路径,通过电机驱动模块控制小车行驶速度和方向,实现智能车的循迹行走和速度控制等功能。

1.2研究概况

1.2.1主控模块

陈明妙所设计的小车的主模块中采用的是STC89C52单片机,该单片机中包含了中央处理器、程序存储器、数据存储器、定时/计数器、UART串口、I/O接口、EEPROM、看门狗等模块,几乎包含了数据采集和控制中所需的所有单元模块[1]。它使用经典的MCS-51内核,对传统的51单片机进行了优化升级,做了很多的改进使得芯片具有传统51单片机不具备的功能[2]。由高密度非易失性存储器技术制造,片上Flash允许程序存储器在系统可编程,亦适于常规编程器[3]。在单芯片上,拥有灵巧的8位CPU和在线系统可编程Flash,使得STC89C52为众多嵌人式控制应用系统提供高灵活、超有效的解决方案。

刘远明等设计的循迹小车的设计采用51单片机构建控制系统,该电路由电源电路,ISP下载接口、电动机驱动电路接口,AT89S51单片机等几部分组成[4]。当传感器靠近金属物体时,传感器输出为低电平,无金属物体时,输出为高电平。 89C52和89S51单片机的区别是:就是S系列具备在系统可编程(ISP)功能只需连好下载电路,即可在不拔下51芯片的情况下直接对芯片进行编程操作,且s系列里有工作频率更高电源范围更宽。编程次数更多,加密功能更强的特点,而且自带了看门狗电路。

1.2.2循迹模块

循迹是指轮胎沿着人们设定好的轨道行进。在小车循迹设计中,通常是指在白色地板上画出一条黑色跑道,然后让小车沿着黑色跑道行走,在实际设计中我们通常采用的是红外探测的方法[5]

您需要先支付 80元 才能查看全部内容!立即支付

课题毕业论文、开题报告、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找,优先添加企业微信。