【正文】
I 基于單片機(jī)的步進(jìn)電機(jī)控制系統(tǒng)的設(shè)計(jì) 摘 要 步進(jìn)電機(jī)是一種通過(guò)電脈沖信號(hào)控制相繞組電流實(shí)現(xiàn)定角轉(zhuǎn)動(dòng)的機(jī)電元件,與其他類(lèi)型電機(jī)相比具有易于開(kāi)環(huán)精確控制、無(wú)積累誤差等優(yōu)點(diǎn),在眾多領(lǐng)域中獲得了廣泛的應(yīng)用。為了得到性能優(yōu)良的控制結(jié)果,出現(xiàn)了很多步進(jìn)電機(jī)控制系統(tǒng),其中采用單片機(jī)作為控制核心的控制系統(tǒng)得到了廣泛的應(yīng)用。很多這種控制系統(tǒng)在步進(jìn)電機(jī)的驅(qū)動(dòng)上已經(jīng)做的非常好,比如細(xì)分驅(qū)動(dòng)技術(shù),但是有的系統(tǒng)比較復(fù)雜,和一些相對(duì)比較簡(jiǎn)單的控制過(guò)程不相吻合,投入上也不經(jīng)濟(jì) 。有的系統(tǒng)在操作上不是很方便,交互性不強(qiáng)。 因此本文的研究?jī)?nèi)容就是設(shè)計(jì)一套硬件系統(tǒng)較簡(jiǎn)單、 經(jīng)濟(jì),但功能較為齊全,適應(yīng)性強(qiáng),操作方便,可靠性高的,能夠有機(jī)地把電子技術(shù)、單片機(jī)技術(shù)、電機(jī)的控制技術(shù)結(jié)合起來(lái)步進(jìn)電機(jī)控制系統(tǒng)。本文首先簡(jiǎn)要描述了步進(jìn)電機(jī)的發(fā)展、應(yīng)用情況、以及常見(jiàn)的控制系統(tǒng)采用的方案,常見(jiàn)的驅(qū)動(dòng)技術(shù),而且還分析了步進(jìn)電機(jī)的工作原理,然后以單片機(jī)為主控制器提出了整個(gè)系統(tǒng)的硬件設(shè)計(jì)方案,在此基礎(chǔ)上對(duì)各個(gè)模塊的電路進(jìn)行詳細(xì)的設(shè)計(jì),接著闡述了步進(jìn)電機(jī)軟件控制開(kāi)發(fā)的流程。 關(guān)鍵詞 :步進(jìn)電機(jī) 單片機(jī) 看門(mén)狗 驅(qū)動(dòng)技術(shù) II ABSTRACT Stepping motor is a kind of controlled by electrical pulse signal phase winding current to achieve fixed angle rotating electromechanical ponents, pared with other types of motor control w ith easytoopenloop precision, no accumulation of error of the advantages, has been w idely used in many fields. In order to obtain good control performance results, there has been a lot of stepping motor control system, w hich adopts singlechip as the control of the control system has been widely applied. A lot of this control system has been in the drive of step motor is very good, such as subdivision driving technology, but some of the system is more plex, and some relatively simple control process do not coincide, investment is not the econo my。 so me systems in the operation is not very convenient, do not have a strong interaction. So the research contents of this thesis is to design a set of hardware system is simple, economic, but the function is plete, strong adaptability, convenient operation, high reliability, can anically integrate electronic technology, single chip technology, motor control technology of stepping motor control syste m. This paper briefly describes the development of the scheme, the stepper motor applications, as well as the mon control system, driving te chnology is mon, but also analyzed the working principle of stepping motor, and then by the microcontroller. The hardware design scheme of the system, detailed design on the basis of each module the circuit, then expounds the stepping motor control soft ware development process. Keywords: stepper motor microcontroller watchdog driver technology III 目 錄 摘 要 .................................................................................................... I ABSTRAC............................................................................................. II 第 1 章 緒論 ..........................................................................................1 前言 ......................................................................................... 1 基于電子電路控制手段 ................................................. 1 基于 PLC/變頻器控制手段 ............................................ 2 基于單片機(jī)控制手段 ..................................................... 3 國(guó)內(nèi)外發(fā)展情況 ...................................................................... 4 步進(jìn)電機(jī)驅(qū)動(dòng)方式分類(lèi)及比較 ............................................... 6 單電壓驅(qū)動(dòng) .................................................................... 6 高低壓驅(qū)動(dòng) .................................................................... 7 自激式恒電流斬波驅(qū)動(dòng) ................................................. 8 它激式恒電流斬波驅(qū)動(dòng) ................................................. 8 細(xì)分驅(qū)動(dòng) ........................................................................ 9 研究的目的和意義 .................................................................10 論文安排 ................................................................................. 11 第 2 章 步進(jìn)電機(jī)概述 .........................................................................13 步進(jìn)電機(jī)的特點(diǎn) .....................................................................13 步進(jìn)電機(jī)的分類(lèi) .....................................................................14 反應(yīng)式步進(jìn)電機(jī) ...........................................................14 永磁式步進(jìn)電機(jī) ...........................................................14 混合式步進(jìn)電機(jī) ...........................................................14 步進(jìn)電機(jī)的運(yùn)行原理闡述 ......................................................15 第 3 章 步進(jìn)電機(jī)控制系統(tǒng)概述 .........................................................17 步進(jìn)電機(jī)控制系統(tǒng)簡(jiǎn)介 ..........................................................17 本系統(tǒng)特點(diǎn)與功能 .................................................................20 本系統(tǒng)特點(diǎn) ...................................................................20 系統(tǒng)功能 .......................................................................21 第 4 章 系統(tǒng)硬件設(shè)計(jì) .........................................................................22 系統(tǒng)組成 ................................................................................22 系統(tǒng)核心 —— AT89C51 單片機(jī) ..............................................22 主要特性 ......................................................................23 管腳說(shuō)明 ......................................................................23 振蕩器特性 ...................................................................25 芯片擦除 .......................................................................25 最小系統(tǒng) ......................................................................26 外圍電路設(shè)計(jì) .........................................................................27 顯示電路 — LCD1602 ....................................................27 IV 鍵盤(pán)電路 .......................................................................34 看門(mén)狗復(fù)位電路 ...........................................................36 驅(qū)動(dòng)電路 — L298N ........................................................38 電源電路 .......................................................................41 第 5 章 系統(tǒng)軟件設(shè)計(jì) .........................................................................43 系統(tǒng)軟件主流程圖 .................................................................43 系統(tǒng)初始化流程圖 .................................................................44 步進(jìn)電機(jī)運(yùn)行模塊主流程圖 ................