A method, apparatus, electronic device and storage medium for testing motors.

By acquiring the current pulse waveform and position pulse waveform of the motor to detect the motor status and generating abnormal status prompts, the problem of abnormal motor operation affecting the normal operation of equipment is solved, and timely pre-processing is achieved.

CN116008809BActive Publication Date: 2026-06-30SHANGHAI IMILAB TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI IMILAB TECHNOLOGY CO LTD
Filing Date
2023-02-15
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

How to effectively detect abnormal operating conditions of motors to avoid affecting the normal operation of the equipment they are in.

Method used

By acquiring the current pulse waveform and position pulse waveform of the motor, the detection results of the motor are obtained based on these waveforms, and a prompt message is generated when an abnormal state is detected to indicate the type of abnormal state of the motor.

Benefits of technology

It can promptly alert you when the motor is operating abnormally, proactively address motor problems, and ensure the equipment operates normally.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116008809B_ABST
    Figure CN116008809B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, device, storage medium, and computer program product for motor detection. The method includes: acquiring a current pulse waveform and a position pulse waveform of the motor; obtaining a detection result of the motor based on the current pulse waveform and the position pulse waveform; and generating a prompt message when the detection result indicates that the motor is in an abnormal state; wherein the prompt message is used to indicate the type of abnormal state currently experienced by the motor. According to embodiments of this disclosure, a prompt is provided when the motor is in an abnormal operating state, thereby enabling preemptive action on the motor before it completely fails to operate normally, ensuring the normal operation of the equipment containing the motor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of information processing technology, and in particular to a method, apparatus, electronic device and storage medium for detecting motors. Background Technology

[0002] With the development of technology, motors are increasingly being used in smart homes, industry, and automotive electronics. However, when a motor fails to work, it affects the normal operation of the equipment it is connected to. Therefore, how to detect abnormal operating conditions of motors has become a problem that needs to be solved. Summary of the Invention

[0003] This disclosure provides a method, apparatus, electronic device, and storage medium for testing motors.

[0004] According to a first aspect of this disclosure, a method for detecting an electric motor is provided, comprising:

[0005] Obtain the motor's current pulse waveform and the motor's position pulse waveform;

[0006] The detection result of the motor is obtained based on the current pulse waveform and the position pulse waveform of the motor.

[0007] If the detection result of the motor indicates that the motor is in an abnormal state, a prompt message is generated; wherein the prompt message is used to indicate the type of abnormal state that the motor is currently in.

[0008] According to a second aspect of this disclosure, a motor testing apparatus is provided, wherein the motor testing apparatus is used to perform the motor testing method provided in the first aspect embodiment of this disclosure.

[0009] According to a third aspect of this disclosure, an electronic device includes:

[0010] At least one processor; and

[0011] A memory communicatively connected to the at least one processor; wherein,

[0012] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods of any embodiment of this disclosure.

[0013] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the methods of any embodiment of this disclosure.

[0014] According to a fifth aspect of this disclosure, a computer program product includes a computer program that is processed by a processor to perform a method of any embodiment of this disclosure.

[0015] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description.

[0016] The solution provided in this embodiment can obtain the detection result of the motor based on the motor's current pulse waveform and the motor's position pulse waveform. If the detection result indicates that the motor is in an abnormal state, a prompt message is generated. In this way, a prompt can be issued when the motor is detected to be in an abnormal working state during the motor's operation, thereby enabling appropriate measures to be taken in advance before the motor completely fails to work, ensuring the normal operation of the equipment containing the motor. Attached Figure Description

[0017] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments provided according to this disclosure and should not be construed as limiting the scope of this disclosure.

[0018] Figure 1 This is a schematic flowchart of a motor testing method according to an embodiment of the present disclosure;

[0019] Figures 2-5 This is a schematic diagram of several processing scenarios according to an embodiment of the motor detection method of this disclosure;

[0020] Figure 6 This is a schematic flowchart of a motor testing method according to an embodiment of the present disclosure;

[0021] Figure 7 This is a schematic flowchart of a motor detection method according to another embodiment of the present invention;

[0022] Figure 8 This is a flowchart illustrating a motor testing method according to yet another embodiment of the present invention;

[0023] Figure 9 This is a schematic diagram of the composition structure of a motor detection device according to an embodiment of the present disclosure;

[0024] Figure 10 This is a schematic diagram of the composition structure of a motor detection device according to another embodiment of the present disclosure;

[0025] Figure 11This is a schematic diagram of the composition structure of a motor detection device according to another embodiment of the present disclosure;

[0026] Figure 12 This is a schematic diagram of the composition structure of a motor detection device according to another embodiment of the present disclosure;

[0027] Figure 13 This is a block diagram of an electronic device used to implement the motor detection method of the embodiments of this disclosure. Detailed Implementation

[0028] The present disclosure will now be described in further detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0029] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.

[0030] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0031] The first aspect of this disclosure provides a method for detecting a motor, such as... Figure 1 As shown, it includes:

[0032] S101: Obtain the current pulse waveform and the position pulse waveform of the motor;

[0033] S102: Based on the current pulse waveform of the motor and the position pulse waveform of the motor, the detection result of the motor is obtained;

[0034] S103: If the detection result of the motor indicates that the motor is in an abnormal state, generate a prompt message; wherein the prompt message is used to indicate the type of abnormal state that the motor is currently in.

[0035] The first aspect of the embodiment described above provides a motor detection method, which can be performed by a motor detection device installed in an electronic device.

[0036] The aforementioned electronic device may specifically be an electronic device equipped with or configured with a motor. In a preferred example, the motor may be a brushed motor. In addition to the aforementioned motor, the electronic device may also be equipped with or configured with a voltage comparator and a position sensor; furthermore, the electronic device may also be equipped with or configured with at least one of the following devices: MCU (Micro Control Unit), motor drive circuit, power control circuit, power supply circuit, etc. The MCU is also known as a single-chip microcomputer or a microcontroller.

[0037] The voltage comparator can be any type of voltage comparator, such as a dedicated voltage comparator chip, a single-threshold comparator, or a hysteresis voltage comparator; the position sensor can be any type of voltage comparator, such as a Hall sensor, a grating sensor, a potentiometer, an encoder, or an infrared sensor. Not all possible voltage comparators and position sensors are listed here.

[0038] Specifically, obtaining the current pulse waveform of the motor can be: obtaining the voltage pulse waveform of the motor based on one or more output information of a voltage comparator; obtaining the current pulse waveform of the motor based on the voltage pulse waveform of the motor; wherein, each output information of the one or more output information of the voltage comparator is used to indicate whether the output voltage of the motor is high or low, and the output time corresponding to different output information of the one or more output information is different.

[0039] The voltage comparator can obtain one or more output information based on one or more voltage values ​​input from the motor. The one or more voltage values ​​input from the motor are the voltage values ​​input to the voltage comparator from the motor at each of one or more moments within a first time period. Further, the voltage comparator can obtain any one output information in the following ways: the voltage comparator can compare the voltage value input from the motor with a first voltage value; if the voltage value is greater than the first voltage value, the voltage comparator can obtain output information indicating that the motor's output voltage is high; and / or, the voltage comparator can compare the voltage value input from the motor with a second voltage value; if the voltage value is less than the second voltage value, the voltage comparator can obtain output information indicating that the motor's output voltage is low; wherein the first voltage value is greater than or equal to the second voltage value.

[0040] Combination Figure 2 and Figure 3The connection relationships between voltage comparator 300, MCU, motor drive circuit 200, and motor 210 are illustrated by way of example. Pin 301 of chip U3 in voltage comparator 300 is connected to the current_sen (current sensing) network of the MCU. The current_sen network of the MCU is connected to resistor R1 in the motor drive circuit 200. Resistor R1 is connected to motor 210 through chip U2 in the motor drive circuit 200. Resistor R1 is connected in series in the motor circuit.

[0041] The connection relationship also includes: pin 303 of chip U3 of voltage comparator 300 is connected to MCU_VCC (MicroControl Unit Volt Current Condenser) network of MCU, and MCU_VCC network of MCU is connected to pin 204 of chip U2 in motor drive circuit 200.

[0042] Combination Figure 2 and Figure 3 An example is provided on how to obtain the voltage value of the motor input voltage comparator: the voltage value input from resistor R1 to the voltage comparator is obtained through the current_sen network of the MCU, and the voltage value of the motor input voltage comparator is obtained based on the voltage value input from resistor R1 to the voltage comparator.

[0043] The voltage value obtained from resistor R1 to the voltage comparator can be: the voltage value after filtering by motor drive capacitor C2 and after voltage division by resistors R9 and R10, which is then the voltage value input from resistor R1 to the voltage comparator. Here, resistors R9 and R10, along with chip U3, together constitute a hysteresis voltage comparator, and capacitor C2 is used to filter out high-frequency interference signals.

