【正文】
I 基于單片機(jī)的 PWM 直流調(diào)速系統(tǒng)設(shè)計 摘 要 隨著時代的進(jìn)步和科技的發(fā)展,電機(jī)調(diào)速系統(tǒng)在工農(nóng)業(yè)生產(chǎn)、交通運(yùn)輸以及日常生活中起著越來越重要的作用,因此,對電機(jī)調(diào)速的研究有著積極的意義 .長期以來,直流電機(jī)被廣泛應(yīng)用于調(diào)速系統(tǒng)中,而且一直在調(diào)速領(lǐng)域占居主導(dǎo)地位 ?;趩纹瑱C(jī)的直流電機(jī)調(diào)速系統(tǒng)硬件電路的標(biāo)準(zhǔn)化程度高,制作成本低,且不受器件溫度漂移的影響。其控制軟件能夠進(jìn)行邏輯判斷和復(fù)雜運(yùn)算。系統(tǒng)的穩(wěn)定性好,可靠性高。 直流電動機(jī)具有優(yōu)良的起、制動性能,宜 于 在廣泛范圍內(nèi)平滑調(diào)速。在軋鋼機(jī)、礦井卷機(jī)、挖掘機(jī)、金屬切削機(jī)床 、造紙機(jī)、高層電梯等領(lǐng)域中得到廣泛應(yīng)用 。 本設(shè)計是基于單片機(jī)控制的 PWM 直流電機(jī)調(diào)速系統(tǒng),系統(tǒng)以 AT89C52 單片機(jī)為核心,以 2A、 1000r/min 小 直流電機(jī)為控制對象,以 L298N 為 H 橋驅(qū)動芯片實現(xiàn)速度、電流反饋雙閉環(huán)。采用 PID 控制算法,調(diào)節(jié) PWM 占空比從而控制電機(jī)兩端電壓,以達(dá)到調(diào)速的目的。用 4*3 鍵盤輸入有關(guān)控制信號及參數(shù),可以實現(xiàn)電機(jī)的啟制動、正反轉(zhuǎn)、速度調(diào)節(jié)。并在 4 位 LED 上實時顯示輸入?yún)?shù)及動態(tài)轉(zhuǎn)速。 關(guān)鍵詞 :單片機(jī)、直流電機(jī)、 PWM、 PID II Based on SCM PWM dc speed control system design Abstract With the progress of The Times and the development of science and technology, motor speed system in agricultural production, transportation and daily life plays a more and more important role in motor speed, therefore, the research has positive significance. For a long time, have been widely applied in dc motor control system, and has been inhabited areas in speed dominant. Based on SCM dc motor speed control system of high degree of standardization of hardware circuit, low cost, and the temperature drift. Device, The control software to logic and plex operation. The system has good stability and reliability. Dc motor with excellent, braking performance, and in a wide range smooth speed. In the mill, mine machi ne, excavator, metal cutting machine, paper machine, highlevel elevator is widely used in the fields. The design is based on single chip microputer control system of dc motor control PWM, by AT89C52 singlechip system, and 1000r/min small doublea dc motor to control, L298N H bridge to drive chip realize speed, double loop current feedback. PID control algorithm, regulate and control PWM occupies emptiespared to achieve both voltage motor speed. Use 4 * 3 keyboard input signal and the relevant control parameters, can realize the rev brake motor speed regulation, and positive amp。negative. And in four LED on realtime display input parameters and dynamic speed. Keywords : monolithic integrated circuits, a direct motor, PWM, PID III 目錄 基于單片機(jī)的 PWM 直流調(diào)速系統(tǒng)設(shè)計 .....................................................................I 摘要 .................................................................................................................................I Abstract ......................................................................................................................... II 第一章 緒論 ................................................................................................................ 1 課 題背景 ........................................................................................................... 1 課題功能 ........................................................................................................... 1 第二章 系統(tǒng)硬件電路的設(shè)計 ...................................................................................... 2 系統(tǒng)總體設(shè)計 ................................................................................................... 2 系統(tǒng)總體設(shè)計框圖 ................................................................................ 2 單片機(jī)的選擇及其簡介 ......................................................................... 2 其他芯片簡介 ........................................................................................ 6 PWM 信號發(fā)生電路設(shè)計 ............................................................................. 18 PWM 的基本原理 .................................................................................... 18 PWM 信號發(fā)生電路設(shè)計 ................................................................. 20 H橋芯片的工作原理 ................................................................. 21 主電路設(shè)計 ..................................................................................................... 24 轉(zhuǎn)速和電流的測量 ........................................................................................ 24 AD 轉(zhuǎn)換 ....................................................................................................... 26 顯示與鍵盤電路 ............................................................................................. 26 第三章 系統(tǒng)軟件程序的設(shè)計 .................................................................................... 27 PID 控制算法原理及流程圖 ........................................................................ 27 系統(tǒng)部分程序的設(shè)計 …………………………………………………… ....29 單片機(jī)資源分配 …………………………………………………… ...29 程序流程圖 .......................................................................................... 30 結(jié)論 ..................................................................................................................