【正文】
rent supply.The L297 provides load current control in the form of two Pulse Width Modulation (PWM) chopper circuits and each chopper circuit consists of a parator, a flipflop and an external sensing resistor.In this method, while the motor current is increasing, the control system applies the supply voltage to the motor. When the current is reached up to the threshold, the control system tries to maintain the current at the desired value by changing the duty ratio of the voltage supply as shown in . For each chopper circuit, the duty ratio (D) of the voltage supply to the motor is defined as:D = Ton / (Ton + Toff),where the Ton and Toff are switch on and off durations respectively of the H bridge.In the chopper circuit, the flipflop is set by each pulse from the oscillator, enabling the output and allowing the load current to increase. As it increases the voltage across the sensing resistor increases and when this voltage reaches Vref the flipflop is reset, disabling the output until the next oscillator pulse arrives. In this method Vref determines the peak load current.The L298N is a monolithic circuit contains two H bridges. In addition, the emitter connections of the lower transistors are brought out to external terminals allowing the connection of current sensing resisters.Fig. Circuit containing the flipflop, the oscillator and the parator used for current controllingB. CURRENT CONTROL IN INHIBIT CHOPPER MODEInhibit chopper control mode and phase line chopper control mode are two of the most mon types of current control techniques available. In the latter case when the voltage across the sensing resistor reaches to Vref, only the low side switch is made off. Hence this method is not suitable and inhibit chopper control mode has to be used. The required switching sequences for this can be taken directly from L297.Inhibit chopper mode can be selected by pulling down (grounded) the CONTROL input signal of L297. Then chopper acts on INH to control the current through the motor coils. Therefore the contribution of INH signal generated from L297 is very important to create ENABLE signal for L298N. In the case when the voltage across the sensing resister reaches to Vref, the chopper flipflop is reset and INH is activated and is brought to low. Then it turns off all four switches of the bridge. The chopping frequency is determined by the internal oscillator of the L297. After switching off all transistors, the diodes provide a path to divert the winding current. The switches of the H bridge are made on in the next oscillator cycle.III. LOGIC CIRCUIT DESIGNINGIn any mode of operations, wave patterns of A, B, C and D phases of the L297 repeat after four clock cycles as shown in . Translation of the repetition of the phase waveform after the ten clock cycles is essential to derive the drive topology for the five phase stepper motor.Fig. . In the normal operation, L297 two phases of a 4 phase stepper motor or two ends of a 2 phase stepper motor winding are made ON at a time and the sequence repeats after every 4 clock cyclesBy analyzing the three modes of operations of the L297, it is clear that in the normal drive mode, which is usually called as twophaseon drive mode, should be selected to achieve the required excitation sequence for a 5 phase stepper motor as shown in the .By studying the required excitation sequence for 5 phase stepper motor and A, B, C, D phase sequences of the L297, the required logic circuit was designed. The procedure mentioned below was followed.Fig. . Five phase excitation sequence (i) Separation of High and Low side transistor excitation pattern for each phase from five phase excitation sequences as shown in .(ii) Selection of suitable phases from A, B, C and D of L297 to generate the high side excitation sequences.(iii) Generating input signals to the L298N using A, B, C, D output signals of the microcontroller and the relevant AND gates.(iv)Create ENA (enable A) and ENB (enable B) signals for L298NBy dividing ten (10) steps of required phase pattern in to twenty (20) steps can be equated to the four clock cycles of output wave pattern generated by the L297. The explains the clock cycle selection for required high and low side excitation sequence.Fig. . Required High and Low side transistor excitation sequencesHigh side transistor excitation sequence can be generated from L297 by selecting suitable output phases of the L297. The selected order, which is the twophaseon mode of L297 is shown in the .The microcontroller signals are used to generate the required high side pulse patterns. The DM74LS08 Quad 2Input AND Gates are used to AND microcontroller signals and signals received from L297.Fig. . Generation of Input signals to the L298NAs shown in , the input signals and Enable signals determine the high side and low side transistor switching patterns. Therefore ENABLED (EN) signals are fed from the microcontroller. But to achieve current control of the motor INH signal must engaged with the Enabled signal to the L298N as explained under current control section. The L298N consists with Hbridges and one output of a bridge was used for a phase. Two inputs of one H bridge is dependent each other. Therefore both outputs of a single bridge cannot be used. To generate five phases, it is required to have three numbers of L298N dual full bridge driver ICs. The selection of inputs and outputs of L298N are shown in of Section IV.Fig. . Pull up and Pull down operation of L298NIV. INTERFACE DESIGNINGThe logic circuitry used to generate required input signals for L298N and microcontroller control signals play a major role in the driver circuit. The shows interface of L297, DM74LS08 Quad 2Input AND Gates ICs and L298N with the microcontroller PIC16F877A.The circuit configuration for L297 is shown in . The control signal has to be grounded to obtain the inhibit control