学校代码 10722 学 号
分类号 密 级 公 开
本科毕业论文(设计)
题目:基于单片机的直流电动机的控制
(中、英文)
Control of DC motor based on SCM
作 者 姓 名: 专 业 名 称:电气工程及其自动化 学 科 门 类: 工 科 指 导 教 师: 提交论文日期: 二0一四年五月 成 绩 评 定:
摘 要
随着微电子和计算机技术的发展,直流电机的要求量与日俱增,它广泛用于打印机、电动玩具等消费类产品以及数控机床、工业机器人、医疗器械等机电产品中,并在国民经济各个领域都有应用。研究直流电机的控制系统,对提高控制精度和响应速度、节约能源等都具有重要意义。
因为单片机具有集成度高、处理功能强、可靠性好、结构简单、价格低廉、易于使用等优点,所以论文采用51系列单片机进行控制系统的设计,由硬件设计和软件设计两部分组成。其中,硬件设计主要包括单片机最小系统、键盘控制模块、直流电动机驱动模块、复位电路模块、晶振电路模块等功能模块的设计。软件设计包括主程序以及各个模块的控制程序,最终实现对直流电机转动方向及转动速度的控制。系统具有智能性、实用性及可靠性的特点。
关键词:直流电动机;转速控制;方向控制
Abstract
Along with the development of microelectronics and computer technology, the requirement of the dc motor’s quantity grows day by day, it is widely used in printers, electric toys and other consumer products as well as the numerical control machine tools, industrial robots, medical equipment and other mechanical and electrical products, and applied in all professions and trades of the national economy.Study of dc motor control system, to improve the control precision and response speed, energy conservation is of great significance.
Because singlechip has advantages of high integration, strong processing power, good reliability and the characteristics of simple structure, low cost as well as easy to use, so the paper uses the 51 series microcontroller design the control system, the whoie design include hardware design and software design two parts.Among them, the hardware design mainly includes the SCM minimal system, the keyboard control module, dc motor driver module, reset circuit module, crystals circuit module, and other function modules design.Software design includes the main program and each module control program.Thereby do realize the function of controlling the rotation direction and speed.The system has the characteristics of intelligence, practicality and reliability.
Keywords: dc motor;speed control;direction control
目 录
摘 要....................................................................... 2 Abstract.................................................................... 3 1 绪论...................................................................... 5
1.1 研究背景 .................................................... 5 1.2 研究价值 .................................................... 5 1.3 研究内容 .................................................... 5
2 直流电动机简介............................................................ 5
2.1 直流电动机的工作原理及其构造 ................................ 5 2.2 直流电动机的PWM调压调速原理 ................................ 6
3 控制系统的总体设计........................................................ 7
3.1 设计方案分析与比较 .......................................... 7 3.2 系统结构设计 ................................................ 9 3.3 单片机89C51简介 ........................................... 10 3.4 L298N电动机驱动芯片简介.................................... 11
4 硬件设计................................................................. 12
4.1 单片机系统电路 ............................................. 12 4.2 复位电路 ................................................... 13 4.3 时钟电路 ................................................... 14 4.4 直流电机驱动电路 ........................................... 15 4.5 键盘电路 ................................................... 16
5 软件设计................................................................. 17
5.1 单极性可逆电动机驱动系统的电动机启停、正反转控制 ........... 17 5.2系统总体流程设计............................................ 18
6 仿真调试................................................................. 19
6.1 Keil C51软件简介........................................... 19 6.2 Proteus仿真软件简介........................................ 20 6.3 调试 ....................................................... 21
总结....................................................................... 24 参考文献................................................................... 25 附录....................................................................... 27 谢辞....................................................................... 29
1 绪论
1.1 研究背景
直流电动机是最早出现的电动机,也是最早实现调速的电动机。长期以来,直流电动机一直占据着调速控制的统治地位。由于它具有良好的线性调速特性,简单的控制性能,高效率,优异的动态特性,现在仍是大多数调速控制电动机的最优选择。因此研究直流电机的速度控制,有着非常重要的意义。
近十几年来,单片机作为微计算机一个很重要的分支,应用广泛,发展迅速,已经对人类社会产生了深远的影响。单片机在生产过程控制、自动检测、数据采集及处理、科技计算、商业管理及办公室自动化等方面获得了广泛的应用。单片机具有体积小、重量轻、耗能省、价格低可靠性和通用灵活性等特点,尤其是美国Intel 公司生产的MCS-51 系列单片机,由于其具有集成度高、处理功能强、可靠性好、结构简单、价格低廉、易于使用等优点,在我国已经得到广泛的应用。
1.2 研究价值
以前电动机大多使用由模拟电路组成的控制柜进行控制,现在单片机已经开始取代模拟电路作为电机控制器。当前电机控制器的发展方向越来越趋于多样化和复杂化,现有的专用集成电路未必能满足苛刻的新产品开发要求,为此可考虑开发电机的新型单片机控制器,因此研究电机的调速控制有着非常重要的意义。
1.3 研究内容
本设计实现的是用单片机来控制直流电机,其中通过4位按键来实现电动机的启停、正反转、加速、减速。调速系统主要是通过调节PWM的占空比大小来实现。
2 直流电动机简介
2.1 直流电动机的工作原理及其构造