Lens module and electronic device having the same

A lens module for autofocus of a camera in passive mode includes a lens barrel containing a first lens, a second lens, a pressure sensor, an image sensor, and a processor. In the passive autofocus mode, the first lens is located at a first end of the lens barrel and moves within the lens barrel when a distance to a target object changes. The pressure sensor between the first and the second lenses senses both pulling and pushing pressures which the first lens applies. The image sensor is adjacent to an end of the lens barrel and is behind the first and second lenses. The processor can apply formulas to calculate a distance between the target object and the lens module.

FIELD

The subject matter herein generally relates to a lens module and an electronic device having the lens module.

BACKGROUND

Many image capturing devices (such as cameras and cell phones) employ autofocus systems which can focus on selected points or areas. The autofocus system can be switched between an active autofocus mode and a passive autofocus mode. When the autofocus optical system is under the active autofocus mode, the autofocus system sends some form of energy towards the target object, analyses the reflection to determine a distance between the target object and the active autofocus system, and adjusts the lens according to the distance. When the autofocus optical system is under the passive autofocus mode, the autofocus system analyses the image of the target object without sending any energy towards object.

Thus, the image capturing device can determine the distance between the target object and the autofocus system only when the autofocus optical system is under the active autofocus mode. However, the autofocus system is under the active autofocus mode when the image capturing device is located in an environment with a low illumination. That is, the image capturing device cannot determine the distance between the target object and the autofocus system when the image capturing device is located in an environment with a high illumination.

DETAILED DESCRIPTION

FIGS. 1 and 2illustrate an exemplary embodiment of a lens module100applied in an electronic device1. The electronic device1can be a camera, a tablet computer, or a smart phone.

The lens module100comprises a lens barrel10, a first lens20, a second lens30, a pressure sensor40, an image sensor50, a distance detector60, and a processor70.

The first lens20, the second lens30, the pressure sensor40, the image sensor50, and the processor70are mounted inside the lens barrel10. The lens barrel10has a first end11, closest to a subject to be photographed, a second end12opposite to the first end11, and an optical axis13passing through the first end11and the second end12. The first lens20is located at a first end of the lens barrel10. The image sensor50is located at the second end12of the lens barrel10. The second lens30is positioned between the first lens20and the image sensor50. The pressure sensor40is positioned between the first lens20and the second lens30. The distance detector60is located outside the lens barrel10and mounted to the first end11of the lens barrel10. In at least one embodiment, the image sensor50is a complementary metal oxide semiconductor (CMOS) or a charge-coupled device (CCD).

The lens module100can be manually or automatically switched between an active autofocus function and a passive autofocus function. When the lens module100is in an environment with a low ambient illumination, the lens module100is switched to an active autofocus mode. When the lens module100is under the active autofocus mode, the lens module100sends some form of energy towards a target object2(shown inFIGS. 3 and 4), analyses the reflection to determine a distance between the target object2and the lens module100, and adjusts the first lens20according to the determined distance (that is, the active autofocus function). When the lens module100is in an environment with a high ambient illumination, the lens module100is switched to a passive autofocus mode. When the lens module100is under the passive autofocus module, the lens module100analyses an image resolution of an image of the target object2formed in the image sensor50without sending any energy towards the target object2, and adjusts the first lens20according to the image resolution (that is, the passive autofocus function).

In at least one exemplary embodiment, the lens module100is automatically switched between the active autofocus function and the passive autofocus function. The electronic device1further comprises an illumination sensor200. The illumination sensor200periodically detects an ambient illumination of the environment in which the electronic device1is located. The illumination sensor200can be a photosensitive diode, a photosensitive triode, or a photosensitive resistor. The detection of the ambient illumination implemented by the photosensitive diode, the photosensitive triode, or the photosensitive resistor is a well known technique, thus a detailed description is omitted. When the detected ambient illumination is greater than a default threshold, the electronic device1controls the lens module100to switch to the passive autofocus mode. When the detected ambient illumination is less than or equal to the default threshold, the electronic device1controls the lens module100to switch to the active autofocus mode. In at least one embodiment, the default threshold, usually preset before the electronic device1is put on the market, is of about 20 candela.

In other exemplary embodiments, the lens module100is manually switched between the active autofocus function and the passive autofocus function, and the illumination sensor200is omitted. The electronic device1may further comprise a button (not shown) for controlling the lens module100to switch between the passive autofocus mode and the active autofocus module. The button can be a virtual button or a mechanical button.

FIG. 3illustrates that when the lens module100is under the passive autofocus mode, the first lens20moves within the lens barrel10when distance between a target object2and the lens module100is changed (that is, when the target object2moves towards or away from the lens module100). The lens module100is thus enabled to focus on the target object2and to perform the passive autofocus function.

As shown inFIG. 2, the pressure sensor40senses a pressure, such as the pressure the first lens20applies to the pressure sensor40through the expansion or contraction of an elastic member21as the first lens20moves away or toward the pressure sensor40.

As previously mentioned, in at least one embodiment, the first lens20is connected to the pressure sensor40by the elastic member21such as a coiled spring. The elastic member21is elastically deformed when the first lens20moves, thereby applying pressure to the pressure sensor40. More specifically, the elastic member21is in a natural state when the first lens20is in an original position. When the first lens20moves towards the target object2, the elastic member21applies a pulling pressure to the pressure sensor40. When the first lens20moves away from the target object2, the elastic member21applies a pushing pressure to the pressure sensor40.

The processor70calculates a moving distance ΔD2of the first lens20according to a pressure value of the sensed pressure. In at least one embodiment, the pressure value is proportional to the moving distance ΔD2of the first lens20.

The processor70further calculates a moving distance ΔD1of the target object2according to the moving distance ΔD2of the first lens20, and then calculates a distance D between the target object2and the lens module100according to the moving distance ΔD1of the target object2. In at least one embodiment, before the target object2moves towards or away from the lens module100, a distance between the target object2and the first lens20is defined as an original target object distance equaling u. A distance between the image sensor50and the first lens20is defined as an original image distance equaling v, and the focal length of the first lens20equals f. Then, the processor70can calculate the original target object distance u according to the original image distance v and the focal length f based on the function,

1u=1v+1f.
After the target object2moves towards or away from the lens module100, the moving distance ΔD1of the target object2can be calculated according to the original target object distance u, the original image distance v, the focal length f, and the moving distance ΔD2of the first lens20based on the function,

1u-Δ⁢⁢D1=1v-Δ⁢⁢D2+1f.
Then, the distance D between the target object2and the lens module100can approximately be calculated according to the original target object distance u and the moving distance ΔD1of the target object2based on the function, D=u-ΔD1.

With the above configuration, when the lens module100is in an environment with a high ambient illumination and is switched to the passive autofocus mode, the lens module100can also determine the distance D between the target object2and the lens module100.

FIG. 4illustrates that when the lens module100is under the active autofocus mode, the distance detector60detects the distance between the target object2and the lens module100, thereby allowing the lens module100to focus on the target object2and to perform the active autofocus function. In at least one embodiment, the distance detector60is an infrared detector or an ultrasonic detector.