The basic control function of stepping motor’s single-chip microcomputer control

The basic control function of stepping motor's single-chip microcomputer control

The single-chip microcomputer control motor has the advantages of flexible and diverse functions, low inertia, fast speed, accurate pulse output, strong real-time performance, strong anti-electromagnetic characteristics and strong anti-interference ability, which is the future development direction. The working process of a stepper motor is generally controlled by a controller. The controller completes a certain control process according to the design requirements, so that the driving power supply drives the stepping motor to run according to the required law. Simple control can be implemented with various logic circuits, but the disadvantage is that the circuit is complicated and it is difficult to change the control scheme. Using a single-chip microcomputer to control the stepper motor has the advantages of strong function and low price, which provides a powerful design scheme for the stepper motor controller. There are two main methods: serial and parallel. Here we use the parallel control method of the single-chip microcomputer.

The method of directly controlling the drive circuits of each phase of the stepping motor with several output signals of P1 in the single-chip 89C52 is called parallel control. A ring distributor is included in the stepping motor drive power supply, but its function is completed by the SCM system. There are two ways to realize the function of the pulse distributor by the system. One is a pure software method, that is, completely using software to realize the phase sequence distribution, and directly output the signal of each phase on or off. There are mainly register shift method and buffer look-up table method; the second is the method of combining software and hardware. The single-chip microcomputer outputs control signal data to the programmable interface chip, and then the programmable interface chip outputs the control signal for each phase of the stepper motor to be turned on or off. This control system adopts the second method, which is the combination of software and hardware. It uses a combination of a dedicated stepper motor driver and software programming to realize the control of the stepper motor, and then realize the input angle required by the platform, and meet the requirements of the whole mechanism for sun tracking. The drive circuit of the stepping motor works according to the control signal. In the single-chip control of the stepping motor, the control signal is generated by the single-chip.

Basic control function

(1) Control the commutation sequence

The commutation sequence of the stepping motor is strictly in accordance with the working mode of the stepping motor. Usually we call this process of energization commutation as pulse distribution. For example, in the single-three-beat working mode of a three-phase stepper motor, the order of energization of each phase is A-B-C, and the energization control pulse must strictly follow this order to control the energization and de-energization of phases A, B, and C respectively.

(2) Control the steering of the stepper motor

Through the principle of stepping motor, we know that if it is energized and commutated according to the given working mode, the stepper motor will rotate forward; if it is energized and commutated according to the reverse order, the stepper motor will reverse.

(3) Control the speed of the stepper motor

If you send a control pulse to the stepper motor, it will turn one step, and if you send another pulse, it will turn another step. The shorter the interval between 2 pulses, the faster the stepping motor will rotate. Therefore, the frequency of the pulse determines the speed of the stepper motor. Adjusting the frequency of pulses sent by the single-chip microcomputer can adjust the speed of the stepping motor.