Camera anti-shake method, camera module and electronic equipment

By using two parallel plate capacitors to detect the movement of the optical lens, the problems of poor immunity and high cost of Hall sensors in the prior art are solved, and accurate and economical optical anti-shake effect is achieved.

CN118748753BActive Publication Date: 2025-02-18HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411113373.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2025-02-18
Estimated Expiration
2044-08-14

AI Technical Summary

Technical Problem

The optical anti-shake design of existing cameras uses multiple Hall sensors, which has poor immunity and high cost.

Method used

Two parallel plate capacitors are used to detect the movement of the optical lens on the vertical plane of the optical axis, calculate the moving distance of the optical lens through the capacitance, and drive the optical lens for anti-shake operation.

Benefits of technology

Accurate detection of the movement of the optical lens, reducing costs and improving immunity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118748753B_ABST
    Figure CN118748753B_ABST
Patent Text Reader

Abstract

The present application discloses a camera anti-shake method, a camera module and an electronic device, which detects the capacitance value of a parallel plate capacitor to determine the change in the distance between the two plates, thereby determining the movement distance of the optical lens on the plane perpendicular to the optical axis, and then performs an anti-shake operation. The solution can accurately detect the movement of the optical lens on the plane perpendicular to the optical axis, and the cost is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a camera anti-shake method, a camera module and an electronic device. Background Art

[0002] With the development of electronic technology, mobile phones, tablet computers and other electronic devices are generally equipped with cameras. Cameras usually need to have an optical image stabilization (OIS) function (also known as "optical image stabilization"), which compensates for the displacement caused by device shaking during shooting by moving the optical lens in the vertical plane of the optical axis to avoid image blur caused by device shaking.

[0003] One optical image stabilization design uses data from multiple Hall sensors to detect image jitter. Hall sensors detect changes in magnetic fields and are easily interfered by radiation, so this optical image stabilization design has poor anti-interference performance, and the cost of multiple Hall sensors is also high. Summary of the invention

[0004] The embodiments of the present application provide a camera anti-shake method, a camera module and an electronic device, which can accurately detect the movement of the optical lens in a plane perpendicular to the optical axis and then perform an anti-shake operation. The cost of this solution is relatively low.

[0005] In the first aspect, a camera anti-shake method is provided, which is applied to an electronic device including a first camera, wherein the first camera includes an optical lens, and also includes a first parallel plate capacitor and a second parallel plate capacitor, wherein the first parallel plate capacitor and the second parallel plate capacitor both include a fixed plate and a movable plate that can move on a plane perpendicular to the optical axis of the first camera, wherein the plane where the fixed plate is located and the plane where the movable plate is located form a non-zero angle with the plane perpendicular to the optical axis, and the parallel direction of the first parallel plate capacitor and the parallel direction of the second parallel plate capacitor form a non-zero angle. The method includes: starting the first camera; detecting that the electronic device moves in a first direction on a plane perpendicular to the optical axis; detecting the capacitance of the first parallel plate capacitor and the second parallel plate capacitor after the movement; determining the capacitance difference between the first parallel plate capacitor and the second parallel plate capacitor after the movement and before the movement; determining the first distance that the optical lens moves on the plane perpendicular to the optical axis corresponding to the capacitance difference of the first parallel plate capacitor and the capacitance difference of the second parallel plate capacitor; and driving the optical lens to move a first distance in the first direction on the optical vertical plane.

[0006] By implementing the method of the first aspect, the electronic device can find the distance that the optical lens moves relative to the device due to device shaking through the capacitance difference between two parallel plate capacitors before and after the device moves, thereby driving the optical lens to move the distance in the direction of the device movement to achieve anti-shake purpose.

[0007] In conjunction with the first aspect, in some implementations, the first parallel plate capacitor may be disposed at a corner or at a side. Similarly, the second parallel plate capacitor may be disposed at a corner or at a side.

[0008] In combination with the first aspect, in some implementations, the first parallel plate capacitor and the second parallel plate capacitor are both arranged at the corner side. The parallel plate capacitor is arranged at the corner side, which is more convenient for fixing and processing.

[0009] In combination with the first aspect, in some embodiments, the first parallel plate capacitor and the second parallel plate capacitor are arranged at adjacent corners. In this way, the distance that the optical lens moves relative to the electronic device on the plane perpendicular to the optical axis can be detected more accurately.

[0010] In combination with the previous embodiment, in some embodiments, the parallel direction of the first parallel plate capacitor is perpendicular to the parallel direction of the second parallel plate capacitor. In this way, the distance that the optical lens moves relative to the electronic device on the plane perpendicular to the optical axis can be detected more accurately.

[0011] In combination with the first aspect, in some embodiments, the first parallel plate capacitor and the second parallel plate capacitor are disposed on a printed circuit board PCB or a base of the first camera.

[0012] In conjunction with the first aspect, in some embodiments, before determining the first distance, the method may further include: determining whether the capacitance difference of the first parallel plate capacitor and the capacitance difference of the second parallel plate capacitor are both within a preset range; or determining whether the capacitance difference of the first parallel plate capacitor and the capacitance difference of the second parallel plate capacitor has a capacitance difference within a preset range. This can avoid executing the method of the first aspect when the device jitter is too small or the device jitter is too large.

[0013] In combination with the first aspect, in some embodiments, determining a first distance that the optical lens moves relative to the electronic device on a plane perpendicular to the optical axis corresponding to the capacitance difference of the first parallel plate capacitor and the capacitance difference of the second parallel plate capacitor specifically includes: searching in a first correspondence table, when the optical lens moves relative to the electronic device in a second direction, the capacitance difference of the first parallel plate capacitor and the capacitance difference of the second parallel plate capacitor corresponds to the first distance that the optical lens moves relative to the electronic device on a plane perpendicular to the optical axis, the second direction being the opposite direction of the first direction; wherein the first correspondence table is preset in the electronic device, and the first correspondence table contains the capacitance difference of the first parallel plate capacitor and the capacitance difference of the second parallel plate capacitor corresponding to each distance that the optical lens moves in different directions on a plane perpendicular to the optical axis.

[0014] In combination with the first aspect, in some embodiments, the first camera further includes: a first inductor, a first resistor, a first switch tube, and a second switch tube; the first end of the first switch tube is connected to the second end of the first parallel plate capacitor, the second end of the second switch tube is connected to the second end of the first parallel plate capacitor, the second end of the first switch tube and the first end of the second switch tube are both coupled to the first end of the first inductor, the second end of the first inductor is connected to the first end of the first resistor, and the second end of the first resistor is grounded;

[0015] Detecting the capacitance of the first parallel plate capacitor and the second parallel plate capacitor after they are moved, specifically includes: inputting a pulse width modulation (PWM) signal to the third end of the first switch tube and the third end of the second switch tube; inputting a sinusoidal AC signal for frequency sweeping to the first end of the first parallel plate capacitor and the first end of the second parallel plate capacitor to determine the capacitance of the first parallel plate capacitor and the second parallel plate capacitor after they are moved; wherein, when the PWM voltage signal is in the positive half cycle, the first end to the second end of the first switch tube is turned on, and the second end to the first end of the second switch tube is turned off; when the PWM voltage signal is in the negative half cycle, the first end to the second end of the first switch tube is turned off, and the second end to the first end of the second switch tube is turned on.

[0016] In this way, the first switch tube and the second switch tube are alternately turned on to sweep the frequency of the first parallel plate capacitor and the second parallel plate capacitor respectively, so as to obtain the capacitance of the first parallel plate capacitor and the second parallel plate capacitor after the device moves.

