西南科技大学本科生毕业论文
直流脉宽调制调速系统控制器
西南科技大学本科生毕业论文
I 摘要
在信息化时代的今天,电机在各行各业依然发挥着重要的作用,电机转速作为电机重要的性能指标之一,因而研究直流电机的控制和测量方法,对提高控制精度和响应速度、节约能源等都具有重要意义。
随着数字技术的迅速发展,微控制器在社会的各个领域得到了广泛的应用,脉宽调制(PWM)是利用微处理器的数字输出来对模拟电路进行控制的一种非常有效的技术,由于数字系统有着模拟系统所没有的优势,如抗干扰性强、便于和 PC 机相联、系统易于升级维护。使得PWM调速成为电机调速的重要方式。
本系统设计是以单片机 AT89S52 和 L298 控制的直流电机脉宽调制调速系统。 利用 AT89S52芯片进行低成本直流电动机控制系统的设计,能够简化系统构成、降低系统成本、增强系统性能、满足更多应用场合的需要。系统实现对电机的正转、反转、急停、加速、减速的控制,以及 PWM 的占空比在 LCD液晶上的实时显示。
关键词:直流电机; 脉宽调制; PWM; AT89S52; L298
西南科技大学本科生毕业论文
II Abstract
In today's information age, the motor in all walks of life still plays an important role in motor speed as the motor key performance indicators, which studies the DC motor control and measurement methods, to improve the control accuracy and response speed, energy conservation are all important.
With the rapid development of digital technology, the microcontroller in society in various fields has been widely used, pulse-width modulation (PWM) is the use of microprocessor digital output of the analog circuit for controlling a very effective technique, because a digital system has the advantages of analog systems that are not as strong anti-interference, easy and a PC linked to the system easy to upgrade and maintenance. Making PWM speed control motor speed to become an important way. The system design is based on single-chip AT89S52 and L298 DC motor control pulse width modulation speed control system. Use AT89S52 chip for low-cost DC motor control system designed to simplify the system structure, reduce system cost, enhance system performance to meet the needs of more applications. System to achieve the motor forward, reverse, stop, acceleration, deceleration control, and the PWM duty cycle in real time on the LCD display.
Key words: DC motor; pulse width modulation; PWM; AT89S52; L298
西南科技大学本科生毕业论文
III 目 录
第1章 绪 论 ..................................................................................................................... 1
1.1 课题研究的背景和意义 ......................................................................................... 1 1.2 课题研究的发展现状 ............................................................................................. 2 1.3 论文的内容和组织结构 ......................................................................................... 3 第2章 PWM脉宽调制系统设计 ..................................................................................... 5
2.1 PWM脉宽调制原理 ............................................................................................. 5 2.2 PWM脉宽调制实现方法 ..................................................................................... 6 2.3 直流电机工作原理 ............................................................................................... 8 2.4 调速系统框架设计 ............................................................................................... 8 2.5 PWM控制流程图 ................................................................................................. 9 第3章 系统硬件设计 ....................................................................................................... 11
3.1 系统基本组成 ..................................................................................................... 11 3.2 L298 电机驱动模块 ........................................................................................... 12
3.2.1 L298驱动简介 ..................................................................................... 12 3.2.2 L298 内部 H 桥驱动电路 .................................................................. 13 3.2.3 L298的引脚及逻辑功能 ..................................................................... 15 3.3 控制器AT89S52简介 ........................................................................................ 16
3.3.1 AT89S52的主要性能 ............................................................................ 16 3.3.2 AT89S52的引脚功能介绍 .................................................................... 17 3.4 键盘输入模块 ..................................................................................................... 20 3.5 LCD液晶显示模块 ............................................................................................ 20
3.5.1 LCD液晶简介 ....................................................................................... 20 3.5.2 LCD液晶指令 ....................................................................................... 22 3.5.2 LCD液晶时隙图 ................................................................................... 24
第4章 系统软件设计 ....................................................................................................... 25
4.1 主程序流程图 ..................................................................................................... 25 4.2 定时器中断程序流程图 ....................................................................................... 26 4.3 独立式键盘控制流程图 ....................................................................................... 27
西南科技大学本科生毕业论文
IV 4.4 12864液晶显示流程图 ......................................................................................... 28 第5章 系统测试 ............................................................................................................... 29
5.1 液晶开机界面 ....................................................................................................... 29 5.2 测试电机正转 ....................................................................................................... 30 5.3 测试电机反转 ....................................................................................................... 31 5.4 测试电机加速 ....................................................................................................... 32 5.5 测试电机减速 ....................................................................................................... 33 5.6 测试电机急停 ....................................................................................................... 34 结论 ..................................................................................................................................... 35 致谢 ..................................................................................................................................... 36 参考文献 ............................................................................................................................. 37 附录 ..................................................................................................................................... 38
附录 1 系统程序 ........................................................................................................ 38 附录 2 原理图 ............................................................................................................ 59
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库直流脉宽调制调速系统控制器在线全文阅读。
相关推荐: