How is the stepper motor controlled?

Motor” target=”_blank”>The stepper motor is a motor that converts electrical pulse signals into corresponding angular displacement or linear displacement. Every time a pulse signal is input, the rotor rotates an angle or advances one step, and the output angular displacement or The linear displacement is proportional to the number of input pulses, and the rotational speed is proportional to the pulse frequency. Therefore, the stepping motor is also called a pulse motor.

The biggest difference between a stepper motor and other motors for control purposes is that it receives a digital control signal (electrical pulse signal) and converts it into a corresponding angular displacement or linear displacement. It is itself an actuator that completes digital mode conversion. Moreover, it can be used for open-loop position control, and a specified position increment can be obtained by inputting a pulse signal. Compared with the traditional DC control system, the cost of such a so-called incremental position control system is significantly reduced, and there is almost no need for system adjustment. The angular displacement of the stepper motor is strictly proportional to the number of input pulses, and is synchronized with the pulses in time. Therefore, as long as the number, frequency and phase sequence of the motor winding are controlled, the required rotation angle, speed and direction can be obtained.

The structure of the stepper motor is simple, and the speed can be adjusted in a wide frequency range. Its speed is not affected by the size of the load. It has good overload performance, fast action, and convenient control. It can realize fast start and stop, forward and reverse control.

The stepper motor is a digitally controlled motor, and its drive circuit works according to the control signal. It converts the pulse signal into an angular displacement, that is, a pulse signal is given, and the stepper motor rotates an angle, so it is very suitable for single-chip control. Through the control of the single-chip microcomputer, the commutation sequence can be controlled by the pulse distribution, and the stepper motor can be controlled by the positive sequence commutation of the given working mode (that is, the forward or reverse rotation of the stepper motor can be realized), and the control can be controlled by changing the interval between two pulses. Stepper motor speed and other adjustments. It can be combined with ordinary 51 single-chip microcomputers such as AT89C2051 or STC12C1052 + THB7128 or THB6064.

It is very convenient to control the stepper motor with TPC4-4TD and other timing program controllers. It does not require programming by using the table setting. It can set the pulse frequency, pulse number and direction control data value, and can realize speed control and position control of the stepper motor. , length control, timing control and other basic operating functions.

Adopt high-performance DSP, use the bus voltage and motor operating current through DSP, realize the current closed-loop control of the stepper motor through the control algorithm, and then realize the precise control of the stepper motor, and at the same time improve the stepper motor through the control algorithm Vibration and noise at medium and low speeds. For example, the EZM series stepping drive system of Innes adopts DSP control, which can obtain the running performance close to the servo in the low and medium speed section.

PLC based control. Output a certain number of square wave pulses through PIC programming, control the rotation angle of the stepping motor and then control the feed rate of the servo mechanism, and control the rotation speed of the stepping motor through programming to control the pulse frequency, and then control the feed speed of the servo mechanism.

The stepper motor is controlled by the electric pulse signal, and the generation, distribution and amplification of the electric pulse signal are all realized by the action of electronic components.

1. Based on electronic circuit control system

Closed-loop control can realize high-precision subdivision and stepless speed regulation. Closed-loop control is to continuously directly or indirectly detect the position and speed of the rotor, and then automatically give the pulse chain through feedback and appropriate processing, so that the stepper motor responds to the command of the control signal at each step, so that as long as the control strategy is correct, the motor cannot be easily controlled. Out of step.

2. PLC-based control

PLC, also called programmable controller, is a computer used in industry. As a new generation of industrial controllers, PLC is widely used in automatic control systems in various industries due to its advantages of good versatility, strong practicability, complete hardware support, easy programming and high reliability.

3. Control based on single chip microcomputer

A single-chip microcomputer is used to control the stepping motor, and a control method combining software and hardware is realized. Using software to replace the ring edge distributor, the control of the stepping motor is achieved. In the system, the single-chip microcomputer interface line is used to directly control the drive lines of each phase of the stepping motor.