[0017] In combination with the previous embodiment, in some embodiments, the first camera further includes: a first unidirectional conduction device and a second unidirectional conduction device, wherein the first end of the first unidirectional conduction device is connected to the second end of the first switch tube, the second end is connected to the first end of the first inductor, and the first unidirectional conduction device is conducted from the first end to the second end; the first end of the second unidirectional conduction device is connected to the first end of the first switch tube, the second end is connected to the first end of the first inductor, and the second unidirectional conduction device is conducted from the first end to the second end. In this way, the current mutual injection between the first switch tube and the second switch tube can be prevented, and leakage interference can be prevented.

[0018] In combination with the previous embodiment, in some embodiments, after starting the first camera, the method further includes: inputting a sinusoidal AC signal for frequency sweeping to the first end of the first parallel plate capacitor and the first end of the second parallel plate capacitor with a first duty cycle; detecting the capacitance of the first parallel plate capacitor and the second parallel plate capacitor after movement, specifically including: inputting a sinusoidal AC signal for frequency sweeping to the first end of the first parallel plate capacitor and the first end of the second parallel plate capacitor with a second duty cycle, the second duty cycle being greater than the first duty cycle. In this way, the frequency of detecting the capacitance of the first parallel plate capacitor and the second parallel plate capacitor can be increased after the device is shaken, and the detection accuracy can also be improved. This method of adjusting the duty cycle of the sinusoidal signal can balance power consumption and detection accuracy.

[0019] In a second aspect, a camera module is provided, which includes: an optical lens, a first parallel plate capacitor, and a second parallel plate capacitor. The first parallel plate capacitor and the second parallel plate capacitor both include a fixed electrode and a movable electrode that can move on a plane perpendicular to the optical axis of the camera module. The plane where the fixed electrode and the plane where the movable electrode are located form a non-zero angle with the plane perpendicular to the optical axis. The parallel direction of the first parallel plate capacitor and the parallel direction of the second parallel plate capacitor form a non-zero angle.

[0020] In combination with the second aspect, in some implementations, the first parallel plate capacitor and the second parallel plate capacitor are disposed on a corner side.

[0021] In combination with the second aspect, in some implementations, the first parallel plate capacitor and the second parallel plate capacitor are disposed on adjacent corner sides.

[0022] In conjunction with the second aspect, in some embodiments, the parallel direction of the first parallel plate capacitor is perpendicular to the parallel direction of the second parallel plate capacitor.

[0023] In combination with the second aspect, in some embodiments, the first parallel plate capacitor and the second parallel plate capacitor are arranged on a printed circuit board PCB or a base of the camera module.

[0024] In combination with the second aspect, in some embodiments, the camera module also includes: a first inductor, a first resistor, a first switch tube, and a second switch tube; the first end of the first switch tube is connected to the second end of the first parallel plate capacitor, the second end of the second switch tube is connected to the second end of the first parallel plate capacitor, the second end of the first switch tube and the first end of the second switch tube are both coupled to the first end of the first inductor, the second end of the first inductor is connected to the first end of the first resistor, and the second end of the first resistor is grounded; the third end of the first switch tube and the third end of the second switch tube are used to receive a pulse width modulation PWM signal; the first end of the first parallel plate capacitor and the first end of the second parallel plate capacitor are used to receive a swept sinusoidal AC signal; wherein, when the PWM voltage signal is in the positive half cycle, the first end of the first switch tube is turned on to the second end, and the second end of the second switch tube is turned off to the first end; when the PWM voltage signal is in the negative half cycle, the first end of the first switch tube is turned off to the second end, and the second end of the second switch tube is turned on to the first end.

[0025] In combination with the previous embodiment, in some embodiments, the camera module also includes: a first unidirectional conductive device and a second unidirectional conductive device, the first end of the first unidirectional conductive device is connected to the second end of the first switch tube, the second end is connected to the first end of the first inductor, and the first unidirectional conductive device is conductive from the first end to the second end; the first end of the second unidirectional conductive device is connected to the first end of the first switch tube, the second end is connected to the first end of the first inductor, and the second unidirectional conductive device is conductive from the first end to the second end.

[0026] In a third aspect, an electronic device is provided, comprising: a first camera, a first parallel plate capacitor, a second parallel plate capacitor, a memory, a processor and a computer program stored in the memory, wherein the first camera comprises an optical lens, the first parallel plate capacitor and the second parallel plate capacitor each comprise a fixed plate and a movable plate movable on a plane perpendicular to the optical axis of the first camera, the plane where the fixed plate and the plane where the movable plate are located form a non-zero angle with the plane perpendicular to the optical axis, and the parallel direction of the first parallel plate capacitor and the parallel direction of the second parallel plate capacitor form a non-zero angle; the processor executes the computer program to implement the method provided in the first aspect or any one embodiment of the first aspect.

[0027] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method provided in the first aspect or any one of the embodiments of the first aspect is implemented.

[0028] According to a fifth aspect, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the method provided in the first aspect or any one of the embodiments of the first aspect is implemented.

[0029] In a sixth aspect, a chip system is provided, the chip system comprising a processor and a memory, the memory storing a computer program, and when the computer program is executed by the processor, the method provided in the first aspect or any one of the embodiments of the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A schematic diagram of the structure of a camera module provided in an embodiment of the present application;

[0031] Figure 2 The anti-shake direction provided in the embodiment of the present application;

[0032] Figure 3 A schematic diagram of the specific structure of the PCB 16 provided in the embodiment of the present application;

[0033] Figure 4A and Figure 4B The different positions of the parallel plate capacitors of different designs in the PCB are shown by way of example;

[0034] Figure 5 The movement of two parallel plate capacitors on PCB 16 is shown as an example;

[0035] Figure 6 The structure of a circuit 60 for collecting the capacitance of a parallel plate capacitor is exemplarily shown;

[0036] Figure 7 A flowchart of the anti-shake method for a camera provided in an embodiment of the present application;

[0037] Figure 8 A hardware structure block diagram of an electronic device provided in an embodiment of the present application;

[0038] Fig. 9 The software architecture of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0039] The technical solutions in the embodiments of the present application will be described clearly and in detail below with reference to the accompanying drawings.

[0040] The following embodiments of the present application provide a camera anti-shake method, which determines the change in the distance between the two plates by detecting the capacitance value of the parallel plate capacitor, and then determines the movement distance of the optical lens on the plane perpendicular to the optical axis. This solution can accurately detect the movement of the optical lens on the plane perpendicular to the optical axis, and the cost is low.

[0041] Figure 1 A schematic structural diagram of a camera compact module (CCM) provided in an embodiment of the present application.

[0042] like Figure 1As shown, the camera 10 may include: an optical lens 11, a motor system 12, a holder 13, an infrared filter 14, an image sensor 15, and a printed circuit board (PCB) 16. The camera 10 may also include: a controller, and a driver integrated circuit (driver IC) (not shown) connected to each motor.

[0043] The base 14 is used to fix the optical lens 11, the motor system 12 and the infrared filter 14. The base 13 is implemented as a hollow structure in the middle, so as not to affect the light entering the infrared filter 14 and the image sensor 15. The base 13 can be implemented as a rectangular base or a circular base or other shapes, which are not limited here.

