Locked-rotor detection method and device for two-phase stepping motor

By calculating the phase current phase offset and relative difference of a two-phase stepper motor, and using the StallDet formula to detect motor stall, the problems of high cost and high false alarm rate in existing technologies are solved, achieving high sensitivity and high accuracy in stall detection.

CN121164902APending Publication Date: 2025-12-19JIANG SU YI RUI QING LIAN QI CHE DIAN ZI YAN JIU YUAN YOU XIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511303416.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-12
Publication Date
2025-12-19

AI Technical Summary

Technical Problem

Existing methods for detecting stalled motors in two-phase stepper motors suffer from high hardware costs, susceptibility to external factors, high false alarm rates, and failure at low speeds. In particular, they are difficult to accurately detect stalled motors when there are no sensors.

Method used

By sampling the two-phase current signals of the motor, the phase current phase offset and relative difference are calculated. The stall feedback value is then calculated using the formula StallDet=α·PhaseDiff+β·RelDiff to detect whether the motor is stalled.

Benefits of technology

It improves the accuracy and versatility of stall detection, reduces the impact of external factors and PWM noise, achieves high sensitivity and high accuracy stall detection, and requires no additional sensors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121164902A_ABST
    Figure CN121164902A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of motors, and provides a locked-rotor detection method and device for a two-phase stepping motor, and the method comprises the steps: carrying out the sampling of current signals SS1 and SS2 corresponding to the two-phase current of the motor; acquiring actual wave crest positions and reference wave crest positions of the SS1 and the SS2; calculating a phase current phase deviation degree according to the actual wave crest positions and the reference positions of the SS1 and the SS2; obtaining wave crest current values of the SS1 and the SS2, and calculating a phase current relative difference value; and calculating a locked-rotor feedback value according to the phase current phase deviation degree and the phase current relative difference value, and detecting whether the motor is locked or not. The phase current phase deviation degree and the phase current relative difference value of the motor are adopted to describe the phase current form difference, motor locked-rotor detection is carried out, the motor locked-rotor detection method is not prone to being affected by external factor changes and PWM noise interference, the detection sensitivity is high, precision is high, universality is high, an additional sensor is not needed, and low-cost and compact development of the motor is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electric machines, in particular to a stall detection method of a two-phase stepping motor and a stall detection device of a two-phase stepping motor. BACKGROUND

[0002] The two-phase stepping motor is widely used in open-loop control systems (such as automatic swing air outlet control of automobile air conditioner) due to its simple structure and convenient control. However, the two-phase stepping motor is prone to stall during operation due to mechanical jamming, sudden load change and other factors. After stall, the motor rotor cannot operate, and if the motor is continuously driven, the driving current will become large, which may cause system failure such as motor overheating and driver damage. Therefore, a stall detection method needs to be designed for the stepping motor, and the driver should stop driving the motor immediately after detecting the stall of the motor to avoid system failure.

[0003] At present, the stall detection scheme of the stepping motor mostly relies on sensors, such as mechanical feedback method, which monitors the rotor position through encoders, Hall sensors and other devices at all times. When the motor stalls, the rotor cannot operate, and the stall can be detected through the feedback state of these sensors. However, this scheme has the disadvantages of high hardware cost and increased mechanical installation complexity, which is not suitable for compact devices.

[0004] In order to save cost, there is also a sensorless stall detection method for the stepping motor. The commonly used sensorless stall detection methods for the stepping motor mainly include phase current size detection method and back electromotive force (BEMF) detection method. The former detects the stall by sampling the resistance of the motor phase current when it exceeds a certain threshold. However, this method is easily affected by external factors such as voltage and load, and is susceptible to voltage fluctuations, load changes and other factors. In addition, the threshold is difficult to set, which may lead to misjudgment. The latter detects the stall by using the proportional relationship between the BEMF generated by the motor during rotation and the speed. When the motor stalls, the BEMF amplitude tends to zero. However, this method has the problems of failure at low speed, signal interference by PWM (Pulse-Width Modulation) noise, poor universality due to threshold setting depending on motor parameters, and others. SUMMARY

[0005] In order to improve the accuracy and universality of the stall detection of the motor, the first object of the present application is to provide a stall detection method of a two-phase stepping motor.

[0006] The second object of the present application is to provide a stall detection device of a two-phase stepping motor.

[0007] The technical solutions adopted by the present application are as follows:

