Share this

Analysis and Design of Constant Torque Stepper Motor Driver

2026-04-06 05:46:56 · · #1

Abstract: The L297 single-chip stepper motor control integrated circuit is suitable for controlling bipolar two-phase stepper motors or four-phase unipolar stepper motors. Combined with two L298 H-bridge driver chips, it forms a complete PWM constant current chopper driver for stepper motors with a fixed chopper frequency. This driver offers advantages such as full-step and half-step control chopper drive, constant torque, ease of use and debugging, and high reliability.

Keywords: stepper motor drive; constant torque; L297; L298; 555 oscillator

0 Introduction

Thanks to the rapid development of electronic technology, there are many microcontrollers and driver chips available, and many domestic manufacturers produce stepper motor drivers with excellent performance. However, customers generally have the same basic requirements for drivers: high cost-effectiveness, simple control, and safety and reliability. This paper designs a constant current chopper two-phase stepper driver based on the L298+L297 chip. This driver has a built-in pulse signal source for easy user control, setup, and use. It maintains constant torque output during full and half-step control, outperforming similar products on the market. Furthermore, the driver has a large chopping current, constant torque output, reliable operation, and a built-in pulse signal source for convenient user control, setup, and use.

1 L297 Functional Analysis

The L297 chip uses the analog/digital compatible I2L process, is packaged in a 20-pin DIP package, and is typically powered by 5V. All signals are TTL/CMOS compatible, making it a dedicated chip ideal for two-phase stepper motor control. The internal logic block diagram of the L297 is shown in Figure 1, and its core circuit is a converter.

The converter generates four output signals, which are sent to the subsequent output logic section. The output logic provides the phase sequence required for the disable and chopper functions. To obtain good speed and torque characteristics for the motor, the phase sequence signals are controlled by two PWM choppers. Each chopper contains a comparator, a flip-flop, and an external sense resistor, as shown in Figure 2. An internal general-purpose oscillator provides the chopper frequency pulses. The oscillation pulse frequency f of the oscillator output is determined by the external RC circuit of the OSC (frequency = 1/0.69RC). The flip-flop of each chopper is regulated by the oscillator pulses. When the load current increases, the voltage across the sense resistor increases relatively. When the voltage reaches Vref (Vref is determined based on the peak load current), the flip-flop is reset, cutting off the output until the second oscillation pulse arrives. The output of this line (i.e., the Q output of the flip-flop) is a constant-rate PWM signal. The input of the CONTROL pin of the L297 determines whether the chopper operates on phase lines A, B, C, D or suppression lines INH1 and INH2. When CONTROL is high, it suppresses A, B, C, and D; when it is low, it suppresses the suppression lines INH1 and INH2, thus enabling control of the motor torque.

2 L298 Functional Analysis

The L298 chip is a high-voltage, high-current dual H-bridge power integrated circuit that can be used to drive inductive loads such as relays, coils, DC motors, and stepper motors. It features two suppression inputs to prevent the device from being affected by input signals. The emitters of the transistors in each bridge are connected together, and corresponding external terminals can be used to connect external feedback resistors. An additional input power supply can be provided to allow the logic to operate at low voltage. The internal logic block diagram of the L298 is shown in Figure 3.

Figure 3 Internal logic block diagram of L298

The truth table of the L298 is shown in Figure 4. When EnA is low, the input levels of IN1 and IN2 are suppressed, the bridge circuit is open, and the motor stops. When EnA is high, the input levels of IN1 and IN2 are one high and one low, and the motor rotates forward or in reverse. When both IN1 and IN2 are low or high, the bridge circuit is open, and the motor stops.

3. Driving characteristics of stepper motors

The coil windings of a two-phase stepper motor are divided into +A/-A phase and +B/-B phase. Ignoring the nonlinear factors between electromagnetic torque and current, the key to making the motor rotate smoothly, at a constant speed and with constant torque is to control the current in the motor windings, as shown in Figure 5.

In the basic single-phase excitation drive mode, the phase winding current will cycle in four steps: I +A → I +B → I -A → I -B . In the basic two-phase excitation drive mode, the phase winding current will cycle in four steps: I +A , I +B → I +B , I -A → I -A , I -B → I -B , I +A. That is, the current vector of the full-step drive mode divides a circle into four equal parts. In the half-step alternating single-phase and two-phase excitation drive mode, the phase winding current will cycle in eight steps: I +A → I +A , I +B → I +B I +B, I -A I -A , I -B → I -B → I -B , I +A. That is, the current vector of the half-step drive mode can divide a circle into eight parts. The stepping current generated under two-phase excitation will be the resultant current vector of each phase, namely I1 , I2 , I3 , and I4 , and its amplitude is a multiple of the single-phase current value. Therefore, in order to maintain constant torque under half-step single-phase and two-phase excitation drive modes, when the current changes from two-phase to single-phase, such as I -B , I +A → I +A , the current of the +AA phase winding must be increased to a multiple of the two-phase current I +A . The change of the half-step constant torque operating current with time is shown in Figure 6.

Similarly, when the basic step two-phase excitation drive mode is changed to the basic step single-phase excitation drive mode, the phase current must be twice the two-phase current to maintain a constant output torque. Since the half-step single-phase and two-phase excitation modes double the step resolution and make the motor run more smoothly, while the basic step two-phase excitation mode has high phase coil utilization, can generate larger torque, and at the same time generates electromagnetic damping to weaken or eliminate oscillation, these two control modes are more commonly used.

Due to the influence of winding inductance, the current in the winding will rise in a predictable manner. Therefore, in order to obtain good high-frequency performance and make the current rise waveform in the winding steeper, a high-voltage drive method can be used to shorten the time for the current to rise to the reference current I, which can obtain better pull-out torque and improve the starting performance of the motor.

