关于单片机的毕业论文 下载本文

**届 分 类 号:

单位代码:

临沂大学

毕业论文

基于单片机的步进电机控制系统设计

姓 名

******* 学 号 ************** 年 级

***** 专 业 ****** 系 (院)

******* 指导教师 ****

****年*月*日

临沂大学

摘 要

步进电动机由于用其组成的开环系统既简单、廉价,又非常可行,因此在打印机等办公自动化设备以及各种控制装置等众多领域有着极其广泛的应用。

本文介绍的是一种基于单片机的步进电机的系统设计,用汇编语言和C语言编写出电机的正转、反转、调速、停止程序,通过单片机、电机的驱动芯片ULN2001以及相应的按键实现以上功能,并且步进电机的工作状态要用LCD液晶显示器显示出来。本文内容介绍了步进电机以及单片机原理、该系统的硬件电路、程序组成,同时对软、硬件进行了调试,同时介绍了调试过程中出现的问题以及解决问题的方法。该设计具有思路明确、可靠性高、稳定性强等特点,通过调试实现了上述功能。

关键词:步进电机;脉宽调制;驱动机构;单片机;转动

临沂大学

Design of The Control System of Step-motor

The open-loop system which is composed by step-motor is simple, cheap and very practical, so there are very wide range of applications in printers and other office automation equipment and various control devices, and many other fields.

This article describes one design of step-motor system based on microcontroller.The program of the preparation of a motor , reverse, adjust speed, stop is written by compile language. The above functions are realized through the microcontroller, motor driver chip ULN2001 and correspond key , and the work state of stepper motor is diaplayed through the light-emitting diode. This article introduces the principle of stepper motor and single-chip microcomputer, the system hardware circuit, the program components, while software and hardware for the debugging, at the same time introduces the problems which are appeared in the debugging process and the solutions of the problems . The design has the advantages of clear , high reliability, strong stability, and the above-mentioned functions are realized through the debugging.

Key words: Stepping motor; Pulse-width modulated; driving mechanism; singlechip; rotation

临沂大学

目 录

1 引言 .................................................................. 1 1.1 课题研究的目的和意义 ................................................ 1 1.2 国内外研究概况 ...................................................... 1 2 步进电机与单片机简介 .................................................. 1 2.1 步进电机介绍 ........................................................ 1 2.2步进电机驱动系统介绍 ................................................ 6 2.3 单片机原理 .......................................................... 8 3硬件电路的设计 ..................................................... 12 3.1 系统整图 ........................................................... 12 3.2 电源部分 ........................................................... 12 3.3 最小系统 ........................................................... 13 3.4 驱动部分 ........................................................... 14 3.5 状态指示部分 ....................................................... 14 3.6 按键部分 ........................................................... 14 3.7 时钟部分 ........................................................... 15 3.8 复位部分 ........................................................... 15 3.9 KEIL-UVISION简介与调试 ............................................... 15 3.10 PROTEUS仿真步进电机正转 ............................................ 16 3.11 PROTEUS仿真步进电机反转 ............................................ 17 3.12 PROTEUS仿真总图与PROTEUS简介 ........................................ 17 4软件设计 ............................................................ 23 4.1 系统开发软硬件环境 ................................................. 23 4.2 系统程序框图 ....................................................... 24 4.3 系统程序 ........................................................... 25 6 结论 ................................................................. 31 参 考 文 献 ............................................................ 33 致 谢 ................................................................. 34