Stepping motor reverse gap error compensation method and device, household appliance and medium

By obtaining the compensation flag and calculating the backlash error value using a single sensor timing method, the problem of inaccurate positioning of the stepper motor during angular rotation was solved, error compensation for each reverse rotation was achieved, and rotation accuracy and consistency were improved.

CN115378315BActive Publication Date: 2026-04-21GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GREE ELECTRIC APPLIANCE INC OF ZHUHAI
Filing Date
2022-08-23
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing stepper motors cannot accurately position and return to center when driving the carrier to rotate at an angle, mainly due to inconsistent backlash errors caused by manufacturing process errors. There is no effective error compensation method in the existing technology.

Method used

The backlash error detection of the stepper motor is determined by obtaining a preset compensation flag. If it has been completed, the backlash error value is obtained and error compensation is performed. If it has not been completed, error detection is performed, the backlash error value is calculated using a single sensor, and error compensation is performed during each rotation.

Benefits of technology

This achieves accurate positioning and homing of the stepper motor during each reverse rotation, reducing the waste of computing resources and improving rotation accuracy and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115378315B_ABST
    Figure CN115378315B_ABST
Patent Text Reader

Abstract

This invention relates to the field of household appliance technology, specifically to a method, device, household appliance, and storage medium for compensating backlash error of a stepper motor. The method includes: when the stepper motor drives a carrier to perform an angle adjustment operation, acquiring a preset compensation flag, which indicates whether the stepper motor has completed a backlash error detection operation; determining whether the stepper motor has completed the backlash error detection operation based on the compensation flag; if the compensation flag indicates that the stepper motor has completed the backlash error detection operation, acquiring the corresponding backlash error value; compensating for the backlash error by adjusting a preset rotation angle corresponding to the angle adjustment operation based on the backlash error value, and controlling the stepper motor to adjust the angle according to the compensated rotation angle. This invention compensates for the backlash error generated when the stepper motor rotates in the reverse direction, ensuring accurate positioning and return to center when driving the carrier to rotate at an angle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of household appliance technology, and in particular to a method, device, household appliance, and storage medium for compensating backlash error of a stepper motor. Background Technology

[0002] In home appliances, the oscillation function is very popular with consumers. A new feature is the fine-tuning of the oscillation head angle, which allows the head to rotate in small increments of 5° or 10°. This technology requires high precision from the motor driving the head. Existing motor drive technologies mainly include: direct stepper motor drive; and mechanical transmission structure drive: using high and low voltage levels to control the motor's minute rotation, thereby driving a mechanical transmission structure to achieve very high-precision displacement adjustment. However, these existing drive technologies suffer from factors such as stepper motor play and transmission errors that affect the rotational accuracy of home appliances. This results in deviations in rotation angle or fine-tuning of the head each time the appliance reverses direction.

[0003] Due to manufacturing process errors, the backlash error generated by different stepper motors rotating in opposite directions is not consistent, and error compensation is very difficult to achieve. Therefore, the existing technology does not involve backlash error compensation for stepper motors. When existing stepper motors drive the carrier to rotate at an angle, they are mostly unable to accurately position and return to center. Summary of the Invention

[0004] This invention proposes a method, device, stepper motor, and storage medium for compensating backlash error of stepper motors, in order to solve the problem in the prior art that stepper motors cannot accurately position and return to center when driving a carrier to rotate at an angle.

[0005] In a first aspect, the present invention provides a method for compensating backlash error of a stepper motor, the method comprising:

[0006] When the stepper motor drives the carrier to perform angle adjustment operation, a preset compensation flag is obtained. The compensation flag is used to indicate whether the current stepper motor has completed the backlash error value detection operation.

[0007] Determine whether the current stepper motor has completed the backlash error value detection operation based on the compensation flag.

[0008] If the compensation flag indicates that the current stepper motor has completed the backlash error value detection operation, then the corresponding backlash error value is obtained;

[0009] The preset rotation angle corresponding to the angle adjustment operation is compensated for based on the backlash error value, and the stepper motor is controlled to adjust the angle according to the compensated rotation angle.

[0010] Furthermore, the method also includes:

[0011] If the compensation flag indicates that the current stepper motor has not completed the backlash error value detection operation, then the error detection operation is performed.

[0012] Furthermore, the error detection operation includes:

[0013] Control the stepper motor to drive the carrier to rotate towards the second limit position at a preset first angle, and record the starting time of the stepper motor driving the carrier to rotate in the opposite direction from the second limit position to the first limit position. The first angle is greater than the angle between the first limit position and the second limit position.