[0044] After the light passes through the optical lens 11, it passes through the infrared filter 14 and is transmitted to the image sensor 15. The image sensor 15 converts the optical signal into an electrical signal and transmits the electrical signal to the image signal processor (ISP) in the electronic device for processing to convert it into an image visible to the naked eye.

[0045] The infrared filter 14 is responsible for filtering infrared light.

[0046] The motor system 12 may include an auto focus (AF) motor and an optical image stabilization (OIS) motor. The AF motor drives the lens to move in the direction of the optical axis to change the focal length, that is, to achieve zooming. The OIS motor drives the lens to move in a plane perpendicular to the optical axis to offset the effect of external vibration (such as hand shaking) on ​​the clarity of the picture during shooting, that is, to achieve image stabilization.

[0047] Generally, such as Figure 2 As shown, OIS requires jitter compensation in at least four directions in the plane perpendicular to the optical axis: x1, x2, y1, and y2. Figure 2 Where z1 and z2 represent the direction of the optical axis. As mentioned above, an OIS motor provided in an embodiment of the present application can generate motor thrust in two directions. To this end, the OIS motor may include at least two motors, one motor is used to generate motor thrust in the two directions of x1 and x2, and the other motor is used to generate motor thrust in the two directions of y1 and y2.

[0048] The motor system 12 may be a shape memory alloy motor (SMAM), a voice coil motor (VCM), an ultrasonic motor, or the like.

[0049] In the camera 10, a controller can be configured for the motor system 12 as a whole to control the thrust direction of each motor, and a driver IC can also be configured as a whole. The driver IC is connected to a power management circuit (PMC) and receives power from the PMC; the driver IC can also communicate with the power supply through a bus (such as I 2 C bus) is connected to the application processor (AP), receives control signals from the AP, controls the current supplied to each motor, and thus changes the thrust.

[0050] In the camera 10 , a controller and a driver IC may be configured for each motor respectively.

[0051] The driver IC and the controller may be arranged in the PCB 16. The PCB 16 may also be responsible for connecting some components in the camera 10 with the processor of the electronic device, for example, transmitting the raw data output by the image sensor 15 to the processor (specifically, the ISP).

[0052] Figure 3 A schematic diagram of the specific structure of the PCB 16 provided in an embodiment of the present application.

[0053] Figure 3 a is a side view of PCB16, Figure 3 b is a top view of PCB16 viewed from the optical axis direction.

[0054] In the embodiment of the present application, at least one parallel plate capacitor is disposed on PCB 16. The parallel plate capacitor includes two plates that are spaced apart and arranged in parallel, and a non-zero angle is formed between the plane where the plates are located and the plane perpendicular to the optical axis. Figure 3 Of a, the plane where the plate is located is parallel to the optical axis, that is, perpendicular to the plane perpendicular to the optical axis. Of course, in other embodiments, the plane where the plate is located can also form a certain angle with the optical axis, as long as the plane where the plate is located is not perpendicular to the optical axis.

[0055] One plate of the parallel plate capacitor is fixed on PCB16, and the other plate is a movable capacitor plate. The movable plate can slide on PCB16, and during the sliding process, the two plates remain parallel and the facing area of ​​the two plates remains unchanged, and the spacing changes. That is, the movable plate can move on the plane perpendicular to the optical axis, and the movement is close to or away from the fixed plate. A guide groove can be set on PCB16 for the movable capacitor plate to slide on PCB16, or the movable plate can be pushed by a deformable material (such as linear shape memory alloy (SMA)).

[0056] When the electronic device is displaced on the plane perpendicular to the optical axis during shooting, the optical lens 11 moves relative to the electronic device on the plane perpendicular to the optical axis, and the optical axis is offset. At this time, the center of the optical lens 11 no longer overlaps with the center of the base 13, the center of the infrared filter 14, and the center of the image sensor 15. At this time, under the action of inertia, the movable plate moves on the PCB 16 in the opposite direction of the displacement of the above-mentioned device. Figure 3 As shown in b, x1, x2 and y1, y2 are perpendicular to each other and are located on the plane perpendicular to the optical axis. When the electronic device moves in the direction of x1 on the plane perpendicular to the optical axis, the movable plate moves in the direction of x2; when the electronic device moves in the direction of x2 on the plane perpendicular to the optical axis, the movable plate moves in the direction of x1; when the electronic device moves in the direction of y1 on the plane perpendicular to the optical axis, the movable plate moves in the direction of y2; when the electronic device moves in the direction of y2 on the plane perpendicular to the optical axis, the movable plate moves in the direction of y1. Similarly, when the electronic device moves obliquely on the plane perpendicular to the optical axis, the movable plate moves in the opposite direction of the moving direction.

[0057] The parallel plate capacitors may be distributed at any position on the PCB 16, for example, at a corner of the PCB 16 or at a sideline of the PCB 16. When the parallel plate capacitors are located at a corner of the PCB 16, it is easier to fix and process the parallel plate capacitors.

[0058] The number of parallel plate capacitors can be multiple. The more parallel plate capacitors there are, the more accurately the movement of the device in the plane perpendicular to the optical axis can be detected. For example, two parallel plate capacitors can be set, such as Figure 3 The parallel plate capacitor 161A and the parallel plate capacitor 161B shown may also be provided with three or more parallel plate capacitors. When two parallel plate capacitors are provided, the two parallel plate capacitors may also be located at adjacent corners on the PCB 16 or at corners on a diagonal line.

[0059] One design of the parallel plate capacitor is that the fixed plate is close to the outer side and the movable plate is close to the inner side. Another design of the parallel plate capacitor is that the fixed plate is close to the inner side and the movable plate is close to the outer side. When there are multiple parallel plate capacitors, the designs of different parallel plate capacitors may be different.

[0060] After the electronic device is displaced in the plane perpendicular to the optical axis, the movable plate moves on PCB16, which changes the distance between it and the fixed plate. This change is also related to the design of the parallel plate capacitor and its position on PCB16.

[0061] refer to Figure 4A , when the parallel plate capacitor adopts the first design mentioned above, the effect of device movement on the plate spacing in the parallel plate capacitor at different positions is as follows:

[0062] When the parallel plate capacitor is located at the upper right corner of PCB16: when the electronic device moves in the x1 direction, the movable plate moves in the x2 direction, and the distance between the two plates increases; when the electronic device moves in the x2 direction, the movable plate moves in the x1 direction, and the distance between the two plates decreases; when the electronic device moves in the y1 direction, the movable plate moves in the y2 direction, and the distance between the two plates increases; when the electronic device moves in the y2 direction, the movable plate moves in the y1 direction, and the distance between the two plates decreases.

[0063] When the parallel plate capacitor is located at the lower right corner of PCB16: when the electronic device moves in the x1 direction, the movable plate moves in the x2 direction, and the distance between the two plates increases; when the electronic device moves in the x2 direction, the movable plate moves in the x1 direction, and the distance between the two plates decreases; when the electronic device moves in the y1 direction, the movable plate moves in the y2 direction, and the distance between the two plates decreases; when the electronic device moves in the y2 direction, the movable plate moves in the y1 direction, and the distance between the two plates increases.

[0064] When the parallel plate capacitor is located at the upper left corner of PCB16: when the electronic device moves in the x1 direction, the movable plate moves in the x2 direction, and the distance between the two plates decreases; when the electronic device moves in the x2 direction, the movable plate moves in the x1 direction, and the distance between the two plates increases; when the electronic device moves in the y1 direction, the movable plate moves in the y2 direction, and the distance between the two plates increases; when the electronic device moves in the y2 direction, the movable plate moves in the y1 direction, and the distance between the two plates decreases.

