【正文】
2021 年全國大學生電子設(shè)計競賽 PWM 控制直流電機轉(zhuǎn)速 ( A 題) 【 高職 組】 2021 年 9 月 6 日 1 摘 要 本設(shè)計主要 要實現(xiàn)的功能是,通過 直流電機 PWM 控制系統(tǒng) , 實現(xiàn)對直流電機的加速、減速以 及電機的正轉(zhuǎn)、反轉(zhuǎn)和急停 , 并且可以調(diào)整電機的轉(zhuǎn)速 , 能夠很方便的實現(xiàn)電機 的智能控制 。 主要采用 直流電機 PWM 調(diào)速系統(tǒng)以 AT89S52單片機為控制核心 , 由命令 輸入模塊、 LCD 顯示模塊及電機驅(qū)動模塊組成。使用帶中斷的獨立式鍵盤作為命令的輸入 , 單片機在程序控制下, 定時不斷給 L298直流 電機驅(qū)動芯片發(fā)送 PWM 波形 H 型驅(qū)動電路完成電機正 、 反轉(zhuǎn)和急??刂?,同時單片機不停的將 PWM脈寬調(diào)制占空比送到 LCD1602 液晶來 完成實時顯示。 關(guān)鍵詞 :直流電機; PWM;控制 。 2 abstract This design mainly in order to realize the function is, through the dc motor PWM control system, the implementation of the dc motor speed, motor and reducer, move forward, reverse and stop, and can adjust the speed of the motor, can easily realize the intelligent control of the machine. Mainly adopts dc motor PWM speed regulation system AT89S52 single chip microputer as control core, by the mand input module, LCD display module and motor drive module. Using independent type keyboard with interruption as mand input, single chip microputer under program control, timing, constantly send dc motor driver chip L298 PWM waveform H drive circuit to plete the motor positive and reverse and stop control, meanwhile microcontroller of the PWM pulse width modulation duty cycle to the LCD1602 LCD to plete realtime display. Keywords: dc motor。 PWM. Control. 3 目 錄 一 系統(tǒng)方案設(shè)計與分析 ????????????????? 4 1 系統(tǒng)總體框圖 ????????????????????? 4 2 方案論證與選擇 ???????????????????? 4 控制模塊的論證與選擇 ???? ???????????? 4 輸入模塊的論證與選擇 ???????????????? 4 顯示模塊的論證與選擇 ???????????????? 5 傳感器的論證與選擇 ???????????????? 5 3 理論分析與計算 ???????????????????? 5 PWM 調(diào)速原理 ???????????????????? 5 PWM 調(diào)速方法 ???????????????????? 6 二 硬件電路設(shè)計 ???????????????????? 6 1 控制系統(tǒng) ???????????????????? 6 2 驅(qū)動模塊 ???????????????????? 7 3 顯示模塊 ???????????????????? 8 三 軟件設(shè)計 ???????????????????? 9 1 程序流程圖 四 調(diào)試結(jié)果與分析 ????????? ??????????? 10 五 元器件清單 ???????????????????? 12 六 參考文獻 ???????????????????? 12 七 總結(jié) ???????????????????? 12 附錄一:原理圖 ???????????????????? 13 附錄二:源程序 ???????????????????? 14 4 一 系統(tǒng)方案設(shè)計與分析 1 系統(tǒng)總體框圖 本系統(tǒng)主要由 控制 模塊、 顯示 模塊、 電機驅(qū)動 模塊、 傳感器模塊、 電源模塊等 組成, 系統(tǒng)總體框圖如圖 1所示 。 圖 1 系統(tǒng)總體框圖 2 方案 論證與選擇