[0008] The first aspect embodiment of the present application provides a method for detecting the stall of a two-phase stepping motor, comprising the following steps: based on the rising edge of the stepping signal of the motor, sampling the first phase current signal SS1 and the second phase current signal SS2 corresponding to each sine wave period of the two-phase current of the motor; after sampling is completed in one sine wave period, obtaining the peak reference position of the first phase current signal SS1, the peak reference position of the second phase current signal SS2, the actual peak position of the first phase current signal SS1 and the actual peak position of the second phase current signal SS2 according to the stepping signal; calculating the phase current phase offset degree according to the actual peak position and the reference position of the first phase current signal SS1 and the second phase current signal SS2; obtaining the peak current value of the first phase current signal SS1 and the peak current value of the second phase current signal SS2; calculating the relative difference value of the phase current according to the peak current value of the first phase current signal SS1 and the second phase current signal SS2; calculating the stall feedback value according to the phase current phase offset degree and the relative difference value of the phase current; detecting whether the motor is stalled according to the stall feedback value.

[0009] The method for detecting the stall of the two-phase stepping motor provided in the above can have the following additional technical features:

[0010] According to one embodiment of the present application, detecting whether the motor is stalled according to the stall feedback value specifically comprises: if the stall feedback value is greater than a set threshold, determining that the motor is in the stall state.

[0011] According to one embodiment of the present application, the phase current phase offset degree is calculated according to the following formula: PhaseDiff=|X AN -X AN0 |+|X AP -X AP0 |+|X BP -X BP0 |+|X BN -X BN0 |; wherein, PhaseDiff is the phase current phase offset degree, X AN is the first actual peak position of the first phase current signal SS1, X AN0 is the first reference peak position of the first phase current signal SS1, X AP is the second actual peak position of the first phase current signal SS1, X AP0 is the second reference peak position of the first phase current signal SS1, X BP is the first actual peak position of the second phase current signal SS2, X BP0 is the first reference peak position of the second phase current signal SS2, X BN is the second actual peak position of the second phase current signal SS2, X BN0a second peak reference position of the second phase current signal SS2.

[0012] According to one embodiment of the present application, the phase current relative difference value is calculated according to the following formula: RelDiff = |I AP -I AN |+|I AP -I BP |+|I AP -I BN |+|I BP -I AN |+|I BP -I BN |+|I BN -I AN |; wherein RelDiff is the phase current relative difference value, I AN is a first peak current value of the first phase current signal SS1, I AP is a second peak current value of the first phase current signal SS1, I BP is a first peak current value of the second phase current signal SS2, I BN is a second peak current value of the second phase current signal SS2

[0013] According to one embodiment of the present application, the stall feedback value is calculated according to the following formula: StallDet = a · PhaseDiff + β · RelDiff; wherein StallDet is the stall feedback value, a is a first weight coefficient, β is a second weight coefficient, PhaseDiff is the phase current phase offset degree, and RelDiff is the phase current relative difference value.

[0014] The embodiment of the second aspect of the application provides a stall detection device of a two-phase stepping motor, comprising: a sampling module, which is used for sampling a first phase current signal SS1 and a second phase current signal SS2 corresponding to each sine wave period of two-phase currents of the motor based on a rising edge of a stepping signal of the motor; a first acquisition module, which is used for acquiring a peak reference position of the first phase current signal SS1, a peak reference position of the second phase current signal SS2, an actual peak position of the first phase current signal SS1 and an actual peak position of the second phase current signal SS2 according to the stepping signal after one sine wave period is sampled; a first calculation module, which is used for calculating a phase current phase offset degree according to the actual peak positions and the reference positions of the first phase current signal SS1 and the second phase current signal SS2; a second acquisition module, which is used for acquiring a peak current value of the first phase current signal SS1 and a peak current value of the second phase current signal SS2; a second calculation module, which is used for calculating a phase current relative difference value according to the peak current values of the first phase current signal SS1 and the second phase current signal SS2; a third calculation module, which is used for calculating a stall feedback value according to the phase current phase offset degree and the phase current relative difference value; and a detection module, which is used for detecting whether the motor is stalled according to the stall feedback value.

[0015] The stall detection device of the two-phase stepping motor provided in the above embodiment of the application can further have the following additional technical features.

[0016] According to one embodiment of the application, the detection module is specifically configured to determine that the motor is in a stall state if the stall feedback value is greater than a set threshold value.

[0017] According to one embodiment of the application, the first calculation module specifically calculates the phase current phase offset degree according to the following formula: PhaseDiff = |X AN -X AN0 |+|X AP -X AP0 |+|X BP -X BP0 |+|X BN -X BN0 |; wherein PhaseDiff is the phase current phase offset degree, X AN is the first actual peak position of the first phase current signal SS1, X AN0 is the first peak reference position of the first phase current signal SS1, X AP is the second actual peak position of the first phase current signal SS1, X AP0 is the second peak reference position of the first phase current signal SS1, X BPX is the first peak actual position of the second phase current signal SS2 BP0 X is the first peak reference position of the second phase current signal SS2 BN X is the second peak actual position of the second phase current signal SS2 BN0 X is the second peak reference position of the second phase current signal SS2.

