摘要
隨著電子設計自動化(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