Method for proximity sensing and applied electronic device thereof
11699996 · 2023-07-11
Assignee
Inventors
- Wang-An Lin (Jhubei, TW)
- Ming-Che Yang (Jhubei, TW)
- Kai Fan Hsieh (Jhubei, TW)
- Chung-Jung Wu (Jhubei, TW)
Cpc classification
H03K2217/960705
ELECTRICITY
G06F3/011
PHYSICS
International classification
G06F1/00
PHYSICS
G01R27/26
PHYSICS
G01V3/08
PHYSICS
Abstract
The present invention is related to a method for proximity sensing and an applied electronic device thereof. The present invention provides that a movement signal is generated according to a detection data, a move baseline data and a move threshold and cooperated with a proximity signal for generating a judgement signal to judge if the human body or the object body is close to the electronic device.
Claims
1. A proximity sensing method, comprising: generating a move baseline data according to a detection data; generating a movement signal according to the detection data, the move baseline data and a move threshold; generating a proximity baseline data according to the detection data; generating a proximity signal according to the detection data, the proximity baseline data and a proximity threshold; and generating a judging signal according to the movement signal and the proximity signal, the judging signal indicating an object proximity or a human body proximity.
2. The proximity sensing method of claim 1, further comprising: comparing a plurality of values of the detection data with a plurality of values of the move baseline data to generate a plurality of difference values; and judging if the difference values are greater than the move threshold, and generating the movement signal.
3. The proximity sensing method of claim 2, further comprising: setting a plurality of instruction data, the instruction data corresponding to the difference values, wherein when the difference value is greater than the move threshold, setting the corresponding instruction data as a valid data and generating the movement signal according to the valid data; when the difference value is less than the move threshold, setting the corresponding instruction data as an invalid data.
4. The proximity sensing method of claim 3, further comprising: comparing an amount of the valid data with a valid threshold, wherein when the amount of the valid data is arrived the valid threshold, setting the movement signal as valid; when the amount of the valid data is less than the valid threshold, setting the movement signal as invalid.
5. The proximity sensing method of claim 4, further comprising: comparing an amount of the instruction data with a reset threshold, wherein when the amount of the instruction data is arrived the reset threshold, resetting the amount of the instruction data and the amount of the valid data.
6. The proximity sensing method of claim 4, further comprising: comparing an amount of the instruction data with a deletion threshold, wherein when the amount of the instruction data exceeds the deletion threshold, deleting the foremost one instruction data.
7. The proximity sensing method of claim 2, further comprising: comparing a n.sup.th value of the detection data with a n−1.sup.th value of the move baseline data to generate a n.sup.th difference value of the difference values, wherein when the n.sup.th difference value is greater than the move threshold, setting the n.sup.th value of the detection data as an n.sup.th value of the move baseline data, and comparing a n+1.sup.th value of the detection data with the n.sup.th value of the move baseline data to generate a n+1.sup.th difference value of the difference values as well as generating a n+1.sup.th value of the move baseline data according to the n+1.sup.th value of the detection data and the n.sup.th value of the move baseline data, wherein n is a positive integer and greater than 1.
8. The proximity sensing method of claim 7, further comprising: generating the n−1.sup.th value of the move baseline data according to a n−1.sup.th value of the detection data and a n−2.sup.th value of the move baseline data, wherein n is greater than 2.
9. The proximity sensing method of claim 1, further comprising: comparing a current value of the detection data with a former value of the proximity baseline data to generate a difference value; and judging if the difference value is greater than the proximity threshold, and generating the proximity signal.
10. The proximity sensing method of claim 9, wherein when the difference value is greater than the proximity threshold, maintain a current value of the proximity baseline data; when the difference value is less than the proximity threshold, generating the current value of the proximity baseline data according to the current value of the detection data and the former value of the proximity baseline data.
11. The proximity sensing method of claim 1, wherein when the movement signal is valid, the judging signal indicates a human body proximity; when the movement signal is invalid, the judging signal indicates an object proximity.
12. An electronic device, comprising: a detection circuit, generating a detection data; a move detecting circuit, coupled to the detection circuit, generating a move baseline data according to the detection data, and generating a movement signal according to the detection data, the move baseline data and a move threshold; a baseline processing circuit, coupled to the detection circuit and generating a proximity baseline data according to the detection data; and a proximity detecting circuit, coupled to the detection circuit, generating a proximity signal according to the detection data, the proximity baseline data and a proximity threshold, and generating a judging signal according to the movement signal and the proximity signal, wherein the judging signal indicates an object proximity or a human body proximity.
13. The electronic device of claim 12, wherein the move detecting circuit compares a plurality of values of the detection data with a plurality of values of the move baseline data to generate a plurality of difference values, and respectively judges if the difference values are greater than the move threshold, and generating the movement signal.
14. The electronic device of claim 13, wherein the move detecting circuit sets a plurality of instruction data, the instruction data are corresponding to the difference values, when the difference value is greater than the move threshold, setting the corresponding instruction data as a valid data and generating the movement signal according to the valid data; when the difference value is less than the move threshold, setting the corresponding instruction data as an invalid data.
15. The electronic device of claim 14, wherein the move detecting circuit compares an amount of the valid data with a valid threshold, when the amount of the valid data is arrived the valid threshold, the movement signal is set as valid; when the amount of the valid data is less than the valid threshold, the movement signal is set as invalid.
16. The electronic device of claim 15, wherein the move detecting circuit compares an amount of the instruction data with a reset threshold, when the amount of the instruction data is arrived the reset threshold, the move detecting circuit resets the amount of the instruction data and the amount of the valid data.
17. The electronic device of claim 15, wherein the move detecting circuit compares an amount of the instruction data with a deletion threshold, when the amount of the instruction data is greater than the deletion threshold, the move detecting circuit deletes the foremost one of the instruction data.
18. The electronic device of claim 13, wherein the move detecting circuit compares a n.sup.th value of the detection data with a n−1.sup.th value of the move baseline data to generate a n.sup.th difference value of the difference values, wherein when the n.sup.th difference value is greater than the move threshold, the n.sup.th value of the detection data is set as a n.sup.th value of the move baseline data, and a n+1.sup.th value of the detection data is compared with the n.sup.th value of the move baseline data to generate a n+1.sup.th difference value of the difference values, a n+1.sup.th value of the move baseline data is generated according to the n+1.sup.th value of the detection data and the n.sup.th value of the move baseline data, where n is a positive integer and greater than 1.
19. The electronic device of claim 18, wherein the move detecting circuit further generates the n−1.sup.th value of the move baseline data according to a n−1.sup.th value of the detection data and a n−2.sup.th value of the move baseline data.
20. The electronic device of claim 12, wherein the proximity detecting circuit comparing a current value of the detection data with a former value of the proximity baseline data to generate a difference value, judging if the difference value is greater than the proximity threshold, and generating the proximity signal.
21. The electronic device of claim 20, wherein when the difference value is greater than the proximity threshold, the baseline processing circuit maintains a current value of the proximity baseline data; when the difference value is less than the proximity threshold, the baseline processing circuit generates a current value of the proximity baseline data according to the current value of the detection data and the former value of the proximity baseline data.
22. The electronic device of claim 12, wherein when the movement signal is valid, the judging signal indicates the human body proximity; when the movement signal is invalid, the judging signal indicates the object proximity.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
DETAILED DESCRIPTION
(7) Since in the conventional proximity detection mechanism, it is impossible to judge whether the object proximity is occurred or not, and the problem of power reduction occurs under the object proximity. Therefore, the present invention is to provide a proximity sensing method and an applied electronic device thereof, which may simultaneously generate a movement signal and a proximity signal to recognize that the human body is approaching and reduce the power in response, and to avoid the problem of reducing power when an object is approaching.
(8) Certain words are used in the invention description and claims to refer to specific components. However, the person having ordinary skill in the art should understand that manufacturers may use different terms to refer to the same element; the present invention description and claims do not use different names as the manner to distinguish components; instead, we use the overall technical difference of the components as the distinguishing criterion. The “comprises/include” mentioned in the entire invention description and claims is an open term, which should be interpreted as “comprise/include but not limited to”. Furthermore, the term “coupled to” includes the direct and indirect connection means. Therefore, if a first device is coupled to a second device, it means that the first device may be directly connected to the second device, or it may be indirectly connected to the second device through other devices or other connecting means.
(9) Thereinafter we will further interpret a proximity sensing method and the characteristics and structures of its electronic device in a proximity sensing method disclosed in the present invention.
(10) First, refer to
(11) Refer to
(12) The move detecting circuit 18 generates the movement signal FLAG according to the detection data RAW, the move baseline data MOVE_BASE, and a move threshold MOVE_THD; the aforesaid proximity detecting circuit 20 generates a proximity signal PROX according to the detection data RAW, the baseline data BASELINE, and a proximity threshold PROX_THD; the proximity signal PROX may indicate the condition of a human body proximity or an object proximity of the electronic device. In an embodiment of the present invention, the value of the proximity signal PROX indicated as 1 to express the condition of a human body proximity or an object proximity of the electronic device. But, the present invention isn't limited to this embodiment. The value of the proximity signal PROX also may be indicated as 0 to express the condition of a human body proximity or an object proximity of the electronic device. In an embodiment of the present invention, the proximity detecting circuit 20 may further generate the human body identifying signal HUM for judging if a human body proximity is occurred, and generate the object identifying signal OBJ for judging if an object proximity is occurred. But, this application isn't limited to this embodiment; the embodiment may work with the proximity signal PROX and only using the human body identifying signal HUM or the object identifying signal OBJ to judge whether the human body proximity or the object proximity. Further, the embodiment may work with the proximity signal PROX and using the human body identifying signal HUM and the object identifying signal OBJ to judge whether the human body proximity or the object proximity. If the human body identifying signal HUM and the object identifying signal OBJ are disabled, it expresses that there is no proximity event. In addition, the proximity detecting circuit 20 may judge if the proximity signal PROX is valid, if judging to not valid, it expresses that the electronic device has no human body proximity nor object proximity. The following examples illustrate the proximity detection method of the present invention in detail.
(13) Refer to
(14) Refer to
(15) Next to Step S40; the move detecting circuit 18 judges if the difference value Q generated in Step S30 is greater than the move threshold MOVE_THD. Where the move threshold MOVE_THD is shown in
(16) For example, when the second difference value Q is greater than the move threshold MOVE_THD, the second value of the detection data RAW is used as the second value of the move baseline data MOVE_BASE. When the third difference value Q is greater than the move threshold MOVE_THD, the third value of the detection data RAW is used as the third value of the move baseline data MOVE_BASE. When the difference value Q is smaller than the move threshold MOVE_THD, executing Step S44. The instruction data I (the n.sup.th instruction data) is generated and the instruction data I (the n.sup.th instruction data) is set as an invalid data. Execute Step S46, when the n.sup.th difference value Q is greater than the move threshold MOVE_THD, the move detecting circuit 18 generates the instruction data I (the n.sup.th instruction data) and sets the instruction data I (the n.sup.th instruction data) as a valid data.
(17) Refer to
(18) Continue to above, the move detecting circuit 18 set the default total amount of the instruction data I in the default accumulative data P as the reset threshold, and judge if the total amount of the instruction data I have been reached the reset threshold of the default accumulative data P. When the move detecting circuit 18 judges that the first amount NUM1 fails to arrive the reset threshold of the default accumulative data P, next to Step S10 and continuously inputting the detection data RAW to the move detecting circuit 18, and continuous accumulating the number of the instruction data I (the first amount NUM1) for reaching the reset threshold of the default accumulative data P. For example, the reset threshold of the default accumulative data P is set to 30 instruction data, when the amount of instruction data is less than 30, return to Step S10; until the amount of instruction data arrives 30. When the move detecting circuit 18 judges that the amount of the instruction data I has met the reset threshold of the default accumulative data P, go to Step S62; the movement signal FLAG is set as invalid, for example, set the value of the movement signal FLAG is set to 0 and go to Step S64, to reset the amount of the instruction data I and the valid data thereof, and go to Step S80.
(19) Refer to
(20) Execute Step S120 above, that is, no matter whether or not the movement signal FLAG has been generated, the current value of the detection data RAW should be compared with the former value of the proximity baseline data Baseline to generate the difference value Q, the baseline generating circuit 22 generates the proximity baseline data BASELINE according to the detection data RAW. For example, the n−1.sup.th value of the proximity baseline data BASELINE is generated according to the n.sup.th value of the detection data RAW; the n.sup.th value of the proximity baseline data BASELINE is generated according to the n+1.sup.th value of the detection data RAW. The proximity baseline data BASELINE may be expressed as Baseline data [n]=G*Raw[n]+(1−G)* Baseline [n−1], wherein G is a parameter, G is positive value and less than 1, and may be set according to the requirements. While executing Step S120, the move detecting circuit 18 compares a plurality of values of the detection data RAW with a plurality of values of the proximity baseline data BASELINE to generate a plurality of difference value Q. For example, the current value (n.sup.th) of the detection data RAW is compared with the former value (n−1.sup.th) of the proximity baseline data BASELINE to generate the n.sup.th difference value Q; and the next value (n+1.sup.th) of the detection data RAW is compared with the current value (n.sup.th) of the proximity baseline data BASELINE to generate the n+1.sup.th difference value Q. That is, a plurality of the difference value Q are generated according to the proximity baseline data BASELINE. Next to Step S122, the difference value Q generated in Step S120 is compared with the proximity threshold PROX_THD to judge if the difference value Q is greater than the proximity threshold PROX_THD; if judging to yes, go to Step S124; else, go to Step S126.
(21) Continue to above, executing Step S124, the proximity detecting circuit 20 generates the proximity signal PROX, in meanwhile, go to Step S125, maintaining the proximity baseline data BASELINE. Executing Step S126, the proximity signal PROX won't be generated. Executing Step S127, the proximity detecting circuit 20 corrects the proximity baseline data BASELINE according to the detection data RAW and the proximity baseline data BASELINE, that is, the proximity baseline data BASELINE is modified according to the formula Baseline [n]=G*Raw[n]+(1−G)* Baseline [n−1] and the modified value is set as the current value (n.sup.th) of the proximity baseline data BASELINE.
(22) Refer to
(23) In Step S44 and Step S46 of the above embodiment, except the above-mentioned accumulative method, the move detecting circuit 18 may directly count the number of the cases that the difference values Q generated by the Step S30 are greater than the move threshold MOVE_THD, and also count the number of the results in that the difference values Q generated by the Step S30 are less than the move threshold MOVE_THD; and make statistics on the results that the difference values generated by the Step S30 are greater or less than the move threshold MOVE_THD, which will be equivalent to use counter counting the number of the results in that the difference values are greater or less than the move threshold MOVE_THD, for judging if the movement signal FLAG is generated.
(24) Except for the aforesaid embodiment, the proximity sensing method disclosed in the present invention may ignore to accumulate the instruction data I and buffer the instruction data; and will eliminate the earliest instruction data to perform the shifting.
(25) As shown in
(26) Step S210 to Step S248 are identical to mentioned Step S10 to Step S48, hereby, the detailed description won't be repeated. Execute Step S250, judging if the amount of the instruction data I accumulated in Step S248 is greater than the deletion threshold of the default accumulative data P. If judging that the amount is greater than the deletion threshold of the default accumulative data P, next to Step S255; If judging that the amount is less than the deletion threshold of the default accumulative data P, next to Step S260. Executing Step S255, for a plurality of buffered instruction data I, when the n.sup.th instruction data I is equal to the deletion threshold and the move detecting circuit 18 adds an n+1.sup.th instruction data I, the move detecting circuit 18 will delete the foremost one instruction data; for example, if the deletion threshold is 30 instruction data; when the move detecting circuit 18 adds the 31.sup.st instruction data, the move detecting circuit 18 will delete the 1.sup.stt instruction data, which is equivalent to shift the buffered instruction data I. Step S260 is equivalent to the executing manner of Step S50. However, while judged to be yes, go to Step S262; while judged to be no, go to Step S264. Step S262 is equivalent to Step S52, Step S264 is equivalent to Step S62, and Step S290 to Step S310 is equivalent to Step S90 to Step S110, hereby, the detailed description won't be repeated.
(27) In summary, in the present invention, the method for proximity sensing and the applied electronic device thereof, generate a move baseline data according to a detection data. A movement signal is generated according to the detection data, the move baseline data and a move threshold. A judging signal is generated according to the movement signal and a proximity signal. The judging signal indicates an object proximity or a human body proximity. Thus, the power reduction is prevented in the circumstance of the object proximity.
(28) Those skilled in the art will readily observe that numerous modifications and alterations of the circuit and structure may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.