安全检测:瑞星:安全 诺顿:安全 卡巴:安全
毕业设计-基于单片机的四相八拍步进电机驱动控制系统设计,共52页,22155字,附外文翻译、答辩PPT
摘 要
步进电机广泛应用于工业,军事和医疗自动化领域,如数控装置,牵伸机,机械手,印刷及包装设备。采用单片机控制步进电机,实现了软件与硬件相结合的控制方法。用软件代替环形分配器,达到了对步进电机的理想控制。系统中采用单片机接口线直接去控制步进电机各相驱动线路实现步进电机转向及转速的控制。采用中断和查询相结合的方法来调用中断服务程序,采用软件编程的办法实现脉冲的分配,完成对步进电机的控制,显示器及时显示正转、反转速度等状态。本方案主要通过三大块来设计,包括驱动电路设计、状态显示部分设计和按钮部分设计。并通过控制脉冲频率来控制电机转动的角度和速度,实现对步进电机的有效控制。本课题采用单片机作为控制核心,实现对步进电机起停、正转、反转、加速、减速的功能,并在LED上显示。本设计有以下优点:单片机软件编程可以实现自动化和精确化控制,避免了失步、振荡等对控制精度的影响;用软件代替环形分配器,通过对单片机的设定,用同一种电路实现了多相步进电机的控制和驱动,提高了接口电路的灵活性和通用性;单片机的强大功能使显示电路、键盘电路、复位电路等外围电路有机的组合,提高系统的交互性。
关键词:步进电机,单片机,转动,驱动
ABSTRACT
Stepper motors are widely applied in industries, the military and in the medical automation domain, such as numerical control installment, drafting machine, manipulator, printing and packing equipment. The stepper motor with using the Single-chip processor to realize the combination of software and hardware .Using Software instead of circular distributor to achieve the ideal control of the stepper motor .In order to control the drive line of the stepper motor directly by using single chip microcomputer interface line in system .And using the method of the combination of interrupt and inquire to call the interrupt service routine and the software program to achieve distribution of the pulses then succeed in the control of the stepper motor which including the motor could display the speed of forward and reverse and other states in time .The program that the following advantages firstly ,single-chip microcontroller software programming that realizes the automated and precise control and avoid the impact of control precisian because of out of step and oscillation secondly using software instead of circular distributor which set by the microcontroller with the same kind of circuit to achieve a multiphase stepper motor’s control and drive and even more; improve the flexibility and versatility of the interface circuit ;Thirdly ,The powerful foundation of SCM help the combination of the display circuit, keyboard circuit, reset circuit and other peripheral circuits to improve the interaction of the system. This topic realizes foundations including the stepper motor start and stop ,forward, reverse , acceleration, never decelerate all these could display on LED and these mainly through three blocks to design, status display part design and buttons part design .And to achieve effective control of the stepper motor that controls the pulse frequency to control the angle and rotation speed of the motor.
KEY WORDS:stepper motor, SCM, turning, Drive
目 录
第一章 绪论 5
1.1 前言 5
1.2研究背景 7
1.3国内外研究现状 8
1.4主要研究内容 9
1.5 本章小结 9
第二章 步进电机与单片机简介 10
2.1步进电机概述 10
2.1.1步进电机定义 10
2.1.2步进电机工作原理 10
2.1.3步进电机主要类型与选择 11
2.1.4步进电机静态指标 12
2.1.5步进电机动态指标 12
2.1.6步进电机驱动系统 14
2.2单片机概述 15
2.2.1单片机定义 15
2.2.2单片机组成及应用 15
2.2.3单片机的应用系统 16
2.2.4 AT89C51简介及引脚说明 17
2.3步进电机驱动方式 20
2.3.1步进电机驱动技术 20
2.3.2单片机驱动步进电机 22
2.4 本章小结 22
第三章 系统硬件设计 23
3.1系统设计环境 23
3.1.1Proteus软件 23
3.1.2Keil软件 24
3.2系统整体图 25
3.3单片机最小系统 26
3.4驱动电路部分 26
3.4.1ULN2003A系列驱动器 26
3.4.2驱动电路工作原理 28
3.5按键部分 29
3.6时钟晶振部分 29
3.7 本章小结 30
第四章 系统软件结构 31
4.1系统主程序 31
4.2显示部分 32
4.3定时器中断 32
4.4按键扫描 33
4.5本章小结 34
第五章 系统调试与检测 35
第六章 总结与展望 39
参考文献 41
致谢 43
附录 44
研究内容
本文所选的步进电机是四相八拍步进电机,电压为DC 5V~DC 12V。采用的方法是利用单片机来控制步进电机的驱动。当对步进电机按一定顺序施加一系列连续不断的控制脉冲时,它可以连续不断地转动。每一个脉冲信号使得步进电机的某一相或两相绕组的通电状态改变一次,也就对应转子转过一定的角度。当通电状态的改变完成一个循环时,转子转过一个齿距。四相步进电机可以在不同的通电方式下运行,常见的通电方式有单(单相绕组通电)四拍(A-B-C-D-A……),双(双相绕组通电)四拍(AB-BC-CD-DA-AB……),四相八拍(A-AB-B-BC-C-CD-D-DA-A……)。本次毕业设计就是通过改变脉冲频率来调节电机速度的,并且通过共阴数码管显示其转速的级别,并且通过单片机实现它的正反转以及加减速的控制。