没有合适的资源?快使用搜索试试~ 我知道了~
基于单片机的步进电机控制系统的.doc
0 下载量 170 浏览量
2023-07-06
02:10:40
上传
评论
收藏 680KB DOC 举报
温馨提示
试读
34页
基于单片机的步进电机控制系统的.doc
资源推荐
资源详情
资源评论
本 科 毕 业 设 计
基于单片机的步进电机控制系统的设计
摘 要
随着自动控制系统的发展和对高精度控制的要求,步进电机在自动化控制中扮演着
越来越重要的角色,区别于普通的直流电机和交流电机,步进电机可以对旋转角度和转
动速度进行高精度控制。步进电机作为控制执行元件,是机电一体化的关键组成之一,
广泛应用在各种自动化控制系统和精密机械等领域。
步进电机是将电脉冲信号转变为角位移或线位移的开环控制元件。在非超载的情况
下,电机的转速、停止的位置只取决于脉冲信号的频率和脉冲数,而不受负载变化的影
响,即给电机加一个脉冲信号,电机则转过一个步距角。
本系统介绍了一种基于单片机的步进电机控制系统的设计,包括了硬件设计和软件
设计两部分。其中,硬件设计包括单片机最小系统、键盘控制模块、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
I
目 录
1 前言. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 步进电机的发展 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 设计要求 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 系统方案分析与选择论证 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.1 步进电机的选择 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.2 步进电机驱动方案的选择 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.3 显示方案的选择 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 键盘方案的选择 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 步进电机位置检测方案的选择 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.4 整体方案 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 主要芯片介绍与硬件电路设计 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1 单片机最小系统模块 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1.1 单片机介绍 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.1.2 单片机最小系统 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 键盘电路设计 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 显示模块 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3.1 LCD1602 介绍 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
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
4 程序设计. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.1 主程序 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 数字键处理程序. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.3 功能键处理程序. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
II
5 结论 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
参考文献 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
附录 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
致谢 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
华南农业大学本科生毕业设计成绩评定表
剩余33页未读,继续阅读
资源评论
智慧安全方案
- 粉丝: 3651
- 资源: 59万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功