分类号:TP274+.2 U D C:D10621-408-(2010)1384 -0 密 级:公 开 编 号:2006073071
数字式直流电机调速控制系统设计
论文作者姓名: 申请学位专业: 申请学位类别: 指导教师姓名(职称): 论文提交日期:
贺肖庆 自动化 工学学士 张秀芳(讲师) 2010年 6月4日
数字式直流电机调速控制系统设计
摘 要
在高度现代化的今天,现代电力电子技术,计算机技术,现代控制理论的发展,促进了直流调速技术的进步,使之成为目前活跃的调速技术。长期以来,直流电动机因为其具有调节转速灵活、方法简单、控制性能好等特点,应用在越来越多的领域中。
本设计是以单片机STC12C5A60S2和L298控制的直流电机脉宽调制(PWM)调速系统。主要介绍了用单片机软件实现PWM调整电机转速的基本方法,给出了程序流程图和Keil-C51程序。硬件电路实现了对电机的正转、反转、急停、加速、减速的控制,以及电机速度的实时显示。
以单片机为控制核心的直流电机调速系统,采用了数字化的速度给定与测速,扩大了调速范围,提高了速度控制精度。由于许多功能都是由软件来完成的,所以使硬件得以简化,故障率比较小。单片机以数字信号来工作,其控制手段方便灵活,抗干扰能力强。
关键词:单片机;脉宽调制;直流电机;LCD显示
Abstract
At a height of the modernization of today, the development of modern power electronics, computer and modern control theory promotes the progress of DC speed regulation technology. For a long time, DC motor has made them to be used in many areas because of its neatly adjust, easy method and its control performance is very good.
A kind of speed regulation system of Pulse Width Modulation (PWM) for DC motor composed of microcontroller STC12C5A60S2 andL298 was designed. The basic methods of PWM regulating DC motor speed are explained. Programs in KeilC51 and program flow chart are presented. Clockwise and anticlockwise rotation, quick stop, acceleration and deceleration of the motor are achieved in hard circuit. The DC motor speed is shown.
The digital speed control system for DC motor, which uses Single Chip Micro (SCM) as its processor. The speed giving and speed measuring adopt digital, the system can measure the speed accuracy within a wide range, which expands the speed control scope and entrances its precision.
As most functions are carried out by software, the rate of malfunction is less than the Analog System. Moreover, as SCM works with digital signal, its control method is flexible and its ability to anti-interference is very high.
Keywords: Single Chip Microcontroller; Pulse Width Modulation; DC
motor;LCD Display
目 录
论文总页数:27页
1引言 ............................................................................................................................................... 1
1.1课题的背景 ......................................................................................................................... 1 1.2数字式调速国内外研究状况 ............................................................................................. 1 1.3课题的实际意义 ................................................................................................................. 1 1.4课题内容 ............................................................................................................................. 2 2系统方案设计................................................................................................................................ 3
2.1驱动电路的论证与选择 ..................................................................................................... 3 2.2液晶显示模块的选择 ......................................................................................................... 4 2.3按键电路的选择 ................................................................................................................. 5 2.4处理器的选择 ..................................................................................................................... 5
2.4.1 单片机的特点 ......................................................................................................... 5 2.4.2单片机的选择 .......................................................................................................... 6 2.5测速方案的选择 ................................................................................................................. 6 2.6系统总体设计方案 ............................................................................................................. 7 3硬件设计 ....................................................................................................................................... 8
3.1单片机最小系统 ................................................................................................................. 8
3.1.1 STC12C5A60S2介绍 .............................................................................................. 8 3.3.2单片机最小系统 .................................................................................................... 10 3.2电源电路 ........................................................................................................................... 11 3.3显示电路 ........................................................................................................................... 12 3.4按键电路 ........................................................................................................................... 13 3.5过流保护电路 ................................................................................................................... 14 3.6 速度检测电路 .................................................................................................................. 15 3.7电机驱动电路 ................................................................................................................... 16 4.软件设计................................................................................................................................... 16
4.1系统总体程序框图 ........................................................................................................... 17 4.2按键子程序结构 ............................................................................................................... 17 4.3转速采集子程序 ............................................................................................................... 19 5.系统调试................................................................................................................................... 20
5.1 硬件调试 .......................................................................................................................... 20
5.1.1电源模块调试 ........................................................................................................ 20 5.1.2单片机最小系统调试 ............................................................................................ 21
5.1.3继电器的测试 ........................................................................................................ 21 5.2软件调试 ........................................................................................................................... 21
5.2.1单片机控制模块软件调试 .................................................................................... 21 5.2.2 电机驱动模块调试 ............................................................................................... 21 5.3脱机运行调试 ................................................................................................................... 22
5.3.1按键调试 ................................................................................................................ 22 5.3.2电机调试 ................................................................................................................ 22 5.4实物效果图 ....................................................................................................................... 22 结 论 ........................................................................................................................................ 24 参考文献 ........................................................................................................................................ 25 致 谢 ........................................................................................................................................ 26 声 明 ........................................................................................................................................ 27
第 2 页 共 32 页 2