1、I 摘 要 步进电机是将电脉冲信号转变为角位移或线位移的开环控制元步进电机件。 在非超载的情况下, 电机的转速、 停止的位置只取决于脉冲信号的频率和脉冲数, 而不受负载变化的影响,当步进驱动器接收到一个脉冲信号,它就驱动步进电机 按设定的方向转动一个固定的角度,称为“步距角” ,它的旋转是以固定的角度一 步一步运行的。可以通过控制脉冲个数来控制角位移量,从而达到准确定位的目 的;同时可以通过控制脉冲频率来控制电机转动的速度和加速度,从而达到调速 的目的。因此,步进电机以其精准的控制特性,广泛应用于执行器件中。 本文设计了基于单片机的步进电机控制器,系统采用 AT89S52 型单片机作为 主控制
2、器电路。 采用步进电机驱动芯片 ULN2003 趋动 28BYJ-48 型四相八拍步进电 动机,设计了对应的按键控制电路和 LCD 状态显示电路。 AT89S52 的控制指令通 过光耦 TLP521-4 控制 ULN2003,根据计算控制脉冲时序,算出电机转过的步数或 圈数, 用 LCD1602A 显示步进电机运行状态和转速。 各控制按键功能用无线收发模 块 PT2262/2272 作为辅助,共同实现步进电机的控制。同时整个系统作为一个执 行部件, 嵌入到其他的微机控制系统中。 外部微机通过 MAX232 芯片将信号转化为 RS232 协议信号, 与主控制器控制器进行通信。 AT89S52 通
3、过内部程序识别外部微 机的控制信号, 对控制系统进行控制, 使得本系统的应用范围与可靠性大大提高。 关键词 单片机;达林顿管;步进电动机;串口通信 II Abstract Stepping motor is will signal into electrical impulses for angular displacement or line open loop control the displacement of stepping motor parts. In the overload of the cases, motor speed, stop depends only on th
4、e position of the pulse signal frequency and pulse count, and do not suffer the effect of load changes, when stepping drive to receive a pulse signal, it will drive stepping motor set according to turn a fixed Angle, called “step from the corner“, it is the point of view of the rotation of the fixed
5、 step by step of operation. Can through the control pulse to control the number of angular displacement quantity, so as to achieve the purpose of accurate positioning; At the same time can through the control pulse frequency to control motor rotation speed and acceleration, so as to achieve the purp
6、ose of speed. Therefore, stepping motor with its precise control characteristics, widely used in execution of the device.In this paper, based on SCM stepping motor controller, system adopts single-chip microcomputer as the main controller AT89S52 type circuit. The control instruction through light AT89S52 decoupling method-4 control ULN2003, according to computation control pulse timing, calculate efficiency or motor turned laps, with LCD1602A display stepping motor running state and speed. Th