[0018] According to one embodiment of the present application, the second calculation module specifically calculates the phase current relative difference value according to the following formula: RelDiff = |I AP -I AN |+|I AP -I BP |+|I AP -I BN |+|I BP -I AN |+|I BP -I BN |+|I BN -I AN |;wherein, RelDiff is the phase current relative difference value, I AN X is the first peak current value of the first phase current signal SS1 AP X is the second peak current value of the first phase current signal SS1 BP X is the first peak current value of the second phase current signal SS2 BN X is the second peak current value of the second phase current signal SS2

[0019] According to one embodiment of the present application, the third calculation module specifically calculates the stall feedback value according to the following formula: StallDet = α · PhaseDiff + β · RelDiff; wherein, StallDet is the stall feedback value, α is a first weight coefficient, β is a second weight coefficient, PhaseDiff is the phase current phase offset degree, and RelDiff is the phase current relative difference value.

[0020] Advantages of the present application:

[0021] The present application adopts the phase current phase offset degree and the phase current relative difference value of the motor to describe the difference in the phase current form, and detects the motor stall according to the difference in the phase current form, which is not easily affected by external factor changes and PWM noise interference, has high detection sensitivity and precision, is highly universal, and does not require an additional sensor, which is conducive to the low-cost and compact development of the motor. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 is a schematic diagram of the stepping signal and the phase current form of a two-phase stepping motor according to one embodiment of the present application;

[0023] Figure 2 is a schematic diagram of step signal, phase current pattern and phase current sample value of a motor at no load according to an embodiment of the present application;

[0024] Figure 3 is a schematic diagram of step signal, phase current pattern and phase current sample value of a motor at load according to an embodiment of the present application;

[0025] Figure 4 is a schematic diagram of step signal, phase current pattern and phase current sample value of a motor at stall according to an embodiment of the present application;

[0026] Figure 5 is a flow chart of a stall detection method of a two-phase stepping motor according to an embodiment of the present application;

[0027] Figure 6 is a schematic diagram of a stall detection method of a two-phase stepping motor according to a specific example of the present application;

[0028] Figure 7 is a block schematic diagram of a stall detection device of a two-phase stepping motor according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0030] The two-phase stepping motor system is composed of three modules: a master control chip, a two-phase stepping motor high-subdivision driving chip (referred to as a driving chip) and a two-phase stepping motor (referred to as a motor). The master control chip sends control signals including direction, enable and STEP (step signal) to the driving chip. The driving chip includes a logic control circuit, a pre-stage drive, two DMOS (Double-diffused Metal-Oxide Semiconductor) full bridges and other modules. The logic control circuit refers to an internal sine table according to the received control signals, adopts constant current drive to control the pre-stage drive to send two groups of PWM signals with changing duty cycles, and the current limiting value is controlled by a sampling resistor. The two groups of PWM signals control two DMOS full bridges respectively to generate sinusoidal wave currents with a phase difference of 90 degrees.

[0031] As Figure 1As shown, the two-phase sinusoidal current is 16 micro-step subdivision driving, every 64 step signals STEP corresponds to a period of the phase current sinusoidal wave, the first phase current and the second phase current correspond to the sinusoidal waves generated on the two phases of the motor, the phase difference is 90 degrees, respectively through the stator winding 1 and the stator winding 2 of the motor, drive the motor rotor to rotate, the higher the subdivision degree of the step, the closer the phase current to the sinusoidal wave, the smoother the motor rotor rotates, and the smaller the noise when the motor rotates. The logic control circuit sets a zero reset point, and when the rising edge of the STEP signal counts to the zero reset point, the counting is restarted, and a zero reset signal is generated and fed back to the master control chip, which is used for the master control chip to process the sampling data of each sinusoidal wave period. The current flowing through the two DMOS full bridges (i.e. the phase current flowing through the stator winding 1 and the stator winding 2 of the motor) is sampled by using a sampling resistor, and after voltage division, the signal is processed by a filter circuit, and finally a current sampling signal is generated and input to the master control chip for processing.

[0032] The two-phase current of the high-subdivision driving stepper motor is a sinusoidal wave with a phase difference of 90 degrees when the motor is running at no load, and when the stepper motor is loaded, the phase of the phase current sinusoidal wave will be negatively offset as the load increases; when the stepper motor produces a locked rotor, not only will the phase of the phase current sinusoidal wave be offset, but the amplitude will also oscillate. The present application utilizes these phenomena to detect the locked rotor of the two-phase stepper motor.