[0044] Combination Figure 2 and Figure 3 The following is an exemplary description of how the first voltage value and the second voltage value are obtained: the voltage value input from pin 204 of chip U2 to pin 303 of chip U3 is obtained through the MCU_VCC network of the MCU; the first voltage value and the second voltage value are obtained based on the voltage value input from pin 204 of chip U2 to pin 303 of chip U3.

[0045] The voltage value obtained from pin 204 of chip U2 to pin 303 of chip U3 can be obtained by: obtaining the voltage value after voltage division by resistors R2 and R3, and filtering by capacitor C7, from pin 204 of chip U2 to pin 303 of chip U3. The filtering by capacitor C7 ensures the stability of the voltage obtained from pin 204.

[0046] The voltage value obtained from pin 204 of chip U2 to pin 303 of chip U3 can also be obtained by obtaining the voltage value after voltage division by resistors R11 and R12, which is then input from pin 204 of chip U2 to pin 303 of chip U3.

[0047] Combination Figure 2 and Figure 3 The method of outputting information by the voltage comparator is illustrated as follows: The voltage comparator 300 outputs information through pin 304 of chip U3. Pin 304 is connected to the IO (Input / Output) interface of the MCU, and the MCU's IO interface is used to capture the output information of pin 304.

[0048] Figure 3 The voltage comparator 300 chip U3 further includes pins 305 and 302. Pin 305 is used to power the chip U3, and pin 302 is used to ground. Pin 305 is connected to the MCU_VCC of the MCU.

[0049] The method for obtaining the position pulse waveform of the motor may be: obtaining the position pulse waveform of the motor based on one or more output information of the position sensor; wherein, each of the one or more output information is used to represent the relative position relationship between the stator and the rotor in the motor, and the output time corresponding to different output information in the one or more output information is different.

[0050] For example, in the position sensor is Figure 4 In the case of the Hall sensor 400 at the motor shaft end, the motor central shaft is connected to the motor rotor, and a magnet is connected to the end of the motor central shaft. When the motor rotor rotates, the motor rotor drives the motor central shaft to rotate, and the magnet connected to the end of the motor central shaft rotates synchronously with the motor central shaft. Based on the rotation of the magnet connected to the end of the motor central shaft, the Hall sensor 400 at the motor shaft end obtains the magnetic field strength of the two magnetic poles (S south pole, N north pole) of the magnet connected to the end of the motor central shaft. Based on the magnetic field strength of the two magnetic poles (S south pole, N north pole) of the magnet, the Hall sensor 400 at the motor shaft end outputs information. Based on the output information of the Hall sensor at the motor shaft end, the position pulse waveform of the motor is obtained. The magnet connected to the end of the motor central shaft is perpendicularly connected to the motor central shaft, and the two magnetic poles (S south pole, N north pole) of the magnet surround the end of the motor central shaft. It should be understood that this is only one possible example; in actual processing, other methods can be used, which are not exhaustively listed here.

[0051] Combination Figure 4The acquisition method of one or more output information of the position sensor is illustrated by way of example. In the motor shaft-end Hall sensor 400, chip U4 detects the magnetic field strength of the two magnetic poles (S south pole, N north pole) of the magnet at the center shaft end of the motor at any given time. When the magnetic field strength of the south pole (S pole) of the magnet at any given time is greater than a third threshold, the output information is low; when the magnetic field strength of the south pole (S pole) of the magnet at any given time is less than a fourth threshold, the output information is high; and / or, when the magnetic field strength of the north pole (N pole) of the magnet at any given time is greater than a fifth threshold, the output information is low; when the magnetic field strength of the north pole (N pole) of the magnet at any given time is less than a sixth threshold, the output information is high. The third threshold is greater than or equal to the fourth threshold, and the fifth threshold is greater than or equal to the sixth threshold. Pin 403 of chip U4 is used for outputting information, and pin 403 of chip U4 is connected to the MCU. It should be understood that this is only one possible example. In actual processing, other methods can also be used to achieve this. For example, the magnet can be installed in other positions on the motor, as long as the changes in high and low levels of each revolution of the motor can be accurately detected during the rotation. This will not be exhaustively listed here.

[0052] The method of obtaining the detection result of the motor based on the current pulse waveform and the position pulse waveform of the motor can be: detecting the working state of the motor based on the current pulse waveform and / or the position pulse waveform of the motor; and obtaining the detection result of the motor based on the working state of the motor.

[0053] The detection result of the motor is obtained based on its operating state. Specifically: when the motor is operating normally, the detection result is that the motor is in a normal state; when the motor is faulty, the detection result is that the motor is in an abnormal state; and when the motor is detected to be in a state of rotor resistance, the detection result is that the motor is in an abnormal state. Here, rotor resistance can be defined as the motor rotor speed being less than the minimum value of a preset range when the motor is operating normally. The preset range can be the range of the motor's speed under normal operating conditions.

[0054] The prompt information may be text, numbers, images, symbols, sounds, etc., and can be used to indicate the abnormal state of the motor.

[0055] For example, when the prompt message is text, it can be displayed on the electronic screen of the device containing the motor, or it can be sent to a device with an electronic screen, such as a mobile phone or tablet. For instance, if the motor's detection result indicates that the motor is in an abnormal state, an "Abnormal State" text prompt message is generated and displayed on the electronic screen of the device containing the motor. It should be understood that this is only one possible example; in actual processing, other methods can be used to display the prompt message, which will not be exhaustively listed here.

[0056] By adopting the above scheme, the operating status of the motor can be obtained during its operation, enabling alerts when the motor is in an abnormal operating state. This allows for proactive measures to be taken before the motor completely fails to operate normally, ensuring the normal operation of the equipment containing the motor. Specifically, according to Nyquist's law, to recover the original signal without distortion from the sampled signal, the sampling frequency should be greater than twice the highest frequency of the original signal. However, the sampling rate of a typical MCU's ADC (Analog-to-Digital Converter) is relatively low, and its sampling frequency cannot reach more than twice the highest frequency of the motor's voltage change. By using a voltage comparator to convert the motor's voltage change into a current pulse signal and capturing this current pulse signal through the MCU's I / O interface, a sampling frequency greater than twice the highest frequency of the motor's voltage change can be achieved, thus enabling the distortion-free recovery of the motor's voltage change frequency from the current pulse waveform.

[0057] In some possible implementations, acquiring the motor's current pulse waveform can also be achieved by using a sampling chip. The sampling chip can be a dedicated chip with a high sampling rate.

[0058] In some possible implementations, generating a prompt message when the detection result of the motor indicates that the motor is in an abnormal state includes one of the following: generating a first prompt message when the detection result of the motor indicates that the motor is in a first abnormal state, the first prompt message being used to indicate that the motor is currently in an abnormal state of motor fault type; generating a second prompt message when the detection result of the motor indicates that the motor is in a second abnormal state, the second prompt message being used to indicate that the motor is currently in an abnormal state of motor resistance type.

[0059] When the detection result of the motor indicates that the motor is in a first abnormal state, generating the first prompt information may be: determining that the motor is in a fault state based on the current pulse waveform of the motor and / or the position pulse waveform of the motor; determining that the motor is in a first abnormal state when the motor is in a fault state; and generating the first prompt information when the motor is determined to be in the first abnormal state.

[0060] For example, if the motor is determined to be in a fault state based on the motor's current pulse waveform and / or the motor's position pulse waveform, the detection result of the motor indicates that the motor is in a first abnormal state, generating a text prompt message "Abnormal State: Motor Fault," and displaying the text prompt message on the electronic screen of the device where the motor is located. It should be understood that this is only one possible example; in actual processing, other methods can be used to display the prompt message, which will not be exhaustively listed here.

[0061] When the detection result of the motor indicates that the motor is in a second abnormal state, generating the second prompt information may be: determining that the motor is resisting rotation based on the current pulse waveform of the motor and / or the position pulse waveform of the motor; determining that the detection result of the motor indicates that the motor is in a second abnormal state when the motor is resisting rotation; and generating the second prompt information when the motor is in a second abnormal state.

[0062] By adopting the above scheme, the working status of the motor can be obtained during the operation of the motor. When the motor is in an abnormal working state, the type of abnormal working state of the motor can be indicated, and the type of abnormal working state of the motor can be determined. Thus, the motor can be dealt with in advance before it completely fails to work normally, so as to ensure the normal operation of the equipment where the motor is located.

[0063] In some possible implementations, obtaining the detection result of the motor based on the current pulse waveform and the position pulse waveform includes: obtaining the high-low level time ratio of the current pulse based on the current pulse waveform; obtaining the high-low level time ratio of the position pulse based on the position pulse waveform; and obtaining the detection result of the motor as the motor being in an abnormal state when the high-low level time ratio of the current pulse is not within a first preset range and / or the high-low level time ratio of the position pulse is not within a second preset range.

[0064] The step of obtaining the high-low level time ratio of the current pulse based on the current pulse waveform includes: obtaining the high level duration and low level duration based on one or more current pulse waveforms; and obtaining the high-low level time ratio of the current pulse waveform based on the ratio of the high level duration to the low level duration.