[0014] The rotation time of the stepper motor driving the carrier to rotate from the second limit position to the first limit position is timed starting from the start time.

[0015] The reverse rotation angle of the stepper motor is calculated based on the rotation time and the rotation speed of the stepper motor, and the reverse backlash error value is determined based on the difference between the reverse rotation angle and the limit rotation angle.

[0016] Furthermore, the stepping time for the stepper motor to drive the carrier to rotate from the second extreme position to the first extreme position, starting from the initial time, includes:

[0017] The system detects whether a detection signal indicating that the stepper motor has driven the carrier to rotate to the first extreme position has been received. The detection signal is sent by a sensor located at the first extreme position.

[0018] The timing stops when the detection signal is received, and the rotation time is obtained.

[0019] Further, based on the backlash error value, error compensation is performed on the preset rotation angle corresponding to the angle adjustment operation, and the stepper motor is controlled to adjust the angle according to the error-compensated rotation angle, including:

[0020] The rotation angle after error compensation is determined based on the sum of the backlash error value and the preset rotation angle.

[0021] Furthermore, after performing the error detection operation, the method further includes:

[0022] Update the compensation flag to indicate that the current stepper motor has completed the backlash error value detection operation, and save the backlash error value.

[0023] Furthermore, before controlling the stepper motor to adjust the angle according to the error-compensated rotation angle, the method further includes:

[0024] Determine whether the rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepper motor;

[0025] If there is a discrepancy, the stepper motor will be controlled to adjust its angle according to the rotation angle after error compensation.

[0026] Secondly, the present invention also provides a stepper motor backlash error compensation device, the device comprising:

[0027] The first acquisition module is used to acquire a preset compensation flag when the stepper motor drives the carrier to perform an angle adjustment operation. The compensation flag is used to indicate whether the current stepper motor has completed the backlash error value detection operation.

[0028] The first judgment module is used to determine whether the current stepper motor has completed the backlash error value detection operation based on the compensation flag bit.

[0029] The second acquisition module is used to acquire the corresponding backlash error value if the compensation flag indicates that the current stepper motor has completed the backlash error value detection operation.

[0030] The control module is used to compensate for the preset rotation angle corresponding to the angle adjustment operation based on the backlash error value, and to control the stepper motor to adjust the angle based on the rotation angle after error compensation.

[0031] Furthermore, the control module is also used to perform an error detection operation when the compensation flag indicates that the current stepper motor has not completed the backlash error value detection operation;

[0032] The control module is specifically used to control the stepper motor to drive the carrier to rotate towards the second extreme position at a preset first angle, record the start time of the stepper motor driving the carrier to rotate in the reverse direction from the second extreme position to the first extreme position, wherein the first angle is greater than the angle between the first extreme position and the second extreme position; start timing the rotation time of the stepper motor driving the carrier to rotate from the second extreme position to the first extreme position from the start time; calculate the reverse rotation angle of the stepper motor based on the rotation time and the rotation speed of the stepper motor; and determine the reverse backlash error value based on the difference between the reverse rotation angle and the extreme rotation angle.

[0033] Furthermore, the device also includes a storage module, used to update the compensation flag to indicate that the current stepper motor has completed the backlash error value detection operation after the control module performs the error detection operation, and to save the backlash error value.

[0034] Furthermore, the device also includes: a second judgment module, used to determine whether the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepper motor;

[0035] The control module is also used to control the stepper motor to adjust the angle according to the rotation angle after error compensation when the angle adjustment operation corresponds to the rotation direction of the stepper motor driving the carrier is inconsistent with the historical rotation direction of the stepper motor.

[0036] Thirdly, the present invention provides a household appliance, comprising:

[0037] A stepper motor is installed inside the machine, which drives the machine to rotate to achieve angle adjustment.

[0038] A corresponding limit structure is provided at the first and second limit positions of the machine rotation. A sensor is provided on the limit structure corresponding to the first limit position. The sensor is used to send a detection signal to the controller when the machine is detected to rotate to the first limit position.

[0039] The controller includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described above.

[0040] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.

[0041] The stepper motor backlash error compensation method, device, stepper motor, and storage medium provided in this invention determine whether the stepper motor has completed the backlash error value detection operation based on a preset compensation flag. If it has, the corresponding backlash error value is obtained. Based on the backlash error value, the preset rotation angle corresponding to the angle adjustment operation of the stepper motor driving the carrier is compensated for the error. The stepper motor is then controlled to adjust the angle according to the error-compensated rotation angle. This achieves a uniform compensation error value for the backlash error generated each time the carrier is driven in reverse, solving the problem in the prior art that stepper motors often cannot accurately position and return to center when driving the carrier to rotate at an angle.