[0033] As shown in Figure 2 , when the step signal STEP is issued, the drive chip generates a phase current form as shown in Figure 2 , the first phase current and the second phase current with a phase difference of 90 degrees are used to drive the motor to run, Figure 1 , the horizontal axis represents time, and the vertical axis represents amplitude. Since the motor is running at no load at this time, the phase current of the motor is mainly used to overcome the impedance inside the motor and generate the necessary magnetic field, and since there is no additional load, the current waveform of the motor is relatively stable, and the phase of the current is roughly consistent with the phase of the control voltage (controlled by the STEP control signal). Again, regardless of the direction of the first phase current and the second phase current, the current direction between the DMOS full bridge and the ground is the same, resulting in the amplitude of the first phase current signal SS1 and the second phase current signal SS2 input to the master control chip after the filter circuit being the absolute value of the first phase current and the second phase current, as shown in Figure 2 "Phase current sampling value" in

[0034] As shown in Figure 3As shown, when the motor starts to load, similarly, after the step signal STEP is sent, the motor needs more current to provide the required torque, and the current amplitude will increase slightly, but the drive chip uses constant current drive, and will adjust the current to the set value; again, due to the rotor lag caused by the motor load, the actual electrical angle of the stator current will be ahead of the rotor position, and the current waveform is preset by the logic control circuit sine table of the drive chip, and the rotor lag will cause the effective magnetic field phase to be relatively ahead, which is reflected in the waveform. The phase of the phase current will appear the whole advance phenomenon relative to the phase of the control voltage (controlled by the STEP control signal). The phases of the first phase current signal SS1 and the second phase current signal SS2 input to the main control chip through the filtering circuit will also be advanced as a whole.

[0035] When the motor load continues to increase, causing the rotor to lag seriously, the phenomenon of out of step and even locked rotor will occur. If the motor is locked, the waveforms of the two-phase currents will be severely dithered. As shown in Figure 4 As shown, when locked, not only the phase of the two-phase current will be disturbed, but the amplitude will also be oscillated, and the phase current form will change greatly. The phases and amplitudes of the first phase current signal SS1 and the second phase current signal SS2 input to the main control chip will also change.

[0036] In view of the differences in the phase current forms of the motor under no load, load and locked rotor, the present application proposes a phase current phase offset degree and a phase current relative difference for describing these differences.

[0037] Figure 5 The flow chart of the locked rotor detection method of the two-phase stepper motor according to an embodiment of the present application is shown in Figure 5 As shown, the method comprises the following steps:

[0038] S1, based on the rising edge of the step signal of the motor, sampling the first phase current signal SS1 and the second phase current signal SS2 corresponding to each sine wave period of the two-phase current of the motor.

[0039] As shown in Figure 6As shown, for example, 16 micro-step subdivision, the rising edge of the stepping signal STEP every 64 corresponds to a phase current of a sine wave cycle, the starting position of the stepping signal STEP is determined by the zero return signal of the driving chip. The main control chip sends the stepping signal STEP to control the driving chip to start working, when the zero return signal of the driving chip is triggered, the main control chip marks the current rising edge of the stepping signal STEP as the zero return point 1, the STEP counter is set to 0, and then the next 63 STEP signals are sent to the driving chip, the STEP counter increases by 1..63, and the driving chip receives the rising edge of the 64 STEP signals, and outputs the first phase current and the second phase current with a phase difference of 90 degrees to drive the motor to run. After the filtering circuit, the main control chip obtains their sampling signals, the first phase current signal SS1 and the second phase current signal SS2. The main control chip continues to send the stepping signal STEP, and the driving chip will feedback the zero return signal again, at this time the main control chip will mark the zero return point 2, the STEP counter is set to 0 again, and the stepping signal STEP is output to control the driving chip to continue to output the sine wave phase current, and the STEP counter increases. Thus, the STEP counter from 0 to 63 is a cycle of a sine wave, and the STEP counter is 0 corresponding to each zero return point.

[0040] The present application samples the SS1 and SS2 signals between the adjacent two zero return points based on the rising edge of the stepping signal STEP to obtain the form of the phase current in a sine wave cycle. Each round of sampling of the SS1 and SS2 signals can obtain 64 sampling values, which are the absolute values of the two phase currents.

[0041] S2, after sampling in a sine wave cycle, the first phase current signal SS1 peak reference position, the second phase current signal SS2 peak reference position, the first phase current signal SS1 peak actual position and the second phase current signal SS2 peak actual position are obtained according to the stepping signal.

[0042] Specifically, as shown in the figure, Figure 6 In the sampling of a sine wave cycle of the phase current, the peaks of SS1 are AN and AP points, and the peaks of SS2 are BP and BN points. Here, AP corresponds to the maximum value of the first phase current in a sine wave cycle, AN corresponds to the minimum value of the first phase current in a sine wave cycle; BP corresponds to the maximum value of the second phase current in a sine wave cycle, and BN corresponds to the minimum value of the second phase current in a sine wave cycle. The sampling value is a positive number taking the absolute value.

