1、 第 1 页 共 43 页 基于单片机的步进电机控制系统设计 摘要:步进电动机由于用其组成的开环系统既简单、廉价,又非常可行,因此在打 印机等办公自动化设备以及各种控制装置等众多领域有着极其广泛的应用。 本文介绍的是一种基于单片机的步进电机的系统设计,用汇编语言编写出电机的 正转、反转、加速、减速、停止程序,通过单片机、电机的驱动芯片 ULN2004 以及相 应的按键实现以上功能,并且步进电机的工作状态要用相应的发光二极管显示出来。 本文内容介绍了步进电机以及单片机原理、该系统的硬件电路、程序组成,同时对软、 硬件进行了调试,同时介绍了调试过程中出现的问题以及解决问题的方法。该设计具 有思路明
2、确、可靠性高、稳定性强等特点,通过调试实现了上述功能。 关键词:步进电机;脉宽调制;驱动机构;单片机;转动 第 2 页 共 43 页 Design of The Control System of Step-motor Abstract: 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 equip
3、ment 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, speed up, slow down, stop is written by compile language. The above functions are realized through the microco
4、ntroller, motor driver chip ULN2004 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 relia