用L297步进电机控制器与L298N双桥驱动器设计微处理器与_第1页
用L297步进电机控制器与L298N双桥驱动器设计微处理器与_第2页
用L297步进电机控制器与L298N双桥驱动器设计微处理器与_第3页
用L297步进电机控制器与L298N双桥驱动器设计微处理器与_第4页
用L297步进电机控制器与L298N双桥驱动器设计微处理器与_第5页
已阅读5页,还剩11页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、APPLICATION NOTEAN470/0392THE L297STEPPER MOTOR CONTROLLERThe L297integratesall the control circuitry required to control bipolar and unipolar stepper motors.Used with a dual bridge driver such as the L298N forms a complete microprocessor-to-bipolar stepper motor interface.Unipolar stepper motor can

2、 be driven with an L297plus a quad darlington array.This note de-scribes the operation of the circuit and shows how it is used.The L297Stepper Motor Controller is primarily in-tendedfor use with anL298Nor L293Ebridge driver in stepper motor driving applications.It receives control signals from the s

3、ystems control-ler,usually a microcomputer chip,and provides all the necessarydrive signals for the power stage.Ad-ditionally,it includestwoPWM choppercircuits tore-gulate the current in the motor windings.With a suitable power actuator the L297drives two phase bipolar permanent magnet motors,four p