[0043] For the stepper motor, the reference position calibration can be performed in advance, the motor is controlled to be in the normal operation with no load, the positions of BP, AN, BN and AP are calculated in sequence from the zero point 1, and they are marked as BP0, AN0, BN0 and AP0, the values of the corresponding STEP signal counters are respectively recorded as reference phase 1, reference phase 2, reference phase 3 and reference phase 4, and the four reference phases are in sequence the first wave peak reference position X BP0 of the second phase current signal SS2, the first wave peak reference position X AN0 of the first phase current signal SS1, the second wave peak reference position X BN0 of the second phase current signal SS2 and the second wave peak reference position X AP0 of the first phase current signal SS1, and the values of the stepper signals STEP counters of the four reference wave peak actual positions are recorded in sequence. After the reference position calibration is completed, the wave peak reference positions of the two phase currents can be obtained according to the values of the stepper signal STEP counters.

[0044] After one sine wave cycle is sampled, the main control chip continuously samples the SS1 and SS2 signals corresponding to each sine wave cycle of the first current and the second phase current based on the rising edge of the STEP signal, and finds two wave peaks from the 64 sampling values corresponding to the SS1 and SS2 signals respectively after one cycle is sampled, the two wave peak actual positions of SS1 are respectively recorded as X AN and X AP , and the two wave peak actual positions of SS2 are respectively recorded as X BP and X BN .

[0045] S3, the phase current phase shift is calculated according to the wave peak actual positions and the reference positions of the first phase current signal SS1 and the second phase current signal SS2.

[0046] In a specific embodiment of the present application, the phase current phase shift is calculated according to the following formula:

[0047] PhaseDiff = |X AN -X AN0 | + |X AP -X AP0 | + |X BP -X BP0 | + |X BN -X BN0 |;

[0048] Wherein, PhaseDiff is the phase current phase shift, X AN is the first wave peak actual position of the first phase current signal SS1, X AN0 is the first wave peak reference position of the first phase current signal SS1, XAP X is the actual position of the second peak of the first phase current signal SS1 AP0 X is the reference position of the second peak of the first phase current signal SS1 BP X is the actual position of the first peak of the second phase current signal SS2 BP0 X is the reference position of the first peak of the second phase current signal SS2 BN X is the actual position of the second peak of the second phase current signal SS2 BN0 X is the reference position of the second peak of the second phase current signal SS2

[0049] |X AN -X AN0 | is the phase difference 2 in Figure 6 |X AP -X AP0 | is the phase difference 4 in Figure 6 |X BP -X BP0 | is the phase difference 1 in Figure 6 |X BN -X BN0 | is the phase difference 3 in Figure 6

[0050] When the motor is loaded, the phase shift of the phase current increases with the increase of the load, but the change of the phase is often only between several steps, and the form of the phase current when the motor is blocked cannot be completely expressed. Therefore, another factor, the relative difference of the phase current, is introduced in the present application.

[0051] S4, the peak current value of the first phase current signal SS1 and the peak current value of the second phase current signal SS2 are obtained.

[0052] S5, the relative difference of the phase current is calculated according to the peak current values of the first phase current signal SS1 and the second phase current signal SS2.

[0053] Specifically, the phase shift of the phase current is compared with the calibrated reference phase, which can express the load condition of the motor to a certain extent, and the expression ability is general when the motor is blocked. Another expression factor of the form of the phase current, the relative difference of the phase current, is proposed in the present application, which is evaluated only in a sine wave in an arbitrary period.

[0054] In one embodiment of the present application, the relative difference of the phase current is calculated according to the following formula:

[0055] RelDiff = |I AP -I AN | + |I AP -I BP | + |I AP ​-I BN |+|I BP -I AN |+

[0056] |I BP -I BN |+|I BN -I AN |;

[0057] Wherein, RelDiff is the phase current relative difference, I AN is the first peak current value of the first phase current signal SS1, I AP is the second peak current value of the first phase current signal SS1, I BP is the first peak current value of the second phase current signal SS2, I BN is the second peak current value of the second phase current signal SS2.

[0058] The current values at BP, AN, BN and AP are obtained, which are I BP , I AN , I BN , I AP When the motor is in normal operation, the two-phase phase current sinusoidal waveform is regular and will not be distorted, at this time the current peak values collected on the two phases are theoretically equal, and the RelDiff value is theoretically 0. If the stall occurs, the two-phase current sinusoidal wave is distorted, the amplitudes of I BP , I AN , I BN , I AP are also different in size, resulting in a large RelDiff. The phase current relative difference can be used to better express the phase current form during the stall.

[0059] S6, the stall feedback value is calculated according to the phase current phase offset and the phase current relative difference.

[0060] In one embodiment of the application, the stall feedback value can be calculated according to the following formula:

[0061] StallDet=α·PhaseDiff+β·RelDiff;

[0062] Wherein, StallDet is the stall feedback value, α is the first weight coefficient, β is the second weight coefficient, PhaseDiff is the phase current phase offset, and RelDiff is the phase current relative difference. α and β can be set according to the relevant test, α+β=1, for example, α=0.5, β=0.5.