[0065] The process of obtaining the high-level duration and low-level duration based on one or more current pulse waveforms includes one of the following:

[0066] When there is only one current pulse waveform, the duration of the high level in the current pulse waveform is taken as the high level duration, and the duration of the low level in the current pulse waveform is taken as the low level duration.

[0067] When there are multiple current pulse waveforms, the duration of the high level in each current pulse waveform is obtained, and the duration of the high level in each current pulse waveform is added together to obtain the high level duration; the duration of the low level in each current pulse waveform is obtained, and the duration of the low level in each current pulse waveform is added together to obtain the low level duration.

[0068] When there are multiple current pulse waveforms, the duration of the high level in each current pulse waveform is obtained, and the duration of the high level in each current pulse waveform is added together and then averaged to obtain the high level duration; the duration of the low level in each current pulse waveform is obtained, and the duration of the low level in each current pulse waveform is added together and then averaged to obtain the low level duration.

[0069] Where there are multiple current pulse waveforms, these multiple current pulse waveforms are consecutive current pulse waveforms within a specified duration; or, these multiple current pulse waveforms are multiple current pulse waveforms selected based on a preset configuration. The preset configuration may include one or more time intervals; correspondingly, the multiple current pulse waveforms selected based on the preset configuration may refer to one or more current pulse waveforms selected within each of the one or more time intervals.

[0070] Each of the aforementioned current pulse waveforms may include a sustained high level and its adjacent sustained low level.

[0071] The step of obtaining the high-low level time ratio of the position pulse based on the position pulse waveform includes: obtaining the high level duration and low level duration based on one or more position pulse waveforms; and obtaining the high-low level time ratio of the position pulse waveform based on the ratio of the high level duration to the low level duration.

[0072] The process of obtaining the high-level duration and low-level duration based on one or more position pulse waveforms includes one of the following:

[0073] When there is only one position pulse waveform, the duration of the high level in the position pulse waveform is taken as the high level duration, and the duration of the low level in the position pulse waveform is taken as the low level duration.

[0074] When there are multiple position pulse waveforms, the duration of the high level in each position pulse waveform is obtained, and the duration of the high level in each position pulse waveform is added together to obtain the high level duration; the duration of the low level in each position pulse waveform is obtained, and the duration of the low level in each position pulse waveform is added together to obtain the low level duration.

[0075] When there are multiple position pulse waveforms, the duration of the high level in each position pulse waveform is obtained, and the duration of the high level in each position pulse waveform is added together and then averaged to obtain the high level duration; the duration of the low level in each position pulse waveform is obtained, and the duration of the low level in each position pulse waveform is added together and then averaged to obtain the low level duration.

[0076] When there are multiple position pulse waveforms, these multiple position pulse waveforms are consecutive position pulse waveforms within a specified duration; or, these multiple position pulse waveforms are multiple position pulse waveforms selected based on a preset configuration. The preset configuration may include one or more time intervals; correspondingly, the multiple position pulse waveforms selected based on the preset configuration may refer to one or more position pulse waveforms selected within each of the one or more time intervals.

[0077] The pulse waveform at each of the aforementioned positions may include a continuous high level and its adjacent continuous low level.

[0078] The high-low level time ratio of the current pulse is not outside the first preset range if: the high-low level time ratio of the current pulse is greater than the highest value of the first preset range, or the high-low level time ratio of the current pulse is less than the lowest value of the first preset range.

[0079] The high-low level time ratio of the position pulse not being outside the second preset range can be: the high-low level time ratio of the position pulse is greater than the highest value of the second preset range, or the high-low level time ratio of the position pulse is less than the lowest value of the second preset range.

[0080] By adopting the above scheme, the operating status of the motor can be obtained through the high and low level time ratio of the current pulse waveform and / or the high and low level time ratio of the position pulse during the operation of the motor. This enables the motor to provide a warning when it is in an abnormal operating state, thereby allowing the motor to be dealt with in advance before it completely fails to work properly, so as to ensure the normal operation of the equipment containing the motor.

[0081] In some possible implementations, when the high-low level duration ratio of the current pulse is not within a first preset range and / or the high-low level duration ratio of the position pulse is not within a second preset range, the detection result of the motor is determined to be that the motor is in an abnormal state, including one of the following: when the high-low level duration ratio of the current pulse is within the first preset range and the high-low level duration ratio of the position pulse is not within the second preset range, the detection result of the motor is determined to be that the motor is in the first abnormal state; when the high-low level duration ratio of the current pulse is not within the first preset range and the high-low level duration ratio of the position pulse is within the second preset range, the detection result of the motor is determined to be that the motor is in the first abnormal state; when the high-low level duration ratio of the current pulse is greater than the highest value of the first preset range and the high-low level duration ratio of the position pulse is less than the second preset range. If the current pulse high / low level time ratio is less than the lowest value of the first preset range, and the position pulse high / low level time ratio is greater than the highest value of the second preset range, the motor is detected as being in the first abnormal state. If the current pulse high / low level time ratio is less than the lowest value of the first preset range, and the position pulse high / low level time ratio is less than the lowest value of the second preset range, the motor is detected as being in the first abnormal state. If the current pulse high / low level time ratio is greater than the highest value of the first preset range, and the position pulse high / low level time ratio is greater than the highest value of the second preset range, the motor is detected as being in the second abnormal state.

[0082] The high-low level time ratio of the current pulse can be within a first preset range as follows: the high-low level time ratio of the current pulse is greater than or equal to the lowest value of the first preset range, and the high-low level time ratio of the current pulse is less than or equal to the highest value of the first preset range.

[0083] The high-low level time ratio of the position pulse can be within a second preset range as follows: the high-low level time ratio of the position pulse is greater than or equal to the lowest value of the second preset range, and the high-low level time ratio of the position pulse is less than or equal to the highest value of the second preset range.

[0084] In one example, determining that the motor is in the first abnormal state when the high-low level duration ratio of the current pulse is within a first preset range and the high-low level duration ratio of the position pulse is not within a second preset range can be achieved by: determining that the motor is faulty when the high-low level duration ratio of the current pulse is within a first preset range and the high-low level duration ratio of the position pulse is not within a second preset range; and determining that the motor is in the first abnormal state when the motor is faulty.

[0085] Optionally, if the high-low level duration ratio of the current pulse is within a first preset range and the high-low level duration ratio of the position pulse is not within a second preset range, at least one component in the motor assembly is determined to be faulty. If at least one component in the motor assembly is faulty, the detection result of the motor is determined to be that the motor is in the first abnormal state. The motor assembly may include: a voltage comparator, a position sensor, an MCU, and a motor drive circuit.

[0086] In one example, determining that the motor is in the first abnormal state when the high-low level duration ratio of the current pulse is not within a first preset range and the high-low level duration ratio of the position pulse is within a second preset range can be as follows: when the high-low level duration ratio of the current pulse is not within the first preset range and the high-low level duration ratio of the position pulse is within the second preset range, determine that the motor is faulty; and when the motor is faulty, determine that the motor is in the first abnormal state.

[0087] Optionally, if the high-low level time ratio of the current pulse is not within a first preset range and the high-low level time ratio of the position pulse is within a second preset range, at least one component of the motor assembly is determined to be faulty. If at least one component of the motor assembly is faulty, the detection result of the motor is obtained as the motor being in the first abnormal state.

[0088] In one example, determining that the motor is in the first abnormal state when the high-low level time ratio of the current pulse is greater than the highest value of the first preset range and the high-low level time ratio of the position pulse is less than the lowest value of the second preset range can be as follows: when the high-low level time ratio of the current pulse is greater than the highest value of the first preset range and the high-low level time ratio of the position pulse is less than the lowest value of the second preset range, the motor is determined to be faulty; in the case of a motor fault, the detection result of the motor is determined to be that the motor is in the first abnormal state.

[0089] Optionally, if the high-low level time ratio of the current pulse is greater than the highest value of the first preset range and the high-low level time ratio of the position pulse is less than the lowest value of the second preset range, then at least one component of the motor assembly is determined to be faulty. If at least one component of the motor assembly is faulty, then the detection result of the motor is that the motor is in the first abnormal state.

[0090] In one example, determining that the motor is in the first abnormal state when the high-low level time ratio of the current pulse is less than the lowest value of the first preset range and the high-low level time ratio of the position pulse is greater than the highest value of the second preset range can be as follows: when the high-low level time ratio of the current pulse is less than the lowest value of the first preset range and the high-low level time ratio of the position pulse is greater than the highest value of the second preset range, the motor group is determined to be faulty; in the case of motor fault, the detection result of the motor is determined to be that the motor is in the first abnormal state.

[0091] Optionally, if the high-low level time ratio of the current pulse is less than the lowest value of the first preset range and the high-low level time ratio of the position pulse is greater than the highest value of the second preset range, then at least one component of the motor assembly is determined to be faulty. If at least one component of the motor assembly is faulty, then the detection result of the motor is that the motor is in the first abnormal state.

