基于AT89C51单片机的步进电机控制系统设计外文翻译资料

 2022-12-07 05:12

Design of stepping motor control system based on AT89C51

Microcontroller

Abstract

This paper describes a control system of microcontroller AT89C51 used in stepping motor. These included the

keyboard input and LED display circuit,control circuit,magnifying and driving circuit and the corresponding

program flow drawing. This system can be applied in many stepping motor control regions. The experiment showed that the system can be used stably and reliably in control stepping motor and perfect compliance with the

requirements of project.

Keywords: Stepping motor; Control system; Microcontroller; AT89C51

1. Introduction

Stepping motors are widely used in electrical and mechanical equipments, which can directly convert electrical pulse signal into angular displacement or linear displacement of the implementing agencies. The pulse signal received by stepper motor drive can drive a stepper motor to rotate a fixed angle in accordance with the directions set, and control the amount of angular displacement by controlling the number of pulses. The stepper motorrsquo;s speed and acceleration can also be controlled by controlling the pulse frequency. And the output of the angular displacement of stepper motor and speed are proportional to the input of the number of pulses and pulse frequency. Traditional circuit design of the stepper motorrsquo;s control and drive circuit is not only complex or costly, but also difficult to be modified or adapt to the higher intelligence occasion, and with poor portability after the system is formed. In this paper, AT89C51microcontroller is used as controller to control the stepper motor. The control system is more simple, reliable and flexible.

2. System Design

All figures should be numbered with Arabic numerals (1,2,...n). All photographs, schemas, graphs and diagrams are to be referred to as figures. Line drawings should be good quality scans or true electronic output. Low-quality scans are not acceptable. Figures must be embedded into the text and not supplied separately. Lettering and symbols should be clearly defined either in the caption or in a legend provided as part of the figure. Figures should be placed at the top or bottom of a page wherever possible, as close as possible to the first reference to them in the paper.

This stepper motor control system mainly consists of ATMEL89C51 microcontroller, motor driver

chips, buttons, LED display of common anode in serial port mode, power and clock circuit, and so on.

The block diagram is shown in Figure 1. With the Built-in Watchdog of AT89C51 can ensure the normal operation of the system. The system has the characters of simple, low cost, highly reliable, versatile, and so on. In practical applications, in order to have lower cost, the stepper motor was driven by using L298N.

Fig.1 Block diagram of stepper motor control system

3. Hardware Design

3.1. Keyboard, LED modules

In order to improve the intelligence level of the system, the 8 times; 8 keyboard and 16-bit LED display

was used to get machine conversation, and the SL0~SL2 was applied to translate the key scan lines. The 4~16 decoders was use to translate on SL0 ~ SL3-bit display scan line. In fact, a broader application, the size of the keyboard and displayrsquo;s number of bits can be determined according to different needs. The keyboard input the commands about stepper motor speed, steering, step, start and stop, etc, LED digital display stepper motor speed and the dynamic shift, while the system is working. The SCM system uses a common keyboard / display and controller chip 8279 to manage the keyboard and display to reduce the burden on the host and improve the stability of display. The connection of the 8279, keyboard and display in the paper is shown in Fig.2.

3.2. SCM Control Module

The module, shown in Fig.3, is mainly consisted of AT89C51 microcontroller and its peripheral

circuits, optical coupler, 74HC244 chips and other components. For simplicity, the figure drew only one phase of the circuit, the same as the rest of the phase circuit. AT89C51 microcontrollerrsquo;s internal 4KB Flash and128B RAM can meet the storage requirements of the system. SCMrsquo; port P1 is mainly used to output stepper motorrsquo;s winding control signals of each phase, and flexibly selects P1.0 ~ P1.7 according to different models of the motor. In order to increase the flexible control of stepper motor, external interrupt port INTO of the SCM was used to test speed resetting and steering settings buttons of the motor during the rotating, setting the INT1 in edge triggered mode. AT89C51 microcontroller is generally programmed with parallel port. Microcontrollerrsquo;s several I/O ports can be directly used to link to parallel lines in theory. However, if the board did not do a good job, the computer parallel port may be burned, so 74HC244 chip is added to protect the parallel port. At the same time the commonly used three-state gate of the bus circuit is borrowed, mainly because of its output current up to 20mA, which is enough to drive the LED in the optical coupler. Optical coupler (Figure Y1) works as an isolator for SCM and external circuit. Signals can be transmitted from the microcontroller to the followed power amplifier circuit, but the interference signal cannot be sent to th