[0042] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0043] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0044] Figure 1 This is a flowchart of the stepper motor backlash error compensation method provided in Embodiment 1 of the present invention;

[0045] Figure 2 This is a flowchart of the stepper motor backlash error compensation method provided in Embodiment 2 of the present invention;

[0046] Figure 3 This is a schematic diagram of the rotating structure of a household appliance in an embodiment of the present invention;

[0047] Figure 4 This is a structural diagram of the stepper motor backlash error compensation device provided in Embodiment 3 of the present invention. Detailed Implementation

[0048] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0049] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0050] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined.

[0051] The stepper motor backlash error compensation method and device provided by the present invention can obtain the overall backlash error (i.e. the excess angle when the limit angle rotation is timed) by detecting the backlash error during the initial power-on. Based on the backlash error compensation algorithm, the error value is uniformly compensated every time the machine head reverses, so that the rotation error of each stepper motor can be accurately controlled, ensuring that the stepper motor can accurately position and return to center when rotating at an angle.

[0052] Example 1

[0053] Figure 1 This invention illustrates a method for compensating for backlash error in a stepper motor, as proposed in an embodiment of the present invention. Figure 1 As shown in the embodiment of the present invention, the stepper motor backlash error compensation method includes the following steps:

[0054] S11. When the stepper motor drives the carrier to perform angle adjustment operation, obtain the preset compensation flag position.

[0055] The compensation flag is used to indicate whether the current stepper motor has completed the backlash error detection operation, and the initial value of the compensation flag indicates that the current stepper motor has not completed the backlash error detection operation.

[0056] This invention uses an electric fan as an example to explain the method for compensating for the backlash error of a stepper motor. This is understandable. Besides its application in the fan field, this compensation method can also be applied to other products involving stepper motor adjustment of direction or angle, such as electric heaters and air conditioners; this invention does not specifically limit its application in these areas.

[0057] The electric fan includes a fan head and a stepper motor housed within the fan head. The stepper motor drives the fan head to rotate, thereby adjusting the angle of the fan head. Corresponding limiting structures are provided at the first and second extreme positions of the fan head's rotation. The fan head rotates between these two extreme positions based on a limit angle 'a'. The fan's limit angle 'a' is a known angle, determined by the fan's own oscillation angle, and can be the angle between the first and second extreme positions, typically between 0° and 360°.

[0058] The fan contains a control unit, which can be implemented by a controller. The control unit outputs pulses to the stepper motor to rotate it, thereby adjusting the angle of the fan head. The stepper motor's rotational speed, v, is a known quantity.

[0059] In this embodiment of the invention, the stepper motor driving the carrier to perform angle adjustment operation can be the oscillation function or the angle fine adjustment function of the fan. In addition, it can also include other functions involving the adjustment of the head angle. This invention does not specifically limit these functions.

[0060] Specifically, when the fan first performs a head angle adjustment operation, a backlash error detection is performed. When a backlash error value is detected, the preset compensation flag is updated to indicate that the stepper motor has completed the backlash error detection operation, and the obtained backlash error value is saved. Subsequently, each time the fan is powered on, when the fan initiates a head angle adjustment operation, the preset compensation flag can be retrieved to determine whether a backlash error value has been detected.

[0061] S12. Determine whether the backlash error value detection operation of the current stepper motor has been completed based on the compensation flag. If the backlash error value detection operation has been completed, proceed to steps S13 to S14.

[0062] In this embodiment of the invention, the compensation flag bit is used to determine whether the current stepper motor has completed the backlash error value detection operation. If the backlash error value detection operation has been completed, the corresponding compensation flag bit is set to 1, indicating that the backlash error value detection operation has been completed. When the stepper motor performs backlash compensation in the future, the corresponding backlash error value can be directly obtained for compensation.

[0063] S13. Obtain the corresponding backlash error value.

[0064] S14. Based on the backlash error value, perform error compensation on the preset rotation angle corresponding to the angle adjustment operation, and control the stepper motor to adjust the angle according to the error-compensated rotation angle.

[0065] It is understood that the preset rotation angle corresponding to the angle adjustment operation of the stepper motor driving the carrier can be a preset rotation angle according to the actual application needs or a rotation angle corresponding to the angle adjustment function selected by the user. This invention does not specifically limit this. Generally, the preset rotation angle corresponding to the angle fine-tuning function can be in the range of 5°-10°.

