基于图像识别的智能寻迹控制系统设计
摘要
本次基于图像识别的智能寻迹控制系统设计软件利用C语言编程、硬件利用电机驱动、避障,蓝牙,单片机的一类超声波避障循迹小车,根据STC89C52单片机设计的小车实用性强,功能齐全,技术先进,由电机驱动部分,单片机,超声波部分,舵机部分,蓝牙模块等组成。它能利用蓝牙模块通信控制小车向前行驶、向后行驶、向左行驶和向右行驶,也可以通过红外对管检测黑线,当左红外检测黑线,车上接收信号,处理信息。当检测到红外线管的右侧,汽车接收信号,处理信息,往右边偏转。也还利用红外对管和超声波检测检测障碍物,当检测到前方的障碍物,在路的左侧行驶,如果距离大于右侧的车的距离,在路的右侧,如果距离大于距离的路的左边,向左边行驶,如果距离小于对后驱动双方20cm,则后退。小车使用STC89C52单片机控制电动汽车的速度和方向,从而实现自动跟踪和避障功能。其中,汽车驱动由L293D驱动电路完成,速度由单片机控制。本系统采用52单片机STC89C52单片机编程来驱动汽车前进和后退,向左行驶、向右行驶、避障,电机的正反调速的电机驱动L293D输出端的逻辑电平控制。从设计过程的角度来看,充分准备是非常重要的,经过前期准备,和开发嵌入式系统学习,避免了很多后续设计的问题。总的来说,已经做了充分的准备。在实践过程中,通过查阅相关资料和咨询相关人员,克服了系统设计过程中的大部分困难,基本达到了设计要求。并通过了软件测试。本设计以单片机为核心,附以外围电路,采用反射型光电探测器进行寻迹操作,利用光电传感器检测道路上的障碍,运用单片机的运算和处理能力来实现基于图像识别的智能寻迹控制系统的各种功能,最终实现简单的智能化。
关键词 图像识别;智能循迹;单片机;控制
Design of Intelligent tracking Control system based on Image recognition
Abstract
The software of the intelligent tracking control system based on image recognition is programmed by C language, and the hardware is driven by motor, avoiding obstacle, bluetooth, single chip microcomputer is a kind of ultrasonic obstacle avoiding track car. The small car designed according to STC89C52 single chip microcomputer has strong practicability. Complete function, advanced technology, by motor drive part, single chip microcomputer, ultrasonic part, steering gear part, Bluetooth module and so on. It can use Bluetooth module to control the car to drive forward, backward, left and right. It can also detect the black line through the infrared tube, when the left infrared detection black line, the vehicle receives the signal and processes the information. When the infrared is detected, On the right side of the tube, the car receives the signal, processes the information, and deflects to the right. It also uses infrared pairs of tubes and ultrasound to detect obstacles, when the obstacles in front of the road are detected, driving on the left side of the road, if the distance is greater than the distance of the car on the right, on the right side of the road, if the distance is greater than the left side of the road, Drive to the left and step back if the distance is less than 20 cm for both sides of the rear drive. The car uses STC89C52 MCU to control the speed and direction of the electric vehicle, thus realizing the function of automatic tracking and obstacle avoidance. Among them, the automobile driving circuit is completed by L293D driving circuit, and the speed is controlled by single chip microcomputer. This system adopts 52 single chip microcomputer STC89C52 is programmed to drive the car forward and backward, to the left, to the right, to avoid obstacles, the motor drives the L293D output of the logical level control of the positive and negative speed of the motor. From the point of view of the design process, it is very important to fully prepare. After the pre-preparation, and the development of embedded system learning, many problems of subsequent design have been avoided. In general, full preparation has been made. In the process of practice, most of the difficulties in the design of the system are overcome by consulting the relevant data and consulting the relevant personnel, and the design requirements are basically met. And passed the software test. This design Taking single-chip microcomputer as the core, the peripheral circuit is attached, the reflective photodetector is used for trace-finding operation, and the obstacle on the road is detected by the photoelectric sensor. All kinds of functions of intelligent trace-seeking control system based on image recognition are realized by using the operation and processing ability of single-chip microcomputer, and the simple intelligence is realized at the end of the paper.
Keywords:image recognition; intelligent trace; single chip microcomputer; control
目录
摘要…… I
Abstract II
基于图像识别的智能寻迹控制系统设计 I
Design of Intelligent tracking Control system based on Image recognition II
目录 III
第1章 绪论 1
1.1 课题背景 1
1.1 国内外文献综述 1
1.2 论文研究内容 2
第2章 基于图像识别的智能寻迹控制系统方案论证与分析 4
2.1 基于图像识别的智能寻迹控制系统构架方案论证 4
2.2 电机选择方案论证 4
2.3 电机驱动方案论证 5
2.4 供电电源方案论证 6
2.5 寻迹检测方案论证 6
2.6 避障方案论证 7
2.7 无线遥控方案论证 7
2.8 控制方案论证 7
2.9 本章小结 8
第3章 基于图像识别的智能寻迹控制系统硬件设计 9
3.1 硬件原理图 9
3.2 控制电路设计 9
3.2.1 STC89C52单片机硬件结构 9
3.2.2 最小系统的设计 10
3.2.3 下载端口设计 12
3.3 电源模块设计 14
3.4 电机驱动模块设计 14
3.5 寻迹模块设计 17
3.6 避障模块设计 18
3.7 遥控模块设计 20
3.8 本章小结 20
第4章 基于图像识别的智能寻迹控制系统软件设计 22
4.1 软件设计环境简介 22
4.1.1 Keil开发环境介绍 22
4.1.2 STC_ISP程序下载说明 24
4.2 寻迹程序设计 25
4.3 避障程序设计 26
4.4 遥控程序设计 27
4.5 主程序设计 29
4.6 本章小结 30
结论 31
致谢 32
参考文献 33
附录:部分原理程序 35
附录:部分硬件原理图 39