Load torque detection circuit for stepping motor and electronic equipment
By designing a load torque detection circuit for stepper motors, using dual H-bridge drive modules, ADC modules and controllers, high-precision detection and real-time adjustment of load torque are achieved, solving the problem of insufficient energy waste and control accuracy in traditional stepper motor drive systems, and extending the service life of the motor.
Patent Information
- Application Number
- CN202510182799.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-03-18
AI Technical Summary
There are problems in traditional stepper motor drive systems such as waste of energy, insufficient control accuracy and shortened motor life, mainly due to the inability to detect and match load torque in real time.
A load torque detection circuit for stepper motors is designed, including a dual H-bridge drive module, an ADC module and a controller. By collecting current and voltage signals, the controller calculates the estimated value of load torque and dynamically adjusts the duty cycle of the PWM signal to adjust the current magnitude in the stepper motor winding to ensure that the torque matches the load requirement.
High-precision detection and real-time adjustment of the load torque of stepper motors is achieved, which reduces system complexity and cost, improves energy efficiency, reduces energy waste and temperature rise, and extends the service life of the motor.
Smart Images

Figure CN119652174A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of data processing, and in particular to a load torque detection circuit and electronic equipment for a stepping motor. Background Art
[0002] As one of the core actuators in precision control systems, the torque output of stepper motors directly affects the operating efficiency and accuracy of the system. In traditional stepper motor open-loop drive systems, the drive current is usually maintained at the maximum value to ensure sufficient torque in all cases. However, in most practical applications, such as the static or low-speed operation phase of an ATM machine, the load demand of the motor is much less than the maximum torque, which results in a huge waste of electrical energy. Excessive current not only causes energy loss, but also causes the motor to overheat, thus affecting its life and long-term reliability. Therefore, real-time detection of load torque and adjustment of the drive current accordingly have become key technical requirements in stepper motor system optimization.
[0003] Existing load torque detection technologies are mainly divided into two schemes: closed-loop control and open-loop control. Closed-loop control monitors load changes in real time by adding position sensors. This method can accurately detect load torque, but it also greatly increases the complexity and cost of the system and is not suitable for cost-sensitive application scenarios. The open-loop control scheme uses micro-stepping control technology to detect the voltage across the winding when the current passes through the zero point, thereby indirectly inferring the load torque. However, this method has a series of technical defects, including the difficulty in accurately controlling the current zero point, limited detection during high-speed operation, and the inability to detect under full-step operation. These defects limit the universality and effectiveness of this scheme in practical applications. Summary of the invention
[0004] The main purpose of the present invention is to provide a load torque detection circuit and electronic equipment for a stepper motor to solve the problems of energy waste, insufficient control accuracy and shortened motor life in a traditional stepper motor drive system.
[0005] In a first aspect, an embodiment of the present application provides a load torque detection circuit for a stepper motor, comprising: A dual H-bridge driving module, wherein the dual H-bridge driving module is respectively connected to two stepper motor windings of the stepper motor to be processed, and is used to drive the stepper motor by adjusting the current direction and current magnitude; An ADC module, the ADC module is connected to the low side of the dual H-bridge driving module, and is used to collect the current signal flowing through the stepper motor winding. The ADC module is also connected to both ends of the dual H-bridge driving module, and is used to collect the voltage signal at both ends of the stepper motor winding to detect the polarity change of the voltage of the stepper motor winding; A controller, including a microcontroller unit or a field programmable gate array, the controller is electrically connected to the dual H-bridge driver module and the ADC module, and the controller is used to: Generate a PWM signal to control the MOSFET in the dual H-bridge drive module to adjust the current signal in the stepper motor winding; receiving a detection signal output by the ADC module, and calculating an estimated value of the load torque based on the detection signal; According to the estimated value of the load torque, the duty cycle of the PWM signal is dynamically adjusted to adjust the current in the stepper motor winding to ensure that the torque output by the motor can match the load demand in real time.
[0006] In a second aspect, an embodiment of the present application provides an electronic device, which includes a load torque detection circuit for a stepper motor as described in any one of the embodiments of the present application.
[0007] The present invention provides a load torque detection circuit for a stepper motor, the circuit comprising: a dual H-bridge drive module, an ADC module and a controller; the dual H-bridge drive module is respectively connected to two stepper motor windings of a stepper motor to be processed, and is used to drive the stepper motor by adjusting the current direction and current magnitude; the ADC module is connected to the low side of the dual H-bridge drive module, and is used to collect current signals flowing through the stepper motor windings; the ADC module is also connected to both ends of the dual H-bridge drive module, and is used to collect voltage signals at both ends of the stepper motor windings, so as to detect polarity changes of the voltage of the stepper motor windings; the controller comprises a microcontroller unit or a field programmable gate array, and the controller is electrically connected to the dual H-bridge drive module and the ADC module; the controller is used to execute: generating a PWM signal to control a MOSFET in the dual H-bridge drive module, so as to adjust the current signal in the stepper motor windings; receiving a detection signal output by the ADC module, and calculating an estimated value of the load torque based on the detection signal; and dynamically adjusting the duty cycle of the PWM signal according to the estimated value of the load torque, so as to adjust the current magnitude in the stepper motor windings, so as to ensure that the torque output by the motor can match the load demand in real time. It realizes high-precision detection and real-time adjustment of the stepper motor load torque, reduces system complexity and cost, and the controller can dynamically adjust the drive current of the stepper motor to ensure that the output torque matches the actual load demand, thereby effectively improving energy efficiency, reducing energy waste, reducing temperature rise, and extending the service life of the motor. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 is a schematic block diagram of a load torque detection circuit for a stepping motor provided in an embodiment of the present application; Figure 2 It is a flow chart of a first method for detecting load torque of a stepper motor provided in an embodiment of the present application; Figure 3 is a circuit diagram of a dual H-bridge drive module provided in an embodiment of the present application; Figure 4 is a flow chart of a second method for detecting load torque of a stepper motor provided in an embodiment of the present application; Figure 5 is a schematic diagram of a current change path of an H-bridge provided in an embodiment of the present application; Figure 6 It is a schematic diagram of the change of voltage and current of a stepping motor provided in an embodiment of the present application; Figure 7 is a schematic diagram of adjusting the current of a stepping motor provided in an embodiment of the present application; Figure 8 It is a schematic diagram of the relationship between current and voltage of a stepper motor provided in an embodiment of the present application. DETAILED DESCRIPTION
[0009] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0010] See also Figure 1 , Figure 1 The following is a schematic block diagram of a load torque detection circuit for a stepper motor provided in an embodiment of the present application. Figure 1 As shown, the load torque detection circuit 100 for a stepper motor includes: a dual H-bridge driving module 11, an ADC module 12 and a controller 13; The dual H-bridge driving module 11 is respectively connected to two stepper motor windings of the stepper motor to be processed, and is used to drive the stepper motor by adjusting the current direction and current magnitude.
[0011] The ADC module 12 is connected to the low side of the dual H-bridge driving module 11 for collecting the current signal flowing through the stepper motor winding. The ADC module 12 is also connected to the two ends (AOUT1, AOUT2, BOUT1 and BOUT2) of the dual H-bridge driving module 11 for collecting the voltage signal at both ends of the stepper motor winding to detect the polarity change of the voltage of the stepper motor winding.
[0012] The controller 13 includes a micro control unit or a field programmable gate array, and the controller 13 is electrically connected to the dual H-bridge driving module 11 and the ADC module 12 .
[0013] See also Figure 2 , Figure 2 The flowchart of the first method for detecting load torque of a stepper motor provided in the embodiment of the present application is shown. Figure 2As shown, the controller 13 is used to execute the following steps: S101-S103.
[0014] S101 , generating a PWM signal to control the MOSFET in the dual H-bridge driving module 11 to adjust the current signal in the stepper motor winding.
[0015] S102 , receiving a detection signal output by the ADC module 12 , and calculating an estimated value of the load torque based on the detection signal.
[0016] S103. Dynamically adjust the duty cycle of the PWM signal according to the estimated value of the load torque to adjust the current in the stepper motor winding to ensure that the torque output by the motor can match the load demand in real time.
[0017] In order to ensure sufficient torque output, the traditional open-loop control system of stepper motors usually sets the drive current to the maximum value. However, in most practical applications, such as low-speed or stationary state of ATM machines, this method will cause excessive current loss, waste energy and cause motor overheating. Therefore, it is necessary to develop a solution that can adjust the current size in real time according to load demand, so as to improve system energy efficiency and extend the service life of the equipment.
[0018] In terms of current sampling and voltage signal acquisition and digital processing, the sampling rate of the ADC module 12 is a crucial parameter. In order to ensure the accuracy of signal sampling, the sampling frequency of the ADC module 12 must be much higher than the frequency of the PWM signal, usually more than ten times the frequency of the PWM signal, to ensure that the sampled data is fine enough to avoid control errors caused by insufficient sampling. For example, if the frequency of the PWM signal is set to 20kHz, then the sampling rate of the ADC module 12 should be set to 200kHz or higher. In addition, in order to avoid sampling errors caused by noise interference, a filtering circuit should be installed at the input end of the ADC module 12 to further smooth the signal and ensure that the collected signal is stable and reliable.
[0019] In the specific implementation process, a multi-channel ADC module 12 is used to simultaneously collect multiple voltage signals and current signals, and the collected signals are quickly transferred to the memory of the controller 13 using DMA (direct memory access) technology. For each sampled signal, the controller 13 performs digital filtering to eliminate low-frequency noise and random interference. These filtering operations can use simple moving average filters or more complex Kalman filters, which are selected according to the system's requirements for real-time performance and accuracy.
[0020] The load torque estimation logic is: it is achieved by detecting the time interval between the current zero-crossing position and the voltage reversing point of the stepper motor winding. Specifically, after the controller 13 performs digital filtering on the current signal, it is compared with the preset target sinusoidal current reference value to obtain the current deviation ΔI. The controller 13 executes the proportional integral (PI) control algorithm according to ΔI to calculate the duty cycle of the adjusted PWM signal to adjust the current in the stepper motor winding. In addition, the controller 13 also uses the timestamp T of the voltage reversing point switch The time stamp T of the current zero crossing point zero The load torque is estimated by using the time interval TFD and the current is adjusted accordingly.
[0021] When implementing torque regulation, the present invention ensures that the output torque of the stepper motor matches the load demand by adjusting the duty cycle of the PWM signal according to the estimated load torque. In order to avoid current shock or system instability when the load suddenly changes, the controller 13 adopts a flexible transition strategy when performing dynamic regulation. When the load suddenly changes, the controller 13 does not immediately adjust to the new current value, but gradually increases and decreases the current value to enable the system to transition smoothly and reduce motor vibration or noise caused by the sudden change in current. In addition, the parameter setting of PI control is also the key to achieving stable control. In order to ensure the response speed and stability of the system, the controller 13 automatically adjusts the PI parameters according to different load conditions to achieve the best control effect.
[0022] The setting process of PI control parameters can be achieved through an automatic adjustment algorithm, such as an incremental adaptive control algorithm. This algorithm can continuously adjust the proportional and integral parameters of PI according to the operating state of the motor to adapt to different load changes. This adaptive control method enables the system to maintain good dynamic performance and steady-state accuracy when facing different loads. In the case of a sharp change in load, the controller 13 can quickly increase the current to ensure that the motor does not lose step; when the load decreases, the controller 13 will reduce the current to reduce power consumption and heat.
[0023] The load torque detection result in the present invention is used to adjust the duty cycle of the PWM signal in real time to adapt to the dynamic load requirements of the stepper motor. In order to implement this process in hardware, the controller 13 must have sufficient computing power and response speed to ensure timely response when the load changes. Usually, the calculation time and sampling time of the controller 13 need to match to ensure the real-time performance of the system. For example, when the load suddenly increases, the controller 13 needs to complete the torque estimation and adjust the duty cycle within several PWM cycles to prevent the motor from losing step or insufficient output. To this end, a microcontroller unit or FPGA with high processing power is used in the present invention to achieve fast signal processing and execution of control strategies.
[0024] In the implementation of the control strategy, in addition to PI control, the present invention also combines feedforward control to improve the dynamic response speed of the system. Feedforward control can adjust the PWM duty cycle in advance according to the estimated value of the load change, thereby reducing the error caused by control lag. For example, when it is detected that the load is about to increase, the controller 13 can increase the current in advance to cope with the upcoming load change. This control method combining feedforward and feedback enables the system to respond to load changes more quickly and improve the accuracy and stability of control.
[0025] In terms of specific hardware implementation, the present invention adopts a modular design concept to modularly integrate the dual H-bridge driver module 11, the ADC module 12 and the controller 13. This not only facilitates the debugging and maintenance of the system, but also improves the scalability of the entire control system. For example, according to specific application requirements, the system performance can be improved by replacing or upgrading a module without redesigning the entire circuit.
[0026] In order to further reduce the power consumption of the system, the present invention also introduces a dynamic power management strategy. According to the actual load conditions, the controller 13 can dynamically adjust the supply voltage of the H-bridge drive module to achieve energy saving. For example, when the load is small, reducing the drive voltage can reduce power consumption; and when the load increases, the voltage is appropriately increased to ensure sufficient output torque. This dynamic power management combined with PWM control enables the system to maintain efficient operation under various load conditions.
[0027] The present invention solves the problems of high cost, complexity and energy waste in traditional stepper motor torque control systems by adopting a sensorless design. The controller 13 can dynamically adjust the driving current of the stepper motor to ensure that the output torque matches the actual load demand. This not only improves the energy efficiency of the system and reduces the waste of electric energy, but also effectively reduces the temperature rise of the motor and extends its service life. At the same time, by adopting synchronous sampling, anti-interference measures and flexible transition strategies, the present invention ensures the stability and high-precision control of the system in a complex electromagnetic environment, and is suitable for various industrial automation and precision control scenarios. In addition, through modular design and dynamic power management strategies, the stepper motor control system of the present invention not only achieves high performance, but also has good scalability and energy efficiency management capabilities, further enhancing its practicality and economy in practical applications.
[0028] In an example, see Figure 3 , Figure 3 The circuit diagram of a dual H-bridge driving module provided by an embodiment of the present application is shown. Figure 3As shown, the dual H-bridge driving module 11 includes: a first H-bridge circuit and a second H-bridge circuit, which are respectively used to control the first winding and the second winding of the stepper motor. Each H-bridge circuit includes four power MOSFETs, a high-voltage power input terminal VM, a low-voltage terminal, a control signal input terminal, a freewheeling diode and a current sampling resistor Rcs, and the four power MOSFETs are connected to each other in an H-type topology. The high-voltage power input terminal VM is respectively connected to the high-voltage terminal of the first H-bridge circuit and the second H-bridge circuit, and is used to provide a working voltage for each H-bridge circuit. The low-voltage terminal of the first H-bridge circuit and the low-voltage terminal of the second H-bridge circuit are grounded, specifically through the current sampling resistor Rcs, and are used to provide grounding for each H-bridge circuit. The control signal input terminal is electrically connected to the controller 13, and is used to receive a PWM signal from the controller 13 to drive the power MOSFETs in the first H-bridge circuit and the second H-bridge circuit. The freewheeling diode is respectively connected to both ends of each power MOSFET in each H-bridge circuit, and is used to provide a freewheeling path for the winding inductance current during the power MOSFET is turned off to protect the power MOSFET from the impact of reverse current. The current sampling resistor Rcs is connected to the low side of the first H-bridge circuit and the second H-bridge circuit respectively, and is used to collect the current signal flowing through the winding. The control signal input end controls the switching state of the power MOSFET in the first H-bridge circuit and the second H-bridge circuit through the PWM signal generated by the controller 13 to adjust the direction and magnitude of the current flowing through the stepper motor winding, thereby realizing the sinusoidal wave drive of the stepper motor.
[0029] In this example, the dual H-bridge driver module 11 is designed to achieve independent control of the two windings of the stepper motor, thereby ensuring that the motor can operate accurately as expected. The dual H-bridge driver module 11 includes a first H-bridge circuit and a second H-bridge circuit, which are used to control the first winding and the second winding of the stepper motor respectively. This design is to achieve fine control of the direction and magnitude of the current, so as to provide a sine wave drive for the stepper motor, thereby improving its operating efficiency and control accuracy.
[0030] Each H-bridge circuit is composed of four power MOSFETs, which are interconnected in an H-type topology. This topology can effectively control the flow direction of the current in the winding, so that the motor can achieve stepping and micro-stepping operations. In a specific implementation, the controller 13 generates a PWM signal, which is transmitted to the power MOSFET in the H-bridge drive circuit through the control signal input terminal. By adjusting the duty cycle of the PWM signal, the controller 13 can accurately control the switching state of the MOSFET, thereby adjusting the magnitude and direction of the current flowing through the stepper motor winding.
[0031] The high-voltage power input terminal VM of the H-bridge circuit is connected to the working power supply of the system, providing enough voltage to drive the stepper motor. The low-voltage end is connected to the ground to form a current loop to ensure that the current can flow stably through the winding. In this process, the input of the control signal plays a key role in the control of the power MOSFET. The high-frequency modulation method of the PWM signal allows the motor to output a sinusoidal current smoothly, thereby reducing the vibration and noise of the stepper motor and improving its smoothness and accuracy of operation.
[0032] In the H-bridge circuit, the role of the freewheeling diode is very important. A freewheeling diode is connected at both ends of each MOSFET. Its main function is to provide a freewheeling path for the inductor current in the winding during the MOSFET shutdown period. This is because in the stepper motor winding, due to the inductance characteristics, the current cannot drop to zero instantly. When the MOSFET is turned off, if there is no freewheeling path, the sudden change of the inductor current will generate a very high voltage at both ends of the MOSFET, which may damage the device. The presence of the freewheeling diode effectively prevents this from happening, protects the MOSFET from the impact of reverse current, and ensures the stability of the system.
[0033] In addition, the low side of each H-bridge circuit is connected to a current sampling resistor Rcs for real-time acquisition of the current signal flowing through the winding. The current sampling resistor Rcs converts the current signal into a voltage signal and transmits it to the amplifier in the ADC module 12 for amplification. This process enables the controller 13 to obtain current information in real time, thereby realizing the monitoring and control of the motor load. By accurately sampling the current signal, the controller 13 can adjust the duty cycle of the PWM signal according to the load demand, thereby dynamically adjusting the drive current of the motor to ensure that the torque output by the motor matches the actual load demand.
[0034] In order to achieve sinusoidal wave drive, the present invention uses PWM signals to adjust the switching state of MOSFET in the H-bridge circuit. Sine wave drive has higher smoothness and efficiency than traditional square wave drive, and can reduce the vibration and noise of the motor, thereby improving the operation quality of the stepper motor. The duty cycle change of the PWM signal allows the current in the motor winding to approach the ideal sinusoidal waveform, thereby achieving precise torque control. This sinusoidal wave drive method is particularly suitable for application scenarios that require high precision and low noise, such as positioning control of precision instruments.
[0035] In summary, the dual H-bridge drive module 11 realizes precise control of the stepper motor winding current through the H-type topology of four power MOSFETs combined with PWM control. The design of the freewheeling diode ensures that the inductor current can safely continue to flow when the MOSFET is turned off, protecting the safety of the circuit. The use of the current sampling resistor Rcs enables the controller 13 to monitor the current changes in real time and dynamically adjust the current size according to the actual load conditions, thereby achieving efficient and stable sinusoidal wave drive. These designs effectively improve the control accuracy of the stepper motor, reduce energy waste, and extend the service life of the motor and the drive module.
[0036] In this example, the design of the ADC module 12 is crucial to achieve high-precision control of the stepper motor. The core task of the ADC module 12 is to accurately convert the current in the stepper motor winding into a voltage signal, and after a series of processing, transmit it to the controller 13 so that the controller 13 can perform further data processing and load torque calculation. Exemplarily, the ADC module 12 includes: a current sampling resistor Rcs, a differential amplifier, a first filtering circuit, an analog-to-digital converter (ADC), and a bias voltage source, all of which work together to ensure the accuracy and stability of current signal acquisition.
[0037] First, the current sampling channel of the ADC module 12 is connected to the low side of the dual H-bridge drive module 11, that is, the first end of the current sampling resistor Rcs, which is responsible for converting the current flowing through the stepper motor winding into a corresponding voltage signal. It is very important to select a suitable current sampling resistor Rcs, and its resistance must be within a reasonable range, ensuring that the converted voltage signal has sufficient amplitude for subsequent processing, but also cannot be too large to avoid affecting the efficiency of the circuit. The role of the current sampling resistor Rcs is to accurately reflect the instantaneous change of the current as a voltage change, so that the controller 13 can obtain the real-time value of the current by measuring the voltage.
[0038] Since the voltage signal generated by the current sampling resistor Rcs may be weak, and in practical applications, the sampling signal is easily interfered by environmental noise, a differential amplifier can be used to improve the accuracy and anti-interference ability of the signal. The input ends of the differential amplifier are respectively connected to the two ends of the current sampling resistor Rcs. Its function is to amplify the tiny voltage signal generated by the current sampling resistor Rcs and effectively suppress the common-mode noise through differential input. For example, when there is strong external interference in the system, the common-mode noise will be applied to the two input ends of the differential amplifier at the same time. Since the differential amplifier only amplifies the voltage difference at the input end, these common-mode noises will be greatly weakened, thereby improving the reliability of the sampling signal.
[0039] The voltage signal amplified by the differential amplifier may still contain some high-frequency noise, and these high-frequency components will have an adverse effect on the subsequent analog-to-digital conversion and control accuracy. Therefore, the present invention can also connect a filtering circuit after the output end of the differential amplifier, specifically a low-pass filter. The low-pass filter is used to filter out the high-frequency noise in the voltage signal, so that the filtered signal is smoother and more stable. The design of the filter must take into account the response speed and noise suppression effect of the system, and usually an appropriate cut-off frequency is selected so that it can effectively suppress high-frequency noise without significantly reducing the dynamic response performance of the signal.
[0040] Next, the filtered voltage signal is sent to the ADC module 12 for converting the analog voltage signal into a digital signal. The accuracy and sampling rate of the ADC module 12 have an important impact on the control effect of the entire system. The sampling rate must be high enough to ensure that the collected current signal has sufficient resolution to reflect the rapid changes in current, especially when the stepper motor runs at high speed or the load changes drastically. A higher sampling rate can ensure the real-time response capability of the controller 13 to the motor state. The resolution of the ADC determines the quantization accuracy of the current signal. The higher the resolution, the more accurate the digitized current signal, thereby improving the accuracy of torque calculation and closed-loop control.
[0041] In order to ensure that the current sampling signal can be kept within the working range of the ADC under different load conditions, a bias voltage source is also designed in the present invention and connected to the input end of the differential amplifier. The bias voltage source is used to provide a reference voltage so that the current sampling signal can fluctuate within the input range of the ADC to avoid signal distortion or insufficient sampling due to excessive or insufficient current. The selection of the bias voltage needs to comprehensively consider the maximum current and minimum current of the motor to ensure that the ADC can effectively sample the current signal under all working conditions.
[0042] During the entire working process, the current signal in the stepper motor winding is first converted into a voltage signal, and the differential amplifier amplifies the voltage signal to reduce noise interference in the signal. The amplified signal is then filtered out by the first filter circuit to remove high-frequency noise and transmitted to the ADC module 12 for digital processing. The digitized current signal is transmitted to the controller 13, which uses these data to calculate the load torque of the stepper motor in real time, and dynamically adjusts the duty cycle of the PWM signal according to the calculation results, thereby realizing closed-loop control and ensuring that the torque output by the motor matches the actual load demand.
[0043] In this way, the current information in the stepper motor winding can be obtained in real time and accurately, so that when the load changes, the controller 13 can respond quickly, adjust the driving strategy, and maintain the stability and efficiency of the system. Through the combined use of the differential amplifier and the filter, the anti-interference ability of the current sampling signal has been significantly improved, ensuring reliable operation in a complex electromagnetic environment. In addition, the design of the bias voltage source also ensures that under different load conditions, the current sampling signal can always be kept within a reasonable range, avoiding signal distortion, and improving the control accuracy and reliability of the system.
[0044] In one example, the circuit further includes: a power supply module, configured to provide a DC power supply to the dual H-bridge driving module 11 and the controller 13 .
[0045] In this example, the design of the power module is the basis for the normal operation of the entire stepper motor drive system. The power module is used to provide DC power to the dual H-bridge drive module 11 and the controller 13, ensuring that each component in the system can operate under appropriate voltage and current conditions. The design of the power module is crucial to the stability and control accuracy of the drive circuit, because the drive and control of the stepper motor requires an efficient and stable power supply.
[0046] The dual H-bridge drive module 11 is responsible for controlling the current direction and size of the stepper motor winding to achieve sinusoidal drive of the stepper motor. The power MOSFETs in these H-bridge circuits require higher drive voltages and currents to achieve fast switching, so the power module must have sufficient power supply capacity. The DC power supply provided by the power module must be stable and have small ripples to avoid adverse effects on the stability of the H-bridge drive. In actual design, the power module usually uses a switching power supply or a linear regulated power supply to ensure the stability of the output voltage and the overall power efficiency of the system.
[0047] For the controller 13 (such as a microcontroller unit MCU or a field programmable gate array FPGA), its main tasks are to generate PWM signals, process feedback signals, and calculate and control load torque. The operation of the controller 13 also depends on the DC power provided by the power module. The power supply requirement of the controller 13 is usually a relatively low voltage (such as 5V or 3.3V) and the voltage fluctuation must be very small to ensure the accuracy of the control signal and the reliability of data processing. The power module provides a stable low-voltage DC power supply for the controller 13, so that the controller 13 can accurately process the collected current and voltage signals and generate appropriate control instructions.
[0048] In the design of the power module, the different power requirements of the dual H-bridge driver module 11 and the controller 13 must be taken into account. The dual H-bridge driver module 11 usually requires a higher voltage and a larger current to drive the stepper motor, while the controller 13 requires a low voltage, low power supply. Therefore, the power module may include multiple output terminals for providing appropriate voltages and currents to different components. In a specific implementation, the power module may include a step-up or step-down conversion circuit to meet the requirements of different voltage levels in the system. For example, a DC-DC converter can be used to provide a high voltage power supply for the H-bridge and a stable low voltage power supply for the controller 13.
[0049] In addition, the reliability design of the power module is also very critical. The stepper motor drive system will be affected by factors such as load changes, starting and stopping during operation, which may cause instantaneous current surges or voltage fluctuations. If the power module cannot provide enough current or cannot stabilize quickly when the voltage fluctuates greatly, it may cause system failure or reduced control accuracy. Therefore, filtering circuits and voltage stabilizers are usually added to the power module to reduce the impact of power ripple and voltage fluctuations, ensuring that the system can operate stably under various working conditions.
[0050] The power module also needs to have functions such as overcurrent protection and overvoltage protection to prevent excessive current or abnormal voltage caused by external short circuit or component failure, thereby protecting important components in the system from damage. For example, if the power MOSFET in the dual H-bridge driver module 11 causes overcurrent for some reason, the overcurrent protection circuit of the power module can quickly cut off the power supply to prevent the MOSFET from being damaged. At the same time, the overvoltage protection circuit can protect the controller 13 and other sensitive components when the voltage rises abnormally, ensuring the reliability and safety of the system.
[0051] In general, the power module ensures the normal operation of the stepper motor drive system by providing a stable DC power supply to the dual H-bridge drive module 11 and the controller 13. It not only needs to meet the voltage and current requirements of different components, but also must have good voltage stabilization and filtering performance to reduce the impact of power supply noise on the system. In addition, the protection function of the power module is also an important part of ensuring the reliability of the entire system. Through a reasonably designed power module, the entire stepper motor drive system can work stably and efficiently under various load conditions, providing reliable drive and control performance.
[0052] In some embodiments, see Figure 4 , Figure 4 The flowchart of the second method for detecting the load torque of a stepper motor provided in the embodiment of the present application is shown. Figure 4As shown, an embodiment of the present invention further provides a schematic flow chart of a second control method based on a stepper motor load torque detection circuit, wherein the stepper motor load torque detection circuit is the circuit of the above embodiment, wherein the control method includes: S201-S205.
[0053] S201, the controller 13 receives a detection signal of the stepper motor to be detected through the ADC module 12, where the detection signal includes: a current signal of the stepper motor winding and a voltage signal of the stepper motor winding.
[0054] S202, digitally filter the collected current signal, compare it with a preset target sinusoidal current reference value, and calculate the current deviation ΔI.
[0055] S203, executing a proportional-integral control algorithm according to the current deviation ΔI, obtaining an adjusted PWM duty cycle value, generating a target PWM signal, and sending the target PWM signal to the dual H-bridge driving module 11 to adjust the current signal of the stepper motor winding.
[0056] S204, based on the voltage signal, record the timestamp T of the voltage reversal point switch , monitor the current zero point position of the current signal and record the timestamp T zero , by calculating T switch With T zero The time interval TFD=T switch -T zero , and obtain the time interval between the voltage reversing point and the current zero point.
[0057] S205, compare the time interval TFD with the preset dead time TFD UNLOAD And the out-of-step time TFD STALL Compare, determine the current load state and estimate the load torque value, wherein, if the time interval TFD is close to the preset dead time TFD UNLOAD , it is judged that the stepper motor is about to lose step, a warning signal is issued and the motor is stopped to avoid stalling; if TFD is much larger than TFD UNLOAD , if the load is small, reduce the operating current to reduce power consumption and heat; if the load increases and causes TFD to decrease, increase the operating current to ensure sufficient output torque.
[0058] Through the above-mentioned second control method based on the stepper motor load torque detection circuit, accurate control of the stepper motor load torque is achieved, and the working state of the stepper motor is effectively adjusted to meet the operating requirements under different load conditions.
[0059] First, regarding the preset target sinusoidal current reference value, this is a reference signal used in the control system to guide the change of the stepper motor winding current. Specifically, the ideal operating state of the stepper motor is that the current in the winding changes according to the sinusoidal waveform, which can ensure the smooth torque output of the motor and reduce vibration and noise. The target sinusoidal current reference value is this ideal current waveform. By comparing with the actual current signal collected, the controller 13 can identify the deviation between the actual current and the ideal state, and thus make corresponding adjustments. The design of this sinusoidal reference value is based on the operating characteristics of the stepper motor, which can maximize the smooth and efficient operation of the stepper motor under various operating conditions.
[0060] Secondly, the controller 13 executes the proportional integral (PI) control algorithm according to the current deviation ΔI to obtain the adjusted PWM duty cycle value and generate the target PWM signal. This process is the core of the precise control of the stepper motor. The PI control algorithm is a classic control method, in which ΔI represents the deviation between the actual current and the target sinusoidal current reference value. The proportional control part can quickly respond to the change of the deviation by multiplying a proportional gain (Kp); the integral control part can eliminate the steady-state error by calculating the accumulation of the deviation over time. The controller 13 adds these two parts to obtain the control output signal, that is, the duty cycle of the adjusted PWM signal. The duty cycle of the PWM signal determines the average value of the current, thereby affecting the torque output of the motor. Therefore, through the PI control algorithm, the controller 13 can dynamically adjust the PWM signal according to the current deviation, so that the motor winding current is as close as possible to the target sinusoidal current reference value, thereby achieving precise control.
[0061] The generated target PWM signal is sent to the H-bridge driver module to adjust the winding current. Specifically, the duty cycle value of the PWM signal generated by the controller 13 is used as an input parameter to generate a corresponding target PWM signal. The target PWM signal is sent to the H-bridge driver module, and the power MOSFET in the H-bridge driver module is turned on and off according to the pulse width of the PWM signal, thereby controlling the direction and magnitude of the current flowing through the stepper motor winding. In this way, the controller 13 can accurately adjust the current in the winding to make it close to the target sinusoidal waveform, so as to achieve high-precision control of the stepper motor torque.
[0062] The logical relationship between S203 and S204 is a key link in the stepper motor control process. In step three, the duty cycle of the PWM signal is adjusted by the PI control algorithm to make the winding current as close to the target sinusoidal waveform as possible. However, even if the current is adjusted to an ideal state, the load change of the stepper motor will still affect the position of the voltage reversal point. Therefore, in step four, the controller 13 further adjusts the operating state of the motor by monitoring the reversal point of the winding voltage (i.e., the position where the voltage polarity changes). The timestamp T of the voltage reversal pointswitch and the timestamp T of the current zero position zero The time interval TFD reflects the actual load condition of the motor. By calculating TFD and comparing it with the preset time reference, the controller 13 can determine the current load state of the motor and make more precise adjustments. This dual control mechanism based on current regulation and voltage monitoring enables the stepper motor to maintain a stable and efficient operating state when facing complex load changes.
[0063] Through the above control method, the present invention realizes high-precision load torque detection and dynamic adjustment of the stepper motor. The whole process includes current sampling, error calculation, PI control, PWM signal generation and load evaluation based on voltage reversing point. Each step cooperates with each other to ensure the smooth operation of the stepper motor under various load conditions. This control method not only improves the energy efficiency of the stepper motor, reduces energy loss, but also prolongs the service life of the motor and drive module, and has broad application prospects and practical value.
[0064] Finally, the present invention further explains the second control method based on the stepper motor load torque detection circuit through the following embodiments.
[0065] The present invention proposes a method for detecting the load torque of a stepper motor. The method does not use a sensor, nor does it estimate the load torque by measuring the back electromotive force (BEMF) on the motor winding. Instead, the method determines the change of the load torque according to the winding voltage reversal point before the sinusoidal current on the winding crosses the zero point during the process of controlling the rotation of the motor in a voltage PWM mode.
[0066] In some embodiments, see Figure 5 , Figure 5 A schematic diagram of a current change path of an H-bridge provided in an embodiment of the present application is shown, wherein, Figure 5 This is a schematic diagram taking a two-phase stepper motor as an example. Figure 5 It shows that the current change on the two windings of the stepper motor is controlled by voltage PWM modulation through two H-bridge drive modules. Among them, xOUT1 and xOUT2 are used to connect the two ends of a stepper motor winding respectively. For example, Figure 3 In one stepper motor winding of the stepper motor M, xOUT1 and xOUT2 correspond to AOUT1 and AOUT2 respectively, and in another stepper motor winding of the stepper motor M, xOUT1 and xOUT2 correspond to BOUT1 and BOUT2 respectively.
[0067] In some embodiments, see Figure 6 , Figure 6The schematic diagram of the voltage and current changes of a stepper motor provided by the embodiment of the present application is shown. The superimposed voltage V on the winding is adjusted by controlling the output duty cycle and direction of the PWM signal. coil , so that the current on the winding forms a sinusoidal waveform, such as Figure 7 and Figure 8 shown.
[0068] In some embodiments, see Figure 7 , Figure 7 A schematic diagram of adjusting the current of a stepper motor provided in an embodiment of the present application is shown.
[0069] In some embodiments, see Figure 8 , Figure 8 A schematic diagram showing the relationship between current and voltage of a stepper motor provided in an embodiment of the present application is shown.
[0070] The specific process of PWM signal modulation is to generate a superimposed voltage V on the winding by controlling the high-level duty cycle of OUT1 and OUT2 within a fixed PWM period. coil , thereby controlling the direction and magnitude of the winding current. coil The duty cycle can be adjusted to achieve fine control of the current to approximate the ideal sinusoidal waveform. The voltage PWM mode can collect the current flowing through the winding through the ADC and fine-tune V through the PI control algorithm. coil The duty cycle makes the winding current I coil It can closely follow the ideal sinusoidal current target value. This modulation method can effectively reduce the ripple in the current, thereby reducing the vibration and noise of the motor, and is particularly suitable for occasions with high precision requirements such as 3D printers.
[0071] The present invention monitors the V coil The voltage commutation position is used to infer the change in load torque. Its working principle is as follows: In the sinusoidal waveform of the current, the first half of the Q1 and Q2 quadrants is mainly tON (charging stage) and tSD (slow decay stage). coil is positive (current flows from OUT1 to OUT2). When it reaches the second half of the Q2 quadrant, in order to maintain the sinusoidal waveform of the current, the current stored in the winding inductance needs to be released quickly, so it enters tFD (fast decay stage). At this time, V coil switches to negative direction (current flows from OUT2 to OUT1), and V coil The commutation position is usually ahead of the current zero point.
[0072] When the load torque of the stepper motor is small or no-load, in the Q2 quadrant, the energy stored in the inductance of the winding requires more tFD to release, so V coilWhen the load torque increases, most of the energy stored in the winding inductance is used to overcome the load torque, so there is no need for too much tFD to release it, and even an additional tON is needed to replenish the energy, resulting in a longer tON time, a shorter tFD time, and the commutation position of Vcoil is closer to the current zero point (such as Figure 7 as shown).
[0073] By recording V coil The time interval TFD between the commutation position and the current zero point can be used to determine the change in load torque. It should be noted that the TFD value is usually different under different motor, power supply voltage and working current conditions. Therefore, after determining a certain application condition, it is necessary to record the TFD when the motor is unloaded and out of step. UNLOAD and TFD STALL When the motor is operating normally, TFD is usually between these two values. STALL , it means the motor is about to lose step.
[0074] TFD can represent the estimated value of load torque, which can be expressed in time units (such as V coil The time interval between the commutation point and the current zero point can also be counted as a percentage (such as V coil The time interval from the commutation point to the current zero point accounts for the percentage of the entire 1 / 4 cycle). In practical applications, the latter is more convenient to use. For a two-phase stepper motor, the load torque estimate of winding A can be calculated in the Q2 / Q4 quadrant, and the load torque estimate of winding B can be calculated in the Q1 / Q3 quadrant, so that a TFD value can be obtained in each quadrant.
[0075] The load torque estimate has two main uses: First, it can be used to detect step loss and stall. When a threshold value (e.g., 10%) is set, when the load torque increases and causes the TFD to drop below 10%, the controller 13 will report that the motor has lost step. In the application of stepper motor slide control, this allows the system to know that the slide has moved to the edge of the guide rail, which plays a limiting role without the need for additional limiters. At the same time, once a step loss is detected, the controller 13 can stop the motor from rotating to prevent stalling, because stalling will cause the current to increase and may cause the motor to overheat and damage. Secondly, the operating current can be dynamically adjusted according to the size of the load torque estimate to achieve energy saving and cooling. When the TFD value is large, it means that the torque output by the motor is much greater than the load demand. At this time, the operating current can be appropriately reduced. For example, when the TFD is greater than 30%, the operating current can be reduced. If it remains above 30%, it will continue to be reduced to a minimum of 50% of the original current. This can reduce the ohmic loss from the original I 2R Reduce to (I / 2) 2R, which is reduced by 75%, thus significantly saving energy, reducing motor temperature and extending motor life. When the load torque increases suddenly, the TFD value will decrease, and a threshold (such as 15%) can be set. At this time, the working current is increased to ensure that the output torque of the motor can meet the load requirements. This dynamic adjustment function based on load torque can be called torque adaptive function.
[0076] The present invention adopts an open-loop control method, does not need to use a sensor to measure the load torque, has a simple circuit and low cost. coil The load torque change is estimated by the commutation position of the load, rather than by detecting the winding terminal voltage when the current passes through zero or measuring the BEMF back electromotive force. The use of open-loop control not only reduces system complexity and cost, but also enables effective estimation and feedback of load torque.
[0077] In summary, the method of the present invention can determine whether the motor is out of step or stalled by estimating the load torque change, and can also dynamically adjust the operating current according to the load change, thereby reducing power consumption as much as possible, reducing heat loss and extending the life of the motor while ensuring the output torque.
[0078] It should be noted that the detection of load torque is achieved by monitoring the time interval (TFD) between the winding voltage commutation point and the current zero point, rather than directly measuring the back electromotive force (BEMF). The time interval between the commutation point and the zero point can reflect the release of the inductive energy storage in the winding, which is directly affected by the load torque. Therefore, the current load state of the motor can be effectively inferred using TFD. When the load is small, the release time of the winding inductive energy storage is longer, resulting in a larger TFD value; when the load increases, the energy in the inductance is mainly used to overcome the load, the release time is shortened, and the TFD value decreases.
[0079] In addition, the load torque estimation result is used for two main purposes. First, it is used to determine the step-out or stall condition of the stepper motor. When the load suddenly increases, the TFD value may drop rapidly and approach the preset step-out threshold value (TFD STALL), at this time, the controller 13 can determine that the motor is at risk of losing step and take timely measures, such as reducing the drive current or stopping the motor rotation, so as to avoid the occurrence of stalling. The out-of-step detection function is very important, especially in the application of stepper motors. This method can avoid the use of additional limit switches, thereby simplifying the hardware design and reducing the complexity and cost of the system. Second, the estimation of load torque is also used to dynamically adjust the operating current of the stepper motor to achieve energy saving and thermal management. When the TFD value is large, it means that the output torque of the motor greatly exceeds the load requirement. At this time, the operating current can be reduced and the ohmic loss can be reduced, thereby achieving energy saving and reducing the temperature rise of the motor. When the load increases, the TFD value decreases, and the controller 13 can increase the current to ensure that the output of the motor can meet the load requirements.
[0080] It should be emphasized that although the calculation of the current deviation ΔI and the measurement of TFD are both key to the control process, their roles are different. The current deviation ΔI is obtained by comparing with the reference value of the target sinusoidal current. It is mainly used to adjust the duty cycle of the PWM signal so that the winding current is as close to the ideal sinusoidal waveform as possible, thereby ensuring the smooth operation of the motor and reducing vibration and noise. In contrast, TFD reflects the relative time interval between voltage commutation and current zero point, and is used to estimate the load torque. The two complement each other to ensure that the stepper motor can maintain a stable and efficient operating state under various load conditions, thereby achieving precise control and energy efficiency management of the stepper motor.
[0081] An embodiment of the present application provides an electronic device, and the electronic device includes a load torque detection circuit for a stepper motor as described in any one of the embodiments of the present application.
[0082] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0083] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A load torque detection circuit for a stepper motor, characterized in that: include: A dual H-bridge driving module, wherein the dual H-bridge driving module is respectively connected to two stepper motor windings of the stepper motor to be processed, and is used to drive the stepper motor by adjusting the current direction and current magnitude; An ADC module, the ADC module is connected to the low side of the dual H-bridge driving module, and is used to collect the current signal flowing through the stepper motor winding. The ADC module is also connected to both ends of the dual H-bridge driving module, and is used to collect the voltage signal at both ends of the stepper motor winding to detect the polarity change of the voltage of the stepper motor winding; A controller, including a microcontroller unit or a field programmable gate array, the controller is electrically connected to the dual H-bridge driver module and the ADC module, and the controller is used to: Generate a PWM signal to control the MOSFET in the dual H-bridge drive module to adjust the current signal in the stepper motor winding; receiving a detection signal output by the ADC module, and calculating an estimated value of the load torque based on the detection signal; According to the estimated value of the load torque, the duty cycle of the PWM signal is dynamically adjusted to adjust the current in the stepper motor winding to ensure that the torque output by the motor can match the load demand in real time.
2. The load torque detection circuit for a stepper motor according to claim 1, characterized in that: The dual H-bridge driving module comprises: A first H-bridge circuit and a second H-bridge circuit are used to control a first winding and a second winding of the stepper motor, respectively, and each H-bridge circuit includes four power MOSFETs, and the four power MOSFETs are connected to each other in an H-type topology structure; A high-voltage power supply input terminal, connected to the high-voltage terminals of the first H-bridge circuit and the second H-bridge circuit, respectively, for providing a working voltage for each H-bridge circuit; A low voltage end ground connection is respectively connected to the low voltage ends of the first H-bridge circuit and the second H-bridge circuit, and is used to provide grounding for each H-bridge circuit; a control signal input terminal, electrically connected to the controller, and configured to receive a PWM signal from the controller to drive the power MOSFET of the first H-bridge circuit and the power MOSFET of the second H-bridge circuit; A freewheeling diode is connected to both ends of each power MOSFET in each H-bridge circuit, and is used to provide a freewheeling path for the winding inductance current when the power MOSFET is turned off, so as to protect the power MOSFET from the impact of reverse current; Current sampling resistors, respectively connected to the low sides of the first H-bridge circuit and the second H-bridge circuit, for collecting current signals flowing through the windings and transmitting the current signals to the amplifier in the ADC module for amplification processing; Among them, the control signal input end controls the switching state of the power MOSFET of the first H-bridge circuit and the switching state of the power MOSFET in the second H-bridge circuit through the PWM signal generated by the controller, so as to adjust the direction and magnitude of the current flowing through the stepper motor winding, thereby realizing sinusoidal wave drive of the stepper motor.
3. The load torque detection circuit for a stepping motor according to claim 1, characterized in that: The circuit also includes: a power supply module, which is used to provide a direct current power supply to the dual H-bridge driving module and the controller.
4. The load torque detection circuit for a stepping motor according to claim 1, characterized in that: The controller is further configured to execute: The detection signal of the stepper motor to be detected is collected by the ADC module, wherein the detection signal includes: a current signal of the stepper motor winding and a voltage signal of the stepper motor winding; The collected current signal is digitally filtered and compared with the preset target sinusoidal current reference value to calculate the current deviation ΔI; According to the current deviation ΔI, a proportional-integral control algorithm is executed to obtain an adjusted PWM duty cycle value, a target PWM signal is generated, and the target PWM signal is sent to the dual H-bridge drive module to adjust the current signal of the stepper motor winding; Based on the voltage signal, the time stamp T of the voltage reversal point is recorded. switch , monitor the current zero point position of the current signal and record the timestamp T zero , by calculating T switch With T zero The time interval TFD=T switch -T zero , obtaining the time interval between the voltage reversing point and the current zero point position; The time interval TFD is compared with the preset dead time TFD. UNLOAD And the out-of-step time TFD STALL Compare, determine the current load state and estimate the load torque value, wherein, if the time interval TFD is close to the preset dead time TFD UNLOAD , it is judged that the stepper motor is about to lose step, a warning signal is issued and the motor is stopped to avoid stalling; if TFD is much larger than TFD UNLOAD , if the load is small, reduce the operating current to reduce power consumption and heat; if the load increases and causes TFD to decrease, increase the operating current to ensure sufficient output torque.
5. An electronic device, characterized in that: The electronic device comprises a load torque detection circuit for a stepper motor as claimed in any one of claims 1 to 4.
Citation Information
Patent Citations
Stepping motor moment adaptive regulation and control system
CN108063570A
Stepping motor control method and device
CN111082717A
Method and circuit assembly for sensorless load detection in stepper motors
CN112970190A
Stepping motor, driving circuit thereof and back electromotive force detection method
CN116780952A