内容发布更新时间 : 2024/11/20 14:26:12星期一 下面是文章的全部内容请认真阅读。
基于51单片机的步进电机控制系统设计
中文摘要
步进电机是一种受脉冲信号控制,并且能将脉冲信号转化为相应的角位移或者线位移的数字电动机。由于步进电机具有步距误差不积累、运行可靠、结构简单、惯性小、成本低等优点,因此,被广泛使用于计算机外围电路、自动化控制装置以及其他的数字控制装置中,如打印机、钟表、数模转换设备等装置中。随着科学技术的快速发展,相应的控制系统也产生了很多种类,步进电机的身影在众多领域中可以看到。其中采用单片机作为控制核心的控制系统,由于其电路简单、成本低、可靠性强等优点,满足众多领域的需求,得到了大量的运用。因此,研究基于单片机的步进电机控制系统,具有重要的现实意义。本设计研究的是基于51单片机对步进电机的控制系统。通过单片机的I/O端口输出时序方波作为控制信号,信号经过芯片ULN2003驱动芯片驱动步进电机进行不同的指令进行工作。根据不同的需要,通过按键电路来控制步进电机的启停、正反转和加减速等功能,并在数码管上实时显示步进电机的工作状态。本文给出了电路各个模块的电路图,并用Proteus的ISIS软件对控制系统的各个功能进行了仿真,并给出了相应的仿真结果图像。
关键词:单片机; 步进电机; 电机驱动; 控制系统
I
Abstract
Stepper motor controlled by a pulse signal, and a pulse signal can be converted to the corresponding angular displacement or linear displacement of the digital motor. As the stepper motor has a step error does not accumulate, reliable, simple structure, small inertia, low cost, and therefore, are widely used in computer peripheral circuits, automatic control devices and other digital control devices, such as printers, watches and clocks , digital to analog conversion equipment, and other devices. With the rapid development of science and technology, the corresponding control system also produced many types of stepper motor figure can be seen in many areas. Which uses microcontroller as the control of the control system, because of its simple circuit, low cost, high reliability, etc., to meet the needs of many fields, we get a lot of use. Therefore, based on single-chip stepper motor control system has important practical significance.The design study is 51 single-chip stepper motor control system. As a control signal, the signal through the chip ULN2003 stepper motor drive to work through the microcontroller I / O port output timing square wave. Depending on the need, through the key circuit to control the start and stop, reversing and ramp functions such as stepper motors, stepper motors in real-time display and digital working condition. In this paper, the circuit diagram of each module, and with the ISIS Proteus software for each function control system simulation, and the simulation results are given corresponding image.
Key words: microcontroller; stepper motor; motor drive; control system
II
目 录
中文摘要 ........................................................ I Abstract ....................................................... II 1 绪论 ......................................................... 1
1.1 步进电机及其发展过程 .................................... 1 1.2 步进电机在我国的应用及前景 .............................. 2 1.3 本设计的研究内容 ........................................ 3 1.4 步进电机的性能指标及工作原理 ............................ 3 1.4.1 步进电机的特点 ...................................... 3 1.4.2 步进电机的种类 ...................................... 4 1.4.3 步进电机的主要性能指标 .............................. 5 1.4.4 步进电机的工作原理 .................................. 6 1.5 步进电机控制系统的原理 .................................. 8 2 总体方案设计 ................................................ 10
2.1 设计思路的选择 ......................................... 10 2.2 单片机芯片的选择 ....................................... 12 2.3 驱动电机芯片的选择 ..................................... 12 2.4 显示电路的选择 ......................................... 13 2.5 步进电机的选择 ......................................... 13 3 控制系统的硬件电路设计 ...................................... 15
3.1 键盘控制电路 ........................................... 15 3.2 单片机最小系统电路 ..................................... 16 3.3 数码管显示电路 ......................................... 18 3.4 步进电机的驱动电路 ..................................... 20 3.5 步进电机的其他电路 ..................................... 21 4 控制系统的软件设计 .......................................... 23
4.1 主程序流程图 ........................................... 23 4.2 读按键子程序流程图 ..................................... 24 4.3 按键处理子程序流程图 ................................... 25 4.4 电机控制中断程序流程图 ................................. 26
III