[0065] When the parallel plate capacitor is located at the lower left corner of PCB16: when the electronic device moves in the x1 direction, the movable plate moves in the x2 direction, and the distance between the two plates decreases; when the electronic device moves in the x2 direction, the movable plate moves in the x1 direction, and the distance between the two plates increases; when the electronic device moves in the y1 direction, the movable plate moves in the y2 direction, and the distance between the two plates decreases; when the electronic device moves in the y2 direction, the movable plate moves in the y1 direction, and the distance between the two plates increases.

[0066] refer to Figure 4B When the parallel plate capacitor adopts the second design mentioned above, the effect of device movement on the plate spacing in the parallel plate capacitor at different positions is opposite to the effect under the first design mentioned above, which will not be repeated here.

[0067] As mentioned above, the movable plate of the parallel plate capacitor can move in the plane perpendicular to the optical axis, and this movement changes the distance between the two plates. Then, when the electronic device moves in the direction of the line where the plane where the movable plate is located intersects with the plane perpendicular to the optical axis, the movable plate cannot move in the plane perpendicular to the optical axis, and the distance between the two plates will not change. This is equivalent to the spacing of the parallel plate capacitor not changing when the electronic device moves in the direction of the line where the plane where the movable plate is located intersects with the plane perpendicular to the optical axis.

[0068] Therefore, when a parallel plate capacitor is set in the camera, when the electronic device moves in the direction of the line where the plane where the movable plate is located intersects the plane perpendicular to the optical axis, it may be impossible to detect the change in the distance between the plates.

[0069] When two or more parallel plate capacitors are set in the camera, if the movable plates of the two or more parallel plate capacitors are parallel, for example, the two parallel plate capacitors are located on the corner sides of the diagonal line, then when the electronic device moves in the direction of the line where the plane where the movable plates are located intersects the plane perpendicular to the optical axis, the two or more parallel plate capacitors cannot detect the change in the distance between the plates.

[0070] When two or more parallel plate capacitors are set in the camera, if the movable plates of the two or more parallel plate capacitors are not all parallel, that is, the parallel directions of at least two parallel plate capacitors form a non-zero angle, for example, two parallel plate capacitors are located on adjacent corner sides, then when the electronic device moves in the direction of a line where the plane where any movable plate is located intersects the plane perpendicular to the optical axis, the change in the distance between the plates can be detected through other parallel plate capacitors, and the detection accuracy is higher.

[0071] When two or more parallel plate capacitors are set in the camera, if the parallel directions of two of the parallel plate capacitors are perpendicular to each other, for example, the two parallel plate capacitors are located on adjacent corner sides and the parallel directions are perpendicular, then when the electronic device moves on the perpendicular plane of the optical axis, the impact of the movement can be decomposed into two perpendicular parallel directions. Therefore, the change in the distance between the plates can be detected through the two parallel plate capacitors, and the detection accuracy is higher.

[0072] Therefore, when the parallel plate capacitors are located at adjacent corners, the movement of the device in the plane perpendicular to the optical axis can be detected more accurately. The two parallel plate capacitors are located at adjacent corners, which not only has the advantages of accurate detection, but also low cost.

[0073] Figure 5 The movement of two parallel plate capacitors on the PCB 16 is shown as an example.

[0074] like Figure 5As shown, a parallel plate capacitor 161A and a parallel plate capacitor 161B are provided on the PCB 16, and the two parallel plate capacitors are provided at adjacent corners. The two parallel plate capacitors both adopt the first design described above, the one close to the outside is a fixed plate, and the one close to the inside is a movable plate.

[0075] like Figure 5 As shown, when the electronic device moves in the plane perpendicular to the optical axis as shown in the figure, the distance between the two plates of the parallel plate capacitor 161A in the upper right corner increases, and the distance between the two plates of the parallel plate capacitor 161B in the lower right corner also increases.

[0076] The parallel plate capacitor 161A conforms to the following equation:

[0077] Formula 1

[0078] Formula 2

[0079] in, is the capacitance value of the parallel plate capacitor 161A before the device is moved, is the capacitance value of the parallel plate capacitor 161A after the device is moved. It is the facing area of ​​the two plates in the parallel plate capacitor 161A. The distance between the two plates in the parallel plate capacitor 161A before the device is moved, The distance between the two plates in the parallel plate capacitor 161A after the device is moved. is the dielectric constant of the medium between the two plates. is the electrostatic force constant (Coulomb constant).

[0080] The parallel plate capacitor 161B complies with the following equation:

[0081] Formula 3

[0082] Formula 4

[0083] in, is the capacitance value of the parallel plate capacitor 161B before the device is moved, is the capacitance value of the parallel plate capacitor 161B after the device is moved. It is the facing area of ​​the two plates in the parallel plate capacitor 161B. The distance between the two plates in the parallel plate capacitor 161B before the device is moved, The distance between the two plates in the parallel plate capacitor 161B after the device is moved.

[0084] There is a capacitance difference between the parallel plate capacitor 161A before and after the device moves , the parallel plate capacitor 161B also has a capacitance difference :

[0085] Formula 5

[0086] Formula 6

[0087] The capacitance difference of the parallel plate capacitor (including the parallel plate capacitor 161A and the parallel plate capacitor 161B) can reflect the movement distance of the device on the plane perpendicular to the optical axis. Therefore, the OIS motor in the motor system 12 can be driven to push the optical lens in the opposite direction of the device movement based on the capacitance difference of the parallel plate capacitor, thereby offsetting the impact of device jitter. When driving the OIS motor to move, the direction and distance of OIS movement can refer to the detailed description of the subsequent method embodiments, which will not be expanded here.

[0088] Before the device moves, the parallel plate capacitor can be considered to be in a static state. The distance, facing area and dielectric constant of the two plates of the parallel plate capacitor in the static state are known, so the capacitance of the parallel plate capacitor before the device moves can be calculated. Therefore, we only need to calculate the capacitance of the parallel plate capacitor after the device is moved , we can know the capacitance difference of the parallel plate capacitor before and after the device moves .

[0089] The present application embodiment provides a circuit to collect the capacitance of the parallel plate capacitor after the device moves. .

[0090] Figure 6 An example is shown for collecting The structure of the circuit 60. Figure 6 Take the example of setting parallel plate capacitor 161A and parallel plate capacitor 161B in an electronic device.

[0091] like Figure 6 As shown, a parallel plate capacitor 161A, an inductor L1, and a resistor R1 form an RLC resonant circuit 1. The first end of the parallel plate capacitor 161A receives a sinusoidal AC signal, and the second end is coupled to the first end of the inductor L1. The second end of the inductor L1 is connected to the first end of the resistor R1 and an analog-to-digital converter (ADC). The second end of the resistor R1 is grounded. The first end of the parallel plate capacitor 161A is a fixed plate, and the second end is a movable plate, or vice versa. The first end of the parallel plate capacitor 161B is a fixed plate, and the second end is a movable plate, or vice versa. The inductor L1 can be called a first inductor, and the resistor R1 can be called a first resistor.

[0092] The sinusoidal AC signal can be provided by a radio frequency chip. In some embodiments, the electronic device can control the duty cycle of the sinusoidal AC signal to control the capacitance of the parallel plate capacitor after the collection device moves. Specifically, after starting the camera, the electronic device can output a sinusoidal AC signal with a lower duty cycle (such as a first duty cycle), and the device power consumption is relatively low at this time; when the electronic device detects jitter (such as jitter greater than a certain value), it can output a sinusoidal AC signal with a larger duty cycle (such as a second duty cycle) to increase the detection capacitor. The second duty cycle is greater than the first duty cycle. This method of adjusting the duty cycle of the sinusoidal signal can balance power consumption and detection accuracy.

