51 单片机直流电机控制系统
摘要
当今,自动化控制系统已经在各行各业得到了广泛的应用和发展,而直流 驱动控制作
为电气传动的主流在现代化生产中起着主要作用。长期以来,直流电 动机因其转速调节比
较灵活,方法简单,易于大范围平滑调速,控制性能好等特 点,一直在传动领域占有统
治地位。它广泛应用于数控机床、工业机器人等工厂 自动化设备中。随着现代化生产规模的
不断扩大,各个行业对直流电机的需求愈 益增大,并对其性能提出了更高的要求。为此,
研究并制造高性能、高可靠性的 直流电机控制系统有着十分重要的现实意义。本文设计开
发了一套基于单片机的直流电机多速控制器, 作为其配套的 试验装置。论文根据系统的
要求完成了整体方案设计和系统选型,针对所设计的 控制方案对控制系统的软、硬件设计
作了详细论述。硬件部分先作了整体设计, 然后介绍了以 AT89S52 单片机为核心的硬件
构成,对调速电路、测量电路、闭 环检测电路和显示电路等作了详细阐述;软件部分采用模
块化设计思想,编制了 各个模块的流程图。论述了软件的设计思想和方法;实现了对直流
电动机转动参 数的设置、启动、停止、加速、减速、正转、反转和显示等功能。利用 AT89S52
芯片进行低成本直流电动机控制系统的设计, 能够简化系统构成、降低系统成本、增强系
统性能、满足更多应用场合的需要。针对直流电机运行环境恶劣、干扰严重的特点,从系统
的硬件设计、软件 设计等多方面进行抗干扰的综合考虑, 并利用多种软件和硬件技术来
提高和改善 系统的抗干扰能力,有效地提高了系统的可靠性和实用性。运行结果表明,系
统 实现了电机的高精度多速度控制,达到了性能指标要求。
Abstract Nowadays,automatic control systems have been widely used and
developed in every aspect of life. As the artery in the area of electric drive
systems, DC drivers become more and more important modern production. For
a long time, DC motor has possessed the main role in the area of electric drive
because of its neatly adjustment, simple method and smooth timing in a wide
range,besides,its control performance is excellent. DC motor is widely used on
the automatic equipments ,such as CNC and industrial robot. As the scale of
production becomes larger and larger the demand and requirements become
higher and higher,so the research on improving the DC controlling system
behavior has important sense. This paper system of DC motor multiple speeds
based on STCMCU is designed,as its necessary test equipment. It finished the
total project design of system and model selection. The hardware and software
design of the system according to the preceding solutions are discussed
detailed. For the hardware part after a dissertation on the whole design ,the
core hardware of the control system is the STCMCU,the paper introduced the
details of some hardware problem,including input circuit of keyboard
, serial
communication circuit, measure circuit, D/A switching circuit and display circuit
and so on. The method of software planning for it is also discussed. For the
software part , with the introduction of modular design concept some
procedure flow charts of main program subroutine are offered. The paper
designs the software which achieves the functions,such as install parameters,
download parameters,startup stop accelerate and decelerate. This new family
of STC enables cost—effective design of controllers for DC motors which can
fulfill more conditions,consisting of Fewer system components, lower system