剩余内容已隐藏,支付完成后下载完整资料


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

摘要

本文描述了一种用于步进电机的基于AT89C51单片机的控制系统。其中包括键盘输入和LED输出电路、控制电路、放大和驱动电路以及程序流程图。本系统可应用于许多步进电机控制领域。本实验表明,此系统可稳定有效的用于步进电机的控制并符合项目要求。

关键词:步进电机;控制系统;单片机;AT89C51

1.简介

步进电机广泛应用于直接将电脉冲信号转换成角位移或直线位移的实行电机设备。步进电机接收到的脉冲信号能通过步进电机驱动器驱动步进电机按照设定的方向旋转一个固定的角度,并通过控制脉冲的数量来控制角位移量。步进电机的速度和加速度也可以通过控制脉冲频率来控制,步进电机的角位移的输出和速度与输入脉冲的数量和脉冲频率成正比。传统步进电机的控制和驱动电路的电路设计不仅复杂昂贵,还很难被修改或适应更高的智能,系统形成后可移植性较差。本文将利用AT89C51单片机来进行对步进电机的控制。此控制系统将更简便,实用,灵活。

2.系统设计

步进电机控制系统主要包含ATMEL89C51微控制器,电机驱动芯片,按钮,共阳极LED显示屏,电源电路等。框图如图1所示。内置的AT89C51可以确保系统的正常运行。系统拥有简单、低成本、高可靠、多功能等特点。在实际应用程序中,为了降低成本,使用L298N驱动步进电机。

图1 系统框架图

3.硬件设计

3.1.键盘,LED模块

为了提高系统的只能水平,采用8times;8键盘和16位LED显示屏来进行人机交流,SL0~SL2被应用于翻译按键扫描线,4 ~ 16解码器使用翻译SL0 ~ SL3-bit显示扫描线。事实上,键盘的大小和显示器的位数可以根据不同的需要来决定更广泛的应用。当系统工作时,键盘输入步进电机的速度,方向,步骤,启动和停止等命令,而LED数字器显示不进电机的速度和动态变化。单片机系统使用一个共同的键盘/显示器和控制器芯片8279管理键盘和显示器来减少主机的负担并提高显示的稳定性。8279,键盘和显示器的的联系如图2所示。

3.2.单片机控制模块

图3所示的模块主要包含了AT89C51微处理器和外围电路、光耦合器、74 HC244芯片和其他组件。简单起见,图中只画出了一个相电路,其余相电路一样。AT89C51单片机的内部Flash and128B 4 kb RAM可以满足系统的存储需求。单片机的P1端口主要用于输出步进电机的绕组每个阶段的控制信号,根据不同型号的电机灵活选择P1.0~P1.7端口。为了更灵活的控制步进电机,单片机的外部中断端口INT0被用于测试设置电机的旋转按钮的重置和转向速度,设置INT1处于边缘触发模式。AT89C51单片机一般使用并行端口进行程序编排。理论上微控制器的多个I / O端口可以直接用来平行链接。然而,如果主板没有正常运行,计算机并行端口可能会烧毁,所以添加74HC244芯片来保护并行端口。同时公共电路的常用三态门是被借用的,主要是因为它的输出电流高达20 ma,足以驱动LED的光耦合器。光耦合器(图Y1)是单片机和外部电路的隔离器。可以从单片机传送信号功率放大器电路,但干扰信号不能被发送到单片机。模块电路见图3。

图.2 8279,键盘与监控的关联

3.3 信号隔离放大模块