4 Circuit Solutions

The stepper motor control drive circuit of this design consists of a power supply circuit, a control drive circuit, and an overcurrent detection circuit.

The power supply circuit is shown in Figure 7. The internal 5V power supply is taken from an LM117. The LM117 has built-in overload protection, safety zone protection, and other protection circuits, allowing a power supply voltage of +24V to +40V. C1, C2, and C3 connected to the front end of the LM117 are used to cancel the inductive effect at the input terminal and prevent self-oscillation. C5 is used to prevent large fluctuations in the output voltage when the load current is increased or decreased instantaneously. The LED is the power indicator.

Figure 7 Power supply circuit

The control drive circuit and overcurrent detection circuit are shown in Figure 8.

The basic function of a two-phase constant current carrier stepper driver is to control the direction and speed of the motor via pulse signals sent from the host computer. For safe operation, it should also have an emergency stop (enable) function. The L297's CLOCK receiver can be from the host computer. Each rising edge of the CLOCK changes the state of the internal converter, generating control timing and outputting from pins a, b, c, and d. The L297 also has an internal synchronous chopper output function for synchronizing multiple drivers; internal half-step/full-step control, etc. For a single device, such a driver might be sufficient. However, when dealing with various customers and different devices, the required motors and current magnitudes will vary. Therefore, when designing the driver, this economic aspect must be considered, and the driver should have the function of adjusting the current magnitude. As shown in Figure 9, when the sliding rheostat R7 slides down, the collector potential of the NPN transistor decreases. When the switching NPN transistor is fully turned on, the emitter potential is approximately equal to the collector potential, meaning Vref on the L297 decreases, and the highest potential on the feedback resistor of the L298 is also Vref. At this point, from the formula Vref = I * r (feedback resistance), it can be seen that I within the winding will decrease, and vice versa. The feedback resistors in this circuit are R10 and R11, with a value of 1.0Ω/4W. Therefore, the motor current I (A) = Vref/1.0Ω. The corresponding current I can be obtained by measuring the voltage across terminals 1 and 2 of JT2 with a multimeter.

Although both the L297 and L298 drivers have internal half-step/full-step control, without improvements to the control circuit, the peak output current remains unchanged. This results in the output torque during two-phase full-step operation being several times that of single-phase full-step operation, and the same issue occurs during half-step operation. This uneven torque output significantly reduces the driver's application range and reliability.

Therefore, in order to ensure constant torque commutation of the stepper motor, as shown in Figure 9...

The timing signals a, b, c, d output from L297 are ORed by a 7432 OR gate and then ANDed by a 7400 NAND gate. This sets R16 to low or high, thereby changing the base potential of the NPN transistor and controlling the Vref voltage input to L297. When L297 outputs a single-phase excitation signal or a half-step single-phase excitation signal to make the phase winding work in a single phase, the Vref voltage will be increased by a factor of 1. Considering the nonlinearity of torque current characteristics, the selected component parameters only need to be increased by approximately 1.4 times. On the other hand, to prolong the rise time of the phase winding current at the initial moment of the step pulse, the Vref level needs to be increased. The author inverts the clock signal and inputs it to the 74123 monostable multivibrator A. Simultaneously with the change of state of the L297 converter, the 74123 outputs a high level with a time constant of 0.45*R18*C9 at its Q terminal, thereby controlling the NPN transistor through R19, causing the Vref of L297 to rise during this time.

In practical applications, when the equipment requires debugging and diagnostics, the driver contains a 555 oscillator (Figure 8). By adjusting the sliding rheostat R15, the output pulse frequency of the oscillator Q can be changed, ranging from 10Hz to 2000Hz. The switching speed of the L298 bridge is controlled by the clock of the L297, thus improving the stepping speed of the motor. To set a single step, simply jog the switch SW-2. The CW/CCW direction of the L297 can also be controlled by the high and low levels of the switch SW-4. When an external pulse is needed, simply disconnect the internal pulse using switch SW-6.

5. Testing and Research

Connect a SIZE17 two-phase hybrid stepper motor to a driver. The driver's power supply voltage is 24VDC. Set the driver to operate in full-step two-phase excitation mode as shown in Figure 10, full-step single-phase excitation mode as shown in Figure 11, and half-step single- and two-phase excitation modes as shown in Figure 12. The waveform of a phase winding current measured using an oscilloscope and current clamp is as follows:

Based on single-phase excitation and half-step excitation, the peak current in the single-phase state is higher than that in the two-phase state, and the actual test shows that it is about 1.3-1.5 times higher, which meets the design requirements.

6. Conclusion

This stepper motor driver is suitable for driving two-phase and four-phase bipolar stepper motors with a driving voltage not exceeding 40V and a current not exceeding 2.0A, basically covering mainstream hybrid stepper motors below SIZE23. It is widely used in medical devices and analytical instruments. Based on the main L297 and L298 chips, this driver is technologically mature and inexpensive, offering high cost-performance, large market sales, and positive feedback.

References:

[1] ZHAO T. Application of 3955 in steper motor microstep-ping control[J]. Mechanical & Electrical Engineering Magazine, 2003, 20(2): 46-49.

[2] Shi Jingzhuo. Servo Control Technology for Stepper Motors. Beijing: Science Press, 2006-7-1

[3] Deng Xingzhong. Electromechanical Transmission Control. Huazhong University of Science and Technology Press. 1998.

[4] Tan Jiancheng. Dedicated Integrated Circuits for Motor Control [M]. Beijing: China Machine Press, 2003.

Read next

CATDOLL Sasha Hard Silicone Head

The head made from hard silicone does not have a usable oral cavity. You can choose the skin tone, eye color, and wig, ...

Articles 2026-02-22