4、ha-se unipolar permanentmagnet motorsandfour pha-se variable reluctance motors.Moreover,it handles normal,wave drive and half step drive modes.(This is all explained in the section”Stepper Motor Ba-sics”.Two versions of the device are available:the regular L297and a special version called L297A.The

5、L297A incorporates a step pulse doubler and is de-signed specifically for floppy-disk head positioning applications.ADVANTAGESThe L297+driver combination has many advanta-ges:very few components are required(so assem-bly costs are low,reliability high and little space required,software development i

6、s simplified and the burden on the micro is reduced.Further,the choice of a two-chip approach gives a high degree of flexibility-the L298Ncan be usedon itsown for DC motors and the L297can be used with any power stage,including discrete power devices(it provides 20mA drive for this purpose.Figure1:I

7、n this typical configuration an L297stepper motor controller and L298dual bridge driver com-bine to form a complete microprocessor to bipolar stepper motor interface.1/18Forbipolarmotors withwinding currents up to2Athe L297should be used with the L298N;for winding currents up to1A the L293E is recom

8、mended(the L293will also be useful if the chopper isnt needed. Higher currents are obtained with power transistors or darlingtons and for unipolar motors a darlington array such as the ULN2075B is suggested.The block diagram,figure1,shows a typical system. Applications of the L297can be found almost

9、 eve-rywhere.printers(carriage position,daisyposition, paper feed,ribbon feed,typewriters,plotters,nu-merically controlled machines,robots,floppy disk drives,electronic sewing machines,cash registers, photocopiers,telex machines,electronic carbure-tos,telecopiers,photographic equipment,paper tape re

10、aders,optical character recognisers,electric valves and so on.The L297is made with SGSanalog/digitalcompa-tible I2L technology(like Zodiacand is assembled in a20-pin plastic DIP.A5V supply is used and all signal lines are TTL/CMOS compatible or open col-lector transistors.High density is one of the

11、key fea-tures of the technology so the L297die is very compact.THE L298N AND L293ESince the L297is normally used with an L298N or L293E bridge driver a brief review of these devices will make the rest of this note easier to follow.The L298N and L293E contain two bridge driver stages,each controlled

12、by two TTL-level logicinputs and a TTL-level enable input.In addition,the emitter connectionsof the lower transistors are brought out to external terminals to allow the connection of cur-rent sensing resistors(figure2.For the L298N SGSinnovative ion-implanted high voltage/high current technology is

13、used,allowing it to handle effective powers up to160W(46V supply, 2A per bridge.A separate5V logic supply input is provided to reduce dissipation and to allow direct connection to the L297or other control logic.In this note the pins of the L298N are labelled with the pin names of the corresponding L

14、297terminals to avoid unnecessary confusion.The L298N is supplied in a15-lead Multiwatt plastic power package.Its smaller brother,the functionally identical L293E,is packaged in a Powerdipa cop-per frame DIP that uses the four center pins to con-duct heat to the circuit board copper.Figure2:The L298

15、N contains two bridge drivers(four push pull stageseach controlled by two logic inputs and an enable input.External emitter connections are provided for current senseresistors.The L293E has external connections for all four emitters.APPLICATION NOTE2/18STEPPER MOTOR BASICSThere are two basic types o

16、f stepper motor in com-mon use:permanentmagnet and variable reluctan-ce.Permanent magnet motors are divided into bipolar and unipolar types.BIPOLAR MOTORSSimplified to the bare essentials,a bipolar perma-nent magnet motor consists of a rotating permanent magnetsurroundedby stator poles carrying thew

17、in-dings(figure3.Bidirectional drive current is used and the motor is stepped by switching the windings in sequence.For a motor ofthis type there are threepossibledrive sequences.The first is to energize the windings in the sequence AB/CD/BA/DC(BA means that the winding AB is energizedbut in theoppo

18、site sense.This sequence is known as”one phase on”full step or wave drive mode.Only onephaseisenergized atany given mo-ment(figure4a.The second possibility is to energizebothphasesto-gether,sothat the rotor always aligns itself between two pole positions.Called”two-phase-on”full step, this mode is t

19、he normal drive sequence for a bipolar motor and gives the highest torque(figure4b. The third option is to energize one phase,then two, then one,etc.,so that the motor moves in half step increments.This sequence,known as half step mode,halves the effective step angle of the motor but gives a less re

20、gular torque(figure4c.For rotation in the opposite direction(counter-clock-wisethe same three sequences are used,except of course that the order is reserved.As shown in these diagrams the motor would have a stepangleof90°.Real motors havemultiple poles to reduce the step angle to a few degrees

21、but the numberof windingsand thedrive sequencesare un-changed.A typical bipolar stepper motor is shown in figure5.UNIPOLAR MOTORSA unipolar permanent magnet motor is identical to the bipolar machine described above except that bi-filar windings are used to reverse the stator flux,ra-ther than bidire

22、ctional drive(figure6.This motor is driven in exactly the same way as a bi-polar motor except that the bridge drivers are repla-ced by simple unipolar stages-four darlingtons or a quaddarlington array.Clearly,unipolarmotors are more expensivebecause thay have twice as many windings.Moreover,unipolar

23、 motors give less torque for a given motor size because the windings are made with thinner wire.In the past unipolar mo-tors were attractive to designers because they sim-plify the driver stage.Now that monolithic push pull drivers like the L298N are available bipolar motors are becoming more popula

24、r.All permanent magnet motors suffer from the coun-ter EMF generated by the rotor,which limits the ro-tation speed.When very high slewing speeds are necessary a variable reluctance motor is used.Figure3:Greatly simplified,a bipolar permanentmagnet stepper motor consist of a rota-ring magnet surround

25、ed by stator polesas shown.APPLICATION NOTE3/18APPLICATION NOTEFigure4:The three drive sequences for a two phase bipolar stepper motor.Clockwise rotation is shown. Figure4a:Wave drive(one phase on.Figure4b:Two phase on drive.Figure4c:Half step drive.4/18VARIABLE RELUCTANCE MOTORSA variable reluctanc

26、e motor has a non-magnetized soft iron rotor with fewer poles than the stator(fig-ure7.Unipolar drive is used and the motor is step-ped by energizing stator pole pairs to align the rotor with the pole pieces of the energized winding. Once again three different phase sequencescan be used.The wave dri

27、ve sequence is A/C/B/D;two-phase-on is AC/CB/BD/DA and the half step se-quence is A/AC/C/BC/B/BD/D/DA.Note that the step angle for the motor shown above is15°,not45°. As before,pratical motors normally employ multiple poles to give a much smaller step angle.This does not,however,affect the

28、 principle of operation of the drive sequences.GENERATING THE PHASE SEQUENCES The heart of the L297block diagram,figure8,is a block called the translator which generatessuitable phase sequences for half step,one-phase-on full step and two-phase-on full step operation.This block is controlled by two

29、mode inputsdirection (CW/CCWand HALF/FULLand a step clock which advances the translator from one step to the next.Four outputs are provided by the translator for sub-sequent processing by the output logic block which implements the inhibit and chopper functions. Internally the translator consists of

30、 a3-bit counter plus some combinational logic which generates a basic eight-step gray code sequence as shown in figure9.All three drive sequencescan be generated easily from this master sequence.This state se-quence corresponds directly to half step mode,se-lected by a high level on the HALF/FULL in

31、put.Figure6:A unipolar PM motor uses bifilar win-dings to reverse the flux in each phase.Figure7:A variable reluctance motor has a soft iron rotor with fewer poles than the sta-tor.The step angle is15°for this motor.Figure5:A real motor.Multiple poles are norma-lly employed to reduce the step a

32、ngle toa practical value.The principle of opera-tion and drive sequences remain thesame.APPLICATION NOTE5/18The output waveforms for this sequence are shown in figure10.Note that two other signals,INH1and INH2are ge-nerated in this sequence.The purpose of these si-gnals is explained a little further

33、 on.The full step modes are both obtained by skipping alternate states in the eight-step sequence.What happensis that the step clock bypassesthe first sta-ge of the3-bit counter in the translator.The least si-gnificant bit ot this counter is not affected therefore the sequencegenerateddependson the

34、state of the translator when full step mode is selected(the HALF/FULL input brought low.If full step mode is selected when the translator is at any odd-numbered state we get the two-phase-on full step sequence shown in figure11.By contrast,one-phase-on full step mode is obtai-ned by selecting full s

35、tep mode when the translator is at an even-numbered state(figure12.Figure8:The L297contains translator(phase sequence generator,a dual PWM chopper and output control logic.Figure9:The eight step master sequence of the translator.This corresponds to half step mode.Clockwise rotation is indicated.Figu

36、re10:The output waveforms corresponding to the half step sequence.The chopper action in not shown.Figure11:State sequence and output waveforms for the two phase on sequence.INH1and INH2 remain high throughout.Figure12:State Sequence and Output Waveforms for Wave Drive(one phase on.INH1AND INH2In hal

37、f step and one-phase-on full step modes two other signalsare generated:INH1and INH2.These are inhibit signals which are coupled to the L298Ns enable inputs and serve to speed the current decay when a winding is switched off.Since both windings are energized continuously in two-phase-onfull step mode

38、 no winding is ever swit-ched off and these signals are not generated.To see what these signals do lets look at one half of the L298N connected to the first phase of a two-phasebipolar motor(figure13.Remember that the L298Ns A and B inputs determine which transistor in each push pull pair will be on

39、.INH1,on the other hand,turns off all four transistors.Assume that A is high,B low and current flowing through Q1,Q4and the motor winding.If A is now brought low the current would recirculate through D2,Q4and R s,giving a slow decay and increased dissipationin R s.If,on a other hand,Ais brought low

40、and INH1is activated,all four transistors are turned off.The current recirculates in this case from ground to V s via D2and D3,giving a faster decay thus al-lowing faster operation of the motor.Also,since the recirculation current does notflow through R s,aless expensive resistor can be used.Exactly

41、 the same thing happens with the second winding,the other half of the L298and the signals C,D and INH2.The INH1and INH2signals are generated by OR functions:A+B=INH1C+D=INH2 However,the output logic is more complex because inhibit lines are also used by the chopper,as we will see further on.OTHER SI

42、GNALSTwo other signals are connected to the translator block:the RESET input and the HOME output RESET is an asynchronousreset input which resto-res the translator block to the home position(state 1,ABCD=0101.The HOME output(open collec-torsignals this condition and is intended to the AN-Ded with th

43、e output of a mechanical home position sensor.Finally,there is an ENABLE input connected to the output logic.A low level on this input brings INH1, INH2,A,B,C and D low.This input is useful to di-sablethe motor driver when the system is initialized. LOAD CURRENT REGULATIONSome form of load current c

44、ontrol is essential to ob-tain good speed and torque characteristics.There are several ways in which this can be doneswit-ching the supply between two voltages,pulse rate modulation chopping or pulse width modulation chopping.in R s is also reduced.The L297provides load current control in the form o

45、f two PWM choppers,one for each phase of a bi-polarmotoror one for each pair of windings for a uni-polar motor.(In a unipolar motor the A and B windings are never energized together so thay can share a chopper;the same applies to C and D. Each chopper consists of a comparator,a flip flop and an exte

46、rnal sensing resistor.Acommon on chip oscillator supplies pulsesat the chopperrate to both choppers.In each chopper(figure14the flip flop is set by each pulse from the oscillator,enabling the output and al-lowing the load current to increase.As it increases the voltage across the sensing resistor in

47、creases, and when this voltage reaches V ref the flip flop is re-set,disabling the output until the next oscillator pul-se arrives.The output of this circuit(the flip flops Q outputis therefore a constant rate PWM signal. Note that V ref determines the peak load current.Figure14:Each chopper circuit

48、 consists of acomparator,flip flop and external senseresistor.A common oscillator clocksboth circuits.PHASE CHOPPING AND INHIBIT CHOPPINGThe chopper can act on either the phase lines (ABCDor on the inhibit lines INH1and INH2.An in-put named CONTROL decides which.Inhibit chop-ping is used for unipola

49、r motors but you can choose betweenphasechopping andinhibit choppingfor bi-polar motors.The reasons for this choice are best explained with another example.First lets examine the situation when the phase li-nes are chopped.As before,we are driving a two phase bipolar motor and A is high,B low(figure

50、15.Current therefore flows through Q1,winding,Q4and R s.When the voltage across R s reaches V ref the chopper brings B high to switch off the winding.The energy stored in the winding is dissipated by currentrecirculating throughQ1and D3.Current de-caythroughthis path is rather slow becausethe volt-a

51、ge on the winding is low(V CEsat Q1+V D3(figure 16.Why is B pulled high,why push A low?The reason is to avoid the current decaying through R s.Since the current recirculates in the upper half of the brid-ge,current only flows in the sensing resistor when the winding is driven.Less power is therefore

52、 dissi-pated in R S and we can get away with a cheaper re-sistor.This explain why phase chopping is not suitable for unipolar motors:when the A winding is driven the chopperacts onthe Bwinding.Clearly,thisis no use at all for a variable reluctance motor and would be slow and inefficient for a bifila

53、r wound permanent magnet motor.The alternative is to tie the CONTROL input to ground so that the chopper acts on INH1and INH2. Looking at the same example,A is high and B low. Q1and Q4are therefore conducting and current flows through Q1,the winding,Q4and R S,(fig-ure17.Figure15:Phase Chopping.In th

54、is example the current X is interrupted by activating B,giving the recir-culation path Y.The alternative,de-activating A,would give the recirculation path Z,increasingdissipation in R S.Figure16:Phase Chopping Waveforms.The example shows AB winding energized with A positive with respect to B.Control

55、 is high.Figure17:Inhibit Chopping.The drive current(Q1,winding,Q4in this case is interrupted by activating INH1.The decay path through D2and D3is faster than the path Y of Figure15.In this case when the voltage accross R S reaches V REF the chopperflip flopis reset andINH1activated (brought low.INH

56、1,remember,turns off all four transistors therefore the current recirculates from ground,through D2,the winding and D3to V S.Di-scharged across the supply,which can be up to46V, the current decays very rapidly(figure18.The usefulnessof this second faster decay option is fairly obvious;it allows fast

57、 operation with bipolar motors and it is the only choice for unipolar motors. But why do we offer the slower alternative,phase chopping?The answer is that we might be obliged to use a low chopper rate with a motor that does not store much energy in the windings.If the decay is very fast the average

58、motor current may be too low to give an useful torque.Low chopper rates may,for example, be imposed if there is a larger motor in the same sy-stem.To avoid switching noise on the ground plane all drivers should be synchronized and the chopperrate is therefore determined by the largest motor in the s

59、ystem.Multiple L297s are synchronized easily using the SYNC pin.This pin is the squarewave output of the on-chip oscillator and the clock input for the chop-pers.The first L297is fitted with the oscillator com-ponentsand outputs a sqarewavesignal on this pin (figure19.SubsequentL297sdo not needthe oscil-lator components and use SYNC as a clock input. An external clock may also be injected at

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论