当前位置:文档之家› 基于单片机的步进电机控制系统的设计

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

本科毕业设计基于单片机的步进电机控制系统的设计摘要随着自动控制系统的发展和对高精度控制的要求,步进电机在自动化控制中扮演着越来越重要的角色,区别于普通的直流电机和交流电机,步进电机可以对旋转角度和转动速度进行高精度控制。

步进电机作为控制执行元件,是机电一体化的关键组成之一,广泛应用在各种自动化控制系统和精密机械等领域。

步进电机是将电脉冲信号转变为角位移或线位移的开环控制元件。

在非超载的情况下,电机的转速、停止的位置只取决于脉冲信号的频率和脉冲数,而不受负载变化的影响,即给电机加一个脉冲信号,电机则转过一个步距角。

本系统介绍了一种基于单片机的步进电机控制系统的设计,包括了硬件设计和软件设计两部分。

其中,硬件设计包括单片机最小系统、键盘控制模块、LCD显示模块、步进电机驱动模块、位置检测模块共5个功能模块的设计。

系统软件设计采用C语言编写,包括主程序、数字键处理程序、功能键处理程序、电机驱动处理程序、显示模块、位置采集模块。

本设计采用STC89C52单片机作为主控制器,4*4矩阵键盘作为输入,LCD1602液晶作为显示,ULN2003A芯片驱动步进电机。

系统具有良好的操作界面,键盘输入步进电机的运行距离;步进电机能以不同的速度运行,可以在不超过最大转速内准确运行到任意设定的位置,可调性较强;显示设定的运行距离和实际运行距离;方便操作者使用。

关键词:单片机步进电机液晶显示键盘驱动Design of the Stepping Motor Control System Based on SCMQiu 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目录1 前言...............................................................0籟丛妈羥为贍偾蛏练淨。

1.1 步进电机的发展 .................................................0預頌圣鉉儐歲龈讶骅籴。

1.2 设计要求 ........................................................0渗釤呛俨匀谔鱉调硯錦。

2 系统方案分析与选择论证 .........................................0铙誅卧泻噦圣骋贶頂廡。

2.1 步进电机的选择 .................................................0擁締凤袜备訊顎轮烂蔷。

2.2 步进电机驱动方案的选择 .......................................1贓熱俣阃歲匱阊邺镓騷。

2.3 显示方案的选择 .................................................2坛摶乡囂忏蒌鍥铃氈淚。

2.3 键盘方案的选择 .................................................2蜡變黲癟報伥铉锚鈰赘。

2.3 步进电机位置检测方案的选择...................................2買鲷鴯譖昙膚遙闫撷凄。

2.4 整体方案 ........................................................3綾镝鯛駕櫬鹕踪韦辚糴。

3 主要芯片介绍与硬件电路设计 ....................................3驅踬髏彦浃绥譎饴憂锦。

3.1 单片机最小系统模块 ............................................3猫虿驢绘燈鮒诛髅貺庑。

3.1.1 单片机介绍 ....................................................3锹籁饗迳琐筆襖鸥娅薔。

3.1.2 单片机最小系统 ...............................................4構氽頑黉碩饨荠龈话骛。

3.2 键盘电路设计 ...................................................5輒峄陽檉簖疖網儂號泶。

3.3 显示模块 ........................................................6尧侧閆繭絳闕绚勵蜆贅。

3.3.1 LCD1602介绍 .................................................6识饒鎂錕缢灩筧嚌俨淒。

3.3.2 LCD1602电路图...............................................7凍鈹鋨劳臘锴痫婦胫籴。

3.4 驱动模块 ........................................................8恥諤銪灭萦欢煬鞏鹜錦。

3.4.1 ULN2003A介绍 ...............................................8鯊腎鑰诎褳鉀沩懼統庫。

3.4.2 驱动电路图 ....................................................9硕癘鄴颃诌攆檸攜驤蔹。

3.5 位置检测模块 ...................................................9阌擻輳嬪諫迁择楨秘騖。

3.5.1 A3144E介绍...................................................9氬嚕躑竄贸恳彈瀘颔澩。

3.5.2 位置检测电路图 ..............................................11釷鹆資贏車贖孙滅獅赘。

相关主题