A method, device, equipment and storage medium for step correction of a motor
By monitoring the step loss threshold when the motor rotates to the mechanical limit point, the step loss correction process is triggered, which solves the positioning deviation problem caused by stepper motor step loss, realizes automatic motor correction and improves user experience.
Patent Information
- Application Number
- CN202010602880.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-29
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2040-06-29
AI Technical Summary
Stepper motors are prone to step loss when not under closed-loop control, which leads to positioning deviations and affects user experience. This is especially true in devices or apparatuses without limit circuits, where it is difficult to correct through software.
By monitoring the critical point where the motor rotates to the mechanical limit point and loses steps, a step loss correction process is triggered. The software controls the motor to turn to the mechanical limit point and return to the last position operated by the user, ensuring that the logical coordinates remain unchanged.
It enables automatic motor correction under mechanical limit conditions, corrects the step loss problem in the hardware structure, and improves the user experience.
Smart Images

Figure CN113938067B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of camera product application, and particularly to a motor step loss correction method, device and storage medium. BACKGROUND
[0002] With the increasing maturity and popularity of smart home solutions, more and more camera-related products are emerging. The stepping motor in the cloud platform can achieve open-loop control of position and speed of the motor according to the number of pulses and pulse frequency, and is a cheap, simple and easy-to-use control motor, which is widely used in the field of automation control. However, due to the open-loop control of the stepping motor, improper selection or use of the stepping motor can easily cause the stepping motor to lose steps, also known as step loss, that is, the stepping motor does not reach the position it should reach according to the instructions. SUMMARY
[0003] The main purpose of the embodiments of the present application is to provide a motor step loss correction method, device, equipment and storage medium, which is based on the structure of mechanical limit to correct the motor step loss.
[0004] To achieve the above purpose, the embodiments of the present application provide a motor step loss correction method, which comprises the following steps:
[0005] Monitoring the rotation operation of the motor from the initial position to the direction of the step loss correction critical point close to the mechanical limit point;
[0006] When it is monitored that the motor stops rotating between the step loss correction critical point and the mechanical limit point, triggering the step loss correction processing of the motor.
[0007] To achieve the above purpose, the embodiments of the present application provide a motor step loss correction device, which comprises:
[0008] A monitoring module for monitoring the rotation operation of the motor from the initial position to the direction of the step loss correction critical point close to the mechanical limit point;
[0009] A step loss correction processing module for triggering the step loss correction processing of the motor when it is monitored that the motor stops rotating between the step loss correction critical point and the mechanical limit point.
[0010] To achieve the above purpose, the embodiments of the present application also provide an electronic device, which comprises a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing the connection and communication between the processor and the memory. The program is executed by the processor to realize the steps of the above method.
[0011] To achieve the above object, the application provides a computer readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the foregoing method.
[0012] The application provides a motor step loss correction method, device, equipment and storage medium, when a user operates a motor to rotate close to a mechanical limit point, software automatically controls the motor to rotate to the mechanical limit point and return to the last position of the user operation, the logical coordinates are unchanged when rotating to the mechanical limit point, and the repair of the hardware structure step loss is ensured. BRIEF DESCRIPTION OF DRAWINGS
[0013] Figure 1 is a motor step loss correction method flow chart provided by an embodiment of the application;
[0014] Figure 2 is a motor step loss correction device schematic diagram provided by an embodiment of the application;
[0015] Figure 3 is a motor coordinate schematic diagram provided by the application;
[0016] Figure 4 is a motor rotating to the mechanical limit schematic diagram provided by the application;
[0017] Figure 5 is a motor homing schematic diagram provided by the application. DETAILED DESCRIPTION
[0018] It should be understood that the specific embodiments described herein are merely intended to explain the application and are not intended to limit the application.
[0019] In the following description, the suffixes such as "module", "part", or "unit" used for an element are merely intended for facilitating explanation of the application and have no particular meaning by itself. Thus, "module", "part", or "unit" can be mixedly used.
[0020] During the motor rotation, the motor is inevitably affected by the driving force of the motor itself and the hardware structure, and step loss may occur. After the step loss, the positioning deviation occurs, which affects the user experience. In the case of a hardware limit circuit, correction can be relatively easy, but some devices or apparatuses using a stepper motor do not have a limit circuit, only a mechanical limit of the structure, and the software cannot correct according to the limit circuit. The application is software that corrects the motor step loss according to the mechanical limit of the structure.
[0021] The correction is performed in the user operation of the motor unidirectional rotation, cruise, automatic tracking and the like.
[0022] When the user operates the motor to rotate it close to the mechanical limit, the software automatically controls the motor to turn towards the mechanical limit and return to the last position operated by the user. The logical coordinates remain unchanged when turning towards the mechanical limit, ensuring the repair of any lost steps in the hardware structure.
[0023] Example 1
[0024] like Figure 1 As shown in the figure, this embodiment provides a flowchart of a method for correcting motor step loss, which includes the following steps:
[0025] Step S110: Monitor the rotation of the motor from its initial position toward the critical point for step loss correction near the mechanical limit point;
[0026] Step S120: When it is detected that the motor stops rotating between the step loss correction critical point and the mechanical limit point, the step loss correction process of the motor is triggered.
[0027] The step of detecting that the motor stops rotating between the step loss correction critical point and the mechanical limit point further includes: determining the current coordinate point at which the motor stops rotating.
[0028] Specifically, the step loss correction process for triggering the motor includes: issuing a first rotation command to the motor to continue rotating towards the mechanical limit point, so that the motor rotates from the current coordinate point to the mechanical limit point according to the first rotation command, thereby realizing the step loss correction of the motor.
[0029] Wherein, the first rotation command is the first step number of the motor rotation, and the first step number is greater than the number of steps from the current coordinate point to the mechanical limit point.
[0030] This embodiment of the invention further includes: after the motor completes its rotation according to the first rotation command, a second rotation command is issued to the motor to rotate from the mechanical limit point to the current coordinate point, so that the motor rotates back to the current coordinate point according to the second rotation command; wherein, the second rotation command is the second number of steps of the motor rotation, and the second number of steps is equal to the number of steps from the mechanical limit point to the current coordinate point.
[0031] Example 2
[0032] Figure 2 This is a schematic diagram of a motor step loss correction device provided in Embodiment 2 of the present invention, as shown below. Figure 2 As shown, it includes: a monitoring module 201 and a step loss correction processing module 202.
[0033] The monitoring module 201 is used to monitor the rotation of the motor from its initial position toward the step loss correction critical point near the mechanical limit point; the step loss correction processing module 202 is used to trigger the step loss correction processing of the motor when it is detected that the motor stops rotating between the step loss correction critical point and the mechanical limit point.
[0034] The step loss correction processing module 202 includes a determination unit, used to determine the current coordinate point at which the motor stops rotating when the motor stops rotating between the step loss correction critical point and the mechanical limit point.
[0035] The step loss correction processing module 202 includes a step loss correction processing unit, which issues a first rotation command to the motor to continue rotating towards the mechanical limit point, so that the motor rotates from the current coordinate point to the mechanical limit point according to the first rotation command, thereby realizing the step loss correction of the motor; wherein, the first rotation command is the number of the first step of the motor rotation, and the number of the first step is greater than the number of steps from the current coordinate point to the mechanical limit point.
[0036] Embodiment 3 of the present invention proposes an electronic device, the device including a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for establishing communication between the processor and the memory. The program is executed by the processor to achieve, for example... Figure 1 The specific steps are shown below.
[0037] Embodiment 4 of the present invention provides a computer-readable storage medium that stores one or more programs, which can be executed by one or more processors to achieve, for example... Figure 1 The specific steps are shown below.
[0038] like Figure 3 As shown, point O is the origin (initial position) of the coordinate system, and point C is the mechanical limit point of the structure. The distance from coordinate point A (the critical point for step loss correction) to coordinate point C is AC, the distance from the origin O to point C is OC, and the distance from point B to point C is BC. The distances mentioned above refer to the number of steps the stepper motor rotates.
[0039] The motor rotates from the origin O towards the mechanical limit point C. When the motor rotates within the range [A, C], for example, stopping at coordinate point B, the software immediately issues a command (the first rotation command) to the motor to continue rotating OC steps towards point C (this can also be other numbers of steps, but must be greater than the number of steps between B and C, i.e., the number of steps that absolutely guarantee a successful reset). After the motor has completed OC steps of rotation (see...), the software continues rotating... Figure 4, the dashed line indicates that it is necessary to ensure that it can rotate over the mechanical limit position of point C), the software issues a command (second rotation command) to rotate BC steps to point B (see Figure 5 ), so as to realize correction in the hardware structure. The motor rotates OC steps to point C and then rotates BC steps to point B, and the two operations are referred to as micro-reset.
[0040] The definition rule of point A (step loss correction critical point) is that the AC distance is a micro distance that is not easily detected by the user, so that the micro-reset action does not affect the user experience. If the AC length is too large, the micro-reset probability is high, the number of resets is large, and the user experience is not good; if the AC length is too small, the micro-reset probability is low, the number of resets is small, and the motor step loss is not corrected in time. The AC length can be defined as an empirical value according to the actual use effect.
[0041] The motor rotates OC steps to point C, and this step number can absolutely guarantee the success of the reset, but the rotation time is relatively long. It can also rotate OC / 2 steps, or even smaller, but it must be greater than the BC length, and the smaller the rotation step number, the shorter the rotation time, and the micro-reset action can be completed quickly. The motor step loss probability can be set as small as possible according to the actual use effect, but it must be ensured that it can rotate over the mechanical limit position of point C, see Figure 4 .
[0042] After the motor rotates to point C, although it continues to rotate, the gimbal position does not rotate, and when the motor rotates a specified number of steps, the motor stops rotating, at this time the gimbal is still at point C, and the physical calibration is completed.
[0043] The motor step loss correction method, device, equipment and storage medium provided by the embodiment of the application can automatically control the motor to rotate to the mechanical limit position and return to the last position operated by the user when the user operates the motor to rotate close to the mechanical limit position, the logical coordinates remain unchanged when the motor rotates to the mechanical limit position, and the repair of the hardware structure step loss is ensured.
[0044] Those skilled in the art can understand that all or some of the steps in the method disclosed above, the functions of the modules / units in the system and the device can be implemented as software, firmware, hardware and appropriate combinations thereof.
[0045] In hardware implementations, the division of functionality between the functional modules / units referred to in the above description does not necessarily correspond to a division of physical components; for example, one physical component can have multiple functionalities, or one functionality or step can be performed by several physical components in cooperation. Certain physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on computer readable media, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Further, it should be appreciated by those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
[0046] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and are not intended to limit the scope of the present application. Any modification, equivalent replacement and improvement made by those of ordinary skill in the art without departing from the scope and spirit of the present application shall fall within the scope of the present application.
Claims
1. A method for step-out correction of an electric machine, characterized in that, The method comprises: monitoring the rotation operation of the motor from the initial position to the step loss correction critical point close to the mechanical limit point; when it is monitored that the motor stops rotating between the step loss correction critical point and the mechanical limit point, triggering the step loss correction processing of the motor; after the step of monitoring that the motor stops rotating between the step loss correction critical point and the mechanical limit point, further comprising: determining the current coordinate point of the motor stopping rotating; the step of triggering the step loss correction processing of the motor comprises: issuing a first rotation instruction to the motor to continue rotating to the mechanical limit point, and making the motor rotate from the current coordinate point to the mechanical limit point according to the first rotation instruction, so as to realize the step loss correction of the motor; the first rotation instruction is the first number of steps of the motor rotating, and the first number of steps is greater than the number of steps from the current coordinate point to the mechanical limit point.
2. The method of claim 1, wherein, Further comprising: after the motor rotates according to the first rotation instruction, issuing a second rotation instruction to the motor to rotate from the mechanical limit point to the current coordinate point, so that the motor rotates to the current coordinate point according to the second rotation instruction; wherein the second rotation instruction is the second number of steps of the motor rotating, and the second number of steps is equal to the number of steps from the mechanical limit point to the current coordinate point.
3. A device for step-out correction of an electric machine, characterized in that The device comprises: a monitoring module, configured to monitor the rotation operation of the motor from the initial position to the step loss correction critical point close to the mechanical limit point; a step loss correction processing module, configured to trigger the step loss correction processing of the motor when it is monitored that the motor stops rotating between the step loss correction critical point and the mechanical limit point; the step loss correction processing module comprises: a determination unit, configured to determine the current coordinate point of the motor stopping rotating when it is monitored that the motor stops rotating between the step loss correction critical point and the mechanical limit point; and a step loss correction processing unit, configured to issue a first rotation instruction to the motor to continue rotating to the mechanical limit point, and make the motor rotate from the current coordinate point to the mechanical limit point according to the first rotation instruction, so as to realize the step loss correction of the motor; wherein the first rotation instruction is the first number of steps of the motor rotating, and the first number of steps is greater than the number of steps from the current coordinate point to the mechanical limit point.
4. An electronic device, comprising: The device comprises a memory, a processor, a program stored on the memory and executable on the processor, and a data bus for realizing the connection communication between the processor and the memory, and the program is executed by the processor to realize the steps of the motor step loss correction method according to any one of claims 1-2.
5. A computer readable storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to realize the steps of the motor step loss correction method according to any one of claims 1-2.
Citation Information
Patent Citations
Mechanical arm transmission device of semiconductor chip production equipment
CN104733361A
Stepper motor out-of-step compensation method and device
CN106571758A