自动往返电动小汽车设计 - 图文 下载本文

河南科技大学本科毕业设计(论文)

自动往返电动小汽车设计

摘 要

智能小车,也称轮式机器人,是一种以汽车电子为背景,涵盖智能控制、模式识别、传感技术、电子电气、计算机、机械等多学科的科技创意性设计。一般主要由路径识别、速度采集 、角度控制及车速控制等模块组成。

本系统以SST系列单片机为核心控制模块,充分利用了自动检测技术、单片机最小系统、液晶显示模块电路,以及声光信号的控制、电机的驱动电路。通过Keil C和PROTEUS的仿真,通过实践操作与调试,实现自动往返小车设计。综合运用单片机技术、自动控制理论、检测技术等。使小车能在无人操作情况下,借助传感器识别路面环境,由单片机控制行进,实现初步的无人控制。单片机具有体积小、重量轻、耗电少、功能强、控制灵活方便且价格低廉等优点。智能小车采用单片机为控制器核心,其集成度高、体积小、抗干扰能力强,具有独特的控制功能,单片机的应用正从根本上改变着传统的控制系统设计思想和设计方法。

本设计以单片机为核心,附以外围电路,采用光电检测器进行检测信号和循线运动。运用单片机的运算和处理能力来实现小车的自动加速、限速、减速、定时、前进、后退、左转、右转、显示行驶速度、行驶路程、行驶时间等智能控制系统。

关键词:SST单片机,自动控制,电动小车, PWM调速,传感器

I

河南科技大学本科毕业设计(论文)

THE DESIGN OF AUTOMATIC ELECTRIC CARS

ABSTRACT

Smart cars, also called wheeled robots, is a kind of automobile electronic background, intelligent control, pattern recognition and sensing technology, electronic, computer, machinery and multidisciplinary science creative design. Generally consists mainly of path recognition, speed acquisition, angle control and speed control module.

System design for the core of SST series microcontroller control module. Make full use of the automatic detection technology, MCU smallest system, LCD module circuit, the control of signal, and the motor drive circuit. Through the simulation Keil C and PROTEUS, practice and debugging, and the realization of automatic car design. Comprehensive use of microcontroller technology, automatic control theory, the detection technology, etc. That car in unattended operation circumstance, using sensor identify road environment. Travel by single-chip microcomputer control, the preliminary no control.

MCU is well established for its flexible operations, small volume, light weight, less consumption, powerful functions, and low in price. This design based on singlechip, peripheral circuit, by using photoelectric detector signal detection and followed the movement. Using MCU to realize the automatic forward, backward, left, right, and display speed, driving distance, time of intelligent control system.

The application of MCU is fundamentally changing the traditional control system design ideas and design method.

KEY WORDS: SST microcontroller, automatic, PWM speed adjusting, sensor

II

河南科技大学本科毕业设计(论文)

目 录

前 言 ................................................................................................................ 1 第1章 绪论 ....................................................................................................... 2 §1.1 设计背景 ................................................................................................ 2 §1.2 设计概述 ................................................................................................ 2 §1.3 设计任务和主要内容 ............................................................................. 3 第2章 系统方案论证与分析 ............................................................................ 4 §2.1 小车车体选择 ........................................................................................ 4 §2.2 主控单片机 ............................................................................................ 5 §2.2.1 采用凌阳16位单片机 .................................................................. 5 §2.2.2 采用SST89E516RD单片机 .......................................................... 5 §2.3 电机模块 ................................................................................................ 6 §2.3.1 采用步进电机 ..................................................................................... 6 §2.3.2 采用直流电机 ..................................................................................... 6 §2.4 电机驱动调速模块................................................................................. 6 §2.5 电源管理 ................................................................................................ 8 §2.5.1 采用单电源供电............................................................................ 8 §2.5.2 采用双电源供电............................................................................ 8 §2.6 路面黑线探测模块................................................................................. 9 §2.6.1 采用对射式红外光电传感器 ........................................................ 9 §2.6.2 采用反射式红外光电传感器 ........................................................ 9 §2.7 测速及里程计量模块 ........................................................................... 10 §2.7.1 采用霍尔传感器.......................................................................... 10 §2.7.2 采用U型红外光电传感器 .......................................................... 10 §2.8 计时模块 .............................................................................................. 11 §2.9 显示模块 .............................................................................................. 11 §2.9.1 采用LED数码管.......................................................................... 11 §2.9.2 采用LCD液晶显示 ...................................................................... 11

III

河南科技大学本科毕业设计(论文)

第3章 智能小车系统设计 .............................................................................. 12 §3.1 主控单片机功能设计 ........................................................................ 12 §3.1.1 单片机硬件结构 ........................................................................... 12 §3.1.2 单片机引脚锁定 ........................................................................... 13 §3.2 电机驱动控制设计 ............................................................................ 15 §3.3 PWM调速控制设计 ............................................................................. 17 §3.4 传感器设计 ....................................................................................... 20 §3.4.1 黑线检测传感器设计 .................................................................... 20 §3.4.2 测速、里程计量传感器设计 ........................................................ 25 §3.5 液晶显示功能设计 ............................................................................ 28 第4章 128×64液晶功能分析 .......................................... 错误!未定义书签。 §4.1 ×××××× .................................................................. 错误!未定义书签。 结 论 .............................................................................................................. 35 参考文献 ........................................................................................................... 36 致 谢 .............................................................................................................. 38 附 录 .............................................................................................................. 39 工作原理........................................................................ 错误!未定义书签。 光电传感器类型介绍 .................................................... 错误!未定义书签。 光电传感器技术参数 .................................................... 错误!未定义书签。 光电传感器使用注意事项 ............................................. 错误!未定义书签。

IV