Single-chip microcomputer control based on L297/L298 chip stepper motor
1 Introduction
Stepper motor is a kind of precision actuator that converts electric pulse signal into angular displacement or line displacement. Because stepper motor has the characteristics of convenient control and small size, it is used in numerical control system, automatic production line, automatic instrument, plotter and computer. Widely used in peripheral devices. The rapid development of microelectronics and the popularization and application of microcomputers have opened up a broad prospect for the application of stepping motors, enabling the large and complex controllers constructed by hardware circuits to be implemented in software, which reduces the hardware cost and improves the hardware. Control flexibility, reliability and versatility. There are many off-the-shelf stepper motor control mechanisms on the market, but the prices are high. The application of the L297 and L298 chips from SGS can easily form a stepper motor driver, and combined with the AT89C52 single-chip microcomputer for control, it can realize a good stepper motor drive circuit with relatively cheap price.
2 working principle
Since the stepping motor is an actuator that converts an electric pulse signal into a linear or angular displacement, it cannot be directly connected to the AC/DC power supply, but must use a special device - a stepper motor control driver. 1: The controller can emit a pulse signal whose pulse frequency can vary continuously from a few hertz to several tens of kilohertz, which provides a pulse sequence for the ring distributor. The main function of the ring distributor is to distribute the pulse sequence from the control link according to a certain rule, and then add the amplification of the power amplifier to the input terminals of the stepping motor driving power source to drive the rotation of the stepping motor. There are two main types of ring distributors: one is the function required by the computer software to realize the functions required by the ring divider, usually called a soft ring distributor. The other type is a ring distributor made of hardware, commonly referred to as a hard ring distributor. The power amplifier mainly amplifies the smaller output signal of the ring distributor to achieve the purpose of driving the stepping motor.





