【正文】
到步進(jìn)電機(jī)兩相繞組電流對應(yīng)的值,將查到的值寫入數(shù)模轉(zhuǎn)換器的寄存器中,經(jīng)D/A轉(zhuǎn)換后輸出。細(xì)分驅(qū)動(dòng)主控制程序控制整個(gè)程序的流程,主要完成程序的初始化、中斷方式的設(shè)置、計(jì)數(shù)器工作方式的設(shè)置及相關(guān)子程序的調(diào)用等。初始化包括8279各寄存器、8279的顯示RAM、AT89C51的中斷系統(tǒng)及內(nèi)部RAM等。在AT89C51的各中斷中,使用了INTO、INTI、TO和T1這4個(gè)中斷,其中INT1為高優(yōu)先級,在運(yùn)行狀態(tài)下,當(dāng)有停止鍵按下時(shí),則INT1中斷服務(wù)程序?qū)0關(guān)閉,從而使步進(jìn)電機(jī)停止,T0控制每一步的步進(jìn)周期,該服務(wù)程序基本上只作重置定時(shí)器和置標(biāo)志位的操作,而其它操作均在主程序中完成。其流程圖如圖 52所示。 步進(jìn)電機(jī)細(xì)分驅(qū)動(dòng)程序設(shè)計(jì)細(xì)分驅(qū)動(dòng)程序中,細(xì)分電流控制信號的輸出采用單片機(jī)片內(nèi)EEPROM軟件查表法,用地址選擇來實(shí)現(xiàn)不同通電方式下的可變步距細(xì)分,從而實(shí)時(shí)控制步進(jìn)電機(jī)的轉(zhuǎn)角位置。其流程圖如圖 53所示。由于計(jì)算較復(fù)雜,對于電機(jī)的電流控制這種實(shí)時(shí)控制的應(yīng)用場合,直接計(jì)算不能滿足實(shí)時(shí)性要求。因此,為了實(shí)時(shí)性的考慮,只得以空間為代價(jià),將表預(yù)先計(jì)算好,保存在存儲(chǔ)器內(nèi),當(dāng)需要某個(gè)值時(shí),只要給出其地址,就可以通過查表的方式得到。為了實(shí)現(xiàn)16級細(xì)分,按照12800步/轉(zhuǎn)和12000步/轉(zhuǎn)建立了兩張表。因?yàn)殡姍C(jī)轉(zhuǎn)子有50個(gè)齒,定子磁場旋轉(zhuǎn)一周(即輸出一個(gè)波形)轉(zhuǎn)子轉(zhuǎn)一個(gè)齒距,即12800/50=256步/齒,12000/50=240步/齒,即走完一個(gè)波形分別需要256步和240步,所以應(yīng)該將一個(gè)周期的波形分成256和240等份,即為電機(jī)每相建立長度為256和240兩個(gè)8位字的細(xì)分表。根據(jù)電機(jī)細(xì)分設(shè)置的不同,查表時(shí)分別以不同的整數(shù)間隔分別輸出表中的內(nèi)容就能實(shí)現(xiàn)不同級別的電流細(xì)分,其中400,1600,3200步/轉(zhuǎn)的細(xì)分以12800步/轉(zhuǎn)的256細(xì)分表為基礎(chǔ),每個(gè)步進(jìn)脈沖分別以步長32,8,4的間隔輸出256細(xì)分表的內(nèi)容。其余細(xì)分以12000步/轉(zhuǎn)的240細(xì)分表為基礎(chǔ)輸出。步進(jìn)電機(jī)的正反轉(zhuǎn)控制是通過改變電機(jī)通電相序來實(shí)現(xiàn)的。為達(dá)到對步進(jìn)電機(jī)啟停運(yùn)行過程的快速和精確控制,從其動(dòng)力學(xué)特性出發(fā),推導(dǎo)出符合步進(jìn)電機(jī)矩頻特性的曲線應(yīng)該是指數(shù)型運(yùn)行曲線,并將這一曲線量化后,存入EEPROM。步進(jìn)電機(jī)在運(yùn)行過程中,每個(gè)通電狀態(tài)保持時(shí)間的長短,由當(dāng)前速度對應(yīng)的延時(shí)時(shí)間值決定。圖 53 細(xì)分驅(qū)動(dòng)程序流程 步進(jìn)電機(jī)顯示和鍵處理程序設(shè)計(jì):首先將8279初始化,對8279寫入相應(yīng)的命令字,使其按要求工作,然后開始不斷掃描鍵盤,判斷是否有鍵按下,當(dāng)沒有鍵按下則繼續(xù)掃描鍵盤。當(dāng)有鍵按下時(shí)就取出鍵值,鍵處理程序主要包括細(xì)分?jǐn)?shù)的選擇,如圖54所示。:主要判斷有無鍵按下,利用8279的狀態(tài)字可判斷FIFO RAM中已鍵入數(shù)據(jù)的個(gè)數(shù)或沒有輸入字符。當(dāng)狀態(tài)字節(jié)的低4位全為0時(shí),便可判斷無鍵按下,否則就有鍵按下,如圖55所示。:首先置顯示緩沖區(qū)首址和計(jì)數(shù)長度,然后取顯示數(shù)據(jù)轉(zhuǎn)換為段選碼,送到LED顯示,顯示主要提供當(dāng)前通電相、相電流大小、電機(jī)運(yùn)行時(shí)間、正反轉(zhuǎn)、當(dāng)前運(yùn)行速度、線位移及相關(guān)計(jì)數(shù)等的顯示,如圖56所示。 圖54 鍵盤顯示器芯片8279主程序流程 圖55 鍵掃描程序流程圖 圖56 顯示子程序流程 本章小結(jié)本章從系統(tǒng)硬件電路設(shè)計(jì)和步進(jìn)電機(jī)的基本原理出發(fā)對步進(jìn)電機(jī)驅(qū)動(dòng)系統(tǒng)和細(xì)分控制器驅(qū)動(dòng)進(jìn)行軟件設(shè)計(jì),分析了各個(gè)模塊的運(yùn)行流程,檢測系統(tǒng)實(shí)現(xiàn)的可行性。千萬不要?jiǎng)h除行尾的分節(jié)符,此行不會(huì)被打印?!敖Y(jié)論”以前的所有正文內(nèi)容都要編寫在此行之前。 48 結(jié)論本設(shè)計(jì)提出了一種電流細(xì)分技術(shù),該方案中流細(xì)分技術(shù)基本上克服了傳統(tǒng)步進(jìn)電機(jī)低速振動(dòng)大和噪音大的缺點(diǎn),減小發(fā)生共振的幾率,并通過硬件系統(tǒng)和軟件系統(tǒng)的設(shè)計(jì)實(shí)現(xiàn)了這一控制系統(tǒng),通過本設(shè)計(jì)的研究,取得了以下結(jié)論:,提出了三相步進(jìn)電機(jī)細(xì)分控制設(shè)計(jì)方案,細(xì)分控制后,運(yùn)行時(shí)減弱了步進(jìn)電機(jī)的低頻振動(dòng),電機(jī)運(yùn)轉(zhuǎn)平穩(wěn),大大減輕了噪聲,并且提高了步進(jìn)電機(jī)的分辨率,運(yùn)行定位精度高;同時(shí)具有較小的體積,較低的成本,較高的可靠性和可移植性,可維護(hù)性。,通過將單片機(jī)控制技術(shù)應(yīng)用到步進(jìn)電機(jī)的驅(qū)動(dòng)領(lǐng)域,實(shí)現(xiàn)了步進(jìn)電機(jī)的256級細(xì)分驅(qū)動(dòng)。,極大的提高了可靠性。它能輸出六路驅(qū)動(dòng)信號,并且由于內(nèi)部設(shè)有自舉式懸浮電路,此只用一路電源,使系統(tǒng)設(shè)計(jì)極為簡化。、顯示器接口電路芯片8279,該芯片能自動(dòng)完成對顯示的刷新,同時(shí)還可以對鍵盤自動(dòng)掃描,識別閉合鍵的鍵號,使用非常方便。8279鍵盤、顯示器接口器件是實(shí)現(xiàn)人機(jī)對話的主要部件,該接口電路能大大節(jié)省CPU的開銷,提高了可靠性和CPU工作效率。,顯著減小了驅(qū)動(dòng)器體積,并且供電電壓范圍寬、耗電少、發(fā)熱小。本設(shè)計(jì)能夠?qū)崿F(xiàn)對步進(jìn)電機(jī)的256級細(xì)分,從而大大的降低了步進(jìn)電機(jī)低速運(yùn)轉(zhuǎn)的振動(dòng)及其所產(chǎn)生的噪音,并且進(jìn)一步提高了步進(jìn)電機(jī)工作性能。致謝首先感謝我尊敬的導(dǎo)師在論文撰寫期間,我要感謝許多讓我分享他們寶貴經(jīng)驗(yàn)和知識的老師及朋友。他們?yōu)槲艺撐牡耐瓿商岢隽嗽S多寶貴建議及真知灼見。與此同時(shí),我還要感謝幫助過我的同學(xué),他們給我提出了許多寶貴的意見,激發(fā)了我寫作的靈感。正是由于他們,我才能在各方面取得顯著的進(jìn)步,在此表示最深的謝意。最后,對評審論文的各位老師表示衷心的感謝!參考文獻(xiàn)1 劉寶廷,:哈爾濱工業(yè)大學(xué)出版社,1997:2~6.2 ,1999,(3):36~37.3 :北京航空航天大學(xué)出版社,2002:5~10.4 :國防工業(yè)出版社,2006:7~15.5 李全利,仲偉峰,:清華大學(xué)出版社,2006,2:14~36.6 周明安,朱光忠,2005,34(2):16~17.7 :同濟(jì)大學(xué)出版社,1990:71~92.8 Tieluo Lin. Jianxun —based microstep controller of stepper motor .Intelligent Control and Automation, World Congress on Volume 5,15—19 June 2004 Page(s):4441~44459 Lars Larsson. Micro Step vs. Full Step—a Quantitative Competition,TRINAMIC Microchips GmbH,SAE 2003 World Congress,March 2003 Detroit,MI,USA.10 。機(jī)電一體化,2001,(6):30~33.12 林成武。步進(jìn)電機(jī)微步驅(qū)動(dòng)分析。, (3):1~4.13 陳國呈。新型電力電子變換技術(shù)。北京:中國電力出版社,2004:11~16.14 吳守緘,減英杰。電氣傳動(dòng)的脈寬調(diào)制控制技術(shù)。北京:機(jī)械工業(yè)出版社,2002:8~13.15 , Stepping motors and drives,2001,2:1~3.16 章烈剽?;趩纹瑱C(jī)的高精度步進(jìn)電機(jī)控制研究。武漢理工大學(xué),2007,5:1~20.附錄AHybrid Stepping Motors and DrivesHybrid stepping motors derive their name from the fact that their construction is a hybrid between permanent magnet and reluctance motor topologies. Their inherent positional accuracy makes them suitable for a wide range of motion control and industrial positioning applications. This article explains the construction and operation of the hybrid stepping motor. Power converter topologies are presented which are monly used in hybrid stepping motor drives. Methods are discussed of enhancing performance beyond that achievable by traditional methods. It is shown that the fall in cost of power electronic devices is enabling further enhancements of stepping motor drive technology, broadening the range of applications for this class of motor.by J. D. Wale and C. PollockHybrid stepping motor drive applicationsHybrid stepping motors derive their name from the fact that their construction is a hybrid between permanent magnet and reluctance motor topologies. Hybrid stepping motors range from miniature motors having outputs measured in uNm and uW to motor producing up to 60Nm of torque and 2kW of shaft power. Stepping motors have traditionally been used in applications at speeds up to2000/3000 r/min, but recent enhancements in drive technology and improvements in motor design are enabling the operating speed of stepping motors to be increased. Hybrid stepping motors are inherently suited to providing motion in discrete, small steps. As a result, they are ideal in applications where a piece of equipment must be moved and positioned accurately, usually according to instructions from a digital controller. Stepping motors are suited to driving lowspeed highfriction loads and are ideal for pointtopoint positioning systems and applications needing short rapid moves. They have the advantage of being able to operate without feedback devices and this, coupled with the absence of brushes, makes stepping motors virtually maintenance free. They give a noncumulative error over any distance and are inherently digital in operation as their operation is based on converting electrical pulses into mechanical movement in fixed increments. Stepping motors find applications in many industrial areas such as packing machines, conveyor systems, robot arm movement, lift and stack machine tools.Despite the extent of its use in specialist positioning applications the construction and operation of the hybrid stepping motor is not as well known as other brushless drives, such as induction, brushless DC and switched reluctance motors. This article highlights how its unusual construction gives rise to a unique ability to deliver highprecision positioning without requiring particularly plex control circuits.Hybrid stepping motor driveA block diagram of a hybrid stepping motor and drive is shown in Fig. 1 and consists of a hybrid stepping motor, power converter and controller.The hybrid stepping motor is a synchrono