[0063] S7, whether the motor is stalled is detected according to the stall feedback value.

[0064] In a specific embodiment of the present application, whether the motor is stalled is detected according to the stall feedback value, specifically comprising: if the stall feedback value is greater than a set threshold value, it is determined that the motor is in a stalled state.

[0065] The threshold value is set in advance for each speed gear of the motor, and the stall feedback value Stalldet is usually very small (close to 0, and generally not more than 15 in actual measurement) when the motor is running normally, and the stall threshold value can be set between 40-60, which is obtained in advance through related tests according to the actual situation of the motor.

[0066] The main control chip judges whether the stall feedback value exceeds the pre-set threshold value, if not, the motor is in normal operation, waits for the zero-crossing signal to clear the step count, and continues to sample and record SS1 and SS2 for a sine wave period, and calculates the stall feedback value; if the stall feedback value exceeds the threshold value, the motor state is set to stall, and the main control chip stops sending the control signal and stops driving the motor.

[0067] In summary, the stall detection method of the two-phase stepper motor in the embodiment of the present application uses the phase current phase offset degree and the phase current relative difference of the motor to describe the difference in the phase current form, and detects the motor stall according to the difference in the phase current form, which can sensitively detect the stall of the high-subdivision-driven stepper motor system, is not easily affected by external factor changes and PWM noise interference, has high detection sensitivity, high precision, strong universality, and does not require additional sensors, which is conducive to the low-cost and compact development of the motor.

[0068] Corresponding to the above-mentioned stall detection method of the two-phase stepper motor, the present application also proposes a stall detection device of a two-phase stepper motor. Since the device embodiment of the present application corresponds to the above-mentioned method embodiment, the details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, which will not be described in detail herein.

[0069] Figure 7 is a block schematic diagram of the stall detection device of the two-phase stepper motor according to an embodiment of the present application, as shown in Figure 7 The stall detection device comprises a sampling module 10, a first acquisition module 20, a first calculation module 30, a second acquisition module 40, a second calculation module 50, a third calculation module 60 and a detection module 70.

[0070] The sampling module 10 is configured to sample the first phase current signal SS1 and the second phase current signal SS2 corresponding to each sine wave period of the two-phase current of the motor based on a rising edge of a stepping signal of the motor; the first acquisition module 20 is configured to acquire a peak reference position of the first phase current signal SS1, a peak reference position of the second phase current signal SS2, an actual peak position of the first phase current signal SS1 and an actual peak position of the second phase current signal SS2 according to the stepping signal after sampling in one sine wave period; the first calculation module 30 is configured to calculate a phase current phase shift degree according to the actual peak positions and the reference positions of the first phase current signal SS1 and the second phase current signal SS2; the second acquisition module 40 is configured to acquire a peak current value of the first phase current signal SS1 and a peak current value of the second phase current signal SS2; the second calculation module 50 is configured to calculate a relative difference value of the phase current according to the peak current values of the first phase current signal SS1 and the second phase current signal SS2; the third calculation module 60 is configured to calculate a stall feedback value according to the phase current phase shift degree and the relative difference value of the phase current; and the detection module 70 is configured to detect whether the motor is stalled according to the stall feedback value.

[0071] According to an embodiment of the present application, the detection module 70 is specifically configured to determine that the motor is in a stalled state if the stall feedback value is greater than a set threshold.

[0072] According to an embodiment of the present application, the first calculation module 30 specifically calculates the phase current phase shift degree according to the following formula: PhaseDiff = |X AN -X AN0 |+|X AP -X AP0 |+|X BP -X BP0 |+|X BN -X BN0 |; wherein, PhaseDiff is the phase current phase shift degree, X AN is the first actual peak position of the first phase current signal SS1, X AN0 is the first peak reference position of the first phase current signal SS1, X AP is the second actual peak position of the first phase current signal SS1, X AP0 is the second peak reference position of the first phase current signal SS1, X BP is the first actual peak position of the second phase current signal SS2, X BP0 is the first peak reference position of the second phase current signal SS2, X BN is the second actual peak position of the second phase current signal SS2, and X BN0 is the second peak reference position of the second phase current signal SS2.

[0073] According to one embodiment of the present application, the second calculating module 50 specifically calculates the phase current relative difference value according to the following formula: RelDiff = |I AP -I AN |+|I AP -I BP |+|I AP -I BN |+|I BP -I AN |+|I BP -I BN |+|I BN -I AN |;wherein, RelDiff is the phase current relative difference value, I AN is the first peak current value of the first phase current signal SS1, I AP is the second peak current value of the first phase current signal SS1, I BP is the first peak current value of the second phase current signal SS2, I BN is the second peak current value of the second phase current signal SS2.