一般来说,系统中步进电机的负载功率较大,需要将步进电机的强电与单片机控制系统的弱点隔离开来,以避免损坏单片机控制系统,提高系统的可靠性,增强抗干扰能力。本文中,功率放大器应用将弱信号传转换为强的信号,为步进电机提供操作电流并使用光学耦合器(图3中的Y1)来作为单片机和外围电路的隔离器。

图.3 单片机的控制模块电路

4.软件设计

整个系统包括键盘、LED显示模块,和一步脉冲发生器模块。操作者可以通过按钮设定步进电机的启动、停止、速度和转向。速度和转向可以改变,也可以动态地显示在LED显示上。单片机使用外部中断检测光耦合器和接口芯片8279的中断端口,根据中断内容对步进电机的各相绕组生成相应的控制脉冲信号。主要程序流程图见图4.

4.1键盘,LED显示器模块

此模块主要是识别键的扫描,预处理输入数据和显示了电机的速度和转向等。初始化包括参数和8279的初始化。初始化后,8279扫描键盘,消除了键盘的敲击,得到输入数据和命令并与单片机通过中断交换信息。单片机根据获得的不同的信息执行相应的数据处理程序,并根据脉冲控制信号生成程序。然后将结果发送到8279,控制LED显示数据和步进电机的转动状态等。

图.4 主要程序流程

4.2脉冲发生器模块

Pl端口的数据格式与步进电机的模型有关,所以单片机根据步进电机模型和输入数据通过P1端口来生成电脉冲信号。必须有一个图5所示的脉冲波形正常驱动步进电机。此脉波形列代表周期、脉冲高度和开/关时间等。步进电机每一步的回应都需要一定的时间,也就是说,高脉冲需要保留一段时间,这样电机可以处于一个完美的状态。

图.5脉冲波形

步进电机有三种工作方式,如单、双枪和多重射击。四相,五相或者六相步进电机的工作方式类似于三相步进电机的工作方法。所以表1只有三相步进电机的励磁方式。其他类型的步进电机可以通过这种方式推导。

5.结论

文中,AT89C51单片机和软件编程技术用来控制步进电机。这种方法实用、简单、灵活。为了控制不同类型的步进电机,只要修改简单的硬件和软件可以得到预期的结果,如修改电机工作时的速度和转向。电路简单、可靠、紧凑和便携。几次实验后,系统非常完美并有较高的实用价值。

6.版权

所有的作者都必须签署版权转让协议在文章可以发表之前,转让协议使爱思唯尔保护作者的版权材料,但不放弃作者的专有权利。版权转让包括专有权本文复制和分发,包括重印,摄影复制品,缩微胶片或其他类似性质的复制品和翻译。作者对获得版权所有者的许可复制任何数字版权负责。

参考文献

[1] TANG Jing-nan, Shen Qin. Development and Examples of 51 Microcontrollerrsquo;s C Language[M]. POSTS amp; TELECOM

PRESS, 2008, p. 127–174

[2] TIAN Li, TIAN Qi, DAI Fang-zhen. Quick Start of Microcontroller C Programming Language[M]. POSTS amp; TELECOM

PRESS, 2008 ,p. 277–299

[3] ZHANG Xin-rong. Design of the Stepping Motor Control System based on Microcontroller[J]. Journal of Automation

Applications, 2010;9(7): p. 6-8.

[4] WANG YI YOU Li-jia. Study of Step Motor Control System Based on AT89S51 Single Chip Microcomputer[J]. Journal of

Mechatronics,2008;4. p. 86-88

[5] CHEN Shi-long. Stepping Motor Control System based on Microcontroller[J].Journal of Ningde Teachers College (Natural

Science), 2009,1(21): p. 16-19.

[6] LI HUA.Practical Interface Technology of MCS-51 [M].BEIHANG UNIVERSITY PRESS,1993,p. 148–158

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[32150],资料为PDF文档或Word文档,PDF文档可免费转换为Word

您需要先支付 30元 才能查看全部内容!立即支付

课题毕业论文、文献综述、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找。