Motor rotation calibration method and device and motor driving equipment
By using the level jump detection loop to perform motor calibration during the operation of the equipment, the problems of motor calibration taking up time and increasing power consumption in the prior art are solved, and real-time calibration and low power consumption are achieved.
Patent Information
- Application Number
- CN202311191749.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-14
- Publication Date
- 2025-03-14
AI Technical Summary
The existing motor calibration method needs to be performed when the equipment is started, resulting in the equipment being unable to use normally and increasing the overall machine cost and power consumption of the equipment.
During the operation of the equipment, the level jump detection loop is used to determine that the driving object rotates to the calibration reference point, obtain the reference point coordinate value of the motor and compare it with the calibration coordinate value, calculate the coordinate difference value, and calibrate the stop position coordinate value when the motor stops rotating, and update the calibration stop position coordinate value.
Real-time motor calibration is realized during normal operation of the equipment, avoiding the time and power consumption of the independent calibration process, reducing the power consumption of the equipment as a whole, and improving the reaction speed and use time of the equipment.
Smart Images

Figure CN119628474A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of motor control, and in particular to a motor rotation calibration method, a motor rotation calibration device and a motor driving device. Background Art
[0002] Stepper motors are widely used in various industrial equipment such as monitoring equipment, automated production, instruments, robots, textile equipment, medical equipment, model airplanes, office equipment, etc. because they can achieve position control and can accurately control the rotation angle and distance. For example, IPC (network camera) equipment with target point tracking or lens rotation requirements usually needs to be used with stepper motors.
[0003] Due to the existence of equipment structure errors and motor errors, the motor may lose step after the equipment has been running for a period of time.
[0004] The solution to the problem of motor out of step is to calibrate the motor coordinates of the device by hitting the mechanical end or using photoelectric feedback components after each startup of the device, or to calibrate the motor coordinates through the calibration program automatically run by the device after the device has been running for a period of time. Since the motor coordinate calibration requires the motor to move from the initial point of the coordinate to the end point, that is, to move the entire motor coordinate stroke, the device cannot be used normally during this period of time, so this calibration method takes a lot of time and power, and is not suitable for low-power battery devices. Take low-power battery monitoring devices as an example. Since low-power battery monitoring devices are in a dormant state most of the time, they will only start when they receive an external trigger signal and track the target by rotating the lens. If calibration is performed after each startup, there is a problem of tracking source loss due to the motor calibration process making the device unusable. In addition, if the solution of adding relevant calibration components (such as photoelectric feedback components) for calibration is adopted, the overall cost of the device will increase. Summary of the invention
[0005] In view of this, the present disclosure provides a motor rotation calibration method, device and motor driving device to solve the problem that the device cannot be used normally during the motor calibration process.
[0006] The technical solution of the present disclosure is achieved as follows:
[0007] A motor rotation calibration method, comprising:
[0008] When the driven object driven by the motor rotates to a preset calibration reference point, obtaining a reference point coordinate value of the motor, wherein the reference point coordinate value corresponds to the calibration reference point;
[0009] Comparing the reference point coordinate value with the stored calibration coordinate value, and obtaining a coordinate difference between the reference point coordinate value and the calibration coordinate value when the reference point coordinate value is not equal to the calibration coordinate value, wherein the calibration coordinate value corresponds to the calibration reference point;
[0010] When the motor stops rotating, obtaining the stop position coordinate value of the motor;
[0011] The stop position coordinate value is calibrated according to the coordinate difference to obtain a calibrated stop position coordinate value, and the stop position coordinate value is updated to the calibrated stop position coordinate value.
[0012] Furthermore, the driven object rotates along a rotating slide rail under the drive of the motor, wherein the rotating slide rail includes a low-level rotating slide rail and a high-level rotating slide rail arranged adjacent to each other;
[0013] The motor calibration method further comprises:
[0014] When the driven object rotates from the low-level rotating slide rail to the high-level rotating slide rail, or when the driven object rotates from the high-level rotating slide rail to the low-level rotating slide rail, it is determined that the driven object rotates to the calibration reference point according to the level jump measured by the level jump detection circuit connected to the driven object and the rotating slide rail.
[0015] Further, when the driven object driven by the motor rotates to a preset calibration reference point, obtaining the reference point coordinate value of the motor includes:
[0016] In response to the generation of the level jump, the coordinate value of the reference point at the moment when the level jump occurs is acquired.
[0017] Further, calibrating the stop position coordinate value according to the coordinate difference to obtain the calibrated stop position coordinate value includes obtaining the calibrated stop position coordinate value by the following formula:
[0018] X'=X-(X2-X1)
[0019] Wherein, X' is the calibrated stop position coordinate value, X is the stop position coordinate value, X2 is the reference point coordinate value, X1 is the calibration coordinate value, and X2-X1 is the coordinate difference value.
[0020] Furthermore, the motor rotation calibration method further includes the following steps performed during the initial power-on phase of the device in which the motor and the driven object are located:
[0021] In response to the first power-on of the motor, controlling the motor to run at full stroke so that the driven object rotates to an initial position;
[0022] Controlling the motor to operate so that the driven object starts to rotate from an initial position;
[0023] When the driven object rotates to the calibration reference point, obtaining the reference point coordinate value of the motor corresponding to the driven object at the calibration reference point;
[0024] The reference point coordinate value is compared with the calibration coordinate value of the motor pre-stored before the initial power-on, and when the reference point coordinate value is not equal to the calibration coordinate value, the calibration coordinate value is updated to the reference point coordinate value.
[0025] Furthermore, the motor is a stepping motor.
[0026] Furthermore, the motor and the driven object are installed on a battery-powered device.
[0027] A motor calibration device, comprising:
[0028] A motor coordinate acquisition module is configured to acquire a reference point coordinate value of the motor when the driven object driven by the motor rotates to a preset calibration reference point, wherein the reference point coordinate value corresponds to the calibration reference point;
[0029] a coordinate difference obtaining module, configured to compare the reference point coordinate value with the stored calibration coordinate value, and obtain a coordinate difference between the reference point coordinate value and the calibration coordinate value when the reference point coordinate value is not equal to the calibration coordinate value, wherein the calibration coordinate value corresponds to the calibration reference point;
[0030] A stop position acquisition module, configured to acquire the stop position coordinate value of the motor when the motor stops rotating;
[0031] The coordinate calibration module is configured to calibrate the stop position coordinate value according to the coordinate difference value to obtain a calibrated stop position coordinate value, and update the stop position coordinate value to the calibrated stop position coordinate value.
[0032] A motor drive device, comprising:
[0033] A motor configured to drive and rotate a driven object;
[0034] a driving object, the driving object being driven to rotate by the motor; and
[0035] A motor calibration unit, the motor calibration unit is electrically connected to the motor and is used for:
[0036] When the driven object rotates to a preset calibration reference point, obtaining a reference point coordinate value of the motor, wherein the reference point coordinate value corresponds to the calibration reference point;
[0037] Comparing the reference point coordinate value with the stored calibration coordinate value, and obtaining a coordinate difference between the reference point coordinate value and the calibration coordinate value when the reference point coordinate value is not equal to the calibration coordinate value, wherein the calibration coordinate value corresponds to the calibration reference point;
[0038] When the motor stops rotating, obtaining the stop position coordinate value of the motor;
[0039] The stop position coordinate value is calibrated according to the coordinate difference to obtain a calibrated stop position coordinate value, and the stop position coordinate value is updated to the calibrated stop position coordinate value.
[0040] Furthermore, the motor drive device further comprises:
[0041] A rotating slide rail, the driven object rotates along the rotating slide rail under the drive of the motor, wherein the rotating slide rail comprises a low-level rotating slide rail and a high-level rotating slide rail arranged adjacent to each other;
[0042] a level jump detection circuit, the level jump detection circuit being connected to the driving object and the rotating slide rail, and being used to detect a level jump caused by the driving object rotating from the low-level rotating slide rail to the high-level rotating slide rail, or by the driving object rotating from the high-level rotating slide rail to the low-level rotating slide rail;
[0043] The motor calibration unit is further used to determine that the driven object rotates to the calibration reference point according to the level jump measured by the level jump detection circuit.
[0044] It can be seen from the above scheme that the motor rotation calibration method, device and motor drive device disclosed in the present invention realize real-time calibration of motor rotation according to the reference point coordinate value corresponding to each rotation of the driven object to the calibration reference point during the operation of the device. Since the motor rotation calibration method, device and motor drive device disclosed in the present invention are executed during the normal operation of the device, they will not occupy the calibration time independently and affect the normal use of the device. Therefore, when the motor rotation calibration method, device and motor drive device disclosed in the present invention are adopted, the device can directly enter the work and save the process of performing the motor calibration separately before entering the work, saving the time occupied by the separate motor calibration process. Moreover, when the motor rotation calibration method, device and motor drive device disclosed in the present invention are applied to battery-powered devices, since the separate motor calibration process is saved, the power consumption of the battery-powered device is saved.
[0045] By adopting the motor rotation calibration method, device and motor drive device disclosed in the present invention, the device no longer needs additional calibration independent of the normal use time of the device except for the determination of the calibration coordinate value when it is powered on for the first time, which reduces the time occupied by calibration, increases the effective movement ratio of the motor, and reduces the overall power consumption of the device. For battery-powered sleep and wake-up low-power devices, since an independent calibration process is no longer required after each wake-up, the response speed of the device is improved, the power consumption of the device is reduced, and the use time of the device is extended.
[0046] Existing battery-powered sleep-wake-up low-power devices are in sleep mode for most of the time during use. Only when the corresponding trigger signal appears (for example, when the subject of the camera device appears) will the device be started and work (for example, the camera device tracks and shoots the subject), and the device will be calibrated after it is started and before normal operation. In this case, it may cause problems with poor working results (for example, the camera device misses the subject). The motor rotation calibration method, device and motor drive device disclosed in the present invention omits the separate calibration process after each startup, and instead only determines the calibration coordinate value used for calibration after the device is powered on for the first time, and uses the calibration coordinate value as the basis for identifying whether the motor coordinate value is accurate. In the subsequent normal use of the device, the accuracy of the motor coordinate value is improved without taking up a separate calibration time, thereby achieving a faster and more timely response to the trigger signal and a lower power consumption response. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a flow chart of a motor rotation calibration method according to an exemplary embodiment;
[0048] Figure 2 is a schematic diagram of a top view of a rotating slide rail according to an exemplary embodiment;
[0049] Figure 3 is a schematic diagram of a process for determining calibration coordinate values according to an exemplary embodiment;
[0050] Figure 4 is a schematic diagram of an application scenario flow chart of a motor rotation calibration method according to an exemplary embodiment;
[0051] Figure 5 is a schematic flow chart of another application scenario of a motor rotation calibration method according to an exemplary embodiment;
[0052] Figure 6 is a schematic diagram of a logical structure of a motor rotation calibration device according to an exemplary embodiment;
[0053] Figure 7 is a schematic diagram of a connection structure of a motor drive device according to an exemplary embodiment;
[0054] Figure 8 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0055] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below with reference to the accompanying drawings and examples.
[0056] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0057] Motor step-out refers to the phenomenon that the motor is out of sync or has an abnormal step angle due to some reasons under normal working conditions. It usually means that the motor cannot run accurately according to the control signal or instruction, and cannot maintain a stable speed or position. Motor step-out will cause the motor motion trajectory to be disordered, thereby affecting the accuracy of its equipment rotation, such as affecting human tracking, prefabricated point recovery, etc. Therefore, in order to solve the problem of motor step-out, the motor rotation needs to be calibrated.
[0058] The idea of solving the problem of motor out-of-step is to use a set calibration reference point. During the operation of the device, whenever the driven object driven by the motor rotates to the calibration reference point, the reference point coordinate value of the calibration reference point is recorded once, and combined with the calibration coordinate value of the calibration reference point, it is determined whether there is an error between the reference point coordinate value and the calibration coordinate value. If the reference point coordinate value and the calibration coordinate value are equal, it indicates that there is no error between the two. If the reference point coordinate value and the calibration coordinate value are not equal, it indicates that there is an error between the two and the error needs to be eliminated. When the motor stops rotating subsequently, the stop position coordinate value of the electronic device when it stops rotating is calibrated according to the difference between the reference point coordinate value and the calibration coordinate value to obtain the calibrated stop position coordinate value. On this basis, if the motor continues to move, it will start at the stop position coordinate value after calibration, and if there is no loss of step, the reference point coordinate value and the calibration coordinate value must be equal when the driven object rotates to the calibration reference point again; if there is a loss of step, the reference point coordinate value and the calibration coordinate value will be unequal when the driven object rotates to the calibration reference point again. This time, when the motor stops rotating, the stop position coordinate value when the motor stops rotating is recalibrated according to the difference between the reference point coordinate value and the calibration coordinate value, and the stop position coordinate value after recalibration is obtained. This realizes the real-time calibration of the motor rotation according to the reference point coordinate value corresponding to each rotation of the drive object to the calibration reference point during the operation of the device. The motor calibration process can be executed during the normal operation of the device, and will not take up time independently and affect the normal use of the device. Compared with the existing motor calibration scheme, it can save the time and power consumption of separate motor calibration.
[0059] Figure 1 is a flow chart of a motor rotation calibration method according to an exemplary embodiment. Figure 1 As shown, the motor rotation calibration method mainly includes the following steps 101 to 104.
[0060] Step 101 : when a driven object driven by a motor rotates to a preset calibration reference point, a reference point coordinate value of the motor is obtained, wherein the reference point coordinate value corresponds to the calibration reference point.
[0061] In the existing motor driving method, the output shaft of the motor drives the rotation of the driven object through a transmission mechanism composed of a gear set and related auxiliary parts. The driven object will move along the guiding direction of the rotating slide rail under the limiting and guiding action of the rotating slide rail.
[0062] In an exemplary embodiment, the position of the calibration reference point can be determined by improving the rotating slide rail. Figure 2FIG. 1 is a schematic diagram of a top view of a rotating slide rail according to an exemplary embodiment. Figure 2 As shown, the rotating slide includes a low-level rotating slide 201 and a high-level rotating slide 202 which are arranged adjacent to each other, wherein the low-level rotating slide 201 is connected to a low level, and the high-level rotating slide 202 is connected to a high level. The driven object 203 rotates along the rotating slide under the drive of a motor (not shown in the figure). Figure 2 In the illustrated embodiment, the driven object 203 is, for example, a rotating platform, and a rotating slide rail is arranged around the rotating platform. The edge of the rotating platform can rotate smoothly inside the rotating slide rail under the guidance of the rotating slide rail.
[0063] In the exemplary embodiment, in the rotating slide rail, the low-level rotating slide rail 201 and the high-level rotating slide rail 202 can be obtained by laying conductive contacts. Figure 2 A conductive contact is attached to the left half of the rotating slide rail 201 and connected to a low level to obtain a low level rotating slide rail 201. Figure 2 Another conductive contact is attached to the right half of the circuit board (the right half of the circuit board) and connected to a high level to obtain a high-level rotating slide rail 202. In the exemplary embodiment, the low-level rotating slide rail 201 and the high-level rotating slide rail 202 are insulated from each other.
[0064] In the exemplary embodiment, a conductive contact 203 may be installed at the contact portion between the driven object and the rotating slide rail, and the conductive contact 203 contacts the rotating slide rail when the driven object rotates along the rotating slide rail. Figure 2As shown, when the driving object rotates clockwise, the moving direction of the conductive contact 203 is from the high-level rotating rail 202 to the low-level rotating rail 201. In this case, if the conductive contact 203 slides from the high-level rotating rail 202 to the low-level rotating rail 201, the level of the conductive contact 203 will jump from a high level to a low level. Conversely, when the driving object rotates counterclockwise, the moving direction of the conductive contact 203 is from the low-level rotating rail 201 to the high-level rotating rail 202. In this case, if the conductive contact 203 slides from the low-level rotating rail 201 to the high-level rotating rail 202, the level of the conductive contact 203 will jump from a low level to a high level. In this way, since the positions of the low-level rotating slide 201 and the high-level rotating slide 202 are fixed, the position between the low-level rotating slide 201 and the high-level rotating slide 202 where the level of the conductive contact 203 jumps is also fixed. The level jump of the conductive contact 203 means that the driven object has passed through the fixed position between the low-level rotating slide 201 and the high-level rotating slide 202. In this way, the fixed position can be used as a calibration reference point. During the operation of the equipment, the purpose of calibrating the motor rotation is achieved by comparing the motor coordinate value (reference point coordinate value) obtained when the level of the conductive contact 203 jumps with the calibration coordinate value stored in advance for comparison standard.
[0065] Furthermore, in an exemplary embodiment, the motor calibration method of the embodiment of the present disclosure further includes:
[0066] When the driven object rotates from the low-level rotating slide rail to the high-level rotating slide rail, or when the driven object rotates from the high-level rotating slide rail to the low-level rotating slide rail, it is determined that the driven object rotates to the calibration reference point based on the level jump measured by the level jump detection circuit connected to the driven object and the rotating slide rail.
[0067] In an exemplary embodiment, Figure 2 As shown, the level jump detection circuit is connected to the conductive contact 203 on the driven object, and determines whether the driven object rotates to the calibration reference point by detecting the level jump of the conductive contact 203.
[0068] As described above, since the determination of the calibration reference point is realized based on the level jump measured by the level jump detection circuit connected to the driving object and the rotating slide rail, in the exemplary embodiment, step 101 specifically includes:
[0069] In response to the generation of the level jump, the reference point coordinate value at the time when the level jump occurs is acquired.
[0070] In combination with the embodiment of the level jump detection loop, step 101 specifically includes:
[0071] During the rotation of the driven object driven by the motor, in response to the level jump detected by the level jump detection circuit, the coordinate value of the position of the motor at the moment of the level jump is obtained as the reference point coordinate value.
[0072] Step 102: compare the reference point coordinate value with the stored calibration coordinate value, and if the reference point coordinate value is not equal to the calibration coordinate value, obtain the coordinate difference between the reference point coordinate value and the calibration coordinate value, wherein the calibration coordinate value corresponds to the calibration reference point.
[0073] There are two cases in which the results of comparing the reference point coordinate value with the stored calibration coordinate value. One case is that the reference point coordinate value is equal to the calibration coordinate value, which indicates that the reference point coordinate value does not deviate from the calibration coordinate value, that is, the motor does not lose step, so in the exemplary embodiment, no subsequent calibration is performed in this case. Another case is that the reference point coordinate value is not equal to the calibration coordinate value, which indicates that the reference point coordinate value deviates from the calibration coordinate value, that is, the motor loses step, and in this case, the subsequent calibration process of steps 103 and 104 needs to be performed.
[0074] Step 103: When the motor stops rotating, obtain the stop position coordinate value of the motor.
[0075] Step 104 , calibrate the stop position coordinate value according to the coordinate difference to obtain a calibrated stop position coordinate value, and update the stop position coordinate value to the calibrated stop position coordinate value.
[0076] In the exemplary embodiment, the stop position coordinate value is calibrated according to the coordinate difference value in step 104 to obtain the calibrated stop position coordinate value, including obtaining the calibrated stop position coordinate value by the following formula:
[0077] X'=X-(X2-X1)
[0078] Wherein, X' is the coordinate value of the stop position after calibration, X is the coordinate value of the stop position, X2 is the coordinate value of the reference point, X1 is the calibration coordinate value, and X2-X1 is the coordinate difference.
[0079] In the exemplary embodiment, the process from step 101 to step 104 is performed during the operation of the device, so step 101 can be further performed as follows:
[0080] During the operation of the device including the motor, when the driven object driven by the motor rotates to a preset calibration reference point, the reference point coordinate value of the motor is obtained.
[0081] By adopting the motor rotation calibration method of the embodiment of the present disclosure, it is realized that during the operation of the device, the motor rotation is calibrated in real time according to the reference point coordinate value corresponding to each time the driven object rotates the calibration reference point. Since the motor rotation calibration method of the embodiment of the present disclosure is executed during the normal operation of the device, it will not occupy the calibration time independently and affect the normal use of the device. Therefore, when the motor rotation calibration method of the embodiment of the present disclosure is adopted, the device can directly enter the work and save the process of performing the motor calibration separately before entering the work, saving the time occupied by the separate motor calibration process. Moreover, when the embodiment of the present disclosure is applied to a battery-powered device, since the separate motor calibration process is saved, the power consumption of the battery-powered device is saved.
[0082] As described above, in the embodiments of the present disclosure, the calibration coordinate values need to be used as a standard for reference. Therefore, the calibration coordinate values need to be determined before the device is officially put into use. After that, the determined calibration coordinate values are used as a reference to calibrate the position of the motor during the operation of the device. In an exemplary embodiment, the process of determining the calibration coordinate values can be performed when the device where the motor and the drive object are located are powered on for the first time. In an exemplary embodiment, the motor and the drive object are installed in a battery-powered device, such as a battery-powered camera device, and the drive object can be a turntable or a pan / tilt head that carries a camera.
[0083] Figure 3 is a schematic diagram of a process for determining calibration coordinate values according to an exemplary embodiment. Figure 3 As shown, in the exemplary embodiment, the motor rotation calibration method of the embodiment of the present disclosure further includes the following steps 301 to 304 executed during the initial power-on phase of the device where the motor and the driven object are located.
[0084] Step 301 : In response to the first power-on of the motor, the motor is controlled to run at full stroke so that the driven object rotates to an initial position.
[0085] Among them, the full stroke of the motor refers to the motor's complete movement in one direction to reach the extreme position or angle it can reach. The full stroke of the motor is the extreme position that the motor can reach during operation. Once the extreme position is reached, the motor cannot continue to move in that direction. For a stepper motor, its full stroke corresponds to the step angle, that is, the number of positions it can stop in the process of completing a circle. In an illustrative embodiment, in the motor rotation calibration method of the embodiment of the present disclosure, the motor can be a stepper motor. For a stepper motor, the reference point coordinate value, calibration coordinate value, coordinate difference value, and motor stop position coordinate value are all in terms of the rotation angle or number of steps of the stepper motor. Among them, the number of steps of the stepper motor refers to the number of steps used by the motor to make one circle, that is, the number of pulses required for the motor to rotate one circle. The value depends on the subdivision setting of the motor and the structure of the motor. For example, the total number of steps per revolution of common stepper motors is 200, 400, 800, 1600, etc., and when the stepper motor is at a certain rotation angle, it also corresponds to a certain number of steps of the stepper motor. For example, the total number of steps per revolution (360 degrees) of the stepper motor is 400 steps, the rotation angle of the 0th step corresponds to 0 degrees, and the rotation angle of the 400th step corresponds to 360 degrees. Then the step number corresponding to the rotation angle of the stepper motor at 180 degrees is the 200th step. Based on this, in the motor rotation calibration method of the embodiment of the present invention, the reference point coordinate value may refer to the rotation angle or step number of the stepper motor corresponding to when the driven object rotates to a preset calibration reference point, the calibration coordinate value may refer to the calibration rotation angle or calibration step number of the stepper motor, the coordinate difference refers to the rotation angle difference or step number difference, and the motor stop position coordinate value may refer to the stop position rotation angle or stop position step number when the stepper motor stops.
[0086] In an exemplary embodiment, the initial position of the driven object may be the limit position that the driven object can reach, for example, the driven object rotates clockwise or counterclockwise to the limit position, and once the limit position is reached, the driven object cannot continue to rotate in that direction.
[0087] Step 302: Control the motor to operate so that the driven object starts to rotate from the initial position.
[0088] As described above, the initial position may be the limit position that the driven object can reach. Once the limit position is reached, the driven object cannot continue to rotate in that direction. In step 302, the driving object starts to rotate from the initial position does not mean to continue to rotate in the direction in which it cannot rotate, but to rotate in the opposite direction. In an illustrative embodiment, the initial position is a fixed position, that is, the coordinate zero point defined before the device leaves the factory. For example, a certain model of camera is defined as the position rotated 180 degrees clockwise before leaving the factory as the coordinate zero point, that is, this position is the initial position.
[0089] Step 303: When the driven object rotates to the calibration reference point, obtain the reference point coordinate value of the motor corresponding to the driven object at the calibration reference point.
[0090] In the exemplary embodiment, the calibration reference point is determined based on the level jump detected by the level jump detection circuit connected to the driving object and the rotating slide rail. In the exemplary embodiment, step 303 specifically includes:
[0091] In response to the generation of the level jump, the reference point coordinate value at the time when the level jump occurs is acquired.
[0092] Step 304: compare the reference point coordinate value with the motor calibration coordinate value stored before the initial power-on, and if the reference point coordinate value is not equal to the calibration coordinate value, update the calibration coordinate value to the reference point coordinate value.
[0093] Because before the motor is powered on for the first time, the accurate calibration coordinate value corresponding to the calibration reference point may not be accurately estimated, therefore, in the exemplary embodiment, the calibration coordinate value of the motor pre-stored before the initial power-on can be an arbitrarily set value or a null value. Based on this, in the exemplary embodiment, the reference point coordinate value may not be compared with the calibration coordinate value of the motor pre-stored before the initial power-on in step 304, and the reference point coordinate value may be directly saved as the calibration coordinate value. Because the device state when the motor is powered on for the first time is usually the initialization state, the device in the initialization state may be a new device that has not been used or a repaired device, so the state of the device in the initialization state is usually the best, and there will be no problem of losing step. At this time, the calibration coordinate value is determined by using the above steps 301 to 304, which can ensure the accuracy of the obtained calibration coordinate value and ensure the accuracy of the motor calibration during the normal use of the subsequent device.
[0094] In the exemplary embodiment, the setting of the calibration reference point can make the driven object touch it more frequently, that is, the setting of the calibration reference point can make the level jump occur more frequently. The calibration reference point should be set as far as possible at a position where the driven object often passes, that is, the installation position of the conductive contact 203 on the driven object should try to make the conductive contact 203 able to switch between the low-level rotating slide 201 and the high-level rotating slide 202 frequently. Based on this, in the exemplary embodiment, the low-level rotating slide rail 201 and the high-level rotating slide rail 202 each occupy half of the travel of the driven object. For example, if the full travel of the driven object is 1 degree to 360 degrees, the low-level rotating slide rail 201 can be set to occupy a section of 1 degree to 180 degrees of the travel of the driven object, and the high-level rotating slide rail 202 can be set to occupy a section of 181 degrees to 360 degrees of the travel of the driven object, and the installation position of the conductive contact 203 ensures that the driven object can always make the conductive contact 203 contact with the low-level rotating slide rail 201 in the section of 1 degree to 180 degrees of its travel, and the installation position of the conductive contact 203 ensures that the driven object can always make the conductive contact 203 contact with the high-level rotating slide rail 202 in the section of 181 degrees to 360 degrees of its travel. On this basis, when installing the equipment on site, the relative position of the low-level rotating slide rail 201 and the high-level rotating slide rail 202, that is, the position where the level jump occurs, should be at a position where the conductive contact 203 is likely to pass frequently. For example, if the device in the embodiment of the present disclosure is a battery-powered camera device, the relative position of the low-level rotating slide 201 and the high-level rotating slide 202 is preferably on the center line of the camera shooting area. In this way, when the camera is shooting, the motor drives the turntable or pan / tilt head carrying the camera to rotate in the camera shooting area. The electrical contact 203 can frequently generate level jumps through the relative positions of the low-level rotating slide 201 and the high-level rotating slide 202, and thus can frequently calibrate the rotation position of the motor to ensure timely calibration of the shooting orientation of the camera device.
[0095] Figure 4 FIG. 1 is a flow chart of an application scenario of a motor rotation calibration method according to an exemplary embodiment. Figure 4 As shown, this application scenario is used for a battery-powered camera device. In the exemplary embodiment, this application scenario is performed during the normal operation (shooting) of the battery-powered camera device, rather than an independent calibration process. That is, the following steps in this application scenario are performed simultaneously with the shooting process of the camera device, and the calibration of the motor rotation does not affect the normal shooting of the camera device. Figure 4 As shown, the application scenario mainly includes the following steps 401 to 406.
[0096] Step 401, during the normal shooting process of the battery-powered camera device, the stepper motor in the camera device drives the pan / tilt in the camera device to rotate along the rotating slide rail, and the pan / tilt rotates from the low-level rotating slide rail side to the high-level rotating slide rail side of the rotating slide rail to trigger a level jump, and then enters step 402.
[0097] In an exemplary embodiment, in step 401 , the level jump may be triggered by the pan / tilt head rotating from a high-level rotating rail side to a low-level rotating rail side in the rotating rail.
[0098] Step 402 , in response to the generation of the level jump, obtain the jump bit step number when the stepping motor generates the level jump, and then enter step 403 .
[0099] The number of jump bit steps is equivalent to the reference point coordinate value in the embodiment of the present disclosure.
[0100] Step 403 , compare the jump bit step number with the stored calibration step number. If the jump bit step number is equal to the stored calibration step number, do not proceed to the subsequent steps and complete the calibration. Otherwise, proceed to step 404 .
[0101] The number of calibration steps is equivalent to the calibration coordinate value in the embodiment of the present disclosure.
[0102] Step 404 , subtract the jump bit step number from the calibration step number to obtain the step difference, and then proceed to step 405 .
[0103] Among them, the step difference is equivalent to the coordinate difference in the embodiment of the present disclosure.
[0104] Step 405 , in response to the stepper motor stopping, obtaining the number of stop steps of the stepper motor stop position, and then entering step 406 .
[0105] The number of stop position steps is equivalent to the stop position coordinate value in the embodiment of the present disclosure.
[0106] In the exemplary embodiment, the stopping of the stepper motor refers to the first stopping of the stepper motor after the level jump occurs.
[0107] Step 406: Obtain the calibrated number of stop position steps according to the number of stop position steps and the step difference, and replace the number of stop position steps with the calibrated number of stop position steps to complete the calibration.
[0108] In an exemplary embodiment, step 406 may be represented by the following formula:
[0109] x'=x-(x2-x1)
[0110] Among them, x' is the number of stop bit steps after calibration, x is the number of stop bit steps, x2 is the number of jump bit steps, x1 is the calibration step, and x2-x1 is the step difference.
[0111] Figure 5 FIG. 1 is a flow chart of another application scenario of a motor rotation calibration method according to an exemplary embodiment, wherein the another application scenario is a scenario for setting the number of calibration steps, and the another application scenario is executed when a battery-powered camera device is powered on for the first time. Figure 5 As shown, the application scenario mainly includes the following steps 501 to 505.
[0112] Step 501 , in response to the first power-on of the stepper motor in the battery-powered camera device, control the stepper motor to run at full stroke, so that the pan / tilt head driven by the stepper motor in the battery-powered camera device rotates to an initial position, and then enters step 502 .
[0113] The initial position is the maximum position that the gimbal can reach when rotating clockwise or counterclockwise.
[0114] Step 502 , control the stepper motor to operate so that the pan / tilt head starts to rotate from its initial position, and then enter step 503 .
[0115] Among them, in step 502, the pan / tilt platform starts to rotate from its initial position, which means that the pan / tilt platform rotates in a direction in which it can rotate.
[0116] Step 503 , during the pan / tilt rotation process, in response to the generation of a level jump, the number of jump steps when the stepping motor generates a level jump is obtained, and then the process goes to step 504 .
[0117] Step 504, compare the jump bit step number with the calibration step number of the stepper motor pre-stored before the first power-on. If the jump bit step number is equal to the calibration step number pre-stored before the first power-on, do not enter the subsequent steps and complete the setting of the calibration step number, otherwise enter step 505.
[0118] Step 505: Update the value of the calibration step number to the value of the jump bit step number, and complete the setting of the calibration step number.
[0119] Figure 6 is a schematic diagram of the logical structure of a motor rotation calibration device according to an exemplary embodiment, such as Figure 6 As shown, the motor rotation calibration device mainly includes a motor coordinate acquisition module 601 , a coordinate difference acquisition module 602 , a stop position acquisition module 603 and a coordinate calibration module 604 .
[0120] The motor coordinate acquisition module 601 is configured to acquire the reference point coordinate value of the motor when the driven object driven by the motor rotates to a preset calibration reference point, wherein the reference point coordinate value corresponds to the calibration reference point;
[0121] The coordinate difference obtaining module 602 is configured to compare the reference point coordinate value with the stored calibration coordinate value, and obtain the coordinate difference between the reference point coordinate value and the calibration coordinate value when the reference point coordinate value and the calibration coordinate value are not equal, wherein the calibration coordinate value corresponds to the calibration reference point;
[0122] The stop position acquisition module 603 is configured to acquire the stop position coordinate value of the motor when the motor stops rotating;
[0123] The coordinate calibration module 604 is configured to calibrate the stop position coordinate value according to the coordinate difference value, obtain the calibrated stop position coordinate value, and update the stop position coordinate value to the calibrated stop position coordinate value.
[0124] In an exemplary embodiment, the driven object is driven by a motor to rotate along a rotating slide rail, wherein the rotating slide rail includes a low-level rotating slide rail and a high-level rotating slide rail disposed adjacent to each other;
[0125] In an exemplary embodiment, the motor calibration device further comprises:
[0126] The calibration reference point determination module is configured to determine whether the driven object rotates to the calibration reference point according to the level jump measured by the level jump detection circuit connected to the driven object and the rotating slide when the driven object rotates from the low-level rotating slide to the high-level rotating slide, or when the driven object rotates from the high-level rotating slide to the low-level rotating slide.
[0127] In the exemplary embodiment, the motor coordinate acquisition module 601 is further configured to execute, in response to the generation of the level jump, the acquisition of the reference point coordinate value at the moment when the level jump occurs.
[0128] In an exemplary embodiment, the coordinate calibration module 604 is further configured to obtain the calibrated stop position coordinate value by executing the following formula:
[0129] X'=X-(X2-X1)
[0130] Wherein, X' is the coordinate value of the stop position after calibration, X is the coordinate value of the stop position, X2 is the coordinate value of the reference point, X1 is the calibration coordinate value, and X2-X1 is the coordinate difference.
[0131] In an exemplary embodiment, the motor rotation calibration device further comprises:
[0132] A first rotation control module is configured to execute, in response to the first power-on of the motor, control the motor to run at full stroke so that the driven object rotates to an initial position;
[0133] A second rotation control module is configured to execute control of the motor operation so that the driven object starts to rotate from an initial position;
[0134] A reference point coordinate value acquisition module is configured to execute, when the driven object rotates to the calibration reference point position, to acquire the reference point coordinate value of the motor corresponding to the driven object at the calibration reference point position;
[0135] The reference point coordinate value update module is configured to compare the reference point coordinate value with the motor calibration coordinate value pre-stored before the initial power-on, and if the reference point coordinate value is not equal to the calibration coordinate value, update the calibration coordinate value to the reference point coordinate value.
[0136] In the exemplary embodiment, the motor is a stepper motor.
[0137] In an exemplary embodiment, the motor and the driven object are mounted on a battery powered device.
[0138] Regarding the motor rotation calibration device in the above embodiment, the specific manner in which each unit performs operations has been described in detail in the embodiment of the motor rotation calibration method, and will not be elaborated here.
[0139] It should be noted that: the above embodiment only illustrates the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0140] Figure 7 is a schematic diagram of a connection structure of a motor drive device according to an exemplary embodiment. Figure 7 As shown, the motor driving device includes a motor 701 and a motor calibration unit 703. In another embodiment, the motor driving device may further include a driving object 702. The motor 701 is configured to drive and rotate the driving object 702; the driving object 702 is driven to rotate by the motor 701; the motor calibration unit 703 is electrically connected to the motor 701, and the motor calibration unit 703 is used to:
[0141] When the driven object 702 rotates to a preset calibration reference point, a reference point coordinate value of the motor 701 is obtained, wherein the reference point coordinate value corresponds to the calibration reference point;
[0142] Comparing the reference point coordinate value with the stored calibration coordinate value, and obtaining a coordinate difference between the reference point coordinate value and the calibration coordinate value when the reference point coordinate value and the calibration coordinate value are not equal, wherein the calibration coordinate value corresponds to the calibration reference point position;
[0143] When the motor 701 stops rotating, the coordinate value of the stop position of the motor 701 is obtained;
[0144] The stop position coordinate value is calibrated according to the coordinate difference to obtain the calibrated stop position coordinate value, and the stop position coordinate value is updated to the calibrated stop position coordinate value.
[0145] In the exemplary embodiment, the motor drive device further includes a rotating slide rail and a level jump detection circuit. Wherein, the driven object 702 rotates along the rotating slide rail under the drive of the motor 701, wherein the rotating slide rail includes a low-level rotating slide rail and a high-level rotating slide rail arranged adjacent to each other; the level jump detection circuit is connected to the driven object 702 and the rotating slide rail, and the level jump detection circuit is used to detect the level jump generated by the driven object 702 rotating from the low-level rotating slide rail to the high-level rotating slide rail, or the driven object 702 rotating from the high-level rotating slide rail to the low-level rotating slide rail; wherein the motor calibration unit 703 is further used to: determine that the driven object 702 rotates to the calibration reference point according to the level jump measured by the level jump detection circuit.
[0146] In an illustrative embodiment, the motor drive device can be used in a battery-powered device, wherein the motor calibration unit 703 can be implemented by a hardware device such as a central controller or chip in the battery-powered device, and the control function can be implemented by firmware or a program in the central controller or chip.
[0147] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0148] Figure 8 It is a structural diagram of an electronic device provided in an embodiment of the present disclosure. The electronic device 800 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 801 and one or more memories 802, wherein at least one program code is stored in the memory 802, and the at least one program code is loaded and executed by the processor 801 to implement the motor rotation calibration method provided in the above-mentioned embodiments. The electronic device 800 may also include other components for realizing the functions of the device, which are not described here. In an illustrative embodiment, the electronic device 800 can be built into a motor-driven device, such as a battery-powered camera device, and the driven object can be a turntable or a pan / tilt that carries a camera.
[0149] In an exemplary embodiment, a computer-readable storage medium including at least one instruction is also provided, such as a memory including at least one instruction. The at least one instruction can be executed by a processor in a computer device to complete the motor rotation calibration method in the above embodiment.
[0150] Optionally, the above-mentioned computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may include ROM (Read-Only Memory), RAM (Random-Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk and optical data storage device, etc.
[0151] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.
Claims
1. A motor rotation calibration method, comprising: When the driven object driven by the motor rotates to a preset calibration reference point, obtaining a reference point coordinate value of the motor, wherein the reference point coordinate value corresponds to the calibration reference point; Comparing the reference point coordinate value with the stored calibration coordinate value, and obtaining a coordinate difference between the reference point coordinate value and the calibration coordinate value when the reference point coordinate value is not equal to the calibration coordinate value, wherein the calibration coordinate value corresponds to the calibration reference point; When the motor stops rotating, obtaining the stop position coordinate value of the motor; The stop position coordinate value is calibrated according to the coordinate difference to obtain a calibrated stop position coordinate value, and the stop position coordinate value is updated to the calibrated stop position coordinate value.
2. The motor rotation calibration method according to claim 1, characterized in that: The driven object rotates along the rotating slide rail under the drive of the motor, wherein the rotating slide rail includes a low-level rotating slide rail and a high-level rotating slide rail arranged adjacent to each other; The motor calibration method further comprises: When the driven object rotates from the low-level rotating slide rail to the high-level rotating slide rail, or when the driven object rotates from the high-level rotating slide rail to the low-level rotating slide rail, it is determined that the driven object rotates to the calibration reference point according to the level jump measured by the level jump detection circuit connected to the driven object and the rotating slide rail.
3. The motor rotation calibration method according to claim 2, characterized in that: When the driven object driven by the motor rotates to a preset calibration reference point, obtaining the reference point coordinate value of the motor includes: In response to the generation of the level jump, the coordinate value of the reference point at the moment when the level jump occurs is acquired.
4. The motor rotation calibration method according to claim 1, characterized in that: The step of calibrating the stop position coordinate value according to the coordinate difference to obtain the calibrated stop position coordinate value comprises obtaining the calibrated stop position coordinate value by the following formula: X'=X-(X2-X1) Wherein, X' is the calibrated stop position coordinate value, X is the stop position coordinate value, X2 is the reference point coordinate value, X1 is the calibration coordinate value, and X2-X1 is the coordinate difference value.
5. The motor rotation calibration method according to claim 1, characterized in that: The motor rotation calibration method further includes the following steps performed during the initial power-on phase of the device in which the motor and the driven object are located: In response to the first power-on of the motor, controlling the motor to run at full stroke so that the driven object rotates to an initial position; Controlling the motor to operate so that the driven object starts to rotate from an initial position; When the driven object rotates to the calibration reference point, obtaining the reference point coordinate value of the motor corresponding to the driven object at the calibration reference point; The reference point coordinate value is compared with the calibration coordinate value of the motor pre-stored before the initial power-on, and when the reference point coordinate value is not equal to the calibration coordinate value, the calibration coordinate value is updated to the reference point coordinate value.
6. The motor calibration method according to claim 1, characterized in that: The motor is a stepping motor.
7. The motor calibration method according to claim 1, characterized in that: The motor and the driven object are mounted on a battery-powered device.
8. A motor calibration device, characterized in that: include: A motor coordinate acquisition module is configured to acquire a reference point coordinate value of the motor when the driven object driven by the motor rotates to a preset calibration reference point, wherein the reference point coordinate value corresponds to the calibration reference point; a coordinate difference obtaining module, configured to compare the reference point coordinate value with the stored calibration coordinate value, and obtain a coordinate difference between the reference point coordinate value and the calibration coordinate value when the reference point coordinate value is not equal to the calibration coordinate value, wherein the calibration coordinate value corresponds to the calibration reference point; A stop position acquisition module, configured to acquire the stop position coordinate value of the motor when the motor stops rotating; The coordinate calibration module is configured to calibrate the stop position coordinate value according to the coordinate difference value to obtain a calibrated stop position coordinate value, and update the stop position coordinate value to the calibrated stop position coordinate value.
9. A motor drive device, characterized in that: include: A motor configured to drive and rotate a driven object; as well as A motor calibration unit, the motor calibration unit is electrically connected to the motor and is used for: When the driven object rotates to a preset calibration reference point, obtaining a reference point coordinate value of the motor, wherein the reference point coordinate value corresponds to the calibration reference point; Comparing the reference point coordinate value with the stored calibration coordinate value, and obtaining a coordinate difference between the reference point coordinate value and the calibration coordinate value when the reference point coordinate value is not equal to the calibration coordinate value, wherein the calibration coordinate value corresponds to the calibration reference point; When the motor stops rotating, obtaining the stop position coordinate value of the motor; The stop position coordinate value is calibrated according to the coordinate difference to obtain a calibrated stop position coordinate value, and the stop position coordinate value is updated to the calibrated stop position coordinate value.
10. The motor drive device according to claim 9, characterized in that: The motor drive device further comprises: A rotating slide rail, the driven object rotates along the rotating slide rail under the drive of the motor, wherein the rotating slide rail comprises a low-level rotating slide rail and a high-level rotating slide rail arranged adjacent to each other; a level jump detection circuit, the level jump detection circuit being connected to the driving object and the rotating slide rail, and being used to detect a level jump caused by the driving object rotating from the low-level rotating slide rail to the high-level rotating slide rail, or by the driving object rotating from the high-level rotating slide rail to the low-level rotating slide rail; The motor calibration unit is further used to determine that the driven object rotates to the calibration reference point according to the level jump measured by the level jump detection circuit.