[0074] According to one embodiment of the present application, the third calculating module 60 specifically calculates the stall feedback value according to the following formula: StallDet = a · PhaseDiff + b · RelDiff; wherein, StallDet is the stall feedback value, a is the first weight coefficient, b is the second weight coefficient, PhaseDiff is the phase current phase offset degree, and RelDiff is the phase current relative difference value.

[0075] In summary, according to the stall detection device of the two-phase stepping motor of the embodiment of the present application, the phase current phase offset degree and the phase current relative difference value of the motor are used to describe the difference in the phase current form, the motor stall detection is performed according to the difference in the phase current form, the high-subdivision-driven stepping motor system can be sensitively detected, the detection is not easily affected by external factor changes and PWM noise interference, the detection sensitivity is high, the precision is high, the universality is strong, and no additional sensor is needed, which is conducive to the low-cost and compact development of the motor.

[0076] In the description of the present application, the terms “first” and “second” are only used for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with “first” and “second” can explicitly or implicitly include one or more of the features. The meaning of “a plurality of” is two or more, unless otherwise specifically limited.

[0077] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the description of the specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the specification and the features of the different embodiments or examples, without contradiction. In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the description of the specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the specification and the features of the different embodiments or examples, without contradiction.

[0078] Any process or method descriptions or descriptions of the flow diagrams in the flow charts described herein, or otherwise described in this specification, can be understood as representing the steps of a method or process, including one or more steps for implementing custom logic functions or processes, and the scope of the preferred embodiments of the present application includes additional implementation in which the steps are performed in a different order, including an order that is substantially simultaneous, or in reverse order, depending on the functionality involved, as will be understood by those skilled in the art.

[0079] The logic and / or steps represented in flow diagrams or otherwise described herein, for example, can be considered as a sequence of instructions to implement logic functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or device, such as a computer-based system, processor- containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. In the context of this specification, a "computer-readable medium" can be any means that can contain, store, communicate, propagate or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be a machine-readable storage device (e.g., magnetic, optical or other) a machine-readable storage diskette (e.g., floppy disk, optical disk, CD- ROM, etc.), a machine- readable storage card (e.g., PCMCIA card, etc.), a machine-readable storage tape (e.g., magnetic tape, optical tape, etc.), a machine-readable storage medium (e.g., RAM, ROM, etc.), a machine-readable signal (e.g., electrical, optical, etc.), a machine-readable medium (e.g., carrier wave, etc.) or any other suitable medium or means of embodying the program. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection having one or more wires (e.g., a bus that has thin film resistors for

[0080] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the embodiments described above, various steps or methods can be implemented, in part, or in whole, in software / firmware that is stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following techniques, which are well known in the art of hardware implementation, can be used: a discrete logic circuit having logic gates for implementing logic functions upon data signals, an application specific integrated circuit having appropriate combinational logic gates, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0081] Those of skill in the art would understand that information and signals can be represented using any of a variety of technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that can be referenced throughout the above description can be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.

[0082] In addition, each function unit in each embodiment of the present application can be integrated in one processing module, or each unit can exist physically independently, or two or more units can be integrated in one module. The integrated module can be realized in the form of hardware, or in the form of software function module. When the integrated module is realized in the form of software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium.

[0083] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.

[0084] Although the embodiments of the present application have been shown and described above, it should be understood that those skilled in the art can make various changes, modifications, replacements and variations to these embodiments without departing from the principles and spirits of the present application, and the scope of the present application is defined by the appended claims and their equivalents.

Claims

1. A method of detecting a stall of a two-phase stepper motor, the method comprising: The method comprises the following steps: sampling first phase current signal SS1 and second phase current signal SS2 corresponding to each sine wave period of two-phase current of the motor based on rising edge of stepping signal of the motor; acquiring peak reference position of first phase current signal SS1, peak reference position of second phase current signal SS2, actual peak position of first phase current signal SS1 and actual peak position of second phase current signal SS2 according to the stepping signal after sampling of one sine wave period is completed; calculating phase current phase shift degree according to actual peak position and reference position of first phase current signal SS1 and second phase current signal SS2; acquiring peak current value of first phase current signal SS1 and peak current value of second phase current signal SS2; calculating relative difference value of phase current according to peak current value of first phase current signal SS1 and second phase current signal SS2; calculating stall feedback value according to phase current phase shift degree and relative difference value of phase current; detecting whether the motor is stalled according to the stall feedback value.

2. The stall detection method of a two-phase stepper motor as set forth in claim 1, wherein The method for detecting whether the motor is stalled according to the stall feedback value specifically comprises: if the stall feedback value is greater than a set threshold value, it is determined that the motor is in a stalled state.

