[go: up one dir, main page]

TWI668999B - Self-calibrating optical detector - Google Patents

Self-calibrating optical detector Download PDF

Info

Publication number
TWI668999B
TWI668999B TW106138818A TW106138818A TWI668999B TW I668999 B TWI668999 B TW I668999B TW 106138818 A TW106138818 A TW 106138818A TW 106138818 A TW106138818 A TW 106138818A TW I668999 B TWI668999 B TW I668999B
Authority
TW
Taiwan
Prior art keywords
detection threshold
signal generator
power level
detector
initial detection
Prior art date
Application number
TW106138818A
Other languages
Chinese (zh)
Other versions
TW201919384A (en
Inventor
特洛伊 庫克
Original Assignee
美商Tt電子公司
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 美商Tt電子公司 filed Critical 美商Tt電子公司
Priority to TW106138818A priority Critical patent/TWI668999B/en
Publication of TW201919384A publication Critical patent/TW201919384A/en
Application granted granted Critical
Publication of TWI668999B publication Critical patent/TWI668999B/en

Links

Landscapes

  • Geophysics And Detection Of Objects (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

本發明的揭露包含用於校準光學感測器組合之系統及方法,該等系統及方法包含:設定一偵測器的一初始偵測臨界值;逐漸增加與該偵測器通訊的一信號產生器之功率位準,使該偵測器上被偵測到的功率超過該初始偵測臨界值;將該偵測器上被偵測到的功率超過該初始偵測臨界值時的該信號產生器之一第一功率位準儲存在一記憶體;以及將該偵測器的該初始偵測臨界值調整成使一調整後的偵測臨界值將一偵測緩衝量包含在該調整後的偵測臨界值內。The disclosure of the present invention includes a system and method for calibrating an optical sensor assembly, the system and method comprising: setting an initial detection threshold of a detector; and gradually increasing a signal generated in communication with the detector The power level of the device is such that the detected power on the detector exceeds the initial detection threshold; the signal generated when the detected power on the detector exceeds the initial detection threshold The first power level of one of the devices is stored in a memory; and the initial detection threshold of the detector is adjusted such that an adjusted detection threshold includes a detection buffer amount in the adjusted Within the detection threshold.

Description

自行校準光學偵測器Self-calibrating optical detector

本發明的揭露係大致有關被用於偵測目標介質中之改變的自行校準光學感測器組合的系統及技術。The present disclosure is generally directed to systems and techniques for self-calibrating optical sensor combinations that are used to detect changes in a target medium.

在各種工業中,需要能夠以高速率偵測通過一信號產生器與一偵測器之間的材料中之改變的感測器組合。例如,使用者可能希望在有貼在一張背紙(backing paper)的一面之自黏標籤(adhesive label)運行通過一感測器組合時計算貼在一張背紙的自黏標籤之數目。藉由感測標籤與背紙之間的透明度的改變,該感測器組合可在每一標籤通過該信號產生器(例如,一發光二極體)與該偵測器(例如,一光偵測器(photodetector))之間時偵測該標籤。   該感測器組合尋找的改變可能是極小的,因而需要非常敏感的偵測。在某些應用中,該改變可能小到足以使製造該感測器組合的零件時之變異、該感測器組合之溫度變異、材料通過該感測器組合時的材料路徑之變化等的因素可能導致偵測的錯誤。因此,必須根據使用該感測器組合的特定環境以及用於組裝該感測器組合的特定組件而校準該感測器組合。通常,係以人工方式執行該校準,且係根據目標環境中之測試而執行該感測器組合的一次性永久調整。因此,希望能夠改善此種校準方法。In various industries, there is a need for a sensor combination that is capable of detecting changes in material between a signal generator and a detector at a high rate. For example, a user may wish to calculate the number of self-adhesive labels attached to a backing paper when running through a sensor assembly with an adhesive label attached to a backing paper side. By sensing a change in transparency between the label and the backing paper, the sensor combination can pass the signal generator (eg, a light emitting diode) with the detector at each label (eg, a light detector) The tag is detected between the photodetectors. The changes sought by the sensor combination may be minimal and require very sensitive detection. In some applications, the change may be small enough to cause variations in the parts from which the sensor is assembled, temperature variations in the sensor combination, changes in material paths as the material is combined through the sensor, and the like. An error that may result in detection. Therefore, the sensor combination must be calibrated according to the particular environment in which the sensor combination is used and the particular components used to assemble the sensor combination. Typically, this calibration is performed manually and a one-time permanent adjustment of the sensor combination is performed according to the tests in the target environment. Therefore, it is desirable to be able to improve such a calibration method.

因此,希望能夠有可自行校準感測器組合的系統及方法,且希望該系統及方法自行校準感測器組合的方式為:設定一偵測器的偵測臨界值,逐漸增加(ramping up)一信號產生器的功率位準,使該偵測器接收超過正常操作條件下的該偵測臨界值之信號能量,且將一偵測緩衝量加到該偵測臨界值,以便保證即使在該系統中有減少該偵測器接收的信號能量之變異時也將能執行偵測。   在本發明揭露的一觀點中,一種校準方法包含:由一控制器設定一偵測器的一初始偵測臨界值。該方法進一步包含:逐漸增加與該偵測器及該控制器通訊的一信號產生器之功率位準,使該偵測器上被偵測到的功率超過該初始偵測臨界值。該方法進一步包含:由該控制器將該偵測器上被偵測到的功率超過該初始偵測臨界值時的該信號產生器之一第一功率位準儲存在一記憶體。該方法進一步包含:在該信號產生器的功率位準到達該第一功率位準之後,由該控制器將該偵測器的該初始偵測臨界值調整成使一調整後的偵測臨界值將一偵測緩衝量包含在該調整後的偵測臨界值內。   在本發明揭露的另一觀點中,一種電腦程式產品具有可有形地記錄用於校準偵測器及信號產生器的電腦程式邏輯之電腦可讀取的媒體。該電腦程式產品包含用於自一使用者接收包括該初始偵測臨界值的一偵測臨界值設定信號之程式碼。該電腦程式產品進一步包含用於自該使用者接收用於指示該電腦程式產品開始逐漸增加該信號產生器的功率位準的一校準信號之程式碼。該電腦程式產品進一步包含用於自該使用者接收包括用於調整該初始偵測臨界值的使用者可程式化的量的一臨界值改變信號之程式碼。   在本發明揭露的又一觀點中,一種計算裝置包含用於容納機器可讀取的媒體之記憶體,該機器可讀取的媒體包含機器可執行碼,該機器可執行碼具有被儲存於其中的用於執行一校準感測器及信號產生器的方法之指令。該計算裝置進一步包含被耦合到該記憶體的一處理器,該處理器被配置成執行用於使該處理器設定該感測器的一初始偵測臨界值之機器可執行碼。該處理器被進一步配置成執行用於逐漸增加與該感測器通訊的該信號產生器的功率位準而使該感測器上被偵測到的功率超過該初始偵測臨界值之機器可執行碼。該處理器被進一步配置成執行用於將該感測器上被偵測到的功率超過該初始偵測臨界值時的該信號產生器之一第一功率位準儲存在一記憶體之機器可執行碼。該處理器被進一步配置成執行用於在該信號產生器到達該第一功率位準之後將該感測器的該初始偵測臨界值調整成使一調整後的偵測臨界值將一偵測緩衝量包含在該調整後的偵測臨界值內之機器可執行碼。Therefore, it is desirable to have a system and method for self-calibrating the sensor combination, and it is desirable that the system and method calibrate the sensor combination by setting the detection threshold of a detector and ramping up. The power level of a signal generator causes the detector to receive signal energy exceeding the detection threshold under normal operating conditions, and adds a detection buffer amount to the detection threshold to ensure that even Detection can also be performed in the system by reducing variations in the signal energy received by the detector. In one aspect of the present disclosure, a calibration method includes: setting, by a controller, an initial detection threshold of a detector. The method further includes: gradually increasing a power level of a signal generator communicating with the detector and the controller such that the detected power on the detector exceeds the initial detection threshold. The method further includes: storing, by the controller, the first power level of one of the signal generators when the detected power on the detector exceeds the initial detection threshold is stored in a memory. The method further includes: after the power level of the signal generator reaches the first power level, the controller adjusts the initial detection threshold of the detector to an adjusted detection threshold A detection buffer is included in the adjusted detection threshold. In another aspect of the present disclosure, a computer program product has a computer readable medium tangibly recording computer program logic for calibrating a detector and a signal generator. The computer program product includes a code for receiving a detection threshold setting signal including the initial detection threshold from a user. The computer program product further includes code for receiving, from the user, a calibration signal indicating that the computer program product begins to gradually increase the power level of the signal generator. The computer program product further includes code for receiving, from the user, a threshold value change signal including a user programmable amount for adjusting the initial detection threshold. In still another aspect of the present disclosure, a computing device includes a memory for accommodating machine readable media, the machine readable medium containing machine executable code having stored therein Instructions for performing a method of calibrating the sensor and signal generator. The computing device further includes a processor coupled to the memory, the processor configured to execute a machine executable code for causing the processor to set an initial detection threshold for the sensor. The processor is further configured to perform a machine for gradually increasing the power level of the signal generator in communication with the sensor such that the detected power on the sensor exceeds the initial detection threshold Execution code. The processor is further configured to perform a machine for storing a first power level of the signal generator for storing the detected power on the sensor above the initial detection threshold in a memory Execution code. The processor is further configured to perform the step of adjusting the initial detection threshold of the sensor after the signal generator reaches the first power level such that an adjusted detection threshold is detected The buffer amount contains the machine executable code within the adjusted detection threshold.

下文中將以與各圖式有關之方式述及的詳細說明將意圖作為對各種組態的說明,且不意圖代表可實施本發明所述的觀念之僅有的組態。該詳細說明包含為了提供對各種觀念的徹底了解之特定細節。然而,熟悉此項技術者當可了解:可在沒有這些特定細節的情形下實施這些觀念。   本發明的揭露說明了用於自行校準包含一信號產生器及一偵測器的一感測器系統以便偵測目標介質中之改變的系統及方法。為了簡化,本發明所述的實施例將使用將一發光二極體(Light Emitting Diode;簡稱LED)用來作為該信號產生器且將一光二極體用來作為該偵測器的一光學感測器組合,但是各實施例的範圍可包括任何適當的信號產生器或光子偵測器。   在某些應用中,該感測器組合可被用於偵測該光二極體上接收的光之小改變。例如,貼在一背紙的一標籤與該背紙本身之間的透明度(transparency)(或透射率(transmittance))之差異可能是很小的。該感測器組合應能夠感測透明度的此種輕微改變。然而,該改變可能是小到使該感測器組合製造時的變化以及環境的變化可能導致錯誤偵測。例如,該LED輸出或光二極體靈敏度的變化、該LED封裝之透鏡或該光二極體封裝的變化、該LED或光二極體在該感測器組合內之放置的變化、該感測器組合中之溫度的變化、或目標介質通過感測器組合的路徑的變化等的變化可能各自單獨地或合起來地足以導致偵測錯誤。   為了防止由於這些變化導致的偵測錯誤,希望能夠校準該感測器組合。在一實施例中,該感測器組合被設計成自行校準。可由來自使用者的一命令啟動自行校準,或者可在該感測器組合通電之後立即自動地自行校準。在某些實施例中,如將於下文中進一步說明的,使用者可在校準之前將各種參數供應到該感測器組合。   本發明揭露的實施例說明了用於校準光學感測器組合以便偵測兩目標材料通過該感測器時的該等兩目標材料之間的改變之系統及方法。在接收到一校準要求後,立即逐漸增加一LED的輸出功率,直到一光二極體上接收的來自該LED的光超過一預設偵測臨界值為止。然後將執行偵測時的LED功率位準儲存為一校準參數。然而,當使用上述偵測臨界值及LED功率位準操作該感測器組合以便感測目標材料時,將減少該光二極體上接收的光的量之該系統中之變化即使是小量的變化,也將會減少被接收的光至低於該偵測臨界值,而導致所需偵測的失敗。   為了解決該問題,以超過預期變化的一量調整該偵測臨界值,而提供一偵測緩衝量。例如,如果變化可能將該光二極體上接收的光的量減少15%,則將該偵測臨界值減少20%時將保證變化將不會導致被接收的光的量減少到低於該偵測臨界值。在該例子中,該偵測緩衝量是該調整後的偵測臨界值與變化對該偵測器的預期影響之間的5%差異。   當然,前文提供的百分率是例子,這是因為其他的系統可能包含適當之不同的偵測緩衝量。在各實施例中,可透過測試、模擬、或其他方式,容許該偵測臨界值被調整,使變化的影響與調整後的偵測臨界值之間的差異將錯誤偵測的機會減少到特定應用可接受的程度。該調整後的偵測臨界值被儲存為一校準參數。在諸如斷電之後對該光學感測器組合供電時,使用該LED功率位準及調整後的偵測臨界值,因而不需要重新校準。   本發明揭露的一實施例包含一控制器,該控制器具有用於儲存校準值以及儲存將那些校準值用於正常偵測操作期間的電腦可讀取的程式碼之記憶體位址。在一例子中,使用者將一第一偵測臨界值設定在該控制器的一記憶體位址中,而開始一校準操作。該系統然後逐漸增加一信號產生器的放大器位準,直到該偵測器偵測到到達該第一臨界值的該信號為止,而驗證該第一臨界值。如果該偵測器並未偵測到使用該第一臨界值的該信號,則該使用者可改變該第一臨界值,使得在該信號產生器的基於其可用放大器位準的操作範圍內可偵測到該信號。   假定已利用一成功的偵測驗證了該第一臨界位準,此時該控制器儲存對應於到達該第一臨界位準的一點之放大器位準,而繼續該校準操作。該使用者然後可設定其中有一偵測緩衝量的一第二偵測臨界值,而調整該偵測位準。下文中將進一步詳細說明該偵測緩衝量,且在本實施例中,該偵測緩衝量對應於代表預期變化的影響與該第二臨界位準之間的差異避免了錯誤偵測及/或無法偵測的一量。該控制器然後將該放大器位準及該第二臨界值儲存在被用於該控制器的正常操作期間的記憶體位址中。在重開機之後或在後來某一其他適當的時間,該控制器然後將該放大器位準及該第二臨界值用於執行偵測,且被建入該第二臨界值的該偵測緩衝量將可減少或最小化變化導致的不必要的操作。   現在請參閱第1A圖,圖中示出根據本發明揭露的一實施例的一光學感測器組合100。在該實施例中,感測器組合100包含一發光二極體(LED)102以及一光二極體104,該LED 102與該光二極體104之間有一槽106,且如方向箭頭110所示,一目標介質108可通過該槽106。在某些實施例中,LED 102可以是一紅外線(infrared;簡稱IR)LED或其他適當波長的LED。LED 102輸出方向朝向光二極體104的光。當目標介質108通過槽106時,透射通過目標介質108的光的量根據目標介質108在LED 102與光二極體104之間的部分之透射率而改變。在某些實施例中,目標介質108的一第一部分112可能比目標介質108的一第二部分114更不透明或更有反射性。例如,目標介質108可能是有自黏標籤貼在其上的一張背紙。在該例子中,該等標籤是目標介質108的第一部分112,比係為目標介質108的第二部分114之該背紙更不透明。   現在請參閱第1B圖,圖中示出根據本發明揭露的一實施例的一光學感測器組合100之一替代實施例。在該實施例中,一LED 102及光二極體104被定位成相互靠近,且如方向箭頭110所示,一目標介質108在LED 102及光二極體104之上通過。在該實施例中,LED 102輸出方向朝向目標介質108的光,且光二極體104偵測自目標介質108反射的光。當目標介質108沿著方向箭頭110在感測器組合100之上通過時,自目標介質108反射的光的量根據目標介質108在LED 102與光二極體104之間的部分之反射率(reflectance)而改變。   現在請參閱第2圖,圖中示出根據本發明揭露的一實施例的光學感測器組合100之一控制系統。可將該控制系統實施為執行用於執行第3圖的狀態機所示的行動的邏輯之一特定應用積體電路(Application Specific Integrated Circuit;簡稱ASIC)。然而,各實施例的範圍可包括諸如執行用於執行本發明所述的校準及偵測行動的機器可讀取的程式碼之一般用途中央處理單元等的任何種類的邏輯電路。一電源202供電給該電路。一振盪器204產生一時鐘信號,用以提供感測器組合100的該電路的操作之時序。在某些實施例中,振盪器204可提供諸如4百萬赫(MHz)信號等的一高頻時鐘信號。一能帶隙參考電壓206產生獨立於電源202供應的電壓且獨立於該系統中的溫度變化之一固定電壓。該固定電壓被饋送到將受益於固定電壓的該系統之諸如振盪器204、類比前端208、比較器210、及LED驅動器222等的其他元件。   類比前端208自LED 102接收類比信號,且如將於下文中進一步說明的,處理該等類比信號以供在比較器210上與一使用者決定的偵測臨界值比較。在某些實施例中,光二極體104是類比前端208的一部分,但是應當理解:光二極體104可以是被連接到類比前端208的一離散元件。類比前端208進一步包含一跨阻抗放大器(transimpedance amplifier)、一積分器級(integrator stage)、一增益級(gain stage)、以及具有可程式參考信號產生器的一比較器。該跨阻抗放大器被用於將光二極體104的輸出放大到該系統的其餘部分可使用的電壓。   類比前端208的該跨阻抗放大器可具有被一帶通濾波回饋迴路控制的其本身之增益,以便補償光二極體104回應環境光而產生的電流。如將於下文中參照第4圖而進一步說明的,該跨阻抗放大器的增益可進一步被校準期間根據光二極體104自LED 102接收的信號的強度而自動增加該跨阻抗放大器的增益之一自動增益選擇電路控制。該自動增益選擇電路亦可設有在已經執行了校準的情形下將被狀態機226使用之一增益等級(gain level)。在某些實施例中,該自動增益選擇電路可具有3個增益設定值,但是在某些實施例中可使用任何適當數目的增益設定值。   類比前端208的該積分器級執行諸如消除低頻雜訊及電源漣波(power supply ripple)、使光二極體104信號參照到能帶隙參考電壓206、以及自光二極體104的輸出(可能是一脈波)產生一鋸齒波信號因而減少光二極體104的輸出中之頻寬變化的影響等的各種功能。類比前端208的該增益級將輸出信號升壓到適用於比較器210的位準。   比較器210接收類比前端208的輸出以及一預先編程的參考位準,且比較以上兩者。比較器210的輸出狀態根據該比較而改變。例如,當類比前端208的輸出超過該預先編程的參考位準時,該輸出狀態可以是二進制一,或者當類比前端208的輸出低於該參考位準時,該輸出狀態可以是二進制零(反之亦然)。換言之,當類比前端208的輸出位準改變到高於或低於該參考位準時,該輸出狀態可改變。該參考位準因而可被用來作為一偵測臨界值。在一實施例中,使用者可自16個可用參考位準(例如,每一參考位準與次一參考位準之間有大約7%的改變)的一範圍中選擇該預先編程的參考位準,但是各實施例的範圍包括任何適當數目的參考位準。   比較器210的輸出被傳送到一過濾器212。過濾器212被用於過濾掉由於偵測到目標介質108的所需部分以外的事件而導致比較器210的狀態之改變。此類事件可包括:導致類比前端208的輸出超過比較器210上的該參考位準之入射在光二極體104上的環境光、或導致比較器210輸出一狀態改變的感測器組合100中之電氣雜訊等的事件。過濾器212可能需要在多個連續的週期中於其輸入上檢視到一狀態改變,然後才將該狀態改變傳送到其輸出。在某些實施例中,過濾器212可等候到輸入在一適當數目的時鐘週期(例如,2個週期)中保持在一改變的狀態,然後才輸出該狀態改變。該狀態改變可被輸出到狀態機226及多工器228,且將於下文中進一步說明這兩種情況。   記憶體214儲存感測器組合100使用的各種資訊區塊。在本實施例中,記憶體214是一電氣可抹除可程式唯讀記憶體(Electrically Erasable Programmable Read Only Memory;簡稱EEPROM),但是可以是任何其他適當的記憶體裝置。在一例子中,記憶體214儲存用於提供狀態機226的邏輯之將被處理器讀取及執行的電腦可讀取的程式碼。在某些實施例中,在執行了校準之後,與感測器組合100的校準有關之各種資訊區塊被儲存在記憶體214中,且如將於下文中參照第3及6圖說明的,狀態機226存取記憶體214,以便在感測器組合100通電之後立即擷取校準資訊。例如,記憶體214可儲存LED驅動器222的一驅動位準、類比前端208之跨阻抗放大器增益的一自動增益選擇值、用於指示是否已預先校準過感測器組合100的一校準位元(或旗標)、一輸出類型及極性、比較器210的一偵測臨界值、振盪器204的一內部振盪器校準因數(calibration factor)、以及偏壓產生器224的一溫度補償因數(temperature compensation factor)。   通訊介面216針對諸如校準等的功能促進感測器組合100與使用者之間的通訊。通訊介面216可以是諸如內部積體電路(I2C)匯流排的一介面。使用者控制的一外部微控制器可經由校準狀態接腳218及輸出接腳220而連接到感測器組合100。在一實施例中,經由校準狀態接腳218接收至通訊介面216的輸入,且如將於下文中進一步說明的,該等輸入被傳送到狀態機226。自狀態機226接收輸出,且該等輸出根據輸出的類型而經由校準狀態接腳218或輸出接腳220傳送到該使用者微控制器。如將於下文中進一步說明的,多工器228可將被傳送到輸出接腳220的通訊介面216之輸出與比較器210之輸出多工化。   如將於下文中進一步說明的,LED驅動器222根據自狀態機226接收的輸入而驅動LED 102。在某些實施例中,LED驅動器222可在室溫下將LED 102驅動到95毫安(mA),但是在某些實施例中可使用任何適當的最大或最小電流。如將於下文中進一步說明的,可由狀態機226的輸出控制LED驅動器222。   偏壓產生器224可以是根據感測器組合100的內部溫度而將一電流提供給LED驅動器222的一正比於絕對溫度(Proportional To Absolute Temperature;簡稱PTAT)偏壓產生器。被供應到LED驅動器222的電流可使LED驅動器222的輸出大小在感測器組合100的內部溫度改變時增減。此種方式可諸如補償由於溫度的改變而造成的LED 102輸出之變異。   狀態機226於通電時自動管理感測器組合100的各零件之功能,且根據經由校準狀態接腳218接收的使用者輸入而動態地管理感測器組合100的各零件之功能。在本實施例中,狀態機226管理其中包括記憶體214、通訊介面216、LED驅動器222、及多工器228的各元件之功能。狀態機226代表該ASIC或其他處理器執行本發明所述的校準程序時的邏輯功能。雖然並未將一處理器明確地示出為第2圖中之一硬體部分,但是應當理解:可將第2圖的該系統實施為包含輸入、輸出、及電源端的一ASIC或其他處理器。   多工器228自過濾器212及通訊介面216接收輸入,且將該等輸入多工到輸出接腳220。狀態機226將選擇器輸入提供給多工器228,因而選擇要使該等輸入中之哪一輸入通過多工器228到輸出接腳220。通常,過濾器212的輸出將被選擇為輸出。此種方式可讓使用者讀取光二極體104的已處理輸出,以便決定是否已偵測到一目標介質。在某些實施例中,該使用者控制器可將一讀取要求傳送到狀態機226(例如,對記憶體214的校準資訊之讀取要求),在此種情形中,狀態機226將自記憶體214擷取被要求的資訊,且經由通訊介面216將該資訊傳送到多工器228,然後選擇來自該通訊介面的輸入為自該多工器到輸出接腳220的輸出。   現在請參閱第3圖,圖中示出根據本發明揭露的一實施例的狀態機226的操作之一狀態圖300。在感測器組合100通電之後,狀態機226立即在可讓記憶體214安定到一穩定狀態的期間中進入安定模式302。根據振盪器204的頻率,該期間可自EEPROM記憶體214的大約2.5毫秒至大約26毫秒。然而,應當理解:各實施例中可使用安定模式302的任何適當之持續時間。在安定模式302中,校準狀態接腳218成為狀態機226的輸出,且校準狀態接腳218被設定為向該使用者微控制器指示感測器組合100係處於安定模式302的一狀態。在某些實施例中,校準狀態接腳218可為了該目的而被設定為一低二進制狀態(邏輯"0")。在容許記憶體214安定的最大可能的時間量之後,狀態機226可自記憶體214擷取該自動增益選擇,且將該自動增益選擇提供給類比前端208的該跨阻抗放大器,以便調整增益設定值。在某些實施例中,可以有任何適當數目的可能之增益設定值,且記憶體214中之2個或更多個位元可容納該自動增益選擇值。該自動增益選擇值的擷取可能耗用自10微秒至102微秒,但是於操作中,各實施例可使用任何適當量的時間。   在該安定期間結束且擷取了該自動增益選擇值之後,狀態可自動轉變到操作模式304。在操作模式304期間,校準狀態接腳218成為狀態機226的一輸入,且通訊介面216被啟用,而自使用者接收通訊。在某些實施例中,在操作模式304時,一內部上拉電阻器(pull-up resistor)可將校準狀態接腳218上拉到高位準(上拉到邏輯"1")。狀態機226然後自記憶體214讀取用於指示是否已發生了先前的校準之一校準旗標。   如果該校準旗標被設定(例如,一旗標位元被設定為"真"或邏輯"1"),則狀態機226轉變到LED驅動器啟用模式306。狀態機226自記憶體214讀取一已校準LED驅動器位準,且啟用LED驅動器222而開始傳送該已校準位準下的脈波。   如果該校準旗標未被設定(例如,該旗標位元被設定為"假"或邏輯"0"),則狀態機226轉變到LED驅動器未啟用模式308。在該狀態中,LED驅動器222被停用,且狀態機226只須等候來自使用者的校準要求。   當在LED驅動器啟用模式306或LED驅動器未啟用模式308中經由校準狀態接腳218自該使用者(例如,自該使用者控制的微控制器)接收到一校準要求時,狀態機226轉變到校準模式310。當進入校準模式310時,狀態機226使校準狀態接腳218回到被提升到高位準。此外,狀態機226指示記憶體214清除與校準有關的值(例如,LED驅動器位準、自動增益選擇值、及校準旗標),且容許記憶體214有安定的時間(例如,大約5毫秒)。   狀態機226指引將於下文中參照第4圖而進一步說明的該校準程序。在成功的校準之後,狀態機226指示記憶體214儲存各種校準值。例如,記憶體214可儲存由於該校準而導致的該LED驅動器位準、被用於成功的校準的該自動增益選擇值,且其可將該校準旗標設定成指示成功的校準(例如,設定為"真"或邏輯"1")。如果校準是不成功的,則狀態機226可使記憶體214保持不變。   在完成了校準之後,不論是否成功,狀態機226都可進入狀態模式312。校準耗用一已知的時間量。在諸如第4圖所示的方法中,校準可能耗用大約10毫秒。在經過了該記憶體安定時間及該校準時間(總共可能耗用大約15毫秒)之後,該使用者控制器可被程式化成在一被選擇的時間窗期間尋找一校準完成信號。如果成功地完成了校準,則狀態機226可在該被選擇的時間窗期間將校準狀態接腳218驅動到低位準(例如,邏輯"0"),而向該使用者指示校準是成功的。如果校準是不成功的,則則狀態機226可在該被選擇的時間窗期間使校準狀態接腳218保持在高位準(例如,邏輯"1")。在經過了該被選擇的時間窗之後,狀態機226自動轉變回到操作模式304,直到接收到諸如另一校準要求等的進一步的使用者輸入為止。   現在請參閱第4圖,圖中示出根據本發明揭露的一實施例的用於自行校準感測器組合100的一方法400之一方塊圖。為了便於說明,將參照感測器組合100被設計成偵測光二極體104上接收的光減少(例如,偵測目標介質108的透射率何時減少)之一實施例。在該實施例中,以槽106中之目標介質108的最透射部分執行校準。應當理解:也可以槽106中之目標介質108的最不透射部分執行校準。也應當理解:其他實施例可使用一類似方法偵測該光二極體上接收的光增加(例如,偵測目標介質108的透射率何時增加)。   在方塊402中,諸如狀態機226等的一控制器將一參考位準供應到比較器210。如前文所述,可由使用者自一組可用參考位準預先編程該參考位準。在前文所述的一實施例中,該裝置可具有從中選擇的16個參考位準。例如,使用者可指示狀態機226將該參考位準設定為7,且該狀態機可將一經適當增減的電壓信號供應到比較器210。   在方塊404中,狀態機226將一自動增益選擇應用於類比前端208的該跨阻抗放大器。在該例子中,有為該自動增益選擇而選擇的3個可能的增益等級,且狀態機226在最低的增益選擇下開始校準。該自動增益選擇被用於調整類比前端208對光二極體104上接收的光之靈敏度。該增益越高,該前端208對來自光二極體104的輸出越靈敏。   在方塊406中,狀態機226指示LED驅動器222將被供應到LED 102的電流自諸如0毫安等的一開始電流輸出逐漸增加到諸如95毫安等的一最大電流輸出。在某些實施例中,可指示LED驅動器222將電流脈波傳送到LED 102,同時在一些離散的步級中增加電流輸出,且在每一電流步級上重複該脈波一預先編程的次數。例如,可指示LED驅動器222在1000個步級或位準中將電流輸出自0毫安逐漸增加到95毫安,(因而在每一步級中將電流輸出增加95微安),且在每一電流步級上將該電流脈波傳送到LED 102五次。亦可預先編程每一脈波的寬度,且該寬度可以是諸如250奈秒。每一脈波可以有諸如150奈秒的一空檔期間,而導致每一電流步級有2微秒的期間,且逐漸增加到完成所有1000步級時有2毫秒的總期間。然而,步級的數目、電流的量、及脈波的寬度在其他實施例中可以是不同的。   在決定方塊408中,狀態機226在LED驅動器222逐漸增加其供應到LED 102的電流輸出時監視過濾器212的輸出是否有輸出狀態的改變。如前文所述,被供應到比較器210的參考位準有效地被用來作為一偵測臨界值,且過濾器212運行而過濾掉由於干擾而導致的超過該偵測臨界值的值之異常的偵測。因此,過濾器212的輸出之狀態改變指示超過類比前端208處理的光二極體104的偵測臨界值的光之一成功的偵測。如果LED驅動器222逐漸增加一直到其最大電流輸出,且沒有成功的偵測,則方法400移到決定方塊410。如果有一成功的偵測,則方法400移到方塊416。下文中將依次說明每一方塊。   在決定方塊410中,狀態機226檢查自動增益選擇是否在其最大值。如果自動增益選擇不是在其最大值,則方法400移到方塊412。如果自動增益選擇已在最大值(例如,自動增益選擇是諸如3個可能位準中之位準3),則校準失敗,且方法400移到方塊414。下文中將依次說明每一方塊。   在方塊412中,狀態機226增加類比前端208的該跨阻抗放大器之自動增益選擇,以便增加類比前端208的靈敏度。例如,如果自動增益選擇被設定為1,則狀態機226將其增加到2。方法400然後回到方塊406,且在被供應到類比前端208的該新的自動增益選擇下再度逐漸增加LED驅動器222的電流。   回到決定方塊410,如果自動增益選擇是在其最大值,則該方法移到方塊414。   在方塊414中,狀態機226使該系統回到前文中參照第3圖所述的正常操作模式304,且等候諸如另一校準要求等的進一步的使用者輸入。   回到決定方塊408,如果有一成功的偵測,則方法400移到方塊416。   在方塊416中,狀態機226輸出一校準成功信號。   在方塊418中,在成功的偵測後,狀態機226立即將該比較器上的參考位準減少一預先編程的量(或者在諸如以槽106中之目標介質108的最不透射部分執行校準時,增加參考位準),而產生一調整後的校準參考位準,且相應地在該調整後的校準參考位準中納入一偵測緩衝量。在某些實施例中,可由使用者在校準之前供應該預先編程的量可以是參考位準的總量之大約10%到25%。例如,使用者在成功的偵測之後可立即指示該狀態機將參考位準減少總共16個參考位準中之參考位準2。該調整後的校準參考位準減少該偵測臨界值,而產生一偵測緩衝量。如將於下文中參照第5A及5B圖說明的,減少該偵測臨界值時引進了對抗由於諸如內部溫度改變、目標介質108通過槽106的路徑改變、光學組件表面的灰塵累積等的該系統中之變化而導致的錯誤偵測之強韌性。   在方塊420中,狀態機226將起因於成功的校準之值儲存到記憶體214,以供未來於感測器組合100通電時使用。被儲存的值可包括諸如成功的偵測發生時的LED驅動器位準(例如,1000個可能的功率位準/步級中之位準/步級650)、成功的偵測發生時的自動增益選擇(例如,3個可能的自動增益選擇位準中之2個)、調整後的校準參考位準(例如,16個可能的參考位準中之參考位準7)、以及用於指示已成功地校準了該系統的一"真"旗標。   在一實施例中,自1000個可能的電流位準中選擇該LED驅動器位準,且使用記憶體214的10位元儲存;可自3個可能的等級中選擇該自動增益選擇,且需要2位元以供儲存;自16個可能的位準中選擇該調整後的校準參考位準,且需要5位元以供儲存;以及自兩個可能的值中選擇該校準旗標,且需要1位元以供儲存。在成功的校準且將校準值儲存在記憶體214之後,方法400可移到前文所述之方塊414,而恢復正常操作模式304。   現在請參閱第5A圖,圖中示出係為被驅動到LED 102的功率的百分率之光二極體104上接收的功率之一圖形500。在該例子中,在槽106中有較透射的第二部分114之情形下以第4圖所示的方法自行校準已導致無調整的校準偵測臨界值502集合,因而當目標介質108的第二部分114是在LED 102與光二極體104之間時,光二極體104上接收到被驅動到LED 102的功率之85%。偶然地,當目標介質108的第一部分112是在LED 102與光二極體104之間時,光二極體104上接收到被驅動到LED 102的功率之65%。因此,如果該偵測臨界值被設定為最小偵測臨界值504時,當目標介質108的第一部分112或第二部分114是在LED 102與光二極體104之間時,感測器組合100都將記錄一成功的偵測,這是一不可取的結果。因此,方法400的方塊416之調整後的校準參考位準應保持高到足以將一偵測臨界值保持在高於最小偵測臨界值504。   現在請參閱第5B圖,圖中示出在灰塵累積在LED 102的透鏡之後係為被驅動到LED 102的功率的百分率之光二極體104上接收的功率之一圖形506。在該例子中,透鏡上的雜物使LED 102輸出比在相同驅動電流下而透鏡上沒有灰塵時的操作少10%的功率。因此,光二極體104上接收的功率也減少大約10%。因此,如果該校準參考位準未被調整(亦即,保持在偵測臨界值502),則感測器組合100將無法偵測到目標介質108的第二部分114之出現,這是因為光二極體104上接收的功率將不會超過偵測臨界值502。   該參考位準可被降低到使該偵測臨界值被設定為偵測臨界值508,在此種情形中,感測器組合100將能夠成功地偵測到目標介質108的第二部分114,且同時能夠區別目標介質108的第一部分112。然而,因為該偵測臨界值508將低於最小偵測臨界值504,所以如果自LED 102的透鏡去除了雜物,則將導致第一部分112的不可取的偵測(亦即,當感測器組合100認為其正在偵測第二部分114時,將偵測到第一部分112)。   或者,該參考位準可被降低到使該偵測臨界值被設定為調整後的校準偵測臨界值510,在此種情形中,感測器組合100將能夠成功地偵測到目標介質108的第二部分114,且不論LED 102的透鏡上是否累積灰塵,都同時能夠區別目標介質108的第一部分112。換言之,在LED 102的透鏡的一模糊範圍下,當目標介質108的第二部分114出現在LED 102與光二極體104之間時,感測器組合100將記錄在使用校準偵測臨界值510的成功的偵測,且不論透鏡是否模糊,當目標介質108的第一部分112出現在LED 102與光二極體104之間時,感測器組合100將不記錄在使用校準偵測臨界值510的成功的偵測。   因此,使用者可測試目標介質108的透射率,以便決定第一部分112與第二部分114之間的差異,且可將所得到的資訊用於選擇將被應用於方法400的方塊416的參考位準之減少量,以便得到一適當的調整後的校準參考位準。例如,如第5A及5B圖所示,如果在第一部分112是在LED 102與光二極體104之間時,光二極體104上偵測到的光的量比第二部分114是在LED 102與光二極體104之間時減少了20%,則將該參考位準減少超過20%時,將導致如前文中參照第5B圖所述,不論目標介質108的哪一部分是在LED 102與光二極體104之間,光二極體104上偵測到的光總是超過該偵測位準。   應當理解:在某些實施例中,目標介質108的第一部分112可能比目標介質108的第二部分114更透明或更有反射性,且可能因而要顛倒用於偵測目標介質108的所需部分之條件。感測器組合100可被設計成或校準成偵測不透明度(opacity)的減少(亦即,透射率或透明度的增加)。例如,當光二極體104上接收的光增加到高於一偵測臨界值時,感測器組合100可指示一成功的偵測。   本發明揭露的各實施例可包括勝過先前解決方案的優點。常見的光學感測器組合被須在製造之後被篩選,這是因為在製造中有太多變化的組合無法被用於靈敏的應用。通過篩選的光學感測器組合必須仍然被以人工方式校準,以供用於特定的環境。相比之下,可易於校準本申請案的光學感測器組合,而應對製造中及使用環境中之變化。   可使用各種不同的技術及技巧中之任一種技術及技巧表現資訊及信號。例如,可以電壓、電流、電磁波、磁場或磁粒子、光場(Optical field)或光粒子、或以上各項的任何組合表現可能在前文說明中提到的資料、指令、命令、資訊、信號、位元、符號、及分段(chip)。   可以一般用途處理器、數位信號處理器(DSP)、特定應用積體電路(ASIC)、現場可程式閘陣列(FPGA)或其他可程式邏輯裝置、離散閘或電晶體邏輯、離散硬體組件、或被設計成執行本發明所述之功能的以上各項的任何組合實施或執行以與本發明的揭露有關的方式說明之該等各例示方塊及模組。一般用途處理器可以是微處理器,但是在替代實施例中,該處理器可以是任何常見的處理器、控制器、微控制器、或狀態機。亦可將一處理器實施為一些計算裝置的一組合(例如,一DSP及一微處理器的一組合、多個微處理器的一組合、與一DSP核心協力的一或多個微處理器的一組合、或任何其他此種組態)。The detailed description set forth below in connection with the various figures is intended to be illustrative of the various configurations and is not intended to represent the only configuration in which the concepts described herein can be implemented. This detailed description contains specific details in order to provide a thorough understanding of the various concepts. However, those skilled in the art will understand that these concepts can be practiced without these specific details. The present disclosure describes a system and method for self-calibrating a sensor system including a signal generator and a detector to detect changes in the target medium. For simplicity, the embodiment of the present invention will use a Light Emitting Diode (LED) as the signal generator and a photodiode as an optical sensation of the detector. The detector combination, but the scope of the various embodiments may include any suitable signal generator or photon detector. In some applications, the sensor combination can be used to detect small changes in light received on the photodiode. For example, the difference in transparency (or transmittance) between a label attached to a backing paper and the backing paper itself may be small. The sensor combination should be capable of sensing such a slight change in transparency. However, the change may be so small that changes in the sensor assembly and manufacturing changes may result in false detections. For example, a change in sensitivity of the LED output or photodiode, a change in the lens of the LED package or the package of the photodiode, a change in placement of the LED or photodiode within the sensor combination, the sensor combination Variations in temperature, or changes in the path of the target medium through the sensor combination, etc., may each individually or collectively be sufficient to cause detection errors. In order to prevent detection errors due to these changes, it is desirable to be able to calibrate the sensor combination. In an embodiment, the sensor combination is designed to self-calibrate. The self-calibration can be initiated by a command from the user, or can be automatically self-calibrated immediately after the sensor combination is energized. In some embodiments, as will be explained further below, the user can supply various parameters to the sensor combination prior to calibration. Embodiments of the present disclosure illustrate systems and methods for calibrating optical sensor combinations to detect changes between the two target materials as they pass through the sensor. Immediately after receiving a calibration request, the output power of an LED is gradually increased until the light received from the LED on a photodiode exceeds a predetermined detection threshold. The LED power level at the time of detection is then stored as a calibration parameter. However, when the sensor combination is operated using the detection threshold and the LED power level to sense the target material, the amount of light received on the photodiode is reduced in the system even if it is a small amount. The change will also reduce the received light below the detection threshold, resulting in the failure of the desired detection. In order to solve this problem, the detection threshold is adjusted by an amount exceeding the expected change, and a detection buffer amount is provided. For example, if the change may reduce the amount of light received on the photodiode by 15%, then reducing the detection threshold by 20% will ensure that the change will not cause the amount of received light to decrease below the Detect. Measure the critical value. In this example, the detection buffer is the 5% difference between the adjusted detection threshold and the expected impact of the change on the detector. Of course, the percentages provided above are examples, as other systems may contain appropriately different amounts of detection buffers. In various embodiments, the detection threshold can be adjusted through testing, simulation, or other means, so that the difference between the effect of the change and the adjusted detection threshold reduces the chance of error detection to a specific The extent to which the application is acceptable. The adjusted detection threshold is stored as a calibration parameter. When the optical sensor combination is powered, such as after a power outage, the LED power level and the adjusted detection threshold are used, thus eliminating the need for recalibration. An embodiment of the present invention includes a controller having a memory address for storing calibration values and storing those calibration values for computer readable code during normal detection operations. In one example, the user sets a first detection threshold in a memory address of the controller to initiate a calibration operation. The system then gradually increases the amplifier level of a signal generator until the detector detects the signal reaching the first threshold and verifies the first threshold. If the detector does not detect the signal using the first threshold, the user may change the first threshold so that the signal generator is within an operating range based on its available amplifier level. This signal was detected. It is assumed that the first critical level has been verified with a successful detection, at which time the controller stores the amplifier level corresponding to the point at which the first critical level is reached, and continues the calibration operation. The user can then set a second detection threshold having a detection buffer amount and adjust the detection level. The detection buffer amount will be further described in detail below, and in the embodiment, the detection buffer amount corresponds to the difference between the influence representing the expected change and the second critical level to avoid error detection and/or A quantity that cannot be detected. The controller then stores the amplifier level and the second threshold in a memory address that is used during normal operation of the controller. After rebooting or at some other appropriate time later, the controller then uses the amplifier level and the second threshold for performing detection, and the detected buffer amount of the second threshold is built. It will reduce or minimize unnecessary operations caused by changes. Referring now to FIG. 1A, an optical sensor assembly 100 in accordance with an embodiment of the present disclosure is illustrated. In this embodiment, the sensor assembly 100 includes a light emitting diode (LED) 102 and a photodiode 104 having a slot 106 between the LED 102 and the photodiode 104, as indicated by direction arrow 110. A target medium 108 can pass through the slot 106. In some embodiments, LED 102 can be an infrared (IR) LED or other suitable wavelength LED. The LED 102 outputs light directed toward the photodiode 104. As the target medium 108 passes through the slot 106, the amount of light transmitted through the target medium 108 changes according to the transmittance of the portion of the target medium 108 between the LED 102 and the photodiode 104. In some embodiments, a first portion 112 of the target medium 108 may be more opaque or more reflective than a second portion 114 of the target medium 108. For example, the target medium 108 may be a sheet of backing paper with a self-adhesive label attached thereto. In this example, the labels are the first portion 112 of the target medium 108 that is more opaque than the backing paper that is the second portion 114 of the target medium 108. Referring now to FIG. 1B, an alternate embodiment of an optical sensor assembly 100 in accordance with an embodiment of the present disclosure is shown. In this embodiment, an LED 102 and photodiode 104 are positioned adjacent to one another, and a target medium 108 passes over LEDs 102 and photodiodes 104 as indicated by directional arrow 110. In this embodiment, LED 102 outputs light that is directed toward target medium 108, and photodiode 104 detects light that is reflected from target medium 108. When the target medium 108 passes over the sensor assembly 100 along the directional arrow 110, the amount of light reflected from the target medium 108 is based on the reflectance of the portion of the target medium 108 between the LED 102 and the photodiode 104 (reflectance) ) and change. Referring now to Figure 2, there is shown a control system for an optical sensor assembly 100 in accordance with an embodiment of the present disclosure. The control system may be implemented as an application specific integrated circuit (ASIC) that executes logic for performing the actions shown by the state machine of FIG. However, the scope of various embodiments may include any type of logic circuit, such as a general purpose central processing unit that performs machine readable code for performing the calibration and detection operations described herein. A power source 202 supplies power to the circuit. An oscillator 204 generates a clock signal for providing the timing of the operation of the circuit of the sensor combination 100. In some embodiments, oscillator 204 can provide a high frequency clock signal such as a 4 megahertz (MHz) signal. An energy bandgap reference voltage 206 produces a voltage that is independent of the voltage supplied by the power source 202 and that is independent of one of the temperature variations in the system. The fixed voltage is fed to other components of the system that would benefit from a fixed voltage, such as oscillator 204, analog front end 208, comparator 210, and LED driver 222. The analog front end 208 receives analog signals from the LEDs 102 and, as will be explained further below, processes the analog signals for comparison with a user determined detection threshold on the comparator 210. In some embodiments, photodiode 104 is part of analog front end 208, but it should be understood that photodiode 104 can be a discrete component that is connected to analog front end 208. The analog front end 208 further includes a transimpedance amplifier, an integrator stage, a gain stage, and a comparator having a programmable reference signal generator. The transimpedance amplifier is used to amplify the output of the photodiode 104 to a voltage that can be used by the rest of the system. The transimpedance amplifier of the analog front end 208 can have its own gain controlled by a bandpass filtered feedback loop to compensate for the current generated by the photodiode 104 in response to ambient light. As will be further explained below with reference to FIG. 4, the gain of the transimpedance amplifier can be further automatically increased during calibration by one of the gains of the transimpedance amplifier based on the intensity of the signal received by the photodiode 104 from the LED 102. Gain selection circuit control. The automatic gain selection circuit can also be provided with a gain level to be used by the state machine 226 in the event that calibration has been performed. In some embodiments, the automatic gain selection circuit can have three gain settings, although any suitable number of gain settings can be used in some embodiments. The integrator stage of the analog front end 208 performs, for example, elimination of low frequency noise and power supply ripple, reference of the photodiode 104 signal to the bandgap reference voltage 206, and output from the photodiode 104 (possibly A pulse wave) generates a sawtooth wave signal and thus reduces various effects such as the influence of the bandwidth variation in the output of the photodiode 104. This gain stage of the analog front end 208 boosts the output signal to a level suitable for the comparator 210. Comparator 210 receives the output of analog front end 208 and a pre-programmed reference level, and compares both. The output state of the comparator 210 changes according to the comparison. For example, when the output of the analog front end 208 exceeds the pre-programmed reference level, the output state can be binary one, or when the output of the analog front end 208 is below the reference level, the output state can be binary zero (and vice versa) ). In other words, the output state can change when the output level of the analog front end 208 changes above or below the reference level. This reference level can thus be used as a detection threshold. In one embodiment, the user can select the pre-programmed reference bit from a range of 16 available reference levels (eg, approximately 7% change between each reference level and the next reference level). The scope of the embodiments includes any suitable number of reference levels. The output of comparator 210 is passed to a filter 212. The filter 212 is used to filter out changes in the state of the comparator 210 due to events other than the desired portion of the target medium 108 being detected. Such an event may include causing the output of the analog front end 208 to exceed ambient light incident on the photodiode 104 at the reference level on the comparator 210, or causing the comparator 210 to output a state change in the sensor combination 100. Events such as electrical noise. Filter 212 may need to view a state change on its input over a plurality of consecutive cycles before transmitting the state change to its output. In some embodiments, filter 212 may wait until the input remains in a changed state for an appropriate number of clock cycles (eg, 2 cycles) before outputting the state change. This state change can be output to state machine 226 and multiplexer 228, and both of these cases will be further explained below. The memory 214 stores various information blocks used by the sensor combination 100. In this embodiment, the memory 214 is an Electrically Erasable Programmable Read Only Memory (EEPROM), but may be any other suitable memory device. In one example, memory 214 stores computer readable code for providing logic of state machine 226 to be read and executed by the processor. In some embodiments, after performing the calibration, various information blocks related to calibration of the sensor combination 100 are stored in the memory 214, and as will be explained below with reference to Figures 3 and 6, The state machine 226 accesses the memory 214 to capture calibration information immediately after the sensor combination 100 is powered. For example, the memory 214 can store a drive level of the LED driver 222, an automatic gain selection value of the transimpedance amplifier gain of the analog front end 208, and a calibration bit for indicating whether the sensor combination 100 has been pre-calibrated ( Or flag), an output type and polarity, a detection threshold of comparator 210, an internal oscillator calibration factor of oscillator 204, and a temperature compensation factor of bias generator 224 (temperature compensation) Factor). The communication interface 216 facilitates communication between the sensor assembly 100 and the user for functions such as calibration. Communication interface 216 may be an interface such as an internal integrated circuit (I2C) bus. An external microcontroller controlled by the user can be coupled to the sensor assembly 100 via the calibration state pin 218 and the output pin 220. In an embodiment, the input to communication interface 216 is received via calibration state pin 218, and as will be explained further below, the inputs are communicated to state machine 226. The output is received from state machine 226 and transmitted to the user microcontroller via calibration state pin 218 or output pin 220 depending on the type of output. As will be explained further below, multiplexer 228 can multiplex the output of communication interface 216 that is transmitted to output pin 220 with the output of comparator 210. As will be explained further below, LED driver 222 drives LEDs 102 based on input received from state machine 226. In some embodiments, LED driver 222 can drive LED 102 to 95 milliamps (mA) at room temperature, although any suitable maximum or minimum current can be used in certain embodiments. LED driver 222 can be controlled by the output of state machine 226 as will be explained further below. The bias generator 224 may be a Proportional To Absolute Temperature (PTAT) bias generator that provides a current to the LED driver 222 based on the internal temperature of the sensor combination 100. The current supplied to the LED driver 222 may cause the output size of the LED driver 222 to increase or decrease as the internal temperature of the sensor assembly 100 changes. This approach may, for example, compensate for variations in the output of the LED 102 due to changes in temperature. The state machine 226 automatically manages the functions of the various components of the sensor assembly 100 upon power up and dynamically manages the functions of the various components of the sensor assembly 100 based on user input received via the calibration state pin 218. In the present embodiment, state machine 226 manages the functions of the various components including memory 214, communication interface 216, LED driver 222, and multiplexer 228. State machine 226 represents the logic function of the ASIC or other processor when performing the calibration procedure described herein. Although a processor is not explicitly shown as a hardware portion of FIG. 2, it should be understood that the system of FIG. 2 can be implemented as an ASIC or other processor including input, output, and power terminals. . The multiplexer 228 receives input from the filter 212 and the communication interface 216 and multiplexes the inputs to the output pin 220. State machine 226 provides the selector input to multiplexer 228, thereby selecting which of the inputs to pass through multiplexer 228 to output pin 220. Typically, the output of filter 212 will be selected as the output. This approach allows the user to read the processed output of the photodiode 104 to determine if a target medium has been detected. In some embodiments, the user controller can transmit a read request to the state machine 226 (eg, a read request for calibration information for the memory 214), in which case the state machine 226 will The memory 214 retrieves the requested information and transmits the information to the multiplexer 228 via the communication interface 216, and then selects the input from the communication interface as the output from the multiplexer to the output pin 220. Referring now to Figure 3, there is shown a state diagram 300 of the operation of state machine 226 in accordance with an embodiment of the present disclosure. After the sensor combination 100 is energized, the state machine 226 immediately enters the stabilization mode 302 during a period in which the memory 214 can be stabilized to a steady state. Depending on the frequency of oscillator 204, this period can be approximately 2. from EEPROM memory 214. 5 milliseconds to about 26 milliseconds. However, it should be understood that any suitable duration of the stabilization mode 302 can be used in various embodiments. In the stabilization mode 302, the calibration state pin 218 becomes the output of the state machine 226, and the calibration state pin 218 is set to indicate to the user microcontroller that the sensor combination 100 is in a state of the stabilization mode 302. In some embodiments, the calibration status pin 218 can be set to a low binary state (logic "0") for this purpose. After allowing the maximum amount of time that the memory 214 is settled, the state machine 226 can retrieve the automatic gain selection from the memory 214 and provide the automatic gain selection to the transimpedance amplifier of the analog front end 208 to adjust the gain setting. value. In some embodiments, there may be any suitable number of possible gain settings, and two or more of the memories 214 may accommodate the automatic gain selection value. The capture of the automatic gain selection value may take from 10 microseconds to 102 microseconds, but in operation, embodiments may use any suitable amount of time. After the stabilization period has ended and the automatic gain selection value has been retrieved, the state may automatically transition to the operational mode 304. During operation mode 304, calibration state pin 218 becomes an input to state machine 226, and communication interface 216 is enabled to receive communications from the user. In some embodiments, an internal pull-up resistor can pull the calibration state pin 218 to a high level (pull up to logic "1") during operation mode 304. State machine 226 then reads from memory 214 a command to indicate if a calibration calibration has occurred for one of the previous calibrations. If the calibration flag is set (e.g., a flag bit is set to "true" or logic "1"), state machine 226 transitions to LED driver enable mode 306. State machine 226 reads a calibrated LED driver level from memory 214 and enables LED driver 222 to begin transmitting pulses at the calibrated level. If the calibration flag is not set (eg, the flag bit is set to "false" or logic "0"), state machine 226 transitions to LED driver not enabled mode 308. In this state, LED driver 222 is deactivated and state machine 226 only has to wait for calibration requests from the user. When a calibration request is received from the user (eg, from the user-controlled microcontroller) via calibration state pin 218 in LED driver enable mode 306 or LED driver disable mode 308, state machine 226 transitions to Calibration mode 310. When entering calibration mode 310, state machine 226 causes calibration state pin 218 to return to being raised to a high level. In addition, state machine 226 instructs memory 214 to clear values associated with calibration (eg, LED driver levels, automatic gain selection values, and calibration flags) and allows memory 214 to have a stable time (eg, approximately 5 milliseconds). . State machine 226 directs the calibration procedure as will be further explained below with reference to Figure 4. After successful calibration, state machine 226 instructs memory 214 to store various calibration values. For example, memory 214 can store the LED driver level due to the calibration, the automatic gain selection value used for successful calibration, and it can set the calibration flag to indicate a successful calibration (eg, setting Is "true" or logical "1"). If the calibration is unsuccessful, state machine 226 can leave memory 214 unchanged. After the calibration is completed, the state machine 226 can enter the state mode 312 whether or not it is successful. Calibration takes a known amount of time. In a method such as that shown in Figure 4, the calibration may take approximately 10 milliseconds. After the memory settling time and the calibration time (which may take approximately 15 milliseconds in total), the user controller can be programmed to look for a calibration completion signal during a selected time window. If the calibration is successfully completed, state machine 226 can drive calibration state pin 218 to a low level (e.g., logic "0") during the selected time window, indicating to the user that the calibration was successful. If the calibration is unsuccessful, then state machine 226 can maintain calibration state pin 218 at a high level (eg, a logic "1") during the selected time window. After the selected time window has elapsed, state machine 226 automatically transitions back to operational mode 304 until further user input, such as another calibration request, is received. Referring now to FIG. 4, a block diagram of a method 400 for self-calibrating the sensor assembly 100 in accordance with an embodiment of the present disclosure is shown. For ease of illustration, the reference sensor assembly 100 is designed to detect one of the embodiments of light reduction received on the photodiode 104 (eg, detecting when the transmittance of the target medium 108 is decreasing). In this embodiment, the calibration is performed with the most transmissive portion of the target medium 108 in the slot 106. It should be understood that calibration may also be performed on the least transmitted portion of the target medium 108 in the slot 106. It should also be understood that other embodiments may use a similar method to detect an increase in light received on the photodiode (e.g., when the transmittance of the target medium 108 is detected to increase). In block 402, a controller, such as state machine 226, supplies a reference level to comparator 210. As previously described, the reference level can be pre-programmed by the user from a set of available reference levels. In an embodiment as described above, the apparatus can have 16 reference levels selected therefrom. For example, the user can instruct the state machine 226 to set the reference level to 7, and the state machine can supply a suitably increased or decreased voltage signal to the comparator 210. In block 404, state machine 226 applies an automatic gain selection to the transimpedance amplifier of analog front end 208. In this example, there are three possible gain levels selected for the automatic gain selection, and state machine 226 begins calibration at the lowest gain selection. This automatic gain selection is used to adjust the sensitivity of the analog front end 208 to light received on the optical diode 104. The higher the gain, the more sensitive the front end 208 is to the output from the photodiode 104. In block 406, state machine 226 instructs LED driver 222 to gradually increase the current supplied to LED 102 from a beginning current output, such as 0 milliamps, to a maximum current output such as 95 milliamps. In some embodiments, the LED driver 222 can be instructed to transmit a current pulse to the LED 102 while increasing the current output in some discrete steps and repeating the pulse for a pre-programmed number of times at each current step. . For example, the LED driver 222 can be instructed to gradually increase the current output from 0 mA to 95 mA in 1000 steps or levels (thus increasing the current output by 95 microamps in each step), and at each The current pulse is transmitted to the LED 102 five times at the current step. The width of each pulse wave can also be pre-programmed, and the width can be, for example, 250 nanoseconds. Each pulse may have a neutral period of, for example, 150 nanoseconds, resulting in a period of 2 microseconds for each current step, and gradually increasing to a total period of 2 milliseconds when all 1000 steps are completed. However, the number of steps, the amount of current, and the width of the pulse wave may be different in other embodiments. In decision block 408, state machine 226 monitors whether the output of filter 212 has a change in output state as LED driver 222 gradually increases its current output to LED 102. As described above, the reference level supplied to the comparator 210 is effectively used as a detection threshold, and the filter 212 operates to filter out abnormalities in values exceeding the detection threshold due to interference. Detection. Thus, the state change of the output of the filter 212 indicates a successful detection of one of the lights that exceed the detection threshold of the photodiode 104 processed by the analog front end 208. If LED driver 222 is gradually incremented until its maximum current output, and there is no successful detection, then method 400 moves to decision block 410. If there is a successful detection, method 400 moves to block 416. Each block will be described in turn below. In decision block 410, state machine 226 checks if the automatic gain selection is at its maximum value. If the automatic gain selection is not at its maximum value, then method 400 moves to block 412. If the automatic gain selection is already at a maximum value (eg, the automatic gain selection is such as level 3 of the 3 possible levels), the calibration fails and method 400 moves to block 414. Each block will be described in turn below. In block 412, state machine 226 increases the automatic gain selection of the transimpedance amplifier of analog front end 208 to increase the sensitivity of analog front end 208. For example, if automatic gain selection is set to 1, state machine 226 increments it to two. The method 400 then returns to block 406 and gradually increases the current of the LED driver 222 again under the new automatic gain selection supplied to the analog front end 208. Returning to decision block 410, if the automatic gain selection is at its maximum value, then the method moves to block 414. In block 414, state machine 226 returns the system to normal operating mode 304 as previously described with reference to FIG. 3, and waits for further user input such as another calibration request. Returning to decision block 408, if there is a successful detection, then method 400 moves to block 416. In block 416, state machine 226 outputs a calibration success signal. In block 418, upon successful detection, state machine 226 immediately reduces the reference level on the comparator by a pre-programmed amount (or performs a calibration at the least transmitted portion of target medium 108, such as in slot 106). On time, the reference level is increased, and an adjusted calibration reference level is generated, and a detection buffer amount is included in the adjusted calibration reference level accordingly. In some embodiments, the pre-programmed amount that can be supplied by the user prior to calibration can be from about 10% to 25% of the total amount of reference levels. For example, the user can immediately instruct the state machine to reduce the reference level by a reference level of a total of 16 reference levels after successful detection. The adjusted calibration reference level reduces the detection threshold and produces a detection buffer. As will be explained hereinafter with reference to FIGS. 5A and 5B, the detection threshold is reduced to introduce a system against the accumulation of dust due to changes in internal temperature, the passage of the target medium 108 through the slot 106, the accumulation of dust on the surface of the optical component, and the like. The strong resilience of error detection caused by changes in the middle. In block 420, state machine 226 stores the value resulting from the successful calibration to memory 214 for use in future when sensor assembly 100 is powered. The stored values may include LED driver levels such as when a successful detection occurs (eg, 1000 possible power levels/levels/steps 650), automatic gains when successful detection occurs Select (eg, 2 of 3 possible automatic gain selection levels), adjusted calibration reference levels (eg, reference level 7 of 16 possible reference levels), and to indicate successful A "true" flag of the system was calibrated. In one embodiment, the LED driver level is selected from 1000 possible current levels and stored using 10 bits of memory 214; the automatic gain selection can be selected from 3 possible levels and requires 2 Bits are reserved for storage; the adjusted calibration reference level is selected from 16 possible levels and requires 5 bits for storage; and the calibration flag is selected from two possible values and requires 1 Bits are available for storage. After successful calibration and storing the calibration values in memory 214, method 400 can move to block 414 as previously described and resume normal operation mode 304. Referring now to Figure 5A, there is shown a graph 500 of the power received on the photodiode 104 as a percentage of the power driven to the LED 102. In this example, the self-calibration of the second detection portion 114 in the slot 106 in the manner shown in FIG. 4 has resulted in a set of calibration detection thresholds 502 that are unadjusted, thus when the target medium 108 is The two portions 114 are between the LED 102 and the photodiode 104, and 85% of the power driven to the LED 102 is received on the photodiode 104. Occasionally, when the first portion 112 of the target medium 108 is between the LED 102 and the photodiode 104, the photodiode 104 receives 65% of the power driven to the LED 102. Therefore, if the detection threshold is set to the minimum detection threshold 504, when the first portion 112 or the second portion 114 of the target medium 108 is between the LED 102 and the photodiode 104, the sensor combination 100 A successful detection will be recorded, which is an undesirable result. Therefore, the adjusted calibration reference level of block 416 of method 400 should remain high enough to maintain a detection threshold above the minimum detection threshold 504. Referring now to Figure 5B, there is shown a graph 506 of the power received on the photodiode 104 as a percentage of the power driven to the LED 102 after dust has accumulated in the lens of the LED 102. In this example, the debris on the lens causes the LED 102 to output 10% less power than at the same drive current without the dust on the lens. Therefore, the power received on the photodiode 104 is also reduced by about 10%. Therefore, if the calibration reference level is not adjusted (ie, remains at the detection threshold 502), the sensor combination 100 will not be able to detect the presence of the second portion 114 of the target medium 108, because the light II The power received on pole body 104 will not exceed detection threshold 502. The reference level can be lowered to cause the detection threshold to be set to a detection threshold 508, in which case the sensor combination 100 will be able to successfully detect the second portion 114 of the target medium 108, At the same time, the first portion 112 of the target medium 108 can be distinguished. However, because the detection threshold 508 will be below the minimum detection threshold 504, if debris is removed from the lens of the LED 102, then an undesirable detection of the first portion 112 will result (ie, when sensing) When the combination 100 is that it is detecting the second portion 114, the first portion 112 will be detected. Alternatively, the reference level can be lowered to cause the detection threshold to be set to the adjusted calibration detection threshold 510, in which case the sensor combination 100 will be able to successfully detect the target medium 108. The second portion 114, and regardless of whether dust is accumulated on the lens of the LED 102, is capable of distinguishing the first portion 112 of the target medium 108 at the same time. In other words, under a blur range of the lens of the LED 102, when the second portion 114 of the target medium 108 is present between the LED 102 and the photodiode 104, the sensor combination 100 will be recorded at the use calibration detection threshold 510. Successful detection, and regardless of whether the lens is blurred or not, when the first portion 112 of the target medium 108 is present between the LED 102 and the photodiode 104, the sensor combination 100 will not be recorded using the calibration detection threshold 510. Successful detection. Accordingly, the user can test the transmittance of the target medium 108 to determine the difference between the first portion 112 and the second portion 114, and the resulting information can be used to select a reference bit to be applied to block 416 of method 400. The amount is reduced to obtain an appropriate adjusted calibration reference level. For example, as shown in FIGS. 5A and 5B, if the first portion 112 is between the LED 102 and the photodiode 104, the amount of light detected on the photodiode 104 is greater than the second portion 114 at the LED 102. When the distance between the photodiode 104 and the photodiode 104 is reduced by 20%, the reference level is reduced by more than 20%, which will result in the portion of the target medium 108 being in the LED 102 and the light 2 as described above with reference to FIG. 5B. Between the polar bodies 104, the light detected on the photodiode 104 always exceeds the detection level. It should be understood that in certain embodiments, the first portion 112 of the target medium 108 may be more transparent or reflective than the second portion 114 of the target medium 108, and thus may be required to reverse the need for detecting the target medium 108. Part of the conditions. The sensor assembly 100 can be designed or calibrated to detect a reduction in opacity (ie, an increase in transmittance or transparency). For example, when the light received on the photodiode 104 increases above a detection threshold, the sensor combination 100 can indicate a successful detection. Embodiments of the present disclosure may include advantages over prior solutions. Common optical sensor combinations are required to be screened after manufacture because combinations that have too many variations in manufacturing cannot be used for sensitive applications. The optical sensor combination through the screening must still be manually calibrated for use in a particular environment. In contrast, the optical sensor combination of the present application can be easily calibrated while responding to changes in manufacturing and use environments. Information and signals can be expressed using any of a variety of techniques and techniques. For example, voltage, current, electromagnetic waves, magnetic fields or magnetic particles, optical fields or light particles, or any combination of the above may represent data, instructions, commands, information, signals, etc. that may be mentioned in the foregoing description. Bits, symbols, and chips. General purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, Or, any combination of the above, which is designed to perform the functions described herein, implements or executes the various illustrated blocks and modules in a manner related to the disclosure of the present invention. A general purpose processor may be a microprocessor, but in an alternative embodiment, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor can also be implemented as a combination of computing devices (eg, a combination of a DSP and a microprocessor, a combination of multiple microprocessors, one or more microprocessors in conjunction with a DSP core) a combination, or any other such configuration).

