TWI582452B - Adjustment method and proximity sensor - Google Patents

Adjustment method and proximity sensor Download PDF

Info

Publication number
TWI582452B
TWI582452B TW105100461A TW105100461A TWI582452B TW I582452 B TWI582452 B TW I582452B TW 105100461 A TW105100461 A TW 105100461A TW 105100461 A TW105100461 A TW 105100461A TW I582452 B TWI582452 B TW I582452B
Authority
TW
Taiwan
Prior art keywords
gain
proximity sensor
light
analog signal
tested
Prior art date
Application number
TW105100461A
Other languages
Chinese (zh)
Other versions
TW201725400A (en
Inventor
閻慶芳
張凱琳
賴哲恒
鄭智元
徐曉陽
Original Assignee
聯笙電子股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 聯笙電子股份有限公司 filed Critical 聯笙電子股份有限公司
Priority to TW105100461A priority Critical patent/TWI582452B/en
Application granted granted Critical
Publication of TWI582452B publication Critical patent/TWI582452B/en
Publication of TW201725400A publication Critical patent/TW201725400A/en

Links

Landscapes

  • Geophysics And Detection Of Objects (AREA)
  • Optical Radar Systems And Details Thereof (AREA)
  • Measurement Of Optical Distance (AREA)

Description

調整方法及其接近感測器Adjustment method and its proximity sensor

本發明係指一種調整方法及接近感測器,尤指一種透過漸進式測試,可自動調整接近感測器參數之調整方法及接近感測器。The invention relates to an adjustment method and a proximity sensor, in particular to an adjustment method for automatically adjusting the proximity sensor parameters and a proximity sensor through a progressive test.

隨著感測技術的演進,越來越多的電子裝置配備感測器來實現更多樣的功能。舉例來說,智慧型手機、平板電腦等手持式裝置配備接近感測器(Proximity Sensor),當使用者要接聽電話時,接近感測器自動偵測靠近手機之物體,螢幕隨後關閉顯示及觸控功能。如此一來,智慧型手機不僅可節省顯示面板的耗電,延長電池使用時間,也能避免不必要的誤觸。當手機離開使用者耳朵到一定距離時,螢幕會再次亮起,觸控功能亦將再次啟動。又例如,液晶電視、電腦螢幕或一體成型(All in One,AIO)電腦配備長距離感測器(Long Distance Proximity Sensor),用來偵測人員出缺席、手勢或體感操控,例如無接觸式自動開關、主動式喇叭音量調整、鍵盤背光源控制等應用。使用者一旦離開機器,螢幕會自動關閉來節約電源,重新接近機器則螢幕重新開啟。With the evolution of sensing technology, more and more electronic devices are equipped with sensors to achieve more functions. For example, handheld devices such as smart phones and tablets are equipped with Proximity Sensors. When the user wants to answer the call, the proximity sensor automatically detects the object close to the mobile phone, and the screen then turns off the display and touch. Control function. In this way, the smart phone not only saves the power consumption of the display panel, prolongs the battery life, but also avoids unnecessary misuse. When the phone opens the user's ear to a certain distance, the screen will light up again and the touch function will start again. For example, an LCD TV, a computer screen, or an All in One (AIO) computer equipped with a Long Distance Proximity Sensor is used to detect absenteeism, gestures, or body manipulation, such as contactless Automatic switch, active speaker volume adjustment, keyboard backlight control and other applications. Once the user opens the machine, the screen will automatically turn off, save power, and re-approach the machine and the screen will turn back on.

然而,隨著感測器的應用面愈趨廣泛,仍需面對諸多接近感測器的非理想效應,例如接近感測器偵測時,待測物的表面特性與接近感測器的機構外形會影響感測準確度。又例如,接近感測器如欲偵測較長的距離時,必需提高發光元件的驅動能力或是提高讀取電路增益的設定,形同增加了感測器電路複雜度與耗電。However, as the application surface of the sensor becomes more and more extensive, there are still many non-ideal effects of proximity sensors, such as the surface characteristics of the object to be tested and the mechanism of proximity to the sensor when the sensor is detected. Shape will affect the accuracy of the sensing. For example, when the proximity sensor is to detect a long distance, it is necessary to increase the driving capability of the light-emitting element or increase the setting of the gain of the capture circuit, which increases the complexity and power consumption of the sensor circuit.

因此,如何讓系統廠商快速地調整接近感測器參數,使系統廠商能兼顧於短距離與長距離的應用,並克服非理想待測物帶來的變異,已成為接近感測器製造商的主要課題。Therefore, how to enable system manufacturers to quickly adjust the proximity sensor parameters, so that system manufacturers can take into account the application of short-range and long-distance ,, and overcome the variation caused by non-ideal test objects, has become a proximity sensor manufacturer The main topic.

因此,本發明之主要目的即在於提供一種調整方法及相關的接近感測器。Accordingly, it is a primary object of the present invention to provide an adjustment method and associated proximity sensor.

本發明揭露一種調整方法,用來根據一待測物距離,調整一接近感測器之一增益及一發射週期。該待測物距離係該接近感測器與一待測物之距離。該調整方法包含有:一第一步驟,以根據該發射週期,朝該待測物發射一發射光;一第二步驟,以接收該發射光從該待測物反射之一反射光;一第三步驟,以轉換該反射光為一第一類比信號;一第四步驟,以根據一搜尋方法,從複數個指數中,選擇一指數M;一第五步驟,以設定該增益為2 M;一第六步驟,以根據該增益,放大該第一類比信號為一第二類比信號;以及一第七步驟,以轉換該第二類比信號為一數位值;其中該第一步驟至該第七步驟係重複地執行,直到該數位值對應於該待測物距離。 The invention discloses an adjustment method for adjusting a gain of a proximity sensor and a transmission period according to a distance of a sample to be tested. The distance of the object to be tested is the distance between the proximity sensor and an object to be tested. The adjusting method includes: a first step of: emitting a light toward the object to be tested according to the emission period; and a second step of receiving the reflected light to reflect light from the object to be tested; a third step of converting the reflected light into a first analog signal; a fourth step of selecting an index M from the plurality of indices according to a search method; a fifth step to set the gain to be 2 M ; a sixth step of: amplifying the first analog signal as a second analog signal according to the gain; and a seventh step of converting the second analog signal to a digital value; wherein the first step to the seventh The steps are performed repeatedly until the digital value corresponds to the distance of the object to be tested.

本發明另揭露一種接近感測器。該接近感測器距離一待測物一待測物距離。該接近感測器包含有一光發射器,用來根據一發射週期,朝該待測物發射一發射光;一光感測器,用來接收該發射光從該待測物反射之一反射光,並轉換該反射光為一第一類比信號;一讀取電路,用來根據一搜尋方法,從複數個指數中,選擇一指數M、設定一增益為2 M並根據該增益並放大該第一類比信號為一第二類比信號;一類比數位轉換器,用來轉換該第二類比信號為一數位值;以及一邏輯控制單元,用來解讀該數位值是否對應於該待測物距離。該邏輯控制單元另用來控制該光發射器、該光感測器、該讀取電路及該類比數位轉換器重複執行其功能,直到該數位值對應於該待測物距離。 The invention further discloses a proximity sensor. The proximity sensor is a distance from a test object to a test object. The proximity sensor includes a light emitter for emitting a light toward the object to be tested according to a period of emission, and a light sensor for receiving the light reflected from the object to be detected. And converting the reflected light into a first analog signal; a reading circuit for selecting an index M from the plurality of indices according to a search method, setting a gain to 2 M and amplifying the first according to the gain The analog signal is a second analog signal; an analog digital converter is used to convert the second analog signal into a digital value; and a logic control unit is configured to interpret whether the digital value corresponds to the distance of the object to be tested. The logic control unit is further configured to control the light emitter, the light sensor, the read circuit, and the analog digital converter to repeatedly perform their functions until the digital value corresponds to the object distance.

根據上述實施例,本發明透過漸進式的可程式化偵測流程,快速地根據不同的應用環境,調整接近感測器的參數,可大幅降低製造商的生產流程。According to the above embodiment, the invention can quickly adjust the parameters of the proximity sensor according to different application environments through the progressive programmable detection process, which can greatly reduce the manufacturer's production process.

請參考第1圖,第1圖為本發明實施例一接近感測器(Proximity Sensor)10之示意圖。接近感測器10用來偵測一待測物距離DST外是否有存在一待測物100,其包含有一光發射器102、一光感測器104、一讀取電路106、一類比數位轉換器(Analog-to-Digital Converter,ADC)108及一邏輯控制單元110。光發射器102用來根據一發射週期,朝待測物100發射一發射光Ltx。待測物100反射發射光Ltx,並產生一反射光Lrf(過程穿透一半透明機構件120)。光感測器104用來接收反射光Lrf,並轉換反射光Lrf為一第一類比信號A1。讀取電路106用來根據一種搜尋方法,從多個指數M1、M2…MN中,選擇一個指數M,並隨之設定一增益為2 M。讀取電路106再根據增益2 M,放大第一類比信號A1為一第二類比信號A2。類比數位轉換器108用來轉換第二類比信號A2為一數位值DV。邏輯控制單元110用來解讀數位值DV是否對應於待測物距離DST,例如數位值「1010」對應於待測物距離10公分。待測物距離DST亦可能是一範圍,例如8~12公分,而不限定為單一固定值。若數位值DV對應於待測物距離DST,此時的增益2 M即為本發明實施例欲獲得之參數。若數位值DV未對應於待測物距離DST,邏輯控制單元110控制光發射器102、光感測器104、讀取電路106及類比數位轉換器108執行下一輪的測試,直到數位值DV符合待測物距離DST。 Please refer to FIG. 1 . FIG. 1 is a schematic diagram of a Proximity Sensor 10 according to an embodiment of the present invention. The proximity sensor 10 is configured to detect whether an object to be tested 100 exists outside the DST, and includes a light emitter 102, a light sensor 104, a read circuit 106, and an analog-to-digital conversion. Analog-to-Digital Converter (ADC) 108 and a logic control unit 110. The light emitter 102 is configured to emit an emitted light Ltx toward the object to be tested 100 according to a firing period. The object to be tested 100 reflects the emitted light Ltx and generates a reflected light Lrf (the process penetrates the half of the transparent member 120). The photo sensor 104 is configured to receive the reflected light Lrf and convert the reflected light Lrf into a first analog signal A1. The read circuit 106 is configured to select an index M from a plurality of indices M1, M2, ... MN according to a search method, and then set a gain of 2 M . The read circuit 106 then amplifies the first analog signal A1 to a second analog signal A2 according to the gain 2 M . The analog to digital converter 108 is used to convert the second analog signal A2 to a digital value DV. The logic control unit 110 is configured to interpret whether the digital value DV corresponds to the object distance DST, for example, the digit value "1010" corresponds to a distance of 10 cm from the object to be tested. The distance DST to be tested may also be a range, for example, 8 to 12 cm, and is not limited to a single fixed value. If the digital value DV corresponds to the object distance DST, the gain 2 M at this time is the parameter to be obtained in the embodiment of the present invention. If the digital value DV does not correspond to the object distance DST, the logic control unit 110 controls the light emitter 102, the light sensor 104, the reading circuit 106, and the analog digital converter 108 to perform the next round of testing until the digital value DV matches The distance to be tested is DST.

在先前技術中,不同表面性質的待測物、不同設計的半透明機構件,會導致不同的反射光,使得增益變得不合適,進而影響接近感測器偵測的精準度,製造商需透過人工反覆地調校增益至一適當值,係極無效率之生產方式。相較之下,本發明實施例的接近感測器10能考量待測物100表面性質與半透明機構件120之變異,在生產階段即把不同的反射光Lrf納入調整增益2 M的依據,透過元件間可程式化的運算,快速完成增益2 M之校正,製造商可大幅縮短其生產流程。 In the prior art, different surface properties of the object to be tested, differently designed translucent machine components, will result in different reflected light, making the gain become unsuitable, thereby affecting the accuracy of proximity sensor detection, the manufacturer needs By manually adjusting the gain to an appropriate value, it is a very inefficient production method. In contrast, the proximity sensor 10 of the embodiment of the present invention can consider the surface property of the object to be tested 100 and the variation of the translucent machine member 120, and the different reflected light Lrf is included in the adjustment gain 2 M in the production stage. Through the programmable calculation between components, the gain 2 M correction can be quickly completed, and the manufacturer can greatly shorten the production process.

接近感測器10之操作可歸納為一可程式化之調整流程20,如第2圖所示。調整流程20包含有下列步驟:The operation of proximity sensor 10 can be summarized as a programmable adjustment process 20, as shown in FIG. The adjustment process 20 includes the following steps:

步驟200:開始。Step 200: Start.

步驟202:光發射器102根據發射週期,朝待測物100發送發射光Ltx。Step 202: The light emitter 102 transmits the emitted light Ltx toward the object to be tested 100 according to the emission period.

步驟204:接收發射光Ltx從待測物100反射之反射光Lrf。Step 204: Receive reflected light Lrf reflected from the object to be tested 100 by the emitted light Ltx.

步驟206:光感測器104轉換反射光Lrf為第一類比信號A1。Step 206: The photo sensor 104 converts the reflected light Lrf into a first analog signal A1.

步驟208:讀取電路106根據搜尋方法,從指數M1、M2…MN中,選擇一個指數M。Step 208: The reading circuit 106 selects an index M from the indices M1, M2, ... MN according to the search method.

步驟210:讀取電路106設定增益為2 MStep 210: The read circuit 106 sets the gain to 2 M .

步驟212:讀取電路106根據增益2 M,放大第一類比信號A1為第二類比信號A2。 Step 212: The reading circuit 106 amplifies the first analog signal A1 as the second analog signal A2 according to the gain 2 M .

步驟214:類比數位轉換器108轉換第二類比信號A2為數位值   DV。Step 214: The analog-to-digital converter 108 converts the second analog signal A2 to a digital value DV.

步驟216:邏輯控制單元110解讀數位值DV。Step 216: The logic control unit 110 interprets the digital value DV.

步驟218:若數位值DV對應於待測物距離DST,執行步驟220;反之,執行步驟202。Step 218: If the digital value DV corresponds to the object distance DST, step 220 is performed; otherwise, step 202 is performed.

步驟220:結束。Step 220: End.

詳細來說,在本發明一實施例中,指數M1、M2…MN均為整數。另外,在步驟208中,讀取電路106可選擇指數M1、M2…MN中最大的指數,作為預設的指數M,並採用漸進式的二分搜尋法(binary search),逐漸搜尋理想的指數M,惟搜尋方法不限於二分搜尋法。二分搜尋法係搜尋前將可能的指數M1、M2…MN由大至小排序,其效果為每次搜索均縮小尋找範圍至上一次搜索的一半,能降低尋獲理想指數M所需的次數。二分搜尋法為本領域具通常知識者所熟知,在此不贅述。In detail, in an embodiment of the invention, the indices M1, M2, ... MN are all integers. In addition, in step 208, the reading circuit 106 can select the largest index among the indices M1, M2, ... MN as the preset index M, and gradually search for the ideal index M by using a progressive binary search method. However, the search method is not limited to the binary search method. The binary search method ranks the possible indices M1, M2...MN from large to small before searching, and the effect is that each search narrows the search range to half of the previous search, which can reduce the number of times required to find the ideal index M. The binary search method is well known to those of ordinary skill in the art and will not be described here.

除了增益之外,本發明亦可調整光發射器102的發射週期。請參考第3圖,第3圖為本發明另一實施例之一可程式化調整流程30之流程圖。調整流程30包含有下列步驟:In addition to the gain, the present invention can also adjust the emission period of the light emitter 102. Please refer to FIG. 3, which is a flow chart of a programmable adjustment process 30 according to another embodiment of the present invention. The adjustment process 30 includes the following steps:

步驟300:開始。Step 300: Start.

步驟302:光發射器102根據發射週期,朝待測物100發送發射光Ltx。Step 302: The light emitter 102 transmits the emitted light Ltx toward the object to be tested 100 according to the emission period.

步驟304:接收發射光Ltx從待測物100反射之反射光Lrf。Step 304: Receive reflected light Lrf reflected from the object to be tested 100 by the emitted light Ltx.

步驟306:光感測器104轉換反射光Lrf為第一類比信號A1。Step 306: The photo sensor 104 converts the reflected light Lrf into a first analog signal A1.

步驟308:讀取電路106根據搜尋方法,從指數M1、M2…MN中,選擇一個指數M。Step 308: The reading circuit 106 selects an index M from the indices M1, M2, ... MN according to the search method.

步驟310:讀取電路106設定增益為2 MStep 310: The read circuit 106 sets the gain to 2 M .

步驟312:讀取電路106根據增益2 M,放大第一類比信號A1為第二類比信號A2。 Step 312: The reading circuit 106 amplifies the first analog signal A1 as the second analog signal A2 according to the gain 2 M .

步驟314:類比數位轉換器108轉換第二類比信號A2為數位值DV。Step 314: The analog-to-digital converter 108 converts the second analog signal A2 to a digital value DV.

步驟316:邏輯控制單元110解讀數位值DV。Step 316: The logic control unit 110 interprets the digital value DV.

步驟318:若數位值DV對應於待測物距離DST,執行步驟320;反之,執行步驟302。Step 318: If the digital value DV corresponds to the object distance DST, step 320 is performed; otherwise, step 302 is performed.

步驟320:若增益2 M等於一最大增益,執行步驟322;反之,執行步驟324。 Step 320: If the gain 2 M is equal to a maximum gain, step 322 is performed; otherwise, step 324 is performed.

步驟322:增加發射週期Ttx,並執行步驟302。Step 322: Increase the transmission period Ttx and perform step 302.

步驟324:若增益2 M等於一最小增益,執行步驟326;反之,執行步驟328。 Step 324: If the gain 2 M is equal to a minimum gain, step 326 is performed; otherwise, step 328 is performed.

步驟326:減少發射週期Ttx,並執行步驟302。Step 326: Reduce the transmission period Ttx and perform step 302.

步驟328:結束。Step 328: End.

與調整流程20比較,調整流程30新增步驟320、322、324、326,以在增益2 M到達臨界值時,調整光發射器102的發射週期Ttx。詳細來說,於步驟322,調整前的發射週期Ttx=2 K*T,其中K為一整數,T為一時間單位,而調整後發射週期Ttx增加為Ttx=2 (K+1)*T。相反地,於步驟326,調整前的發射週期Ttx=2 K*T,而調整後發射週期Ttx減少為Ttx=2 (K-1)*T。調整流程30其他的步驟與調整流程20相同,在此不贅述。 In comparison with the adjustment process 20, the adjustment process 30 adds steps 320, 322, 324, 326 to adjust the emission period Ttx of the light emitter 102 when the gain 2 M reaches the threshold. In detail, in step 322, the pre-adjustment transmission period Ttx=2 K *T, where K is an integer, T is a time unit, and the adjusted transmission period Ttx is increased to Ttx=2 (K+1) *T . Conversely, in step 326, the pre-adjustment transmission period Ttx = 2 K * T, and the adjusted transmission period Ttx is decreased to Ttx = 2 (K-1) * T. The other steps of the adjustment process 30 are the same as those of the adjustment process 20, and are not described here.

需注意的是,調整流程30係同時對增益的上、下臨界值做檢查,本領域具通常知識者亦可僅對上臨界值或下臨界值做檢查,即移除步驟320、322或步驟324、326。It should be noted that the adjustment process 30 checks the upper and lower thresholds of the gain at the same time, and those skilled in the art can also check only the upper threshold or the lower threshold, that is, remove the steps 320, 322 or steps. 324, 326.

此外,第1圖所示之接近感測器10係為本發明實施例,本領域具通常知識者當可據以做不同修飾,而不限於此。舉例來說,請參考第4圖,第4圖為本發明另一實施例一接近感測器40之示意圖。接近感測器40係由接近感測器10所衍生,故相同元件以相同符號表示。相較於接近感測器10,接近感測器40另包含有一驅動電路412。驅動電路412用來根據一邏輯控制單元410之控制,產生一驅動信號DR,以驅動光發射器102產生發射光Ltx。接近感測器40其他元件均與接近感測器10相同,在此不贅述。In addition, the proximity sensor 10 shown in FIG. 1 is an embodiment of the present invention, and those skilled in the art can make different modifications according to the present invention, and are not limited thereto. For example, please refer to FIG. 4, which is a schematic diagram of a proximity sensor 40 according to another embodiment of the present invention. Proximity sensor 40 is derived from proximity sensor 10, and like elements are indicated by the same symbols. The proximity sensor 40 further includes a drive circuit 412 as compared to the proximity sensor 10. The driving circuit 412 is configured to generate a driving signal DR according to the control of a logic control unit 410 to drive the light emitter 102 to generate the emitted light Ltx. Other components of the proximity sensor 40 are the same as the proximity sensor 10, and are not described herein.

須注意的是,實務上光感測器104接收到的不只是反射光Lrf,還包含環境背景光及機構內部反射光。請參考第5A圖,第5A圖為一環境背景光Lsur及一機構內部反射光Lrfm之示意圖。當光發射器102發送光時,部分的光會被半透明機構件120反射,造成光感測器104額外接收到機構內部反射光Lrfm。實際應用上,半透明機構件120可能是作為外殼的黑色塑膠玻璃,能保護接近感測器10免受外部碰撞又能讓發射光Ltx穿透。另外,環境背景光Lsur也能穿透半透明機構件120被光感測器104接收。在此情況下,光感測器104總共接收到:反射光Lrf+環境背景光Lsur+機構內部反射光Lrfm,產生的第一類比信號A1rsm並非理想的第一類比信號A1。It should be noted that the practical glazing sensor 104 receives not only the reflected light Lrf but also the ambient background light and the internal reflected light of the mechanism. Please refer to FIG. 5A. FIG. 5A is a schematic diagram of an ambient backlight Lsur and a mechanism internal reflected light Lrfm. When the light emitter 102 transmits light, part of the light is reflected by the translucent machine member 120, causing the light sensor 104 to additionally receive the internally reflected light Lrfm. In practical applications, the translucent machine member 120 may be a black plastic glass as an outer casing, which can protect the proximity sensor 10 from external collisions and allow the emitted light Ltx to penetrate. In addition, the ambient backlight Lsur can also be received by the photo sensor 104 through the translucent machine member 120. In this case, the photo sensor 104 receives the reflected light Lrf+environment background light Lsur+the internal reflection light Lrfm, and the generated first analog signal A1rsm is not the ideal first analog signal A1.

為了排除環境背景光Lsur與機構內部反射光Lrfm,請繼續參考第5B、5C圖,第5B圖為接近感測器10無發送發射光Ltx時之示意圖。在第5B圖的情況,光感測器104僅接收環境背景光Lsur,可得知對應於環境背景光Lsur之一第一類比信號A1s。第5C圖為接近感測器10前方沒有待測物時之示意圖。在第5C圖的情況,光感測器104接收環境背景光Lsur與機構內部反射光Lrfm,可得知對應於環境背景光Lsur加機構內部反射光Lrfm之一第一類比信號A1sm。由於對應於環境背景光Lsur的第一類比信號A1s已得知,對應於機構內部反射光Lrfm之一第一類比信號A1m等於A1sm-A1s亦可得知。如此一來,單獨對應於反射光Lrf的第一類比信號A1等於A1rsm-A1s-A1m即可透過換算獲得。In order to exclude the ambient backlight Lsur and the internal reflection light Lrfm, please refer to FIGS. 5B and 5C, and FIG. 5B is a schematic diagram when the proximity sensor 10 does not transmit the emitted light Ltx. In the case of FIG. 5B, the photo sensor 104 receives only the ambient background light Lsur, and it is known that the first analog signal A1s corresponds to one of the ambient backlights Lsur. FIG. 5C is a schematic diagram of the proximity of the sensor 10 without the object to be tested. In the case of FIG. 5C, the photo sensor 104 receives the ambient background light Lsur and the in-system reflected light Lrfm, and can obtain a first analog signal A1sm corresponding to one of the internal reflection light Lrfm of the environmental background light Lsur. Since the first analog signal A1s corresponding to the ambient backlight Lsur is known, it is also known that the first analog signal A1m corresponding to one of the internal reflection light Lrfm is equal to A1sm-A1s. In this way, the first analog signal A1 corresponding to the reflected light Lrf alone is equal to A1rsm-A1s-A1m and can be obtained by conversion.

換言之,即使本發明的接近感測器10在不同的應用中(半透明機構件120與機構內部反射光Lrfm不同)、在不同環境中(環境背景光Lsur不同),仍可正確地換算出對應於反射光Lrf的正確第一類比信號A1,作為調整增益2 M的依據。 In other words, even if the proximity sensor 10 of the present invention is used in different applications (the translucent machine member 120 is different from the internal reflection light Lrfm) and in different environments (the ambient backlight Lsur is different), the corresponding correspondence can be correctly converted. The correct first analog signal A1 of the reflected light Lrf serves as a basis for adjusting the gain 2 M .

綜上所述,針對先前技術需透過人工調整接近感測器參數的方法,本發明提供自動化的快速調整方法,透過可程式化的漸進運算,迅速取得合適的增益、發射週期,以加快接近感測器的生產流程。   以上所述僅為本發明之較佳實施例,凡依本發明申請專利範圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。In summary, in view of the prior art method of manually adjusting the proximity sensor parameters, the present invention provides an automated rapid adjustment method, which can quickly obtain a suitable gain and emission period through a programmable progressive operation to accelerate the proximity. The production process of the detector. The above are only the preferred embodiments of the present invention, and all changes and modifications made to the scope of the present invention should be within the scope of the present invention.

10、40‧‧‧接近感測器
100‧‧‧待測物
102‧‧‧光發射器
104‧‧‧光感測器
106‧‧‧讀取電路
108‧‧‧類比數位轉換器
110、410‧‧‧邏輯控制單元
120‧‧‧半透明機構件
20、30‧‧‧調整流程
200、202、204、206、208、210、212、214、216、218、220、300、302、304、306、308、310、312、314、316、318、320、322、324、326、328‧‧‧步驟
412‧‧‧驅動電路
Ltx‧‧‧發射光
Lrf‧‧‧反射光
Lsur‧‧‧環境背景光
Lrfm‧‧‧機構內部反射光
DST‧‧‧待測物距離
A1‧‧‧第一類比訊號
A2‧‧‧第二類比訊號
DV‧‧‧數位值
DR‧‧‧驅動信號
10, 40‧‧‧ proximity sensor
100‧‧‧Test object
102‧‧‧Light emitter
104‧‧‧Light sensor
106‧‧‧Read circuit
108‧‧‧ analog digital converter
110, 410‧‧‧ logical control unit
120‧‧‧Translucent machine components
20, 30‧‧‧ adjustment process
200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 300, 302, 304, 306, 308, 310, 312, 314, 316, 318, 320, 322, 324, 326, 328‧‧‧Steps
412‧‧‧Drive circuit
Ltx‧‧‧ emitted light
Lrf‧‧·reflected light
Lsur‧‧‧Environmental background light
Lrfm‧‧‧ internal reflection light
DST‧‧‧Down object distance
A1‧‧‧first analog signal
A2‧‧‧Second analog signal
DV‧‧‧ digital value
DR‧‧‧ drive signal

第1圖為本發明實施例一接近感測器之示意圖。 第2圖為本發明實施例一調整流程之流程圖。 第3圖為本發明另一實施例一調整流程之流程圖。 第4圖為本發明另一實施例一接近感測器之示意圖。 第5A圖為一環境背景光及一機構內部反射光之示意圖。 第5B圖為第1圖之接近感測器無發送一發射光時之示意圖。 第5C圖為第1圖之接近感測器前方沒有待測物時之示意圖。FIG. 1 is a schematic diagram of a proximity sensor according to an embodiment of the present invention. FIG. 2 is a flow chart of an adjustment process according to an embodiment of the present invention. FIG. 3 is a flow chart of an adjustment process according to another embodiment of the present invention. FIG. 4 is a schematic diagram of a proximity sensor according to another embodiment of the present invention. Figure 5A is a schematic diagram of an ambient backlight and a reflected light inside a mechanism. Figure 5B is a schematic diagram of the proximity sensor of Figure 1 without transmitting a light. Fig. 5C is a schematic view of the first picture of the proximity sensor without the object to be tested.

10‧‧‧接近感測器 10‧‧‧ proximity sensor

100‧‧‧待測物 100‧‧‧Test object

102‧‧‧光發射器 102‧‧‧Light emitter

104‧‧‧光感測器 104‧‧‧Light sensor

106‧‧‧讀取電路 106‧‧‧Read circuit

108‧‧‧類比數位轉換器 108‧‧‧ analog digital converter

110‧‧‧邏輯控制單元 110‧‧‧Logical Control Unit

120‧‧‧半透明機構件 120‧‧‧Translucent machine components

Ltx‧‧‧發射光 Ltx‧‧‧ emitted light

Lrf‧‧‧反射光 Lrf‧‧·reflected light

DST‧‧‧待測物距離 DST‧‧‧Down object distance

A1‧‧‧第一類比訊號 A1‧‧‧first analog signal

A2‧‧‧第二類比訊號 A2‧‧‧Second analog signal

DV‧‧‧數位值 DV‧‧‧ digital value

Claims (15)

一種調整方法,用來根據一待測物距離,調整一接近感測器(Proximity Sensor)之一增益及一發射週期,該待測物距離係該接近感測器與一待測物之距離,該調整方法包含有: 一第一步驟,以根據該發射週期,朝該待測物發射一發射光; 一第二步驟,以接收該發射光從該待測物反射之一反射光; 一第三步驟,以轉換該反射光為一第一類比信號; 一第四步驟,以根據一搜尋方法,從複數個指數中,選擇一指數M; 一第五步驟,以設定該增益為2 M; 一第六步驟,以根據該增益,放大該第一類比信號為一第二類比信號;以及 一第七步驟,以轉換該第二類比信號為一數位值; 其中該第一步驟至該第七步驟係重複地執行,直到該數位值對應於該待測物距離。 An adjustment method for adjusting a gain of a Proximity Sensor and a launch period according to a distance of a test object, wherein the distance between the object to be tested is a distance between the proximity sensor and an object to be tested, The adjusting method includes: a first step of emitting a light toward the object to be tested according to the emission period; and a second step of receiving the reflected light to reflect light from the object to be tested; a third step of converting the reflected light into a first analog signal; a fourth step of selecting an index M from the plurality of indices according to a search method; and a fifth step of setting the gain to 2 M ; a sixth step of: amplifying the first analog signal as a second analog signal according to the gain; and a seventh step of converting the second analog signal to a digital value; wherein the first step to the seventh The steps are performed repeatedly until the digital value corresponds to the distance of the object to be tested. 如請求項1所述之調整方法,其中該複數個指數係整數,該第四步驟包含有預設該複數個指數中最大之一指數,作為該指數M。The adjustment method of claim 1, wherein the plurality of indices are integers, and the fourth step includes presetting a maximum one of the plurality of indices as the index M. 如請求項1所述之調整方法,其中該搜尋方法係一二分搜尋法(binary search)。The adjustment method of claim 1, wherein the search method is a binary search. 如請求項1所述之調整方法,另包含有一第八步驟,以於該增益為一最大增益時,增加該發射週期。The adjustment method of claim 1, further comprising an eighth step of increasing the transmission period when the gain is a maximum gain. 如請求項4所述之調整方法,其中該發射週期為2 K*T,K為一整數,T為一時間單位,其中步驟9包含有若該增益為該最大增益,增加該發射週期為2 (K+1)*T。 The adjustment method of claim 4, wherein the transmission period is 2 K *T, K is an integer, and T is a time unit, wherein step 9 includes if the gain is the maximum gain, and the transmission period is increased by 2 (K+1) *T. 如請求項1所述之調整方法,另包含有一第九步驟,以於該增益為一最小增益時,減少該發射週期。The adjustment method of claim 1, further comprising a ninth step, wherein the transmission period is reduced when the gain is a minimum gain. 如請求項6所述之調整方法,其中該發射週期為2 K*T,K為一整數,T為一時間單位,該第九步驟包含有若該增益為該最小增益,減少該發射週期為2 (K-1)*T。 The adjustment method of claim 6, wherein the transmission period is 2 K *T, K is an integer, and T is a time unit, and the ninth step includes if the gain is the minimum gain, and the emission period is decreased. 2 (K-1) *T. 一種接近感測器(Proximity Sensor),該接近感測器距離一待測物一待測物距離,該接近感測器包含有: 一光發射器,用來根據一發射週期,朝該待測物發射一發射光; 一光感測器,用來接收該發射光從該待測物反射之一反射光,並轉換該反射光為一第一類比信號; 一讀取電路,用來根據一搜尋方法,從複數個指數中,選擇一指數M、設定一增益為2 M並根據該增益並放大該第一類比信號為一第二類比信號; 一類比數位轉換器(Analog-to-Digital Converter,ADC),用來轉換該第二類比信號為一數位值;以及 一邏輯控制單元,用來解讀該數位值是否對應於該待測物距離, 其中該邏輯控制單元另用來控制該光發射器、該光感測器、該讀取電路及該類比數位轉換器重複執行其功能,直到該數位值對應於該待測物距離。 A Proximity Sensor, the proximity sensor is a distance from a test object to a test object, and the proximity sensor comprises: a light emitter for detecting the emission according to a launch period The object emits a light; a light sensor for receiving the reflected light from the object to be reflected, and converting the reflected light to a first analog signal; a reading circuit for The search method selects an index M from a plurality of indices, sets a gain to 2 M, and amplifies the first analog signal as a second analog signal according to the gain; an analog-to-digital converter (Analog-to-Digital Converter) , ADC), for converting the second analog signal to a digit value; and a logic control unit for interpreting whether the digit value corresponds to the distance of the object to be tested, wherein the logic control unit is further used to control the light emission The light sensor, the read circuit, and the analog digital converter repeatedly perform their functions until the digital value corresponds to the distance of the object to be tested. 如請求項8所述之接近感測器,其中該複數個指數係整數;其中該讀取電路預設該複數個指數中最大之一指數,作為該指數M。The proximity sensor of claim 8, wherein the plurality of indices are integers; wherein the reading circuit presets the largest one of the plurality of indices as the index M. 如請求項8所述之接近感測器,其中該搜尋方法係一二分搜尋法(binary search)。The proximity sensor of claim 8, wherein the search method is a binary search. 如請求項8所述之接近感測器,其中該邏輯控制單元另用來在該增益為一最大增益,增加該發射週期。The proximity sensor of claim 8, wherein the logic control unit is further configured to increase the transmission period when the gain is a maximum gain. 如請求項11所述之接近感測器,其中該發射週期為2 K*T,K為一整數,T為一時間單位;其中該邏輯控制單元另用來在該增益為該最大增益時,增加該發射週期為2 (K+1)*T。 The proximity sensor of claim 11, wherein the transmission period is 2 K *T, K is an integer, and T is a time unit; wherein the logic control unit is further configured to use the gain as the maximum gain, Increase the transmission period to 2 (K+1) *T. 如請求項8所述之接近感測器,其中該邏輯控制單元另用來在該增益為一最小增益時,減少該發射週期。The proximity sensor of claim 8, wherein the logic control unit is further configured to reduce the transmission period when the gain is a minimum gain. 如請求項13所述之接近感測器,其中該發射週期為2 K*T,K為一整數,T為一時間單位;其中該邏輯控制單元另用來在該增益為該最小增益時,減少該發射週期為2 (K-1)*T。 The proximity sensor of claim 13, wherein the emission period is 2 K *T, K is an integer, and T is a time unit; wherein the logic control unit is further configured to use the gain as the minimum gain, Reduce the emission period to 2 (K-1) *T. 如請求項8所述之接近感測器,另包含有一驅動電路,用來根據該邏輯控制單元之控制,產生一驅動信號,以驅動該光發射器,產生該發射光。The proximity sensor of claim 8 further comprising a driving circuit for generating a driving signal to drive the light emitter to generate the emitted light according to the control of the logic control unit.
TW105100461A 2016-01-08 2016-01-08 Adjustment method and proximity sensor TWI582452B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW105100461A TWI582452B (en) 2016-01-08 2016-01-08 Adjustment method and proximity sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW105100461A TWI582452B (en) 2016-01-08 2016-01-08 Adjustment method and proximity sensor