[0092] In one example, determining that the motor is in the first abnormal state when the high-low level time ratio of the current pulse is less than the lowest value of the first preset range and the high-low level time ratio of the position pulse is less than the lowest value of the second preset range can be as follows: when the high-low level time ratio of the current pulse is less than the lowest value of the first preset range and the high-low level time ratio of the position pulse is less than the lowest value of the second preset range, determine that the motor is faulty; and when the motor is faulty, determine that the motor is in the first abnormal state.

[0093] Optionally, if the high-low level time ratio of the current pulse is less than the lowest value of the first preset range, and the high-low level time ratio of the position pulse is less than the lowest value of the second preset range, then at least one component in the motor assembly is determined to be faulty. If at least one component in the motor assembly is faulty, then the detection result of the motor is that the motor is in the first abnormal state.

[0094] In one example, determining that the motor is in the second abnormal state when the high-low level time ratio of the current pulse is greater than the highest value of the first preset range and the high-low level time ratio of the position pulse is greater than the highest value of the second preset range can be as follows: when the high-low level time ratio of the current pulse is greater than the highest value of the first preset range and the high-low level time ratio of the position pulse is greater than the highest value of the second preset range, determine that the motor is resisting rotation; when the motor is resisting rotation, determine that the motor is in the second abnormal state.

[0095] By adopting the above scheme, the type of abnormal working state of the motor can be determined by the high and low level time ratio of the current pulse waveform and / or the high and low level time ratio of the position pulse during the operation of the motor. This enables the system to provide a prompt on the type of abnormal working state when the motor is in an abnormal working state, thereby allowing the motor to be preemptively processed before it completely fails to work, thus ensuring the normal operation of the equipment containing the motor.

[0096] In some possible implementations, determining that the motor is in the second abnormal state when the high-low level time ratio of the current pulse is greater than the highest value of a first preset range and the high-low level time ratio of the position pulse is greater than the highest value of a second preset range includes: obtaining the current current value of the motor when the high-low level time ratio of the current pulse is greater than the highest value of a preset range and the high-low level time ratio of the position pulse is greater than the highest value of a preset range; and determining that the motor is in the second abnormal state when the current current value of the motor is greater than a first threshold value.

[0097] The method for obtaining the current current value of the motor can be one of the following:

[0098] The current voltage value from the motor input to the voltage comparator is obtained, and the current current value of the motor is obtained based on the current voltage value;

[0099] The current voltage value from the motor input to the ADC (Analog to Digital Converter) network in the MCU is obtained, and the current current value of the motor is obtained based on the current voltage value.

[0100] It should be understood that after obtaining the current current value of the motor, the process may further include: saving the current current value of the motor in local storage. For example, saving the current current value of the motor in local storage can be done by storing the current current value of the motor along with a time value. Furthermore, since the current value of the motor and the time value are saved in local storage, the locally stored current value of the motor can be used later as a historical current value of the motor.

[0101] Combination Figure 2 and Figure 5 The connection method of the MUC, motor drive circuit 200, motor 210, and power control circuit 500 is illustrated by way of example. The MOTO_VCC_ADC (motor voltage sampling ADC) network of the MUC is connected to resistors R7, R8, and capacitor C6 in the power control circuit 500. The MOTO_VCC (motor voltage current converter) network of the MUC is connected to MOSFET Q2 in the power control circuit 500. Simultaneously, the MOTO_VCC of the MUC is connected to the motor through chip U2 of the motor drive circuit 200. Combined with... Figure 2 and Figure 5An example is given of the method for obtaining the current voltage value from the motor input to the ADC network in the MCU. The current voltage value of resistor R1 in the motor drive circuit 200 that is input to the MCU's MOTO_VCC_ADC network is obtained through the MCU's MOTO_VCC_ADC network. Based on the current voltage value of resistor R1 in the motor drive circuit 200, the current voltage value from the motor input to the MCU's MOTO_VCC_ADC network is obtained.

[0102] The process of obtaining the current voltage value of resistor R1 in the motor drive circuit 200 input to the MOTO_VCC_ADC network further includes: obtaining the current voltage value of resistor R1 in the motor drive circuit 200 input to the MOTO_VCC_ADC network after voltage division by resistors R7 and R8 in the power control circuit 500, and filtering by capacitor C6 in the power control circuit 500. The capacitor C6 ensures that the sampling of the MOTO_VCC_ADC network is noise-free.

[0103] The step of determining that the motor is in the second abnormal state when the current current value of the motor is greater than the first threshold value can be as follows: when the current current value of the motor is greater than the first threshold value, determine that the motor is resisting rotation; when the motor is resisting rotation, determine that the motor is in the second abnormal state.

[0104] The motor stall can be defined as follows: when the motor is in operation, the rotor speed of the motor is 0, which can also be referred to as motor stall.

[0105] By adopting the above scheme, during the operation of the motor, the high and low level duration ratio of the current pulse waveform and / or the high and low level duration ratio of the position pulse, combined with the motor current value, can more accurately determine the motor's resistance state. This enables the system to provide an indication of the resistance type of the abnormal operating state when the motor is in an abnormal operating state, thus allowing for pre-emptive handling of the motor before it completely fails to operate normally, ensuring the normal operation of the equipment containing the motor.

[0106] In some possible implementations, determining that the motor is in the second abnormal state when the current current value of the motor is greater than a first threshold includes: acquiring multiple historical current values ​​of the motor when the current current value of the motor is greater than the first threshold, wherein different historical current values ​​correspond to different acquisition times; determining the average historical current value of the motor based on the multiple historical current values; and determining that the motor is in the second abnormal state when the average historical current value of the motor is greater than a second threshold, wherein the second threshold is greater than or equal to the first threshold.

[0107] Obtaining multiple historical current values ​​of the motor can be achieved by obtaining multiple historical current values ​​of the motor stored locally.

[0108] The step of determining that the motor is in the second abnormal state when the historical average current of the motor is greater than the second threshold can be: determining that the motor is stalled when the historical average current of the motor is greater than the second threshold; and determining that the motor is in the second abnormal state when the motor is stalled.

[0109] By adopting the above scheme, during the operation of the motor, the high and low level duration ratio of the current pulse waveform and / or the high and low level duration ratio of the position pulse, combined with the historical average current value of the motor, can more accurately determine the motor's resistance state. This enables the motor to be alerted to the resistance type of the abnormal operating state when it is in an abnormal operating state, thus allowing for pre-emptive processing of the motor before it completely fails to operate normally, ensuring the normal operation of the equipment containing the motor.

[0110] In some possible implementations, the method may further include: when the current current value of the motor is greater than a first threshold value, controlling the increase of the parameter value of the pulse width modulation signal and starting a timer; wherein the pulse width modulation signal is used to adjust the current of the motor, and the change in the parameter value of the pulse width modulation signal is proportional to the change in the magnitude of the motor current; when the timer expires, controlling the decrease of the parameter value of the pulse width modulation signal; and reacquiring the current pulse waveform and the position pulse waveform of the motor.

[0111] The pulse width modulation signal can be any one of PWM (Pulse width modulation) or SPWM (Sinusoidal Pulse Width Modulation).

[0112] The parameters of the pulse width modulation signal can be at least one of the following: the duty cycle of the pulse width adjustment signal and the pulse frequency. The duty cycle refers to the percentage of time the power-on duration is within a single pulse, and the frequency refers to the number of pulses per unit time.

[0113] The parameter values ​​for controlling the increase of the pulse width modulation signal can be: increasing the duty cycle of the pulse width modulation signal from the current duty cycle value by a preset duty cycle step value to obtain a first target duty cycle value; and / or increasing the frequency of the pulse width modulation signal from the current frequency value by a preset frequency step value to obtain a first target frequency value. Both the preset duty cycle step value and the preset frequency step value can be configured according to actual conditions and are not limited here. It should also be noted that after obtaining the first target duty cycle value obtained in this adjustment, this first target duty cycle value can be used as the current duty cycle value in the next adjustment process. Furthermore, after obtaining the first target frequency value obtained in this adjustment, this first target frequency value can be used as the current frequency value in the next adjustment process.

[0114] Furthermore, the aforementioned control of reducing the parameter value of the pulse width modulation signal can refer to: reducing the duty cycle of the pulse width modulation signal from the current duty cycle value by a preset duty cycle step value to obtain a second target duty cycle value; and / or, reducing the frequency value of the pulse width modulation signal from the current frequency value by a preset frequency step value to obtain a second target frequency value. It should also be noted that after obtaining the second target duty cycle value obtained in this adjustment, this second target duty cycle value can be used as the current duty cycle value in the next adjustment process; similarly, after obtaining the second target frequency value obtained in this adjustment, this second target frequency value can be used as the current frequency value in the next adjustment process.

