基于单片机的步进电机控制系统
设计与实现
摘 要
步进电机是一种纯粹的数字控制电动机,是一种受电脉冲信号控制的无刷式直流电动机,是现代定位驱动装置的核心,广泛应用在机械、电力、纺织、电子、仪表、印刷以及航空航天、船舶、兵器等国防工业等领域。基于单片机的步进电机控制系统具有稳定度高、成本低、控制方便、应用范围广等特点。
本系统是由STC89C52单片机核心处理模块,遥控器命令输入模块,ULN2003及28BYJ-48步进电机组成的电机模块,12864液晶输出模块共同组成的基于单片机的步进电机控制系统。
本设计以载波为38KHZ的红外遥控器作为用户的控制端,它的功能是把用户的命令转换为红外信号。红外信号由TL1838接收,它可以将光信号转换为电信号,并将其发送给微控制器STC89C52。STC89C52对电信号进行相应处理即可获得用户所发出的指令,并依此来控制28BYJ48型四相八拍电机并以12864液晶作为当前状态的显示器。用户可以对步进电机进行加速、减速、正转、反转的控制。本步进电机控制系统具有精度高、运行稳定、控制方便、维护简单、应用范围广等特点。
关键词:STC89C52 12864液晶 步进电机 红外遥控
Design and Implementation of Stepper Motor Control System Based on MCU
Abstract
Stepper motor is a kind of pure digital control motor and brushless dc motor controlled by electric pulse signal type. Stepper motor is the core of the modern orientation drive, widely used in machinery, electric power, textile, electronics, instruments, printing and aerospace, ships, weapons, and other areas of the defense industry, etc. The characteristics of the stepping motor control system based on single chip microcomputer include high stability, low cost, convenient control and wide application , etc.
The stepper motor control system consists of core processor using the single chip processor, command input control module using IR remote control , display module using 12864 LCD and 28BYJ48 stepping motor module which using ULN2003 as driver.
The infrared remote control with carrier for 38 KHZ is used as the control end of the user, which can convert the users’ commands into the infrared signal. The TL1838 can receive the infrared signal and convert it into electrical signal, which input to tSTC89C52.The MCU can obtain instructions of users by processing the incoming signal and control stepping motor of the 28BYJ48 type, the current status can be shown by 12864 LCD. Users could control acceleration, deceleration, forward, inversion for the stepping motor. The features of the control system of stepper motor includes high precision, stable running, convenient control and simple maintenance and wide application, etc.
Key word: MCU; 12864 LCD; Stepper Motor; Infrared remote control
目 录