[0066] In this embodiment of the invention, the preset rotation angle corresponding to the angle adjustment operation is compensated for error based on the backlash error value, and the stepper motor is controlled to adjust the angle based on the error-compensated rotation angle. Specifically, this includes: determining the error-compensated rotation angle based on the sum of the backlash error value and the preset rotation angle, and controlling the stepper motor to adjust the angle based on the error-compensated rotation angle.

[0067] The stepper motor backlash error compensation method provided in this invention determines whether the stepper motor has completed the backlash error value detection operation based on a preset compensation flag. If it has, the corresponding backlash error value is obtained. Based on the backlash error value, the preset rotation angle corresponding to the angle adjustment operation of the stepper motor driving the carrier is compensated for the error. The stepper motor is then controlled to adjust the angle according to the angle after the error compensation. This achieves a uniform compensation error value for the backlash error generated each time the carrier is driven in reverse, solving the problem in the prior art that stepper motors often cannot accurately position and return to center when driving the carrier to rotate at an angle.

[0068] Example 2

[0069] Figure 2 This invention illustrates a method for compensating for backlash error in a stepper motor, as proposed in an embodiment of the present invention. Figure 2 As shown in the embodiment of the present invention, the stepper motor backlash error compensation method includes the following steps:

[0070] S11. When the stepper motor drives the carrier to perform angle adjustment operation, obtain the preset compensation flag position.

[0071] The compensation flag is used to indicate whether the current stepper motor has completed the backlash error detection operation, and the initial value of the compensation flag indicates that the current stepper motor has not completed the backlash error detection operation.

[0072] This invention uses an electric fan as an example to explain the method for compensating for the backlash error of a stepper motor. This is understandable. Besides its application in the fan field, this compensation method can also be applied to other products involving stepper motor adjustment of direction or angle, such as electric heaters and air conditioners; this invention does not specifically limit its application in these areas.

[0073] The electric fan includes a fan head and a stepper motor housed within the fan head. The stepper motor drives the fan head to rotate, thereby adjusting the angle of the fan head. For example... Figure 3 As shown, corresponding limiting structures are set at the first and second extreme positions of the fan head rotation, respectively. The fan head rotates between the first and second extreme positions based on the extreme angle α. The extreme angle α of the fan is a known angle, determined by the fan's own oscillation angle, and can be the angle between the first and second extreme positions, generally between 0° and 360°.

[0074] S12. Determine whether the backlash error value detection operation of the current stepper motor has been completed based on the compensation flag. If the backlash error value detection operation has been completed, execute steps S13 to S14. If the backlash error value detection operation has not been completed, execute steps S15 to S17 to perform the error detection operation.

[0075] In this embodiment of the invention, the compensation flag is used to determine whether the backlash error value detection operation of the current stepper motor has been completed. If the backlash error value detection operation has been completed, the corresponding compensation flag is set to 1, indicating that the backlash error value detection operation has been completed. When the stepper motor performs backlash compensation in the future, the corresponding backlash error value can be directly obtained for compensation. If the backlash error value detection operation has not been completed, the corresponding compensation flag is set to 0, indicating that the backlash error value detection operation has not been completed. Further error detection is still required to enable the stepper motor to perform backlash compensation.

[0076] S13. Obtain the corresponding backlash error value.

[0077] S14. Based on the backlash error value, perform error compensation on the preset rotation angle corresponding to the angle adjustment operation, and control the stepper motor to adjust the angle according to the error-compensated rotation angle. Specifically, the error-compensated rotation angle is the sum of the backlash error value and the preset rotation angle.

[0078] S15. Control the stepper motor to drive the carrier to rotate towards the second extreme position at a preset first angle, and record the starting time of the stepper motor driving the carrier to rotate in the opposite direction from the second extreme position to the first extreme position. Wherein, the first angle is greater than the angle between the first extreme position and the second extreme position;