[0115] The proportionality between the changes in the parameters of the pulse width modulation signal and the changes in the motor current can be as follows: the duty cycle of the pulse width modulation signal is proportional to the energizing time in each energizing cycle of the motor; the frequency of the pulse width modulation signal is proportional to the energizing frequency of the motor. For example, when the duty cycle of the pulse width modulation signal is increased from 50% to 60%, the energizing time in each energizing cycle of the motor increases from 50% to 60%; when the frequency of the pulse width modulation signal is increased from 10 pulse cycles per second to 15 pulse cycles per second, the energizing frequency of the motor increases from 10 energizations per second to 15 energizations per second.

[0116] Whether the aforementioned timing duration has expired can be determined based on a threshold. Specifically, if the timing duration is greater than or equal to the threshold, the timing duration is determined to have expired. The threshold can be any preset duration. For example, the timing threshold could be 1 minute.

[0117] When the control reduces the parameter value of the pulse width modulation signal, the method may further include: stopping the timing.

[0118] Combination Figure 2 An example is provided to illustrate the connection method between the MCU and the motor. The IN1 interface of the MCU is connected to pin 203 (IN1) of chip U2 in the motor drive circuit 200. The IN2 interface of the MCU is connected to pin 202 (IN2) of chip U2 in the motor drive circuit 200. Pins 206 (OUT1) and 208 (OUT2) of chip U2 in the motor drive circuit 200 are connected to the motor.

[0119] Combination Figure 2 The parameter selection method for the control pulse width modulation signal is illustrated by way of example. When the MCU's interface IN1 outputs a pulse via the PWM control signal, the energizing time of pin 206 (OUT1) of chip U2 in each cycle of energizing the motor is adjusted based on the duty cycle of the output pulse of interface IN1. Correspondingly, when the MCU's interface IN1 outputs a pulse via the PWM control signal, the energizing frequency of pin 206 (OUT1) of chip U2 in energizing the motor is adjusted based on the frequency of the output pulse of interface IN1. When the MCU's interface IN1 outputs a pulse, the rotor in the motor rotates in the forward direction.

[0120] Alternatively, when the MCU's interface IN2 outputs pulses via a PWM control signal, the energizing time of pin 208 (OUT2) of chip U2 in each cycle of energizing the motor is adjusted based on the duty cycle of the IN2 output pulses. Correspondingly, when the MCU's interface IN2 outputs pulses via a PWM control signal, the energizing frequency of pin 208 (OUT2) of chip U2 in energizing the motor is adjusted based on the frequency of the IN2 output pulses. When the MCU's interface IN2 outputs pulses, the rotor in the motor rotates in the reverse direction.

[0121] The re-acquisition of the motor's current pulse waveform and position pulse waveform can be achieved by re-executing the method for acquiring the motor's current pulse waveform and position pulse waveform as described in the previous embodiment; this step is repeated.

[0122] Furthermore, when determining whether the motor's detection result is in the second abnormal state, it is necessary to obtain multiple historical current values ​​of the motor. As explained in the preceding embodiments, these multiple historical current values ​​refer to the multiple historical current values ​​of the motor stored locally. Combining the aforementioned processes of increasing and decreasing the parameter values ​​of the pulse width modulation signal, the multiple historical current values ​​of the motor stored locally can be one of the following: the historical current value of the motor stored locally in each of the multiple historical moments from the first moment to the current moment; or the historical current value of the motor stored locally in each of the multiple historical moments from the second moment to the current moment after the adjustment of the pulse width modulation signal's parameter values ​​is completed.

[0123] The time difference between the first moment and the current moment is preset, such as 10 minutes, 1 minute, or longer or shorter, and is not exhaustively listed. Correspondingly, in each of the multiple historical moments from the first moment to the current moment, the locally stored historical current value of the motor may include the parameter value of the pulse width modulation signal adjusted in this instance, or may not include the parameter value of the pulse width modulation signal adjusted in this instance, both of which are within the protection scope of this embodiment.

[0124] Wherein, the second moment is the moment when the parameter value of the pulse width modulation signal is increased this time. Correspondingly, in each of the multiple historical moments from the second moment to the current moment, the historical current value of the motor stored locally may only include multiple historical current values ​​of the motor within the time domain range of the current adjustment of the parameter value of the pulse width modulation signal.

[0125] The aforementioned adjustment of the parameter values ​​of the pulse width modulation signal includes: the processing of increasing the parameter values ​​of the pulse width modulation signal and the processing of decreasing the parameter values ​​of the pulse width modulation signal.

[0126] By adopting the above scheme, it is possible to determine that the motor is in a state of resistance during the operation of the motor. The current of the motor is increased by pulse width modulation signal, thereby increasing the power of the motor and enabling the motor to overcome the resistance state, so as to ensure the normal operation of the equipment where the motor is located. Furthermore, the time for increasing the power of the motor is controlled by timing method to avoid the motor from running at high current for a long time and burning out the motor.

[0127] In some possible implementations, the method may further include: obtaining the number of times the parameter value of the pulse width modulation signal is increased; and if the number is greater than or equal to a preset number, obtaining the detection result of the motor as the motor being in the first abnormal state.

[0128] Before obtaining the number of times to increase the parameter value of the pulse width modulation signal, the method may further include: determining whether the historical average current value of the motor is greater than a second threshold value. Accordingly, obtaining the number of times to increase the parameter value of the pulse width modulation signal refers to obtaining the number of times to increase the parameter value of the pulse width modulation signal when the historical average current value of the motor is not greater than the second threshold value.

[0129] The aforementioned preset number of times can be set according to the actual situation, such as 10 times, 5 times, more or less, which will not be exhaustively listed here.

[0130] The number of times the parameter value of the pulse width modulation signal is obtained can be: obtaining the number of times the parameter value of the pulse width modulation signal is obtained from local storage.

[0131] The method for recording the number of times the parameter value of the pulse width modulation signal is increased can be: when the number of times the parameter value of the pulse width modulation signal is increased, the number stored locally is incremented by 1.

[0132] Figure 6 This is a possible schematic flowchart of a motor detection method according to an embodiment of this application. The method includes at least some of the following.

[0133] S601. Obtain the motor current pulse waveform and the motor position pulse waveform.

[0134] S602. Based on the current pulse waveform of the motor, obtain the high-low level time ratio of the current pulse; based on the position pulse waveform of the motor, obtain the high-low level time ratio of the position pulse.

[0135] S603. When the high-low level time ratio of the current pulse is greater than the highest value of the first preset range, and the high-low level time ratio of the position pulse is greater than the highest value of the second preset range, the current value of the motor is obtained.

[0136] S604. Determine whether the current current value of the motor is greater than the first threshold value. If it is not greater, return to execute S601; if it is greater, execute S605.

[0137] S605: Control the parameter values ​​of the pulse width modulation signal and start the timing.

[0138] S606. If the timing duration expires, control the parameter value of the pulse width modulation signal to be reduced, and turn off the timing. Then execute S601 again and continue to execute S607.

[0139] S607. Obtain multiple historical current values ​​of the motor.

[0140] The method for obtaining multiple historical current values ​​of the motor has been described in detail in the aforementioned embodiments and will not be repeated here.

[0141] S608. Based on multiple historical current values ​​of the motor, determine the average historical current of the motor.

[0142] S609. Determine whether the historical average current of the motor is greater than the second threshold value. If it is, execute S610; otherwise, execute S611.

[0143] S610. If the historical average current of the motor is greater than the second threshold, generate a second prompt message. The second prompt message is used to indicate that the motor is currently in an abnormal state of stall.

[0144] S611. Obtain the number of times the parameter value of the pulse width modulation signal is increased.

[0145] S612. If the number of times is greater than or equal to the preset number of times, the detection result of the motor is that the motor is in the first abnormal state.

[0146] By adopting the above scheme, the operating status of the motor can be obtained by adjusting the parameter value of the pulse width adjustment signal multiple times during the motor's operation. This enables the system to provide a warning when the motor is in an abnormal operating state, thus allowing for preemptive action on the motor before it completely fails to operate normally, ensuring the normal operation of the equipment containing the motor.

[0147] In some possible implementations, a first speed of the motor is obtained based on the current pulse waveform; a second speed of the motor is obtained based on the position pulse waveform; and if the absolute value of the difference between the first speed and the second speed of the motor is greater than a threshold, the detection result of the motor is that the motor is in the first abnormal state.

[0148] The process of obtaining the first speed of the motor based on the current pulse waveform can be as follows: obtaining the number of current pulse waveforms based on the current pulse waveforms within a first time period; and obtaining the first speed of the motor based on the number of current pulse waveforms.

[0149] The process of obtaining the second speed of the motor based on the position pulse waveform can be as follows: obtaining the number of position pulse waveforms based on the position pulse waveforms within a first time period; and obtaining the second speed of the motor based on the number of position pulse waveforms.

[0150] For example, when the number of current pulse waveforms is 100, the motor rotor rotates one revolution; further, when the number of current pulse waveforms is 500 within 1 second, the motor speed is 5 revolutions per second. It should be understood that this is only one possible example, and in actual processing, other methods can be used to achieve the same result, which will not be exhaustively listed here.