[0093] The ADC is used to collect analog voltage signals and convert them into digital voltage signals for subsequent analysis. In some embodiments, the ADC can add an average filtering algorithm, which can reduce the fluctuation of the voltage signal sampling value measured at the resistor end and improve the accuracy. In other embodiments, the ADC can also be a high-precision ADC to improve the accuracy.

[0094] The resonant circuit 1 is frequency-sweeped, that is, sinusoidal AC signals of different frequencies are inputted thereto. Then, according to the characteristics of the resonant circuit, the resonant circuit 1 can resonate at the resonant frequency. When resonating, the ADC can collect the maximum voltage during the frequency sweeping process. Before the device is moved, the parallel plate capacitor 161A is in the initial position. At this time, the resonant circuit 1 is frequency-sweeped, and the ADC should be able to collect the maximum voltage at the resonant frequency. After the device is moved, the capacitance of the parallel plate capacitor 161A is changed from Changes to , the resonant frequency of resonant circuit 1 also changes to f1. At this time, the frequency of resonant circuit 1 is swept, and the ADC should be able to The maximum voltage is detected at the resonance. Resonance means that the impedance of both the inductor L1 and the capacitor C1 is the minimum, so the maximum voltage can be collected on the resistor R1.

[0095] In the embodiment of the present application, after the device moves, the resonant circuit 1 is swept, and when the ADC detects the maximum voltage during the sweep, the frequency of the corresponding sinusoidal AC signal is determined, which is the resonant frequency. According to the following formula of the resonant circuit, the capacitance of the parallel plate capacitor 161A can be calculated: :

[0096] Formula 7

[0097] Wherein, L is the inductance value of the inductor L1.

[0098] The electronic device can calculate the capacitance of the parallel plate capacitor 161A after the device moves according to Formula 7 , calculate the capacitance of the parallel plate capacitor 161A before the device moves according to Formula 1 , and the capacitance difference of the parallel plate capacitor 161A before and after the device moves is calculated according to Formula 5 .

[0099] The frequency range of the resonant circuit 1 sweep can be [ - , + ].

[0100] In the sweep range is the resonant frequency of the parallel plate capacitor 161A in the initial position, which can be calculated in the following two ways:

[0101] Method 1, calculated according to the following formula 8:

[0102] Formula 8

[0103] in, It can be calculated according to the formula 1 above.

[0104] Method 2: Before the device moves, the resonant circuit 1 can also be swept, and the frequency of the sinusoidal AC signal corresponding to the maximum voltage detected by the ADC during the sweep process can be determined as .

[0105] In the sweep range is a preset value. In the embodiment of the present application, it can be set as needed ,when When the setting is small, the frequency sweep range is small, and the power consumption of the electronic device during frequency sweep is also small.

[0106] Similarly, the parallel plate capacitor 161B, the inductor L1 and the resistor R1 form an RLC resonant circuit 2. The working principle of the resonant circuit 2 is similar to that of the resonant circuit 1.

[0107] The electronic device can calculate the capacitance of the parallel plate capacitor 161B after the device moves according to the following formula 9 , calculate the capacitance of the parallel plate capacitor 161B before the device moves according to Formula 3 , and the capacitance difference of the parallel plate capacitor 161B before and after the device moves is calculated according to Formula 6 .

[0108] Formula 9

[0109] in, After the device is moved, the resonant circuit 2 is frequency-sweeped, and the frequency of the sinusoidal AC signal corresponding to the maximum voltage detected by the ADC during the frequency-sweep process is the resonant frequency.

[0110] The frequency range of the resonant circuit 2 sweep can be [ - , + ].

[0111] In the sweep range is the resonant frequency of the parallel plate capacitor 161B in the initial position, which can be calculated in the following two ways:

[0112] Method 1: Calculated according to the following formula 10:

[0113] Formula 10

[0114] in, It can be calculated according to the above formula 3.

[0115] Method 2: Before the device moves, the resonant circuit 2 can also be swept, and the frequency of the sinusoidal AC signal corresponding to the maximum voltage detected by the ADC during the sweep process can be determined as .

[0116] In the sweep range is a preset value. In the embodiment of the present application, it can be set as needed ,when When the setting is small, the frequency sweep range is small, and the power consumption of the electronic device during frequency sweep is also small.

[0117] refer to Figure 6 , the resonant circuit 1 and the resonant circuit 2 share a sinusoidal AC signal, an inductor L1 and a resistor R1. In order to sweep the resonant circuit 1 and the resonant circuit 2 respectively to obtain relevant sweep frequency data, the circuit 60 further includes two metal-oxide-semiconductor (metal oxide semiconductor, MOS) field effect transistors M1 and M2. M1 is a P-type field effect transistor, M2 is an N-type field effect transistor, or, M1 is an N-type field effect transistor, M2 is a P-type field effect transistor. Figure 6 In the circuit 60, M1 is a P-type field effect transistor, and M2 is an N-type field effect transistor. M1 can be called a first switch tube, and M2 can be called a second switch tube.

[0118] The gate (G) of M1 is connected to a general-purpose input / output (GPIO) interface for receiving a pulse-width modulation (PWM) signal. The drain (D) of M1 is connected to the second end of the parallel plate capacitor 161A, and the source (S) of M1 is coupled to the first end of the inductor L1.

[0119] The gate (G) of M2 is connected to a general-purpose input / output (GPIO) interface for receiving a pulse-width modulation (PWM) signal. The source (S) of M2 is connected to the second end of the parallel plate capacitor 161B, and the drain (D) of M2 is coupled to the first end of the inductor L1.

[0120] When the PWM signal output by the GPIO interface is in the positive half cycle, M1 is turned on and M2 is turned off / off, that is, resonant circuit 1 is turned on and resonant circuit 2 is turned off. At this time, the RF chip inputs a sinusoidal AC signal to circuit 60 to achieve frequency sweep of resonant circuit 1.

[0121] When the PWM signal output by the GPIO interface is in the negative half cycle, M2 is turned on and M1 is turned off / off, that is, resonant circuit 2 is turned on and resonant circuit 1 is turned off. At this time, the RF chip inputs a sinusoidal AC signal to circuit 60 to achieve frequency sweep of resonant circuit 2.

[0122] In this way, the alternating frequency sweep of the two parallel plate capacitors can be achieved through the PWM signal output by the GPIO interface.

[0123] In some embodiments, the frequency of the PWM signal output by the GPIO interface can be at the gigahertz (GHZ) level, so that the time required for M1 or M2 to turn on is at the nanosecond (ns) level. If the adjustment frequency of the PWM signal is too fast, after the gate (G) of M1 or M2 receives the turn-on command, before the drain (D) and source (S) are turned on, the gate (G) may receive the turn-off command again, causing the circuit to lose control. Therefore, controlling the frequency of the PWM signal at the GHZ level can avoid the adjustment frequency of the PWM signal being too fast, thereby avoiding the time required for the MOS tube to turn on.

[0124] In some embodiments, M1 and M2 may also be replaced by other devices or circuits with switching functions, as long as they can realize the alternating conduction function under the control of the PWM signal. For example, M1 and M2 may also be implemented as insulated gate bipolar transistors (IGBTs), switching transistors, and other devices.

