基于单片机的迷宫小车论文 有程序电路图

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

本科生毕业论文

基于单片机的迷宫小车系统的设计

The System Design of Maze Trolley System on SCM 需要总程序或者原理图的,请联系qq

Qq: 296931385

学生姓名

所在专业电子信息工程

所在班级电子1091班

申请学位工学学士

指导教师职称讲师

副指导教师职称

答辩时间2013年6月1日

目录

摘要 ............................................................................................................................ I ABSTRACT ................................................................................................................ II 第1章绪论 (3)

1.1 课题背景 (3)

1.2 课题的目的及意义 (3)

1.3 主要实现的功能 (4)

1.4 主要实现的功能 (5)

第2章方案设计与论证 (6)

2.1 总体设计 (6)

2.2 路径识别系统及布局方案 (6)

2.2.1 确定路径检测方法 (6)

2.2.2 确定传感器布局 (8)

2.3 小车动力及主体设计方案 (9)

2.4 电机驱动方案 (9)

2.5 显示方案 (10)

第3章硬件电路设计 (11)

3.1 电源电路模块 (11)

3.2 传感器电路模块设计 (12)

3.2.1 红外避障模块 (12)

3.2.2 终点寻黑线模块 (13)

3.2.3 小车距离检测模块 (15)

3.3 电机驱动模块 (16)

3.3.1 电机驱动原理 (16)

3.3.2 H桥式电机驱动电路 (17)

3.4 液晶显示电路模块 (21)

3.5 主控板电路 (22)

3.5.1 单片机最小系统原理 (22)

3.5.2 STC12C5A60S2单片机简介 (22)

第4章软件程序设计 (24)

4.1 总体控制流程图 (24)

4.2 电机驱动子程序设计 (25)

4.3 测距及及时子程序设计 (28)

4.4 避障及停止子程序设计 (30)

4.5 显示子程序设计 (33)

第5章系统测试及操作说明 (37)

5.1 系统硬件测试 (37)

5.2 系统软件测试 (38)

5.3 系统操作说明 (38)

第6章结束语及展望 (39)

鸣谢 (40)

参考文献 (41)

摘要

介绍了一种基于8位单片机STC12C5A60S2的迷宫小车系统,充分利用该芯片自带的两路PWM结合L298N芯片控制小车的运行状态;该系统采用五路红外传感器来自动检测路况,将所测得信息反馈给小车控制电路,通过软件对其行进路线进行智能调节,实现了小车自动从事先所设定的迷宫中走出;测距采用以霍尔传感器为核心的电路模块实现测距功能。采用光电对管TCR5000来检测终点坐标信息,控制小车停止。同时,采用LCD12864来显示迷宫小车的距离及行走的时间。本设计结构简单,较容易实现,具有一定的智能化。

总体规划

对于走迷宫小车控制系统设计主要有三个方面:一、控制电路设计;二、传感器选择以及安放位置设计;三、程序设计。从总的方面来考虑,传感器的使用数量应该尽量少以减少单片机的信号处理量,但是又必须能使小车行驶自如。控制电路要根据选用的电机和传感器来设计,主要考虑稳定性,抗干扰性。

关键词:STC12C5A60S2单片机;PWM;红外传感器;LCD12864;迷宫左手算法

ABSTRACT

ABSTRACT

Describes a kind of maze car system based on 8-bit MCU STC12C5A60S2, make full use of the chip comes with the two way of PWM and L298N chip to control the car running state; The system USES the infrared sensor to automatically detect five road traffic, measured by information feedback to the control circuit, the car through the software to its path of intelligent adjustment, has realized the automatic car from within the labyrinth set in advance; Distance measurement based on hall sensor TCR5000 as the core circuit module implementation ranging function. The photoelectric pair tubes to detect end-point coordinate information, control the car stop.At the same time, adopt LCD12864 labyrinth to display the car walking distance and time. This design has simple structure, is easy to implement, has a certain intelligence.

The overall plan:

The design of the control system of maze-running intelligent car mainly includes three parts:

First: the design of the control circuit; Second: the choosing of the sensor and the design of the mount position; Third: Program Design. From a overall perspective, you should use the sensors as few as possible so as to reduce the signal processing amount of the MCU and at the same time you must make the car march freely. The control circuit must be designed according the motors and sensors chosen, mainly take the stability and the noise immunity into account.

KEYWORDS: STC12C5A60S2 single chip microcomputer; Pulse width modulation; Infrared seneor;LCD12864;Left hand maze algorithm

相关文档
最新文档