100:光學感測器組合 102:發光二極體 104:光二極體 106:槽 108:目標介質 112:第一部分 114:第二部分 202:電源 204:振盪器 206:能帶隙參考電壓 208:類比前端 210:比較器 222:發光二極體驅動器 226:狀態機 228:多工器 214:記憶體 216:通訊介面 218:校準狀態接腳 220:輸出接腳 302:安定模式 304:操作模式 306:發光二極體驅動器啟用模式 308:發光二極體驅動器未啟用模式 310:校準模式 312:狀態模式 502:無調整的校準偵測臨界值 504:最小偵測臨界值 508:偵測臨界值 510:調整後的校準偵測臨界值100: Optical sensor combination 102: Light-emitting diode 104: Light diode 106: Slot 108: Target medium 112: First portion 114: Second portion 202: Power source 204: Oscillator 206: Bandgap reference voltage 208: Analog Front End 210: Comparator 222: Light Emitting Diode Driver 226: State Machine 228: Multiplexer 214: Memory 216: Communication Interface 218: Calibration Status Pin 220: Output Pin 302: Stabilization Mode 304: Operation Mode 306 : LED driver enable mode 308: LED driver not enabled mode 310: Calibration mode 312: State mode 502: Unadjusted calibration detection threshold 504: Minimum detection threshold 508: Detection threshold 510 : Adjusted calibration detection threshold