[0125] M1 can be called a first switch tube, the drain (D) of M1 can be called a first terminal, the source (S) can be called a second terminal, and the gate (G) can be called a third terminal. M2 can be called a second switch tube, the drain (D) of M2 can be called a first terminal, the source (S) can be called a second terminal, and the gate (G) can be called a third terminal.

[0126] In some embodiments, in order to prevent the mutual injection of current between M1 and M2 (ie, leakage interference), a unidirectional conduction device D1 may be added after M1, and a unidirectional conduction device D2 may be added after M2. Figure 6 As shown, the first end of D1 is connected to the source (S) of M1, and the second end is connected to the first end of the inductor L1, and D1 is unidirectionally conducted from the first end to the second end. The first end of D2 is connected to the drain (D) of M2, and the second end is connected to the first end of the inductor L1, and D2 is unidirectionally conducted from the first end to the second end. Both D1 and D2 can be unidirectional conducting devices or unidirectional conducting circuits, such as diodes. D1 can be referred to as a first unidirectional conducting device, and D2 can be referred to as a second unidirectional conducting device.

[0127] In some implementations, the resonant circuit 1 and the resonant circuit 2 do not need to share the inductor L1 and the resistor R1, that is, an inductor and a resistor are respectively set for the parallel plate capacitor 161A and the parallel plate capacitor 161B to form two resonant circuits. In this way, there is no need to input a PWM signal through the GPIO interface, and there is no need to set M1 and M2 to achieve alternating frequency sweeping of the two resonant circuits, and there is no need to set D1 and D2 to prevent mutual injection.

[0128] Figure 6 The circuit 60 takes two parallel plate capacitors in an electronic device as an example, and the circuit 60 can be used to respectively detect the capacitance of the two parallel plate capacitors after the device moves. In other embodiments, if a parallel plate capacitor is provided in the electronic device, or three or more parallel plate capacitors are provided, an inductor and a resistor may be provided in the electronic device for each parallel plate capacitor to form a resonant circuit, so that the resonant frequency of each resonant circuit after the device is moved can be detected, thereby detecting the capacitance of the parallel plate capacitor after the device is moved. .

[0129] Used to detect the capacitance of parallel plate capacitors after the device moves The circuit can be arranged on PCB 16. For example Figure 6The parallel plate capacitor 161A, parallel plate capacitor 161B, M1, M2, D1, D2, L1, R1, and ADC in the circuit 60 shown can all be disposed on the PCB 16. In other embodiments, the parallel plate capacitor (such as the parallel plate capacitor 161A and the parallel plate capacitor 161B) can also be disposed on the base 13. The ADC can also be disposed at a location other than the camera 10, which is not limited here.

[0130] Figure 7 Flow chart of the anti-shake method of the camera provided in the embodiment of the present application. Figure 7 As shown, the method may include the following steps:

[0131] S101, the electronic device starts a first camera.

[0132] The first camera can be any camera in the electronic device, such as a front camera, a rear camera, a telephoto camera, etc. The structure of the first camera can be referred to in the previous article. Figure 1 , Figure 3 And related text introduction.

[0133] At least two parallel plate capacitors may be provided in the first camera. For example, the first camera may include a first parallel plate capacitor and a second parallel plate capacitor, the first parallel plate capacitor may be the parallel plate capacitor 161A mentioned above, and the second parallel plate capacitor may be the parallel plate capacitor 161B mentioned above. Among them, the plane where the fixed plate and the plane where the movable plate are located in the first parallel plate capacitor both form a non-0 angle with the plane perpendicular to the optical axis; the plane where the fixed plate and the plane where the movable plate are located in the second parallel plate capacitor both form a non-0 angle with the plane perpendicular to the optical axis. In addition, the parallel direction of the first parallel plate capacitor and the parallel direction of the second parallel plate capacitor form a non-0 angle.

[0134] After the electronic device starts the first camera, it enters the shooting scene, which can be a scene of taking a photo or recording a video.

[0135] S102, the electronic device shakes, the shaking includes the electronic device moving in a first direction on a plane perpendicular to the optical axis, the shaking causes the optical lens 11 in the first camera to move in a second direction on a plane perpendicular to the optical axis, and the second direction is opposite to the first direction.

[0136] In a shooting scene, the electronic device may shake due to hand shaking of the user. When the electronic device moves in a first direction on a plane perpendicular to the optical axis, the optical lens 11 in the first camera moves relative to the electronic device in a second direction on a plane perpendicular to the optical axis under the action of inertia. Here, the moving distance of the optical lens 11 relative to the electronic device on a plane perpendicular to the optical axis caused by the shaking of the device is defined as the first distance.

[0137] The electronic device can determine the first direction of its movement on the plane perpendicular to the optical axis through data collected by an acceleration sensor, a gyroscope sensor, etc., and can determine the opposite direction of the first direction as the second direction. However, the first distance that the optical lens 11 moves relative to the electronic device on the plane perpendicular to the optical axis cannot be directly measured by the electronic device.

[0138] S103, the electronic device sweeps the resonance circuit including the parallel plate capacitor in the first camera to determine the resonance frequency of the resonance circuit .

[0139] After starting the first camera, the electronic device may start to sweep the resonance circuit including the parallel plate capacitor in the first camera to determine the resonance frequency of the resonance circuit. After the first camera is activated, S103 and subsequent steps may be continuously executed until the electronic device turns off the first camera.

[0140] The first camera may include one or more parallel plate capacitors, each of which may be provided with a corresponding resonant circuit. The structure of the resonant circuit may refer to the above Figure 6 For example, if the first camera includes Figure 6 The parallel plate capacitor 161A and the parallel plate capacitor 161B shown in FIG. 1 are provided, and the electronic device can sweep the frequency of the resonant circuit 1 and the resonant circuit 2 respectively, thereby determining the resonant frequency of the resonant circuit 1. and the resonant frequency of resonant circuit 1 .

[0141] S104, according to the resonant frequency Determine the capacitance difference of a parallel plate capacitor before and after device jitter .

[0142] The electronic device can calculate the capacitance difference of each parallel plate capacitor in the first camera before and after the device is shaken according to the above formula 5, formula 6 and related introduction: For example, if the first camera of the electronic device includes Figure 3 The electronic device can calculate the capacitance difference of the parallel plate capacitor 161A. The capacitance difference between the parallel plate capacitor 161B and .

[0143] Optional step S105, determining the capacitance difference of the parallel plate capacitor before and after the jitter Is it within the preset range?

[0144] If a plurality of parallel plate capacitors are provided in the first camera, S105 may specifically determine whether the capacitance difference of each parallel plate capacitor in the first camera before and after the shaking is within a preset range, or determine whether the capacitance difference of any parallel plate capacitor in the first camera before and after the shaking is within a preset range. The preset range may be set as required and is not limited here. The preset ranges corresponding to different parallel plate capacitors may be the same or different.

[0145] If the judgment result of S105 is no, it means that the capacitance difference of the parallel plate capacitor before and after the dithering is If the device is not within the preset range, the method process can be terminated and the electronic device does not perform anti-shake processing. The reasons for this situation include the following two: 1. The device shakes too little, resulting in a capacitance difference of part or all of the parallel plate capacitors in the first camera. 2. The device shakes too much, resulting in a capacitance difference of some or all of the parallel plate capacitors in the first camera. Such shaking may cause damage to the first camera. When the camera is damaged, anti-shake processing is meaningless, so no anti-shake processing is performed.