[0079] Understandably, in practical applications, the stepper motor is an internal drive structure of the carrier. During a short period when the motor drives the carrier to rotate in the opposite direction, the stepper motor operates while the carrier's operation is delayed. This delayed operation consumes working time, increasing the overall running time. When the motor drives the carrier to rotate in the opposite direction from the second extreme position to the first extreme position, the stepper motor's running time is longer than the carrier's running time. Theoretically, within the same time frame, the angle of the stepper motor's reverse rotation is greater than the angle of the carrier's reverse rotation. Therefore, the stepper motor exhibits a backlash error, which is the difference between the angle of the motor's reverse rotation and the angle of the carrier's reverse rotation. To accurately detect this backlash error, in this embodiment, a first angle is preset. This first angle is greater than the angle between the first and second extreme positions, i.e., the fan's extreme rotation angle. The stepper motor is controlled to drive the carrier to rotate towards the second extreme position at the preset first angle, ensuring that the carrier can rotate to the second extreme position, facilitating further recording of the reverse rotation start time.

[0080] S16. Starting from the initial time, the rotation time of the stepper motor driving the carrier to rotate from the second limit position to the first limit position is timed.

[0081] In embodiments of the present invention, such as Figure 3As shown, a sensor is installed at the limiting structure corresponding to the first extreme position. The sensor sends a detection signal to the controller when it detects that the carrier has rotated to the first extreme position. Further, the error detection method of the present invention specifically includes: recording the moment when the motor drives the carrier to rotate to the second extreme position at a preset first angle as the starting time; at this time, the motor begins to drive the carrier to rotate in the reverse direction from the second extreme position to the first extreme position, and timing the reverse rotation time; when the stepper motor drives the carrier to rotate to the first extreme position, the sensor located at the first extreme position sends a detection signal indicating that the carrier has rotated to the first extreme position; upon receiving the detection signal, timing stops, thus obtaining the motor's rotation time.

[0082] Compared to existing technologies that use multiple sensors for feedback to achieve position detection, this invention only requires a single sensor for position detection, achieving accurate positioning and alignment at low cost when a stepper motor drives a carrier to perform angle adjustment operations.

[0083] S17. Calculate the reverse rotation angle of the stepper motor based on the rotation time and the rotation speed of the stepper motor, and determine the backlash error value based on the difference between the reverse rotation angle and the limit rotation angle.

[0084] In this embodiment of the invention, the step of calculating the reverse rotation angle of the stepper motor based on the rotation time and the rotation speed of the stepper motor specifically includes: calculating the product of the motor's rotation time and rotation speed to obtain the reverse rotation angle of the stepper motor.

[0085] In specific embodiments, such as Figure 3As shown, by setting a sensor at the limiting structure at the first extreme position of the stepper motor driving the carrier to rotate, the controller can acquire detection signals from the sensor. Specifically, the stepper motor is controlled to drive the carrier to rotate towards the second extreme position by a first angle b, where b > extreme angle a, to ensure that the stepper motor drives the carrier to reach the second extreme position. After rotating by angle b, the carrier rotates in the opposite direction, and the control unit starts timing. When the stepper motor drives the carrier to rotate to the first extreme position, the sensor set at the first extreme position sends a detection signal to the controller, thereby causing the controller to stop timing, obtain the reverse rotation time, and calculate the reverse backlash error value. Specifically, the backlash error value can be calculated using the formula c = v * t1 - a, where c represents the backlash error value, v represents the motor rotation speed, t1 represents the motor rotation time, and a represents the limit rotation angle. Here, a is the structural limit angle of the carrier, a known angle such as the oscillation angle of a fan, determined by the oscillation angle of the fan motor itself, typically between 0° and 360°. If v * t1 > a, it indicates a backlash error value exists; if v * t1 = a, it indicates no backlash error value exists, and no rotation angle compensation is needed; the stepper motor rotates at its normal angle. The sensor is located at the moving part of the machine head (i.e., the motion end point), ensuring accurate detection of the final backlash error value regardless of intermediate transmission errors or motor misalignment.

[0086] S18. Update the compensation flag to indicate that the current stepper motor has completed the backlash error value detection operation, and save the backlash error value.

[0087] In this embodiment of the invention, after error detection is performed, the compensation flag is updated to indicate that the stepper motor has completed the backlash error value detection operation, and the backlash error value is saved. This allows the backlash error value obtained after the backlash error value detection operation to be stored and read for a long time, enabling the stepper motor to directly obtain the historical backlash error value and the updated compensation flag each time it is powered on.

[0088] In this embodiment of the invention, when the machine uses the yaw function for the first time, the backlash error of the entire machine head yaw system is automatically detected by the sensor, and the error value and the detection completion flag are stored in the chip memory ROM. Each time the machine is powered on, the backlash error and the detection completion flag are read. Subsequently, it is only necessary to compensate for the backlash error when controlling the machine head to yaw or fine-tune the direction, so as to achieve accurate yaw positioning and fine-tuning of the whole machine and solve the problem of inconsistent backlash error values ​​at low cost.