第1A圖示出根據本發明揭露的一實施例的一光學感測器組合。   第1B圖示出根據本發明揭露的一實施例的一替代光學感測器組合。   第2圖示出根據本發明揭露的一實施例的該光學感測器組合之一控制系統。   第3圖示出根據本發明揭露的一實施例的一狀態機的操作之一狀態圖。   第4圖示出根據本發明揭露的一實施例的用於自行校準該感測器組合的一方法之一方塊圖。   第5A圖示出一光二極體在室溫下接收的功率之一圖形。   第5B圖示出一光二極體在高溫下接收的功率之一圖形。FIG. 1A illustrates an optical sensor assembly in accordance with an embodiment of the present disclosure. FIG. 1B illustrates an alternative optical sensor assembly in accordance with an embodiment of the present disclosure. FIG. 2 illustrates a control system of the optical sensor assembly in accordance with an embodiment of the present disclosure. Figure 3 is a diagram showing one state of operation of a state machine in accordance with an embodiment of the present disclosure. 4 is a block diagram of a method for self-calibrating the sensor combination in accordance with an embodiment of the present disclosure. Figure 5A shows a graph of the power received by a photodiode at room temperature. Figure 5B shows a graph of the power received by a photodiode at high temperatures.

Claims (17)

一種校準方法,包含:由一控制器設定一偵測器的一初始偵測臨界值;逐漸增加與該偵測器及該控制器通訊的一信號產生器之功率位準,使該偵測器上被偵測到的功率超過該初始偵測臨界值;由該控制器將該偵測器上被偵測到的功率超過該初始偵測臨界值時的該信號產生器之一第一功率位準儲存在一記憶體;以及在該信號產生器的功率位準到達該第一功率位準之後,由該控制器將該偵測器的該初始偵測臨界值調整成使一調整後的偵測臨界值將一偵測緩衝量包含在該調整後的偵測臨界值內,其中該偵測緩衝量補償影響來自該信號產生器而在該偵測器被接收之信號的量之變化。 A calibration method includes: setting, by a controller, an initial detection threshold of a detector; gradually increasing a power level of a signal generator communicating with the detector and the controller, so that the detector The detected power exceeds the initial detection threshold; the first power bit of the signal generator when the detected power on the detector exceeds the initial detection threshold Pre-stored in a memory; and after the power level of the signal generator reaches the first power level, the controller adjusts the initial detection threshold of the detector to an adjusted Detector The detection threshold includes a detection buffer amount within the adjusted detection threshold, wherein the detection buffer amount compensates for a change in the amount of the signal received from the signal generator at the detector. 如申請專利範圍第1項之方法,其中該偵測器是一光偵測器,且該信號產生器是一發光二極體(LED)。 The method of claim 1, wherein the detector is a photodetector and the signal generator is a light emitting diode (LED). 如申請專利範圍第1項之方法,其中:將該初始偵測臨界值調整成包含該偵測緩衝量包含:減少該初始偵測臨界值。 The method of claim 1, wherein: adjusting the initial detection threshold to include the detection buffer comprises: reducing the initial detection threshold. 如申請專利範圍第1項之方法,其中: 將該初始偵測臨界值調整成包含該偵測緩衝量包含:增加該初始偵測臨界值。 For example, the method of claim 1 of the patent scope, wherein: Adjusting the initial detection threshold to include the detection buffer includes: increasing the initial detection threshold. 如申請專利範圍第1項之方法,進一步包含:在逐漸增加該信號產生器之功率位準之前,將一目標介質放置在該信號產生器與該偵測器之間的一通訊路徑中。 The method of claim 1, further comprising: placing a target medium in a communication path between the signal generator and the detector before gradually increasing the power level of the signal generator. 如申請專利範圍第1項之方法,進一步包含:在該控制器上接收來自一使用者的包括係為複數個離散位準中之一位準的該初始偵測臨界值的一偵測臨界值設定信號;在該控制器上接收來自該使用者的用於指示該控制器開始逐漸增加該信號產生器的功率位準的一校準信號;以及在該控制器上接收來自該使用者的包括用於調整該初始偵測臨界值的一使用者可程式化的量的一臨界值改變信號。 The method of claim 1, further comprising: receiving, on the controller, a detection threshold from a user comprising the initial detection threshold value of one of a plurality of discrete levels Setting a signal; receiving, on the controller, a calibration signal from the user for instructing the controller to begin gradually increasing the power level of the signal generator; and receiving, on the controller, the user from the user A threshold value change signal for a user programmable amount of the initial detection threshold. 如申請專利範圍第1項之方法,進一步包含:在儲存了該偵測器上被偵測到的功率超過該初始偵測臨界值時的該信號產生器之功率位準之後,在該記憶體中將一校準旗標設定成指示已發生了校準。 The method of claim 1, further comprising: after storing the power level of the signal generator when the detected power on the detector exceeds the initial detection threshold, in the memory A calibration flag is set to indicate that calibration has occurred. 如申請專利範圍第1項之方法,進一步包含: 在增加該功率位準之前,在該偵測器的一類比前端放大器上設定一增益;在增加該功率位準之前,由該偵測器的該類比前端放大器將該增益應用於該功率位準;在將該信號產生器的功率位準逐漸增加到一最大功率位準之後,如果尚未超過該初始偵測臨界值,則增加該類比前端放大器上的增益;以及在增加該增益之後,由該信號產生器逐漸增加該信號產生器的功率位準,直到該偵測器上被偵測到的功率超過該初始偵測臨界值為止。 For example, the method of claim 1 of the patent scope further includes: Before increasing the power level, setting a gain on a type of front-end amplifier of the detector; applying the gain to the power level by the analog front-end amplifier of the detector before increasing the power level After gradually increasing the power level of the signal generator to a maximum power level, if the initial detection threshold has not been exceeded, increasing the gain on the analog front end amplifier; and after increasing the gain, The signal generator gradually increases the power level of the signal generator until the detected power on the detector exceeds the initial detection threshold. 一種電腦程式產品,其具有可有形地記錄用於校準偵測器及信號產生器的電腦程式邏輯的電腦可讀取的媒體,該電腦程式產品包含:用於設定該偵測器的一初始偵測臨界值之程式碼;用於逐漸增加與該偵測器通訊的該信號產生器之功率位準而使該偵測器上被偵測到的功率超過該初始偵測臨界值之程式碼;用於將該偵測器上被偵測到的功率超過該初始偵測臨界值時的該信號產生器之一第一功率位準儲存在一記憶體之程式碼;以及用於在該信號產生器的功率位準到達該第一功率位準之後將該偵測器的該初始偵測臨界值調整成使一調整後的偵測臨界值將一偵測緩衝量包含在該調整後的偵測臨界值 內之程式碼,其中該偵測緩衝量補償影響來自該信號產生器而在該偵測器被接收之信號的量之變化。 A computer program product having computer readable media tangibly recording computer program logic for calibrating a detector and a signal generator, the computer program product comprising: an initial detect for setting the detector a code for measuring a threshold value; a code for gradually increasing a power level of the signal generator that communicates with the detector such that the detected power on the detector exceeds the initial detection threshold; a first power level of the signal generator for detecting that the detected power on the detector exceeds the initial detection threshold is stored in a memory code; and for generating the signal After the power level of the device reaches the first power level, the initial detection threshold of the detector is adjusted such that an adjusted detection threshold includes a detection buffer amount in the adjusted detection. Threshold The code within the code, wherein the detection buffer amount compensates for a change in the amount of signal received from the signal generator at the detector. 如申請專利範圍第9項的電腦程式產品,其具有可有形地記錄用於校準偵測器及信號產生器的電腦程式邏輯的電腦可讀取的媒體,該電腦程式產品進一步包含:用於自一使用者接收包括係為複數個離散位準中之一位準的該初始偵測臨界值的一偵測臨界值設定信號之程式碼;用於自該使用者接收用於指示該電腦程式產品開始逐漸增加該信號產生器的功率位準的一校準信號之程式碼;以及用於自該使用者接收包括用於調整該初始偵測臨界值的一使用者可程式化的量的一臨界值改變信號之程式碼。 A computer program product as claimed in claim 9 having a computer readable medium tangibly recording computer program logic for calibrating the detector and the signal generator, the computer program product further comprising: Receiving, by a user, a code of a detection threshold setting signal including the initial detection threshold of one of a plurality of discrete levels; for receiving from the user for indicating the computer program product Generating a code of a calibration signal that gradually increases the power level of the signal generator; and receiving a threshold from the user for including a user programmable amount for adjusting the initial detection threshold Change the code of the signal. 如申請專利範圍第9項的電腦程式產品,其具有可有形地記錄用於校準偵測器及信號產生器的電腦程式邏輯的電腦可讀取的媒體,該電腦程式產品進一步包含:用於在增加該功率位準之前在該偵測器的一類比前端放大器上設定一增益之程式碼;用於在增加該功率位準之前由該偵測器的該類比前端放大器將該增益應用於該功率位準之程式碼;用於在將該信號產生器的功率位準逐漸增加到一最大功率位準之後如果尚未超過該初始偵測臨界值則增加該類 比前端放大器上的增益之程式碼;以及用於在增加該增益之後由該信號產生器逐漸增加該信號產生器的功率位準直到該偵測器上被偵測到的功率超過該初始偵測臨界值為止之程式碼。 A computer program product as claimed in claim 9 having a computer readable medium tangibly recording computer program logic for calibrating the detector and the signal generator, the computer program product further comprising: A gain code is set on a type of front-end amplifier of the detector before the power level is increased; the gain is applied to the power by the analog front-end amplifier of the detector before the power level is increased a level code; for increasing the power level of the signal generator to a maximum power level, if the initial detection threshold has not been exceeded a code that is higher than the gain on the front-end amplifier; and is used by the signal generator to gradually increase the power level of the signal generator after the gain is increased until the detected power on the detector exceeds the initial detection The code of the threshold value. 如申請專利範圍第9項的電腦程式產品,其具有可有形地記錄用於校準偵測器及信號產生器的電腦程式邏輯的電腦可讀取的媒體,其中:用於將該初始偵測臨界值調整成包含該偵測緩衝量之該程式碼包含用於增加或減少該初始偵測臨界值之程式碼。 A computer program product as claimed in claim 9 having a computer readable medium tangibly recording computer program logic for calibrating the detector and the signal generator, wherein: for initial detection of the threshold The value adjusted to include the detected buffer amount includes a code for increasing or decreasing the initial detection threshold. 一種計算裝置,包含:容納機器可讀取的媒體之一記憶體,該機器可讀取的媒體包含機器可執行碼,該機器可執行碼具有被儲存於其中的用於執行校準一感測器及一信號產生器的一方法之指令;被耦合到該記憶體的一處理器,該處理器被配置成執行該機器可執行碼,用於使該處理器執行下列操作:設定該感測器的一初始偵測臨界值;逐漸增加與該感測器通訊的該信號產生器之功率位準,使該感測器上被偵測到的功率超過該初始偵測臨界值;將該感測器上被偵測到的功率超過該初始偵測臨 界值時的該信號產生器之一第一功率位準儲存在一記憶體;以及在該信號產生器到達該第一功率位準之後,將該感測器的該初始偵測臨界值調整成使一調整後的偵測臨界值將一偵測緩衝量包含在該調整後的偵測臨界值內,其中該偵測緩衝量補償影響來自該信號產生器而在該感測器被接收之信號的量之變化。 A computing device comprising: a memory accommodating a machine readable medium, the machine readable medium comprising a machine executable code having stored therein a sensor for performing calibration And a method of a signal generator; a processor coupled to the memory, the processor configured to execute the machine executable code for causing the processor to: set the sensor An initial detection threshold; gradually increasing the power level of the signal generator in communication with the sensor such that the detected power on the sensor exceeds the initial detection threshold; The detected power on the device exceeds the initial detection a first power level of the signal generator at a threshold value is stored in a memory; and after the signal generator reaches the first power level, the initial detection threshold of the sensor is adjusted to Having an adjusted detection threshold include a detection buffer amount within the adjusted detection threshold, wherein the detection buffer amount compensates for a signal received from the signal generator and received at the sensor The amount of change. 如申請專利範圍第13項的計算裝置,該處理器被進一步配置成執行該機器可執行碼,用於使該處理器執行下列操作:接收來自一使用者的包括係為複數個離散位準中之一位準的該初始偵測臨界值的一偵測臨界值設定信號;接收來自該使用者的用於指示該處理器開始逐漸增加該信號產生器的功率位準的一校準信號;以及接收來自該使用者的包括用於調整該初始偵測臨界值的一使用者可程式化的量的一臨界值改變信號。 The computing device of claim 13, wherein the processor is further configured to execute the machine executable code for causing the processor to perform the operation of: receiving a plurality of discrete levels from a user a detection threshold setting signal of the initial detection threshold; receiving a calibration signal from the user for instructing the processor to start gradually increasing the power level of the signal generator; and receiving A threshold value change signal from the user including a user programmable amount for adjusting the initial detection threshold. 如申請專利範圍第13項的計算裝置,該處理器被進一步配置成執行該機器可執行碼,用於使該處理器執行下列操作:在增加該功率位準之前,在該感測器的一類比前端放大器上設定一增益;在增加該功率位準之前,由該感測器的該類比前端放 大器將該增益應用於該功率位準;在將該信號產生器的功率位準逐漸增加到一最大功率位準之後,如果尚未超過該初始偵測臨界值,則增加該類比前端放大器上的增益;以及在增加該增益之後,由該信號產生器逐漸增加該信號產生器的功率位準,直到該感測器上被偵測到的功率超過該初始偵測臨界值為止。 The computing device of claim 13, wherein the processor is further configured to execute the machine executable code for causing the processor to perform an operation of: adding one of the sensors before increasing the power level Setting a gain on the analog front-end amplifier; before adding the power level, the analog front end of the sensor is placed Applying the gain to the power level; increasing the power level of the signal generator to a maximum power level, if the initial detection threshold has not been exceeded, increasing the analog front end amplifier Gain; and after increasing the gain, the signal generator gradually increases the power level of the signal generator until the detected power on the sensor exceeds the initial detection threshold. 如申請專利範圍第13項的計算裝置,其中使該處理器將該初始偵測臨界值調整成包含一偵測緩衝量的該機器可執行碼使該初始偵測臨界值被減少。 The computing device of claim 13, wherein the processor is configured to adjust the initial detection threshold to the machine executable code including a detection buffer amount such that the initial detection threshold is reduced. 如申請專利範圍第13項的計算裝置,其中使該處理器將該初始偵測臨界值調整成包含一偵測緩衝量的該機器可執行碼使該初始偵測臨界值被增加。The computing device of claim 13, wherein the processor is configured to adjust the initial detection threshold to the machine executable code including a detection buffer amount such that the initial detection threshold is increased.
TW106138818A 2017-11-09 2017-11-09 Self-calibrating optical detector TWI668999B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW106138818A TWI668999B (en) 2017-11-09 2017-11-09 Self-calibrating optical detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106138818A TWI668999B (en) 2017-11-09 2017-11-09 Self-calibrating optical detector

