基于单片机的步进电机控制系统的设计_毕业设计
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
本科毕业设计
基于单片机的步进电机控制系统的设计
摘要
随着自动控制系统的发展和对高精度控制的要求,步进电机在自动化控制中扮演着越来越重要的角色,区别于普通的直流电机和交流电机,步进电机可以对旋转角度和转动速度进行高精度控制。步进电机作为控制执行元件,是机电一体化的关键组成之一,广泛应用在各种自动化控制系统和精密机械等领域。
步进电机是将电脉冲信号转变为角位移或线位移的开环控制元件。在非超载的情况下,电机的转速、停止的位置只取决于脉冲信号的频率和脉冲数,而不受负载变化的影响,即给电机加一个脉冲信号,电机则转过一个步距角。
本系统介绍了一种基于单片机的步进电机控制系统的设计,包括了硬件设计和软件设计两部分。其中,硬件设计包括单片机最小系统、键盘控制模块、LCD显示模块、步进电机驱动模块、位置检测模块共5个功能模块的设计。系统软件设计采用C语言编写,包括主程序、数字键处理程序、功能键处理程序、电机驱动处理程序、显示模块、位置采集模块。
本设计采用STC89C52单片机作为主控制器,4*4矩阵键盘作为输入,LCD1602液晶作为显示,ULN2003A芯片驱动步进电机。系统具有良好的操作界面,键盘输入步进电机的运行距离;步进电机能以不同的速度运行,可以在不超过最大转速内准确运行到任意设定的位置,可调性较强;显示设定的运行距离和实际运行距离;方便操作者使用。关键词:单片机步进电机液晶显示键盘驱动
Design of the Stepping Motor Control System Based on SCM
Qiu Haizhao
(College of Engineering, South China Agricultural University, Guangzhou 510642,China) Abstract:With the development of automatic control system and the requirements of high-precision control, stepping motor control in automation is playing an increasingly important role, different from the common DC and AC motor, stepper motor rotation angle and rotational speed can be high-precision controlled. Stepper motor as a control actuator is a key component of mechanical and electrical integration, widely used in a variety of automated control systems and precision machinery and other fields.
Stepper motor is the open-loop control components changing electric pulse signals into angular displacement or linear displacement .In the case of non-overloaded, the motor speed, stop position depends only on the pulse frequency and pulse number, regardless of load changes, that is, to add a pulse motor, the motor is turned a step angle.
This system introduces a design of stepper motor control system based on single chip microcomputer, including hardware design and software design in two parts. Among them, the hardware design, including single chip minimal system, keyboard control module, LCD display module, the stepper motor drive module, position detection module five functional modules. System software design using C language, including the main program, process number keys, the key of function processes, motor driver handler, the display module, position acquisition module.
This design uses STC89C52 microcontroller as the main controller, 4 * 4 matrix keyboard as an input, LCD1602 LCD as a display, ULN2003A chip as stepper motor driver. System has a good user interface, keyboard input stepper motor running distance; Stepper motor can run at different speed, and run to any given position accurately in any speed without exceeding the maximum speed, with a strong adjustable ; Display the running distance and the actual running distance, which is more convenient for the operator to use.
Key words: SCM stepper LCD keyboard driver