[0146] S105 is an optional operation. In other implementations, S105 may not be executed, and S106 may be executed directly after S104.

[0147] S106, electronic equipment according to the capacitance difference The corresponding relationship between the distance of the optical lens 11 moving relative to the electronic device on the plane perpendicular to the optical axis is used to find the capacitance difference of the parallel plate capacitor in the first camera. The corresponding moving distance L of the optical lens 11 relative to the electronic device on the plane perpendicular to the optical axis.

[0148] The corresponding relationship can be obtained through multiple experiments and can be preset in the electronic device.

[0149] When one or more of the number, position, design method, and movement direction of the parallel plate capacitors in the electronic device on a plane perpendicular to the optical axis are different, the distance the optical lens moves relative to the electronic device on a plane perpendicular to the optical axis is different.

[0150] Refer to Table 1, Table 1 is Figure 3 The parallel plate capacitor shown in b is used as an example to illustrate this correspondence.

[0151] Table 1

[0152]

[0153] For example, if the first camera of the electronic device includes Figure 3The two parallel plate capacitors shown in the figure are designed in such a way that the fixed plate is close to the outside and the movable plate is close to the inside. Then the capacitance difference of the parallel plate capacitor 161A is calculated as The capacitance difference between the parallel plate capacitor 161B and After that, the electronic device first searches Table 1 for the rows whose moving direction is the second direction in S102, and then finds the rows whose capacitance difference is the calculated value. and By reading a row, the moving distance of the optical lens 11 relative to the electronic device on the plane perpendicular to the optical axis can be determined.

[0154] L can be referred to as a first distance, and the correspondence preset in the electronic device can be referred to as a first correspondence table. The first correspondence table includes capacitance differences of one or more parallel plate capacitors in the first camera corresponding to each distance that the optical lens of the first camera moves relative to the electronic device in different directions on a plane perpendicular to the optical axis.

[0155] S107, the electronic device drives the optical lens 11 to move in the first direction L through the OIS motor in the first camera.

[0156] L is determined by a corresponding relationship obtained through experiments, and is the same as or similar to the first distance in S102 during actual use of the device.

[0157] In this way, when the device shakes and causes the optical lens 11 to move a certain distance in the second direction relative to the electronic device, the electronic device can push the optical lens 11 in the opposite direction of the second direction (i.e., the first direction) through the OIS motor, thereby offsetting the impact of the shake and achieving an anti-shake effect.

[0158] Specifically, the electronic device can input a control signal to the driver IC of the OIS motor through a processor (such as an AP) to control the current provided to each motor. At the same time, different currents can be provided to the driver ICs of different OIS motors to generate thrusts of different magnitudes in different directions, thereby generally controlling the direction in which the optical lens 11 is pushed.

[0159] The electronic device provided by the embodiments of the present application is introduced below.

[0160] Figure 8 The hardware structure diagram of the electronic device 100 provided in the embodiment of the present application is shown. The electronic device 100 is used to execute the anti-shake method of the camera provided in the above method embodiment.

[0161] The electronic device 100 may include: the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, a sensor module 180, a camera 193, a display screen 194, etc. The sensor module 180 may include a gyroscope sensor 180B, an acceleration sensor 180E, etc.

[0162] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0163] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0164] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0165] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0166] In some embodiments, the processor 110 may include one or more interfaces, which may include an inter-integrated circuit (I2C) interface, a GPIO, and the like.

[0167] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor, charger, flash, camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor through the I2C interface, so that the processor 110 communicates with the touch sensor through the I2C bus interface to realize the touch function of the electronic device 100.

[0168] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0169] The charging management module 140 is used to receive charging input from a charger.

[0170] The power management module 141 is used to connect the battery 142 , the charging management module 140 and the processor 110 .

[0171] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0172] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G etc. applied on the electronic device 100 .

[0173] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0174] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0175] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor. The structure of the camera 193 can be referred to Figure 1 , Figure 3 And related text introduction.

[0176] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise and brightness of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0177] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0178] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0179] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0180] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.

[0181] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

[0182] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0183] The internal memory 121 stores computer programs, and the processor 110 is used to call the computer programs in the internal memory 121, so that the electronic device 100 executes the camera anti-shake method provided in the embodiment of the present application. The operations performed by each device in the electronic device 100 can be specifically referred to the relevant description of the method embodiment above, and will not be elaborated here.

[0184] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The present application embodiment takes a mobile operating system with a layered architecture as an example to exemplify the software structure of the electronic device 100.

[0185] Fig. 9 It is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.

[0186] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the mobile operating system is divided into four layers, from top to bottom: application layer, application framework layer / core service layer, system library and runtime, and kernel layer.

[0187] The application layer can include a series of application packages.

[0188] like Fig. 9 As shown, the application package may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.

[0189] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0190] like Fig. 9 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0191] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0192] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0193] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0194] The phone manager is used to provide communication functions for electronic devices, such as the management of call status (including answering, hanging up, etc.).

[0195] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0196] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0197] The runtime can refer to all code libraries, frameworks, etc. required for the program to run. For example, for the C language, the runtime includes a series of function libraries required for the C program to run. For the Java language, in addition to the core library, the runtime also includes the virtual machine required for the Java program to run. The above core library may include the function functions that the Java language needs to call.

[0198] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0199] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0200] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0201] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0202] A 2D graphics engine is a drawing engine for 2D drawings.

[0203] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0204] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.

[0205] The present application also provides an electronic device, which may include a memory, a processor, and a computer program stored in the memory, and the processor executes the computer program to implement a method executed on the electronic device side as in any of the above embodiments.

[0206] The present application also provides a chip system, which includes at least one processor, for implementing the method executed by the electronic device side in any of the above embodiments. In one possible design, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0207] A chip system can be composed of chips or include chips and other discrete devices.

[0208] Optionally, there may be one or more processors in the chip system. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0209] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.

[0210] Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0211] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method executed on the electronic device side in any of the above embodiments is implemented.

[0212] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the method executed on the electronic device side in any of the above embodiments.

[0213] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.

[0214] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0215] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0216] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0217] The terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0218] In short, the above is only an embodiment of the technical solution of this application, and is not intended to limit the protection scope of this application. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of this application shall be included in the protection scope of this application.

Claims

1. A camera anti-shake method, characterized in that: The method is applied to an electronic device including a first camera, wherein the first camera includes an optical lens, and also includes a first parallel plate capacitor and a second parallel plate capacitor, wherein the first parallel plate capacitor and the second parallel plate capacitor both include a fixed plate and a movable plate that can move on a plane perpendicular to the optical axis of the first camera, wherein a plane where the fixed plate and a plane where the movable plate are located both form a non-zero angle with the plane perpendicular to the optical axis, a parallel direction of the first parallel plate capacitor and a parallel direction of the second parallel plate capacitor form a non-zero angle, and the first parallel plate capacitor and the second parallel plate capacitor are arranged on a printed circuit board PCB or a base of the first camera, The first camera further includes: a first inductor, a first resistor, a first switch tube and a second switch tube; the first end of the first switch tube is connected to the second end of the first parallel plate capacitor, the second end of the second switch tube is connected to the second end of the second parallel plate capacitor, the second end of the first switch tube and the first end of the second switch tube are both coupled to the first end of the first inductor, the second end of the first inductor is connected to the first end of the first resistor, and the second end of the first resistor is grounded; The method comprises: Starting the first camera; Detecting that the electronic device moves in a first direction on a plane perpendicular to the optical axis; Inputting a pulse width modulation (PWM) voltage signal to the third end of the first switch tube and the third end of the second switch tube; Inputting a sinusoidal AC signal for frequency sweeping to a first end of the first parallel plate capacitor and a first end of the second parallel plate capacitor to determine the capacitance of the first parallel plate capacitor and the second parallel plate capacitor after the movement; Wherein, when the PWM voltage signal is in the positive half cycle, the first end of the first switch tube is turned on to the second end, and the second end of the second switch tube is turned off to the first end; when the PWM voltage signal is in the negative half cycle, the first end of the first switch tube is turned off to the second end, and the second end of the second switch tube is turned on to the first end; Determine the capacitance difference between the first parallel plate capacitor and the second parallel plate capacitor after and before the movement, respectively; Determine a first distance that the optical lens moves relative to the electronic device in a plane perpendicular to the optical axis, corresponding to a capacitance difference between the first parallel plate capacitor and a capacitance difference between the second parallel plate capacitor; The optical lens is driven to move the first distance in the first direction on a plane perpendicular to the optical axis.

