【正文】
1 摘 要 步進電機是將電脈沖信號轉(zhuǎn)變?yōu)榻俏灰苹蚓€位移的開環(huán)控制元件。在非超載的情況下,電機的轉(zhuǎn)速、轉(zhuǎn)動方向、停止位置等只取決于脈沖信號的頻率和脈沖數(shù),而不因負載的變化而變化,既給一個脈沖信號,電機就會轉(zhuǎn)過一個步距角。這一線性關(guān)系的存在,加上步進電機只有周期性的誤差而而無累計誤差等特點。使得在速度、位置正反轉(zhuǎn)等控制領(lǐng)域用步進電機來控制變得非常簡單。但步進電機不能直接接至電源進行工作,需要使用配套的驅(qū)動器和控制器,因而步進電機系統(tǒng)的運行性能既于電機自身性能有關(guān),也與驅(qū)動器的性能相關(guān),而一個好的控制器可以使步 進電機控制更加靈活,并且能夠改善其運動性能,因此,對于步進電機控制系統(tǒng)而言,使用性能良好的驅(qū)動器和控制器具有重要意義。 由于步進電機具有控制方便、體積小等特點,所以在數(shù)控系統(tǒng)、自動生產(chǎn)線自動儀表方面有廣泛的應(yīng)用,同時微電子學和微計算機學的發(fā)展也為步進電機開辟了廣闊的前景,但市場上的很多現(xiàn)成的控制器價格都偏高。因此,本課題應(yīng)用 SGS 公司推出的 L297 和 L298 兩芯片可方便的組成步進電機驅(qū)動器,并結(jié)合 AVR 單片機進行控制,即可實現(xiàn)用相對便宜的價格組成一個性能不錯的步進電機驅(qū)動的控制器。 關(guān)鍵詞 : 步進電機; 控 制器; L298; L297; AVR 單片機 2 ABSTRACT Stepper motor is the openloop control ponent which the electric pulse signals transfer into angular displacement or linear displacement . In the case of nonoverloading. Motor speed, rotational direction, stop location only depends on the pulse frequency and pulse number not due to load change, as soon as send a pulse signal, the motor will turn a step angle. Because of the existence of this linear relationship, coupled with the stepper motor only has periodic error and no cumulative error . Makes the speed, position and other control areas of positive inversion bees very simplewhich control by the stepper moto. But the stepper motor can not be directly connected to the power supply to work and need to use matching drives and ,the operating of stepper motor system is both related the performance of the motor itself and performancerelated good controller stepper motor can make it more flexible and able to improve their sports performance, therefore, it39。s significant to use good performance drives and controllers for the stepper motor control system. It39。s easy to control the stepper motor and its small volume, so there is a wide range of applications in the areas of the control system, automatic production line and automatic ,the development of microelectronics and puter science in microstepper motor also opens up a broad prospects, but many readymade controllers prices are too expensivein the , the subject applys of the L297 and L298 chips which introduced by SGS which can be easily posed two stepper motor drive and controlled with AVR micro controller, it will be realized with the formation of a relatively cheap price and a good performance stepper motor controller . Keywords: Stepper motor。 controller。 L298。 L297。 AVR microcontroller 3 前 言 步進電動機又稱脈沖電動機,它是一種將脈沖信號轉(zhuǎn)化為機械角位移或者線位移的控制電機 , 它能夠在不涉及復雜反饋環(huán)路的情況下實現(xiàn)良好的定位精度,并由于具有價格低廉、易于控制、無積累誤差等優(yōu)點 ,在民用、工業(yè)用的經(jīng)濟型數(shù)控定位系統(tǒng)中獲得了廣泛的應(yīng)用 ,具有較高的實用價值。為了強調(diào)本論文的實用性及可行性,本章綜述了步 進電機的各種特性;說明了步進電機的構(gòu)造、工作原理及驅(qū)動;回顧了步進電機在國內(nèi)外發(fā)展及應(yīng)用的概況;分析了本論文所要重點基于 L298的步進電機控制器的設(shè)計時其硬件的設(shè)計及其軟件模擬的調(diào)試;最后,介紹了本論文的研究內(nèi)容以及其它章節(jié)的結(jié)構(gòu)安排。 1 目 錄 1 緒論 .................................................................................................................. 1 步進電機概述 .............................................................................................. 1 步進電機工作原理 ...................................................................................... 2 磁阻式步進電機 ................................................................................... 2 永磁 式步進電機 ................................................................................... 3 混合式步進電機 ................................................................................... 4 國內(nèi)外發(fā)展概況與趨勢 .............................................................................. 5 關(guān)鍵技術(shù)問題 .............................................................................................. 7 正弦細分驅(qū)動技術(shù) ............................................................................... 7 脈沖寬度調(diào)制技術(shù) ............................................................................... 8 升降頻控制技術(shù) ................................................................................... 9 步進電機控制系統(tǒng) .................................................................................... 10 課題研究的意義 ........................................................................................ 10 本課題主要研究的內(nèi)容 ............................................................................ 11 2 步進電機驅(qū)動芯片 L298 的簡介 ................................................................. 12 L298 簡介 ................................................................................................... 12 L298 的絕對最大額定值 ........................................................................... 14 L298 引腳功能 ........................................................................................... 15 L298 的電氣特性 ....................................................................................... 16 3 步進電機驅(qū)動芯片 L297 的簡介 ................................................................. 19 L297 簡介 ................................................................................................... 19 L297 絕對最大額定值 ............................................................................... 22 L297 電氣特性 ........................................................................................... 22 L297 各引腳功能說明 ............................................................................... 23 L297 驅(qū)動相序的產(chǎn)生 ............................................................................... 24 4 控制器的設(shè)計 ................................................................................................ 25 處理器的選擇 ............................................................................................ 26 2 ATmega16 單片機簡介 ........................................................................ 26 引腳說明 ............................................................................................. 26 仿真軟件的選擇 ......................................