[0089] In this embodiment of the invention, before the stepper motor is adjusted according to the error-compensated rotation angle in step S14, the stepper motor backlash error compensation method further includes step S19 (not shown in the accompanying drawings):

[0090] S19. Determine whether the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the stepper motor driving the carrier; if the angle rotation direction corresponding to the angle adjustment operation is inconsistent with the historical rotation direction of the stepper motor driving the carrier, then execute step S14 to control the stepper motor to adjust the angle according to the rotation angle after error compensation.

[0091] In this embodiment, after executing step S19, if the determination result is that the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepper motor, then no angle adjustment is performed, and the vehicle can rotate between the first limit position and the second limit position.

[0092] It is understood that determining whether the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the stepper motor driving the carrier includes: determining whether the angle rotation direction corresponding to the angle adjustment operation is consistent with the current rotation direction of the stepper motor driving the carrier. The operating scenario can be: receiving a reverse rotation command during the rotation of the stepper motor driving the carrier, and starting to rotate in the opposite direction to the current rotation direction.

[0093] In this embodiment of the invention, if the rotation direction corresponding to the angle adjustment operation is inconsistent with the historical rotation direction of the stepper motor-driven carrier, it indicates that the stepper motor is in a reverse rotation operation state. In this case, error compensation is performed on the preset rotation angle corresponding to the angle adjustment operation based on the backlash error value, and the stepper motor is controlled to adjust its angle according to the error-compensated rotation angle. If the rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the stepper motor-driven carrier, it indicates that the machine head is not in a reverse rotation operation state. That is, no backlash error occurs at this time, and therefore, backlash error compensation and angle adjustment are not required.

[0094] The stepper motor backlash error compensation method proposed in this embodiment of the invention has the following beneficial effects:

[0095] This invention uses a single sensor to detect backlash error and calculates redundant angles during extreme angle rotation timing. Through this adaptive detection algorithm, it achieves accurate detection of stepper motor rotation error.

[0096] This invention employs a backlash error compensation algorithm to compensate for error values ​​each time the carrier is driven to rotate in the opposite direction, thereby controlling the rotation error of each stepper motor.

[0097] This invention detects and stores the backlash error using a single sensor, enabling long-term storage and retrieval of the error value. This avoids repeated calculations during each error compensation, thus saving computational resources.

[0098] Example 3

[0099] Figure 4 This invention illustrates a stepper motor backlash error compensation device proposed in an embodiment of the present invention, such as... Figure 4 As shown, the stepper motor backlash error compensation device proposed in this embodiment of the invention includes:

[0100] The first acquisition module 201 is used to acquire a preset compensation flag when the stepper motor drives the carrier to perform an angle adjustment operation. The compensation flag is used to indicate whether the current stepper motor has completed the backlash error value detection operation.

[0101] The first judgment module 202 is used to determine whether the current stepper motor has completed the backlash error value detection operation based on the compensation flag bit.

[0102] The second acquisition module 203 is used to acquire the corresponding backlash error value when the judgment result of the first judgment module 202 is that the compensation flag indicates that the current stepper motor has completed the backlash error value detection operation.

[0103] The control module 204 is used to compensate for the backlash error value of the preset rotation angle corresponding to the angle adjustment operation, and to control the stepper motor to adjust the angle according to the compensated rotation angle. Specifically, the compensated rotation angle is the sum of the backlash error value and the preset rotation angle.

[0104] In this embodiment of the invention, the control module 204 is further configured to perform an error detection operation when the compensation flag indicates that the current stepper motor has not completed the backlash error value detection operation.

[0105] Further, the control module 204 is specifically used to control the stepper motor to drive the carrier to rotate towards a second extreme position at a preset first angle, record the start time of the stepper motor driving the carrier to rotate in the reverse direction from the second extreme position to the first extreme position, where the first angle is greater than the angle between the first extreme position and the second extreme position; start timing the rotation time of the stepper motor driving the carrier from the second extreme position to the first extreme position from the start time; calculate the reverse rotation angle of the stepper motor based on the rotation time and the rotation speed of the stepper motor; and determine the reverse backlash error value based on the difference between the reverse rotation angle and the extreme rotation angle. Specifically, starting timing the rotation time of the stepper motor driving the carrier from the second extreme position to the first extreme position from the start time involves: detecting whether a detection signal indicating that the stepper motor has driven the carrier to rotate to the first extreme position is received, whereby the detection signal is sent by a sensor located at the first extreme position; stopping timing when the detection signal is received, thus obtaining the rotation time.

