Abstract: This paper introduces the principle of constant torque uniform microstepping drive for stepper motors. A constant torque PWM microstepping drive system for stepper motors, using a TMS320LF2407 DSP as the controller, was designed. The drive circuit and current feedback circuit for the stepper motor were designed separately, and PWM microstepping was implemented in software. Using the TMS320LF2407 DSP as the controller not only simplifies the circuit and saves costs, but also improves microstepping accuracy and motor running smoothness.
Keywords: Digital signal processing; Stepper motor; Pulse width modulation; Subdivision drive
Study on Stepping Motor Constant Torque PWM Mini-step Drives Based on TMS320LF2407 DSP
JIANG Xiao-bo1 WANG Xu-guang2
(1. Shandong Institute of Light Industry, Jinan, Shandong 250353; 2. Shandong Jiaotong University, Jinan, Shandong 250023)
Abstract: This paper introduces the principle of Stepping Motor Constant Torque Mini-step Drives. TMS320LF2407 DSP is designed for Stepping Motor Constant Torque PWM Mini-step Drives as a controller. stepper motor drive circuit and current feedback circuit Were designed respectively, and achieved PWM Mini-step through software. TMS320LF2407 DSP as a controller in this system, it can improve the precision and stability of the movement of stepping motor, with the simple driving circuit.
Key words: DSP; Stepping Motor; PWM; Mini-step Drives
1 Introduction
Stepper motors are precise digital control actuators widely used in various precision machining and operation industries. With the continuous deepening of industrial applications and the development of related technologies, people have put forward increasingly higher requirements for stepper motor application systems. Due to its working characteristics—running step by step under the control of the input PWM signal—stepper motors have problems such as low-frequency oscillation when running in open loop. Using microstepping drive technology to design the driver can improve the system resolution to improve accuracy and prevent low-frequency oscillation of the stepper motor, thereby increasing the smoothness of operation. [1] Embedded technology, which is currently in a highly developed stage, provides a good technical platform to meet the above requirements. Among them, the TMS320LF2407 DSP chip produced by TI Corporation of the United States is the most ideal control core component for this project.
2. Stepper motor constant torque uniform subdivision principle
Microstepping control of a stepper motor essentially involves controlling the current in the stepper motor's excitation winding to allow it to have multiple stable intermediate current states between zero and the maximum phase current. Consequently, the magnitude and direction of the corresponding magnetic field vector also have multiple stable intermediate states, thus achieving microstepping of the step angle.
There are various methods for subdivision. Generally, one phase winding current is kept constant while the current in the other phase winding is introduced in a stepped manner. However, this will cause the amplitude of the combined current vector to change continuously, resulting in unstable motor operation. Taking a two-phase hybrid stepper motor as an example, Figure 1 shows the current vector diagram when a four-stage subdivision method is applied using a general subdivision method.
Figure 1. Vector diagram of subdivision current in general subdivision method four.
Fig.1 General subdivision four sub-current vector
As can be clearly seen from the figure, the magnitude of the combined current vector changes continuously, reaching a maximum of 1.414 times. [2]
This paper employs a microstepping method using a constant-amplitude, uniformly rotating current vector. Specifically, sine and cosine currents are applied to two phase windings respectively, causing the synthesized current vector to rotate uniformly with a constant amplitude, thus achieving uniform microstepping of the stepper motor's step distance. Taking a two-phase hybrid stepper motor as an example, if the rotor rotates 90° electrical angle from A to B, the stepper motor rotates one step angle of 1.8°. When microstepping, the 90° electrical angle is divided into n equal parts, resulting in a corresponding microstepping step angle of 1.8°/n.
If the two-phase currents are calculated according to the formula...
Ia = Imsinα (1)
Ib=Imcosα (2)
The change is as follows: where Im is the rated winding current, α is the angle through which the motor rotates and α = , n is the microstepping, and s is the number of steps. In this way, the current vector can achieve constant amplitude uniform rotation.
Figure 2 is a vector diagram of the current when the constant torque subdivision method is used for four-level subdivision.
Figure 2. Constant torque uniform subdivision current vector diagram
Fig.2 Constant torque even sub-current vector
3. Overall System Structure
The overall structural principle of the system is shown in Figure 3.
Figure 3 System Overall Block Diagram
Fig.3 Overall system block diagram
The system uses a TMS320LF2407 DSP as its controller. Two PWM control signals generated by the DSP's event management module are connected to two-phase windings of the stepper motor via a drive circuit and a power amplifier circuit, thus controlling the stepper motor. Sampling resistors are connected to the stepper motor windings to convert the current signal into a voltage signal. This voltage signal is then processed by a current feedback circuit and connected to the DSP's A/D conversion module, enabling real-time detection of the winding current. This allows the DSP's PWM pulse width modulation program to adjust the pulse width online in real-time to achieve uniform subdivision. This is the core idea behind the current closed-loop instantaneous current tracking control strategy.
3.1 System Controller DSP
The TMS320LF2407 DSP chip integrates a PWM control signal generator. It allows setting the PWM operating mode and frequency by adjusting the timer control register in the Event Manager (EV), adjusting the PWM duty cycle by adjusting the compare value, setting the dead time by adjusting the dead time control register, and outputting an adjustable duty cycle PWM control signal with dead time through a dedicated PWM output port. This enables truly all-digital control via software, eliminating the need for external PWM wave generation circuits and time delay (dead time) circuits used in other controllers. Therefore, using a DSP to control a DC motor offers high performance and low cost.
3.2 Main Circuit Drive Circuit <br />The main circuit of the stepper motor is built using MOSFETs and adopts an H-bridge inverter structure. The N-channel enhancement-type MOSFET IRFP250 is selected in the figure, and the MOSFET driver is IR2110. IR2110 is a high-voltage, high-speed power MOSFET and IGBT dedicated driver chip manufactured by International Rectifier Corporation (IR). It employs highly integrated level conversion technology, greatly simplifying the logic circuit's control requirements for power devices and improving the reliability of the drive circuit. [3]
The hardware connection diagram is shown in Figure (4).
Figure 4. Stepper motor A-phase winding drive circuit diagram
Fig.4 A phase winding stepper motor drive circuit
In the diagram above, the HIN and LIN inputs of the two chips IR2110(1) and IR2110(2) are the control signals for the stepper motor, i.e., the PWM signals. Because, according to the characteristics of the H-bridge bipolar drive circuit, the switching order of MOSFETs V1, V4 and V2, V3 is logically opposite. Therefore, a 74LS14 NOT gate can be connected to the HIN and LIN terminals to form a logic inverter. This not only reduces the design difficulty of the circuit but also greatly reduces the PWM output of the DSP, making programming easier and improving the calculation speed.
In the diagram, VD1 and VD4 are bootstrap diodes. C3 and C8 are filter capacitors for the power supply VCC. To prevent excessive instantaneous current between the collector and emitter when the MOSFET device is turned off, which could cause the power MOSFET to mis-turn on and result in catastrophic consequences, a gate sub-bias circuit is used for protection. The high-voltage side sub-bias is composed of C2, VD2, and R3. R3 = 100kΩ, C2 = 100nF. The low-voltage side is composed of VCC, R4, C4, and VD3. R4 = 2kΩ, C4 = 100uF. VD2 and VD3 are selected as 4.7V Zener diodes, forming a sub-bias voltage of -4.7V. The selection of the second IR2110 is similar.
3.3 Current Feedback Circuit <br />The current feedback uses a 0.25 Ω precision sampling resistor to convert the current into voltage. After capacitor filtering and amplification, the voltage is directly input to the A/D input channel of the 2407 DSP for A/D conversion. The converted current value is processed in the program to adjust the duty cycle of the PWM signal issued by the DSP, thereby regulating the current magnitude and achieving closed-loop current control. Taking phase A as an example, its current sampling circuit is shown in Figure 5.
Figure 5 Current feedback circuit diagram
Fig.5 Current feedback circuit
4. Software Implementation of Uniform PWM Subdivision <br />Based on the PWM speed control principle of the H-bridge bipolar circuit, the average voltage Uα across the armature winding of the motor is:
(3)
In the formula, α is the duty cycle (4)
t1 is the pulse duration of one PWM pulse cycle.
Analysis of the above formula shows that when the duty cycle is higher than 50%, the current flows from A+ to A-, denoted as A+; when the duty cycle is lower than 50%, the current flows from A- to A+, denoted as A-. The process for phase B is similar. This achieves current commutation through pulse width modulation.
For the TMS320LF2407 DSP control chip, the period and duty cycle of the PWM signal output by its EV module depend on the values of the EV module's period register and comparator register. The value of the PWM period register remains constant, while changing the value of the comparator register alters the duty cycle. To reduce the DSP's computational load and improve program execution speed, based on circuit parameters, motor parameters, and microstepping, and using 50% as a baseline, the duty cycle is calculated offline according to a sinusoidal law (r = 50% + sin(sπ/4N), where S is the number of microsteps and N is the microstepping number). The duty cycle is then converted into the value of the DSP's comparator register using a formula, and a table is created and stored in the DSP's memory. The program uses this table to determine the motor winding current.
The program is implemented using periodic interrupts. The program flowchart is shown in Figure 6.
Figure 6. PWM Uniform Subdivision DSP Program Flowchart
Fig.6 Uniform subdivision DSP program flowchart
5 Experimental Analysis <br />The application background of this system is the driving of the cigarette compartment drive motor of the cigarette suction resistance measuring instrument. The project requires that the step angle error of the stepper motor rotation be ≤0.025°. We selected a 42BYG250A two-phase hybrid stepper motor, whose basic parameters are: step angle 1.8°; phase current 1.5A; holding torque 0.23Nm; moment of inertia 38gcm2; We took PWM16 microstepping as an example to test the system. We used the single-step response method [4] to measure the single-step response step angle of the stepper motor and obtained the measured curve. The theoretical step angle of the stepper motor with 16 microstepping is calculated according to the formula, where N is the microstepping number and Z is the number of rotor teeth of the motor, and the theoretical step angle is 0.1125°. From the data table and referring to the measured curve, we can obtain (θb)max=0.1231°, (θb)min=0.1022°, so the maximum step angle error is +0.0106° and -0.0103°. The test results meet the control requirements.
6 Conclusion <br />The stepper motor constant torque PWM microstepping drive system using TMS320LF2407 DSP as controller improves microstepping accuracy and motor running stability. However, due to the structural characteristics of hybrid stepper motors, there is a nonlinearity between the motor winding current and the synthesized magnetic field. The synthesized magnetic field vector cannot follow the rotation of the current vector, and the microstepping step angle obtained according to the ideal microstepping current model has errors. Therefore, to obtain higher accuracy, the PWM duty cycle can be corrected during debugging using a combination of experimental and least squares methods based on the actual motor parameters, so that the winding current vector rotates as uniformly and constantly as possible to achieve higher accuracy. [5]
References
1 Shi Jingzhuo. Servo Control Technology for Stepper Motors. Beijing: Science Press, 2006.
2 Zhang Wenchao. Research on PWM constant torque microstepping drive technology for stepper motors [J]. Mechanical Manufacturing, 2003(6): 33-34.
3 Chu Bin. Application of IR2110 power driver integrated chip [J]. Electronic Engineer, 2004, 30(10): 33-35.
4 Wang Zongpei. Measurement of microstep angle of stepper motor [J]. Micromotors, 1995(04).
5 Jiang Ping. A new algorithm for correcting the microstepping control function of a stepper motor [J]. Micromotors, 2005(4): 32-34.