【正文】
到步進電機兩相繞組電流對應(yīng)的值,將查到的值寫入數(shù)模轉(zhuǎn)換器的寄存器中,經(jīng)D/A轉(zhuǎn)換后輸出。細分驅(qū)動主控制程序控制整個程序的流程,主要完成程序的初始化、中斷方式的設(shè)置、計數(shù)器工作方式的設(shè)置及相關(guān)子程序的調(diào)用等。初始化包括8279各寄存器、8279的顯示RAM、AT89C51的中斷系統(tǒng)及內(nèi)部RAM等。在AT89C51的各中斷中,使用了INTO、INTI、TO和T1這4個中斷,其中INT1為高優(yōu)先級,在運行狀態(tài)下,當有停止鍵按下時,則INT1中斷服務(wù)程序?qū)0關(guān)閉,從而使步進電機停止,T0控制每一步的步進周期,該服務(wù)程序基本上只作重置定時器和置標志位的操作,而其它操作均在主程序中完成。其流程圖如圖 52所示。 步進電機細分驅(qū)動程序設(shè)計細分驅(qū)動程序中,細分電流控制信號的輸出采用單片機片內(nèi)EEPROM軟件查表法,用地址選擇來實現(xiàn)不同通電方式下的可變步距細分,從而實時控制步進電機的轉(zhuǎn)角位置。其流程圖如圖 53所示。由于計算較復(fù)雜,對于電機的電流控制這種實時控制的應(yīng)用場合,直接計算不能滿足實時性要求。因此,為了實時性的考慮,只得以空間為代價,將表預(yù)先計算好,保存在存儲器內(nèi),當需要某個值時,只要給出其地址,就可以通過查表的方式得到。為了實現(xiàn)16級細分,按照12800步/轉(zhuǎn)和12000步/轉(zhuǎn)建立了兩張表。因為電機轉(zhuǎn)子有50個齒,定子磁場旋轉(zhuǎn)一周(即輸出一個波形)轉(zhuǎn)子轉(zhuǎn)一個齒距,即12800/50=256步/齒,12000/50=240步/齒,即走完一個波形分別需要256步和240步,所以應(yīng)該將一個周期的波形分成256和240等份,即為電機每相建立長度為256和240兩個8位字的細分表。根據(jù)電機細分設(shè)置的不同,查表時分別以不同的整數(shù)間隔分別輸出表中的內(nèi)容就能實現(xiàn)不同級別的電流細分,其中400,1600,3200步/轉(zhuǎn)的細分以12800步/轉(zhuǎn)的256細分表為基礎(chǔ),每個步進脈沖分別以步長32,8,4的間隔輸出256細分表的內(nèi)容。其余細分以12000步/轉(zhuǎn)的240細分表為基礎(chǔ)輸出。步進電機的正反轉(zhuǎn)控制是通過改變電機通電相序來實現(xiàn)的。為達到對步進電機啟停運行過程的快速和精確控制,從其動力學特性出發(fā),推導出符合步進電機矩頻特性的曲線應(yīng)該是指數(shù)型運行曲線,并將這一曲線量化后,存入EEPROM。步進電機在運行過程中,每個通電狀態(tài)保持時間的長短,由當前速度對應(yīng)的延時時間值決定。圖 53 細分驅(qū)動程序流程 步進電機顯示和鍵處理程序設(shè)計:首先將8279初始化,對8279寫入相應(yīng)的命令字,使其按要求工作,然后開始不斷掃描鍵盤,判斷是否有鍵按下,當沒有鍵按下則繼續(xù)掃描鍵盤。當有鍵按下時就取出鍵值,鍵處理程序主要包括細分數(shù)的選擇,如圖54所示。:主要判斷有無鍵按下,利用8279的狀態(tài)字可判斷FIFO RAM中已鍵入數(shù)據(jù)的個數(shù)或沒有輸入字符。當狀態(tài)字節(jié)的低4位全為0時,便可判斷無鍵按下,否則就有鍵按下,如圖55所示。:首先置顯示緩沖區(qū)首址和計數(shù)長度,然后取顯示數(shù)據(jù)轉(zhuǎn)換為段選碼,送到LED顯示,顯示主要提供當前通電相、相電流大小、電機運行時間、正反轉(zhuǎn)、當前運行速度、線位移及相關(guān)計數(shù)等的顯示,如圖56所示。 圖54 鍵盤顯示器芯片8279主程序流程 圖55 鍵掃描程序流程圖 圖56 顯示子程序流程 本章小結(jié)本章從系統(tǒng)硬件電路設(shè)計和步進電機的基本原理出發(fā)對步進電機驅(qū)動系統(tǒng)和細分控制器驅(qū)動進行軟件設(shè)計,分析了各個模塊的運行流程,檢測系統(tǒng)實現(xiàn)的可行性。千萬不要刪除行尾的分節(jié)符,此行不會被打印?!敖Y(jié)論”以前的所有正文內(nèi)容都要編寫在此行之前。 48 結(jié)論本設(shè)計提出了一種電流細分技術(shù),該方案中流細分技術(shù)基本上克服了傳統(tǒng)步進電機低速振動大和噪音大的缺點,減小發(fā)生共振的幾率,并通過硬件系統(tǒng)和軟件系統(tǒng)的設(shè)計實現(xiàn)了這一控制系統(tǒng),通過本設(shè)計的研究,取得了以下結(jié)論:,提出了三相步進電機細分控制設(shè)計方案,細分控制后,運行時減弱了步進電機的低頻振動,電機運轉(zhuǎn)平穩(wěn),大大減輕了噪聲,并且提高了步進電機的分辨率,運行定位精度高;同時具有較小的體積,較低的成本,較高的可靠性和可移植性,可維護性。,通過將單片機控制技術(shù)應(yīng)用到步進電機的驅(qū)動領(lǐng)域,實現(xiàn)了步進電機的256級細分驅(qū)動。,極大的提高了可靠性。它能輸出六路驅(qū)動信號,并且由于內(nèi)部設(shè)有自舉式懸浮電路,此只用一路電源,使系統(tǒng)設(shè)計極為簡化。、顯示器接口電路芯片8279,該芯片能自動完成對顯示的刷新,同時還可以對鍵盤自動掃描,識別閉合鍵的鍵號,使用非常方便。8279鍵盤、顯示器接口器件是實現(xiàn)人機對話的主要部件,該接口電路能大大節(jié)省CPU的開銷,提高了可靠性和CPU工作效率。,顯著減小了驅(qū)動器體積,并且供電電壓范圍寬、耗電少、發(fā)熱小。本設(shè)計能夠?qū)崿F(xiàn)對步進電機的256級細分,從而大大的降低了步進電機低速運轉(zhuǎn)的振動及其所產(chǎn)生的噪音,并且進一步提高了步進電機工作性能。致謝首先感謝我尊敬的導師在論文撰寫期間,我要感謝許多讓我分享他們寶貴經(jīng)驗和知識的老師及朋友。他們?yōu)槲艺撐牡耐瓿商岢隽嗽S多寶貴建議及真知灼見。與此同時,我還要感謝幫助過我的同學,他們給我提出了許多寶貴的意見,激發(fā)了我寫作的靈感。正是由于他們,我才能在各方面取得顯著的進步,在此表示最深的謝意。最后,對評審論文的各位老師表示衷心的感謝!參考文獻1 劉寶廷,:哈爾濱工業(yè)大學出版社,1997:2~6.2 ,1999,(3):36~37.3 :北京航空航天大學出版社,2002:5~10.4 :國防工業(yè)出版社,2006:7~15.5 李全利,仲偉峰,:清華大學出版社,2006,2:14~36.6 周明安,朱光忠,2005,34(2):16~17.7 :同濟大學出版社,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 。機電一體化,2001,(6):30~33.12 林成武。步進電機微步驅(qū)動分析。, (3):1~4.13 陳國呈。新型電力電子變換技術(shù)。北京:中國電力出版社,2004:11~16.14 吳守緘,減英杰。電氣傳動的脈寬調(diào)制控制技術(shù)。北京:機械工業(yè)出版社,2002:8~13.15 , Stepping motors and drives,2001,2:1~3.16 章烈剽?;趩纹瑱C的高精度步進電機控制研究。武漢理工大學,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