[0106] Furthermore, the device provided in this embodiment of the invention also includes, but is not shown in the accompanying drawings, a storage module, used to update the compensation flag to indicate that the current stepper motor has completed the backlash error value detection operation after the control module performs the error detection operation, and to save the backlash error value.

[0107] Furthermore, the device also includes, but is not shown in the accompanying drawings, a second judgment module, used to determine whether the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepper motor;

[0108] Accordingly, the control module 204 is also used to control the stepper motor to adjust the angle according to the rotation angle after error compensation when the angle rotation direction corresponding to the angle adjustment operation is inconsistent with the historical rotation direction of the carrier driven by the stepper motor; and to control the stepper motor not to adjust the angle when the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepper motor, and to rotate directly between the first limit position and the second limit position.

[0109] The stepper motor backlash error compensation device provided in Embodiment 3 of the present invention can perform the operation according to the method provided in any one of Embodiments 1 to 2 in a specific embodiment. It can achieve a uniform compensation error value for the backlash error generated each time the stepper motor drives the whole machine to rotate in the opposite direction, thus solving the problem in the prior art that stepper motors cannot accurately position and return to center when driving the carrier to rotate at an angle.

[0110] Example 4

[0111] This invention provides a stepper motor, which includes:

[0112] A stepper motor is installed inside the machine, which drives the machine to rotate to achieve angle adjustment.

[0113] like Figure 3 As shown, corresponding limit structures are respectively set at the first limit position and the second limit position of the machine rotation. A sensor is set on the limit structure corresponding to the first limit position. The sensor is used to send a detection signal to the controller when the machine head rotates to the first limit position.

[0114] The controller includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the stepper motor backlash error compensation method as described in Embodiments 1 and 2.

[0115] In this embodiment of the invention, a sensor is installed at the limiting structure at the first extreme position, enabling the controller to collect detection signals from the sensor. Specifically, the stepper motor is controlled to drive the carrier to rotate a first angle b towards the second extreme position, where b > extreme angle a, to ensure that the stepper motor drives the carrier to reach the second extreme position. After rotating by angle b, the carrier rotates in the opposite direction, and the control unit starts timing. When the stepper motor drives the carrier to rotate to the first extreme position, the sensor installed at the first extreme position sends a detection signal to the controller, causing the controller to stop timing, obtain the reverse rotation time, and calculate the reverse backlash error value. Specifically, the formula c = v * t1 - a can be used to calculate the reverse backlash error value, where c represents the reverse backlash error value, v represents the motor rotation speed, t1 represents the motor rotation time, and a represents the extreme rotation angle; where a is the structural extreme angle of the carrier, which is a known angle, such as the oscillation angle of a fan, determined by the oscillation angle of the fan motor itself, generally between 0° and 360°; if v * t1 > a, it indicates that there is a reverse backlash error value; if v * t1 = a, it indicates that there is no reverse backlash error value, and no rotation angle compensation is needed, and the stepper motor rotates at a normal angle. This invention achieves low-cost detection of backlash error value using a single sensor, thereby enabling automatic compensation of the error value each time the stepper motor drives the entire machine to rotate in the reverse direction, thus controlling the rotation error of each stepper motor. In practical applications, multiple sensors can also be used to achieve more precise control of the machine head position and reverse rotation return to center; this invention does not specifically limit this.

[0116] Example 5

[0117] The present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the program is executed by a processor, it implements the steps of the stepper motor backlash error compensation method described in Embodiments 1 and 2.

[0118] In this embodiment of the invention, if the stepper motor backlash error compensation method is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately added to or subtracted from the content as required by the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium may not include electrical carrier signals and telecommunication signals.

[0119] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the formaldehyde removal control system of the purification equipment.

[0120] Those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments can be used in any combination.

