Stepper motor stall detection method and device
By obtaining the running data of the stepper motor within the preset time period, determining the target running parameters and matching them with the reference parameters, the existing inaccurate detection is solved, the accuracy and reliability of the blocking and rotation detection is improved, and the user is enhanced Safe experience.
Patent Information
- Application Number
- CN202211665428.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-23
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-12-23
AI Technical Summary
The existing blocking and rotation detection methods of stepper motors have problems with inaccurate detection, especially when clutter interference and current detection time requirements are strict, which leads to inaccurate detection of back electromotive force, affecting the detection accuracy of blocking and rotation.
By obtaining the first and second running data of the target stepper motor respectively within a preset time period, and determining the target running parameters based on these two sets of data, and determining whether they match the preset reference running parameters, thereby Get the result of the blocking judgment.
It improves the accuracy and reliability of judging whether the stepper motor has a blockage phenomenon, enhances the safety of users using stepper motors, and thus improves the user experience.
Smart Images

Figure CN116184191B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated testing technology, and in particular to a stepper motor stall detection method and device. Background Art
[0002] With the continuous development of electronic technology, stepper motors are widely used in related equipment or systems in various fields, such as precision instruments, robots, stage lighting control systems, etc. If the stepper motor does not have a stall protection function, when the relevant personnel are next to the running stepper motor, the relevant personnel are easily injured by the running stepper motor, which brings safety hazards to the relevant personnel. Therefore, it is necessary to perform stall detection on the stepper motor to improve the safety of the stepper motor.
[0003] At present, most stepper motors with stall protection function realize stall detection through the back electromotive force of the stepper motor. When the back electromotive force of the stepper motor is detected to be 0 or close to 0, it is determined that the stepper motor is stalled. However, this method requires detecting the current of the stepper motor when the switch MOS tube is turned on to detect whether the stepper motor is stalled. Not only is there interference from noise, but also the detection time requirements for the current are relatively strict. Both of these situations will lead to inaccurate back electromotive force detection, which is not conducive to improving the detection accuracy of the stepper motor stall situation.
[0004] It can be seen that it is particularly important to provide a new stepper motor stall detection method to improve the detection accuracy of the stepper motor stall situation. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a method and device for a stepper motor, which can help improve the accuracy and reliability of judging whether a stepper motor is stuck, help improve the safety of users using stepper motors, and further help improve the user's experience of using stepper motors.
[0006] In order to solve the above technical problems, the first aspect of the present invention discloses a method for detecting stall of a stepping motor, the method comprising:
[0007] Within a preset time period, first operating data and second operating data of the target stepper motor to be detected are respectively acquired, wherein the time of acquiring the first operating data is different from the time of acquiring the second operating data;
[0008] Determining target operating parameters of the target stepper motor according to the first operating data and the second operating data;
[0009] It is determined whether the target operating parameters match the preset reference operating parameters to obtain a stall judgment result, and a stall detection result of the target stepper motor is determined based on the stall judgment result. The stall detection result is used to indicate the running stall condition of the target stepper motor.
[0010] As an optional implementation, in the first aspect of the present invention, before acquiring the first operating data and the second operating data of the target stepper motor to be detected within the preset time period, the method further includes:
[0011] Acquire real-time operation data of a target stepper motor to be detected, and determine the real-time motion state of the target stepper motor according to the real-time operation data;
[0012] Determining whether the real-time motion state meets a preset motion detection condition;
[0013] When the real-time motion state satisfies the preset motion detection condition, triggering the execution of an operation of acquiring first operation data and second operation data of the target stepping motor to be detected within a preset time period;
[0014] When the real-time motion state does not meet the preset motion detection conditions, the motion control parameters of the target stepper motor are generated, and the target stepper motor is controlled to perform operations matching the motion control parameters so that the real-time motion state of the target stepper motor meets the preset motion detection conditions.
[0015] As an optional implementation, in the first aspect of the present invention, before acquiring the real-time operation data of the target stepper motor, the method further includes:
[0016] Determine a target stepper motor that needs to be detected for stall, and obtain device information of the target stepper motor and usage scenario information corresponding to the target stepper motor;
[0017] The motor motion parameters of the target stepper motor are generated according to the device information and the usage scenario information, and the motor motion parameters are used to control the target stepper motor to operate in a manner that matches the motor motion parameters.
[0018] As an optional implementation, in the first aspect of the present invention, the step of acquiring the first operating data and the second operating data of the target stepper motor to be detected within a preset time period respectively includes:
[0019] According to a preset target detection control condition, a plurality of acquisition time pairs are determined within a preset time period, each of the acquisition time pairs comprising a first acquisition moment and a second acquisition moment;
[0020] For each of the acquisition time pairs, the operation data of the target stepping motor corresponding to the first acquisition time and the second acquisition time are acquired, wherein the operation data includes first sub-operation data and second sub-operation data;
[0021] Wherein, determining the target operating parameters of the target stepper motor according to the first operating data and the second operating data includes:
[0022] For each of the acquisition time pairs, determine a difference between the first sub-operation data of the target stepper motor acquired at the first acquisition moment and the second sub-operation data of the target stepper motor acquired at the second acquisition moment, obtain an operation data difference value of the acquisition time pair, and determine the target data of the acquisition time pair according to the operation data difference value of the acquisition time pair;
[0023] Calculate target average data of target data of all acquisition time pairs;
[0024] According to the target average data, target operating parameters of the target stepper motor are determined.
[0025] As an optional implementation, in the first aspect of the present invention, for each of the acquisition time pairs, the first sub-operation data of the acquisition time pair includes the first pulse data of the target stepper motor acquired at the first acquisition moment, the second sub-operation data of the acquisition time pair includes the second pulse data of the target stepper motor acquired at the second acquisition moment, and the operation data difference value of each of the acquisition time pairs is used to represent the pulse data difference between the first pulse data and the second pulse data of the acquisition time pair;
[0026] The step of determining the target data of each acquisition time pair according to the difference value of the running data of the acquisition time pair includes:
[0027] For each of the acquisition time pairs, determine the unit time length corresponding to the acquisition time pair, and determine the motor operating speed of the target stepper motor within the unit time length corresponding to the acquisition time pair based on the unit time length corresponding to the acquisition time pair and the operating data difference value of the acquisition time pair. The unit time length corresponding to the acquisition time pair is the time length between the first acquisition moment of the acquisition time pair and the second acquisition moment of the acquisition time pair.
[0028] As an optional implementation manner, in the first aspect of the present invention, the determining whether the target operating parameter matches a preset reference operating parameter to obtain a stall determination result includes:
[0029] Determining whether an operating parameter difference between the target operating parameter and a preset standard operating parameter is less than or equal to a preset reference operating parameter;
[0030] When it is determined that the operating parameter difference between the target operating parameter and the preset standard operating parameter is less than or equal to the preset reference operating parameter, a stall determination result is generated to indicate that the target stepping motor has a stall phenomenon;
[0031] When it is determined that the operating parameter difference between the target operating parameter and the preset standard operating parameter is greater than the preset reference operating parameter, a stall determination result is generated to indicate that the target stepping motor does not have the stall phenomenon;
[0032] And, after determining the stall detection result of the target stepper motor based on the stall judgment result, the method further includes:
[0033] When the stall judgment result indicates that the target stepper motor has the stall phenomenon, the stall information of the target stepper motor is determined according to the stall condition of the target stepper motor, wherein the stall information includes one or more of stall type information, stall duration information, and stall foreign body information;
[0034] A stall processing operation matching the target stepping motor is determined according to the stall information.
[0035] As an optional implementation, in the first aspect of the present invention, determining a stall processing operation matching the target stepper motor according to the stall information includes:
[0036] Analyze the stall information to obtain stall influencing parameters of the target stepping motor, wherein the number of the stall influencing parameters is at least one;
[0037] For each of the stall influencing parameters, determining a sub-stall processing operation corresponding to the stall influencing parameter, and obtaining a stall operation set, wherein the stall operation set includes the sub-stall processing operation corresponding to each of the stall influencing parameters;
[0038] Generating a stall processing operation matching the target stepping motor according to the stall operation set;
[0039] The stall processing operation includes one or more of a reset operation, a stop operation, and an operation speed adjustment operation.
[0040] A second aspect of the present invention discloses a stepper motor stall detection device, the device comprising:
[0041] An acquisition module, used to acquire first operating data and second operating data of a target stepping motor to be detected within a preset time period, respectively, wherein the time of acquiring the first operating data is different from the time of acquiring the second operating data;
[0042] a determination module, configured to determine a target operating parameter of the target stepping motor according to the first operating data and the second operating data;
[0043] A judgment module, used to judge whether the target operating parameters match the preset reference operating parameters, and obtain a stall judgment result;
[0044] The determination module is further used to determine a stall detection result of the target stepper motor according to the stall judgment result, and the stall detection result is used to indicate the stall condition of the target stepper motor.
[0045] As an optional implementation, in the second aspect of the present invention, the acquisition module is further used to acquire the real-time operation data of the target stepper motor to be detected before acquiring the first operation data and the second operation data of the target stepper motor to be detected within a preset time period;
[0046] The determination module is further used to determine the real-time motion state of the target stepping motor according to the real-time operation data;
[0047] The judging module is further configured to judge whether the real-time motion state satisfies a preset motion detection condition; when it is judged that the real-time motion state satisfies the preset motion detection condition, the acquiring module is triggered to execute an operation of acquiring the first operating data and the second operating data of the target stepping motor to be detected within a preset time period;
[0048] The device also includes:
[0049] A generating module, configured to generate a motion control parameter of the target stepping motor when the judging module judges that the real-time motion state does not satisfy the preset motion detection condition;
[0050] The control module is used to control the target stepper motor to perform an operation matching the motion control parameter, so that the real-time motion state of the target stepper motor meets the preset motion detection condition.
[0051] As an optional implementation, in the second aspect of the present invention, the determination module is further used to determine the target stepper motor that needs to be stalled before the acquisition module acquires the real-time operation data of the target stepper motor;
[0052] The acquisition module is further used to acquire device information of the target stepper motor and usage scenario information corresponding to the target stepper motor;
[0053] The generation module is further used to generate motor motion parameters of the target stepper motor according to the device information and the usage scenario information, and the motor motion parameters are used to control the target stepper motor to operate in a manner matching the motor motion parameters.
[0054] As an optional implementation, in the second aspect of the present invention, the specific manner in which the acquisition module acquires the first operating data and the second operating data of the target stepping motor to be detected within a preset time period includes:
[0055] According to a preset target detection control condition, a plurality of acquisition time pairs are determined within a preset time period, each of the acquisition time pairs comprising a first acquisition moment and a second acquisition moment;
[0056] For each of the acquisition time pairs, the operation data of the target stepping motor corresponding to the first acquisition time and the second acquisition time are acquired, wherein the operation data includes first sub-operation data and second sub-operation data;
[0057] The specific manner in which the determination module determines the target operating parameters of the target stepper motor according to the first operating data and the second operating data includes:
[0058] For each of the acquisition time pairs, determine a difference between the first sub-operation data of the target stepper motor acquired at the first acquisition moment and the second sub-operation data of the target stepper motor acquired at the second acquisition moment, obtain an operation data difference value of the acquisition time pair, and determine the target data of the acquisition time pair according to the operation data difference value of the acquisition time pair;
[0059] Calculate target average data of target data of all acquisition time pairs;
[0060] According to the target average data, target operating parameters of the target stepper motor are determined.
[0061] As an optional implementation, in the second aspect of the present invention, for each of the acquisition time pairs, the first sub-operation data of the acquisition time pair includes the first pulse data of the target stepper motor acquired at the first acquisition moment, the second sub-operation data of the acquisition time pair includes the second pulse data of the target stepper motor acquired at the second acquisition moment, and the operation data difference value of each of the acquisition time pairs is used to represent the pulse data difference between the first pulse data and the second pulse data of the acquisition time pair;
[0062] The specific manner in which the determination module determines the target data of each acquisition time pair according to the difference value of the running data of the acquisition time pair includes:
[0063] For each of the acquisition time pairs, determine the unit time length corresponding to the acquisition time pair, and determine the motor operating speed of the target stepper motor within the unit time length corresponding to the acquisition time pair based on the unit time length corresponding to the acquisition time pair and the operating data difference value of the acquisition time pair. The unit time length corresponding to the acquisition time pair is the time length between the first acquisition moment of the acquisition time pair and the second acquisition moment of the acquisition time pair.
[0064] As an optional implementation, in the second aspect of the present invention, the judgment module judges whether the target operating parameter matches the preset reference operating parameter, and the specific manner of obtaining the stall judgment result includes:
[0065] Determining whether an operating parameter difference between the target operating parameter and a preset standard operating parameter is less than or equal to a preset reference operating parameter;
[0066] When it is determined that the operating parameter difference between the target operating parameter and the preset standard operating parameter is less than or equal to the preset reference operating parameter, a stall determination result is generated to indicate that the target stepping motor has a stall phenomenon;
[0067] When it is determined that the operating parameter difference between the target operating parameter and the preset standard operating parameter is greater than the preset reference operating parameter, a stall determination result is generated to indicate that the target stepping motor does not have the stall phenomenon;
[0068] Furthermore, the determination module is also used to determine the stall detection result of the target stepper motor based on the stall judgment result. When the stall judgment result is used to indicate that the target stepper motor has the stall phenomenon, the stall information of the target stepper motor is determined according to the running stall situation of the target stepper motor, and the stall information includes one or more of stall type information, stall duration information, and stall foreign object information; and determine the stall processing operation that matches the target stepper motor according to the stall information.
[0069] As an optional implementation, in the second aspect of the present invention, the specific manner in which the determination module determines the stall processing operation matching the target stepping motor according to the stall information includes:
[0070] Analyze the stall information to obtain stall influencing parameters of the target stepping motor, wherein the number of the stall influencing parameters is at least one;
[0071] For each of the stall influencing parameters, determining a sub-stall processing operation corresponding to the stall influencing parameter, and obtaining a stall operation set, wherein the stall operation set includes the sub-stall processing operation corresponding to each of the stall influencing parameters;
[0072] Generating a stall processing operation matching the target stepping motor according to the stall operation set;
[0073] The stall processing operation includes one or more of a reset operation, a stop operation, and an operation speed adjustment operation.
[0074] A third aspect of the present invention discloses another stepping motor stall detection device, the device comprising:
[0075] A memory storing executable program code;
[0076] a processor coupled to the memory;
[0077] The processor calls the executable program code stored in the memory to execute the stepper motor stall detection method disclosed in the first aspect of the present invention.
[0078] The fourth aspect of the present invention discloses a computer storable medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the stepper motor stall detection method disclosed in the first aspect of the present invention.
[0079] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0080] In an embodiment of the present invention, within a preset time period, the first operating data and the second operating data of the target stepper motor to be detected are respectively obtained, wherein the time of obtaining the first operating data is different from the time of obtaining the second operating data; the target operating parameters of the target stepper motor are determined according to the first operating data and the second operating data; it is determined whether the target operating parameters match the preset reference operating parameters to obtain a stall judgment result, and the stall detection result of the target stepper motor is determined according to the stall judgment result, and the stall detection result is used to indicate the stall condition of the target stepper motor. It can be seen that the implementation of the present invention can improve the accuracy and reliability of judging whether the stepper motor has a stall phenomenon, which is conducive to improving the safety of users using stepper motors, and further conducive to improving the user's experience of using stepper motors. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0082] Figure 1 It is a flow chart of a method for detecting stall of a stepping motor disclosed in an embodiment of the present invention;
[0083] Figure 2 It is a flow chart of another method for detecting stall of a stepping motor disclosed in an embodiment of the present invention;
[0084] Figure 3 It is a structural schematic diagram of a stepping motor stall detection device disclosed in an embodiment of the present invention;
[0085] Figure 4 It is a structural schematic diagram of another stepping motor stall detection device disclosed in an embodiment of the present invention;
[0086] Figure 5 It is a structural schematic diagram of another stepping motor stall detection device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0087] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0088] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.
[0089] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0090] The present invention discloses a stepper motor stall detection method and device, which can improve the accuracy and reliability of judging whether a stepper motor is stalled, and is conducive to improving the safety of users using stepper motors, thereby improving the user's experience of using stepper motors. The following are detailed descriptions.
[0091] Embodiment 1
[0092] See also Figure 1 , Figure 1 1 is a flow chart of a method for detecting stalled rotor of a stepping motor disclosed in an embodiment of the present invention. Figure 1 The described stepper motor stall detection method can be applied to a stepper motor stall detection device, and can also be applied to a cloud server or a local server for stepper motor stall detection, which is not limited in the embodiments of the present invention. Figure 1 As shown, the stepper motor stall detection method may include the following operations:
[0093] 101. Within a preset time period, respectively obtain first operating data and second operating data of a target stepping motor to be detected.
[0094] In the embodiment of the present invention, the time for acquiring the first operation data is different from the time for acquiring the second operation data.
[0095] In the embodiment of the present invention, the time of acquiring the first operation data is earlier than the time of acquiring the second operation data.
[0096] In the embodiment of the present invention, the first operation data and the second operation data are both pulse data of the target stepper motor. It should be noted that a pulse generally refers to a pulse-like short-term undulating electrical shock (voltage or current) often used in electronic technology, and its main characteristics include waveform, amplitude, width and repetition frequency, and a pulse is a signal that occurs in a short time within the entire signal cycle relative to a continuous signal.
[0097] In the embodiment of the present invention, optionally, the preset time period can be 10 minutes, 15 minutes or 30 minutes, or other preset time periods, which are not limited in the embodiment of the present invention. Further optionally, the preset time period can be manually set, or can be set according to the detection requirements of the target stepper motor, which are not limited in the embodiment of the present invention.
[0098] 102. Determine a target operating parameter of the target stepping motor according to the first operating data and the second operating data.
[0099] In the embodiment of the present invention, optionally, the target operating parameter of the target stepper motor includes an operating speed of the target stepper motor.
[0100] 103. Determine whether the target operating parameter matches the preset reference operating parameter, obtain a stall determination result, and determine a stall detection result of the target stepper motor according to the stall determination result.
[0101] In the embodiment of the present invention, the stall detection result is used to indicate the stall condition of the target stepping motor.
[0102] In the embodiment of the present invention, optionally, the stall judgment result includes whether the target stepper motor has a stall phenomenon or whether the target stepper motor does not have a stall phenomenon.
[0103] In the embodiment of the present invention, optionally, determining whether the target operating parameter matches the preset reference operating parameter to obtain the stall determination result includes:
[0104] Determine whether the target operating parameters match the preset reference operating parameters;
[0105] When it is determined that the target operating parameters match the preset reference operating parameters, a jam judgment result is generated to indicate that the target stepper motor has a jam phenomenon; when it is determined that the target operating parameters do not match the preset reference operating parameters, a jam judgment result is generated to indicate that the target stepper motor does not have a jam phenomenon.
[0106] It can be seen that implementation Figure 1The described stepper motor stall detection method can obtain the first operating data and the second operating data of the target stepper motor respectively within a preset time period, determine the target operating parameters of the target stepper motor according to the first operating data and the second operating data, judge whether the target operating parameters match the preset reference operating parameters, obtain the stall judgment result, and determine the stall detection result of the target stepper motor according to the stall judgment result, and can determine the target operating parameters based on the acquired first operating data and the second operating data, which can improve the accuracy and reliability of determining the target operating parameters, and determine the stall judgment result by the target operating parameters and the preset reference operating parameters, which can improve the accuracy and reliability of the stall judgment result, thereby helping to improve the accuracy and reliability of the stall detection result, and helping to improve the intelligence of the stall detection result, and then helping to improve the accuracy and reliability of judging whether the stepper motor has a stall phenomenon, which is beneficial to improving the safety of users using stepper motors, and helping to improve the user experience of using stepper motors.
[0107] Embodiment 2
[0108] See also Figure 2 , Figure 2 1 is a flow chart of a method for detecting stalled rotor of a stepping motor disclosed in an embodiment of the present invention. Figure 2 The described stepper motor stall detection method can be applied to a stepper motor stall detection device, and can also be applied to a cloud server or a local server for stepper motor stall detection, which is not limited in the embodiments of the present invention. Figure 2 As shown, the stepper motor stall detection method may include the following operations:
[0109] 201. Acquire real-time operation data of a target stepper motor to be detected, and determine a real-time motion state of the target stepper motor according to the real-time operation data.
[0110] In an embodiment of the present invention, optionally, the real-time operating data of the target stepper motor to be detected can be obtained in real time, or can be obtained periodically according to a preset time period, or can be obtained when a stepper motor stall detection is required, and the embodiment of the present invention is not limited thereto.
[0111] In the embodiment of the present invention, optionally, the real-time operation data of the target stepper motor includes the operation speed of the target stepper motor. Further optionally, the real-time motion state of the target stepper motor includes one of a uniform motion state, an accelerated motion state, a decelerated motion state, and a stopped state. Furthermore, when the real-time motion state of the target stepper motor is an accelerated motion state or a decelerated motion state, the acceleration of the target stepper motor is calculated.
[0112] 202. Determine whether the real-time motion state meets a preset motion detection condition.
[0113] In the embodiment of the present invention, when the real-time motion state meets the preset motion detection condition, step 204 is triggered to be executed; when the real-time motion state does not meet the preset motion detection condition, step 203 is triggered to be executed.
[0114] In the embodiment of the present invention, optionally, determining whether the real-time motion state meets a preset motion detection condition includes:
[0115] Determine whether the real-time motion state is used to indicate that the target stepper motor is in a uniform motion state;
[0116] When it is determined that the real-time motion state is used to indicate that the target stepping motor is in a uniform motion state, determining that the real-time motion state satisfies a preset motion detection condition;
[0117] When it is determined that the real-time motion state is used to indicate that the target stepping motor is not in a uniform motion state, it is determined that the real-time motion state does not satisfy a preset motion detection condition.
[0118] 203. Generate motion control parameters of the target stepper motor, and control the target stepper motor to perform operations matching the motion control parameters, so that the real-time motion state of the target stepper motor meets a preset motion detection condition.
[0119] In the embodiment of the present invention, optionally, generating motion control parameters of the target stepper motor includes:
[0120] Generate motion control parameters of the target stepper motor according to the real-time motion state of the target stepper motor;
[0121] The real-time motion state of the target stepper motor includes the motion speed of the target stepper motor; the motion control parameters of the target stepper motor include one or more of the running acceleration, running speed, and running distance of the target stepper motor.
[0122] 204. Within a preset time period, respectively obtain first operating data and second operating data of the target stepping motor to be detected.
[0123] 205. Determine a target operating parameter of the target stepping motor according to the first operating data and the second operating data.
[0124] 206. Determine whether the target operating parameter matches the preset reference operating parameter, obtain a stall determination result, and determine a stall detection result of the target stepper motor according to the stall determination result.
[0125] In the embodiment of the present invention, for other descriptions of step 204 to step 206, please refer to the detailed description of step 101 to step 103 in the first embodiment, and the embodiment of the present invention will not be repeated.
[0126] It can be seen that implementation Figure 2 The described stepper motor stall detection method can obtain the real-time operation data of the target stepper motor to be detected, determine the real-time motion state of the target stepper motor according to the real-time operation data, and judge whether the real-time motion state meets the preset motion detection condition. If so, the first operation data and the second operation data of the target stepper motor to be detected are obtained within a preset time period; if not, the motion control parameters of the target stepper motor are generated, and the target stepper motor is controlled to perform operations matching the motion control parameters, so that the real-time state of the target stepper motor meets the preset motion detection condition. The first operation data and the second operation data can be obtained only after the real-time motion state of the target stepper motor meets the preset motion detection condition. The data can improve the accuracy and reliability of the first operation data and the second operation data obtained, which is beneficial to improving the determination of the target operation parameters of the target stepper motor and the accuracy of the stall judgment result and the stall detection result. When it is judged that the real-time motion state does not meet the motion detection conditions, the motion control parameters of the target stepper motor are generated so that the real-time motion state of the target stepper motor meets the preset motion detection conditions, which can improve the accuracy and reliability of the stall detection of the stepper motor, and further help to improve the accuracy and reliability of judging whether the stepper motor has a stall phenomenon, which is beneficial to improving the safety of users using stepper motors, and is beneficial to improving the user experience of using stepper motors.
[0127] In an optional embodiment, before acquiring the real-time operation data of the target stepper motor, the method further includes:
[0128] Determine the target stepper motor that needs to be detected for stall, and obtain device information of the target stepper motor and usage scenario information corresponding to the target stepper motor;
[0129] According to the device information and the usage scenario information, the motor motion parameters of the target stepper motor are generated, and the motor motion parameters are used to control the target stepper motor to operate in a manner that matches the motor motion parameters.
[0130] In this optional embodiment, the number of target stepper motors may be one or more, which is not limited in the embodiment of the present invention. When the number of target stepper motors is more than one, for each target stepper motor, the device information of the target stepper motor and the usage scenario information corresponding to the target stepper motor are obtained, and the motor motion parameters of each target stepper motor are generated.
[0131] In this optional embodiment, the device information of the target stepper motor optionally includes one or more of the device power information, device torque information, and device operating speed information of the target stepper motor; the usage scenario information corresponding to the target stepper motor includes one or more of the scene category information and the scene personnel information. For example, the scene category information may be one of a factory scene, a stage scene, and a home scene; the scene personnel information includes one or more of the number of scene personnel and the category of scene personnel. For example, when the scene category information is used to indicate that the scene of the target stepper motor is a stage scene, it is determined that the sound generated by the target stepper motor needs to be reduced, and then it is determined that the operating speed of the target stepper motor needs to be reduced.
[0132] In this optional embodiment, optionally, the motor motion parameters of the target stepper motor include one or more control parameters of the target stepper motor's motion speed, motion distance, and motion duration.
[0133] In this optional embodiment, the motor motion parameters of the target stepper motor are optionally generated according to the device information and the usage scenario information, which can be generated by a T-type motion algorithm or an S-type motion algorithm. Among them, the T-type motion algorithm divides the entire motion process into three stages: uniform acceleration, uniform speed, and uniform deceleration. During the speed change process, the acceleration a is always a set value. Given a number of control points, the acceleration is set to a, the acceleration is -a, the uniform speed stage speed is vm (i.e., the maximum speed of the entire motion), and the total running time T; the S-type motion algorithm includes a seven-segment acceleration curve, and most of the S-type motion algorithms are planned using the Sigmoid symmetric function acceleration and deceleration curve planning method.
[0134] It can be seen that implementing this optional embodiment can determine the target stepper motor that needs to be detected for stall, and obtain the device information of the target stepper motor and the usage scenario information corresponding to the target stepper motor, and generate the motor motion parameters of the target stepper motor based on the device information and the usage scenario information to control the target stepper motor to operate in a manner that matches the motor motion parameters. The motor motion parameters can be generated based on the device information and the usage scenario information of the target stepper motor, which is conducive to improving the accuracy and reliability of generating the motor motion parameters, and is conducive to improving the matching degree between the operation of the target stepper motor and the usage scenario, and is conducive to improving the safety of the operation of the target stepper motor. It can improve the accuracy and reliability of stall detection of the stepper motor, and thus is conducive to improving the accuracy and reliability of judging whether the stepper motor has a stall phenomenon, which is conducive to improving the safety of users using stepper motors, and is conducive to improving the user experience of using stepper motors.
[0135] In another optional embodiment, within a preset time period, first operation data and second operation data of the target stepper motor to be detected are respectively obtained, including:
[0136] According to a preset target detection control condition, a plurality of acquisition time pairs are determined within a preset time period, each acquisition time pair including a first acquisition moment and a second acquisition moment;
[0137] For each acquisition time pair, the operation data of the target stepping motor corresponding to the first acquisition time and the second acquisition time are acquired, and the operation data includes first sub-operation data and second sub-operation data;
[0138] Wherein, determining the target operating parameters of the target stepper motor according to the first operating data and the second operating data includes:
[0139] For each acquisition time pair, determine the difference between the first sub-operation data of the target stepper motor acquired at the first acquisition time and the second sub-operation data of the target stepper motor acquired at the second acquisition time, obtain the operation data difference value of the acquisition time pair, and determine the target data of the acquisition time pair according to the operation data difference value of the acquisition time pair;
[0140] Calculate the target average data of the target data for all acquisition time pairs;
[0141] According to the target average data, the target operating parameters of the target stepper motor are determined.
[0142] In this optional embodiment, for each acquisition time pair, the first acquisition moment included in the acquisition time pair is earlier than the second acquisition moment included in the acquisition time pair; for all acquisition time pairs, the first acquisition moment included in each acquisition time pair is arranged in order from early to late, and the arrangement order of the acquisition time pairs is obtained, wherein, for two adjacent acquisition time pairs, the first acquisition moment of the latter acquisition time pair is later than the second acquisition moment of the former acquisition time pair. In addition, the first acquisition moment included in each acquisition time pair is different from the first acquisition moment included in each other acquisition time pair; the second acquisition moment included in each acquisition time pair is different from the second acquisition moment included in each other acquisition time pair.
[0143] In this optional embodiment, the number of acquisition time pairs may be 10, and the specific number of acquisition time pairs is not limited in the embodiment of the present invention. Optionally, the target detection control condition includes the number of acquisition time pairs, the first acquisition moment and the second acquisition moment included in each acquisition time pair, and the time interval between different acquisition time pairs.
[0144] In this optional embodiment, optionally, determining the target operating parameters of the target stepper motor according to the target average data includes:
[0145] determining the target average data as the target operating parameter of the target stepping motor;
[0146] The target operating parameter is used to represent the average operating speed of the target stepper motor.
[0147] It can be seen that the implementation of this optional embodiment can collect the first sub-operation data and the second sub-operation data by determining the first acquisition moment and the second acquisition moment in the multiple acquisition time pairs, which can improve the accuracy and reliability of the collected first sub-operation data and the second sub-operation data, and is conducive to improving the availability of each collected first sub-operation data and the second sub-operation data, thereby facilitating improving the accuracy and efficiency of obtaining the first operation data and the second operation data of the target stepper motor; and can determine the operation data difference value of each acquisition time pair based on the difference value between the first sub-operation data and the second sub-operation data in each acquisition time, which can improve the accuracy and reliability of determining the operation data difference value of each acquisition time pair, and is conducive to improving the intelligence of determining the operation data difference value of each acquisition time pair, and based on the operation data difference values of all acquisition time pairs, determine the target average data of each acquisition time pair and then determine the target operation parameters of the target stepper motor, and can filter the operation data difference value obtained each time to improve the stability of obtaining the target average data and then obtaining the target operation parameters, thereby facilitating improving the accuracy and reliability of determining the target average data and the target operation parameters, and is conducive to improving the safety of users using stepper motors, and is conducive to improving the user experience of using stepper motors.
[0148] In yet another optional embodiment, for each acquisition time pair, the first sub-operation data of the acquisition time pair includes the first pulse data of the target stepper motor acquired at the first acquisition moment, the second sub-operation data of the acquisition time pair includes the second pulse data of the target stepper motor acquired at the second acquisition moment, and the operation data difference value of each acquisition time pair is used to represent the pulse data difference between the first pulse data and the second pulse data of the acquisition time pair;
[0149] For each collection time pair, the target data of the collection time pair is determined according to the difference value of the running data of the collection time pair, including:
[0150] For each acquisition time pair, determine the unit time length corresponding to the acquisition time pair, and determine the motor operating speed of the target stepper motor within the unit time length corresponding to the acquisition time pair based on the unit time length corresponding to the acquisition time pair and the operating data difference value of the acquisition time pair. The unit time length corresponding to the acquisition time pair is the time length between the first acquisition moment of the acquisition time pair and the second acquisition moment of the acquisition time pair.
[0151] In this optional embodiment, the pulse data difference between the first pulse data and the second pulse data of each acquisition time pair is used to represent the movement distance of the target stepper motor within the acquisition time pair.
[0152] In this optional embodiment, optionally, the target data of each acquisition time pair is used to represent the motor running speed of the target stepper motor within the unit time length corresponding to the acquisition time pair.
[0153] In this optional embodiment, optionally, determining the motor running speed of the target stepper motor within the unit time length corresponding to the acquisition time pair according to the unit time length corresponding to the acquisition time pair and the operation data difference value of the acquisition time pair includes:
[0154] According to the difference value of the operating data of the acquisition time pair, the operating distance of the target stepper motor within the acquisition time pair is determined, and based on the operating distance of the target stepper motor within the acquisition time pair and the unit time corresponding to the acquisition time pair, the motor operating speed of the target stepper motor within the unit time corresponding to the acquisition time pair is determined.
[0155] For example, the first sub-operation data collected at the first acquisition moment within an acquisition time pair is n1, the second sub-operation data collected at the second acquisition moment within the acquisition time pair is n2, and the unit time length corresponding to the acquisition time pair is t, then the operation distance s of the target stepper motor within the acquisition time pair is the difference between n1 and n2, and the motor operation speed v of the target stepper motor within the unit time length corresponding to the acquisition time pair is the calculation result of dividing the distance s by the unit time length t corresponding to the acquisition time pair.
[0156] It can be seen that implementing this optional embodiment can determine the unit duration corresponding to each acquisition time pair, and determine the motor operating speed of the target stepper motor within the unit duration corresponding to the acquisition time pair based on the unit duration corresponding to the acquisition time pair and the operating data difference value of the acquisition time pair. This can improve the accuracy and reliability of determining the target data of each acquisition time pair, thereby improving the accuracy and reliability of the target average data of the target data of all acquisition time pairs calculated subsequently, and further helps to improve the accuracy and reliability of determining the target operating parameters of the target stepper motor, improve the safety of users using stepper motors, and help to improve the user experience of using stepper motors.
[0157] In yet another optional embodiment, determining whether the target operating parameter matches the preset reference operating parameter to obtain a stall determination result includes:
[0158] Determine whether the operating parameter difference between the target operating parameter and the preset standard operating parameter is less than or equal to the preset reference operating parameter;
[0159] When it is determined that the operating parameter difference between the target operating parameter and the preset standard operating parameter is less than or equal to the preset reference operating parameter, a stall determination result is generated to indicate that the target stepping motor has a stall phenomenon;
[0160] When it is determined that the operating parameter difference between the target operating parameter and the preset standard operating parameter is greater than the preset reference operating parameter, a stall determination result is generated to indicate that the target stepping motor does not have a stall phenomenon;
[0161] And, after determining the stall detection result of the target stepper motor according to the stall judgment result, the method further includes:
[0162] When the stall judgment result indicates that the target stepper motor is stalled, the stall information of the target stepper motor is determined according to the stall condition of the target stepper motor, and the stall information includes one or more of stall type information, stall duration information, and stall foreign body information;
[0163] According to the stall information, a stall processing operation matching the target stepper motor is determined.
[0164] In this optional embodiment, the target operating parameter is used to represent the average operating speed of the target stepper motor; optionally, determining whether the operating parameter difference between the target operating parameter and the preset standard operating parameter is less than or equal to the preset reference operating parameter includes:
[0165] Determine whether the speed difference between the average operating speed of the target stepper motor and the preset standard operating speed is less than or equal to the preset reference operating speed. When it is determined that the speed difference between the average operating speed of the target stepper motor and the preset standard operating speed is less than or equal to the preset reference operating speed, generate a jam judgment result indicating that the target stepper motor has a jam phenomenon; when it is determined that the speed difference between the average operating speed of the target stepper motor and the preset standard operating speed is greater than the preset reference operating speed, generate a jam judgment result indicating that the target stepper motor does not have a jam phenomenon; wherein the preset reference operating parameter is a jam identification difference; for example, when the average operating speed is v, the standard operating speed is v0, and the jam identification difference is p, if |v-v0|≤p, then generate a jam judgment result indicating that the target stepper motor has a jam phenomenon; if |v-v0|>p, then generate a jam judgment result indicating that the target stepper motor does not have a jam phenomenon.
[0166] In this optional embodiment, optionally, the stall type information includes one of a partial motor stall type and a complete motor stall type; the stall duration information is used to indicate the duration of the target stepper motor stall; the stall foreign object information includes one or more of the stall foreign object type information, the stall foreign object quantity information, the stall foreign object hardness information, and the stall foreign object volume information.
[0167] In this optional embodiment, the number of the stall processing operation can be one or more, which is not limited in the embodiment of the present invention. When the number of the stall processing operation is more than one, the stall processing operation sequence of each stall processing operation is determined, and the stall processing operation matching the stall processing operation sequence is performed on the target stepping motor.
[0168] It can be seen that the implementation of this optional embodiment can generate a stall judgment result based on determining whether the target operating parameter is less than or equal to the preset reference operating parameter, which can improve the accuracy and reliability of generating the stall judgment result; and, when the stall detection result of the target stepper motor is determined and the stall judgment result is used to indicate that the target stepper motor has a stall phenomenon, the stall information of the target stepper motor is determined according to the running stall situation of the target stepper motor, and the stall processing operation matching the target stepper motor is determined according to the stall information, and the corresponding stall processing operation can be determined after determining that the target stepper motor has a stall phenomenon, which can solve the stall degree of the target stepper motor to a certain extent, and is conducive to improving the intelligence of determining the stall processing operation matching the target stepper motor, and is conducive to improving the accuracy of determining the stall processing operation of the target stepper motor, which is conducive to improving the safety of the operation of the stepper motor and the safety of the user using the stepper motor, and thus is conducive to improving the user experience of using the stepper motor.
[0169] In yet another optional embodiment, determining a stall processing operation matching the target stepper motor according to the stall information includes:
[0170] Analyze the stall information to obtain stall influencing parameters of the target stepper motor, where the number of the stall influencing parameters is at least one;
[0171] For each stall influencing parameter, determine a sub-stall processing operation corresponding to the stall influencing parameter to obtain a stall operation set, wherein the stall operation set includes the sub-stall processing operation corresponding to each stall influencing parameter;
[0172] Generate a stall processing operation matching the target stepper motor according to the stall operation set;
[0173] The stall processing operation includes one or more of a reset operation, a stop operation, and a running speed adjustment operation.
[0174] In this optional embodiment, optionally, after determining, for each stall influencing parameter, a sub-stall processing operation corresponding to the stall influencing parameter to obtain a stall operation set, and before generating a stall processing operation matching the target stepping motor according to the stall operation set, the method further includes:
[0175] For each sub-blocking operation included in the blocking operation set, predicting a blocking phenomenon corresponding to the sub-blocking operation, where the blocking phenomenon is used to represent the running phenomenon of the target stepping motor after the sub-blocking operation is executed;
[0176] According to the blocking processing phenomena corresponding to all the sub-blocking processing operations, for each sub-blocking processing operation, it is determined whether there is a target blocking phenomenon in all the blocking processing phenomena that has a negative impact relationship with the blocking processing phenomenon corresponding to the sub-blocking processing operation;
[0177] When it is determined that a target stall phenomenon exists, a target sub-stall processing operation corresponding to the target stall phenomenon is determined, and a preset target operation is performed on the target sub-stall processing operation to update the stall operation set; wherein the target operation includes one of a merge operation and a delete operation.
[0178] For example, when sub-stall operation A can reduce the stall degree of the target stepper motor by 30%, and sub-stall operation B can reduce the stall degree of the target stepper motor by 20%, but the stall processing phenomenon corresponding to sub-stall operation A and the stall processing phenomenon corresponding to sub-stall operation B show a negative impact relationship, then sub-stall operation B can be deleted from the stall operation set; wherein, the negative impact relationship may include one or more of damage to the target stepper motor, cessation of operation of the target stepper motor, and damage to some components in the target stepper motor, which is not limited in the embodiments of the present invention.
[0179] In this optional embodiment, optionally, when the number of stall processing operations that match the target stepper motor is multiple, the stall processing operation sequence of each stall processing operation is determined, and the stall processing operation that matches the stall processing operation sequence is performed on the target stepper motor. For example, when the stall processing operation includes a reset operation and a stop operation, the stop operation operation can be performed on the target stepper motor first, and then the reset operation is performed on the target stepper motor. This can improve the intelligence of performing the stall processing operation on the target stepper motor, help improve the safety of performing the stall processing operation on the target stepper motor, avoid the situation where the target stepper motor fails due to performing too many or too complex operations, and help improve the safety of using the stepper motor.
[0180] It can be seen that implementing this optional embodiment can analyze the stall information to obtain at least one stall influencing parameter of the target stepper motor, determine the sub-stall processing operation corresponding to each stall influencing parameter, obtain a stall operation set, and generate a stall processing operation matching the target stepper motor according to the stall operation set, which can solve the stall degree of the target stepper motor to a certain extent, can improve the intelligence of performing the stall processing operation on the target stepper motor, is conducive to improving the safety of performing the stall processing operation on the target stepper motor, is conducive to improving the intelligence of determining the stall processing operation matching the target stepper motor, and is conducive to improving the accuracy of determining the stall processing operation of the target stepper motor, thereby helping to improve the user experience of using the stepper motor.
[0181] Embodiment 3
[0182] See also Figure 3 , Figure 3 FIG. 1 is a schematic diagram of the structure of another stepping motor stall detection device disclosed in an embodiment of the present invention. Figure 3 As shown, the stall detection device of the stepper motor may include:
[0183] An acquisition module 301 is used to acquire first operation data and second operation data of a target stepping motor to be detected within a preset time period, wherein the time of acquiring the first operation data is different from the time of acquiring the second operation data;
[0184] A determination module 302, configured to determine a target operating parameter of the target stepping motor according to the first operating data and the second operating data;
[0185] The judgment module 303 is used to judge whether the target operating parameter matches the preset reference operating parameter, and obtain a stall judgment result;
[0186] The determination module 302 is further used to determine a stall detection result of the target stepper motor according to the stall judgment result, and the stall detection result is used to indicate the stall condition of the target stepper motor.
[0187] It can be seen that implementation Figure 3 The described device can respectively obtain the first operating data and the second operating data of the target stepper motor within a preset time period, determine the target operating parameters of the target stepper motor according to the first operating data and the second operating data, judge whether the target operating parameters match the preset reference operating parameters, obtain a stall judgment result, and determine the stall detection result of the target stepper motor according to the stall judgment result, and can determine the target operating parameters based on the acquired first operating data and the second operating data, which can improve the accuracy and reliability of determining the target operating parameters, and determine the stall judgment result through the target operating parameters and the preset reference operating parameters, which can improve the accuracy and reliability of the stall judgment result, thereby helping to improve the accuracy and reliability of the stall detection result, and helping to improve the intelligence of the stall detection result, and then helping to improve the accuracy and reliability of judging whether the stepper motor has a stall phenomenon, which is beneficial to improving the safety of users using stepper motors, and helping to improve the user experience of using stepper motors.
[0188] In an optional embodiment, the acquisition module 301 is further used to acquire the real-time operation data of the target stepper motor to be detected before acquiring the first operation data and the second operation data of the target stepper motor to be detected within a preset time period;
[0189] The determination module 302 is further used to determine the real-time motion state of the target stepping motor according to the real-time operation data;
[0190] The judging module 303 is further used to judge whether the real-time motion state satisfies a preset motion detection condition; when it is judged that the real-time motion state satisfies the preset motion detection condition, the acquiring module 301 is triggered to execute an operation of acquiring the first operating data and the second operating data of the target stepping motor to be detected within a preset time period;
[0191] like Figure 4 As shown, the device also includes:
[0192] A generating module 304, configured to generate a motion control parameter of the target stepping motor when the judging module 303 judges that the real-time motion state does not satisfy the preset motion detection condition;
[0193] The control module 305 is used to control the target stepper motor to perform an operation matching the motion control parameters, so that the real-time motion state of the target stepper motor meets the preset motion detection condition.
[0194] It can be seen that implementation Figure 4 The described device can obtain the real-time operation data of the target stepper motor to be detected, determine the real-time motion state of the target stepper motor according to the real-time operation data, and judge whether the real-time motion state meets the preset motion detection condition. If so, the first operation data and the second operation data of the target stepper motor to be detected are obtained within a preset time period; if not, the motion control parameters of the target stepper motor are generated, and the target stepper motor is controlled to perform operations matching the motion control parameters, so that the real-time state of the target stepper motor meets the preset motion detection condition, and the first operation data and the second operation data can be obtained only after the real-time motion state of the target stepper motor meets the preset motion detection condition. According to the present invention, the accuracy of the first operating data and the second operating data obtained can be improved, which is beneficial to improving the determination of the target operating parameters of the target stepper motor and the accuracy of the stall judgment result and the stall detection result. When it is judged that the real-time motion state does not meet the motion detection conditions, the motion control parameters of the target stepper motor can be generated so that the real-time motion state of the target stepper motor meets the preset motion detection conditions, which can improve the accuracy and reliability of the stall detection of the stepper motor, and further help to improve the accuracy and reliability of judging whether the stepper motor has a stall phenomenon, which is beneficial to improving the safety of users using stepper motors, and is beneficial to improving the user experience of using stepper motors.
[0195] In another optional embodiment, Figure 4 As shown, the determination module 302 is also used to determine the target stepper motor that needs to be blocked before the acquisition module 301 acquires the real-time operation data of the target stepper motor;
[0196] The acquisition module 301 is further used to acquire device information of the target stepper motor and usage scenario information corresponding to the target stepper motor;
[0197] The generating module 304 is further used to generate motor motion parameters of the target stepper motor according to the device information and the usage scenario information, and the motor motion parameters are used to control the target stepper motor to operate in a manner matching the motor motion parameters.
[0198] It can be seen that implementation Figure 4The described device can determine a target stepper motor that needs to be detected for stall, and obtain device information of the target stepper motor and usage scenario information corresponding to the target stepper motor, and generate motor motion parameters of the target stepper motor according to the device information and usage scenario information to control the target stepper motor to operate in a manner that matches the motor motion parameters. The motor motion parameters can be generated according to the device information and usage scenario information of the target stepper motor, which is conducive to improving the accuracy and reliability of generating motor motion parameters, and is conducive to improving the matching degree between the operation of the target stepper motor and the usage scenario, and is conducive to improving the safety of the operation of the target stepper motor. The accuracy and reliability of stall detection of the stepper motor can be improved, and thus it is conducive to improving the accuracy and reliability of judging whether the stepper motor has a stall phenomenon, which is conducive to improving the safety of users using stepper motors, and is conducive to improving the user experience of using stepper motors.
[0199] In yet another optional embodiment, Figure 4 As shown, the specific manner in which the acquisition module 301 acquires the first operation data and the second operation data of the target stepping motor to be detected within a preset time period includes:
[0200] According to a preset target detection control condition, a plurality of acquisition time pairs are determined within a preset time period, each of the acquisition time pairs comprising a first acquisition moment and a second acquisition moment;
[0201] For each of the acquisition time pairs, the operation data of the target stepping motor corresponding to the first acquisition time and the second acquisition time are acquired, and the operation data includes first sub-operation data and second sub-operation data;
[0202] The specific manner in which the determination module 302 determines the target operating parameters of the target stepping motor according to the first operating data and the second operating data includes:
[0203] For each of the acquisition time pairs, determine a difference between the first sub-operation data of the target stepper motor acquired at the first acquisition moment and the second sub-operation data of the target stepper motor acquired at the second acquisition moment, obtain an operation data difference value of the acquisition time pair, and determine the target data of the acquisition time pair according to the operation data difference value of the acquisition time pair;
[0204] Calculate target average data of target data of all acquisition time pairs;
[0205] According to the target average data, target operating parameters of the target stepper motor are determined.
[0206] It can be seen that implementation Figure 4The described device can collect the first sub-operation data and the second sub-operation data by determining the first acquisition moment and the second acquisition moment in multiple acquisition time pairs, which can improve the accuracy and reliability of the collected first sub-operation data and the second sub-operation data, and is conducive to improving the availability of each collected first sub-operation data and the second sub-operation data, thereby facilitating improving the accuracy and efficiency of obtaining the first operation data and the second operation data of the target stepper motor; and can determine the operation data difference value of each acquisition time pair based on the difference value between the first sub-operation data and the second sub-operation data in each acquisition time, which can improve the accuracy and reliability of determining the operation data difference value of each acquisition time pair, and is conducive to improving the intelligence of determining the operation data difference value of each acquisition time pair, and based on the operation data difference values of all acquisition time pairs, determine the target average data of each acquisition time pair and then determine the target operation parameters of the target stepper motor, and can perform filtering operations on the operation data difference values obtained each time to improve the stability of obtaining the target average data and then obtaining the target operation parameters, thereby facilitating improving the accuracy and reliability of determining the target average data and the target operation parameters, and is conducive to improving the safety of users using stepper motors, and is conducive to improving the user's experience of using stepper motors.
[0207] In yet another optional embodiment, Figure 4 As shown, for each of the acquisition time pairs, the first sub-operation data of the acquisition time pair includes the first pulse data of the target stepper motor acquired at the first acquisition moment, the second sub-operation data of the acquisition time pair includes the second pulse data of the target stepper motor acquired at the second acquisition moment, and the operation data difference value of each of the acquisition time pairs is used to represent the pulse data difference between the first pulse data and the second pulse data of the acquisition time pair;
[0208] The specific manner in which the determination module 302 determines the target data of each acquisition time pair according to the difference value of the running data of the acquisition time pair includes:
[0209] For each of the acquisition time pairs, determine the unit time length corresponding to the acquisition time pair, and determine the motor operating speed of the target stepper motor within the unit time length corresponding to the acquisition time pair based on the unit time length corresponding to the acquisition time pair and the operating data difference value of the acquisition time pair. The unit time length corresponding to the acquisition time pair is the time length between the first acquisition moment of the acquisition time pair and the second acquisition moment of the acquisition time pair.
[0210] It can be seen that implementation Figure 4The described device determines, for each acquisition time pair, the unit duration corresponding to the acquisition time pair, and determines the motor operating speed of the target stepper motor within the unit duration corresponding to the acquisition time pair based on the unit duration corresponding to the acquisition time pair and the operating data difference value of the acquisition time pair. This can improve the accuracy and reliability of determining the target data of each acquisition time pair, thereby improving the accuracy and reliability of subsequent calculations of the target average data of the target data of all acquisition time pairs, which in turn is beneficial to improving the accuracy and reliability of determining the target operating parameters of the target stepper motor, which is beneficial to improving the safety of users using stepper motors, and is beneficial to improving the user experience of using stepper motors.
[0211] In yet another optional embodiment, Figure 4 As shown, the judgment module 303 judges whether the target operating parameter matches the preset reference operating parameter, and the specific method of obtaining the stall judgment result includes:
[0212] Determining whether an operating parameter difference between the target operating parameter and a preset standard operating parameter is less than or equal to a preset reference operating parameter;
[0213] When it is determined that the operating parameter difference between the target operating parameter and the preset standard operating parameter is less than or equal to the preset reference operating parameter, a stall determination result is generated to indicate that the target stepping motor has a stall phenomenon;
[0214] When it is determined that the operating parameter difference between the target operating parameter and the preset standard operating parameter is greater than the preset reference operating parameter, a stall determination result is generated to indicate that the target stepping motor does not have the stall phenomenon;
[0215] Furthermore, the determination module 302 is also used to determine the stall detection result of the target stepper motor based on the stall judgment result. When the stall judgment result is used to indicate that the target stepper motor has the stall phenomenon, the stall information of the target stepper motor is determined according to the running stall condition of the target stepper motor, and the stall information includes one or more of stall type information, stall duration information, and stall foreign object information; and determine the stall processing operation that matches the target stepper motor according to the stall information.
[0216] It can be seen that implementation Figure 4The described device can generate a stall judgment result based on determining whether the target operating parameter is less than or equal to a preset reference operating parameter, which can improve the accuracy and reliability of generating the stall judgment result; and, when the stall detection result of the target stepper motor is determined and the stall judgment result is used to indicate that the target stepper motor has a stall phenomenon, the stall information of the target stepper motor is determined according to the running stall situation of the target stepper motor, and the stall processing operation matching the target stepper motor is determined according to the stall information, and the corresponding stall processing operation can be determined after determining that the target stepper motor has a stall phenomenon, which can solve the stall degree of the target stepper motor to a certain extent, and is conducive to improving the intelligence of determining the stall processing operation matching the target stepper motor, and is conducive to improving the accuracy of determining the stall processing operation of the target stepper motor, which is conducive to improving the safety of the operation of the stepper motor and the safety of the user using the stepper motor, and thus is conducive to improving the user experience of using the stepper motor.
[0217] In yet another optional embodiment, Figure 4 As shown, the specific manner in which the determination module 302 determines the stall processing operation matching the target stepping motor according to the stall information includes:
[0218] Analyze the stall information to obtain stall influencing parameters of the target stepping motor, wherein the number of the stall influencing parameters is at least one;
[0219] For each of the stall influencing parameters, determining a sub-stall processing operation corresponding to the stall influencing parameter, and obtaining a stall operation set, wherein the stall operation set includes the sub-stall processing operation corresponding to each of the stall influencing parameters;
[0220] Generating a stall processing operation matching the target stepping motor according to the stall operation set;
[0221] The stall processing operation includes one or more of a reset operation, a stop operation, and an operation speed adjustment operation.
[0222] It can be seen that implementation Figure 4The described device can analyze the stall information to obtain at least one stall influencing parameter of the target stepper motor, determine the sub-stall processing operation corresponding to each stall influencing parameter, obtain a stall operation set, and generate a stall processing operation matching the target stepper motor according to the stall operation set, which can solve the stall degree of the target stepper motor to a certain extent, can improve the intelligence of performing the stall processing operation on the target stepper motor, is conducive to improving the safety of performing the stall processing operation on the target stepper motor, is conducive to improving the intelligence of determining the stall processing operation matching the target stepper motor, and is conducive to improving the accuracy of determining the stall processing operation of the target stepper motor, thereby helping to improve the user experience of using the stepper motor.
[0223] Embodiment 4
[0224] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of the structure of another stepping motor stall detection device disclosed in an embodiment of the present invention. Figure 5 As shown, the stall detection device of the stepper motor may include:
[0225] A memory 401 storing executable program codes;
[0226] a processor 402 coupled to the memory 401;
[0227] The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the stepper motor stall detection method described in the first embodiment of the present invention or the second embodiment of the present invention.
[0228] Embodiment 5
[0229] An embodiment of the present invention discloses a computer storable medium, which stores computer instructions. When the computer instructions are called, they are used to execute the steps in the stepper motor stall detection method described in Embodiment 1 or Embodiment 2 of the present invention.
[0230] Embodiment 6
[0231] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps in the stepper motor stall detection method described in Embodiment 1 or Embodiment 2.
[0232] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0233] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0234] Finally, it should be noted that the stall detection method and device for a stepper motor disclosed in the embodiment of the present invention discloses only the preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for detecting stall of a stepping motor, characterized in that: The method comprises: Within a preset time period, first operating data and second operating data of a target stepper motor to be detected are respectively acquired, wherein the time of acquiring the first operating data is different from the time of acquiring the second operating data; the first operating data and the second operating data are both pulse data of the target stepper motor; Determining target operating parameters of the target stepper motor according to the first operating data and the second operating data; the target operating parameters of the target stepper motor include an operating speed of the target stepper motor; Determine whether the target operating parameter matches a preset reference operating parameter to obtain a stall determination result, and determine a stall detection result of the target stepper motor according to the stall determination result, wherein the stall detection result is used to indicate the stall condition of the target stepper motor; Before acquiring the first operation data and the second operation data of the target stepper motor to be detected within the preset time period, the method further includes: Acquire real-time operation data of a target stepper motor to be detected, and determine the real-time motion state of the target stepper motor according to the real-time operation data; the real-time operation data of the target stepper motor includes the operating speed of the target stepper motor, and the real-time motion state of the target stepper motor includes one of a uniform motion state, an accelerated motion state, a decelerated motion state, and a stopped state; Determining whether the real-time motion state meets a preset motion detection condition; When the real-time motion state satisfies the preset motion detection condition, triggering the execution of an operation of acquiring first operation data and second operation data of the target stepping motor to be detected within a preset time period; When the real-time motion state does not meet the preset motion detection condition, generating motion control parameters of the target stepper motor, and controlling the target stepper motor to perform an operation matching the motion control parameters, so that the real-time motion state of the target stepper motor meets the preset motion detection condition; Wherein, the determining whether the real-time motion state satisfies a preset motion detection condition includes: Determining whether the real-time motion state is used to indicate that the target stepping motor is in a uniform motion state; When it is determined that the real-time motion state is used to indicate that the target stepping motor is in a uniform motion state, determining that the real-time motion state satisfies the preset motion detection condition; When it is determined that the real-time motion state is used to indicate that the target stepping motor is not in a uniform motion state, it is determined that the real-time motion state does not satisfy the preset motion detection condition.
2. The method for detecting stall of a stepping motor according to claim 1, characterized in that: Before acquiring the real-time operation data of the target stepper motor, the method further includes: Determine a target stepper motor that needs to be detected for stall, and obtain device information of the target stepper motor and usage scenario information corresponding to the target stepper motor; The motor motion parameters of the target stepper motor are generated according to the device information and the usage scenario information, and the motor motion parameters are used to control the target stepper motor to operate in a manner that matches the motor motion parameters.
3. The stepper motor stall detection method according to claim 2, characterized in that: The method of acquiring first operation data and second operation data of the target stepper motor to be detected within a preset time period respectively includes: According to a preset target detection control condition, a plurality of acquisition time pairs are determined within a preset time period, each of the acquisition time pairs comprising a first acquisition moment and a second acquisition moment; For each of the acquisition time pairs, the operation data of the target stepping motor corresponding to the first acquisition time and the second acquisition time are acquired, wherein the operation data includes first sub-operation data and second sub-operation data; Wherein, determining the target operating parameters of the target stepper motor according to the first operating data and the second operating data includes: For each of the acquisition time pairs, determine a difference between the first sub-operation data of the target stepper motor acquired at the first acquisition moment and the second sub-operation data of the target stepper motor acquired at the second acquisition moment, obtain an operation data difference value of the acquisition time pair, and determine the target data of the acquisition time pair according to the operation data difference value of the acquisition time pair; Calculate target average data of target data of all acquisition time pairs; According to the target average data, target operating parameters of the target stepper motor are determined.
4. The stepper motor stall detection method according to claim 3, characterized in that: For each of the acquisition time pairs, the first sub-operation data of the acquisition time pair includes the first pulse data of the target stepper motor acquired at the first acquisition moment, the second sub-operation data of the acquisition time pair includes the second pulse data of the target stepper motor acquired at the second acquisition moment, and the operation data difference value of each of the acquisition time pairs is used to represent the pulse data difference between the first pulse data and the second pulse data of the acquisition time pair; The step of determining the target data of each acquisition time pair according to the difference value of the running data of the acquisition time pair includes: For each of the acquisition time pairs, determine the unit time length corresponding to the acquisition time pair, and determine the motor operating speed of the target stepper motor within the unit time length corresponding to the acquisition time pair based on the unit time length corresponding to the acquisition time pair and the operating data difference value of the acquisition time pair. The unit time length corresponding to the acquisition time pair is the time length between the first acquisition moment of the acquisition time pair and the second acquisition moment of the acquisition time pair.
5. The method for detecting stall of a stepping motor according to claim 4, characterized in that: The determining whether the target operating parameter matches the preset reference operating parameter to obtain a stall determination result includes: Determining whether an operating parameter difference between the target operating parameter and a preset standard operating parameter is less than or equal to a preset reference operating parameter; When it is determined that the operating parameter difference between the target operating parameter and the preset standard operating parameter is less than or equal to the preset reference operating parameter, a stall determination result is generated to indicate that the target stepping motor has a stall phenomenon; When it is determined that the operating parameter difference between the target operating parameter and the preset standard operating parameter is greater than the preset reference operating parameter, a stall determination result is generated to indicate that the target stepping motor does not have the stall phenomenon; And, after determining the stall detection result of the target stepper motor according to the stall judgment result, the method further includes: When the stall judgment result indicates that the target stepper motor has the stall phenomenon, the stall information of the target stepper motor is determined according to the stall condition of the target stepper motor, wherein the stall information includes one or more of stall type information, stall duration information, and stall foreign body information; A stall processing operation matching the target stepping motor is determined according to the stall information.
6. The method for detecting stall of a stepping motor according to claim 5, characterized in that: Determining a stall processing operation matching the target stepper motor according to the stall information includes: Analyze the stall information to obtain stall influencing parameters of the target stepping motor, wherein the number of the stall influencing parameters is at least one; For each of the stall influencing parameters, determining a sub-stall processing operation corresponding to the stall influencing parameter, and obtaining a stall operation set, wherein the stall operation set includes the sub-stall processing operation corresponding to each of the stall influencing parameters; Generating a stall processing operation matching the target stepping motor according to the stall operation set; The stall processing operation includes one or more of a reset operation, a stop operation, and an operation speed adjustment operation.
7. A stepper motor stall detection device, characterized in that: The device comprises: An acquisition module, used to acquire first operation data and second operation data of a target stepper motor to be detected within a preset time period, respectively, wherein the time of acquiring the first operation data is different from the time of acquiring the second operation data; the first operation data and the second operation data are both pulse data of the target stepper motor; A determination module, configured to determine a target operating parameter of the target stepper motor according to the first operating data and the second operating data; the target operating parameter of the target stepper motor includes an operating speed of the target stepper motor; A judgment module, used to judge whether the target operating parameters match the preset reference operating parameters, and obtain a stall judgment result; The determination module is further used to determine a stall detection result of the target stepper motor according to the stall judgment result, wherein the stall detection result is used to indicate a stall condition of the target stepper motor; The acquisition module is further used to acquire the real-time operation data of the target stepper motor to be detected before acquiring the first operation data and the second operation data of the target stepper motor to be detected within a preset time period; The determination module is further used to determine the real-time motion state of the target stepping motor according to the real-time operation data; The judging module is further configured to judge whether the real-time motion state satisfies a preset motion detection condition; when it is judged that the real-time motion state satisfies the preset motion detection condition, the acquiring module is triggered to execute an operation of acquiring the first operating data and the second operating data of the target stepping motor to be detected within a preset time period; The device also includes: A generating module, configured to generate a motion control parameter of the target stepping motor when the judging module judges that the real-time motion state does not satisfy the preset motion detection condition; A control module, used for controlling the target stepper motor to perform an operation matching the motion control parameter, so that the real-time motion state of the target stepper motor satisfies the preset motion detection condition; The specific manner in which the judgment module judges whether the real-time motion state meets the preset motion detection condition includes: Determining whether the real-time motion state is used to indicate that the target stepping motor is in a uniform motion state; When it is determined that the real-time motion state is used to indicate that the target stepping motor is in a uniform motion state, determining that the real-time motion state satisfies the preset motion detection condition; When it is determined that the real-time motion state is used to indicate that the target stepping motor is not in a uniform motion state, it is determined that the real-time motion state does not satisfy the preset motion detection condition.
8. A stepper motor stall detection device, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the stepper motor stall detection method as described in any one of claims 1-6.
9. A computer storage medium, characterized in that The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the stepper motor stall detection method as described in any one of claims 1-6.
Citation Information
Patent Citations
Food processor and control method thereof
CN108042013A
Adjusting method of cooking machine, cooking machine and storage medium
CN110120774A
Stepping motor load judgment method and stepping motor closed-loop control system
CN114649982A