3. The stall detection method of a two-phase stepper motor as set forth in claim 1, wherein, The phase current phase shift degree is calculated according to the following formula: PhaseDiff = |X AN -X AN0 |+|X AP -X AP0 |+|X BP -X BP0 |+|X BN -X BN0 | wherein PhaseDiff is the phase current phase offset degree, X AN is a first wave peak actual position of the first phase current signal SS1, X AN0 is a first wave peak reference position of the first phase current signal SS1, X AP is a second wave peak actual position of the first phase current signal SS1, X AP0 is a second wave peak reference position of the first phase current signal SS1, X BP is a first wave peak actual position of the second phase current signal SS2, X BP0 is a first wave peak reference position of the second phase current signal SS2, X BN is a second wave peak actual position of the second phase current signal SS2, X BN0 is a second wave peak reference position of the second phase current signal SS2.

4. The stall detection method of a two-phase stepper motor as set forth in claim 1, wherein, The relative difference value of phase current is calculated according to the following formula: RelDiff = | I AP - I AN | + | I AP - I BP | + | I AP - I BN | + | I BP - I AN | + |I BP -I BN |+|I BN -I AN |; wherein RelDiff is the relative difference of the phase current, I AN is a first peak current value of the first phase current signal SS1, I AP is a second peak current value of the first phase current signal SS1, I BP is a first peak current value of the second phase current signal SS2, I BN is a second peak current value of the second phase current signal SS2.

5. The method of stall detection of a two-phase stepper motor as defined in claim 1, wherein, The stall feedback value is calculated according to the following formula: StallDet = α · PhaseDiff + β · RelDiff; wherein, StallDet is the stall feedback value, α is a first weight coefficient, β is a second weight coefficient, PhaseDiff is the phase current phase shift degree, and RelDiff is the relative difference value of phase current.

6. A stall detection device for a two-phase stepper motor, characterized by The method comprises: a sampling module, which is used for sampling first phase current signal SS1 and second phase current signal SS2 corresponding to each sine wave period of two-phase current of the motor based on rising edge of stepping signal of the motor; a first acquiring module, which is used for acquiring peak reference position of first phase current signal SS1, peak reference position of second phase current signal SS2, actual peak position of first phase current signal SS1 and actual peak position of second phase current signal SS2 according to the stepping signal after sampling of one sine wave period is completed; a first calculating module, which is used for calculating phase current phase shift degree according to actual peak position and reference position of first phase current signal SS1 and second phase current signal SS2; a second acquiring module, which is used for acquiring peak current value of first phase current signal SS1 and peak current value of second phase current signal SS2; a second calculating module, which is used for calculating relative difference value of phase current according to peak current value of first phase current signal SS1 and second phase current signal SS2; a third calculating module, which is used for calculating stall feedback value according to phase current phase shift degree and relative difference value of phase current; a detecting module, which is used for detecting whether the motor is stalled according to the stall feedback value.

7. The stall detection device of a two-phase stepper motor according to claim 6, characterized by The detecting module is specifically used for: If the stall feedback value is greater than a set threshold, it is determined that the motor is in a stall state.

8. The stall detection device of a two-phase stepper motor according to claim 6, wherein The first calculation module specifically calculates the phase current phase offset degree according to the following formula: PhaseDiff = |X AN -X AN0 |+|X AP -X AP0 |+|X BP -X BP0 |+|X BN -X BN0 | wherein PhaseDiff is the phase current phase offset degree, X AN is a first wave peak actual position of the first phase current signal SS1, X AN0 is a first wave peak reference position of the first phase current signal SS1, X AP is a second wave peak actual position of the first phase current signal SS1, X AP0 is a second wave peak reference position of the first phase current signal SS1, X BP is a first wave peak actual position of the second phase current signal SS2, X BP0 is a first wave peak reference position of the second phase current signal SS2, X BN is a second wave peak actual position of the second phase current signal SS2, X BN0 is a second wave peak reference position of the second phase current signal SS2.

9. The stall detection device for a two-phase stepper motor as set forth in claim 6, wherein The second calculation module specifically calculates the phase current relative difference value according to the following formula: RelDiff=|I AP -I AN |+|I AP -I BP |+|I AP -I BN |+|I BP -I AN |+ |I BP -I BN |+|I BN -I AN |; wherein RelDiff is the relative difference of the phase current, I AN is a first peak current value of the first phase current signal SS1, I AP is a second peak current value of the first phase current signal SS1, I BP is a first peak current value of the second phase current signal SS2, I BN is a second peak current value of the second phase current signal SS2.

10. The stall detection device for a two-phase stepper motor as set forth in claim 6, wherein The third calculation module specifically calculates the stall feedback value according to the following formula: StallDet = a PhaseDiff + β RelDiff; Wherein, StallDet is the stall feedback value, a is a first weight coefficient, β is a second weight coefficient, PhaseDiff is the phase current phase offset degree, and RelDiff is the phase current relative difference value.