【正文】
學(xué)校代碼 : 11509 學(xué) 號(hào) :1005073029 Hefei University 畢業(yè) 設(shè)計(jì) ( 論文 ) BACHELOR DISSERTATION 論文題目 : 基于 MCS51 單片機(jī)步進(jìn)電機(jī)的控制系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn) 學(xué)位類別: 工 學(xué) 學(xué) 士 學(xué)科專業(yè): 10 級(jí)自動(dòng)化 2 班 作者姓名: 魏 偉 導(dǎo)師姓名: 儲(chǔ) 忠 完成時(shí)間: 2022 年 5 月 12 日 基于 MCS51 單片機(jī)步進(jìn)電機(jī)的控制系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn) 中 文 摘 要 步進(jìn)電機(jī)最早出現(xiàn)在十九世紀(jì)初期,經(jīng)過一段時(shí)期的發(fā)展步進(jìn)電機(jī)被廣泛應(yīng)用在各個(gè)領(lǐng)域,因?yàn)槠渚哂辛己玫目刂谱饔谩K詫?duì)步進(jìn)電機(jī)控系統(tǒng)進(jìn)一步的探索有著更為深遠(yuǎn)的意義。 本設(shè)計(jì)是基于單片步進(jìn)電機(jī)的控制系 統(tǒng),硬件設(shè)計(jì)采用 STC89C52 單片機(jī)為控制核心;選取 ULN2022 作為驅(qū)動(dòng)器提供脈沖頻率,驅(qū)動(dòng)步進(jìn)電機(jī)運(yùn)轉(zhuǎn);通過鍵盤的加減速按鈕、正反轉(zhuǎn)按鈕和停止按鈕來控制步進(jìn)電機(jī)的速度、方向和停止,最后通過測試傳感器將這幾個(gè)參數(shù)顯示在 12864 液晶顯示器上。軟件設(shè)計(jì)采用 KEIL 軟件工具進(jìn)行 C 語言編寫,通過各個(gè)模塊端口的定義,編寫出了步進(jìn)電機(jī)加減速控制和正反轉(zhuǎn)的程序,最后通過各模塊程序調(diào)試對(duì)硬件電路施行控制。 本設(shè)計(jì)以經(jīng)濟(jì)實(shí)用為原則,通過軟硬件結(jié)合的設(shè)計(jì),實(shí)現(xiàn)了對(duì)步進(jìn)電機(jī)轉(zhuǎn)動(dòng)速度和方向的有效控制。該系統(tǒng)具有控制性好,設(shè)計(jì) 成本低等優(yōu)點(diǎn)。 關(guān)鍵字: STC89C52;步進(jìn)電機(jī);控制系統(tǒng);測速傳感器 Stepper motor control system design and implementation based on MCS51 microcontroller ABSTRACT The stepping motor was invented in the early 1800s, after a long period of development of the stepper motor is widely used in various fields, because it has good control effect. Therefore, the study of the stepper motor control system has a very important significance. This design is stepper motor control system based microputer, hardware design uses STC89C52 microcontroller as the control core。 select ULN2022 as driver provides pulse frequency drive stepper motor rotation。 through acceleration and deceleration button keyboard, forward and reverse button and stop buttons to control the stepper motor speed, direction and stops, Then these several parameters was displayed on the LCD monitor 12864 by the speed sensor. Software design using KEIL software tools for C language, defined each module port, and write a stepper motor control acceleration and deceleration and reversing the process. finally to control the hardware circuit through debugging. The design principle of economical and practical, through bination of software and hardware designed to achieve the effective control of the stepper motor rotation speed and direction. The system has good controllability and low coat. Keywords: STC89C52。 stepper motor。 control systems。 speed sensor 目 錄 第一章 緒論 .....................................................................................................................................1 ............................................................................................................................1 ....................................................................................................2 ........................................................................................................2 第二章 總體方案設(shè)計(jì) .....................................................................................................................3 系統(tǒng)總體設(shè)計(jì)與分析 .........................................................................................................3 ................................................................................................................3 ............................................................................................................................4 第三章 控制系統(tǒng)硬件分析與設(shè)計(jì) ...............................................................................................5 ...............................................................................................................5 ....................................................................................................................5 ................................................................................................................7 ................................................................................................................8 ............................................................................................................................8 ............................................................................................................................9 ..............................................................................................................10 ULN2022 ............................................................................................................... 11 ..........................................................................................................................12 ..........................................................................................................................12 ..........................................................................................................................13 第四章 控制系統(tǒng)軟件分析與設(shè)計(jì) ...............................................................................................14 主程序流程圖 .................................................................................................................14 12864顯示程序流程圖 ..................................................................................................15 ..........................................................................................................16 ..........................................................................................................17 ..........................................................................................................................17 第五章 系統(tǒng)的測試與結(jié)果分析 ...................................................................................................18 ..................................................................................................................18 ...............................................................................................