采用了SC89C51单片机作为控制芯片,以步进电机作为执行元件而设计出的步进电机控制系统,通过蓝牙串口通信作为控制装置,以手机信号为控制信号,对步进电机的加速,减速,反转,起停进
摘要
步进电机是一种将电信号转换成位移信号或者角位移信号的开环执行元件,在非超载的情况下,步进电机能够以每个脉冲走动一个精准的步距角进行转动,负载的变化也不会影响转动角度的大小。在非常多的工业场合都有广泛的应用。本次设计采用STC89C51单片机作为控制芯片,再以ULN2003A作为驱动元件,增大输入功率,最后实现对步进电机的正转、反转、调速以及转动角度进行控制。以蓝牙HC-05作为系统的输入元件,也可以作为显示元件,极大的简便了人机互动。在经过ISIS 7 professional的仿真后,达到目标要求,再进行实物的硬件连接。最终结果显示,该系统能很好的完成上述任务,而且该电路系统简单,可靠性强,运行稳定。
关键词:STC89C51;ULN2003;蓝牙HC-05;步进电机
Step motor is an open loop actuator that converts electrical signals to displacement signals or angular displacement signals. In the case of non overload, the stepper motor can move a precise step angle with each pulse, and the change of the load will not affect the rotation angle. It has been widely applied in many industrial occasions. This design uses the STC89C51 MCU as the control chip, and then ULN2003A as the driving element, increasing the input power, and finally realizes the control of the positive rotation, reversal, speed regulation and rotation angle of the stepping motor. The Bluetooth HC-05 is used as the input component of the system, and it can also be used as the display element, which greatly simplifies the human-machine interaction. After ISIS 7 professional simulation, we achieve the target requirement and carry out hardware connection. The final result shows that the system can accomplish the above tasks well, and the circuit system is simple, reliable and stable.
Keywords: STC89C51;ULN 2003; Bluetooth HC-05;stepping motor[1]
目录
一、 绪论 1
(一) 选题意义 1
(二) 研究方法 1
(三) 技术路线 1
二、 步进电机概述 2
(一) 步进电机特点 2
(二) 步进电机技术参数 2
三、 步进电机的控制方案 4
(一) 基于电子线路的控制 4
(二) 基于PLC的控制 4
(三) 基于单片机的控制 4
四、 相关软件介绍 6
(一) Keil C51介绍 6
(二) Proteus ISIS介绍 6
五、 硬件电路设计 8
(一) 单片机型号的选择 8
(二) 步进电机的选择 9
(三) 驱动电路的选择 9
(四) 键盘电路的选择 10
六、 软件的设计 11
(一) 单片机与蓝牙串口通信的处理 11
1. 串口配置初始化 11
2. 接收和发送数据。 14
(二) 步进电机处理 15
(三) 程序优化处理 17
七、 实验数据与结果 18
八、 总结与展望 19
致谢: 21
附录: 22
一、绪论
(一)选题意义
电动机是一种将电能转换成机械能的执行元件,步进电机也是电机的一种。普通电机是将模拟的电信号转换成相应的速度,而步进电机是将数字脉冲信号转换成角位移。它具有许多普通电机不具有的优点,它可以准确的设定电机的转动角、转动速度和转动方向,在不超载的情况下也能够快速响应脉冲信号。其价格低廉、操作方便、功能强大,在如今许多的自动控制场合都能见到它的身影,如打印机、机器人等。随着计算机技术的不断发展,步进电机被应用的越来越广泛,所以研究步进电机的控制系统对现在,以至于对将来都具有十分重要的意义[2]。
(二)研究方法
经过大学阶段的专业学习,我已经能够较好的掌握电子电路相关的专业知识,系统的学习了《数字电路基础》《模拟电路基础》[10]《单片机技术与基础》[12]《自动控制原理与基础》等课程,而且还有丰富的网络资源作为参考。将这些知识运用到我的设计中,不仅能巩固我学习的知识,还能够更好的探索未知的领域。