1. It can be fully applied with single-chip microcomputer + fully integrated stepping motor driver chip, which is relatively simple and convenient to control. It can be combined with ordinary 51 single-chip microcomputers such as AT89C2051 or STC12C1052+THB7128 or THB6064.

2. The single-chip microcomputer determines the number of output pulses according to the input, so that the stepper motor driver chip can be converted into a power signal to drive the stepper motor.

3. Because one pulse takes one step, the number of output pulses should also take into account the subdivision number. It is relatively easy to program the number of fixed rotation steps and angles. Like a 1.8-degree stepping motor, when it is subdivided into 2, it needs 400 pulses for one revolution, 200 pulses for half a circle, 100 pulses for 90 degrees, and so on.

4. For the program, fix an appropriate frequency, press the button to trigger the start timer, then invert an IO port in the timer interrupt for pulse output, and then put in an accumulative variable for calculation, calculate the number of pulses, and invert twice the output A complete pulse, set a required number of pulses in the main program as a condition to control the opening and closing of the timer, and then loop to wait for the condition to be met

5. If you want to integrate the control, drive, and stepping motor together, it will be troublesome. Small motors are fine, but the interference of large motors is a problem.

To control the speed of the stepper motor, it is mainly controlled by changing the control pulse frequency, just pay attention to the subdivision value of the driver. For example, if it is a full step, the motor needs 200 pulses per operation, and if it is a half step, the motor will run. It needs 400 pulses. For digital drivers like EZM552, the maximum subdivision value can reach 512. The motor needs 512*200=102400 pulses per operation. That is to say: when subdivided into 512, the motor speed is 1rps, the frequency of the control pulse is 102400Hz; the motor speed is 2rps, the frequency of the control pulse is 204800Hz.

Stepper motor speed control method:

Stepper motors can only be controlled by digital signals. When pulses are supplied to the driver, the control system sends too many pulses in a short period of time, that is, the pulse frequency is too high, which will cause the stepper motor to stall. To solve this problem, acceleration and deceleration must be adopted. That is to say, when the stepper motor starts, the pulse frequency should be gradually increased, and the pulse frequency should be gradually reduced when decelerating. This is what we often call the “acceleration and deceleration” method.

The speed of the stepper motor is changed according to the change of the input pulse signal. In theory, if a pulse is given to the driver, the stepper motor will rotate a step angle (a subdivision step angle when subdivided). In fact, if the pulse signal changes too fast, due to the damping effect of the internal back electromotive force of the stepping motor, the magnetic reaction between the rotor and the stator will not be able to follow the change of the power-on signal, resulting in stalling and loss of steps. Therefore, when the stepper motor starts at high speed, it is necessary to adopt the method of increasing the speed of the pulse frequency, and there must be a deceleration process when it stops, so as to ensure the precise positioning control of the stepper motor. The principle of acceleration and deceleration is the same.

How is the stepper motor controlled?

Take an example of acceleration to illustrate: the acceleration process is composed of the base frequency (lower than the highest frequency of the stepper motor’s direct start) and the jump frequency (the frequency that gradually accelerates) to form an acceleration curve (the deceleration process is vice versa). Hopping frequency refers to the frequency that the stepper motor gradually increases from the basic frequency. This frequency should not be too high, otherwise it will cause stall and step loss.

The acceleration and deceleration curves are generally exponential curves or adjusted exponential curves, and of course straight lines or sinusoidal curves can also be used. Acceleration and deceleration control can be realized by using single-chip microcomputer or PLC. For different loads and different speeds, it is necessary to select the appropriate base frequency and jump frequency to achieve the best control effect.

For exponential curve, in software programming, the time constant is first calculated and stored in the computer memory, and the direction is selected during work. Usually, the acceleration and deceleration time of the stepper motor is more than 300ms. If the acceleration and deceleration time is too short, it will be difficult to realize the high-speed rotation of the stepping motor for most stepping motors.