Optical lens stable driving test method and device and camera
By setting test data and automated testing methods, the optimal subdivision step and backhaul difference of the optical lens are determined, which solves the problem of unstable lens movement and realizes stable optical lens driving, which is suitable for automated control of different optical lenses.
Patent Information
- Application Number
- CN202510464404.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-04-14
AI Technical Summary
In the prior art, there is instability in the movement control of optical lens lenses, resulting in a problem of dummy focus, and the hardware structure differences of different optical lenses cannot be effectively considered.
By setting N groups of test data, generating N groups of control signals, determining the optimal subdivision step and basic data of the optical lens, automating the test distance of the optical lens, selecting the test data with the minimum difference value as the stable driving data, combining the determination of the backhaul difference and the motion reference point, the stable driving of the lens is achieved.
It provides more stable optical lens driving, with high degree of automation, adapts to the characteristics of different optical lenses, reduces the phenomenon of dummy focus, and improves the light change effect.
Smart Images

Figure CN120538801A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of optical lens movement control, and in particular to a method and device for testing stable drive of an optical lens, and a camera. Background Art
[0002] The optical device includes a lens module, each of which includes an optical lens. The lens of the lens can be moved to different positions as required within a specified travel range under the drive of a corresponding drive motor. The specified travel range is usually very long, such as including one thousand steps. In order to achieve fine control of the movement of the lens under the optical lens, it is also necessary to determine how many sub-steps each step is divided into. The different sub-steps define the corresponding travel distance when the lens is controlled to move one sub-step under the drive of the motor, so as to determine the optimal sub-step that is most suitable for controlling the movement of the lens. At present, the determination of the optimal sub-step is usually based on theoretical values. The subdivision of the algorithm is selected and applied to each lens module. However, in actual applications, it is found that relying on this selection method, the movement amount of the optical lens under the currently determined sub-step is unstable, resulting in the high probability of defocus in actual applications. In addition, this unified selection method of subdivision and application does not take into account the hardware structure differences between different optical lenses, which is not conducive to practical applications.
[0003] Therefore, how to provide an effective solution to achieve stable driving of the lenses in the optical lens is a problem that needs to be solved urgently. Summary of the Invention
[0004] In view of this, the present invention provides a method, device and camera for testing stable drive of an optical lens, which can determine the stable drive parameters, including the optimal subdivision steps, that are most suitable for the movement control of the target parts in different target optical lenses, thereby providing a more stable light-varying effect.
[0005] To solve the above technical problems, the present application provides a method for testing stable driving of an optical lens, comprising:
[0006] N sets of test data are set for a target optical lens to generate corresponding N sets of first control signals and sequentially send them to a driving module; the test data includes a preset subdivision step and basic data, the basic data including first data for adjusting a driving current of the driving module and / or second data for adjusting a driving speed of the driving module; the target optical lens is one of M optical lenses to be tested, where N is an integer greater than 1 and M is an integer not less than 1;
[0007] determining an actual moving distance of the target component in the target optical lens in the preset subdivision step when the driving module drives the target component in the target optical lens to move according to each group of the first control signals;
[0008] According to the difference between the theoretical moving distance and the actual moving distance of the target part in each group of the preset subdivision steps, the test data corresponding to the smallest of the N groups of the difference is determined as the stable driving data corresponding to the target optical lens.
[0009] Furthermore, after determining that the test data corresponding to the smallest of the N groups of differences is the stable driving data corresponding to the target optical lens, the method further includes:
[0010] controlling the driving module to perform a first action according to the stable driving data, so as to drive the target part to move from a first position to a first direction by a first number of steps and then to a second position;
[0011] controlling the driving module to perform a second action to drive the target member to move back to the first position in a second direction, and determining a second number of steps corresponding to when the target member moves to the first position from the start of the second action;
[0012] The return difference corresponding to the driving module is determined according to the second number of steps and the first number of steps.
[0013] Further, determining the return difference corresponding to the driving module according to the second number of steps and the first number of steps includes:
[0014] Determine the return difference corresponding to the current number of times of the driving module according to the second number of steps and the first number of steps;
[0015] Determine whether the cumulative number of tests has reached a first preset number;
[0016] If so, the average of the return differences under the first preset number of times is calculated to determine that the average is the return difference of the driving module.
[0017] Furthermore, after determining that the test data corresponding to the smallest of the N groups of differences is the stable driving data corresponding to the target optical lens, the method further includes:
[0018] S21: Control the target part to move to a motion reference point;
[0019] S22: generating a second control signal based on the stable driving data and the planned moving step number and sending the second control signal to the driving module to control the target part to move the planned moving step number from its current position;
[0020] S23: respectively determining the actual number of steps and the theoretical number of steps corresponding to the target part moving from its current position to the motion reference point;
[0021] S24: Determine whether step loss occurs based on the actual number of steps and the theoretical number of steps. If so, proceed to S25;
[0022] S25: resetting N groups of test data for the target optical lens to re-determine stable driving data.
[0023] Furthermore, after S22, it also includes:
[0024] Determine whether the current cumulative number of moves reaches a second preset number;
[0025] If yes, go to S23;
[0026] If not, set the cumulative number of moves=the cumulative number of moving steps+1, determine the new number of planned moving steps and return to S22.
[0027] Furthermore, before S21, it also includes:
[0028] Determine the motion reference point corresponding to the target part according to a preset reference point calibration strategy;
[0029] A motion coordinate system is established based on the motion reference point as the origin.
[0030] Furthermore, a baffle is provided on the target part; an optical coupler is provided at a preset position of the movable path of the target part, and a light-emitting diode and a phototransistor of the optical coupler are respectively arranged on both sides of the preset position, the anode of the light-emitting diode is connected to the power supply and the cathode is grounded, and the collector of the phototransistor is respectively connected to the power supply and the control module and the emitter is grounded;
[0031] Determining the motion reference point corresponding to the target part according to a preset reference point calibration strategy includes:
[0032] determining a first electrical level received by the control module at a current position of the target component on the movable path;
[0033] The target part is controlled to move on the movable path starting from the current position until the control module receives a second level and stops, so as to determine the position point corresponding to the second level as the movement reference point, and the level states of the first level and the second level are different.
[0034] Furthermore, controlling the target part to move from the current position along the movable path includes:
[0035] The driving module is controlled according to the stable driving data to control the target part to move along the movable path starting from the current position.
[0036] Furthermore, controlling the driving module according to the stable driving data to control the target part to move on the movable path starting from the current position includes:
[0037] S31: controlling the driving module according to the stable driving data to control the target component to move from the current position to a target direction by an optimal subdivision step, where the target direction is determined based on a preset level jump rule and a level state of the first level;
[0038] S32: Determine whether the level received by the control module is the second level; if so, proceed to S33; if not, return to S31;
[0039] S33: Determine the current position of the target component as a motion reference point.
[0040] In order to solve the above technical problems, the present invention further provides an optical lens stable drive test device, comprising:
[0041] memory for storing computer programs;
[0042] A processor is used to implement the steps of the optical lens stable drive test method as described above when executing the computer program.
[0043] To solve the above technical problems, the present invention further provides a camera, comprising a driving module, a control module and M optical lenses, where M is an integer not less than 1;
[0044] The control module is connected to each of the optical lenses through the drive module, and is used to control the action of the drive module according to a preset strategy set for each of the optical lenses, so as to drive the target element in the corresponding optical lens to move;
[0045] The preset strategy is set according to a test result, and the test result is a test result obtained by implementing the optical lens stable driving test method as described above for the optical lens.
[0046] The present application provides a method, apparatus, and camera for testing stable optical lens drive. N sets of test data are set for a target optical lens to generate N sets of corresponding first control signals, which are sequentially sent to a driver module. The test data includes preset subdivision steps and basic data, the basic data including first data for adjusting the driver module's drive current and / or second data for adjusting the driver module's drive speed. The target optical lens is one of M optical lenses to be tested. The actual movement distance of a target component in the target optical lens at the preset subdivision steps, when driven by the driver module according to each set of first control signals, is determined. Based on the difference between the theoretical movement distance and the actual movement distance of the target component at each set of preset subdivision steps, the test data corresponding to the smallest of the N sets of differences is determined as the stable drive data corresponding to the target optical lens. This solution can determine the most suitable stable drive parameters, including the optimal subdivision steps, for controlling the movement of the target component in each target optical lens, for each target optical lens. The testing process requires no human intervention and is highly automated. The stable drive of the optical lens facilitates providing a more stable optical variable effect, facilitating practical applications.
[0047] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0049] Figure 1 A flowchart of a method for testing stable driving of an optical lens provided by the present invention;
[0050] Figure 2 A schematic diagram of setting N groups of test data for a single target optical lens in a human-computer interaction interface provided by the present invention;
[0051] Figure 3 A schematic diagram of setting N groups of test data in a human-computer interaction interface when performing batch testing on multiple target optical lenses provided by the present invention;
[0052] Figure 4 A schematic diagram of an optical coupler arrangement at a preset position on a movable path provided by the present invention;
[0053] Figure 5 This is a structural schematic diagram of an optical lens stable drive testing device provided by the present invention. DETAILED DESCRIPTION
[0054] The core of the present invention is to provide a method, device and camera for testing the stable drive of an optical lens. These methods can determine the most suitable stable drive parameters, including the optimal subdivision step, for different target optical lenses to control the movement of the target parts in the lens, thereby providing a more stable optical variable effect.
[0055] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0056] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.
[0057] Please refer to Figure 1 , Figure 1 This is a flow chart of a method for testing stable driving of an optical lens provided by the present invention.
[0058] The optical lens stable drive test method includes:
[0059] S11: Setting N sets of test data for a target optical lens to generate corresponding N sets of first control signals and sequentially sending them to a driving module; the test data includes preset subdivision steps and basic data, the basic data including first data for adjusting a driving current of the driving module and / or second data for adjusting a driving speed of the driving module; the target optical lens is one of M optical lenses to be tested, where N is an integer greater than 1 and M is an integer not less than 1;
[0060] S12: determining an actual moving distance of the target component in the target optical lens in a preset subdivision step when the driving module drives the target component to move according to each set of first control signals;
[0061] S13: According to the difference between the theoretical moving distance and the actual moving distance of the target part in each set of preset subdivision steps, determine the test data corresponding to the smallest one among N sets of differences as the stable driving data corresponding to the target optical lens.
[0062] Specifically, the optical device includes M optical lenses, and the optical device here includes but is not limited to a camera. Each optical lens is used as a target optical lens to determine the most suitable stable driving data for the target part in the target optical lens, and the target part here is the lens in the optical lens; the driving module includes a driving motor and a control module for controlling the action of the driving motor, and the control module includes but is not limited to a driving chip. The optical lens stable driving test method can be applied to an upper control module, such as a host computer, and the upper control module, the control module, the driving motor and the optical lens are connected in sequence through an interface.
[0063] First, it should be noted that the movable path corresponding to the target part can be divided into multiple large steps, and each large step can be further divided into fine steps. Different fine steps define the travel distance corresponding to one step movement under the current fine step. Since it is not intuitively known in actual applications to which specific position the target optical lens will move under the drive control of the drive motor, it is necessary to find and determine a motion reference point in advance before step S11, that is, the PI point (where P represents the duty cycle and I represents the fine step), and establish a coordinate system based on this motion reference point. In this coordinate system, the target part is controlled to move to the specified position by taking several fine steps. It is understandable that when finding the motion reference point before step S11, the control of the drive module used to drive the target part to move can be based on the default working parameters provided by the module manufacturer.
[0064] Furthermore, in step S11, the preset subdivision step defines the travel distance corresponding to one movement at the current subdivision step. The first data may specifically be PWM data (Pulse Width Modulation), which can adjust and control the drive current. A greater drive current results in a greater drive force. The second data may specifically be SPEED data (i.e., speed data). N sets of first control signals are generated corresponding to N sets of test data, and the N sets of first control signals are sequentially transmitted to the drive module. In step S12, the actual movement distance of the target part at the preset subdivision step under the current first control signal can be determined. More specifically, the actual movement distance can be determined using a laser rangefinder. Preferably, the accuracy of the laser rangefinder is 1 to 2 μm. Then, in step S13, stable drive data corresponding to the target optical lens is obtained. The stable drive data includes an optimal subdivision step and optimal basic data. The optimal basic data includes optimal first data for adjusting the drive current of the drive module and optimal second data for adjusting the drive speed of the drive module. The optimal subdivision step herein is essentially the subdivision step that makes the theoretical movement distance of the target part in the target optical lens closest to the actual movement distance.
[0065] For example, when there are multiple minimum values in N groups of difference values, they can be selected according to the following principle, that is, the smaller the PWM data, the larger the SPEED data, and the smaller the preset subdivision step. This is because the smaller the PWM data, the lower the power consumption, the larger the SPEED data, the faster the diagonal speed, and the smaller the preset subdivision step, the smoother the movement, and the higher the fault tolerance for subsequent more sophisticated control algorithms.
[0066] It should be noted that, for each group of first control signals, the actual moving distance traveled by the target part can be determined after each preset subdivision step, or the actual moving distance traveled by the target part can be determined after the target part moves several preset subdivision steps, and there is no special limitation here; in addition, the target part can be made to move through the entire movable path, that is, the target part can move from the starting end to the end end of the movable path, then under any group of first control signals, multiple actual moving distances and corresponding multiple theoretical moving distances can be obtained. For example, the average value of the multiple actual moving distances can be used as the actual moving distance corresponding to the group of first control signals, and the average value of the multiple theoretical moving distances can be used as the theoretical moving distance corresponding to the group of first control signals, so as to facilitate the subsequent calculation of the difference.
[0067] In addition, the theoretical moving distance is determined by multiplying the distance traveled by the preset subdivision steps and the number of steps traveled. To facilitate subsequent verification, the preset subdivision steps, first data, second data, theoretical moving distance, actual moving distance, and difference corresponding to each group can be recorded in the form of an EXCEL table.
[0068] In addition, in order to visualize the test process, a human-computer interaction interface can be set up on the host computer to facilitate technicians to enter N groups of test data on the interface. Please refer to Figure 2 , Figure 2 This is a schematic diagram of setting N sets of test data for a single target optical lens in a human-computer interaction interface provided by the present invention. PI stability testing is a test to determine stable drive data. A corresponding check button is set on the human-computer interaction interface to allow technicians to determine whether to perform this test. In addition, start and stop buttons can also be set to facilitate technicians to start or end the test according to actual conditions. Figure 2 The ZOOM in the text refers to zoom, and the FOCUS refers to focus. In addition, you can set reserved items to facilitate adding other test items. You can also display the current test status, such as whether it is in progress or completed. In addition, the theoretical moving distance, actual moving distance, and difference during the test can be displayed visually on the human-computer interaction interface. Figure 2 The data preview options in can be flexibly set according to actual needs.
[0069] Similarly, according to the actual situation, you can start the stable drive test of multiple target optical lenses at the same time to achieve batch testing. Please refer to Figure 3 , Figure 3 The present invention provides a schematic diagram of setting N groups of test data in a human-computer interaction interface when performing batch testing on multiple target optical lenses. In addition, a corresponding test report can be generated based on the batch data obtained from the test, which is convenient for subsequent inspection by relevant technical personnel such as drive motor R&D personnel, optical lens researchers, and R&D personnel of application camera modules.
[0070] In summary, the present application provides a method for testing stable driving of an optical lens, which can determine the stable driving parameters, including the optimal subdivision steps, that are most suitable for the movement control of the target parts in different target optical lenses. The testing process does not require manual assistance and has a high degree of automation. The stable driving of the optical lens is conducive to providing a more stable light-changing effect, which is beneficial for practical applications.
[0071] Based on the above embodiment:
[0072] In some embodiments, after determining that the test data corresponding to the smallest of the N groups of difference values is the stable driving data corresponding to the target optical lens, the method further includes:
[0073] Controlling the driving module to perform a first action according to the stable driving data to drive the target component to move from the first position to the first direction by a first number of steps and then to the second position;
[0074] controlling the driving module to perform a second action to drive the target member to move back to the first position in the second direction, and determining a second number of steps corresponding to when the target member moves to the first position from the start of the second action;
[0075] The return difference corresponding to the driving module is determined according to the second step number and the first step number.
[0076] Specifically, when the drive motor suddenly reverses after forward rotation, due to the mechanical clearance between the gears or lead screw, the first few subdivision steps will idle and not move, making the actual displacement traveled under the same subdivision step after reversal less than the theoretical displacement. The number of subdivision steps corresponding to the missing distance is the return difference.
[0077] It should be noted that when the first action is forward rotation, the corresponding second action is reverse rotation, and when the first action is reverse rotation, the corresponding second action is forward rotation; the first position here can be the starting end of the movable path, and the corresponding second position is the end end of the movable path.
[0078] The difference between the second number of steps and the first number of steps is the return difference. For example, taking the first number of steps as 10 optimal subdivision steps as an example, the target part moves 10 steps from the first position along the first direction to the second position by driving the motor forward, and then immediately controls the driving motor to reverse and still move forward 10 steps. At this time, it may not move in the first 2 steps before reversal, and has not reached the first position. Therefore, it needs to be made to move forward to return to the first position (the displacement change can be monitored in real time by a laser rangefinder to ensure that the target part moves back to the first position). At this time, it can be known that the second number of steps is 12 optimal subdivision steps. Therefore, the return difference is 2 optimal subdivision steps. In addition, for the test of the return difference, a corresponding check button can be set on the human-computer interaction interface so that the technician can determine whether to perform this test, such as Figure 2 In addition, the return difference corresponding to the target component in the target optical lens obtained during the current test can also be displayed on the human-computer interaction interface, which is more intuitive and helpful for relevant technical personnel to understand.
[0079] It can be seen that determining the return difference is conducive to eliminating the forward and reverse errors, so that the return difference can be additionally compensated when the target optical lens is subsequently driven to ensure that the target component in the target optical lens accurately moves to the target position.
[0080] In some embodiments, determining the return difference corresponding to the driving module according to the second number of steps and the first number of steps includes:
[0081] Determine the return difference corresponding to the current number of times of the driving module according to the second number of steps and the first number of steps;
[0082] Determine whether the cumulative number of tests has reached a first preset number;
[0083] If so, the average of the return differences under the first predetermined number of times is calculated to determine the average as the return difference of the driving module.
[0084] Specifically, considering that the return difference determined by a single test may not be accurate, the return difference is determined to be more accurate and reliable by taking an average value from multiple tests. It should be noted that the specific value of the first preset number is not particularly limited here and can be flexibly set according to actual needs. When it is determined that the cumulative number of tests has not reached the first preset number, the cumulative number of tests is set to = the cumulative number of tests + 1, and the process returns to controlling the drive module to execute the first action step based on the stable drive data to determine the return difference under the new cumulative number of tests.
[0085] In some embodiments, after determining that the test data corresponding to the smallest of the N groups of difference values is the stable driving data corresponding to the target optical lens, the method further includes:
[0086] S21: Control the target part to move to the motion reference point;
[0087] S22: generating a second control signal based on the stable driving data and the planned moving step number and sending the signal to the driving module to control the target part to move the planned moving step number from its current position;
[0088] S23: respectively determining the actual number of steps and the theoretical number of steps corresponding to the target part moving from its current position to the motion reference point;
[0089] S24: Determine whether step loss occurs based on the actual number of steps and the theoretical number of steps. If so, proceed to S25;
[0090] S25: Re-setting N groups of test data for the target optical lens to re-determine stable driving data.
[0091] In this embodiment, considering that the drive motor may lose steps during its movement, the above steps are also set to ensure that the currently obtained stable drive data is drive data that can more accurately and reliably control the movement of the target component in the optical lens without losing steps. In addition, a corresponding check button can be set on the human-computer interaction interface for the test of lost steps, so that the technician can determine whether to perform this test, such as Figure 2 shown.
[0092] Specifically, step S24 may include: determining the difference between the theoretical number of steps and the actual number of steps, where the positive or negative value of the difference represents the direction, and the absolute value of the difference is the number of lost steps; judging whether the number of lost steps is greater than a preset allowable step loss threshold; if so, entering step S25 to re-determine the stable driving data corresponding to the target optical lens; the specific value of the preset allowable step loss threshold is not particularly limited here, and can be flexibly set according to actual needs. For example, the preset allowable step loss threshold can be set to 1.
[0093] When it is determined that no step loss has occurred, the current stable drive data is determined to be the target stable drive data without step loss. It should also be noted that the method for determining the actual number of steps corresponding to the target part moving from its current position to the motion reference point can be: the target part is caused to search for the motion reference point again from its current position in accordance with the method described in the following embodiment, and the number of steps used when the motion reference point is found again can be determined as the actual number of steps; and the method for determining the theoretical number of steps corresponding to the target part moving from its current position to the motion reference point can be: according to the current motion coordinate system (established based on the current motion reference point), the number of steps required from the current position to the current motion reference point is determined to be the theoretical number of steps. For example, if the coordinates of the current position are 400 and the coordinates of the motion reference point are 500, then the theoretical number of steps is 100.
[0094] In some embodiments, after S22, the method further includes:
[0095] Determine whether the current cumulative number of moves reaches a second preset number;
[0096] If yes, go to S23;
[0097] If not, set the cumulative number of moves=the cumulative number of moving steps+1, determine the new number of planned moving steps and return to S22.
[0098] Specifically, in order to make the judgment of whether step loss occurs more accurate, the target part can be moved multiple times starting from the motion reference point. There is no special limitation on the specific value of the second preset number of times here, and it can be flexibly set according to actual needs. For example, the second preset number of times can be 100.
[0099] In some embodiments, before S21, the method further includes:
[0100] Determine the motion reference point corresponding to the target part according to the preset reference point calibration strategy;
[0101] A motion coordinate system is established based on the motion reference point as the origin.
[0102] Specifically, the motion coordinate system here is used to clarify the current position of the target part in the optical lens, and subsequently control the number of sub-steps of the drive motor to control the target part to move to the target position; the preset reference point calibration strategy is a pre-set strategy for finding the motion reference point.
[0103] In some embodiments, a baffle is provided on the target part; an optocoupler is provided at a preset position A of the movable path of the target part, and a light-emitting diode D1 and a phototransistor Q1 of the optocoupler are provided on either side of the preset position A. The anode of the light-emitting diode D1 is connected to a power supply and the cathode is grounded. The collector of the phototransistor Q1 is connected to a power supply and a control module, respectively, and the emitter is grounded.
[0104] Determine the motion reference points corresponding to the target part according to the preset reference point calibration strategy, including:
[0105] determining a first electrical level received by the control module at a current position of the target component in the movable path;
[0106] The target part is controlled to move on the movable path starting from the current position until the control module receives the second level and stops, so as to determine the position point corresponding to the second level as the movement reference point, and the level states of the first level and the second level are different.
[0107] Specifically, the preset position A can be any position on the movable path, such as the midpoint of the movable path, and is not particularly limited here; the power supply here is a DC power supply, and the control module is the driver chip for controlling the action of the drive motor as described above, please refer to Figure 4 , Figure 4A schematic diagram of an optical coupler arrangement at a preset position on a movable path provided by the present invention.
[0108] Here, when the first level is low, the second level is high, and when the first level is high, the second level is low, thereby accurately finding the motion reference point through the changes in the high and low level states.
[0109] In some embodiments, controlling the target component to move along the movable path starting from a current position includes:
[0110] The driving module is controlled according to the stable driving data to control the target part to move on the movable path starting from the current position.
[0111] Specifically, the previously determined stable driving data is used as the control benchmark (of course, the return difference can be further combined, and the stable driving data and the return difference are used together as the control benchmark), and then the motion reference point is found and determined according to the preset reference point calibration strategy. This can make the motion reference point determination more accurate and more stable.
[0112] In some embodiments, controlling the driving module according to the stable driving data to control the target part to move along the movable path starting from the current position includes:
[0113] S31: controlling the driving module according to the stable driving data to control the target component to move from the current position to the target direction by an optimal subdivision step, where the target direction is determined based on a preset level jump rule and the level state of the first level;
[0114] S32: Determine whether the level received by the control module is the second level; if so, proceed to S33; if not, return to S31;
[0115] S33: Determine the current position of the target part as the motion reference point.
[0116] Specifically, it is found in actual applications that the motion reference point corresponding to the transition from low level to high level may not be in the same position as the motion reference point corresponding to the transition from high level to low level, that is, there is a slight deviation. In order to achieve fine control, an agreement can be made in advance to determine the level jump rule. The rule essentially defines whether the position point corresponding to the transition from low level to high level is the motion reference point, or the position point corresponding to the transition from high level to low level is the motion reference point.
[0117] From the implementation principle, a baffle is provided on the target part, and the light-emitting diode D1 keeps emitting light under the power supply of the power supply, and the corresponding phototransistor Q1 is turned on by the light, so that the control module receives a low level. When the target part moves to the preset position, the baffle blocks the light emitted by the light-emitting diode D1, and the corresponding phototransistor Q1 is turned off, so that the control module receives a high level. It should be noted that, according to actual applications, the baffle is longer, so that there is only one level state switching in the entire movable path, that is, assuming that the target part is currently at position B closer to the starting end, the control module receives a high level at this time. The signal received is a low level. When the target part moves to the preset position A, the control module receives a high level. Since the baffle is long enough, the control module receives high levels at all positions from the preset position A to the terminal. Assuming that the target part is currently at position C closer to the terminal, the control module receives a high level at this time. When the target part moves to the preset position A, the control module receives a low level. The control module receives low levels at all positions from the starting end to the preset position A. It can be seen that the control module only receives one high-low level conversion to ensure that the motion reference point is accurately found.
[0118] For example, the level jump rule defines the position point corresponding to the transition from low level to high level as the movement reference point. When the first level is low, it means that the target part is at a certain position between the starting end and the preset position A. Therefore, the target direction is the moving direction towards the high level (corresponding to Figure 4 is downward); when the first level is high, it means that the target is at a position between the preset position A and the terminal, so the target direction is moving in the direction of the low level (corresponding to Figure 4 for upward).
[0119] More specifically, still taking the example of the level transition rule defining the position corresponding to when a low level switches to a high level as the motion reference point, it is determined whether the first level currently received by the control module is a low level. If so, the drive module is controlled according to the stable drive data to control the target component in the target optical lens to move from the current position toward the high level by an optimal subdivision step. It is also determined whether the level received by the control module is a high level. If so, the position at which the level switches is considered to be the motion reference point. If not, the search continues by taking another optimal subdivision step.
[0120] If the first level is not a low level, the driving module is controlled according to the stable driving data to control the target part in the target optical lens to move from the current position to the low level direction by an optimal subdivision step, and determine whether the level received by the control module is a low level. If not, the target part continues to move by an optimal subdivision step to continue searching. If it is a low level, due to the setting of the level jump rule, the position point corresponding to the low level turning into a high level should be found as the motion reference point. Therefore, the driving module can be controlled according to the stable driving data to control the target part to continue to move in the low level direction for multiple optimal subdivision steps, such as 24 optimal subdivision steps, to leave sufficient movement margin. Subsequently, the target part is controlled to move in the high level direction by an optimal subdivision step until the position point where the low level turns into a high level is determined, and this position point is considered to be the motion reference point. It can be seen that compared with the method in the related art of directly moving the target part by a fixed number of subdivision steps to find the motion reference point, the present application can reliably determine the motion reference point through the above method, and will not cause the heating problem caused by the target part being stuck at the starting end or the end end due to the set fixed number of steps not being completed in the related art.
[0121] Please refer to Figure 5 , Figure 5 This is a structural schematic diagram of an optical lens stable drive testing device provided by the present invention.
[0122] The optical lens stable drive test device includes:
[0123] Memory 111, used for storing computer programs;
[0124] The processor 112 is configured to implement the steps of the optical lens stable drive test method as described above when executing the computer program.
[0125] For an introduction to the optical lens stable drive test device provided in this application, please refer to the above-mentioned embodiment of the optical lens stable drive test method, which will not be repeated here.
[0126] The present invention also provides a camera, comprising a driving module, a control module and M optical lenses, where M is an integer not less than 1;
[0127] The control module is connected to each optical lens through the drive module, and is used to control the action of the drive module according to the preset strategy set for each optical lens, so as to drive the target part in the corresponding optical lens to move;
[0128] The preset strategy is set based on the test results, and the test results are test results obtained by implementing the optical lens stable drive test method as described above for the optical lens.
[0129] For the introduction of the camera provided in this application, please refer to the above-mentioned embodiment of the optical lens stable drive test method, which will not be repeated here.
[0130] In addition, it can be understood that each optical lens here is a lens that has been tested by the above-mentioned optical lens stable drive test method and obtained corresponding test results, and the test results include the stable drive data, return difference and establishment of motion reference points described in the above-mentioned embodiments.
[0131] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. Relational terms such as first and second are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of further restrictions, the elements limited by the sentence "comprising a" do not exclude the presence of other identical elements in the process, method, article or equipment including the elements.
[0132] The above description of the disclosed embodiments will enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is to be construed in the widest manner consistent with the principles and novel features disclosed herein.
Claims
1. A method for testing stable driving of an optical lens, characterized in that: include: Setting N groups of test data for the target optical lens to generate N groups of first control signals and sending them to the driving module in sequence; The test data includes preset subdivision steps and basic data, the basic data includes first data for adjusting the driving current of the driving module and / or second data for adjusting the driving speed of the driving module, the target optical lens is one of M optical lenses to be tested, where N is an integer greater than 1 and M is an integer not less than 1; determining an actual moving distance of the target component in the target optical lens in the preset subdivision step when the driving module drives the target component in the target optical lens to move according to each group of the first control signals; According to the difference between the theoretical moving distance and the actual moving distance of the target part in each group of the preset subdivision steps, the test data corresponding to the smallest of the N groups of the difference is determined as the stable driving data corresponding to the target optical lens.
2. The optical lens stable drive test method according to claim 1, wherein: After determining that the test data corresponding to the smallest of the N groups of differences is the stable driving data corresponding to the target optical lens, the method further includes: controlling the driving module to perform a first action according to the stable driving data, so as to drive the target part to move from a first position to a first direction by a first number of steps and then to a second position; controlling the driving module to perform a second action to drive the target member to move back to the first position in a second direction, and determining a second number of steps corresponding to when the target member moves to the first position from the start of the second action; The return difference corresponding to the driving module is determined according to the second number of steps and the first number of steps.
3. The optical lens stable drive test method according to claim 2, wherein: Determining a return difference corresponding to the driving module according to the second number of steps and the first number of steps includes: Determine the return difference corresponding to the current number of times of the driving module according to the second number of steps and the first number of steps; Determine whether the cumulative number of tests has reached a first preset number; If so, the average of the return differences under the first preset number of times is calculated to determine that the average is the return difference of the driving module.
4. The optical lens stable drive test method according to any one of claims 1 to 3, wherein: After determining that the test data corresponding to the smallest of the N groups of differences is the stable driving data corresponding to the target optical lens, the method further includes: S21: Control the target part to move to a motion reference point; S22: generating a second control signal based on the stable driving data and the planned moving step number and sending the second control signal to the driving module to control the target part to move the planned moving step number from its current position; S23: respectively determining the actual number of steps and the theoretical number of steps corresponding to the target part moving from its current position to the motion reference point; S24: Determine whether step loss occurs based on the actual number of steps and the theoretical number of steps. If so, proceed to S25; S25: resetting N groups of test data for the target optical lens to re-determine stable driving data.
5. The optical lens stable drive test method according to claim 4, wherein: After S22, it also includes: Determine whether the current cumulative number of moves reaches a second preset number; If yes, go to S23; If not, set the cumulative number of moves=the cumulative number of moving steps+1, determine the new number of planned moving steps and return to S22.
6. The optical lens stable drive test method according to claim 4, wherein: Before S21, it also included: Determine the motion reference point corresponding to the target part according to a preset reference point calibration strategy; A motion coordinate system is established based on the motion reference point as the origin.
7. The optical lens stable drive test method according to claim 6, wherein: A baffle is provided on the target part; an optical coupler is provided at a preset position of the movable path of the target part, and a light-emitting diode and a phototransistor of the optical coupler are respectively arranged on both sides of the preset position, the anode of the light-emitting diode is connected to the power supply and the cathode is grounded, and the collector of the phototransistor is respectively connected to the power supply and the control module and the emitter is grounded; Determining the motion reference point corresponding to the target part according to a preset reference point calibration strategy includes: determining a first electrical level received by the control module at a current position of the target component on the movable path; The target part is controlled to move on the movable path starting from the current position until the control module receives a second level and stops, so as to determine the position point corresponding to the second level as the movement reference point, and the level states of the first level and the second level are different.
8. The optical lens stable drive test method according to claim 7, wherein: Controlling the target part to move along the movable path starting from the current position includes: The driving module is controlled according to the stable driving data to control the target member to move along the movable path starting from the current position.
9. The optical lens stable drive test method according to claim 8, wherein: Controlling the driving module according to the stable driving data to control the target part to move along the movable path starting from the current position includes: S31: controlling the driving module according to the stable driving data to control the target component to move from the current position to a target direction by an optimal subdivision step, where the target direction is determined based on a preset level jump rule and a level state of the first level; S32: Determine whether the level received by the control module is the second level; if so, proceed to S33; if not, return to S31; S33: Determine the current position of the target component as a motion reference point.
10. An optical lens stable drive test device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the optical lens stable drive test method according to any one of claims 1 to 9 when executing the computer program.
11. A camera, characterized in that: It includes a driving module, a control module and M optical lenses, where M is an integer not less than 1; The control module is connected to each of the optical lenses through the drive module, and is used to control the action of the drive module according to a preset strategy set for each of the optical lenses, so as to drive the target element in the corresponding optical lens to move; The preset strategy is set according to a test result, and the test result is a test result obtained by implementing the optical lens stable drive test method according to any one of claims 1 to 9 for the optical lens.
Citation Information
Patent Citations
Infusion control method and device with stepping motor
CN109981008A
High-precision pan-tilt control and implementation method based on subdivision driving
CN112083673A
Folding rudder wing opening time measuring device based on photoelectric element
CN113899265A
Detection method, device and equipment of camera module stepping motor and medium
CN116248858A
Stepping motor control method and device, electronic equipment and storage medium
CN116980575A