Stepper motor driver principle
Stepping motor, also known as stepping motor, is a very characteristic motor, which can realize displacement control, but also has the characteristics of high precision, high response speed, and reliability, and is widely used in industrial control, automotive control, medical equipment, instrumentation, robotics, and a variety of other electronic products. What is its driving principle?
1. The working principle of stepper motor:
The working principle of stepper motor is to realize the rotation by controlling the current change of the wiring coil, as long as the current of the coil is controlled at a constant frequency, the motor can be made to realize the rotation, so as to realize the precise displacement control.
2. Driver principle of stepper motor:
The principle of the driver of the stepper motor is to convert the pulse signal into the current signal needed by the stepper motor, and then input the current signal into the stepper motor, the stepper motor can realize the rotation.
3. Driver schematic diagram of stepper motor:
Stepper motor drive schematic mainly consists of a power supply, controller, pulse converter, stepper motor and driver, where the power supply mainly provides DC power, the controller mainly controls the frequency of the pulse signal, the pulse converter mainly converts the pulse signal into a current signal, the stepper motor completes the rotation through the current signal, and the driver finally inputs the current signal into the stepper motor.
The working principle of stepper motor driver
Stepper motor has a wide range of applications in the control system. It can convert pulse signals into angular displacements, and can be used as electromagnetic brake wheels, electromagnetic differentials, or angular displacement generators.
Sometimes removed from some old equipment on the stepper motor (this motor is generally not damaged) to be used for other purposes, generally need to design their own driver. This paper introduces the stepper motor removed from an old Japanese printer and the design of the driver. This paper first introduces the working principle of the stepper motor, and then introduces its driver software and hardware design.
1. stepper motor principle of operation
The stepper motor is a four-phase stepper motor, powered by a unipolar DC power supply. As long as the windings of each phase of the stepper motor are energized according to the appropriate timing sequence, the stepper motor can be made to rotate step by step. Figure 1 is a schematic diagram of the operating principle of this four-phase reactive stepper motor.
At the beginning, switch SB turns on the power supply, SA, SC, SD is disconnected, the B-phase magnetic poles and rotor 0, 3 teeth aligned, at the same time, the rotor's 1, 4 teeth and C, D-phase winding magnetic poles to produce the wrong teeth, 2, 5 teeth and D, A-phase winding magnetic poles to produce the wrong teeth.
When the switch SC turns on the power supply and SB, SA and SD are disconnected, the rotor rotates due to the action of the magnetic lines of force between the magnetic lines of force of the C-phase winding and the No. 1 and No. 4 teeth, and the No. 1 and No. 4 teeth and the magnetic poles of the C-phase winding are aligned. While teeth 0, 3 and A, B phase windings produce misalignment, teeth 2, 5 and A, D phase winding magnetic pole
and the magnetic poles of the A and D phases of the winding are misaligned. And so on, A, B, C, D four-phase winding rotating power supply, the rotor will rotate along the A, B, C, D direction.
Four-phase stepping motors can be divided into single four-beat, double four-beat, and eight-beat operating modes according to the different order of energization. The step angles of single-four beat and double-four beat are equal, but the rotation torque of single-four beat is small. The step angle of the eight-beat operation mode is half of that of the single-quad and double-quad, therefore, the eight-beat operation mode can maintain a high rotating torque and improve the control accuracy.
Single four-beat, double four-beat and eight-beat mode of operation of the power supply power-on timing and waveforms are shown in Figure 2.a, b, c, respectively:
2. Based on the AT89C2051 stepper motor driver system circuit principle
AT89C2051 control pulses from the P1 port P1.4 ~ P1.7 output, inverted by the 74LS14 into the 9014, amplified by the 9014 control of the photoelectric switch, photoelectric isolation, by the power tube TIP122 pulse signals for the voltage and current amplification, drive the stepper motor phases of the winding. Make the stepper motor with different pulse signals for forward, reverse, accelerate, decelerate and stop and other actions. L1 in the figure for the stepper motor phase winding. AT89C2051 selected frequency 22MHz crystal, the purpose of selecting a higher crystal is to minimize the impact of AT89C2051 on the pulse signal cycle of the host computer in the way 2.
RL1 ~ RL4 for the winding internal resistance, 50Ω resistor is an external resistor, play a role in current limitation, but also an element to improve the loop time constant.D1 ~ D4 for the continuity diode, so that the motor winding generated by the reverse electromotive force through the continuity diode (D1 ~ D4) and attenuation, thereby protecting the power tube TIP122 from damage.
In the 50Ω external resistance in parallel with a 200μF capacitor can improve the current pulse front injected into the stepper motor winding, improving the high-frequency performance of the stepper motor. The 200Ω resistor connected in series with the continuity diode can reduce the discharge time constant of the circuit, so that the trailing edge of the current pulse in the winding becomes steeper and the current drop time becomes smaller, which also plays a role in improving the high-frequency performance.
3. Software design
The driver according to the different combinations of dip switches KX, KY have three working modes to choose from:
Mode 1 is the interrupt mode: P3.5 (INT1) is the stepping pulse input, and P3.7 is the forward and reverse pulse input. The upper computer (PC or microcontroller) and the driver are connected by 2 lines only.
Mode 2 is the serial communication mode: the host computer (PC or microcontroller) sends the control command to the driver, and the driver completes the control process according to the control command.
Mode 3 is the dip switch control mode: the stepping motor is directly controlled by different combinations of K1 to K5.
When the power is on or the reset key KR is pressed, AT89C2051 detects the status of the dip switches KX and KY first, and enters into different working modes according to the different combinations of KX and KY. The program flow block diagram and source program for mode 1 are given below.
In the preparation of the program, special attention should be paid to the handling of the stepper motor during commutation. In order to make the stepper motor in the commutation can be smooth transition, not to produce the wrong step, should be set in each step of the flag bit. Among them, each bit of the 20H unit is the stepper motor forward flag bit; each bit of the 21H unit is the reverse flag bit. In the forward rotation, not only to the forward flag bit value, but also at the same time to the reversal of the flag bit value; in the reversal of the same. In this way, when the stepper motor direction change, it can be the last position as the starting point of the reverse movement, to avoid the motor direction change to produce the wrong step.




