摘要
随着电子设计自动化(Electronic Design Automation, EDA)技术和数字电路技术的飞速发展,使实现基于CPLD(复杂可编程逻辑器件)的直流电机控制系统已成为可能。直流电动机的优点是具有较大的启动转矩和良好的起动、制动、调速性能,可以在很宽范围内平滑调速,能在很短的时间里转向。
本文给出了一种基于ALTERA公司的MAX II的CPLD构成的直流电机控制系统的设计和实现,以CPLD作为核心器件,极大地减少了外围元件的使用,系统扩展性能好、可靠性高、抗干扰能力强、结构简单、成本低廉,具有可在系统改变功能、不占用CPU时间、易于高速控制等优点,也可用于各种直流电机控制场合。
本设计采用了模块的设计方法,根据直流电机控制系统的功能把它分为若干个模块:PWM信号产生模块(包括分频模块、可调计数器模块、不可调计数器模块)、消抖模块、液晶显示模块。PWM信号模块主要是为硬件提供适当的控制信号,消抖模块主要是对按键产生的毛刺进行处理使测试更加准确,液晶显示模块是将霍尔元件测量脉冲信号转化成字符串并显示在LCD上。
关键词:EDA CPLD 直流电机 MAX II
Design of DC Motor Control System on CPLD
Abstract
With the rapid development of the electronic design automation (Electronic Design Automation, EDA) technology and digital circuit technology, it has become possible to realize the DC motor control systems based on CPLD (complex programmable logic device). The advantage of the direct current motive is to has the bigger starting turn the with start goodly, the system move, adjust soon function, can be smooth within the scope of very breadth to adjust soon, can in very short time the changes change direction.
This article has given one kind based on ALTERA Corporation’s MAX II CPLD constitution direct current machine control system design and the realization, by CPLD took the core component, reduced the periphery part use enormously, the system expansion performance well, the reliability high, antijamming ability strong, the structure simple, the cost has been inexpensive, has may in the system change function, not take the CPU time, easy to control and so on the merits high speed, also available in each kind of direct current machine control situation.
This design used a modular design method. According to the functions of the DC motor control system it is divided into several modules: PWM signal generator module (including sub-frequency module, adjustable counter modules, counter modules are not adjustable), xiaodou module, liquid crystal display module. PWM signal module provides appropriate control signals to the hardware. Xiaodou module deals with the burr of key-press produced, making the test more accurate. Liquid crystal display module converts the pulse signal of the Hall element’s measurement into character string and displays on the LCD
Keyword: EDA CPLD DC-Motor MAX II