Publications (2)

Publication Number Publication Date
TWI582452B true TWI582452B (en) 2017-05-11
TW201725400A TW201725400A (en) 2017-07-16

Family

ID=59367290

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105100461A TWI582452B (en) 2016-01-08 2016-01-08 Adjustment method and proximity sensor

Country Status (1)

Country Link
TW (1) TWI582452B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI786403B (en) * 2020-05-14 2022-12-11 瑞士商Ams國際有限公司 Optical proximity sensor module and apparatus including the module, and method for reducing display screen distortion

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080205495A1 (en) * 2007-02-26 2008-08-28 Trott Gary R RF Transceiver Adapted for Signal Isolators and Proximity Sensors
US8502151B2 (en) * 2010-01-31 2013-08-06 Avago Technologies General Ip (Singapore) Pte. Ltd. Optical proximity sensor package with lead frame
US8822925B1 (en) * 2011-03-24 2014-09-02 Maxim Integrated Products, Inc. Proximity sensor device
TWI509274B (en) * 2012-02-22 2015-11-21 Excelitas Technologies Singapore Pte Ltd Passive infrared range finding proximity detector
TWI512313B (en) * 2012-11-09 2015-12-11 Upi Semiconductor Corp Proximity sensor and operating method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080205495A1 (en) * 2007-02-26 2008-08-28 Trott Gary R RF Transceiver Adapted for Signal Isolators and Proximity Sensors
US8502151B2 (en) * 2010-01-31 2013-08-06 Avago Technologies General Ip (Singapore) Pte. Ltd. Optical proximity sensor package with lead frame
US8822925B1 (en) * 2011-03-24 2014-09-02 Maxim Integrated Products, Inc. Proximity sensor device
TWI509274B (en) * 2012-02-22 2015-11-21 Excelitas Technologies Singapore Pte Ltd Passive infrared range finding proximity detector
TWI512313B (en) * 2012-11-09 2015-12-11 Upi Semiconductor Corp Proximity sensor and operating method thereof