[0151] The step of determining that the motor is in the first abnormal state when the absolute value of the difference between the first speed and the second speed of the motor is greater than a threshold can be as follows: if the absolute value of the difference between the first speed and the second speed of the motor is greater than a threshold within a first time period, the motor is determined to be faulty; and if the motor is faulty, the motor is determined to be in the first abnormal state.

[0152] The step of determining that the motor is in the first abnormal state when the absolute value of the difference between the first speed and the second speed of the motor is greater than a threshold can also be: when the absolute value of the difference between the first speed and the second speed of the motor is greater than a threshold within a first time period, at least one component of the motor assembly is determined to be faulty; and when at least one component of the motor assembly is faulty, the motor is determined to be in the first abnormal state.

[0153] For example, if the difference between the second speed and the first speed of the motor is greater than a threshold, it is determined that the Hall sensor in the motor assembly or the magnet at the center shaft end of the motor is faulty; if it is determined that the Hall sensor in the motor assembly or the magnet at the center shaft end of the motor is faulty, the detection result of the motor is that the motor is in the first abnormal state.

[0154] In one example, the method further includes: determining a motor fault when the high-low level time ratio of the current pulse waveform is greater than the highest value of a first preset range, the high-low level time ratio of the position pulse is greater than the highest value of a second preset range, and the absolute value of the difference between the first speed and the second speed of the motor is greater than a threshold; and in the case of a motor fault, obtaining the detection result of the motor as the motor being in the first abnormal state.

[0155] In one example, the method further includes: determining that at least one component in the motor is faulty when the high-low level time ratio of the current pulse waveform is greater than the highest value of a first preset range, the high-low level time ratio of the position pulse is greater than the highest value of a second preset range, and the absolute value of the difference between the first speed and the second speed of the motor is greater than a threshold; and obtaining the detection result of the motor as the motor being in the first abnormal state when at least one component in the motor is faulty.

[0156] By adopting the above scheme, the operating status of the motor can be obtained by measuring the number of pulses in the current pulse waveform and the number of pulses in the position pulse waveform during the motor's operation. This enables the system to provide a warning when the motor is in an abnormal operating state, allowing for preemptive action to be taken before the motor completely fails to operate normally, thus ensuring the normal operation of the equipment containing the motor.

[0157] In some possible implementations, acquiring the motor current pulse waveform and the motor position pulse waveform includes: acquiring the motor current pulse waveform and the motor position pulse waveform upon receiving a start signal for the motor; the method further includes: obtaining the number of motor current pulses and the number of motor position pulses based on the motor current pulse waveform and the motor position pulse waveform; and determining that the motor is in normal operating condition when the number of motor current pulses is greater than or equal to a first threshold and the number of motor position pulses is greater than or equal to a second threshold.

[0158] Upon receiving an activation signal for the motor, acquiring the motor's current pulse waveform and position pulse waveform can be achieved by: receiving an activation signal for the motor based on user operation; and acquiring the motor's current pulse waveform and position pulse waveform upon receiving the activation signal. The user's operation on the motor can be pressing a power button, which can be a physical button or a virtual button; not all button types will be described in detail here.

[0159] After receiving the start signal for the motor, the method further includes: adjusting the parameter value of the pulse width modulation signal to a preset value.

[0160] The process of obtaining the number of current pulses and the number of position pulses of the motor based on the current pulse waveform and the position pulse waveform of the motor, and determining that the motor is in normal working condition when the number of current pulses is greater than or equal to a first threshold and the number of position pulses is greater than or equal to a second threshold, can be as follows: Obtaining the number of current pulses and the number of position pulses of the motor based on the current pulse waveform and the position pulse waveform of the motor; obtaining the current speed of the motor based on the number of current pulses or the number of position pulses; determining the number of current pulses and the number of position pulses of the motor when the current speed of the motor is within the threshold range; and determining that the motor is in normal working condition when the number of current pulses is greater than or equal to the first threshold and the number of position pulses is greater than or equal to the second threshold. The process of obtaining the current speed of the motor can be based on the number of current pulses or the number of position pulses of the motor per unit time.

[0161] After determining the current speed of the motor based on the number of current pulses or the number of position pulses, the method further includes: if the current speed of the motor is not within a threshold range, adjusting the parameter values ​​of the pulse width modulation signal through PID control (Proportional Integral Differential regulating or On-Off Regulating); adjusting the parameter values ​​of the pulse width modulation signal through PID control to bring the current speed of the motor within the threshold range. The process of adjusting the parameter values ​​of the pulse width modulation signal through PID control is not detailed here.

[0162] After determining that the motor is in normal operating condition when the number of current pulses of the motor is greater than or equal to a first threshold and the number of position pulses of the motor is greater than or equal to a second threshold, the method further includes: stopping the output of pulse width modulation signals and stopping the motor from operating. The first threshold may be a preset number of current pulse waveforms, and the second threshold may be a preset number of position pulse waveforms.

[0163] Combination Figure 7 The schematic flowchart illustrates the first threshold and the second threshold in this embodiment, and provides a detailed explanation. When the device containing the motor is a smart door lock, the methods for obtaining the first threshold and the second threshold can be as follows:

[0164] S701. When the motor is powered on for the first time, control the motor to run until the locking tongue of the device where the motor is located is fully extended, and then control the motor to run until the locking tongue of the device where the motor is located is fully retracted.

[0165] S702. During the retraction of the latch of the device where the motor is located, the number of current pulse waveforms and the number of position pulse waveforms of the motor are obtained.

[0166] The duration of the latch retraction process of the device containing the motor is fixed, so the number of current pulse waveforms and the number of position pulse waveforms of the motor are also fixed.

[0167] S703. Based on the number of current pulse waveforms of the motor, the first speed of the motor is obtained; based on the number of position pulse waveforms of the motor, the second speed of the motor is obtained.

[0168] S704. Determine whether the absolute value of the difference between the motor's first speed and the motor's second speed is less than or equal to a threshold. If it is less than or equal to a threshold, proceed to step S705; if it is greater than a threshold, proceed to step S707.

[0169] S705. If the absolute value of the difference between the first speed and the second speed of the motor is less than or equal to a threshold, the detection result of the motor indicates that the motor is in a normal state.

[0170] S706. If the detection result of the motor indicates that the motor is in a normal state, set the number of current pulse waveforms to a first threshold, set the number of position pulse waveforms to a second threshold, and store the first threshold and the second threshold locally.

[0171] S707. If the absolute value of the difference between the first speed and the second speed of the motor is greater than the threshold, the detection result of the motor is that the motor is in the first abnormal state.

[0172] Combination Figure 8 The schematic flowchart illustrates this embodiment, which is described in detail when the device containing the motor is a smart door lock:

[0173] S801, Received a signal to start the motor.

[0174] The motor's start signal can be either an unlock signal or a lock signal from the device on which the motor is located.

[0175] S802, Adjust the parameters of the pulse width modulation signal to the preset values.

[0176] S803. Obtain the number of current pulse waveforms and the number of position pulse waveforms of the motor.

[0177] S804. Based on the number of current pulse waveforms of the motor or the number of position pulse waveforms of the motor, the current speed of the motor is obtained.

[0178] S805. Determine whether the current speed of the motor is within the threshold range; if it is within the threshold range, execute S806; if it is not within the threshold range, adjust the parameter value of the pulse width modulation signal in S802 through PID control, and continue to execute S803.

[0179] S806. If the number of current pulse waveforms of the motor is greater than or equal to a first threshold, and the number of position pulse waveforms of the motor is greater than or equal to a second threshold, then the motor is determined to be in normal operating condition.

[0180] S807, Stop outputting pulse width modulation signal, motor stops running.

[0181] By adopting the above scheme, the operating status of the motor can be obtained by measuring the number of pulses in the current pulse waveform and the number of pulses in the position pulse waveform during the motor's start-up process. This enables the system to provide a warning when the motor is in an abnormal operating state, allowing for preemptive action to be taken before the motor completely fails to operate normally, thus ensuring the normal operation of the equipment containing the motor.

[0182] It should be understood that the methods for obtaining the detection results of the motor in the foregoing embodiments are merely illustrative examples. In actual processing, more methods can be used to obtain the detection results of the motor. For example, the operating temperature of the motor driver chip and / or the operating temperature of the motor can also be obtained. If the operating temperature of the motor driver chip and / or the operating temperature of the motor are greater than a first temperature threshold, the detection result of the motor is that the motor is in the first abnormal state. The method for obtaining the operating temperature of the motor driver chip and / or the operating temperature of the motor can be: based on a temperature sensor, obtaining the operating temperature of the motor driver chip and / or the operating temperature of the motor.

[0183] In some possible implementations, the method may further include: generating a third prompt message and shutting off the power supply to the motor when the detection result of the motor indicates that the motor is in a third abnormal state; the third prompt message is used to indicate that the motor is in a third abnormal state.

[0184] In one possible example, the method further includes determining that the motor is in a third abnormal state if the operating temperature of the motor driver chip and / or the operating temperature of the motor are greater than a second temperature threshold. In this example, the third abnormal state may refer to the motor currently being in an over-temperature type abnormal state.

[0185] In another possible example, the method further includes: obtaining the current current value of the motor; and if the current current value of the motor is greater than a third threshold, determining that the detection result of the motor is a third abnormal state; wherein the third threshold is greater than a second threshold. Here, the third abnormal state may refer to the motor currently being in an overcurrent-type abnormal state.

[0186] The step of determining the motor's detection result as a third abnormal state when the current current value of the motor is greater than the third threshold can be: determining that the motor is overcurrent when the current current value of the motor is greater than the third threshold; and determining that the motor is in a third abnormal state when the motor is overcurrent.

[0187] The method of shutting off the power supply to the motor can be: shutting off the power supply to the motor drive circuit through the MCU's MOTO_VCC_CON (motor VoltCurrentCondenser connector) interface; or shutting off the power supply to the motor while shutting off the power supply to the motor drive circuit.

[0188] Combination Figure 2 and Figure 5 The connection method between the MCU's MOTO_VCC_CON interface and the motor drive circuit is illustrated by way of example. The MCU's MOTO_VCC_CON interface is connected to the motor drive circuit 200 through the power control circuit 500. Specifically, the MCU's MOTO_VCC_CON is connected to MOSFET Q1 in the power control circuit 500, MOSFET Q1 is connected to MOSFET Q2 in the power control circuit 500, and MOSFET Q2 in the power control circuit 500 is connected to pin 205 of chip U2 in the motor drive circuit.

[0189] Combination Figure 2 and Figure 5An example is provided regarding the method of shutting off the power supply to the motor drive circuit 200 via the MCU's MOTO_VCC_CON interface. When the MCU's MOTO_VCC_CON interface outputs a low level, MOSFET Q1 in the power control circuit 500 is in a high-impedance state. When MOSFET Q1 is in a high-impedance state, MOSFET Q2 is in a high-impedance state. When MOSFET Q2 is in a high-impedance state, the power control circuit 500 shuts off the supply of VCC (Volt Current Condenser power supply) to pin 205 of chip U2 in the motor drive circuit 200.

[0190] Combination Figure 2 and Figure 5 The method of powering the motor drive circuit 200 via the MCU's MOTO_VCC_CON is illustrated below. When the MCU's MOTO_VCC_CON interface outputs a high level, the MOSFET Q1 in the power control circuit 500 is turned on. With MOSFET Q1 turned on, the gate voltage of MOSFET Q2 is pulled low after voltage division by resistors R4 and R5. With the gate voltage of MOSFET Q2 pulled low, MOSFET Q2 is turned on. With MOSFET Q2 turned on, power is supplied to pin 205 of chip U2 in the motor drive circuit 200 via VCC. The motor drive circuit 200 also includes capacitor C1 to filter the power supply to the power control circuit 500.

[0191] In one example, the power supply method of the MCU is also included. Specifically, the MCU is powered by a voltage regulator circuit. The voltage regulator circuit can be an LDO (low dropout regulator) or any other power supply unit, as long as it can ensure the MCU functions normally and provides a stable power output.

[0192] In one example, the current current value of the motor is obtained; if the current current value of the motor is greater than a fourth threshold value, the power supply to the motor is turned off, the fourth threshold value being greater than or equal to a third threshold value.

[0193] In one example, the method of shutting off the power supply to the motor may be: shutting off the power supply to the motor drive circuit through the protection circuit of the motor drive chip itself; and shutting off the power supply to the motor when the power supply to the motor drive circuit is shut off.

[0194] In one example, the method of shutting off the power supply to the motor can be: shutting off the power supply to the motor drive circuit via a voltage comparison circuit. The voltage comparison circuit can be a hardware voltage comparison circuit.

[0195] Combination Figure 2 The method of shutting off the power supply to the motor drive circuit through the protection circuit of the motor drive chip itself is illustrated by way of example. Pin 207 of chip U2 in motor drive circuit 200 obtains the current current value of the motor based on the voltage value of resistor R1 in the motor drive circuit. If the current current value of the motor is greater than a fourth threshold value, chip U2 in motor drive circuit 200 shuts off the power supply to the motor drive circuit through its own protection circuit. The fourth threshold value is provided by pin 304 of chip U2.

[0196] Figure 2 The chip U2 in the motor drive circuit 200 also includes pins 201 and 209, wherein pin 201 is used for grounding and pin 209 is used for heat dissipation.

[0197] Figure 2 The motor drive circuit 200 also includes a capacitor C5, which is used to filter the motor current.

[0198] A second aspect of this disclosure provides a motor testing device, wherein the motor testing device is used to perform the motor testing method provided in the first aspect of this disclosure.

[0199] Specifically, the motor detection device is as follows: Figure 9 As shown, it may include:

[0200] The pulse waveform acquisition module 901 is used to acquire the current pulse waveform and the position pulse waveform of the motor.

[0201] The detection module 902 is used to obtain the detection result of the motor based on the current pulse waveform and the position pulse waveform of the motor;

[0202] The prompt information generation module 903 is used to generate prompt information when the detection result of the motor indicates that the motor is in an abnormal state; wherein, the prompt information is used to indicate the type of abnormal state that the motor is currently in.

[0203] In some possible implementations, the prompt message generation module 903 is configured to perform one of the following:

[0204] If the detection result of the motor indicates that the motor is in a first abnormal state, a first prompt message is generated, which is used to indicate that the motor is currently in an abnormal state of a fault type.

[0205] If the detection result of the motor indicates that the motor is in a second abnormal state, a second prompt message is generated. The second prompt message is used to indicate that the motor is currently in an abnormal state of resistance type.

[0206] In some possible implementations, the detection module 902 is used to obtain the high-low level time ratio of the current pulse based on the current pulse waveform; to obtain the high-low level time ratio of the position pulse based on the position pulse waveform; and to obtain the detection result of the motor as the motor being in an abnormal state when the high-low level time ratio of the current pulse is not within a first preset range and / or the high-low level time ratio of the position pulse is not within a second preset range.

[0207] In some possible implementations, the detection module 902 is configured to perform one of the following:

[0208] If the high-low level time ratio of the current pulse is within a first preset range and the high-low level time ratio of the position pulse is not within a second preset range, the detection result of the motor is that the motor is in the first abnormal state.

[0209] If the high-low level time ratio of the current pulse is not within the first preset range and the high-low level time ratio of the position pulse is within the second preset range, the detection result of the motor is that the motor is in the first abnormal state.

[0210] When the high-low level time ratio of the current pulse is greater than the highest value of the first preset range, and the high-low level time ratio of the position pulse is less than the lowest value of the second preset range, the detection result of the motor is that the motor is in the first abnormal state.

[0211] When the high-low level time ratio of the current pulse is less than the lowest value of the first preset range, and the high-low level time ratio of the position pulse is greater than the highest value of the second preset range, the detection result of the motor is that the motor is in the first abnormal state.

[0212] When the high-low level time ratio of the current pulse is less than the lowest value of the first preset range, and the high-low level time ratio of the position pulse is less than the lowest value of the second preset range, the detection result of the motor is that the motor is in the first abnormal state.

[0213] If the high-low level time ratio of the current pulse is greater than the highest value of the first preset range, and the high-low level time ratio of the position pulse is greater than the highest value of the second preset range, the detection result of the motor is that the motor is in the second abnormal state.

[0214] In some possible implementations, in Figure 9 On the basis of, such as Figure 10 As shown, it also includes:

[0215] The current acquisition module 1001 is used to acquire the current value of the motor when the high-low level time ratio of the current pulse is greater than the highest value of the first preset range and the high-low level time ratio of the position pulse is greater than the highest value of the second preset range.

[0216] The detection module 902 is used to determine that the motor is in the second abnormal state when the current current value of the motor is greater than the first threshold value.

[0217] In some possible implementations, the current acquisition module 1001 is used to acquire multiple historical current values ​​of the motor when the current current value of the motor is greater than a first threshold value, wherein different historical current values ​​correspond to different acquisition times.

[0218] The detection module 902 is used to determine the average historical current of the motor based on multiple historical current values ​​of the motor; and to obtain the detection result of the motor as the motor being in the second abnormal state when the average historical current of the motor is greater than a second threshold value, wherein the second threshold value is greater than or equal to the first threshold value.

[0219] In some possible implementations, in Figure 10 On the basis of, such as Figure 11 As shown, it also includes:

[0220] The control module 1101 is used to control the increase of the parameter value of the pulse width modulation signal and start timing when the current current value of the motor is greater than a first threshold value; wherein, the pulse width modulation signal is used to adjust the current of the motor, and the change of the parameter value of the pulse width modulation signal is proportional to the change of the current of the motor; and when the timing time exceeds the limit, control the decrease of the parameter value of the pulse width modulation signal.

[0221] The pulse waveform acquisition module 901 is used to reacquire the current pulse waveform and the position pulse waveform of the motor.

[0222] In some possible implementations, in Figure 11 On the basis of, such as Figure 12 As shown, it also includes:

[0223] The pulse width modulation signal acquisition module 1201 is used to acquire the number of times the parameter value of the pulse width modulation signal is increased;

[0224] The detection module 902 is used to determine that the motor is in the first abnormal state when the number of detections is greater than or equal to a preset number of detections.

[0225] In some possible implementations, the detection module 902 is used to obtain a first speed of the motor based on the current pulse waveform; to obtain a second speed of the motor based on the position pulse waveform; and to obtain a detection result of the motor indicating that the motor is in the first abnormal state when the absolute value of the difference between the first speed and the second speed of the motor is greater than a threshold.

[0226] In some possible implementations, the pulse waveform acquisition module 901 is used to acquire the motor current pulse waveform and the motor position pulse waveform when a start signal for the motor is received.

[0227] The detection module 902 is used to obtain the number of current pulses and the number of position pulses of the motor based on the current pulse waveform and the position pulse waveform of the motor; and to determine that the motor is in normal working condition when the number of current pulses of the motor is greater than or equal to a first threshold and the number of position pulses of the motor is greater than or equal to a second threshold.

[0228] The specific functions and examples of each module and submodule of the apparatus in this disclosure can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.

[0229] Figure 13 This is a structural block diagram of an electronic device according to an embodiment of the present disclosure. Figure 13 As shown, the electronic device includes a memory 1310 and a processor 1320. The memory 1310 stores a computer program that can run on the processor 1320. The number of memories 1310 and processors 1320 can be one or more. The memory 1310 can store one or more computer programs, which, when executed by the electronic device, cause the electronic device to perform the methods provided in the above-described method embodiments. The electronic device may also include a communication interface 1330 for communicating with external devices and performing data exchange and transmission.

[0230] If the memory 1310, processor 1320, and communication interface 1330 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 13 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0231] Optionally, in a specific implementation, if the memory 1310, processor 1320 and communication interface 1330 are integrated on a single chip, the memory 1310, processor 1320 and communication interface 1330 can communicate with each other through an internal interface.

[0232] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.

[0233] Further, optionally, the aforementioned memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile or non-volatile, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct RAMBUS RAM (DR RAM).

[0234] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this disclosure are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line, DSL) or wireless (e.g., infrared, Bluetooth, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)). It is worth noting that the computer-readable storage media mentioned in this disclosure can be non-volatile storage media; in other words, it can be non-transient storage media.

[0235] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0236] In the description of the embodiments of this disclosure, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0237] In the description of the embodiments disclosed herein, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone.

[0238] In the description of embodiments of this disclosure, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more.

[0239] The above description is merely an exemplary embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.

Claims

1. A method for testing an electric motor, comprising: Obtain the motor's current pulse waveform and the motor's position pulse waveform; The detection result of the motor is obtained based on the current pulse waveform and the position pulse waveform of the motor. If the detection result of the motor indicates that the motor is in an abnormal state, a prompt message is generated; wherein, the prompt message is used to indicate the type of abnormal state that the motor is currently in; The step of acquiring the current pulse waveform of the motor includes: obtaining the voltage pulse waveform of the motor based on one or more output information of a voltage comparator, wherein each output information of the one or more output information of the voltage comparator is used to indicate whether the output voltage of the motor is high or low, and the output time corresponding to different output information is different; and obtaining the current pulse waveform of the motor based on the voltage pulse waveform of the motor, wherein the current pulse waveform is used to represent the voltage change frequency of the motor. The voltage comparator obtains any output information in the following ways: when the voltage value input from the motor is greater than a first voltage value, the voltage comparator obtains output information indicating that the output voltage of the motor is high; or when the voltage value input from the motor is less than a second voltage value, the voltage comparator obtains output information indicating that the output voltage of the motor is low; wherein the first voltage value is greater than or equal to the second voltage value; The step of obtaining the detection result of the motor based on the current pulse waveform and the position pulse waveform includes: obtaining the high-low level time ratio of the current pulse based on the current pulse waveform; obtaining the high-low level time ratio of the position pulse based on the position pulse waveform; and obtaining the detection result of the motor as the motor being in an abnormal state when the high-low level time ratio of the current pulse is not within a first preset range and / or the high-low level time ratio of the position pulse is not within a second preset range.

2. The method according to claim 1, wherein, When the detection result of the motor indicates that the motor is in an abnormal state, a prompt message is generated, including one of the following: If the detection result of the motor indicates that the motor is in a first abnormal state, a first prompt message is generated, which is used to indicate that the motor is currently in an abnormal state of a fault type. If the detection result of the motor indicates that the motor is in a second abnormal state, a second prompt message is generated. The second prompt message is used to indicate that the motor is currently in an abnormal state of resistance type.

3. The method according to claim 1, wherein, If the high-low level time ratio of the current pulse is not within a first preset range, and / or the high-low level time ratio of the position pulse is not within a second preset range, the detection result of the motor is considered that the motor is in an abnormal state, including one of the following: If the high-low level time ratio of the current pulse is within a first preset range and the high-low level time ratio of the position pulse is not within a second preset range, the detection result of the motor is that the motor is in the first abnormal state. If the high-low level time ratio of the current pulse is not within the first preset range and the high-low level time ratio of the position pulse is within the second preset range, the detection result of the motor is that the motor is in the first abnormal state. When the high-low level time ratio of the current pulse is greater than the highest value of the first preset range, and the high-low level time ratio of the position pulse is less than the lowest value of the second preset range, the detection result of the motor is that the motor is in the first abnormal state. When the high-low level time ratio of the current pulse is less than the lowest value of the first preset range, and the high-low level time ratio of the position pulse is greater than the highest value of the second preset range, the detection result of the motor is that the motor is in the first abnormal state. When the high-low level time ratio of the current pulse is less than the lowest value of the first preset range, and the high-low level time ratio of the position pulse is less than the lowest value of the second preset range, the detection result of the motor is that the motor is in the first abnormal state. If the high-low level time ratio of the current pulse is greater than the highest value of the first preset range, and the high-low level time ratio of the position pulse is greater than the highest value of the second preset range, the detection result of the motor is that the motor is in the second abnormal state.

4. The method according to claim 3, wherein, The condition that the motor is in the second abnormal state when the high-low level time ratio of the current pulse is greater than the highest value of the first preset range, and the high-low level time ratio of the position pulse is greater than the highest value of the second preset range, includes: When the high-low level time ratio of the current pulse is greater than the highest value of the preset range, and when the high-low level time ratio of the position pulse is greater than the highest value of the preset range, the current value of the motor is obtained. If the current current value of the motor is greater than the first threshold value, the detection result of the motor is that the motor is in the second abnormal state.

5. The method according to claim 4, characterized in that, The step of determining that the motor is in the second abnormal state when the current current value of the motor is greater than the first threshold value includes: When the current current value of the motor is greater than a first threshold, multiple historical current values ​​of the motor are acquired, wherein different historical current values ​​are acquired at different times. Based on multiple historical current values ​​of the motor, determine the average historical current of the motor; If the historical average current of the motor is greater than the second threshold, the detection result of the motor is that the motor is in the second abnormal state, wherein the second threshold is greater than or equal to the first threshold.

6. The method according to claim 4 or 5, further comprising: When the current current value of the motor is greater than the first threshold value, the parameter value of the pulse width modulation signal is increased and timing is started; wherein, the pulse width modulation signal is used to adjust the current of the motor, and the change in the parameter value of the pulse width modulation signal is proportional to the change in the magnitude of the motor current; If the timing duration expires, the parameter value of the pulse width modulation signal is reduced. Reacquire the motor's current pulse waveform and motor's position pulse waveform.

7. The method according to claim 6, further comprising: Obtain the number of times the parameter value of the pulse width modulation signal is increased; If the number of detections is greater than or equal to a preset number, the detection result of the motor is that the motor is in the first abnormal state.

8. The method according to claim 2, wherein, The method of obtaining the detection result of the motor based on the current pulse waveform and the position pulse waveform of the motor includes: Based on the current pulse waveform, the first speed of the motor is obtained; Based on the position pulse waveform, the second rotational speed of the motor is obtained; If the absolute value of the difference between the first speed and the second speed of the motor is greater than a threshold, the detection result of the motor is that the motor is in the first abnormal state.

9. The method according to claim 1, characterized in that, The acquisition of the motor current pulse waveform and the motor position pulse waveform includes: acquiring the motor current pulse waveform and the motor position pulse waveform when a start signal for the motor is received. The method further includes: obtaining the number of current pulses and the number of position pulses of the motor based on the current pulse waveform and the position pulse waveform of the motor; and determining that the motor is in normal working condition when the number of current pulses of the motor is greater than or equal to a first threshold and the number of position pulses of the motor is greater than or equal to a second threshold.

10. A motor testing device, characterized in that, The detection is performed using the method described in any one of claims 1-9.

11. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-9.

13. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-9.