Introduction
A stepper motor is an actuator that converts an electrical pulse signal into an angular displacement. Its main advantages are high positioning accuracy and no position accumulation error; its unique open-loop operation mechanism reduces system cost and improves reliability compared with closed-loop control systems, and has been widely used in the field of numerical control. However, stepper motors have large vibration and noise when running at low speeds, are prone to resonance when running near the natural oscillation frequency of stepper motors, and the output torque decreases as the speed of stepper motors increases. These disadvantages limit the application scope of stepper motors. The performance of stepper motors depends to a large extent on the driver used. Improving the performance of the driver can significantly improve the performance of stepper motors. Therefore, the development of high-performance stepper motor drivers is a topic of general concern.
1 Overview of stepper motor drive control system
Generally, a stepper motor drive system consists of three parts:
① Control circuit. Used to generate pulses to control the speed and direction of the motor.
② Drive circuit. That is, the research content of this article, which consists of the pulse signal distribution and power drive circuit shown in Figure 1. According to the pulse and direction signals input by the controller, the correct power-on sequence is provided for each winding of the stepper motor, as well as the high voltage and high current required by the motor; at the same time, various protection measures are provided, such as overcurrent and overheating.
③ Stepper motor. The control signal is amplified by the driver to drive the stepper motor and drive the load.
2 Comparison of stepper motor drive methods
2.1 Constant voltage drive method
2.1.1 Single voltage drive
Single voltage drive means that during the operation of the motor winding, only one direction voltage is used to power the winding. As shown in Figure 2, L is the motor winding and VCC is the power supply. When the input signal In is high, a sufficiently large base current is provided to make the transistor T in a saturated state. If its saturation voltage drop is ignored, the power supply voltage is fully applied to the motor winding. When In is low, the transistor is cut off and no current passes through the winding.
In order to make the winding current quickly reach the preset current when power is turned on, a resistor Rc is connected in series; in order to prevent the winding current change rate from being too large when T is turned off, and a large reverse electromotive force is generated to break down T, a diode D and a resistor Rd are connected in parallel at both ends of the winding to provide a discharge circuit for the winding current, also known as a "freewheeling circuit".
The advantages of a single-voltage power drive circuit are simple circuit structure, few components, low cost, and high reliability. However, due to the increase in power consumption after the resistor is connected in series, the efficiency of the entire power drive circuit is low, and it is only suitable for driving a low-power stepper motor.
2.1.2 High and low voltage drive
In order to make the winding quickly reach the set current when power is turned on, and the winding current quickly decays to zero when turned off, while having high efficiency, a high and low voltage drive mode has emerged.
As shown in Figure 3, Th and T1 are high-voltage tubes and low-voltage tubes, respectively, Vh and V1 are high and low voltage power supplies, respectively, and Ih and I1 are high and low end pulse signals, respectively. A high voltage power supply is used at the front edge of the conduction to increase the front edge rise rate of the current, and a low voltage is used after the front edge to maintain the current of the winding. High and low voltage drive can obtain better high frequency characteristics, but because the conduction time of the high voltage tube is unchanged, at low frequency, the winding obtains too much energy, which is easy to cause oscillation. The low frequency oscillation problem can be solved by changing the conduction time of the high voltage tube. However, its control circuit is more complicated than that of single voltage, and its reliability is reduced. Once the high voltage tube is out of control, the motor will be damaged due to excessive current.
2.2 Constant current chopper drive mode
2.2.1 Self-excited constant current chopper drive
Figure 4 is a block diagram of the self-excited constant current chopper drive. The current value of the stepper motor winding is converted into a certain proportion of voltage, which is compared with the preset value output by the D/A converter to control the switch of the power tube, thereby achieving the purpose of controlling the winding phase current. In theory, the self-excited constant current chopper drive can control the current of the motor winding at a certain constant value. However, since the chopping frequency is variable, it will cause the winding to excite a very high surge voltage, which will cause great interference to the control circuit, easily cause oscillation, and greatly reduce reliability.
2.2.2 Self-excited constant current chopper drive
In order to solve the surge voltage problem caused by the variable frequency of self-excited chopper, a fixed frequency clock can be added to the D flip-flop. This can basically solve the oscillation problem, but there are still some problems. For example: when the conduction pulse output by the comparator is just between the two clock rising edges of the D flip-flop, the control signal will be lost, which can generally be solved by increasing the clock frequency of the D flip-flop.
2.3 Subdivision drive mode
This is the focus of this article and the drive method used by the system. The main advantage of subdivision drive is that the step angle becomes smaller, the resolution is improved, and the positioning accuracy, starting performance and high-frequency output torque of the motor are improved; secondly, the low-frequency vibration of the stepper motor is weakened or eliminated, and the probability of the stepper motor working in the resonance area is reduced. It can be said that subdivision drive technology is a leap in stepper motor drive and control technology.
Subdivision drive means that at each pulse switching, instead of passing or cutting off the entire current of the winding, only a part of the current in the corresponding winding is changed, and the synthetic magnetic potential of the motor also rotates only a part of the step angle. During subdivision drive, the winding current is not a square wave but a step wave, and the rated current is put in or cut off in steps. For example: the current is divided into n steps, and the rotor needs n times to turn a step angle, that is, n subdivisions, as shown in Figure 5.
The general subdivision method only changes the current of a certain phase, and the current of the other phase remains unchanged. As shown in Figure 5, at 0°~45°, Ia remains unchanged, and Ib increases step by step from 0; at 45°~90°, Ib remains unchanged, and Ia changes step by step from the rated value to 0. The advantage of this method is that the control is relatively simple and easy to implement in hardware; but as shown in the current vector synthesis diagram shown in Figure 6, the synthesized vector amplitude is constantly changing, and the output torque also changes continuously, causing the lag angle to change continuously. When the number of subdivisions is large and the micro-step angle is very small, the difference in the change of the lag angle is greater than the micro-step angle required for subdivision, making the subdivision actually meaningless.
This is the defect of the commonly used subdivision method. Is there a way to keep the amplitude unchanged while the vector angle changes? From the above analysis, it can be seen that it is impossible to change only a single-phase current, so how about changing the two-phase current at the same time? That is, Ia and Ib change simultaneously according to a certain mathematical relationship to ensure that the amplitude of the synthetic vector remains unchanged during the change process. Based on this, this paper establishes a "rated current adjustable equal-angle constant torque subdivision" driving method to eliminate the problem of lag angle caused by the constant change of torque. As shown in Figure 7, as the synthetic vector angle of the phase currents Ia and Ib of the A and B phases changes continuously, its amplitude is always the radius of the circle. [page]
The following introduces a mathematical model for the unchanged synthetic vector amplitude: when Ia=Im·cosx, Ib=Im·sinx (where Im is the current rating, Ia and Ib are the actual phase currents, and x is determined by the number of subdivisions), its synthetic vector is always the radius of the circle, that is, constant torque.
Equal angle means that the angle of the synthetic force arm is the same each time it rotates. Adjustable rated current means that it can meet the requirements of various series of motors. For example, the rated current of the 86 series motor is 6 to 8 A, while the 57 series motor generally does not exceed 6 A. The driver has various gear currents to choose from. It is subdivided into subdivisions of the rated current.
In order to achieve "equal angle constant torque with adjustable rated current", in theory, as long as the phase current of each phase can meet the above mathematical model. This requires very high current control accuracy, otherwise the vector angle synthesized by Ia and Ib will deviate, that is, the step angles of each step are not equal, and the subdivision loses its meaning. The following is a design scheme for a driver based on this drive method.
3 Overall design scheme of two-phase stepper motor driver
3.1 System design block diagram
As shown in Figure 8, the control board signal is connected to the interrupt port of the microcontroller through optocoupler isolation.
The microcontroller distributes the pulse signal according to the received pulse signal, determines the power-on sequence of each phase, and connects to the D flip-flop in the CPLD; at the same time, it communicates with the D/A converter AD5623 through the SPI port according to the current value and subdivision number set by the user to obtain the set current value (actually the voltage value corresponding to the current).
The value output by AD5623 is the voltage value corresponding to the expected current, which must be compared with the voltage value corresponding to the current detected by the power module, and the comparison result is connected to the CLR pin of the D flip-flop in the CPLD.
The CPLD is connected to the current and subdivision setting dip switches, and the obtained value is transmitted to the microcontroller through the SPI port; the control logic with the D flip-flop as the core determines the switch of each power tube according to the power-on sequence of each phase of the microcontroller and the comparison result of the comparator MAX907.
The power drive module is directly connected to the motor to drive the motor. Eight MOS tubes IRF740 are used to form two H-bridge bipolar drive circuits. IRF740 can withstand a maximum voltage of 400 V and a current of 10 A. The switching time will not exceed 51 ns, and the value range of the tube conduction voltage Vgs is 4 to 20 V.
3.2 Key technical solutions for subdivision
The essence of the "rated current adjustable equal angle constant torque subdivision" driving method is constant current control. The key is the precise control of current, which must meet the following conditions at the same time:
① The current value output by the D/A converter must be quite close to the expected value, and the conversion speed must be fast. The system uses ADI's AD5623, 12-bit accuracy, divided into 4 096 levels, meeting the high-precision requirements of 200 subdivisions; 2-way D/A output meets the requirements of two phases; SPI port communication, frequency up to 50 MHz, fast establishment time, single voltage power supply, simple connection.
② The detected current must be able to correctly reflect the phase current at this time. Since the phase current of the motor is usually large and the voltage is high, detection is somewhat difficult. Common detection methods include external standard small resistors, which have simple circuits, but have large interference and poor accuracy. Hall sensors have accurate detection, small interference, and uncomplicated connections, so this driver uses Hall sensors.
③ The comparator resolution should be high and the conversion speed should be fast. The setup time of MAX907 is only 12 ns, and the voltage can be detected as long as the difference between the comparison voltages is 2 mV (maximum not more than 4 mV), and the response is very sensitive.
④ The logic circuit that controls the power tube switch must have high real-time performance to ensure that the phase current fluctuates very little above and below the set current to avoid causing surges and interfering with the control circuit.
This article uses Xilinx's CPLD chip XC9572. The control circuit with D flip-flop as the core is completed entirely by CPLD. CPLD replaces various discrete components, has a simple structure, and is easy to connect. Figure 9 is the logic diagram of the control circuit.
As shown in Figure 9, when the comparison result is low (the detected current is greater than the set current), the D flip-flop output is 1, the OR gate outputs a high level, the tube is turned off, and the current becomes smaller; when the current is detected to be less than the set current, the tube is turned on, thereby ensuring that the phase current fluctuates slightly above and below the set current.
Conclusion
This paper establishes a "rated current adjustable equal angle constant torque subdivision" driving method, and based on this method, a two-phase hybrid stepper motor driver is designed and implemented, which can reach up to 200 subdivisions, and the driving current is adjustable from 0.5 A/phase to 8 A/phase, which can drive 24 series to 86 series stepper motors. Practical application proves that this method basically overcomes the shortcomings of traditional stepper motors with large low-speed vibration and noise. The motor torque remains constant in a large speed range, improves the control accuracy, reduces the probability of resonance, has good stability, reliability and versatility, and has a simple structure.
Reference address:Research on key technologies of stepper motor drivers
A stepper motor is an actuator that converts an electrical pulse signal into an angular displacement. Its main advantages are high positioning accuracy and no position accumulation error; its unique open-loop operation mechanism reduces system cost and improves reliability compared with closed-loop control systems, and has been widely used in the field of numerical control. However, stepper motors have large vibration and noise when running at low speeds, are prone to resonance when running near the natural oscillation frequency of stepper motors, and the output torque decreases as the speed of stepper motors increases. These disadvantages limit the application scope of stepper motors. The performance of stepper motors depends to a large extent on the driver used. Improving the performance of the driver can significantly improve the performance of stepper motors. Therefore, the development of high-performance stepper motor drivers is a topic of general concern.
1 Overview of stepper motor drive control system
Generally, a stepper motor drive system consists of three parts:
① Control circuit. Used to generate pulses to control the speed and direction of the motor.
② Drive circuit. That is, the research content of this article, which consists of the pulse signal distribution and power drive circuit shown in Figure 1. According to the pulse and direction signals input by the controller, the correct power-on sequence is provided for each winding of the stepper motor, as well as the high voltage and high current required by the motor; at the same time, various protection measures are provided, such as overcurrent and overheating.
③ Stepper motor. The control signal is amplified by the driver to drive the stepper motor and drive the load.
2 Comparison of stepper motor drive methods
2.1 Constant voltage drive method
2.1.1 Single voltage drive
Single voltage drive means that during the operation of the motor winding, only one direction voltage is used to power the winding. As shown in Figure 2, L is the motor winding and VCC is the power supply. When the input signal In is high, a sufficiently large base current is provided to make the transistor T in a saturated state. If its saturation voltage drop is ignored, the power supply voltage is fully applied to the motor winding. When In is low, the transistor is cut off and no current passes through the winding.
In order to make the winding current quickly reach the preset current when power is turned on, a resistor Rc is connected in series; in order to prevent the winding current change rate from being too large when T is turned off, and a large reverse electromotive force is generated to break down T, a diode D and a resistor Rd are connected in parallel at both ends of the winding to provide a discharge circuit for the winding current, also known as a "freewheeling circuit".
The advantages of a single-voltage power drive circuit are simple circuit structure, few components, low cost, and high reliability. However, due to the increase in power consumption after the resistor is connected in series, the efficiency of the entire power drive circuit is low, and it is only suitable for driving a low-power stepper motor.
2.1.2 High and low voltage drive
In order to make the winding quickly reach the set current when power is turned on, and the winding current quickly decays to zero when turned off, while having high efficiency, a high and low voltage drive mode has emerged.
As shown in Figure 3, Th and T1 are high-voltage tubes and low-voltage tubes, respectively, Vh and V1 are high and low voltage power supplies, respectively, and Ih and I1 are high and low end pulse signals, respectively. A high voltage power supply is used at the front edge of the conduction to increase the front edge rise rate of the current, and a low voltage is used after the front edge to maintain the current of the winding. High and low voltage drive can obtain better high frequency characteristics, but because the conduction time of the high voltage tube is unchanged, at low frequency, the winding obtains too much energy, which is easy to cause oscillation. The low frequency oscillation problem can be solved by changing the conduction time of the high voltage tube. However, its control circuit is more complicated than that of single voltage, and its reliability is reduced. Once the high voltage tube is out of control, the motor will be damaged due to excessive current.
2.2 Constant current chopper drive mode
2.2.1 Self-excited constant current chopper drive
Figure 4 is a block diagram of the self-excited constant current chopper drive. The current value of the stepper motor winding is converted into a certain proportion of voltage, which is compared with the preset value output by the D/A converter to control the switch of the power tube, thereby achieving the purpose of controlling the winding phase current. In theory, the self-excited constant current chopper drive can control the current of the motor winding at a certain constant value. However, since the chopping frequency is variable, it will cause the winding to excite a very high surge voltage, which will cause great interference to the control circuit, easily cause oscillation, and greatly reduce reliability.
2.2.2 Self-excited constant current chopper drive
In order to solve the surge voltage problem caused by the variable frequency of self-excited chopper, a fixed frequency clock can be added to the D flip-flop. This can basically solve the oscillation problem, but there are still some problems. For example: when the conduction pulse output by the comparator is just between the two clock rising edges of the D flip-flop, the control signal will be lost, which can generally be solved by increasing the clock frequency of the D flip-flop.
2.3 Subdivision drive mode
This is the focus of this article and the drive method used by the system. The main advantage of subdivision drive is that the step angle becomes smaller, the resolution is improved, and the positioning accuracy, starting performance and high-frequency output torque of the motor are improved; secondly, the low-frequency vibration of the stepper motor is weakened or eliminated, and the probability of the stepper motor working in the resonance area is reduced. It can be said that subdivision drive technology is a leap in stepper motor drive and control technology.
Subdivision drive means that at each pulse switching, instead of passing or cutting off the entire current of the winding, only a part of the current in the corresponding winding is changed, and the synthetic magnetic potential of the motor also rotates only a part of the step angle. During subdivision drive, the winding current is not a square wave but a step wave, and the rated current is put in or cut off in steps. For example: the current is divided into n steps, and the rotor needs n times to turn a step angle, that is, n subdivisions, as shown in Figure 5.
The general subdivision method only changes the current of a certain phase, and the current of the other phase remains unchanged. As shown in Figure 5, at 0°~45°, Ia remains unchanged, and Ib increases step by step from 0; at 45°~90°, Ib remains unchanged, and Ia changes step by step from the rated value to 0. The advantage of this method is that the control is relatively simple and easy to implement in hardware; but as shown in the current vector synthesis diagram shown in Figure 6, the synthesized vector amplitude is constantly changing, and the output torque also changes continuously, causing the lag angle to change continuously. When the number of subdivisions is large and the micro-step angle is very small, the difference in the change of the lag angle is greater than the micro-step angle required for subdivision, making the subdivision actually meaningless.
This is the defect of the commonly used subdivision method. Is there a way to keep the amplitude unchanged while the vector angle changes? From the above analysis, it can be seen that it is impossible to change only a single-phase current, so how about changing the two-phase current at the same time? That is, Ia and Ib change simultaneously according to a certain mathematical relationship to ensure that the amplitude of the synthetic vector remains unchanged during the change process. Based on this, this paper establishes a "rated current adjustable equal-angle constant torque subdivision" driving method to eliminate the problem of lag angle caused by the constant change of torque. As shown in Figure 7, as the synthetic vector angle of the phase currents Ia and Ib of the A and B phases changes continuously, its amplitude is always the radius of the circle. [page]
The following introduces a mathematical model for the unchanged synthetic vector amplitude: when Ia=Im·cosx, Ib=Im·sinx (where Im is the current rating, Ia and Ib are the actual phase currents, and x is determined by the number of subdivisions), its synthetic vector is always the radius of the circle, that is, constant torque.
Equal angle means that the angle of the synthetic force arm is the same each time it rotates. Adjustable rated current means that it can meet the requirements of various series of motors. For example, the rated current of the 86 series motor is 6 to 8 A, while the 57 series motor generally does not exceed 6 A. The driver has various gear currents to choose from. It is subdivided into subdivisions of the rated current.
In order to achieve "equal angle constant torque with adjustable rated current", in theory, as long as the phase current of each phase can meet the above mathematical model. This requires very high current control accuracy, otherwise the vector angle synthesized by Ia and Ib will deviate, that is, the step angles of each step are not equal, and the subdivision loses its meaning. The following is a design scheme for a driver based on this drive method.
3 Overall design scheme of two-phase stepper motor driver
3.1 System design block diagram
As shown in Figure 8, the control board signal is connected to the interrupt port of the microcontroller through optocoupler isolation.
The microcontroller distributes the pulse signal according to the received pulse signal, determines the power-on sequence of each phase, and connects to the D flip-flop in the CPLD; at the same time, it communicates with the D/A converter AD5623 through the SPI port according to the current value and subdivision number set by the user to obtain the set current value (actually the voltage value corresponding to the current).
The value output by AD5623 is the voltage value corresponding to the expected current, which must be compared with the voltage value corresponding to the current detected by the power module, and the comparison result is connected to the CLR pin of the D flip-flop in the CPLD.
The CPLD is connected to the current and subdivision setting dip switches, and the obtained value is transmitted to the microcontroller through the SPI port; the control logic with the D flip-flop as the core determines the switch of each power tube according to the power-on sequence of each phase of the microcontroller and the comparison result of the comparator MAX907.
The power drive module is directly connected to the motor to drive the motor. Eight MOS tubes IRF740 are used to form two H-bridge bipolar drive circuits. IRF740 can withstand a maximum voltage of 400 V and a current of 10 A. The switching time will not exceed 51 ns, and the value range of the tube conduction voltage Vgs is 4 to 20 V.
3.2 Key technical solutions for subdivision
The essence of the "rated current adjustable equal angle constant torque subdivision" driving method is constant current control. The key is the precise control of current, which must meet the following conditions at the same time:
① The current value output by the D/A converter must be quite close to the expected value, and the conversion speed must be fast. The system uses ADI's AD5623, 12-bit accuracy, divided into 4 096 levels, meeting the high-precision requirements of 200 subdivisions; 2-way D/A output meets the requirements of two phases; SPI port communication, frequency up to 50 MHz, fast establishment time, single voltage power supply, simple connection.
② The detected current must be able to correctly reflect the phase current at this time. Since the phase current of the motor is usually large and the voltage is high, detection is somewhat difficult. Common detection methods include external standard small resistors, which have simple circuits, but have large interference and poor accuracy. Hall sensors have accurate detection, small interference, and uncomplicated connections, so this driver uses Hall sensors.
③ The comparator resolution should be high and the conversion speed should be fast. The setup time of MAX907 is only 12 ns, and the voltage can be detected as long as the difference between the comparison voltages is 2 mV (maximum not more than 4 mV), and the response is very sensitive.
④ The logic circuit that controls the power tube switch must have high real-time performance to ensure that the phase current fluctuates very little above and below the set current to avoid causing surges and interfering with the control circuit.
This article uses Xilinx's CPLD chip XC9572. The control circuit with D flip-flop as the core is completed entirely by CPLD. CPLD replaces various discrete components, has a simple structure, and is easy to connect. Figure 9 is the logic diagram of the control circuit.
As shown in Figure 9, when the comparison result is low (the detected current is greater than the set current), the D flip-flop output is 1, the OR gate outputs a high level, the tube is turned off, and the current becomes smaller; when the current is detected to be less than the set current, the tube is turned on, thereby ensuring that the phase current fluctuates slightly above and below the set current.
Conclusion
This paper establishes a "rated current adjustable equal angle constant torque subdivision" driving method, and based on this method, a two-phase hybrid stepper motor driver is designed and implemented, which can reach up to 200 subdivisions, and the driving current is adjustable from 0.5 A/phase to 8 A/phase, which can drive 24 series to 86 series stepper motors. Practical application proves that this method basically overcomes the shortcomings of traditional stepper motors with large low-speed vibration and noise. The motor torque remains constant in a large speed range, improves the control accuracy, reduces the probability of resonance, has good stability, reliability and versatility, and has a simple structure.
Previous article:Connection between ATmega16 and touch screen
Next article:Design and implementation of intelligent charger for lithium battery based on AVR
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
MoreDaily News
- Why software-defined vehicles transform cars from tools into living spaces
- How Lucid is overtaking Tesla with smaller motors
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
Guess you like
- [Understanding of FSM finite state machine of LSM6DSOX]--Introduction to state machine
- brd file conversion
- What do these two options mean?
- [Digi-Key Contest] 100 electronic design kits worth up to 600 yuan will be given away for free, and DIY can also win a cash prize of 10,000 yuan!
- Introduction to the theoretical knowledge of four-axis
- An essential handbook for engineers: a practical design guide for switching power supplies
- What happened to Microsoft's underwater data center that sank to the bottom of the sea for 2 years?
- [GD32L233C-START Review] OLED screen display driver
- Questions about op amp TIA circuit
- Deping Technology Shenzhen Co., Ltd.