Publications (2)

Publication Number Publication Date
TW201919384A TW201919384A (en) 2019-05-16
TWI668999B true TWI668999B (en) 2019-08-11

Family

ID=67347860

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106138818A TWI668999B (en) 2017-11-09 2017-11-09 Self-calibrating optical detector

Country Status (1)

Country Link
TW (1) TWI668999B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070188337A1 (en) * 2004-07-09 2007-08-16 Tyco Safety Products Canada Ltd. Smoke detector calibration
US20100085199A1 (en) * 2008-10-03 2010-04-08 Universal Security Instruments, Inc. Dynamic Alarm Sensitivity Adjustment and Auto-Calibrating Smoke Detection

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070188337A1 (en) * 2004-07-09 2007-08-16 Tyco Safety Products Canada Ltd. Smoke detector calibration
US20100085199A1 (en) * 2008-10-03 2010-04-08 Universal Security Instruments, Inc. Dynamic Alarm Sensitivity Adjustment and Auto-Calibrating Smoke Detection

Also Published As

Publication number Publication date
TW201919384A (en) 2019-05-16

Similar Documents

Publication Publication Date Title
US10876966B2 (en) Self-calibrating optical detector
US11397249B2 (en) Light detection device and electronic apparatus comprising a reverse bias voltage adjustment in accordance with a pulse number output by a first SPAD array
KR100726860B1 (en) Automatic power control and laser slope efficiency normalization circuit
JP2007532062A (en) Analog-to-digital conversion signal processing in optoelectronic transceivers.
JP2010206168A (en) Photodetector, object detector using same, and disc device
WO2005013648A2 (en) Optoelectronic transceiver having dual access to onboard diagnostics
CN103339477B (en) Electronics with flexible data and power interfaces
US7509050B2 (en) Microcode-driven self-calibration of optical transceivers to environmental conditions
US7061951B2 (en) Systems and methods for automatic power control of laser diodes
TWI810413B (en) Method for performing automatic recovery after a system hard fault has occurred and optical communications module using the same
WO2021163794A1 (en) Multi-channel programmable detection sensor
US7539423B2 (en) Loss of signal detection and programmable behavior after error detection
TWI668999B (en) Self-calibrating optical detector
JP2003324239A (en) Drive circuit of light emitting element
TWI697234B (en) Self-calibrating optical detector
KR20070104572A (en) Programmable Signal Loss Detection Hardware and Method
JP5962097B2 (en) Recording material discrimination sensor and image forming apparatus
EP1485736B1 (en) Maintaining desirable performance of optical emitters at extreme temperatures
US7417940B2 (en) Apparatus for and method of controlling photo diode using digital potentiometer
CN115436915A (en) Optical sensing device with temperature compensation
US10295377B2 (en) Systems and methods providing synchronization for multiple optical detectors wherein a radiant power delivered to a second light detector from a first light source is at least 25 percent of radiant power delivered to a first light detector from the first light source
KR101579558B1 (en) Apparatus for sensing laser
JP5381497B2 (en) Multi-beam laser light quantity control circuit and image forming apparatus using multi-beam laser light quantity control circuit
CN116034288A (en) Proximity sensing
JP5024501B2 (en) Laser diode light source, optical disk device

Legal Events

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