1、 毕业论文(设计) 题 目:利用接近开关实现小车的循迹问题 完 成 人: 班 级: 09 级通信 7 班 学 制: 专 业: 通信工程 指导教师: 完成日期: 20130306 摘 要 本设计是一种基于单片机控制的简易智能寻迹小车系统,旨在设计出一款可以自主按 照人类预设的轨迹行走并完成指定任务的小车。本设计主要有三个模块包括信号检测模块、 主控模块、电机驱动模块。信号检测模块采用红外光对管,用以对黑线进行检测。控制系统 以 STC89C52 为控制核心, 用单片机产生 PWM 波,控制小车速度及转向,从而实现自动循迹的 功能。 关键词 : 循迹小车,单片机,红外传感器 A Abstractb
2、stract(需改)(需改) The design is a simple microcontroller-based control automatically tracing the car system.The design aims to design a can of independent walking in accordance with the trajectory of human default (or completely autonomous walking) and to complete the tasks assigned to the car. The des
3、ign includes the functional requirements from the design of car mechanical design and control system hardware and software design. Control system to control the core to STC89C52 microcontroller PWM wave to control the car speed. Using infrared photoelectric sensor to detect the black track on the ro
4、ad and to determine the current status of the car, and then the road detection signal is fed to the microcontroller. Microcontroller to be collected signal analysis and judgment, and timely control of the drive motor to adjust the steering of the car, so that the car is traveling along the black tra
5、ck to achieve the purpose of the car automatically tracing. Keywords: car tracking;microcontroller;Infrared sensors 目录 第一章 绪论 4 1.1 智能循迹小车的意义和作用 .4 1.2 智能小车的现状 .4 第二章 方案设计与论证 5 2.1 主控系统.5 2.2 电机驱动模块5 2.3 循迹模块.6 2.5 机械系统.7 第三章 硬件设计 8 3.1 总体设计 .9 3.2TCRT5000 黑色轨迹识别电路 .9 3.3LM324 电压比较电路9 3.4 STC89C52 单
6、片机控制电路 . 10 3.4.1 时钟电路 11 3.4.2 复位电路 11 3.4.3 EA/VPP(31 脚)的功能和接法 . 12 3.4.4 P0 口外接上拉电阻 12 3.5 L298N 马达驱动电路 13 第四章 程序设计. 14 4.1 主程序 . 14 4.2TCRT5000 扫描程序 . 16 结束语 17 参考文献. 18 致谢 20 附 录 21 第一章第一章 绪论绪论 1.1 智能循迹小车的意义和作用 随着科技的迅速发展,关于智能化的研究也就越来越受人关注。机器人的发展已经遍及 机械、电子、冶金、交通、宇航、国防等领域。近年来机器人的智能水平不断提高,并且迅 速地改变着人们的生活方式。近几十年来中国在航天领域的发展越来越快,世界各国也从没 停止过探索外星的脚步。在外星球恶劣的环境下探索全由人去完成是不可能的。那么可以自 动驾驶的小车就发挥了它的作用了。用带有摄像头的小车就可以让我们在地