Also Published As

Publication number Publication date
TW201725400A (en) 2017-07-16

Similar Documents

Publication Publication Date Title
TWI709729B (en) Optical sensors that compensate for ambient light and interference light and methods of operating the same
CN106303023B (en) Screen state adjusting method and device
WO2018137469A1 (en) Electronic device, and screen-off processing method and apparatus
CN103353621B (en) A kind of method that mobile terminal proximity transducer is calibrated and this mobile terminal
CN107896274B (en) Infrared emitter control method, terminal and computer readable storage medium
US11159672B2 (en) Method for controlling proximity sensor, device, and mobile terminal
CN109155628B (en) Proximity sensor, proximity illuminance sensor, electronic device, and calibration method
US20140131551A1 (en) Proximity sensor and operating method thereof
US8838181B2 (en) Communication device for automatically switching its communication modes and operating method thereof
EP2999129A1 (en) Method for gestures operating smart wearable device and smart wearable device
WO2015196371A1 (en) User equipment light control method, device and user terminal
CN103686464A (en) Method and device for controlling equipment and electronic equipment
WO2020108006A1 (en) Sliding correction method and apparatus for sliding component
CN105302339A (en) Stylus and signal processing method therefor
TWI582452B (en) Adjustment method and proximity sensor
CN107888758B (en) Screen color adjusting method, mobile terminal and computer readable storage medium
WO2022028470A1 (en) Electronic device and infrared module control method
US11443701B2 (en) Screen state control method, device, and mobile terminal
CN113267785B (en) Distance detection method and device and electronic equipment
JP2013118565A (en) Portable terminal and proximity sensor
US20140252211A1 (en) Ambient light sensor with automatic gain control
WO2020052494A1 (en) Terminal device
US10292591B2 (en) Electronic device for adjusting power to an earphone transmitter
WO2012059029A1 (en) Communication equipment, task indication unit and method
WO2019011092A1 (en) Display apparatus, terminal device and proximity state detection method

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees