Motor operation detection method and device, computer device and motor control device
By converting the rotor coil current of the stepper motor into a comparison voltage and comparing it with a reference voltage, the problem of insufficient detection accuracy of stepper motors is solved, realizing efficient and low-cost detection of step loss and stall, and ensuring safe operation of the motor.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN ALLIED CONTROL SYSTEM CO LTD
- Filing Date
- 2022-07-07
- Publication Date
- 2026-04-10
AI Technical Summary
In the existing technology, when stepper motors are detecting whether they have lost steps or stalled, the use of photoelectric encoders and limit switches is costly and the detection results are easily affected by interference, resulting in insufficient detection accuracy and inability to deal with stalled situations in a timely manner, which may lead to motor damage.
By acquiring the current in the rotor coil of the stepper motor when it is running at full step, converting it into a comparison voltage, and comparing it with a reference voltage, the out-of-step detection level signal is determined. The operating status of the motor is determined by using a voltage comparator and the main control chip. No additional measuring equipment is required, which reduces costs and improves detection accuracy.
It enables efficient and accurate detection of the stepper motor's operating status without the aid of other measuring equipment, timely identification of step loss and stall, prevention of motor damage, and improvement of the accuracy and safety of the detection results.
Smart Images

Figure CN115085604B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of motor detection, in particular to a motor operation detection method and device, computer equipment and motor control device. BACKGROUND
[0002] A stepper motor is an electric motor that converts electric pulses into angular or linear displacement. Each input pulse causes the rotor to rotate by a fixed angle or move by a fixed distance. Stepper motors are often used in precision applications, cost-sensitive applications, and low-torque applications because of their simple and easy-to-use control characteristics.
[0003] During the use of a stepper motor, if an obstacle is encountered during rotation or internal components are aged, the stepper motor is prone to stalling or losing steps. At this time, if the stepper motor controller cannot accurately detect the stall information and take appropriate measures, the entire stepper motor operation system will be abnormal, and in severe cases, the stepper motor will be damaged.
[0004] Traditional methods for detecting whether a stepper motor is out of step or stalled usually use an optical encoder to measure rotor speed and a travel switch as a trigger signal to complete a certain travel to control the travel of the stepper motor. However, optical encoders and travel switches have strict requirements on the structure, and the longer they are used, the more likely they are to produce structural deviation. The use cost is high, and the accuracy of the detection result is easily disturbed. SUMMARY
[0005] Therefore, it is necessary to provide a motor operation detection method, device, computer equipment and motor control device capable of improving the accuracy of detecting the operation of a stepper motor.
[0006] In a first aspect, the present application provides a motor operation detection method, which comprises:
[0007] obtaining a current time step loss detection level signal obtained by comparing a comparison voltage of a rotor coil of a stepper motor during full-step drive operation with a reference voltage; wherein the comparison voltage of the rotor coil is obtained by converting a current of the rotor coil of the stepper motor during full-step drive operation; the reference voltage is less than a first peak voltage corresponding to a first peak current of the rotor coil at a normal running speed during the full-step drive period, and greater than a second peak voltage corresponding to a second peak current of the rotor coil at an abnormal running speed during the full-step drive period;
[0008] If no high-level signal is detected in the step loss detection level signal at each time during the full-step drive period, it is determined that the stepper motor is out of step during the full-step drive period.
[0009] In one of the embodiments, if no high level signal is detected in the step-out detection level signal at each time point in the full step driving period, it is determined that the stepper motor is out of step in the full step driving period, including:
[0010] According to the step-out detection level signal at each time point in the full step driving period, a corresponding waveform diagram is obtained;
[0011] If no rectangular wave is detected in the waveform diagram in the full step driving period, it is determined that the stepper motor is out of step in the full step driving period.
[0012] In one of the embodiments, the method further includes:
[0013] If the stepper motor is out of step in a plurality of consecutive full step driving periods, it is determined that the stepper motor is stalled.
[0014] In one of the embodiments, the method further includes:
[0015] Obtaining running data of the stepper motor, and determining a reference voltage according to the running data.
[0016] In one of the embodiments, the obtaining of the running data of the stepper motor and the determination of the reference voltage according to the running data include:
[0017] Obtaining a preset mapping table, which records a mapping relationship between the running data and the reference voltage;
[0018] Obtaining running data of the stepper motor, searching the preset mapping table, and determining a corresponding reference voltage; the running data includes at least one of a use duration, a driving voltage, and a driving load of the stepper motor.
[0019] In one of the embodiments, after the determination of the stepper motor being out of step, the method further includes:
[0020] Generating a compensation driving signal, and driving the rotor coil to rotate additionally for one full step driving period according to the compensation driving signal.
[0021] In one of the embodiments, after the determination of the stepper motor being stalled, the method further includes:
[0022] Generating a reverse driving signal, and driving the rotor coil to rotate reversely according to the reverse driving signal;
[0023] Obtaining a reverse step-out detection level signal detected in a reverse driving period;
[0024] If no high level signal is detected in a plurality of consecutive reverse driving periods, it is determined that the stepper motor is bidirectional stalled.
[0025] In a second aspect, the present application further provides a motor operation detection device, which comprises:
[0026] a signal acquisition module, configured to acquire a current time step-out detection level signal obtained by comparing a voltage of a rotor coil of a stepper motor in full-step driving operation with a reference voltage; wherein the voltage of the rotor coil is obtained by converting a current of the rotor coil of the stepper motor in full-step driving operation; and the reference voltage is less than a comparison voltage of a peak current of the rotor coil in full-step driving period;
[0027] a step-out analysis module, configured to determine that the stepper motor is out of step in the full-step driving period if no high level signal is detected in the step-out detection level signal at each time in the full-step driving period.
[0028] In a third aspect, the present application further provides a motor control device, which comprises a current detection circuit, a voltage conversion circuit, a voltage comparator and a master control chip; an input end of the current detection circuit is connected with a rotor coil of a stepper motor, an output end of the current detection circuit is connected with an input end of the voltage conversion circuit, an output end of the voltage conversion circuit is connected with a non-inverting input end of the voltage comparator, an inverting input end of the voltage comparator is connected with a reference voltage, and an output end of the voltage comparator is connected with the master control chip.
[0029] The current detection circuit collects a current of the rotor coil of the stepper motor in full-step driving operation, the voltage conversion circuit converts the current of the rotor coil into a comparison voltage of the rotor coil, the voltage comparator outputs a current time step-out detection level signal according to a comparison result of the comparison voltage of the rotor coil and the reference voltage, and the master control chip is configured to acquire the step-out detection level signal and determine that the stepper motor is out of step in the full-step driving period if no high level signal is detected in the step-out detection level signal at each time in the full-step driving period.
[0030] In a fourth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements steps of the above method when executing the computer program.
[0031] In a fifth aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program implements steps of the above method when executed by a processor.
[0032] The motor operation detection method, device, computer device and motor control device, according to the different periodic current change patterns of the rotor coil when the stepper motor is in normal operation and abnormal operation under full-step driving, the peak current of the rotor coil in the full-step driving period when the rotor is in normal operation is higher than the peak current when the rotor is in abnormal operation, the current of the rotor coil is converted into a comparison voltage, a first peak voltage corresponding to the peak current of the rotor coil in the full-step driving period when the rotor is in normal operation is set, and a value greater than a second peak voltage corresponding to the peak current of the rotor coil in the full-step driving period when the rotor is in abnormal operation is set as a reference voltage, and the running state of the stepper motor is determined according to the step-out detection level signal obtained by comparing the voltage of the rotor coil and the reference voltage when the stepper motor is in full-step driving. If no high-level signal is detected in the step-out detection level signal at each moment in the full-step driving period, it indicates that the peak current of the rotor coil in the full-step driving period is small, and the rotor is not rotating normally, that is, the stepper motor is out of step in the full-step driving period. The running state of the stepper motor is determined by the different patterns of the current flowing through the rotor coil in different running states, the whole detection process does not need to rely on other measuring devices, the use cost of the stepper motor operation detection is reduced, and the accuracy of the stepper operation detection result is improved. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 A structural block diagram of the motor control device in one embodiment;
[0034] Figure 2 A structural schematic diagram of the voltage conversion circuit in one embodiment;
[0035] Figure 3 A structural schematic diagram of the motor control device in one embodiment;
[0036] Figure 4 A flowchart of the motor operation detection method in one embodiment;
[0037] Figure 5 A current pattern diagram of the rotor coil when the rotor is in normal speed operation and abnormal speed operation under full-step driving in one embodiment;
[0038] Figure 6 A waveform diagram when the rotor is in normal speed operation under full-step driving in one embodiment;
[0039] Figure 7 A waveform diagram when the rotor is in abnormal speed operation under full-step driving in one embodiment;
[0040] Figure 8 A flowchart of the motor operation detection method in another embodiment;
[0041] Figure 9Flowchart of motor operation detection method in another embodiment;
[0042] Figure 10 Flowchart of motor operation detection method in another embodiment;
[0043] Figure 11 Flowchart of motor operation detection method in another embodiment;
[0044] Figure 12 Flowchart of motor operation detection method in another embodiment;
[0045] Figure 13 Flowchart of motor operation detection method in another embodiment; DETAILED DESCRIPTION
[0046] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0047] A stepper motor is a stepper motor that converts an electrical pulse signal into an angular displacement or linear displacement. By controlling the electrical pulse sequence, frequency and number applied to the motor coil, the rotation direction, speed and rotation angle of the stepper motor can be controlled. With a linear motion actuator or a gear box device, more complex and precise linear motion control requirements can be achieved. A stepper motor generally consists of front and rear end covers, bearings, a center shaft, a rotor core, a stator core, a stator assembly, a corrugated gasket, screws, etc. It uses electromagnetic principles to convert electrical energy into mechanical energy and is driven by a coil wound around the stator teeth. Under normal circumstances, a coil of wire is called a solenoid, and in a motor, the wire wound around the stator teeth is called a winding, rotor coil, or phase.
[0048] When the stepper motor is running, the rotor coil of the stepper motor is controlled to be forward or reverse energized according to the control pulse signal and direction signal sent by the controller, so as to drive the motor to rotate forward or reverse. According to the different step distances of a cycle of the stepper motor, the driving mode of the stepper motor can be divided into full-step driving, half-step driving and micro-step driving.
[0049] The motor operation detection method provided by the embodiments of the present application can be applied to the motor operation detection device 100 as shown in Figure 1
[0050] As shown in Figure 1 As shown, the motor control device includes: a current detection circuit 101, a voltage conversion circuit 102, a voltage comparator 103 and a master control chip 104. The input end of the current detection circuit 101 is connected with the rotor coil 1051 of the stepper motor 105, and the output end is connected with the voltage processing circuit 103. The output end of the voltage conversion circuit 102 is connected with the non-inverting input terminal of the voltage comparator 103, the inverting input terminal of the voltage comparator 103 is connected with a reference voltage, and the output end of the voltage comparator 103 is connected with the master control chip 104.
[0051] The current detection circuit 101 is a detection module that can collect the current flowing through the rotor coil 1051 in real time. Specifically, when full-step driving, the current flowing through the rotor coil is generated according to the control pulse signal and the direction signal, and a magnetic field energy is generated through the electric energy, so that the rotor of the stepper motor 105 rotates to drive the stepper motor 105 to run one step. The input end of the current detection circuit 101 is connected with the current output end of the rotor coil 1051, and the current flowing through the rotor coil 1051 is collected. Only two-phase stepper motor is taken as an example for description, and the rotor coil is two. However, the actual number of rotor coils in the stepper motor can be set and changed according to the type of the stepper motor. The voltage processing circuit 103 is used to convert the current of the rotor coil 1051 into the voltage of the rotor coil 1051.
[0052] In one embodiment, the voltage conversion circuit 102 includes a current sensing resistor R2 and a voltage amplification circuit. Specifically, the internal structure diagram of the voltage conversion circuit 102 is as shown in Figure 2 The input end of the current sensing resistor R2 is connected with the current output end of the rotor coil 1051 (not shown in the figure), the output end of the current sensing resistor R2 is connected with the differential input resistor R1 in the voltage amplification circuit and the input end of the voltage linear amplification circuit 1034 respectively, the output end of the differential input resistor R1 is connected with the operational amplifier biasing circuit 1033 and the first low-pass filter capacitor C3 respectively, and the voltage linear amplification circuit 1034 is composed of the operational amplifier UIA and the first amplification resistor R4 and the second amplification resistor R8, and the output end of the voltage linear amplification circuit 1034 is further connected with the second low-pass filter capacitor C2.
[0053] Specifically, the current sensing resistor R2 is used to receive the current flowing out of the current output end of the rotor coil 1051, and the current flowing through the rotor coil 1051 is converted into voltage according to Ohm's law, and the voltage is input into the differential input resistor R1 and the voltage linear amplification circuit 1034.
[0054] The differential input resistor R1 and the operational amplifier biasing circuit 1033 are used to provide appropriate bias current for the amplification stage and determine the static working point of each stage.
[0055] The voltage linear amplification circuit 1034 is configured to amplify the converted voltage, and perform low-pass filtering on the amplified voltage through the first filter capacitor C3 and the second filter capacitor C2 with smaller values, so as to filter out the noise generated during the operation of the motor, and make the voltage variation law more accurate.
[0056] Specifically, the voltage conversion circuit 102 is configured to perform voltage conversion and voltage amplification on the current flowing through the rotor coil 1051, and output the comparison voltage corresponding to the rotor coil 1051.
[0057] The voltage comparator 103 is connected to the output end of the voltage conversion circuit 102 at the non-inverting input terminal, and the reference voltage is input to the inverting input terminal of the voltage comparator 103. The output end of the voltage comparator 103 is connected to the main control chip 104. The voltage comparator 103 compares the comparison voltage of the rotor coil 1051 with the reference voltage, and outputs the out-of-step detection level signal at the current time.
[0058] Specifically, the voltage comparator 103 is a circuit for discriminating and comparing input signals. By comparing the magnitudes of two input voltages, the voltage comparator 103 outputs a high-level or low-level signal to indicate the magnitude relationship between the two input voltages. It can be understood that the voltage comparator 103 includes but is not limited to a single-limit comparator, a hysteresis comparator, a window comparator, and a three-state voltage comparator.
[0059] Specifically, the non-inverting input terminal of the voltage comparator 103 is connected to the output end of the voltage conversion circuit 102. The voltage conversion circuit 102 converts the current of the rotor coil 1051 into the comparison voltage of the rotor coil 1051, and inputs the voltage to the voltage comparator 103 through the non-inverting input terminal of the voltage comparator 103. The inverting input terminal of the voltage comparator 103 is connected to the main control chip 104, and receives the reference voltage sent by the main control chip 104.
[0060] The voltage comparator 103 compares the received comparison voltage of the rotor coil 1051 with the reference voltage, obtains the out-of-step detection level signal at the current time, and inputs the out-of-step detection level signal to the main control chip 104 through the output end.
[0061] The main control chip 104 is configured to detect the operation of the motor according to the out-of-step detection level signal, such as judging whether the stepper motor is out of step, locked-rotor, or the like according to the out-of-step detection level signal.
[0062] In one embodiment, as shown in FIG. 1, Figure 3 a complete motor control device is provided, which includes a main control chip 301, a stepper motor driving circuit 302, a stepper motor 303, a voltage conversion circuit 304, and a voltage comparator 305.
[0063] The main control chip 301 comprises a first output end 3011, a second output end 3012, a third output end 3013 and a first input end 3014. Specifically, the first output end 3011 is connected with the first input end 3021 of the step motor driving circuit 302, for outputting a step motor driving pulse signal. The second output end 3012 is connected with the second input end 3021 of the step motor driving circuit 302, for outputting a step motor driving direction signal. The third output end 3013 is connected with the inverting end 3051 of the voltage comparator 305, for outputting a reference voltage. The first input end 3011 is connected with the output end of the voltage comparator 305, for receiving a step-loss detection level signal.
[0064] Specifically, the main control chip 301 generates a driving pulse signal and a driving direction signal, inputs the driving pulse signal into the step motor driving circuit 302 through the first output end 3011, and inputs the driving direction signal into the step motor driving circuit 302 through the second output end 3012. The main control chip 301 acquires a reference voltage at the current time according to the running data of the step motor, inputs the reference voltage into the voltage comparator 305 through the third output end 3013, and receives the step-loss detection level signal fed back by the voltage comparator 305 through the first input end 3011.
[0065] The step motor driving circuit 302 comprises a first input end 3021, a second input end 3022, a first output end 3023 and a second output end 3024. Specifically, the first input end 3021 and the second input end 3022 are connected with the first output end 3011 and the second output end 3012 of the main control chip 301 respectively, for receiving the driving pulse signal and the driving direction signal transmitted by the main control chip 301. The first output end 3023 and the second output end 3024 are connected with the first rotor coil input end 3031 and the second rotor coil input end 3032 of the step motor 303 respectively, for inputting the generated phase current into the rotor coil of the step motor.
[0066] The step motor 303 comprises a first rotor coil input end 3031, a second rotor coil input end 3032, a first rotor coil output end 3033, a rotor 3034 and a driving object 3035.
[0067] Specifically, the first rotor coil input end 3031 and the second rotor coil input end 3032 of the stepper motor 303 are connected with the first output end 3023 and the second output end 3024 of the stepper motor driving circuit 302 respectively, for receiving the phase current input by the stepper motor driving circuit 302. The first rotor coil output end 3033 is connected with the first input end 3041 of the voltage conversion circuit 304, which can be understood as the input end of the current sensing resistor. The current flowing through the first rotor coil of the stepper motor is input to the voltage conversion circuit 304. The rotor 3034 of the stepper motor 303 is connected with the driving object 3035 through torque. When the rotor rotates, the driving object 3035 is driven to rotate, so that the driving object runs to the preset opening / closing degree position.
[0068] The specific structure of the voltage conversion circuit 304 has been described in the above embodiment, and will not be described again here. The output end 3042 of the voltage conversion circuit 304 is connected with the input end 3051 of the voltage comparator 305, for transmitting the converted voltage of the first rotor coil to the voltage comparator 305.
[0069] The voltage comparator 305 includes the inverting terminal 3051, the non-inverting terminal 3052 and the input terminal 3053. Specifically, the inverting terminal 3051 is connected with the third output end 3013 of the master control chip, for receiving the reference voltage. The non-inverting terminal 3052 is connected with the first input end 3014 of the master control chip, for inputting the detected step-out detection level signal to the master control chip. The input terminal 3053 is connected with the voltage conversion circuit 304, for receiving the converted voltage corresponding to the first rotor coil input by the voltage conversion circuit.
[0070] In one embodiment, as shown in Figure 4 , a motor running detection method is provided. The method is applied to the master control chip in Figure 1 for example, and includes the following steps.
[0071] In step 402, a step-out detection level signal of the stepper motor at the current time is obtained by comparing the comparison voltage of the rotor coil of the stepper motor in full-step driving operation with the reference voltage. The comparison voltage of the rotor coil is obtained by converting the current of the rotor coil of the stepper motor in full-step driving operation. The reference voltage is less than the first peak voltage corresponding to the first peak current of the rotor coil at the normal running speed of the rotor in the full-step driving period, and greater than the second peak voltage corresponding to the second peak current of the rotor coil at the non-normal running speed of the rotor in the full-step driving period.
[0072] Specifically, stepper motors have three driving modes: full-step drive, half-step drive, and micro-step drive. Among them, full-step drive refers to the driving mode in which a single pulse signal drives the stepper motor to rotate one step within one full-step cycle.
[0073] The pulse signal is an electrical signal whose voltage repeatedly changes between ON and OFF. When the rotor coil is driven at full step under the control of the pulse signal, the current flowing through the rotor coil changes periodically. Specifically, when the current flows through the coil, it generates a corresponding magnetic field, causing the rotor to rotate under the action of magnetic force. The change in magnetic field caused by the rotation will again affect the change in the rotor coil current. Therefore, the rotor coil current collected when the rotor is rotating has a different change pattern than the rotor coil current collected when the rotor is not rotating.
[0074] like Figure 5 As shown, Figure 5 This diagram shows the current trends in the rotor coils when the rotor is driven at full speed and when it is driven at abnormal speeds. When the rotor rotates at normal speed... Figure 5 (The current change pattern on the left) Due to the influence of rotor rotation on rotor coil current, the current of the rotor coil collected shows a slope upward trend, eventually reaching the peak current. Figure 5 The right side shows the current characteristics of the rotor coil when the rotor stops rotating or rotates at an abnormal speed during full-step drive, i.e., when the stepper motor loses steps or stalls. When the rotor stops rotating or rotates at an abnormal speed, it has little or no impact on the current flowing through the rotor coil. Therefore, the current collected from the rotor coil does not show a steep increasing trend, but rather a stable current pattern. The peak current generated during normal operation is taken as the first peak current, and the peak current generated during abnormal operation is taken as the second peak current.
[0075] In this process, a current detection circuit in the motor control device is used. The input terminal of the current detection circuit is connected to the rotor coil of the stepper motor to collect the current of the rotor coil when the stepper motor is running at full step. The output terminal of the current detection circuit is connected to the input terminal of the voltage conversion circuit to convert the current of the rotor coil into a comparison voltage of the rotor coil. Furthermore, the voltage of the rotor coil can be amplified using a voltage amplification circuit. It is understandable that since the current of the rotor coil is converted through a current sensing resistor, the rotor coil current and rotor coil voltage are directly proportional, and the voltage change pattern obtained is consistent with the current change pattern of the rotor coil. Figure 5 It is clear that the first peak current is greater than the second peak current. Understandably, the first peak voltage during normal operation is also greater than the second peak voltage during abnormal operation.
[0076] The output terminal of the voltage conversion circuit of the motor control device is connected to the non-inverting terminal of the voltage comparator, the inverting terminal of the voltage comparator is connected to the reference voltage, and the output terminal of the voltage comparator is connected to the main control chip.
[0077] The reference voltage is a preset threshold voltage used for comparison with the rotor coil voltage at the current moment. Specifically, during the full-step drive cycle, the peak current of the rotor at normal operating speed shows a sloping upward trend, while the peak current at abnormal operating speed shows a stable trend. Therefore, the first peak voltage corresponding to the peak current of the rotor at normal operating speed is greater than the second peak voltage corresponding to the peak current at abnormal operating speed. When setting the reference voltage, a threshold value that is less than the first peak voltage of the rotor coil and greater than the second peak voltage of the rotor coil when it is not rotating normally is used as the reference voltage.
[0078] The comparison voltage of the rotor coil and the reference voltage are input to the voltage comparator of the stepper motor detection device. The voltage comparator compares the peak values of the reference voltage and the comparison voltage of the rotor coil to obtain the step loss detection level signal at the current moment. Specifically, when the voltage comparator determines that the peak value of the comparison voltage of the rotor coil is greater than the reference voltage, it outputs a high-level signal. When the voltage comparator determines that the peak value of the comparison voltage of the rotor coil is less than the reference voltage, it outputs a low-level signal.
[0079] Specifically, the comparison voltage of the rotor coil and the reference voltage of the stepper motor during full-step drive are input to the voltage comparator of the stepper motor detection device. The voltage comparator outputs the step loss detection level signal at the current moment by comparing the magnitude of the reference voltage and the comparison voltage of the rotor coil. The main control chip obtains the step loss detection level signal output by the voltage comparator.
[0080] In one embodiment, after receiving the comparison voltage, the voltage comparator determines the peak value of the comparison voltage based on the magnitude of each voltage value in the comparison voltage.
[0081] Step 404: If no high-level signal is detected in the step loss detection level signal at each time point within the full-step drive cycle, then it is determined that the stepper motor has lost a step within the full-step drive cycle.
[0082] Stepper motor step loss refers to a situation where, after receiving a pulse signal, the rotor of the stepper motor fails to rotate, causing the stepper motor to fail to reach the position it should have reached as instructed by the pulse signal. Causes of stepper motor step loss include, but are not limited to, insufficient stepper motor torque, inadequate acceleration and deceleration during start-up and shutdown, and excessively low drive voltage settings.
[0083] Specifically, if the out-of-step detection level signal output by the voltage comparator exists a high level signal, it indicates that the voltage of the rotor coil is higher than the reference voltage at this time, that is, the comparison voltage of the rotor coil collected exists a first peak voltage, the current presents a trend of slope rising, and the rotor coil rotates at a normal running speed in this full-step driving period. If the out-of-step detection level signal output by the voltage comparator is always a low level signal, it indicates that the comparison voltage of the rotor coil is continuously lower than the reference voltage at this time, that is, the peak voltage in the comparison voltage of the rotor coil collected is a second peak voltage, the change trend of the current is stable, and the rotor coil does not rotate at a normal running speed in this full-step driving period.
[0084] If the master control chip does not detect a high level signal in the out-of-step detection level signal at each moment in the full-step driving period, it indicates that the rotor does not rotate at a normal running speed in this full-step driving period, and it is determined that the stepper motor is out of step in this full-step driving period.
[0085] In the above motor operation detection method, according to the different periodic change forms of the current of the rotor coil when the stepper motor is in full-step driving and the rotor is in normal operation and abnormal operation, and the characteristic that the peak current of the rotor coil in the full-step driving period when the rotor is in normal operation is higher than the peak current when the rotor is in abnormal operation, the current of the rotor coil is converted into a comparison voltage, and a first peak voltage corresponding to a peak current of the rotor coil in the full-step driving period when the rotor is in normal operation and a second peak voltage corresponding to a peak current of the rotor coil in the full-step driving period when the rotor is in abnormal operation are set as the reference voltage, and the running state of the stepper motor is determined according to the out-of-step detection level signal obtained by comparing the voltage of the rotor coil in full-step driving and the reference voltage. If no high level signal is detected in the out-of-step detection level signal at each moment in the full-step driving period, it indicates that the peak current of the rotor coil in the full-step driving period is small, and the rotor does not rotate normally, that is, the stepper motor is out of step in the full-step driving period. By the different forms of the current flowing through the rotor coil in different running states, the running state of the stepper motor is determined, and the whole detection process does not need to rely on other measuring equipment, which reduces the use cost of the stepper motor operation detection and improves the accuracy of the stepper operation detection result.
[0086] In order to more clearly determine the running state of the stepper motor through the out-of-step detection level signal, in an embodiment, if no high level signal is detected in the out-of-step detection level signal at each moment in the full-step driving period, it is determined that the stepper motor is out of step in the full-step driving period, including:
[0087] According to the out-of-step detection level signal at each moment in the full-step driving period, a corresponding waveform diagram is obtained; if no rectangular wave is detected in the waveform diagram in the full-step driving period, it is determined that the stepper motor is out of step in the full-step driving period.
[0088] The waveform chart is generated according to the out-of-step detection level signal output by the voltage comparator, and reflects the high and low changes of the out-of-step detection level signal.
[0089] Specifically, when the rotor rotates normally, the out-of-step detection level signal output by the voltage comparator is composed of a low level signal and a high level signal due to the periodic change of the rotor coil current. A rectangular wave is obtained according to the out-of-step detection level signal output by the voltage comparator, and the rectangular wave is as shown in Figure 6 . Figure 7 The waveform chart corresponding to the case where the rotor does not rotate normally (the chart includes a plurality of full-step driving periods). When the rotor does not rotate normally, the peak voltage of the rotor coil comparison voltage is the second peak voltage, which is less than the reference voltage. Therefore, the out-of-step detection level signal output by the voltage comparator is a low level signal, and the output waveform chart is a straight line.
[0090] When the main control chip determines that no rectangular wave is detected in the waveform chart in the full-step driving period, it can be determined that the rotor does not rotate normally in the full-step driving period, i.e., the step motor has an out-of-step condition in the full-step driving period.
[0091] In this embodiment, the corresponding waveform chart is generated according to the out-of-step detection level signal output by the voltage comparator, and the waveform chart can be used to more intuitively and clearly determine whether the step motor has an out-of-step condition in the full-step driving period.
[0092] Like the out-of-step of the step motor, the step motor stall is also a problem that cannot be ignored in the operation of the motor. When the motor stalls, the rotational speed of the rotor of the motor is zero. At this time, the motor still outputs torque. However, when the motor stalls, the power factor is very low, and the stall current generated by the stall can be as high as 7 times the rated current. If the motor stall condition cannot be detected and processed in time, the step motor will be damaged after a long time.
[0093] In one embodiment, as shown in Figure 8 , a motor operation detection method is provided, including the following steps:
[0094] In step 802, the out-of-step detection level signal of the current time obtained by comparing the comparison voltage of the rotor coil of the step motor in full-step driving operation with the reference voltage is obtained; wherein the comparison voltage of the rotor coil is obtained by converting the current of the rotor coil of the step motor in full-step driving operation; the reference voltage is less than the first peak voltage corresponding to the peak current of the rotor at the normal operating speed of the rotor coil in the full-step driving period, and greater than the second peak voltage corresponding to the peak current of the rotor at the abnormal operating speed of the rotor coil in the full-step driving period.
[0095] Step 804, if the high level signal is not detected in the step-out detection level signal at each time in the full step driving period, it is determined that the stepper motor is out of step in the full step driving period.
[0096] Step 806, if the stepper motor is out of step in a plurality of continuous full step driving periods, it is determined that the stepper motor is stalled.
[0097] The stall determination condition is pre-set in the master control chip, and the stall determination condition is that if the stepper motor is out of step in a preset number of continuous full step driving periods, it is determined that the stepper motor is stalled. It can be understood that the specific number of continuous full step driving periods is set according to the actual running parameters of the stepper motor and the like.
[0098] Specifically, when the master control chip determines that the stepper motor is out of step in the full step driving period according to the step-out detection level signal output by the voltage comparator, the master control chip continues to obtain the step-out detection level signal output by the voltage comparator in a preset number of continuous full step driving periods according to the preset stall determination condition. If it is determined that the stepper motor is out of step in the preset number of continuous full step driving periods, the preset stall determination condition is met, and the master control chip determines that the stepper motor is stalled.
[0099] In one of the embodiments, if the stepper motor is out of step in a plurality of continuous full step driving periods, it is determined that the stepper motor is stalled, which comprises: obtaining the step-out detection level signal in a plurality of full step driving periods, and generating a second waveform diagram according to the step-out detection level signal in each full step driving period; and performing multi-cycle filtering processing on the second waveform diagram, and if there is a preset number of continuous full step driving periods in which a rectangular wave is not detected in the second waveform diagram, it is determined that the stepper motor is stalled.
[0100] In one of the embodiments, after the master control chip determines that the stepper motor is stalled, the master control chip can control the stepper motor to stop, so as to avoid damage to the stepper motor caused by the stall.
[0101] In the above embodiments, the running condition of the stepper motor in a plurality of continuous full step driving periods is obtained, and when the stepper motor is out of step in the plurality of continuous full step driving periods, it is determined that the stepper motor is stalled. The running condition of the stepper motor is determined in time and accurately according to the step-out detection level signal, damage to the stepper motor caused by long-time stall is avoided, and the safety of the motor running is improved.
[0102] When the voltage comparator generates the step-out detection level signal, the comparison result of the reference voltage and the rotor coil voltage is used as the basis. The selection of the reference voltage is related to the accuracy of the detection result.
[0103] In one of the embodiments, the master control chip obtains the running data of the stepper motor, and determines the reference voltage according to the running data.
[0104] Specifically, the stepper motor is affected by factors such as the use environment and the use method. When the stepper motor is driven at full steps, the current output by the rotor coil also changes. If the reference voltage is a fixed value set at the factory, the out-of-step detection level signal obtained according to the reference voltage will lead to inaccurate detection results and deviations in the determined running state of the stepper motor.
[0105] To ensure the accuracy of the detection results, during detection, the host chip obtains the running data of the stepper motor at the current time, determines the reference voltage corresponding to the current time according to the running data, inputs the reference voltage into the voltage comparator, and the voltage comparator outputs the out-of-step detection level signal according to the comparison result of the reference voltage at the current time and the comparison voltage of the rotor coil at the current time. By determining the reference voltage according to the running data of the stepper motor, it can be ensured that the reference voltage can adapt to the influence of the influencing factors on the stepper motor and meet the running condition of the stepper motor at the current time, thereby further improving the accuracy of the detection results.
[0106] In one embodiment, the running data of the stepper motor is obtained, and the reference voltage is determined according to the running data, including: obtaining a preset mapping table, and the preset mapping table records the mapping relationship between the running data and the reference voltage. The running data of the stepper motor is obtained, the preset mapping table is searched, and the corresponding reference voltage is determined.
[0107] Specifically, as the use time of the stepper motor increases, the internal equipment of the stepper motor will age to a certain extent, such as an increase in rotor damping, and in order to adapt to the influence of the use time on the running of the stepper motor, the set value of the reference voltage is moderately increased to ensure that the reference voltage is always lower than the first peak voltage of the rotor coil in the full-step driving period when the rotor is normally running, thereby obtaining accurate detection results.
[0108] The driving voltage of the stepper motor is the voltage used to drive the stepper motor to run. The higher the driving voltage, the faster the rotor speed of the stepper motor, and the current flowing through the rotor coil will also increase. When the rotor coil is normally rotating, the peak current of the rotor coil in the full-step driving period will increase accordingly. In order to adapt to the influence of the driving voltage on the running of the stepper motor, the set value of the reference voltage is moderately increased to improve the accuracy of the detection results.
[0109] The driving load of the stepper motor is the load of the object (such as a valve) to be driven by the stepper motor. The smaller the driving load, the smaller the force required by the stepper motor to generate. In order to adapt to the influence of the driving load on the running of the stepper motor, the set value of the reference voltage is moderately reduced to improve the accuracy of the detection results.
[0110] Specifically, the main control chip pre-stores a preset mapping table recording a mapping relationship between running data and reference voltages. When detection is performed, the main control chip acquires the preset mapping table from the storage system, and based on an identifier carried by the acquired running data of the stepper motor, finds a reference voltage corresponding to the identifier from the preset mapping table, determines the reference voltage as the reference voltage at the current time, and inputs the reference voltage into the voltage comparator for comparison with the comparison voltage of the rotor coil to obtain the step-out detection level signal. It can be understood that the preset mapping table is generated based on experimental data and empirical data.
[0111] In this embodiment, the preset mapping table is searched according to the running data of the stepper motor, and the reference voltage corresponding to the current running data is determined, so that the reference voltage used for comparison to generate the step-out detection level signal can adapt to the influence of the influencing factors on the stepper motor, and conforms to the running condition of the stepper motor at the current time, thereby further improving the accuracy of the detection result.
[0112] In one of the embodiments, when the stepper motor is detected for the first time, the preset mapping table is searched according to the service time, the driving voltage and the driving load of the stepper motor, and the reference voltage of the stepper motor is determined. By searching the preset mapping table through the three kinds of running data, the reference voltage determined when the stepper motor is detected for the first time can be more accurate and conform to the running environment of the stepper motor. After the service environment of the stepper motor is determined, the corresponding driving voltage and driving load will not change much, so when the stepper motor is detected for the second time, the reference voltage at the current time can be determined only according to the service time of the stepper motor, thereby simplifying the searching process.
[0113] When it is determined that the stepper motor is out of step, it means that the stepper motor does not move the corresponding step distance according to the instruction of the pulse signal, so that the driving object (such as a valve) reaches the set opening / closing degree. In order to more accurately control the movement of the driving object, in one of the embodiments, after it is determined that the stepper motor is out of step, the main control chip further includes: generating a compensation driving signal, and driving the rotor coil to rotate an additional full-step driving period according to the compensation driving signal.
[0114] Specifically, the main control chip detects the running state of the stepper motor in real time, generates a full-step driving signal as a compensation driving signal after it is determined that the stepper motor is out of step, and drives the rotor coil to rotate an additional full-step driving period according to the compensation driving signal, so that a step distance is compensated into the total movement step of the stepper motor, and the driving object is accurately controlled to reach the set opening / closing degree position.
[0115] When it is determined that the stepper motor is locked, in order to further understand the situation of the locked motor, in one of the embodiments, as shown in Figure 9 The motor running detection method further includes the following steps:
[0116] Step 902, generating a reverse driving signal, and driving the rotor coil to rotate reversely according to the reverse driving signal.
[0117] The reverse driving signal is a pulse signal for generating a current opposite to the original driving current phase. The phase current and magnetic field of the stepper motor follow the Ampere's right-hand screw rule, and the phase of the motor current is controlled to reverse the direction of the magnetic pole of the motor stator.
[0118] Specifically, when the master control chip determines that the stepper motor is stalled in the driving direction corresponding to the original current phase, the master control chip generates a reverse driving signal for generating a current opposite to the original driving current phase, and drives the rotor coil to rotate reversely according to the reverse driving signal.
[0119] Step 904, obtaining the reverse out-of-step detection level signal detected in the reverse driving period.
[0120] Specifically, the reverse out-of-step detection level signal in the reverse driving period is obtained by comparing the reverse voltage of the rotor coil of the stepper motor during the reverse full-step driving operation with the reference voltage.
[0121] It can be understood that the process of obtaining the reverse out-of-step detection level signal is similar to the process of obtaining the out-of-step detection level signal.
[0122] Step 906, if no high-level signal is detected in the continuous multiple reverse driving periods, determining that the stepper motor is bidirectional stalled.
[0123] Specifically, if the master control chip does not detect a high-level signal in the reverse out-of-step detection level signal in the continuous multiple reverse full-step driving periods, it indicates that the rotor does not rotate normally in each reverse full-step driving period, i.e., the rotor cannot rotate normally in both directions, and it is determined that the stall of the stepper motor is bidirectional stall.
[0124] In one embodiment, if a high-level signal is detected in the reverse driving period, it is determined that the stepper motor is unidirectional stalled.
[0125] In one embodiment, after determining the stall type of the stepper motor, different processing strategies are used according to the stall type of the stepper motor. For example, when it is determined that the stepper motor is unidirectional stalled, the stepper motor is controlled to rotate in the opposite direction; when it is determined that the stepper motor is bidirectional stalled, the stepper motor is controlled to stop.
[0126] In the above embodiment, when it is determined that the stepper motor is stalled, the rotor coil of the stepper motor is driven to rotate reversely by generating a reverse driving signal. The type of the stall of the stepper motor can be determined according to the detected reverse stall detection level signal, which is beneficial to processing the stepper motor in time according to the operation of the stepper motor, avoiding damage of the stepper motor due to long-time stall, and improving the safety of the motor operation.
[0127] In one embodiment, as shown in Figure 10 , a motor operation detection method is provided, which is described by taking the application of the method in a temperature control valve as an example.
[0128] First, the flow direction of each signal in the motor operation detection method is as shown in Figure 11 , specifically, the master control chip MCU generates a full-step driving control signal according to a preset valve opening degree of the temperature control valve. The full-step driving control signal includes a driving pulse signal and a direction signal. The master control chip sends the full-step driving control signal to the stepper motor driving circuit to control the stepper motor driving circuit to generate a phase current, which is input into the rotor coil.
[0129] After the rotor coil is energized, a magnetic field is generated, and the rotor rotates under the action of the magnetic field to drive the temperature control valve in the temperature valve mechanism to move a corresponding step.
[0130] The current detection circuit collects the current flowing through the rotor coil, and the current form of the rotor coil is converted from current to voltage through the current sensing resistor. The converted voltage form is amplified by the voltage amplification circuit and low-pass filtered to obtain a comparison voltage of the rotor coil. The comparison voltage of the rotor coil is input into the voltage comparator, and the voltage comparator determines the peak voltage of the comparison voltage based on each voltage value in the comparison voltage.
[0131] The voltage comparator receives the reference voltage at the current moment found by the master control chip based on the operation data of the stepper motor such as the use time, driving voltage and driving load, and compares the peak voltage of the rotor coil with the reference voltage to generate a stall detection level signal. The stall detection level signal is sent to the master control chip for judgment to determine the operation state of the stepper motor.
[0132] The master control chip receives the stall detection level signal and obtains the corresponding waveform graph according to the stall detection level signal. If no rectangular wave is detected in the waveform graph in the full-step driving period, it is determined that the stepper motor is stalled in the full-step driving period. The master control chip generates a compensation driving signal after determining that the stepper motor is stalled, and drives the rotor coil to rotate an additional full-step driving period according to the compensation driving signal.
[0133] If the master chip does not detect the rectangular wave in the waveform diagram in continuous multiple full step driving periods, it is determined that the stepping motor is stalled. After determining that the stepping motor is stalled, the master chip generates a reverse driving signal, drives the rotor coil to rotate reversely according to the reverse driving signal, obtains a reverse step-out detection level signal detected in a reverse driving period, and if the master chip does not detect the rectangular wave in continuous multiple reverse driving periods, it is determined that the stepping motor is stalled in both directions.
[0134] In the embodiment, the closed-loop control of the stepping motor and the running state detection of the stepping motor are realized by using the method combining software and hardware, and thus the purpose of accurately controlling the temperature control valve is achieved.
[0135] It should be understood that, although each step in the flowchart involved in the above embodiments is displayed in sequence according to the arrow, the steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or steps or stages in other steps.
[0136] Based on the same inventive concept, the embodiment of the present application also provides a motor running detection device for implementing the above-mentioned motor running detection method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, and therefore the specific limitations in one or more motor running detection device embodiments provided below can refer to the limitations of the motor running detection method described above, which will not be described here.
[0137] In one embodiment, as shown in Figure 12 A motor running detection device 1200 is provided, which includes a signal acquisition module 1201 and a step-out analysis module 1202, wherein:
[0138] The signal acquisition module 1201 is configured to acquire a step-out detection level signal of the stepping motor at the current time, which is obtained by comparing a comparison voltage of the rotor coil of the stepping motor in full step driving operation with a reference voltage; wherein the comparison voltage of the rotor coil is obtained by converting the current of the rotor coil of the stepping motor in full step driving operation; the reference voltage is less than a first peak voltage corresponding to a first peak current of the rotor coil at a normal running speed of the rotor in a full step driving period, and greater than a second peak voltage corresponding to a second peak current of the rotor coil at an abnormal running speed of the rotor in the full step driving period.
[0139] The step loss analysis module 1202 is configured to determine that the stepper motor is out of step in the full-step driving period if no high level signal is detected in the step loss detection level signals at each time point in the full-step driving period.
[0140] The motor operation detection device determines the operation state of the stepper motor according to the different current periodic change patterns of the rotor coil in the full-step driving period when the rotor is in normal operation and abnormal operation, and the peak current of the rotor coil in the full-step driving period when the rotor is in normal operation is higher than the peak current when the rotor is in abnormal operation. The current of the rotor coil is converted into a comparison voltage, a first peak voltage corresponding to the peak current of the rotor coil in the full-step driving period when the rotor is in normal operation is set as a reference voltage, and a second peak voltage corresponding to the peak current of the rotor coil in the full-step driving period when the rotor is in abnormal operation is set as a reference voltage. The operation state of the stepper motor is determined according to the step loss detection level signal obtained by comparing the voltage of the rotor coil in the full-step driving period and the reference voltage. If no high level signal is detected in the step loss detection level signals at each time point in the full-step driving period, it indicates that the peak current of the rotor coil is small and the rotor is not rotating normally, that is, the stepper motor is out of step in the full-step driving period. The operation state of the stepper motor is determined according to the different current patterns in different operation states, and the entire detection process does not need to rely on other measuring devices, thereby reducing the use cost of the stepper motor operation detection and improving the accuracy of the stepper operation detection result.
[0141] In one embodiment, the step loss analysis module is further configured to: obtain a corresponding waveform diagram according to the step loss detection level signals at each time point in the full-step driving period; and determine that the stepper motor is out of step in the full-step driving period if no rectangular wave is detected in the waveform diagram in the full-step driving period.
[0142] In one embodiment, the motor operation detection device further comprises a stall analysis module configured to determine that the stepper motor is stalled if the stepper motor is out of step in a plurality of consecutive full-step driving periods.
[0143] In one embodiment, the motor operation detection device further comprises a reference voltage determination module configured to obtain operation data of the stepper motor and determine the reference voltage according to the operation data.
[0144] In one embodiment, the reference voltage determination module is further configured to: obtain a preset mapping table recording a mapping relationship between the operation data and the reference voltage; obtain the operation data of the stepper motor, search the preset mapping table, and determine the corresponding reference voltage; and the operation data comprises at least one of a use duration, a driving voltage, and a driving load of the stepper motor.
[0145] In one embodiment, the motor operation detection apparatus further comprises a compensation driving module configured to generate a compensation driving signal, and drive the rotor coil to rotate an additional full step driving period according to the compensation driving signal.
[0146] In one embodiment, the motor operation detection apparatus further comprises a stall type analysis module configured to generate a reverse driving signal, and drive the rotor coil to rotate reversely according to the reverse driving signal; obtain the reverse out-of-step detection level signal detected in the reverse driving period; and determine that the stepper motor is bidirectional stall if no high level signal is detected in continuous multiple reverse driving periods.
[0147] The modules in the motor operation detection apparatus described above can be implemented in whole or in part by software, hardware, or a combination thereof. The modules described above can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the modules.
[0148] In one embodiment, a computer device is provided, which can be a master chip, and an internal structure diagram thereof can be as shown in Figure 13 The computer device comprises a processor, a memory, and a network interface connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store reference voltages, a preset mapping table, and the like. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement a motor operation detection method.
[0149] Those skilled in the art can understand that Figure 13 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. A specific computer device can comprise more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0150] In one embodiment, a computer device is provided, which can be a master chip in the present application, comprising a memory and a processor. The memory stores a computer program, and the processor implements the steps in the motor operation detection method embodiments described above when executing the computer program.
[0151] In one embodiment, a computer readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, implements the steps of any of the above motor operation detection method embodiments.
[0152] In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of any of the above motor operation detection method embodiments.
[0153] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.
[0154] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. Any reference to memory, database or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0155] The technical features of the above embodiments can be combined in any manner. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described, however, as long as the combinations of the technical features do not contradict each other, they should be considered to be within the scope of the present disclosure.
[0156] The above embodiments only express several implementation manners of the present application, and the description is specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be pointed out that, for ordinary skilled persons in the art, some modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method of detecting operation of an electric machine, characterized by, The method comprises: obtaining a current time step-out detection level signal of a comparison voltage of a rotor coil of a stepper motor in full-step driving operation and a reference voltage; wherein the comparison voltage of the rotor coil is obtained by converting a current of the rotor coil of the stepper motor in full-step driving operation; the reference voltage is less than a first peak voltage corresponding to a first peak current of the rotor coil at a normal running speed in the full-step driving period, and greater than a second peak voltage corresponding to a second peak current of the rotor coil at an abnormal running speed in the full-step driving period; if no high level signal is detected in the step-out detection level signal at each time in the full-step driving period, it is determined that the stepper motor is out of step in the full-step driving period; in the case that the peak value of the comparison voltage is greater than the reference voltage, the step-out detection level signal includes a high level signal; in the case that the peak value of the comparison voltage is less than the reference voltage, the step-out detection level signal includes a low level signal; if the stepper motor is out of step in a plurality of consecutive full-step driving periods, it is determined that the stepper motor is locked-rotor; generating a reverse driving signal, and driving the rotor coil to rotate reversely according to the reverse driving signal; the reverse driving signal is a pulse signal for generating a current with a phase opposite to that of the original driving current; obtaining a reverse step-out detection level signal detected in a reverse driving period; if no high level signal is detected in a plurality of consecutive reverse driving periods, it is determined that the stepper motor is bidirectional locked-rotor; if a high level signal is detected in any one reverse driving period, it is determined that the stepper motor is unidirectional locked-rotor.
2. The method of claim 1, wherein, if no high level signal is detected in the step-out detection level signal at each time in the full-step driving period, it is determined that the stepper motor is out of step in the full-step driving period, comprising: obtaining a corresponding waveform diagram according to the step-out detection level signal at each time in the full-step driving period; if no rectangular wave is detected in the waveform diagram in the full-step driving period, it is determined that the stepper motor is out of step in the full-step driving period.
3. The method of claim 1, wherein, The method further comprises: obtaining running data of the stepper motor, and determining the reference voltage according to the running data.
4. The method of claim 3, wherein, The obtaining of the running data of the stepper motor and the determination of the reference voltage according to the running data comprises: obtaining a preset mapping table, wherein the preset mapping table records a mapping relationship between the running data and the reference voltage; obtaining the running data of the stepper motor, searching the preset mapping table, and determining the corresponding reference voltage; the running data comprises at least one of a use time length, a driving voltage and a driving load of the stepper motor.
5. The method of claim 1, wherein, After determining that the stepper motor is out of step, the method further comprises: generating a compensation driving signal, and driving the rotor coil to rotate additionally for one full-step driving period according to the compensation driving signal.
6. An electric motor operation detecting device characterized by comprising: The device comprises: The signal acquisition module is configured to acquire a current time step-out detection level signal obtained by comparing a comparison voltage of a rotor coil of the stepper motor in full-step driving operation with a reference voltage; wherein the comparison voltage of the rotor coil is obtained by converting a current of the rotor coil of the stepper motor in full-step driving operation; and the reference voltage is less than a first peak voltage corresponding to a first peak current of the rotor coil at a normal running speed within the full-step driving period, and greater than a second peak voltage corresponding to a second peak current of the rotor coil at an abnormal running speed within the full-step driving period. The step-out analysis module is configured to determine that the stepper motor is out of step within the full-step driving period if no high-level signal is detected in the step-out detection level signal at each time within the full-step driving period; the step-out detection level signal includes a high-level signal in the case where a peak value of the comparison voltage is greater than the reference voltage; and the step-out detection level signal includes a low-level signal in the case where the peak value of the comparison voltage is less than the reference voltage. The stall analysis module is configured to determine that the stepper motor is stalled if the stepper motor is out of step within a plurality of consecutive full-step driving periods. The stall type analysis module is configured to generate a reverse driving signal, drive the rotor coil to rotate reversely according to the reverse driving signal, and acquire a reverse step-out detection level signal detected within a reverse driving period; the reverse driving signal is a pulse signal for generating a current opposite in phase to an original driving current; if no high-level signal is detected within a plurality of consecutive reverse driving periods, it is determined that the stepper motor is bidirectional stalled; and if a high-level signal is detected within any one reverse driving period, it is determined that the stepper motor is unidirectional stalled.
7. The apparatus of claim 6, wherein, The step-out analysis module is further configured to obtain a corresponding waveform diagram according to the step-out detection level signal at each time within the full-step driving period; and determine that the stepper motor is out of step within the full-step driving period if no rectangular wave is detected in the waveform diagram within the full-step driving period.
8. The apparatus of claim 6, wherein, The device further comprises: A reference voltage determination module configured to acquire running data of the stepper motor, and determine the reference voltage according to the running data.
9. An electric motor control device characterized by comprising: The device comprises a current detection circuit, a voltage conversion circuit, a voltage comparator, and a master control chip; an input end of the current detection circuit is connected with a rotor coil of a stepper motor, an output end of the current detection circuit is connected with an input end of the voltage conversion circuit, an output end of the voltage conversion circuit is connected with a non-inverting input end of the voltage comparator, an inverting input end of the voltage comparator is connected with a reference voltage, and an output end of the voltage comparator is connected with the master control chip. The current detection circuit collects the current of the rotor coil of the stepper motor when the stepper motor is running in full-step driving mode, the voltage conversion circuit converts the current of the rotor coil into a comparison voltage of the rotor coil, and the voltage comparator outputs a current-time step-out detection level signal according to a comparison result of the comparison voltage of the rotor coil and a reference voltage; the main control chip is configured to acquire the step-out detection level signal, and determine that the stepper motor is out of step in the full-step driving period if no high-level signal is detected in the step-out detection level signal at each time in the full-step driving period; the step-out detection level signal includes a high-level signal in the case that a peak value of the comparison voltage is greater than the reference voltage, and the step-out detection level signal includes a low-level signal in the case that the peak value of the comparison voltage is less than the reference voltage; the stepper motor is determined to be locked if the stepper motor is out of step in a plurality of continuous full-step driving periods; a reverse driving signal is generated, and the rotor coil is driven to rotate reversely according to the reverse driving signal; the reverse driving signal is a pulse signal for generating a current opposite in phase to an original driving current; a reverse step-out detection level signal detected in a reverse driving period is acquired; the stepper motor is determined to be bidirectionally locked if no high-level signal is detected in a plurality of continuous reverse driving periods; and the stepper motor is determined to be unidirectionally locked if a high-level signal is detected in any one reverse driving period. 10.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-9. The processor, when executing the computer program, implements the steps of the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Step-out detection method for stepping motor
JP1999187697A