1、- I - 自动寻迹小车自动寻迹小车 摘要摘要 AT89S52 单片机是一款八位单片机, 他的易用性和多功能性受到了 广大使用者的好评。这里介绍的是如何用 AT89S52 单片机来实现电动 小车的自动寻迹。本系统以设计题目的要求为目的,采用 AT89S52 单 片机为控制核心,利用电动小车前面的红外线传感器检测道路上的轨 迹,将路面信息转送给 AT89S52,AT89S52 根据信息作出反应控制电动 机转动,从而控制电动小汽车按照路上的轨迹行驶。整个系统的电路结 构简单,可靠性能高。实验测试结果满足要求,本文着重介绍了该系统 的硬件设计方法及测试结果分析。 本小车采用的技术主要有传感器的有效应
2、用和 AT89S52 芯片的使 用。有很多功能可以继续扩展,值得就一步学习和研究。 关键词关键词: AT89S52 红外线传感器 直流电机 - II - Abstract AT89S52 SCM is a section 8 microcontroller, his usability and multi-functional received overwhelming support from users praise. Here introduces AT89S52 SCM is how to use electric car to realize the automatic tracin
3、g. This system to design the topic request, the purpose for AT89S52 SCM as control core, using electric car in front of the infrared sensor detects the trajectory path, pavement message to someone AT89S52 devices, react AT89S52 according to the information which can control the rotation control moto
4、r electric car according to the road track road. The whole system circuit structure simple, reliable performance is high. The test results meet the requirements; the paper introduces the hardware design method and the analysis of the testing result. This car the technique to be used mainly sensor ef
5、fective application and the use of AT89S52 chip. There are many function can continue to expand, worth just step for study and research. Keywords: AT89S52, light electricity detector,direct-current motor - III - 目录目录 摘要 I AbstractII 目录 . III 前言 . 1 1 方案设计与论证 . 2 1.1 电动小车模块 2 1.1.1 转向和动力 2 1.1.2 电动机模
6、块 . 3 1.1.3 调速系统 3 1.1.4 电机驱动模块 . 4 1.2 控制模块 . 5 1.3 传感器模块 . 5 1.4 电源模块 . 6 2 硬件设计 . 7 2.1 主要元器件的介绍 . 7 2.1.1 电机驱动芯片 L9110 7 2.1.2 AT89S52 . 9 2.1.3 红外线传感器 . 17 2.2 模块介绍 . 18 2.2.1 车头传感器模块 18 2.2.2 电动小车模块 . 19 2.2.3 控制模块 . 19 2.3 整体方案 . 20 3 软件设计 . 22 3.1 程序设计 . 22 3.1.1 程序的模块化设计 . 22 3.1.2 部分程序设计 . 23 3.2 利用 proteus 进行软件仿真 26 3.3 制作电路图和 PCB 板图 27 - IV - 4 总结 31 致谢 . 33 参考文献 . 34 附录 1 C 语言程序 . 35 附录 2 电路图和 PCB 板图 39 附录 3 小车实物图 . 错误错误!未定义书签。未定义书签。 自动寻迹小车 - 1 - 前言前言 随着汽车工业的迅速发展,关于汽车的研究也就越来越