2. The method according to claim 1, characterized in that The first parallel plate capacitor and the second parallel plate capacitor are disposed at a corner side.

3. The method according to claim 1, characterized in that The first parallel plate capacitor and the second parallel plate capacitor are disposed at adjacent corner sides.

4. The method according to claim 3, characterized in that The parallel direction of the first parallel plate capacitor is perpendicular to the parallel direction of the second parallel plate capacitor.

5. The method according to claim 1, characterized in that Before determining the first distance, the method further includes: Determining whether the capacitance difference of the first parallel plate capacitor and the capacitance difference of the second parallel plate capacitor are both within a preset range; or, It is determined whether the capacitance difference of the first parallel plate capacitor and the capacitance difference of the second parallel plate capacitor is within a preset range.

6. The method according to claim 1, characterized in that Determining a first distance that the optical lens moves relative to the electronic device on a plane perpendicular to the optical axis, corresponding to a capacitance difference between the first parallel plate capacitor and a capacitance difference between the second parallel plate capacitor, specifically includes: In the first correspondence table, a first distance that the optical lens moves relative to the electronic device on a plane perpendicular to the optical axis corresponds to a capacitance difference between the first parallel plate capacitor and a capacitance difference between the second parallel plate capacitor when the optical lens moves relative to the electronic device in a second direction, and the second direction is opposite to the first direction; Among them, the first correspondence table is preset in the electronic device, and the first correspondence table includes the capacitance difference of the first parallel plate capacitor and the capacitance difference of the second parallel plate capacitor corresponding to when the optical lens moves to different distances in different directions relative to the electronic device on the vertical plane of the optical axis.

7. The method according to claim 1, characterized in that The first camera further includes: a first one-way conducting device and a second one-way conducting device, The first end of the first unidirectional conductive device is connected to the second end of the first switch tube, and the second end is connected to the first end of the first inductor, and the first unidirectional conductive device is conductive from the first end to the second end; The first end of the second unidirectional conductive device is connected to the first end of the first switch tube, and the second end is connected to the first end of the first inductor. The second unidirectional conductive device is conductive from the first end to the second end.

8. The method according to claim 1, characterized in that After starting the first camera, the method further includes: inputting a sinusoidal AC signal for frequency sweeping to a first end of the first parallel plate capacitor and a first end of the second parallel plate capacitor at a first duty cycle; Detecting the capacitance of the first parallel plate capacitor and the second parallel plate capacitor after movement specifically includes: inputting a sinusoidal AC signal for frequency sweeping to the first end of the first parallel plate capacitor and the first end of the second parallel plate capacitor with a second duty cycle, and the second duty cycle is greater than the first duty cycle.

9. A camera module, characterized in that: The camera module comprises: an optical lens, a first parallel plate capacitor and a second parallel plate capacitor, wherein the first parallel plate capacitor and the second parallel plate capacitor both comprise a fixed plate and a movable plate movable on a plane perpendicular to the optical axis of the camera module, the plane where the fixed plate is located and the plane where the movable plate is located both form a non-zero angle with the plane perpendicular to the optical axis, the parallel direction of the first parallel plate capacitor and the parallel direction of the second parallel plate capacitor form a non-zero angle, and the first parallel plate capacitor and the second parallel plate capacitor are arranged on a printed circuit board PCB or a base of the camera module; The camera module further includes: a first inductor, a first resistor, a first switch tube and a second switch tube; the first end of the first switch tube is connected to the second end of the first parallel plate capacitor, the second end of the second switch tube is connected to the second end of the second parallel plate capacitor, the second end of the first switch tube and the first end of the second switch tube are both coupled to the first end of the first inductor, the second end of the first inductor is connected to the first end of the first resistor, and the second end of the first resistor is grounded; The third end of the first switch tube and the third end of the second switch tube are used to receive a pulse width modulation (PWM) voltage signal; The first end of the first parallel plate capacitor and the first end of the second parallel plate capacitor are used to receive a swept frequency sinusoidal AC signal; Among them, when the PWM voltage signal is in the positive half cycle, the first end to the second end of the first switch tube is turned on, and the second end to the first end of the second switch tube is turned off; when the PWM voltage signal is in the negative half cycle, the first end to the second end of the first switch tube is turned off, and the second end to the first end of the second switch tube is turned on.

10. The camera module according to claim 9, characterized in that: The first parallel plate capacitor and the second parallel plate capacitor are disposed at a corner side.

11. The camera module according to claim 9, characterized in that: The first parallel plate capacitor and the second parallel plate capacitor are disposed at adjacent corner sides.

12. The camera module according to claim 11, characterized in that: The parallel direction of the first parallel plate capacitor is perpendicular to the parallel direction of the second parallel plate capacitor.

13. The camera module according to claim 9, characterized in that: The camera module further includes: a first one-way conducting device and a second one-way conducting device, The first end of the first unidirectional conductive device is connected to the second end of the first switch tube, and the second end is connected to the first end of the first inductor, and the first unidirectional conductive device is conductive from the first end to the second end; The first end of the second unidirectional conductive device is connected to the first end of the first switch tube, and the second end is connected to the first end of the first inductor. The second unidirectional conductive device is conductive from the first end to the second end.

14. An electronic device, characterized in that: include: A first camera, a first parallel plate capacitor, a second parallel plate capacitor, a memory, a processor, and a computer program stored in the memory, wherein the first camera comprises an optical lens, the first parallel plate capacitor and the second parallel plate capacitor each comprise a fixed plate and a movable plate movable on a plane perpendicular to the optical axis of the first camera, the plane where the fixed plate and the plane where the movable plate are located both form a non-zero angle with the plane perpendicular to the optical axis, and the parallel direction of the first parallel plate capacitor and the parallel direction of the second parallel plate capacitor form a non-zero angle; The first camera further includes: a first inductor, a first resistor, a first switch tube and a second switch tube; the first end of the first switch tube is connected to the second end of the first parallel plate capacitor, the second end of the second switch tube is connected to the second end of the second parallel plate capacitor, the second end of the first switch tube and the first end of the second switch tube are both coupled to the first end of the first inductor, the second end of the first inductor is connected to the first end of the first resistor, and the second end of the first resistor is grounded; The processor executes the computer program to implement the method according to any one of claims 1 to 8.

15. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

16. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Optical lens anti-shake movement detection device and method, computer readable storage medium, focusing motor, camera module and electronic equipment

    CN118310399A