[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for compensating backlash error in a stepper motor, characterized in that, include: When the stepper motor drives the carrier to perform angle adjustment operation, a preset compensation flag is obtained. The compensation flag is used to indicate whether the current stepper motor has completed the backlash error value detection operation. Determine whether the current stepper motor has completed the backlash error value detection operation based on the compensation flag. If the compensation flag indicates that the current stepper motor has completed the backlash error value detection operation, then the corresponding backlash error value is obtained; The preset rotation angle corresponding to the angle adjustment operation is compensated for based on the backlash error value, and the stepper motor is controlled to adjust the angle according to the rotation angle after error compensation. The method further includes: If the compensation flag indicates that the current stepper motor has not completed the backlash error value detection operation, then the error detection operation is performed; The error detection operation includes: The stepper motor is controlled to drive the carrier to rotate towards the second limit position at a preset first angle. The starting time of the stepper motor driving the carrier to rotate in the opposite direction from the second limit position to the first limit position is recorded. The first angle is greater than the angle between the first limit position and the second limit position, that is, the limit rotation angle. The rotation time of the stepper motor driving the carrier to rotate from the second limit position to the first limit position is timed starting from the start time. The reverse rotation angle of the stepper motor is calculated based on the rotation time and the rotation speed of the stepper motor, and the reverse backlash error value is determined based on the difference between the reverse rotation angle and the limit rotation angle.

2. The method according to claim 1, characterized in that, The stepping motor drives the carrier to rotate from the second extreme position to the first extreme position, starting from the initial time, and includes: The system detects whether a detection signal indicating that the stepper motor has driven the carrier to rotate to the first extreme position has been received. The detection signal is sent by a sensor located at the first extreme position. The timing stops when the detection signal is received, and the rotation time is obtained.

3. The method according to claim 1, characterized in that, The backlash error value is used to compensate for the preset rotation angle corresponding to the angle adjustment operation, and the stepper motor is controlled to adjust the angle according to the compensated rotation angle, including: The rotation angle after error compensation is determined based on the sum of the backlash error value and the preset rotation angle.

4. The method according to claim 1, characterized in that, After performing the error detection operation, the method further includes: Update the compensation flag to indicate that the current stepper motor has completed the backlash error value detection operation, and save the backlash error value.

5. The method according to claim 1, characterized in that, Before controlling the stepper motor to adjust the angle according to the error-compensated rotation angle, the method further includes: Determine whether the rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepper motor; If there is a discrepancy, the stepper motor will be controlled to adjust its angle according to the rotation angle after error compensation.

6. A stepper motor backlash error compensation device, characterized in that, include: The first acquisition module is used to acquire a preset compensation flag when the stepper motor drives the carrier to perform an angle adjustment operation. The compensation flag is used to indicate whether the current stepper motor has completed the backlash error value detection operation. The first judgment module is used to determine whether the current stepper motor has completed the backlash error value detection operation based on the compensation flag bit. The second acquisition module is used to acquire the corresponding backlash error value if the compensation flag indicates that the current stepper motor has completed the backlash error value detection operation. The control module is used to compensate for the preset rotation angle corresponding to the angle adjustment operation based on the backlash error value, and to control the stepper motor to adjust the angle based on the rotation angle after error compensation. The control module is also used to perform an error detection operation when the compensation flag indicates that the current stepper motor has not completed the backlash error value detection operation; The control module is specifically used to control the stepper motor to drive the carrier to rotate towards the second extreme position at a preset first angle, record the start time of the stepper motor driving the carrier to rotate in the opposite direction from the second extreme position to the first extreme position, where the first angle is greater than the angle between the first extreme position and the second extreme position, i.e., the extreme rotation angle; start timing the rotation time of the stepper motor driving the carrier to rotate from the second extreme position to the first extreme position from the start time; calculate the reverse rotation angle of the stepper motor based on the rotation time and the rotation speed of the stepper motor; and determine the reverse backlash error value based on the difference between the reverse rotation angle and the extreme rotation angle.

7. The apparatus according to claim 6, characterized in that, The device further includes: The storage module is used to update the compensation flag to indicate that the current stepper motor has completed the backlash error value detection operation after the control module performs the error detection operation, and to save the backlash error value.

8. The apparatus according to claim 6, characterized in that, The device further includes: The second judgment module is used to determine whether the angle rotation direction corresponding to the angle adjustment operation is consistent with the historical rotation direction of the carrier driven by the stepper motor. The control module is also used to control the stepper motor to adjust the angle according to the rotation angle after error compensation when the angle adjustment operation corresponds to the rotation direction of the stepper motor driving the carrier is inconsistent with the historical rotation direction of the stepper motor.

9. A household appliance, characterized in that, include: A stepper motor is installed inside the machine, which drives the machine to rotate to achieve angle adjustment. A corresponding limit structure is provided at the first and second limit positions of the machine rotation. A sensor is provided on the limit structure corresponding to the first limit position. The sensor is used to send a detection signal to the controller when the machine is detected to rotate to the first limit position. The controller includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method as claimed in any one of claims 1-5.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Measuring method based on test paper and device

    CN105445447A

  • Control device and motor drive system

    CN112532127A