The method of detecting object proximity
[technical field]
The invention belongs to electronic applications, refer to especially and be applied on electronic installation, for detecting the method and apparatus of object proximity.
[background technology]
Mobile communication equipment of the prior art, as smart mobile phone etc., generally adopts touch-screen.Then, these touch-screen power consumptions are comparatively large, and when user makes a phone call, and easily contact with human body and make some functions on touch-screen by false triggering, thus causing maloperation.Therefore, by installing an optical proximity sensor in the front of mobile communication equipment in prior art, by judging that face to judge to the distance between equipment and to determine to close or open function corresponding on the display of mobile communication equipment touch-screen or touch-screen, to reach the object preventing false touch or power saving.
Refer to shown in Fig. 1, for existing optical proximity sensor is applied to structure on device for mobile communication and operating diagram, wherein this proximity transducer comprises luminescent device 42 (being generally infrared light LED) and a sensor devices 43 (being generally optical sensor), and be arranged with a housing 41 outside luminescent device 42 and sensor devices 43, and housing 41 inside is provided with barrier 411, thus the light preventing luminescent device 42 from launching shines directly on sensor devices 43.In addition, this housing 41 is provided with opening (non-label) at corresponding luminescent device 42 with the position of sensor devices 43, is respectively equipped with lens 48 and 49 in this opening.Moreover, when specifically using, during as being used on mobile phone, above this luminescent device 42 and sensor devices 43, be also coated with a transparent cover plate 40.
The light that luminescent device 42 sends can be divided into three parts, the path of the light of wherein main part as shown in the reference numeral 45, this light is perforated through transparent cover plate 40 and after being radiated at reflecting surface 44 (face as user), reflecting and be irradiated on sensor devices 43 again through reflecting surface 44.The path of the light of Part II as shown in the reference numeral 46, its multiple reflections and being irradiated on sensor devices 43 between the upper surface 410 of housing 41 and the lower surface 401 of transparent cover plate 40.The path of Part III light is as shown in 47, and it is multiple reflections between upper and lower surperficial 400,401 of transparent cover plate 40, finally exposes on sensor devices 43 again.Usual second is referred to as crosstalk (Crosstalk) usually with the light industry of Part III.
For the method whether wherein judgment object (as face) is close, prior art normally sets a threshold value, utilize the numerical value obtained from sensor devices compared with this threshold value, thus whether judgment object is close.The deficiency of this kind of method is the threshold value of above-mentioned setting is fixing, in actual applications, owing to there is crosstalk, the Part II namely shown in Fig. 1 and the light of Part III also can be irradiated on sensor devices, thus the photosensitive value making sensor devices obtain changes, and may cause erroneous judgement.
To above-mentioned problem, the patent No. be 201210139955.6 patent of invention propose a kind of method that threshold value is calibrated, but its process is complicated, can not effectively solve the problem.
Really, industry also has by being provided with the electronic installation of this optical proximity sensor when dispatching from the factory, photosensitive value is now read when there is no reflecting object before this electronic installation, and this photosensitive value is stored in the nonvolatile memory of system software or this electronic installation as noise figure, when real work, the photosensitive value of this optical proximity sensor is deducted this noise figure, compare with a threshold value again with the value obtained, thus judged whether object proximity, the deficiency of this kind of mode is electronic installation need increase by detection noise value operation when factory, thus be unfavorable for the production cost reducing electronic installation.
[summary of the invention]
The object of the present invention is to provide a kind of method detecting object proximity, in order to solve in prior art because stray light causes erroneous judgement or increase the problem of electronic installation production cost.
For achieving the above object, implement the method for detecting object proximity of the present invention, whether closely the device of a detecting object proximity is utilized to detect object, the barrier that the device of this detecting object proximity at least comprises luminescent device, sensor devices and is located between luminescent device and sensor devices, wherein sensor devices comprises first, second, third photosensitive unit, these three photosensitive units are arranged away from barrier linearly and successively, utilize the method following steps of the device detecting object proximity of above-mentioned detecting object proximity:
Receive the photosensitive value of these three photosensitive units;
When the photosensitive value of the 3rd photosensitive unit is greater than the photosensitive value sum of first and second photosensitive unit, the photosensitive value of now first, second, third photosensitive unit is stored, is respectively first, second, third original value;
When the photosensitive value of the second photosensitive unit is greater than the photosensitive value of the 3rd photosensitive unit, the photosensitive value obtaining first, second, third photosensitive unit now stores, and is respectively first, second, third reference value;
First, second, third reference value is deducted first, second, third original value respectively and obtains first, second, third desired value;
First, second, third desired value is weighted and on average obtains an effective value;
By this effective value with preset threshold value compare and judgment object whether close.
According to above-mentioned principal character, wherein first, second, third desired value being weighted is on average undertaken by following formula: 0.5* first object value+0.5* second desired value+0.25* the 3rd desired value.
Compared with prior art, the present invention is by arranging multiple photosensitive unit, afterwards when the photosensitive value of the 3rd photosensitive unit is greater than the photosensitive value sum of first and second photosensitive unit, namely judge now primarily of the photosensitive value that crosstalk produces, now store the photosensitive value of three photosensitive units, afterwards when the photosensitive value of the second photosensitive unit is greater than the photosensitive value of the 3rd photosensitive unit, then be judged as effective reflection, be preset with one again compared with threshold value after afterwards the photosensitive value of three photosensitive units being processed, to have judged whether object proximity, so using the electronic equipment of the device of this detecting object proximity can automatic decision processing when starting shooting, need not process especially when electronic equipment dispatches from the factory, thus effectively can reduce the impact of crosstalk, thus judge more accurately.
[accompanying drawing explanation]
Fig. 1 is that existing optical proximity sensor is applied to structure on device for mobile communication and operating diagram.
Fig. 2 is the structural representation of the device of the detecting object proximity of the method implementing detecting object proximity of the present invention.
Fig. 3 is the schematic flow sheet of the method implementing detecting object proximity of the present invention.
[embodiment]
Refer to shown in Fig. 2, for implementing the structural representation of the device of the detecting object proximity of the method for detecting object proximity of the present invention, the barrier 12 that the device wherein implementing detecting object proximity of the present invention at least comprises luminescent device 10, sensor devices 11 and is located between luminescent device 10 and sensor devices 11, wherein sensor devices 11 comprises three photosensitive units, be respectively first, second, third photosensitive unit 110,111,112, linearly and arrange away from barrier 12 successively.
In addition, above luminescent device 10, sensor devices 11 and barrier 12, a glass cover-plate 13 is provided with.In addition, in the specific implementation, can also arrange some optical lenses above luminescent device 10 and sensor devices 11, its structure and working principle all has announcement in the prior art, no longer describes in detail herein.
When real work, when the no reflection events face, device front 14 (i.e. object) of this survey object proximity, the now light mainly crosstalk (Part II namely described in background technology and Part III light) that receives of first, second, third photosensitive unit 110,111,112.Now crosstalk is mainly radiated on the 3rd photosensitive unit 112, so when the photosensitive value of the 3rd photosensitive unit 112 is greater than the photosensitive value sum of first and second photosensitive unit 110,111, namely judges now primarily of the photosensitive value that stray light produces.And when device 1 front of this survey object proximity has reflecting surface 14 (i.e. object), the light that then luminescent device 10 is launched then is radiated on first and second photosensitive unit 110,111 after reflecting surface 14 reflects, when the photosensitive value of the second photosensitive unit 111 is greater than the photosensitive value of the 3rd photosensitive unit 112, then be judged as effective reflection, so just judge whether object proximity by method described below.
Refer to shown in Fig. 3, for implementing the schematic flow sheet of the method for detecting object proximity of the present invention, the method comprises the steps:
Receive photosensitive value A0, B0, C0 of this first, second, third photosensitive unit 110,111,112;
When the photosensitive value C0 of the 3rd photosensitive unit 112 is greater than photosensitive value A0, B0 sum of first and second photosensitive unit 110,111, photosensitive value A0, B0, C0 of now first, second, third photosensitive unit 110,111,112 are stored, is respectively first, second, third original value A0, B0, C0;
When the photosensitive value of the second photosensitive unit 111 is greater than the photosensitive value of the 3rd photosensitive unit 112, photosensitive value A1, B1, C1 of obtaining first, second, third photosensitive unit 110,111,112 now store, and are respectively first, second, third reference value A 1, B1, C1;
First, second, third reference value A 1, B1, C1 are deducted first, second, third original value A0, B0, C0 respectively and obtain first, second, third desired value A2, B2, C2;
First, second, third desired value A2, B2, C2 are weighted and on average obtain an effective value;
This effective value and the threshold value preset are compared, whether judgment object is close afterwards.
Wherein first, second, third desired value being weighted is on average undertaken by following formula: 0.5* first object value A2+0.5* second desired value B2+0.25* the 3rd desired value C2.
In concrete enforcement, the device of this detecting object proximity is a single chip, is all packaged together by luminescent device and multiple photosensitive unit.And in reality is implemented, the plurality of photosensitive unit is an optic sensor array, and each photosensitive unit can be row or a multiple row of this optic sensor array, as this optic sensor array has 6 row, in a second embodiment, can arrange as the first photosensitive unit with the 2nd using the 1st row, the 3rd row arrange as the second photosensitive unit with the 4th, and the 5th row arrange as the 3rd photosensitive unit with the 6th.Also interval can be formed between certain photosensitive unit.Undertaken processing by the photosensitive value of the related column using reading afterwards and as the photosensitive value of corresponding photosensitive unit.
Compared with prior art, the present invention is by arranging multiple photosensitive unit, afterwards when the photosensitive value of the 3rd photosensitive unit is greater than the photosensitive value sum of first and second photosensitive unit, namely judge now primarily of the photosensitive value that crosstalk produces, now store the photosensitive value of three photosensitive units, afterwards when the photosensitive value of the second photosensitive unit is greater than the photosensitive value of the 3rd photosensitive unit, then be judged as effective reflection, be preset with one again compared with threshold value after afterwards the photosensitive value of three photosensitive units being processed, to have judged whether object proximity, so can automatic decision processing when the electronic equipment start using the device of this detecting object proximity, need not process especially when electronic equipment dispatches from the factory, thus effectively can reduce the impact of stray light, thus judge more accurately.
Be understandable that, for those of ordinary skills, can be equal to according to technical scheme of the present invention and inventive concept thereof and replace or change, and all these change or replace the protection domain that all should belong to the claim appended by the present invention.