JPWO2017199550A1 - Proximity sensor, proximity illuminance sensor, electronic device, and proximity sensor calibration method - Google Patents

Proximity sensor, proximity illuminance sensor, electronic device, and proximity sensor calibration method Download PDF

Info

Publication number
JPWO2017199550A1
JPWO2017199550A1 JP2018518117A JP2018518117A JPWO2017199550A1 JP WO2017199550 A1 JPWO2017199550 A1 JP WO2017199550A1 JP 2018518117 A JP2018518117 A JP 2018518117A JP 2018518117 A JP2018518117 A JP 2018518117A JP WO2017199550 A1 JPWO2017199550 A1 JP WO2017199550A1
Authority
JP
Japan
Prior art keywords
calibration
value
offset value
proximity sensor
light
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2018518117A
Other languages
Japanese (ja)
Other versions
JP6641469B2 (en
Inventor
濱口 弘治
弘治 濱口
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Publication of JPWO2017199550A1 publication Critical patent/JPWO2017199550A1/en
Application granted granted Critical
Publication of JP6641469B2 publication Critical patent/JP6641469B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/04Systems determining the presence of a target
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/06Systems determining position data of a target
    • G01S17/08Systems determining position data of a target for measuring distance only
    • G01S17/10Systems determining position data of a target for measuring distance only using transmission of interrupted, pulse-modulated waves
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/48Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
    • G01S7/481Constructional features, e.g. arrangements of optical elements
    • G01S7/4811Constructional features, e.g. arrangements of optical elements common to transmitter and receiver
    • G01S7/4813Housing arrangements
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/48Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
    • G01S7/481Constructional features, e.g. arrangements of optical elements
    • G01S7/4814Constructional features, e.g. arrangements of optical elements of transmitters alone
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/48Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
    • G01S7/481Constructional features, e.g. arrangements of optical elements
    • G01S7/4816Constructional features, e.g. arrangements of optical elements of receivers alone
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/48Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
    • G01S7/497Means for monitoring or calibrating
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/94Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the way in which the control signals are generated
    • H03K17/941Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the way in which the control signals are generated using an optical detector
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/94Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the way in which the control signals are generated
    • H03K17/945Proximity switches
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K2217/00Indexing scheme related to electronic switching or gating, i.e. not by contact-making or -breaking covered by H03K17/00
    • H03K2217/94Indexing scheme related to electronic switching or gating, i.e. not by contact-making or -breaking covered by H03K17/00 characterised by the way in which the control signal is generated
    • H03K2217/9401Calibration techniques
    • H03K2217/94026Automatic threshold calibration; e.g. threshold automatically adapts to ambient conditions or follows variation of input
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K2217/00Indexing scheme related to electronic switching or gating, i.e. not by contact-making or -breaking covered by H03K17/00
    • H03K2217/94Indexing scheme related to electronic switching or gating, i.e. not by contact-making or -breaking covered by H03K17/00 characterised by the way in which the control signal is generated
    • H03K2217/941Indexing scheme related to electronic switching or gating, i.e. not by contact-making or -breaking covered by H03K17/00 characterised by the way in which the control signal is generated using an optical detector
    • H03K2217/94102Indexing scheme related to electronic switching or gating, i.e. not by contact-making or -breaking covered by H03K17/00 characterised by the way in which the control signal is generated using an optical detector characterised by the type of activation
    • H03K2217/94108Indexing scheme related to electronic switching or gating, i.e. not by contact-making or -breaking covered by H03K17/00 characterised by the way in which the control signal is generated using an optical detector characterised by the type of activation making use of reflection

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Electromagnetism (AREA)
  • Geophysics And Detection Of Objects (AREA)
  • Electronic Switches (AREA)

Abstract

近接センサ(100)は、光を出射する発光部(101)と、物体反射光電流と否検知対象物体反射光電流とを含む測定電流を発生する受光部(102)と、測定電流値が初期閾値以下である場合に、否検知対象物体反射光電流に応じたオフセット値を測定電流値に基づき更新する初期キャリブレーション実行部(120)と、を備える。The proximity sensor (100) includes a light emitting unit (101) that emits light, a light receiving unit (102) that generates a measurement current including an object reflected photocurrent and a non-detection target object reflected photocurrent, and an initial measurement current value. And an initial calibration execution unit (120) that updates an offset value corresponding to the non-detection target object reflected photocurrent based on the measured current value when it is equal to or less than the threshold value.

Description

本発明は、検知物の近接を検知する近接センサ、近接照度センサに関する。   The present invention relates to a proximity sensor and a proximity illuminance sensor that detect the proximity of a detection object.

近年、携帯電話、スマートフォン、メディアプレーヤーなどに代表される、タッチパネル付きの画面(例えば液晶画面)を備えるモバイル機器(電子機器、より具体的にはポータブル電子機器)が、幅広く利用されている。多機能化、小型化または薄型化が進む上記モバイル機器に、近接する物体の有無を検出(検知)する近接センサを搭載したものが登場している。   In recent years, mobile devices (electronic devices, more specifically portable electronic devices) having a screen with a touch panel (for example, a liquid crystal screen) represented by mobile phones, smartphones, media players, and the like have been widely used. A mobile device equipped with a proximity sensor that detects (detects) the presence or absence of a nearby object has appeared in the above-described mobile devices that are becoming more multifunctional, smaller, or thinner.

従来の近接センサ、およびそのキャリブレーション方法について図8〜図11を用いて説明する。図8は、従来の近接センサ900の動作原理を説明するための図である。図9は近接センサ900の問題を説明するための図である。図10は近接センサ900の概略構成を示す機能ブロック図である。図11は、近接センサ900のキャリブレーションの処理の流れの一例を示すフローチャートである。なお、図9のLED発光Pは、発光部901を発光させるためのパルス信号を示す。   A conventional proximity sensor and a calibration method thereof will be described with reference to FIGS. FIG. 8 is a diagram for explaining the operating principle of a conventional proximity sensor 900. FIG. 9 is a diagram for explaining the problem of the proximity sensor 900. FIG. 10 is a functional block diagram showing a schematic configuration of the proximity sensor 900. FIG. 11 is a flowchart showing an example of a calibration processing flow of the proximity sensor 900. 9 indicates a pulse signal for causing the light emitting unit 901 to emit light.

従来の近接センサ900には様々な方式があるが、携帯電話やメディアプレーヤー等の小型の携帯端末では、光検知方式の近接センサ900が多く利用されている。光検知方式の近接センサ900は、図8に示すように、近接センサ900内の発光部901から出射された出射光L1を物体OBに反射させ、反射光L2を近接センサ900内の受光部902で受光することにより、物体が近接していることを判断する。   There are various types of the proximity sensor 900 in the past, and a light detection type proximity sensor 900 is often used in small portable terminals such as mobile phones and media players. As shown in FIG. 8, the proximity sensor 900 of the light detection type reflects the emitted light L1 emitted from the light emitting unit 901 in the proximity sensor 900 to the object OB, and the reflected light L2 in the light receiving unit 902 in the proximity sensor 900. By receiving the light, it is determined that the object is close.

このような光検知方式の近接センサ900では、図9および図10に示すように、携帯電話950の筐体960内部に組み込まれて利用されることがある。この場合、発光部901から出射された出射光L1が筐体960に反射され、筺体960からの反射光L3を受光部902が受光することがある。   In such a light detection type proximity sensor 900, as shown in FIG. 9 and FIG. 10, it may be used by being incorporated in a housing 960 of a mobile phone 950. In this case, the emitted light L1 emitted from the light emitting unit 901 is reflected by the housing 960, and the light receiving unit 902 may receive the reflected light L3 from the housing 960.

ここで、発光部901から出射された出射光L1が筐体960に反射されたことによる、反射光L3の反射光量は、携帯電話の個体毎および使用環境で変化する。したがって、筺体960からの反射光L3を受光部902が受光すると、個体毎による反射光L3の反射光量の違いにより検出距離の誤差や誤動作を招く可能性がある。   Here, the reflected light amount of the reflected light L3 due to the reflected light L1 emitted from the light emitting unit 901 being reflected by the housing 960 varies depending on the individual mobile phone and the usage environment. Therefore, when the light receiving unit 902 receives the reflected light L3 from the housing 960, an error in detection distance or a malfunction may occur due to the difference in the amount of reflected light of the reflected light L3 for each individual.

このような経緯から、様々な実装条件において同等の特性を有する近接センサ(物体検出装置)の実現が強く求められている。なお、上記特性を示す指標として、検出距離(被検出対象が近接したと判断される際の、被検出対象と近接センサとの間の距離)や誤動作の発生確率が挙げられる。   From such circumstances, there is a strong demand for the realization of a proximity sensor (object detection device) having equivalent characteristics under various mounting conditions. In addition, examples of the index indicating the above characteristics include a detection distance (a distance between the detection target and the proximity sensor when it is determined that the detection target is close) and a malfunction occurrence probability.

なお、反射光L3の反射光量が、携帯電話950の個体毎および使用環境で変化する原因として以下のことが考えられる。すなわち、携帯電話950の工場出荷時の製造起因、携帯端末950の経年劣化による汚れや内部構造の変化、近接センサ900の携帯電話950における搭載位置、近接センサ900を搭載後の携帯電話950の筐体表面における形状等の条件(近接センサの実装条件)等、がメーカー毎や機種毎に様々であるためである。この理由として、携帯電話950(電子機器)のデザイン面や設計上の制約が挙げられる。   In addition, the following may be considered as a cause that the reflected light amount of the reflected light L3 changes for each individual mobile phone 950 and the usage environment. That is, due to manufacturing at the time of factory shipment of the mobile phone 950, dirt and changes in internal structure due to aging of the mobile terminal 950, the mounting position of the proximity sensor 900 on the mobile phone 950, the housing of the mobile phone 950 after mounting the proximity sensor 900 This is because conditions such as the shape on the body surface (proximity sensor mounting conditions) and the like vary from manufacturer to manufacturer and from model to model. The reason for this is the design aspect of the cellular phone 950 (electronic device) and design restrictions.

従来、筺体960からの反射光L3による誤動作を防ぐための対策として、近接センサのキャリブレーション手法があり、例えば、特許文献1に記載されている。   Conventionally, as a countermeasure for preventing malfunction due to reflected light L3 from the casing 960, there is a proximity sensor calibration method, which is described in Patent Document 1, for example.

特許文献1に記載されているキャリブレーション手法と同様のキャリブレーション手法の概要について、図10および図11に基づき説明する。   An outline of a calibration method similar to the calibration method described in Patent Document 1 will be described with reference to FIGS.

具体的には、携帯電話950は、近接センサ900、携帯制御部951、および表示部952を備えている。近接センサ900は、発光部901、受光部902、AD変換部903、記憶部904、およびセンサ制御部910を備えている。   Specifically, the mobile phone 950 includes a proximity sensor 900, a mobile control unit 951, and a display unit 952. The proximity sensor 900 includes a light emitting unit 901, a light receiving unit 902, an AD conversion unit 903, a storage unit 904, and a sensor control unit 910.

発光部901は、センサ制御部910からの電流の供給を受けて赤外線を発光する赤外LED(Light Emitting Diode)である。受光部902は、発光部901から出射され物体OBによって反射された赤外線(反射光L2)を受光し、光電変換により受光した光の量に応じた電流を発生させる。発生した電流はAD変換部903に出力される。   The light emitting unit 901 is an infrared LED (Light Emitting Diode) that emits infrared light when supplied with current from the sensor control unit 910. The light receiving unit 902 receives infrared light (reflected light L2) emitted from the light emitting unit 901 and reflected by the object OB, and generates a current corresponding to the amount of light received by photoelectric conversion. The generated current is output to the AD conversion unit 903.

記憶部904には、予め所定の閾値が記憶されており、記憶された閾値がセンサ制御部910に読み出される一方、センサ制御部910によって、記憶された閾値が更新される。   A predetermined threshold value is stored in the storage unit 904 in advance, and the stored threshold value is read by the sensor control unit 910, while the stored threshold value is updated by the sensor control unit 910.

AD変換部903は、受光部902から出力された電流をAD変換(アナログ−デジタル変換)し、デジタル信号で表された値をセンサ制御部910に出力する。   The AD conversion unit 903 performs AD conversion (analog-digital conversion) on the current output from the light receiving unit 902 and outputs a value represented by a digital signal to the sensor control unit 910.

センサ制御部910は、携帯電話950からの発信または携帯電話950への着信を示す発着信情報が携帯制御部951から入力されるたびに、発光部901に電流を供給して発光部901を発光させる。このとき、センサ制御部910は、AD変換部903から出力された電流値に応じて、新たな閾値を生成して、閾値記憶部904に記憶させる閾値更新を行う。この一連の処理をキャリブレーションという。   The sensor control unit 910 supplies current to the light emitting unit 901 to emit light from the light emitting unit 901 each time incoming / outgoing information indicating a call from the mobile phone 950 or an incoming call to the mobile phone 950 is input from the mobile control unit 951. Let At this time, the sensor control unit 910 generates a new threshold value according to the current value output from the AD conversion unit 903 and updates the threshold value stored in the threshold value storage unit 904. This series of processing is called calibration.

キャリブレーションを行ったセンサ制御部910は、発光部901を発光させ、AD変換部903から出力された電流値と、記憶部904から読み出した閾値(閾値が更新されていれば、その閾値)との大小比較を行い、比較結果に基づいて、ユーザの近接を検知する。ユーザの近接を検知した場合には、センサ制御部910は検知情報を携帯制御部951に出力する。   The sensor control unit 910 that has performed the calibration causes the light emitting unit 901 to emit light, the current value output from the AD conversion unit 903, and the threshold value read from the storage unit 904 (if the threshold value has been updated, the threshold value). The user's proximity is detected based on the comparison result. When the proximity of the user is detected, the sensor control unit 910 outputs detection information to the portable control unit 951.

すなわち、近接センサ900は、携帯電話950の発信および着信のたびにフロアノイズを測定し、キャリブレーションを行ってから、物体(ユーザ)の近接を検知し、近接を示す検知情報を携帯電話950の携帯制御部951に出力する。制御部951は、近接センサ900からユーザの近接を示す検知情報が入力された場合、例えば、タッチパネルの機能をオフし、表示部952の表示をオフにするよう制御する。   That is, the proximity sensor 900 measures the floor noise every time when the mobile phone 950 makes and receives calls, performs calibration, detects the proximity of an object (user), and detects the detection information indicating the proximity of the mobile phone 950. The data is output to the portable control unit 951. When the detection information indicating the proximity of the user is input from the proximity sensor 900, for example, the control unit 951 controls to turn off the function of the touch panel and turn off the display of the display unit 952.

次に、近接センサ900のキャリブレーションの処理の流れの一例を、図11を用いて説明する。   Next, an example of the calibration processing flow of the proximity sensor 900 will be described with reference to FIG.

まず、センサ制御部910は、携帯電話950の携帯制御部951から発着信情報を取得したか否かを判定する(S1001)。発着信情報を取得した場合(S1001でYES)、センサ制御部910は、発光部901に電流を供給して発光させ(S1002)、AD変換部903から出力された電流値に応じて新たな閾値を生成し、記憶部904に記憶している閾値を更新する(S1003)。S1001〜S1003は、携帯電話950の発着信があった場合、すなわち、近接センサ900を起動する際、近接センサ900で行われるキャリブレーション処理を示している。なお、発着信情報を取得していない場合(S1001でNO)、発着信情報を取得判定S1001に戻る。   First, the sensor control unit 910 determines whether or not outgoing / incoming information has been acquired from the mobile control unit 951 of the mobile phone 950 (S1001). When the outgoing / incoming information is acquired (YES in S1001), the sensor control unit 910 supplies current to the light emitting unit 901 to emit light (S1002), and a new threshold value is set according to the current value output from the AD conversion unit 903. And the threshold value stored in the storage unit 904 is updated (S1003). S1001 to S1003 indicate a calibration process performed by the proximity sensor 900 when the mobile phone 950 is made, that is, when the proximity sensor 900 is activated. If the outgoing / incoming information has not been acquired (NO in S1001), the outgoing / incoming information is returned to the acquisition determination S1001.

次に、センサ制御部910は発光部901に電流を供給して発光させ(S1004)、AD変換部903から出力された電流値と、記憶部904から読み出した閾値との大小比較を行い、電流値が閾値以上か否かを判定する(S1005)。電流値が閾値以上である場合(S1005でYES)、センサ制御部910は検知対象物の近接を検知したと判断し(S1006)、検知情報を携帯制御部951に出力する。電流値が閾値未満である場合(S1005でNO)、センサ制御部910は、検知対象物の近接なしと判断し(S1007)、処理を終了する。   Next, the sensor control unit 910 supplies current to the light emitting unit 901 to emit light (S1004), compares the current value output from the AD conversion unit 903 with the threshold value read from the storage unit 904, and compares the current value. It is determined whether or not the value is greater than or equal to a threshold value (S1005). If the current value is equal to or greater than the threshold value (YES in S1005), the sensor control unit 910 determines that the proximity of the detection target has been detected (S1006), and outputs detection information to the portable control unit 951. If the current value is less than the threshold value (NO in S1005), the sensor control unit 910 determines that there is no proximity of the detection target (S1007), and ends the process.

これにより、携帯電話950の発着信があった場合に近接センサ900のキャリブレーションを行うことにより、例えば、工場出荷前の調整工程での様々な外的要因、内部構造の経年変化などによってフロアノイズが変化した場合でも、ユーザの近接を正確に検知することができる。   As a result, when the mobile phone 950 is made / received, the proximity sensor 900 is calibrated, for example, due to various external factors in the adjustment process before factory shipment, aging of the internal structure, etc. Even when changes occur, the proximity of the user can be accurately detected.

日本国公開特許公報「特開2013−118565号公報(2013年6月13日公開)」Japanese Patent Publication “JP 2013-118565 A (published on June 13, 2013)”

しかしながら、上述のような従来技術には、以下のような問題点がある。すなわち、携帯電話の使用例として発着信時に携帯電話前面に必ずしも検知対象物の近接がないとは限らない。例えば、ユーザが携帯電話を操作中、ポケットや鞄等に入れている状態、または、カバー付きのケースを使用している等において発着信があった場合、検知対象物の近接がある状態でキャリブレーション処理を行ってしまう。その結果、記憶部904に記憶される閾値が大きくなり、その後検知対象物の近接があっても近接を検知できず、例えば、タッチパネルの機能をオフできず携帯電話を顔に当てた際に、タッチパネルが反応し携帯電話が誤動作してしまうという問題点がある。   However, the conventional techniques as described above have the following problems. That is, as an example of use of a mobile phone, there is not always a proximity of an object to be detected on the front surface of the mobile phone when making or receiving a call. For example, if a user makes or receives a call while operating a mobile phone, putting it in a pocket or bag, or using a case with a cover, the calibration is performed with the proximity of the detection target. Process. As a result, the threshold value stored in the storage unit 904 becomes large, and even if there is a proximity of the detection target, the proximity cannot be detected, for example, when the touch panel function cannot be turned off, There is a problem that the touch panel reacts and the mobile phone malfunctions.

本発明は、前記の問題点に鑑みてなされたものであり、その目的は、キャリブレーションを最適に実行することで近接を正確に検知することができる近接センサを実現することにある。   The present invention has been made in view of the above problems, and an object of the present invention is to realize a proximity sensor that can accurately detect proximity by performing calibration optimally.

上記の課題を解決するために、本発明の一態様に係る近接センサは、光を出射する発光部と、前記発光部から出射され検知対象物体によって反射された反射光の受光量に応じた物体反射光電流と、前記反射光以外の光の受光量に応じた否検知対象物体反射光電流と、を含む測定電流を発生する受光部と、前記測定電流の電流値が初期閾値以下である場合に前記否検知対象物体反射光電流の電流値に応じたオフセット値を前記測定電流の電流値に基づき更新し、前記測定電流の電流値が前記初期閾値より大きい場合に前記オフセット値を更新しない第1キャリブレーションを実行する第1実行部と、を備えることを特徴とする。   In order to solve the above-described problem, a proximity sensor according to one embodiment of the present invention includes a light-emitting unit that emits light, and an object that corresponds to the amount of reflected light that is emitted from the light-emitting unit and reflected by the detection target object. A light receiving unit that generates a measurement current including a reflected photocurrent and a non-detection target object reflected photocurrent according to the amount of received light other than the reflected light, and a current value of the measurement current is equal to or less than an initial threshold value And updating the offset value according to the current value of the non-detection target object reflected photocurrent based on the current value of the measurement current, and not updating the offset value when the current value of the measurement current is larger than the initial threshold value. And a first execution unit that executes one calibration.

上記の課題を解決するために、本発明の一態様に係る近接センサのキャリブレーション方法は、光を出射する発光ステップと、前記発光ステップにおいて出射され検知対象物体によって反射された反射光の受光量に応じた物体反射光電流と、前記反射光以外の光の受光量に応じた否検知対象物体反射光電流と、を含む測定電流を発生する受光ステップと、前記測定電流の電流値が初期閾値以下である場合に前記否検知対象物体反射光電流の電流値に応じたオフセット値を前記測定電流の電流値に基づき更新し、前記測定電流の電流値が前記初期閾値より大きい場合に前記オフセット値を更新しない第1キャリブレーションを実行する第1実行ステップと、を含むことを特徴とする。   In order to solve the above problems, a proximity sensor calibration method according to an aspect of the present invention includes a light emission step of emitting light, and a received light amount of reflected light emitted in the light emission step and reflected by a detection target object. A light receiving step for generating a measurement current including an object reflected photocurrent according to the light intensity and a non-detection target object reflected photocurrent according to the amount of received light other than the reflected light, and the current value of the measurement current is an initial threshold value The offset value according to the current value of the non-detection target object reflected photocurrent is updated based on the current value of the measurement current when the current value of the measurement current is larger than the initial threshold value when And a first execution step of executing a first calibration without updating.

本発明の一態様によれば、キャリブレーションを最適に実行することで近接を正確に検知することができる近接センサを実現することができる。   According to one embodiment of the present invention, it is possible to realize a proximity sensor that can accurately detect proximity by performing calibration optimally.

本発明の実施形態1に係る近接センサの概略構成を示す機能ブロック図である。It is a functional block diagram which shows schematic structure of the proximity sensor which concerns on Embodiment 1 of this invention. 上記近接センサの動作原理を説明するための図である。It is a figure for demonstrating the principle of operation of the said proximity sensor. 上記近接センサの初期キャリブレーションの処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the process of the initial calibration of the said proximity sensor. 上記近接センサの常時キャリブレーションの処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of the process of constant calibration of the said proximity sensor. 本発明の実施形態2に係る近接照度センサの概略構成を示す機能ブロック図である。It is a functional block diagram which shows schematic structure of the proximity illumination sensor which concerns on Embodiment 2 of this invention. 本発明の実施形態3に係る電子機器の一例を示す斜視図である。It is a perspective view which shows an example of the electronic device which concerns on Embodiment 3 of this invention. 上記電子機器の他の例を示す背面図である。It is a rear view which shows the other example of the said electronic device. 従来の近接センサの動作原理を説明するための図である。It is a figure for demonstrating the principle of operation of the conventional proximity sensor. 上記近接センサの問題を説明するための図である。It is a figure for demonstrating the problem of the said proximity sensor. 上記近接センサの概略構成を示す機能ブロック図である。It is a functional block diagram which shows schematic structure of the said proximity sensor. 上記近接センサのキャリブレーションの処理の流れの一例を示すフローチャートである。It is a flowchart which shows an example of the flow of a calibration process of the said proximity sensor.

〔実施形態1〕
本発明の実施形態1について、図1〜図4を参照して説明する。図1は本発明の実施形態1に係る近接センサ100の概略構成を示す機能ブロック図である。図2は近接センサ100の動作原理を説明するための図である。なお、図2のLED発光Pは、発光部101を発光させるためのパルス信号を示す。
Embodiment 1
Embodiment 1 of the present invention will be described with reference to FIGS. FIG. 1 is a functional block diagram showing a schematic configuration of a proximity sensor 100 according to Embodiment 1 of the present invention. FIG. 2 is a diagram for explaining the operation principle of the proximity sensor 100. 2 indicates a pulse signal for causing the light emitting unit 101 to emit light.

(近接センサの構成)
近接センサ100は、図1および図2に示すように、発光部101、受光部102、近接センサAD変換部103、記憶部104、カバー105、および近接センサ制御部110を備えている。
(Configuration of proximity sensor)
As shown in FIGS. 1 and 2, the proximity sensor 100 includes a light emitting unit 101, a light receiving unit 102, a proximity sensor AD conversion unit 103, a storage unit 104, a cover 105, and a proximity sensor control unit 110.

発光部101は、光を出射する。具体的には、発光部101は、後述する発光指示部111からの電流の供給を受けて光を出射する。発光部101は、例えば、赤外線を発光する赤外LEDを用いることができる。   The light emitting unit 101 emits light. Specifically, the light emitting unit 101 emits light in response to a current supplied from a light emission instruction unit 111 described later. As the light emitting unit 101, for example, an infrared LED that emits infrared light can be used.

受光部102は、発光部101から出射され検知対象物体(物体OB)によって反射された反射光の受光量に応じた検知対象物体反射光電流(以降、物体反射光電流と称する)と、上記反射光以外の光の受光量に応じた否検知対象物体反射光電流と、を含む測定電流を発生する。   The light receiving unit 102 includes a detection target object reflected photocurrent (hereinafter referred to as an object reflected photocurrent) corresponding to the amount of reflected light emitted from the light emitting unit 101 and reflected by the detection target object (object OB), and the reflection. A measurement current including a non-detection target object reflected photocurrent corresponding to the amount of received light other than light is generated.

具体的には、例えば、発光部101より射出された出射光L1は、図2に示すように、近接センサ100の外部に出力される。物体OBが、近接センサ100の近くにあった場合、出射光L1は物体OBにより反射される。物体OBにより反射された反射光L2は近接センサ100に入射され、受光部102で受光される。   Specifically, for example, the emitted light L1 emitted from the light emitting unit 101 is output to the outside of the proximity sensor 100 as shown in FIG. When the object OB is near the proximity sensor 100, the emitted light L1 is reflected by the object OB. The reflected light L <b> 2 reflected by the object OB enters the proximity sensor 100 and is received by the light receiving unit 102.

受光部102はフォトダイオード等で構成されており、光を検知することで測定電流を発生させる。測定電流は、発光部101から出射され物体OBによって反射された反射光L1の受光量に応じた物体反射光電流と、反射光L1以外の光(例えば、筐体11により反射された反射光L3)の受光量に応じた否検知対象物体反射光電流と、を含む。受光部102で発生した測定電流は近接センサAD変換部103に出力される。   The light receiving unit 102 includes a photodiode or the like, and generates a measurement current by detecting light. The measurement current includes an object reflected photocurrent according to the amount of reflected light L1 emitted from the light emitting unit 101 and reflected by the object OB, and light other than the reflected light L1 (for example, reflected light L3 reflected by the housing 11). The non-detection target object reflected photocurrent according to the amount of received light. The measurement current generated by the light receiving unit 102 is output to the proximity sensor AD conversion unit 103.

近接センサAD変換部103は、受光部102から出力された電流をAD変換(アナログ−デジタル変換)し、デジタル信号で表された値を後述する測定電流値取得部112に出力する。近接センサAD変換部103は積分回路およびコンパレータ回路等で構成されており、電流により流入される電荷を蓄積し、その電荷量を検出することでデジタル信号に変換することが可能である。近接センサAD変換部103で変換されたデジタル信号は検知物体OBとの距離に相関のあるデジタル値となり、測定電流値取得部112に出力される。   The proximity sensor AD conversion unit 103 performs AD conversion (analog-digital conversion) on the current output from the light receiving unit 102, and outputs a value represented by a digital signal to a measured current value acquisition unit 112 described later. The proximity sensor AD conversion unit 103 is configured by an integration circuit, a comparator circuit, and the like. The proximity sensor AD conversion unit 103 accumulates electric charge flowing in by current, and can convert it into a digital signal by detecting the amount of electric charge. The digital signal converted by the proximity sensor AD conversion unit 103 becomes a digital value correlated with the distance to the detected object OB, and is output to the measured current value acquisition unit 112.

記憶部104には、オフセット値が記憶されている。オフセット値は、否検知対象物体反射光電流の電流値に応じた値である。言い換えると、オフセット値は、物体OBがない状態で近接センサ100からの出力値を一定にするために用いられる値である。   The storage unit 104 stores an offset value. The offset value is a value corresponding to the current value of the non-detection target object reflected photocurrent. In other words, the offset value is a value used to make the output value from the proximity sensor 100 constant in the absence of the object OB.

また、記憶部104には、初期キャリブレーションのフラグが記憶されている。初期キャリブレーションフラグは初期キャリブレーションにおいてオフセット値を更新したか否かを記録するためのものである。例えば、初期キャリブレーションにおいてオフセット値を更新するとフラグが「1」と設定される。起動やリセット直後等、初期キャリブレーションが未実行の場合はフラグが「0」と設定されるようにしておく。また、キャリブレーションの異常状態等が発生し、強制的に外部から初期キャリブレーションを行う際に、外部からフラグを「0」に設定できるようにしておくことが望ましい。なお、フラグの数値は、それぞれの状態での値が反転しても問題はない。   The storage unit 104 stores an initial calibration flag. The initial calibration flag is for recording whether or not the offset value has been updated in the initial calibration. For example, when the offset value is updated in the initial calibration, the flag is set to “1”. If initial calibration is not executed, such as immediately after startup or reset, the flag is set to “0”. In addition, it is desirable that a flag can be set to “0” from the outside when an initial calibration is forcibly performed from the outside due to an abnormal calibration state or the like. It should be noted that there is no problem even if the value of the flag is inverted in each state.

カバー105は、出射光L1を透過させると共に、近接センサ100内部に異物が侵入するのを防ぐ。カバー105は出射光および反射光を透過させる樹脂またはガラス等で構成される。   The cover 105 transmits the emitted light L1 and prevents foreign matter from entering the proximity sensor 100. The cover 105 is made of resin or glass that transmits outgoing light and reflected light.

(近接センサ制御部の詳細)
近接センサ制御部110は、近接センサの起動時および通常の動作時において常にキャリブレーションの実行(オフセット値の更新)の有無を判定する。
(Details of proximity sensor control unit)
The proximity sensor control unit 110 always determines whether or not calibration is performed (offset value update) when the proximity sensor is activated and during normal operation.

近接センサ制御部110は、現在の近接センサ100の状態を判定し、キャリブレーションが不要であると判定した場合、オフセット値を更新しない。近接センサ制御部110は、オフセット値を更新しない場合、近接センサAD変換部103から入力されたデジタル値から記憶部104に記憶されているオフセット値を減算する。そして、その算出値を近接検知結果のデジタル値として、近接センサ100の外部に出力する。   When the proximity sensor control unit 110 determines the current state of the proximity sensor 100 and determines that calibration is not necessary, the proximity sensor control unit 110 does not update the offset value. When the proximity sensor control unit 110 does not update the offset value, the proximity sensor control unit 110 subtracts the offset value stored in the storage unit 104 from the digital value input from the proximity sensor AD conversion unit 103. Then, the calculated value is output to the outside of the proximity sensor 100 as a digital value of the proximity detection result.

また、近接センサ制御部110は、キャリブレーションが必要と判定した場合、初期キャリブレーションおよび常時キャリブレーションのいずれか、または両方を実行し、オフセット値を更新する。そして、近接センサ制御部110は、近接センサAD変換部103から入力されたデジタル値から記憶部104に記憶されているオフセット値を減算し、その算出値を近接検知結果のデジタル値として、近接センサ100の外部に出力する。   When the proximity sensor control unit 110 determines that calibration is necessary, the proximity sensor control unit 110 performs either or both of initial calibration and constant calibration, and updates the offset value. Then, the proximity sensor control unit 110 subtracts the offset value stored in the storage unit 104 from the digital value input from the proximity sensor AD conversion unit 103, and uses the calculated value as the digital value of the proximity detection result. 100 to the outside.

本実施形態において、初期キャリブレーションとは、近接センサ100起動時に始めに実行されるキャリブレーションであり、オフセット値設定時におけるフロアノイズ等による大きな誤差を補正するためのものである。本実施形態において、常時キャリブレーションとは、平均化処理を用いたキャリブレーション手法であり、外部環境の変化に対して俊敏に追従するのではなく、徐々に追従してオフセット値を補正するためのものである。   In the present embodiment, the initial calibration is calibration that is first executed when the proximity sensor 100 is activated, and is for correcting a large error due to floor noise or the like when setting an offset value. In the present embodiment, the constant calibration is a calibration method using an averaging process for correcting the offset value by gradually following a change in the external environment, not following the agility. Is.

近接センサ制御部110について以下に詳しく説明する。また、以下の説明において、初期キャリブレーション実行判定において、近接センサAD変換部103により取得した測定電流値を初期測定電流値と称し、それ以外で近接センサAD変換部103により取得した電流値を測定電流値と称する。   The proximity sensor control unit 110 will be described in detail below. In the following description, in the initial calibration execution determination, the measurement current value acquired by the proximity sensor AD conversion unit 103 is referred to as an initial measurement current value, and the current value acquired by the proximity sensor AD conversion unit 103 is measured otherwise. This is referred to as a current value.

近接センサ制御部110は、近接センサ100内の各種構成を統括的に制御するものであり、CPU(Central Processing Unit)などのプロセッサを備える構成である。近接センサ制御部110は、発光指示部111、測定電流値取得部112、初期キャリブレーション実行部120、および常時キャリブレーション実行部130を備えている。   The proximity sensor control unit 110 comprehensively controls various components in the proximity sensor 100, and includes a processor such as a CPU (Central Processing Unit). The proximity sensor control unit 110 includes a light emission instruction unit 111, a measured current value acquisition unit 112, an initial calibration execution unit 120, and a constant calibration execution unit 130.

発光指示部111は、初期キャリブレーション実行部120、および常時キャリブレーション実行部130からの指示に基づき、発光部101に電流を供給する。   The light emission instruction unit 111 supplies a current to the light emission unit 101 based on instructions from the initial calibration execution unit 120 and the constant calibration execution unit 130.

測定電流値取得部112は、近接センサAD変換部103から出力された電流値を取得し、初期測定電流値または測定電流値として、初期キャリブレーション実行部120または常時キャリブレーション実行部130に出力する。   The measurement current value acquisition unit 112 acquires the current value output from the proximity sensor AD conversion unit 103 and outputs the current value to the initial calibration execution unit 120 or the constant calibration execution unit 130 as the initial measurement current value or the measurement current value. .

(初期キャリブレーション実行部)
初期キャリブレーション実行部120(第1実行部)は、測定電流の電流値が初期閾値以下である場合に否検知対象物体反射光電流の電流値に応じたオフセット値を測定電流の電流値に基づき更新し、測定電流の電流値が前記初期閾値より大きい場合にオフセット値を更新しない初期キャリブレーション(第1キャリブレーション)を実行する。
(Initial calibration execution unit)
The initial calibration execution unit 120 (first execution unit) calculates an offset value corresponding to the current value of the non-detection target object reflected photocurrent based on the current value of the measurement current when the current value of the measurement current is equal to or less than the initial threshold value. An initial calibration (first calibration) that does not update the offset value when the current value of the measured current is larger than the initial threshold is executed.

また、初期キャリブレーション実行部120は、初期キャリブレーションにおいてオフセット値が更新されたか否かを判定するフラグ判定部121(オフセット値更新判定部)を備え、初期キャリブレーション実行部120は、フラグ判定部121より、初期キャリブレーションにおいてオフセット値が更新されていないと判定された場合に初期キャリブレーションにおいてオフセット値を更新する。   The initial calibration execution unit 120 includes a flag determination unit 121 (offset value update determination unit) that determines whether or not the offset value has been updated in the initial calibration. The initial calibration execution unit 120 includes a flag determination unit. If it is determined from 121 that the offset value has not been updated in the initial calibration, the offset value is updated in the initial calibration.

具体的には、初期キャリブレーション実行部120は、フラグ判定部121、およびオフセット値演算部122を備えている。   Specifically, the initial calibration execution unit 120 includes a flag determination unit 121 and an offset value calculation unit 122.

フラグ判定部121は、初期キャリブレーションのフラグが「0」であるか否かを判定することで、初期キャリブレーションにおいてオフセット値が更新されたか否かを判定する。言い換えると、オフセット値が初期キャリブレーションにおいて更新されたものであるか否かを判定する。   The flag determination unit 121 determines whether or not the offset value has been updated in the initial calibration by determining whether or not the initial calibration flag is “0”. In other words, it is determined whether or not the offset value is updated in the initial calibration.

フラグ判定部121は、(1)近接センサ100が起動、(2)補正測定値が下限閾値以下であることを示す信号を下限閾値判定部133から受信、(3)外部環境光の変化を検知したこと示す信号を外光判定部134から受信、した場合、記憶部104に記憶されている初期キャリブレーションフラグを読み出す。フラグ判定部121は、フラグが「0」であれば初期キャリブレーションにおいてオフセット値が更新されておらず、「1」であれば初期キャリブレーションにおいてオフセット値が更新されたものと判定する。なお、近接センサ100が起動した直後では初期キャリブレーションフラグは「0」である。   The flag determination unit 121 (1) the proximity sensor 100 is activated, (2) a signal indicating that the corrected measurement value is less than or equal to the lower threshold value is received from the lower threshold determination unit 133, and (3) a change in external ambient light is detected. When a signal indicating that this has been received is received from the external light determination unit 134, the initial calibration flag stored in the storage unit 104 is read out. If the flag is “0”, the flag determination unit 121 determines that the offset value has not been updated in the initial calibration. If the flag is “1”, the flag determination unit 121 determines that the offset value has been updated in the initial calibration. Note that the initial calibration flag is “0” immediately after the proximity sensor 100 is activated.

フラグ判定部121は、初期キャリブレーションによりオフセット値が更新されているか否かの判定結果をオフセット値演算部122に送信する。   The flag determination unit 121 transmits a determination result on whether or not the offset value has been updated by the initial calibration to the offset value calculation unit 122.

オフセット値演算部122は、初期キャリブレーションによりオフセット値が更新されていない(初期キャリブレーションフラグが「0」である)との判定結果をフラグ判定部121から受信すると、発光部101に電流を供給するように、発光指示部111に指示する。   When the offset value calculation unit 122 receives a determination result from the flag determination unit 121 that the offset value has not been updated by the initial calibration (the initial calibration flag is “0”), the offset value calculation unit 122 supplies current to the light emitting unit 101. The light emission instructing unit 111 is instructed to do so.

オフセット値演算部122は、近接センサAD変換部103から出力される初期測定電流値が、初期閾値以下であるか否かを判定する。オフセット値演算部122は、初期測定電流値が、初期閾値以下である判定した場合、初期測定電流値に基づいて新たなオフセット値を演算する。   The offset value calculation unit 122 determines whether or not the initial measurement current value output from the proximity sensor AD conversion unit 103 is equal to or less than the initial threshold value. When it is determined that the initial measurement current value is equal to or less than the initial threshold value, the offset value calculation unit 122 calculates a new offset value based on the initial measurement current value.

初期閾値は、内部反射等による反射光L3(図2参照)により発生すると考えられる電流値と近接があると判定するために用いられる近接検出用閾値とを含む値とすることができる。具体的には、例えば、反射光L3により近接センサAD変換部103から出力される否検知対象物体反射光電流の電流値が約1000、物体反射光電流の電流値において近接があると判定するために用いられる近接検出用閾値が500であった場合、初期閾値は1500と設定しておくとよい。   The initial threshold value can be a value including a current value considered to be generated by reflected light L3 (see FIG. 2) due to internal reflection or the like and a proximity detection threshold value used to determine that there is proximity. Specifically, for example, in order to determine that the current value of the non-detection target object reflected photocurrent output from the proximity sensor AD conversion unit 103 by the reflected light L3 is approximately 1000, and the current value of the object reflected photocurrent is close. When the proximity detection threshold value used in the above is 500, the initial threshold value may be set to 1500.

ここで、例えば、携帯電話ごとの筐体11の反射光L3による否検知対象物体反射光電流の電流値のバラつきが大きい場合、この初期閾値が小さいと初期キャリブレーションにおいてオフセット値の更新ができない問題が発生する可能性があるが、その際には、初期閾値をより大きく設定することで、その問題を回避することが可能となる。そのため、初期閾値は外部から設定できるようにしておくことが望ましい。   Here, for example, when the variation in the current value of the non-detection target object reflected photocurrent due to the reflected light L3 of the casing 11 for each mobile phone is large, the offset value cannot be updated in the initial calibration if the initial threshold is small. In this case, the problem can be avoided by setting a larger initial threshold value. Therefore, it is desirable that the initial threshold can be set from the outside.

初期キャリブレーションにおける新たなオフセット値の演算とは、例えば、「新たなオフセット値=初期測定電流値」とすることができるが、「初期測定電流値−オフセット値」が近接検知結果の下限値(例えば0)とならないようにオフセット値の演算を規定することが望ましい。これは、実行された初期キャリブレーションが誤キャリブレーションであったか否かを判定できるようにするためである。以下にその理由について説明する。   The calculation of the new offset value in the initial calibration can be, for example, “new offset value = initial measured current value”, but “initial measured current value−offset value” is the lower limit value of the proximity detection result ( For example, it is desirable to define the calculation of the offset value so as not to be 0). This is because it is possible to determine whether or not the executed initial calibration is an erroneous calibration. The reason will be described below.

近接検知結果として近接センサ100から出力されるのは「測定電流値−オフセット値」(補正測定値)である。キャリブレーションとして初期キャリブレーションのみを行う場合、初期キャリブレーションで「新たなオフセット値=初期測定電流値」とすると、近接検知結果として、まず、初期補正測定値(初期測定電流値−オフセット値)「0」が外部に出力される。   What is output from the proximity sensor 100 as the proximity detection result is “measurement current value−offset value” (corrected measurement value). When only the initial calibration is performed as the calibration, if “new offset value = initial measurement current value” is set in the initial calibration, the initial correction measurement value (initial measurement current value−offset value) “ “0” is output to the outside.

ここで、物体OBがある状態で初期測定電流値が取得されたものである場合、その後、物体OBがなくなると、本来であるとその後の近接検出結果は低下する。しかし、近接検知結果の下限値が0であった場合、物体OBがなくなっても、近接検知結果は0より小さくはならない。その結果、近接検知結果が実際よりも大きい「0」のまま出力され、近接検知結果に基づき算出される近接センサ100から物体OBまでの距離が、実際の距離よりも短くなり、近接の判断を正確に行えなくなる。   Here, when the initial measurement current value is obtained in the state where the object OB is present, if the object OB disappears thereafter, the subsequent proximity detection result is degraded. However, if the lower limit value of the proximity detection result is 0, the proximity detection result does not become smaller than 0 even if the object OB disappears. As a result, the proximity detection result is output as “0” which is larger than the actual value, and the distance from the proximity sensor 100 to the object OB calculated based on the proximity detection result becomes shorter than the actual distance, and the proximity determination is performed. It becomes impossible to do accurately.

この問題を回避するために、初期測定電流値からオフセット値を減算した値(初期補正測定値)が、下限値以上(ここでは0以上)となるように初期キャリブレーション後のオフセット値を設定する。これにより、実行された初期キャリブレーションが誤キャリブレーションであるか否かを初期キャリブレーション後に判定することが可能である。   In order to avoid this problem, the offset value after the initial calibration is set so that the value obtained by subtracting the offset value from the initial measurement current value (initial correction measurement value) is equal to or greater than the lower limit value (here, 0 or more). . Thereby, it is possible to determine after the initial calibration whether or not the executed initial calibration is an erroneous calibration.

例えば、初期キャリブレーション後の初期補正測定値が100となるようにする。物体OBのない状態で初期キャリブレーションが実行された場合であれば、その後に物体OBを近接センサ100に近づけることで補正測定値は増加し、再び遠ざけることで補正測定値は低下していくが、補正測定値が100以下になることはない。   For example, the initial correction measurement value after the initial calibration is set to 100. If the initial calibration is executed in the absence of the object OB, the corrected measurement value increases when the object OB is moved closer to the proximity sensor 100 thereafter, and the corrected measurement value decreases when the object OB is moved away again. The corrected measurement value never becomes 100 or less.

しかし、初期測定電流値が初期閾値以下になるような位置に物体OBが存在する状態で初期キャリブレーションを実行すると、初期補正測定値が100となるが、その後物体OBを取り除くと、補正測定値は100以下となる。したがって、初期補正測定値が100以下であるか否を判定することで、実行した初期キャリブレーションが誤キャリブレーションであったか否かを判定することが可能となる。以上の理由により、初期キャリブレーションで更新する新たなオフセット値は、初期補正測定値が下限値とならないようにしておくことが望ましい。   However, if the initial calibration is performed in a state where the object OB exists at a position where the initial measurement current value is equal to or less than the initial threshold value, the initial correction measurement value becomes 100, but if the object OB is subsequently removed, the correction measurement value is obtained. Becomes 100 or less. Therefore, by determining whether or not the initial correction measurement value is 100 or less, it is possible to determine whether or not the executed initial calibration is an erroneous calibration. For the above reasons, it is desirable that the new offset value updated by the initial calibration is such that the initial correction measurement value does not become the lower limit value.

本実施形態では、初期キャリブレーションが誤キャリブレーションであったか否かを判断するための上述した判定は、後述する常時キャリブレーション時における下限閾値判定部133により行われる。   In the present embodiment, the above-described determination for determining whether or not the initial calibration is an erroneous calibration is performed by the lower threshold determination unit 133 at the time of constant calibration described later.

オフセット値演算部122は、新たなオフセット値を演算すると、記憶部104に記憶されているオフセット値を更新する。オフセット値演算部122は、記憶部104に記憶されているオフセット値を更新すると、記憶部104の初期キャリブレーションのフラグを「1」とし、常時キャリブレーションの開始を指示する信号を常時キャリブレーション実行部130の補正測定値算出部131に送信する。   When the offset value calculation unit 122 calculates a new offset value, the offset value calculation unit 122 updates the offset value stored in the storage unit 104. When the offset value stored in the storage unit 104 is updated, the offset value calculation unit 122 sets the initial calibration flag in the storage unit 104 to “1”, and always performs calibration for a signal that instructs the start of constant calibration. To the corrected measurement value calculation unit 131 of the unit 130.

オフセット値演算部122は、オフセット値が更新された(初期キャリブレーションフラグが「0」ではない)との判定結果がフラグ判定部121から入力されると、オフセット値を更新せず、常時キャリブレーションの開始を指示する信号を常時キャリブレーション実行部130の補正測定値算出部131に送信する。   When the determination result that the offset value has been updated (the initial calibration flag is not “0”) is input from the flag determination unit 121, the offset value calculation unit 122 does not update the offset value and always performs calibration. Is transmitted to the corrected measurement value calculation unit 131 of the calibration execution unit 130 at all times.

また、オフセット値演算部122は、初期測定電流値が、初期閾値よりも大きいと判定した場合、オフセット値を更新せずに初期キャリブレーション処理を終了し、常時キャリブレーションの開始を指示する信号を常時キャリブレーション実行部130の補正測定値算出部131に送信する。このとき、オフセット値の更新をしていないため、初期キャリブレーションフラグの書き込みは行わず、「0」を維持したままとする。   Further, when the offset value calculation unit 122 determines that the initial measurement current value is larger than the initial threshold value, the offset value calculation unit 122 ends the initial calibration process without updating the offset value, and outputs a signal for instructing the start of constant calibration. It is transmitted to the corrected measurement value calculation unit 131 of the constant calibration execution unit 130. At this time, since the offset value is not updated, the initial calibration flag is not written and “0” is maintained.

例えば、携帯電話の起動時に物体OBが近接センサ100の近くにあった場合や、携帯電話のタッチパネルを操作中に通話の着信があった場合に取得される初期測定電流値は、オフセット値の算出には適さない。そこで、近接センサAD変換部103から出力される初期測定電流値が、初期閾値以下の場合にオフセット値の更新し、初期閾値よりも大きい場合にオフセット値の更新しないことにより、常に適正なオフセット値を近接の算出に用いることができる。言い換えると、初期キャリブレーション実行部120により、フロアノイズを考慮したキャリブレーションを適切に実行することができ、近接を正確に検知することができる。   For example, the initial measured current value acquired when the object OB is near the proximity sensor 100 when the mobile phone is activated or when a call is received while operating the touch panel of the mobile phone is calculated as an offset value. Not suitable for. Accordingly, the offset value is updated when the initial measured current value output from the proximity sensor AD conversion unit 103 is equal to or smaller than the initial threshold value, and the offset value is not updated when the initial measured current value is larger than the initial threshold value. Can be used to calculate proximity. In other words, the initial calibration execution unit 120 can appropriately execute calibration in consideration of floor noise, and can accurately detect proximity.

(常時キャリブレーション実行部)
常時キャリブレーション実行部130(第2実行部)は、初期キャリブレーションを実行した後のオフセット値である第1オフセット値を、初期キャリブレーションを実行した後に受光部102から発生した測定電流の電流値と第1オフセット値とを平均化処理した値に更新する常時キャリブレーション(第2キャリブレーション)を実行する。
(Continuous calibration execution unit)
The constant calibration execution unit 130 (second execution unit) uses the first offset value, which is the offset value after executing the initial calibration, as the current value of the measurement current generated from the light receiving unit 102 after executing the initial calibration. And constant calibration (second calibration) for updating the first offset value to the averaged value.

また、常時キャリブレーション実行部130は、常時キャリブレーションにおいて、初期キャリブレーションを実行した後に受光部102から発生した測定電流の電流値から第1オフセット値を減算した補正測定値が常時閾値以下の場合に、第1オフセット値を更新する。   In addition, the continuous calibration execution unit 130, in the continuous calibration, when the corrected measurement value obtained by subtracting the first offset value from the current value of the measurement current generated from the light receiving unit 102 after the initial calibration is always below the threshold value In addition, the first offset value is updated.

また、常時キャリブレーション実行部130は、初期キャリブレーションと常時キャリブレーションとは交互に実行し、常時キャリブレーションにおいて、補正測定値が下限閾値以下の場合には、第1オフセット値は更新されず、初期キャリブレーション処理に移行する。   In addition, the continuous calibration execution unit 130 performs the initial calibration and the continuous calibration alternately. In the continuous calibration, when the corrected measurement value is equal to or lower than the lower limit threshold, the first offset value is not updated. Move to initial calibration process.

また、常時キャリブレーション実行部130は、常時キャリブレーションでは、前記補正測定値が、上記下限閾値より大きく、常時閾値以下であり、かつ、外光の変化を検知した場合には、第1オフセット値は更新されず、第1キャリブレーションが実行される。   Further, in the continuous calibration, the continuous calibration execution unit 130 determines the first offset value when the corrected measurement value is larger than the lower limit threshold and is always equal to or smaller than the threshold and a change in external light is detected. Is not updated, and the first calibration is executed.

常時キャリブレーション実行部130は、補正測定値算出部131、常時閾値判定部132、下限閾値判定部133、外光判定部134、および平均オフセット値演算部135を備えている。   The constant calibration execution unit 130 includes a corrected measurement value calculation unit 131, a constant threshold determination unit 132, a lower threshold determination unit 133, an external light determination unit 134, and an average offset value calculation unit 135.

補正測定値算出部131は、初期キャリブレーション実行部120から常時キャリブレーションの開始を指示する信号を受信すると、発光部101に電流を供給するように、発光指示部111に指示する。また、補正測定値算出部131は、近接センサAD変換部103から取得する測定電流値、および記憶部104に記憶されているオフセット値により補正測定値を算出する。具体的には、補正測定値は、近接センサAD変換部103から出力される測定電流値から、そのとき記憶部104に記憶されているオフセット値を減算することで算出される。補正測定値が算出されると、補正測定値算出部131は、補正測定値を常時閾値判定部132に出力する。   When the correction measurement value calculation unit 131 receives a signal for instructing the start of constant calibration from the initial calibration execution unit 120, the correction measurement value calculation unit 131 instructs the light emission instruction unit 111 to supply current to the light emission unit 101. The corrected measurement value calculation unit 131 calculates a correction measurement value based on the measurement current value acquired from the proximity sensor AD conversion unit 103 and the offset value stored in the storage unit 104. Specifically, the corrected measurement value is calculated by subtracting the offset value stored in the storage unit 104 from the measured current value output from the proximity sensor AD conversion unit 103. When the corrected measurement value is calculated, the corrected measurement value calculation unit 131 outputs the corrected measurement value to the threshold determination unit 132 at all times.

常時閾値判定部132は、補正測定値算出部131から補正測定値が入力されると、補正測定値が常時閾値以下か否かを判定する。常時閾値は、例えば、近接があると判定するために用いられる近接検出用閾値とすることができる。また、常時閾値は、後述する下限閾値よりも大きいものとする。   When the corrected measurement value is input from the corrected measurement value calculation unit 131, the constant threshold value determination unit 132 determines whether the corrected measurement value is always equal to or less than the threshold value. The constant threshold value can be a proximity detection threshold value used for determining that there is proximity, for example. The constant threshold is assumed to be larger than a lower limit threshold described later.

補正測定値が常時閾値よりも大きい場合、物体OBが近接している状態であると考えられる。そのため、常時閾値判定部132は、常時キャリブレーションの処理は行わず、常時キャリブレーションの処理は終了する。補正測定値が常時閾値以下であった場合、常時閾値判定部132は、補正測定値が常時閾値以下であったことを示す信号を、下限閾値判定部133に送信する。   When the corrected measurement value is always larger than the threshold value, it is considered that the object OB is in close proximity. For this reason, the constant threshold value determination unit 132 does not always perform the calibration process, and the constant calibration process ends. When the corrected measurement value is always equal to or less than the threshold value, the constant threshold value determination unit 132 transmits a signal indicating that the correction measurement value is always equal to or less than the threshold value to the lower limit threshold value determination unit 133.

下限閾値判定部133は、初期キャリブレーション実行後、測定電流値から記憶部104に記憶されているオフセット値を減算した算出値(補正測定値)が下限閾値以下の場合に、常時キャリブレーションにおけるオフセット値の更新を行わず、初期キャリブレーションを実行する。言い換えると、下限閾値判定部133は、補正測定値が常時閾値以下であったことを示す信号を常時閾値判定部132から受信すると、初期キャリブレーションに異常がないか判定し、初期キャリブレーションに異常がある場合、常時キャリブレーションにおけるオフセット値の更新を行わず、再度初期キャリブレーションを実行する。   After the initial calibration is performed, the lower limit threshold determination unit 133 always performs the offset in the calibration when the calculated value (corrected measurement value) obtained by subtracting the offset value stored in the storage unit 104 from the measured current value is equal to or lower than the lower limit threshold. Perform initial calibration without updating values. In other words, when the lower threshold determination unit 133 receives a signal indicating that the corrected measurement value is always equal to or less than the threshold from the constant threshold determination unit 132, the lower threshold determination unit 133 determines whether there is an abnormality in the initial calibration, and the initial calibration is abnormal. If there is, the initial calibration is executed again without always updating the offset value in the calibration.

初期キャリブレーションに異常があった場合、すなわち、初期キャリブレーションで算出され、記憶部104に記憶されたオフセット値に異常がある場合、近接センサ100は誤った補正測定値を外部に出力し、その結果、携帯電話等の誤動作を招く可能性がある。そのため、初期キャリブレーションが明らかに異常であると判定された場合、記憶部104に記憶されているオフセット値を消去して再度初期キャリブレーションを実行する必要がある。   When there is an abnormality in the initial calibration, that is, when there is an abnormality in the offset value calculated in the initial calibration and stored in the storage unit 104, the proximity sensor 100 outputs an erroneous corrected measurement value to the outside, As a result, there is a possibility that a mobile phone or the like malfunctions. Therefore, when it is determined that the initial calibration is clearly abnormal, it is necessary to delete the offset value stored in the storage unit 104 and execute the initial calibration again.

下限閾値判定部133は、補正測定値が下限閾値以下であれば初期キャリブレーション異常と判定する。また、このとき、下限閾値判定部133は、初期キャリブレーションのフラグを0とし、初期キャリブレーションが行われていない状態に設定してから、常時キャリブレーションを終了する。これにより、常時キャリブレーションにおけるオフセット値の更新を行わず、再度初期キャリブレーションが実行される。   The lower threshold determination unit 133 determines that the initial calibration is abnormal if the corrected measurement value is equal to or lower than the lower threshold. At this time, the lower threshold determination unit 133 sets the initial calibration flag to 0, sets the initial calibration to a state in which the initial calibration is not performed, and then always ends the calibration. As a result, the initial calibration is performed again without updating the offset value in the constant calibration.

ここで、下限閾値は、初期キャリブレーションにおける、初期測定電流値からオフセット値を減算した値(初期補正測定値)以下にすることが望ましい。初期キャリブレーション後の初期補正測定値が100となるように設定しているような状態で、例えば、初期キャリブレーション後に受光部102から発生された測定電流値からそのとき記憶部104に記憶されているオフセット値を減算した値(補正測定値)が0になったとする。これは物体OBがある状態で初期キャリブレーションを誤って実行していまい、その後、物体OBを遠ざけた、あるいは取り除いた場合に相当する。したがって、下限閾値を初期補正測定値以下と設定することで、補正測定値が下限閾値以下であれば初期キャリブレーションの状態が異常であると判定することができる。   Here, it is desirable that the lower limit threshold value be equal to or less than a value obtained by subtracting the offset value from the initial measurement current value (initial correction measurement value) in the initial calibration. In a state where the initial correction measurement value after the initial calibration is set to 100, for example, from the measured current value generated from the light receiving unit 102 after the initial calibration, it is stored in the storage unit 104 at that time. It is assumed that the value obtained by subtracting the offset value (corrected measurement value) becomes zero. This corresponds to a case where the initial calibration is erroneously executed in the state where the object OB is present, and then the object OB is moved away or removed. Therefore, by setting the lower limit threshold value to be equal to or less than the initial correction measurement value, it is possible to determine that the initial calibration state is abnormal if the correction measurement value is equal to or less than the lower limit threshold value.

また、補正測定値が下限閾値以下であれば、下限閾値判定部133は、初期キャリブレーションフラグを「0」とし、初期キャリブレーションにおけるオフセット値の更新が行われていない状態に設定してから、常時キャリブレーションを終了する。これにより、常時キャリブレーションにおけるオフセット値の更新は行われず、再度初期キャリブレーションが実行される。また、下限閾値判定部133は、補正測定値が下限閾値以下であることを示す信号をフラグ判定部121に送信する。   If the corrected measurement value is equal to or lower than the lower limit threshold, the lower limit threshold determination unit 133 sets the initial calibration flag to “0” and sets the state in which the offset value is not updated in the initial calibration. Always end calibration. Thereby, the offset value is not updated in the constant calibration, and the initial calibration is executed again. In addition, the lower threshold determination unit 133 transmits a signal indicating that the corrected measurement value is equal to or lower than the lower threshold to the flag determination unit 121.

下限閾値判定部133は、補正測定値が下限閾値よりも大きければ、補正測定値が下限閾値よりも大きいことを示す信号を外光判定部134に送信する。   If the corrected measurement value is greater than the lower threshold value, the lower threshold determination unit 133 transmits a signal indicating that the corrected measurement value is greater than the lower threshold value to the external light determination unit 134.

外光判定部134は、補正測定値が下限閾値よりも大きいことを示す信号を下限閾値判定部133から受信すると、初期キャリブレーション実行後、外光(外部環境光)の変化を検知したか否かを判定する。外光判定部134は、外部環境光の変化を検知した場合、常時キャリブレーションにおけるオフセット値の更新は行われず、初期キャリブレーションを実行する。   When the external light determination unit 134 receives a signal indicating that the corrected measurement value is larger than the lower limit threshold value from the lower threshold determination unit 133, whether or not a change in external light (external environmental light) is detected after the initial calibration is performed. Determine whether. When the external light determination unit 134 detects a change in external environmental light, the offset value is not always updated in the calibration, and the initial calibration is executed.

赤外光を射出する発光部101を用いた近接センサ100では、太陽光、白熱灯、ハロゲン光等の赤外光を多く含む光源の環境下と、白色蛍光灯、白色LED等の赤外光をほとんど含まない光源の環境下とでは、受光部102で受光する光の特性が大きく変化する場合がある。   In the proximity sensor 100 using the light emitting unit 101 that emits infrared light, infrared light such as a white fluorescent lamp and a white LED is used in an environment of a light source containing a lot of infrared light such as sunlight, incandescent lamp, and halogen light. Under the environment of a light source that hardly contains light, the characteristics of light received by the light receiving unit 102 may change greatly.

具体的には、ユーザが屋外から屋内、および屋内から屋外に移動するなどして、(1)赤外光を多く含む光源の環境下で近接センサ100を起動し、赤外光を含まない光源の環境下に移動した場合、または逆に、(2)赤外光を含まない光源の環境下で近接センサ100を起動し、赤外光を含む光源の環境下に移動した場合、急激に外部環境光の特性に変化が起こり、近接センサ100は誤った近接検知結果を出力する可能性がある。   Specifically, when the user moves from the outdoor to the indoor, and from the indoor to the outdoor, (1) the proximity sensor 100 is activated in the environment of the light source containing a lot of infrared light, and the light source does not contain the infrared light. (2) When the proximity sensor 100 is activated in the environment of a light source that does not include infrared light and moves in the environment of a light source that includes infrared light, There is a possibility that the proximity sensor 100 outputs an erroneous proximity detection result due to a change in the characteristics of the ambient light.

例えば、ハンズフリーモードのように携帯電話を耳に当てずに通話を行う場合、通話中でも近接なしと判断している。この状態で、例えば屋内から屋外へ、または逆に屋外から屋内へ移動した場合において、周囲の温度環境の変化や光源の変化において近接センサ100の特性が変化してしまう可能性がある。そのような状況から通常の通話モードに戻して携帯電話を耳に当てるような物体OBを近づける行動を行った際に、物体OBを近づけても物体OBを正常に検知できない可能性がある。   For example, when a call is made without placing a mobile phone on the ear as in the hands-free mode, it is determined that there is no proximity even during the call. In this state, for example, when moving from indoor to outdoor, or conversely from outdoor to indoor, the characteristics of the proximity sensor 100 may change due to changes in the surrounding temperature environment or changes in the light source. In such a situation, when returning to the normal call mode and performing an action of bringing the object OB closer such that the mobile phone is put on the ear, the object OB may not be normally detected even if the object OB is brought closer.

そこで、外部環境光の状態を検知保持しておき当該状態が変化した場合、外光判定部134は、初期キャリブレーションフラグを「0」とし、初期キャリブレーションにおけるオフセット値の更新が行われていない状態に設定してから、常時キャリブレーションを終了する。これにより、常時キャリブレーションにおけるオフセット値の更新が行われず、再度初期キャリブレーションが実行される。   Therefore, when the state of the external ambient light is detected and held and the state changes, the external light determination unit 134 sets the initial calibration flag to “0” and the offset value is not updated in the initial calibration. After setting to the state, the calibration is always finished. Thereby, the offset value is not always updated in the calibration, and the initial calibration is executed again.

外部環境光の状態変化の検知手法であるが、例えば以下のような方法ある。すなわち、発光部101を駆動せず、発光部101から赤外光を出射しない状態で受光部102において発生する電流を検知することで外部から入射している赤外光を検出することができる。これにより、外部環境光の状態を検知することが可能である。外光判定部134は、上記方法により取得した起動時の外部環境光の状態と常時キャリブレーション時の外部環境光の状態とを比較し、所定値以上の変化がある場合、外部環境光の変化を検知したと判断してもよい。   A method for detecting a change in the state of external ambient light is, for example, the following method. That is, infrared light incident from the outside can be detected by detecting a current generated in the light receiving unit 102 without driving the light emitting unit 101 and emitting no infrared light from the light emitting unit 101. Thereby, it is possible to detect the state of external ambient light. The external light determination unit 134 compares the state of the external environment light at the time of startup acquired by the above method with the state of the external environment light at the time of constant calibration. It may be determined that is detected.

または、近接センサ機能と周囲環境光の照度を検知する照度センサ機能をあわせ持つ近接照度センサ400(実施形態2参照)においては、照度センサ機能により外部可視光および赤外光の照度をそれぞれ検知することが可能である。外光判定部134は、起動時の外部環境光の可視光と赤外光との比率と、常時キャリブレーション時の可視光と赤外光の比率とを比較し、所定値以上の変化がある場合、外部環境光の変化を検知したと判断してもよい。   Alternatively, in the proximity illuminance sensor 400 (see Embodiment 2) having both the proximity sensor function and the illuminance sensor function for detecting the illuminance of ambient ambient light, the illuminance sensor function detects the illuminance of external visible light and infrared light, respectively. It is possible. The external light determination unit 134 compares the ratio of visible light and infrared light of external environmental light at the time of startup with the ratio of visible light and infrared light at the time of calibration, and there is a change of a predetermined value or more. In this case, it may be determined that a change in external ambient light has been detected.

外光判定部134は、外部環境光の変化を検知しなかった場合に、外部環境光の変化を検知しなかったことを示す信号を平均オフセット値演算部135に送信する。   The external light determination unit 134 transmits a signal indicating that the change of the external environment light is not detected to the average offset value calculation unit 135 when the change of the external environment light is not detected.

外光判定部134は、外部環境光の変化を検知した場合に、外部環境光の変化を検知したことを示す信号をフラグ判定部121に送信する。   When the external light determination unit 134 detects a change in external environmental light, the external light determination unit 134 transmits a signal indicating that a change in external environmental light has been detected to the flag determination unit 121.

(平均オフセット値演算部135)
平均オフセット値演算部135は、記憶部104に記憶されているオフセット値(初期キャリブレーション後に記憶部104に記憶されているオフセット値:第1オフセット値)を、電流値(初期キャリブレーション後に受光部102から発生する測定電流の電流値)とオフセット値(第1オフセット値)とを平均化した値に更新する。
(Average offset value calculator 135)
The average offset value calculation unit 135 uses the offset value stored in the storage unit 104 (the offset value stored in the storage unit 104 after the initial calibration: the first offset value) as the current value (the light receiving unit after the initial calibration). The current value of the measured current generated from 102) and the offset value (first offset value) are updated to average values.

具体的には、平均オフセット値演算部135は、外部環境光の変化を検知しなかったこと示す信号を外光判定部134から受信すると、平均化処理により算出したオフセット値により、記憶部104に記憶されているオフセット値を更新する。   Specifically, when the average offset value calculation unit 135 receives a signal indicating that a change in external ambient light has not been detected from the external light determination unit 134, the average offset value calculation unit 135 stores the signal in the storage unit 104 based on the offset value calculated by the averaging process. Update the stored offset value.

すなわち、常時キャリブレーションにおけるオフセット値の更新が可能であった場合、平均オフセット値演算部135で平均化処理による常時キャリブレーションにおけるオフセット値の更新が行われる。その平均化処理は、例えば次式で実行される。   That is, when the offset value can be updated in the continuous calibration, the offset value in the continuous calibration is updated by the average offset value calculation unit 135 in the average offset value calculation unit 135. The averaging process is executed by the following equation, for example.

y(n)=α・y(n−1)+(1−α)・x(n)
=y(n−1)+(1−α)・{x(n)−y(n−1)}・・・式(1)
式(1)においてy(n)は新たに算出される常時キャリブレーション結果、y(n−1)は、その算出前のキャリブレーション結果(初期キャリブレーション後に記憶部104に記憶されているオフセット値)であり、x(n)は、初期キャリブレーション後、近接センサAD変換部103から出力されたデジタル信号(補正測定値算出部131で取得された測定電流値)である。x(n)とy(n―1)との差分が近接センサ100から近接検知結果として外部に出力される。すなわち、補正測定値算出部131で取得した測定電流値から、平均化処理により更新される前のオフセット値を減算した値が近接検知結果として外部に出力される。また、αは平均化の係数であり、αの値を大きくすることで常時キャリブレーションによるオフセット値更新時の変化量が小さくなり、逆にαの値を小さくすることで常時キャリブレーションによるオフセット値更新時の変化量を大きくすることが可能である。
y (n) = α · y (n−1) + (1−α) · x (n)
= Y (n-1) + (1- [alpha]). {X (n) -y (n-1)} Expression (1)
In equation (1), y (n) is a newly calculated constant calibration result, and y (n−1) is a calibration result before the calculation (an offset value stored in the storage unit 104 after the initial calibration). X (n) is a digital signal (measured current value acquired by the corrected measured value calculation unit 131) output from the proximity sensor AD conversion unit 103 after the initial calibration. A difference between x (n) and y (n−1) is output from the proximity sensor 100 to the outside as a proximity detection result. That is, a value obtained by subtracting the offset value before being updated by the averaging process from the measured current value acquired by the corrected measured value calculation unit 131 is output to the outside as the proximity detection result. In addition, α is an averaging coefficient. Increasing the value of α reduces the amount of change when updating the offset value by constant calibration. Conversely, decreasing the value of α reduces the offset value by constant calibration. It is possible to increase the amount of change at the time of update.

また、平均オフセット値演算部135は、常時キャリブレーション結果である平均オフセット値演算部135で算出されたy(n)を常時キャリブレーションにおける新たなオフセット値として、記憶部104に記憶されているオフセット値を更新する。   Further, the average offset value calculation unit 135 uses the y (n) calculated by the average offset value calculation unit 135, which is a constant calibration result, as a new offset value in the constant calibration, and is stored in the storage unit 104. Update the value.

オフセット値更新後、平均オフセット値演算部135は、常時キャリブレーション処理を終了させ、常時キャリブレーションが終了したこと示す信号を、フラグ判定部121に送信する。   After updating the offset value, the average offset value calculation unit 135 ends the constant calibration process, and transmits a signal indicating that the constant calibration has ended to the flag determination unit 121.

(初期キャリブレーション処理)
図3は、近接センサ100の初期キャリブレーションの処理の流れの一例を示すフローチャートである。図3に示すように、まず、近接センサ100の電源を投入、または起動信号や起動命令コマンド等により近接センサ100を起動する。これは携帯電話の電源投入時や通話の着信時に相当する。
(Initial calibration process)
FIG. 3 is a flowchart showing an example of the flow of initial calibration processing of the proximity sensor 100. As shown in FIG. 3, first, the proximity sensor 100 is turned on, or the proximity sensor 100 is activated by an activation signal, an activation command, or the like. This corresponds to when the mobile phone is turned on or when a call is received.

次に、近接センサ100の初期設定を行う(S101)。これは、近接センサ100が設定レジスタ等を保有しており外部から設定変更が可能な場合、携帯電話の制御部等から行われてもよい。近接センサ100の初期設定が不可能もしくは不要であった場合、S101の処理は不要である。   Next, initial setting of the proximity sensor 100 is performed (S101). When the proximity sensor 100 has a setting register or the like and the setting can be changed from the outside, this may be performed from a control unit or the like of the mobile phone. When the initial setting of the proximity sensor 100 is impossible or unnecessary, the process of S101 is unnecessary.

次に、S102からS104により初期キャリブレーションの実行判定が行われる。まず、フラグ判定部121が、初期キャリブレーションフラグが「0」であるか否かを判定する(S102:オフセット値更新判定ステップ)。初期キャリブレーションフラグが「0」であるとき(S102でYES)、オフセット値演算部122は、発光部101に電流を供給することで発光部101を発光させて、受光部102で発生した初期測定電流値を取得し(S103:発光ステップ、および受光ステップ)、初期測定電流値が初期閾値以下か否かを判定する(S104)。初期測定電流値が初期閾値以下である場合(S104でYES)、オフセット値演算部122は、オフセット値を更新する(S105:第1実行ステップ)。具体的には、オフセット値演算部122は、新たなオフセット値を演算し、記憶部104に記憶されているオフセット値を更新する。その後、オフセット値演算部122は、記憶部104の初期キャリブレーションフラグを「1」とし(S106)、初期キャリブレーションを終了し(S107)、常時キャリブレーション処理に移行する(S108)。   Next, an initial calibration execution determination is performed from S102 to S104. First, the flag determination unit 121 determines whether or not the initial calibration flag is “0” (S102: offset value update determination step). When the initial calibration flag is “0” (YES in S102), the offset value calculation unit 122 causes the light emitting unit 101 to emit light by supplying current to the light emitting unit 101, and the initial measurement generated in the light receiving unit 102. A current value is acquired (S103: light emission step and light reception step), and it is determined whether or not the initial measurement current value is equal to or less than an initial threshold value (S104). When the initial measured current value is equal to or smaller than the initial threshold value (YES in S104), the offset value calculation unit 122 updates the offset value (S105: first execution step). Specifically, the offset value calculation unit 122 calculates a new offset value and updates the offset value stored in the storage unit 104. Thereafter, the offset value calculation unit 122 sets the initial calibration flag in the storage unit 104 to “1” (S106), ends the initial calibration (S107), and shifts to a constant calibration process (S108).

S102において、初期キャリブレーションフラグが「1」であるとき(S102でNO)、オフセット値演算部122は、初期キャリブレーションを終了し(S107)、常時キャリブレーション処理に移行する(S108)。   In S102, when the initial calibration flag is “1” (NO in S102), the offset value calculation unit 122 ends the initial calibration (S107) and shifts to a constant calibration process (S108).

S104において、初期測定電流値が初期閾値よりも大きい場合(S104でNO)、オフセット値演算部122は、初期キャリブレーションを終了し(S107)、常時キャリブレーション処理に移行する(S108)。   In S104, when the initial measured current value is larger than the initial threshold value (NO in S104), the offset value calculation unit 122 ends the initial calibration (S107) and shifts to a constant calibration process (S108).

(常時キャリブレーション処理)
図4は、近接センサ100の常時キャリブレーションの処理の流れの一例を示すフローチャートである。なお、図3の初期キャリブレーションの処理と図4の常時キャリブレーションの処理とは連続して行われる。
(Continuous calibration process)
FIG. 4 is a flowchart showing an example of the flow of the constant calibration process of the proximity sensor 100. Note that the initial calibration process of FIG. 3 and the constant calibration process of FIG. 4 are performed continuously.

図4に示すように、まず、補正測定値算出部131は、発光部101に電流を供給することで測定電流値を取得し、測定電流値および記憶部104に記憶されているオフセット値により補正測定値を算出する(S201)。次に、常時閾値判定部132は、補正測定値が常時閾値以下か否かを判定する(S202)。補正測定値が常時閾値以下の場合(S202でYES)、下限閾値判定部133は、補正測定値が下限閾値以下か否かを判定する(S203)。   As shown in FIG. 4, first, the corrected measurement value calculation unit 131 obtains a measurement current value by supplying a current to the light emitting unit 101, and corrects it based on the measurement current value and the offset value stored in the storage unit 104. A measured value is calculated (S201). Next, the constant threshold value determination unit 132 determines whether the corrected measurement value is always equal to or less than the threshold value (S202). When the corrected measurement value is always equal to or less than the threshold value (YES in S202), the lower limit threshold value determination unit 133 determines whether the corrected measurement value is equal to or less than the lower limit threshold value (S203).

補正測定値が下限閾値よりも大きい場合(S203でNO)、外光判定部134は、外部環境光が変化したか否かを判定する(S204)。外部環境光が変化していない場合(S204でNO)、平均オフセット値演算部135は、オフセット値を更新する(S205:第2実行ステップ)。具体的には、平均化処理により算出したオフセット値により、記憶部104に記憶されているオフセット値を更新する。その後、平均オフセット値演算部135は、常時キャリブレーションを終了し(S207)、初期キャリブレーション処理に移行する(S208)。   When the corrected measurement value is larger than the lower limit threshold (NO in S203), the external light determination unit 134 determines whether or not the external environment light has changed (S204). If the external ambient light has not changed (NO in S204), the average offset value calculator 135 updates the offset value (S205: second execution step). Specifically, the offset value stored in the storage unit 104 is updated with the offset value calculated by the averaging process. After that, the average offset value calculation unit 135 always ends the calibration (S207), and proceeds to the initial calibration process (S208).

S202において、補正測定値が常時閾値より大きい場合(S202でNO)、常時閾値判定部132は、常時キャリブレーションを終了し(S207)、初期キャリブレーション処理に移行する(S208)。   In S202, when the corrected measurement value is always larger than the threshold value (NO in S202), the constant threshold value determination unit 132 ends the constant calibration (S207), and proceeds to the initial calibration process (S208).

S203において、補正測定値が下限閾値以下の場合(S203でYES)、下限閾値判定部133は、記憶部104の初期キャリブレーションフラグを「0」とし(S206)、常時キャリブレーションを終了し(S207)、初期キャリブレーション処理に移行する(S208)。   In S203, when the corrected measurement value is equal to or lower than the lower threshold (YES in S203), the lower threshold determination unit 133 sets the initial calibration flag in the storage unit 104 to “0” (S206), and always ends the calibration (S207). ), The process proceeds to the initial calibration process (S208).

S204において、外部環境光が変化した場合(S204でYES)、外光判定部134は、記憶部104の初期キャリブレーションフラグを「0」とし(S206)、常時キャリブレーションを終了し(S207)、初期キャリブレーション処理に移行する(S208)。   If the external ambient light changes in S204 (YES in S204), the external light determination unit 134 sets the initial calibration flag of the storage unit 104 to “0” (S206), ends the constant calibration (S207), The process proceeds to the initial calibration process (S208).

なお、ここに示すS202からS204の判定順序は一例であり本実施形態通りにする必要はなく、入れ替わっていてもキャリブレーションの結果には影響しない。   Note that the determination order of S202 to S204 shown here is an example, and it is not necessary to make it the same as this embodiment, and even if the order is changed, the result of calibration is not affected.

〔実施形態2〕
本発明の実施例の近接照度センサ400について、図5に基づいて説明すれば、以下のとおりである。なお、説明の便宜上、実施形態1にて説明した部材と同じ機能を有する部材については、同じ符号を付記し、その説明を省略する。図5は、本発明の実施形態2に係る近接照度センサ400の概略構成を示す機能ブロック図である。近接照度センサ400は近接センサ100に外部環境光の照度を検知する照度センサ機能を備えたものである。
[Embodiment 2]
The proximity illuminance sensor 400 according to the embodiment of the present invention will be described below with reference to FIG. For convenience of explanation, members having the same functions as those described in the first embodiment are denoted by the same reference numerals and description thereof is omitted. FIG. 5 is a functional block diagram showing a schematic configuration of the proximity illuminance sensor 400 according to Embodiment 2 of the present invention. The proximity illuminance sensor 400 includes the proximity sensor 100 having an illuminance sensor function for detecting the illuminance of external ambient light.

図5で示す近接照度センサ400は、検知物が近接しているか否かを検出する近接センサ機能と外部環境光の照度を測定する照度センサ機能とをあわせ持っており、発光部401、受光部402、近接センサAD変換部403、記憶部404、照度センサAD変換部405、および、近接照度センサ制御部410で構成されている。   A proximity illuminance sensor 400 shown in FIG. 5 has both a proximity sensor function for detecting whether or not a detection object is close and an illuminance sensor function for measuring the illuminance of external ambient light. 402, a proximity sensor AD conversion unit 403, a storage unit 404, an illuminance sensor AD conversion unit 405, and a proximity illuminance sensor control unit 410.

発光部401、受光部402、近接センサAD変換部403、および記憶部404は、図1で示す、発光部101、受光部102、近接センサAD変換部103、および記憶部104とほぼ同じ機能を有する。   The light emitting unit 401, the light receiving unit 402, the proximity sensor AD converting unit 403, and the storage unit 404 have substantially the same functions as the light emitting unit 101, the light receiving unit 102, the proximity sensor AD converting unit 103, and the storage unit 104 shown in FIG. Have.

また、近接照度センサ制御部410の各構成(発光指示部411、測定電流値取得部412、初期キャリブレーション実行部420、フラグ判定部421、オフセット値演算部422、常時キャリブレーション実行部430、補正測定値算出部431、常時閾値判定部432、下限閾値判定部433、外光判定部434、および平均オフセット値演算部435)は、近接センサ制御部110の各構成(発光指示部111、測定電流値取得部112、初期キャリブレーション実行部120、フラグ判定部121、オフセット値演算部122、常時キャリブレーション実行部130、補正測定値算出部131、常時閾値判定部132、下限閾値判定部133、外光判定部134、および平均オフセット値演算部135)と同様の機能を有する。   Further, each component of the proximity illuminance sensor control unit 410 (light emission instruction unit 411, measurement current value acquisition unit 412, initial calibration execution unit 420, flag determination unit 421, offset value calculation unit 422, constant calibration execution unit 430, correction The measurement value calculation unit 431, the constant threshold value determination unit 432, the lower limit threshold value determination unit 433, the external light determination unit 434, and the average offset value calculation unit 435) are components of the proximity sensor control unit 110 (light emission instruction unit 111, measurement current). Value acquisition unit 112, initial calibration execution unit 120, flag determination unit 121, offset value calculation unit 122, constant calibration execution unit 130, corrected measurement value calculation unit 131, constant threshold value determination unit 132, lower limit threshold value determination unit 133, outside It has the same function as the light determination unit 134 and the average offset value calculation unit 135).

つまり、図5に示す近接照度センサ400は、図1に示す近接センサ100と比べて、照度センサAD変換部405がさらに設けられている点が異なり、その他の構成は同様である。   That is, the proximity illuminance sensor 400 shown in FIG. 5 is different from the proximity sensor 100 shown in FIG. 1 in that the illuminance sensor AD conversion unit 405 is further provided, and the other configurations are the same.

近接照度センサ400は、受光部402が、外光(外部環境光)を受光し、受光した光量に応じた電流を照度センサAD変換部405において発生することで、外部環境光の照度を検知することができる。近接照度センサ制御部410の動作の概要について以下に説明する。   The proximity illuminance sensor 400 detects the illuminance of external environmental light by the light receiving unit 402 receiving external light (external environmental light) and generating a current corresponding to the received light amount in the illuminance sensor AD conversion unit 405. be able to. An outline of the operation of the proximity illuminance sensor control unit 410 will be described below.

近接センサ動作時は、近接照度センサ制御部410は、発光部401より赤外光を出射し、物体OBで反射した上記赤外光を受光部402で受光する。受光部402で発生した電流は近接センサAD変換部403に入力される。近接センサAD変換部403は積分回路およびコンパレータ回路等で構成されており、電流により流入される電荷を蓄積し、その電荷量を検出することでデジタル信号に変換することが可能である。このデジタル信号は、近接照度センサ制御部410を介して近接照度センサ400から外部に出力される。   During the proximity sensor operation, the proximity illuminance sensor control unit 410 emits infrared light from the light emitting unit 401 and the light receiving unit 402 receives the infrared light reflected by the object OB. The current generated in the light receiving unit 402 is input to the proximity sensor AD conversion unit 403. The proximity sensor AD conversion unit 403 is configured by an integration circuit, a comparator circuit, and the like. The proximity sensor AD conversion unit 403 accumulates electric charge flowing in by current, and can convert it into a digital signal by detecting the amount of electric charge. This digital signal is output from the proximity illuminance sensor 400 to the outside via the proximity illuminance sensor control unit 410.

この際、出力されるデジタル信号は初期キャリブレーション実行部420および常時キャリブレーション実行部430で処理され、記憶部404に記憶されているオフセット値を用いて補正され、近接照度センサ400より出力される。   At this time, the output digital signal is processed by the initial calibration execution unit 420 and the constant calibration execution unit 430, corrected using the offset value stored in the storage unit 404, and output from the proximity illuminance sensor 400. .

ここでキャリブレーション(初期キャリブレーションおよび常時キャリブレーション)の動作および手法に関しては図3および図4と同じものであるので説明は割愛する。なお、近接照度センサ400における近接センサ動作時において照度センサAD変換部405は近接照度センサ制御部410によりオフされている。   Here, the operation and method of calibration (initial calibration and constant calibration) are the same as those in FIGS. 3 and 4 and will not be described. Note that the illuminance sensor AD conversion unit 405 is turned off by the proximity illuminance sensor control unit 410 when the proximity illuminance sensor 400 operates.

一方、照度センサ動作時は、近接照度センサ制御部410は発光部401と近接センサAD変換部403をオフさせて、照度センサAD変換部405を動作させる。   On the other hand, when the illuminance sensor is operated, the proximity illuminance sensor control unit 410 turns off the light emitting unit 401 and the proximity sensor AD conversion unit 403 and operates the illuminance sensor AD conversion unit 405.

受光部402は外部環境光を受光し、受光した光量に応じた電流を発生させる。その電流が照度センサAD変換部405に入力され、近接センサAD変換部403と同様にデジタル信号に変換される。このデジタル信号は近接照度センサ制御部410を介して近接照度センサ400から外部に出力される。   The light receiving unit 402 receives external ambient light and generates a current corresponding to the received light amount. The current is input to the illuminance sensor AD conversion unit 405 and converted into a digital signal in the same manner as the proximity sensor AD conversion unit 403. This digital signal is output from the proximity illuminance sensor 400 to the outside via the proximity illuminance sensor control unit 410.

この際、出力されるデジタル信号は初期キャリブレーション実行部420および常時キャリブレーション実行部430で処理され、記憶部404に記憶されているオフセット値を用いて補正され、近接照度センサ400より出力される。   At this time, the output digital signal is processed by the initial calibration execution unit 420 and the constant calibration execution unit 430, corrected using the offset value stored in the storage unit 404, and output from the proximity illuminance sensor 400. .

近接照度センサ400を用いて本発明のキャリブレーションを実施した場合、図4におけるS204において外部環境光の変化の検知が容易であり、近接照度センサ400のキャリブレーションの精度を向上させることが可能である。   When the calibration of the present invention is performed using the proximity illuminance sensor 400, it is easy to detect a change in external ambient light in S204 in FIG. 4, and the calibration accuracy of the proximity illuminance sensor 400 can be improved. is there.

〔実施形態3〕
本発明の実施形態3について、図6および図7に基づいて説明すれば、以下のとおりである。なお、説明の便宜上、前記実施形態にて説明した部材と同じ機能を有する部材については、同じ符号を付記し、その説明を省略する。
[Embodiment 3]
The third embodiment of the present invention will be described below with reference to FIGS. For convenience of explanation, members having the same functions as those described in the embodiment are given the same reference numerals, and descriptions thereof are omitted.

(近接センサの用途)
近接センサ100の用途の一例について説明する。まず、一例として、電子機器として携帯電話およびメディアプレーヤーを用いた場合について説明する。
(Use of proximity sensor)
An example of the use of the proximity sensor 100 will be described. First, as an example, a case where a mobile phone and a media player are used as electronic devices will be described.

携帯電話に着信があると、ユーザは携帯電話を耳に当てる動作を行う。そのとき、タッチパネル付の画面の表示がONであるとともに、タッチパネル機能がアクティブ状態であると、携帯電話を耳に当てることで画面に人肌が当たると、携帯電話が誤動作する可能性がある。このような誤動作を防止するために、近接センサ100が用いられる。   When the mobile phone receives an incoming call, the user performs an operation of placing the mobile phone on the ear. At that time, if the display of the screen with the touch panel is ON and the touch panel function is in an active state, the mobile phone may malfunction if the human skin hits the screen by placing the mobile phone on the ear. In order to prevent such a malfunction, the proximity sensor 100 is used.

具体的には、画面の表示がONであるとともにタッチパネル機能がアクティブ状態で着信があったときに、携帯電話が耳に当てられ近接センサ100が近接する人肌を検出すると、近接センサ100の検出結果に応じて、携帯電話が備える制御部は、以下の制御を行う。   Specifically, when the screen display is ON and the touch panel function is in an active state and an incoming call is received, the proximity sensor 100 is detected when the mobile phone is applied to the ear and the proximity sensor 100 detects proximity. Depending on the result, the control unit provided in the mobile phone performs the following control.

すなわち、画面の表示がONであるとともにタッチパネル機能がアクティブである状態で着信があり、近接センサ100が近接する人肌を検出すると、上記制御部は画面の表示をOFFするとともに、タッチパネル機能をアクティブから非アクティブへ切り替える。そして、通話が終了して携帯電話が人肌から離れることにより、人肌と携帯電話とが近接状態から非近接状態へ遷移したことを近接センサ100が検出すると、上記制御部は画面の表示を再びONするとともに、タッチパネル機能を再びアクティブに切り替える。   That is, when there is an incoming call when the screen display is ON and the touch panel function is active, and the proximity sensor 100 detects human skin that is close, the control unit turns off the screen display and activates the touch panel function. Switch from to inactive. When the proximity sensor 100 detects that the human skin and the mobile phone have transitioned from the proximity state to the non-proximity state due to the end of the call and the separation of the mobile phone from the human skin, the control unit displays the screen. At the same time, the touch panel function is switched to active again.

次に、モバイル機器であるメディアプレーヤーに近接センサ100を用いる場合の例を説明する。   Next, an example in which the proximity sensor 100 is used in a media player that is a mobile device will be described.

まず、近接センサ100を搭載していないメディアプレーヤーについて述べる。近接センサ100を搭載していないメディアプレーヤーにおいて、ユーザが、メディアプレーヤーが備えるタッチパネル付の画面の電源をOFFするためには、通常、ボタンを押す。画面の電源は、例えば、メディアプレーヤーをポケットに入れるときにOFFされる。   First, a media player not equipped with the proximity sensor 100 will be described. In a media player that does not include the proximity sensor 100, a user normally presses a button to turn off the power of a screen with a touch panel provided in the media player. The screen power is turned off, for example, when the media player is put in a pocket.

それに対して、近接センサ100を搭載しているメディアプレーヤーが備える制御部は、近接センサ100の検出結果に応じて、以下の制御を行う。   On the other hand, the control unit provided in the media player equipped with the proximity sensor 100 performs the following control according to the detection result of the proximity sensor 100.

すなわち、画面の表示がONであるとともにタッチパネル機能がアクティブである状態で、近接センサ100を搭載したメディアプレーヤーがポケットに入れられると、メディアプレーヤーと服の生地(またはポケットの生地)とが近接していることが近接センサ100により検出される。この場合、上記制御部は、画面の表示をOFFするとともに、タッチパネル機能を非アクティブに切り替える。   That is, when a media player equipped with the proximity sensor 100 is placed in a pocket while the screen display is ON and the touch panel function is active, the media player and the cloth for the clothes (or the cloth for the pocket) come close to each other. Is detected by the proximity sensor 100. In this case, the control unit turns off the screen display and switches the touch panel function to inactive.

また、メディアプレーヤーがポケットから出されて、メディアプレーヤーと服の生地(またはポケットの生地)とが近接センサ100により非近接であることが検出された場合、上記制御部は画面の表示を再びONするとともに、タッチパネルの機能を再びアクティブに切り替える。   Further, when the media player is taken out of the pocket and the media player and the cloth of the clothes (or the cloth of the pocket) are detected as not in proximity by the proximity sensor 100, the control unit turns the display on again. At the same time, the function of the touch panel is switched to active again.

以上のような制御を行うことにより、ユーザが意図していない期間にタッチパネル機能がアクティブであることによってメディアプレーヤー等のモバイル機器が誤動作することを防止することができる。また、画面の表示をOFFすることで、消費電力の低減を実現することが可能となる。   By performing the control as described above, it is possible to prevent a mobile device such as a media player from malfunctioning due to the touch panel function being active during a period not intended by the user. Moreover, it is possible to reduce power consumption by turning off the screen display.

次に、近接センサ100を備える電子機器の具体的な例について、図6および図7に基づき説明する。図6および図7は、それぞれ、本実施形態に係る電子機器の例を示している。図6は、本実施形態に係る電子機器の一例を示す斜視図である。図6に示す電子機器は携帯電話500である。図7は本実施形態に係る電子機器の他の例を示す背面図である。図7に示す電子機器はデジタルカメラ600ある。   Next, a specific example of an electronic device including the proximity sensor 100 will be described with reference to FIGS. 6 and 7 show examples of the electronic apparatus according to the present embodiment, respectively. FIG. 6 is a perspective view illustrating an example of an electronic apparatus according to the present embodiment. The electronic device shown in FIG. FIG. 7 is a rear view showing another example of the electronic apparatus according to the present embodiment. The electronic device shown in FIG.

図6に示すように、携帯電話500は、近接センサ501として、上述した近接センサ100または近接照度センサ400のいずれか1つを表示部502の上部に備えている。携帯電話500は、物体OB(図2参照)の近接状態・非近接状態に応じて、表示部502の表示のオン・オフの切り替えと、タッチパネル操作のオン・オフの切り替えを行う。   As shown in FIG. 6, the mobile phone 500 includes any one of the proximity sensor 100 and the proximity illuminance sensor 400 described above as the proximity sensor 501 at the top of the display unit 502. The mobile phone 500 switches the display 502 on / off and the touch panel operation on / off according to the proximity / non-proximity of the object OB (see FIG. 2).

近接センサ501として、近接センサ100または近接照度センサ400を備えることで、従来のセンサと比較して、キャリブレーション精度を向上させることが可能となり、結果として携帯電話500の誤動作を低減さることが可能となる。特に通話時にハンズフリーモード等非近接状態において近接センサ501が動作を続けている状態で、外部温度や外部環境光等の変化により近接センサ501の特性が変化してしまう場合でも、キャリブレーションを続けることで近接センサ501の出力値を安定させることができるので、結果、携帯電話500の誤動作を低減することが可能となる。   By providing the proximity sensor 100 or the proximity illuminance sensor 400 as the proximity sensor 501, it is possible to improve the calibration accuracy compared to the conventional sensor, and as a result, it is possible to reduce malfunction of the mobile phone 500. It becomes. In particular, calibration is continued even when the characteristics of the proximity sensor 501 change due to changes in external temperature, external ambient light, etc. while the proximity sensor 501 continues to operate in a non-proximity state such as hands-free mode during a call. As a result, the output value of the proximity sensor 501 can be stabilized, and as a result, malfunctions of the mobile phone 500 can be reduced.

図7に示すように、デジタルカメラ600は、近接センサ601として、上述した近接センサ100または近接照度センサ400のいずれか1つを表示部602の上部に備えている。デジタルカメラ600は、物体OBの近接状態・非近接状態に応じて、表示部602の表示のオン・オフの切り替えを行う。例えば、デジタルカメラ600の使用者が表示部602を確認しながら被写体を撮影しデジタルカメラ600で撮影を行う場合は、デジタルカメラ600が備える制御部により非近接状態と判定され表示部602はオンされる。それに対して、使用者がデジタルカメラ600のファインダー内を覗いて被写体を撮影する場合は、上記制御部により近接状態と判定され表示部602はオフされる。   As illustrated in FIG. 7, the digital camera 600 includes any one of the proximity sensor 100 and the proximity illuminance sensor 400 described above as the proximity sensor 601 at the top of the display unit 602. The digital camera 600 switches on / off the display of the display unit 602 according to the proximity state / non-proximity state of the object OB. For example, when the user of the digital camera 600 photographs a subject while confirming the display unit 602 and shoots with the digital camera 600, the control unit included in the digital camera 600 determines that it is in a non-proximity state and the display unit 602 is turned on. The On the other hand, when the user looks into the viewfinder of the digital camera 600 and photographs the subject, the control unit determines that the camera is in the proximity state and the display unit 602 is turned off.

その結果、デジタルカメラ600の消費電力を低減することができる。さらに表示部602にタッチパネル機能が備えられている場合、近接状態でタッチパネル機能がオフされることで使用者の顔が表示部602に触れてしまった時の誤動作を防ぐことが可能である。   As a result, the power consumption of the digital camera 600 can be reduced. Further, in the case where the display unit 602 is provided with a touch panel function, it is possible to prevent a malfunction when the user's face touches the display unit 602 by turning off the touch panel function in the proximity state.

近接センサ601として、近接センサ100または近接照度センサ400を備えることで従来のセンサと比較して、キャリブレーション精度を向上させることが可能となり、結果、デジタルカメラ600の誤動作を低減さることが可能となる。特に使用者がファインダーを覗いていない状態等、非近接状態で近接センサ601が動作を続けている状態において外部温度や外部環境光等の変化により近接センサ601の特性が変化してしまう場合でも、キャリブレーションを続けることで近接センサ601の出力値を安定させて、結果誤動作を低減することが可能である。   By providing the proximity sensor 601 or the proximity illuminance sensor 400 as the proximity sensor 601, it becomes possible to improve the calibration accuracy as compared with the conventional sensor, and as a result, it is possible to reduce malfunction of the digital camera 600. Become. Even when the characteristics of the proximity sensor 601 change due to changes in external temperature, external ambient light, etc. in a state where the proximity sensor 601 continues to operate in a non-proximity state, such as when the user is not looking through the viewfinder, By continuing the calibration, it is possible to stabilize the output value of the proximity sensor 601 and to reduce malfunctions as a result.

〔ソフトウェアによる実現例〕
近接センサ100の制御ブロックは、集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェアによって実現してもよい。
[Example of software implementation]
The control block of the proximity sensor 100 may be realized by a logic circuit (hardware) formed in an integrated circuit (IC chip) or the like, or may be realized by software using a CPU (Central Processing Unit).

後者の場合、近接センサ100は、各機能を実現するソフトウェアであるプログラムの命令を実行するCPU、上記プログラムおよび各種データがコンピュータ(またはCPU)で読み取り可能に記録されたROM(Read Only Memory)または記憶装置(これらを「記録媒体」と称する)、上記プログラムを展開するRAM(Random Access Memory)などを備えている。そして、コンピュータ(またはCPU)が上記プログラムを上記記録媒体から読み取って実行することにより、本発明の目的が達成される。上記記録媒体としては、「一時的でない有形の媒体」、例えば、テープ、ディスク、カード、半導体メモリ、プログラマブルな論理回路などを用いることができる。また、上記プログラムは、該プログラムを伝送可能な任意の伝送媒体(通信ネットワークや放送波等)を介して上記コンピュータに供給されてもよい。なお、本発明は、上記プログラムが電子的な伝送によって具現化された、搬送波に埋め込まれたデータ信号の形態でも実現され得る。   In the latter case, the proximity sensor 100 includes a CPU that executes instructions of a program that is software that implements each function, a ROM (Read Only Memory) in which the program and various data are recorded so as to be readable by a computer (or CPU), or A storage device (these are referred to as “recording media”), a RAM (Random Access Memory) that expands the program, and the like are provided. And the objective of this invention is achieved when a computer (or CPU) reads the said program from the said recording medium and runs it. As the recording medium, a “non-temporary tangible medium” such as a tape, a disk, a card, a semiconductor memory, a programmable logic circuit, or the like can be used. The program may be supplied to the computer via an arbitrary transmission medium (such as a communication network or a broadcast wave) that can transmit the program. The present invention can also be realized in the form of a data signal embedded in a carrier wave in which the program is embodied by electronic transmission.

〔まとめ〕
本発明の態様1に係る近接センサ(100)は、光を出射する発光部(101)と、前記発光部から出射され検知対象物体によって反射された反射光の受光量に応じた物体反射光電流と、前記反射光以外の光の受光量に応じた否検知対象物体反射光電流と、を含む測定電流を発生する受光部(102)と、前記測定電流の電流値が初期閾値以下である場合に前記否検知対象物体反射光電流の電流値に応じたオフセット値を前記測定電流の電流値に基づき更新し、前記測定電流の電流値が前記初期閾値より大きい場合に前記オフセット値を更新しない第1キャリブレーションを実行する第1実行部(初期キャリブレーション実行部120)と、を備えることを特徴とする。
[Summary]
The proximity sensor (100) according to the first aspect of the present invention includes a light emitting unit (101) that emits light, and an object reflected photocurrent according to the amount of reflected light that is emitted from the light emitting unit and reflected by a detection target object. And a light receiving unit (102) that generates a measurement current including a non-detection target object reflected photocurrent according to a received light amount of light other than the reflected light, and a current value of the measurement current is equal to or less than an initial threshold value And updating the offset value according to the current value of the non-detection target object reflected photocurrent based on the current value of the measurement current, and not updating the offset value when the current value of the measurement current is larger than the initial threshold value. And a first execution unit (initial calibration execution unit 120) that executes one calibration.

上記構成によれば、検知対象物体によって反射された光以外の受光量に応じて受光部が発生する否検知対象物体反射光電流に応じたオフセット値は、測定電流値が初期閾値以下の場合に第1キャリブレーションにより更新され、上記測定電流値が上記初期閾値よりも大きい場合には更新されない。   According to the above configuration, the offset value according to the detection target object reflected photocurrent generated by the light receiving unit according to the amount of received light other than the light reflected by the detection target object is when the measured current value is equal to or less than the initial threshold value. It is updated by the first calibration and is not updated when the measured current value is larger than the initial threshold value.

これにより、例えば、初期閾値を、近接があると判定するために用いられる近接検出用閾値と内部反射により発生すると考えられる電流値とを含む値とした場合、受光部で発生した測定電流値が初期閾値よりも大きい場合は、当該測定電流は近接している検知対象物体が存在している時に発生したものと考えられる。そのため、オフセット値の更新に用いることには適さない。したがって、測定電流値が初期閾値よりも大きい場合には、第1キャリブレーションにおいてオフセット値を更新しないようにすることで、常に適正なオフセット値を設定しておくことができる。言い換えると、上記構成により、フロアノイズを考慮したキャリブレーションを適切に実行することができる。その結果、近接の判定を、適正なオフセット値を用いて行うことができるので、近接を正確に検知することができる。   Thereby, for example, when the initial threshold value is a value including a proximity detection threshold value used for determining that there is proximity and a current value that is considered to be generated by internal reflection, the measured current value generated in the light receiving unit is When it is larger than the initial threshold, it is considered that the measurement current is generated when there is an adjacent detection target object. Therefore, it is not suitable for use in updating the offset value. Therefore, when the measured current value is larger than the initial threshold value, an appropriate offset value can always be set by not updating the offset value in the first calibration. In other words, with the above configuration, calibration considering floor noise can be performed appropriately. As a result, proximity determination can be performed using an appropriate offset value, so that proximity can be accurately detected.

本発明の態様2に係る近接センサ(100)は、上記態様1において、前記第1キャリブレーションを実行した後のオフセット値である第1オフセット値を、前記第1キャリブレーションを実行した後に前記受光部から発生した測定電流の電流値と前記第1オフセット値とを平均化処理した値に更新する第2キャリブレーションを実行する第2実行部(常時キャリブレーション実行部130)を備えていることが好ましい。   The proximity sensor (100) according to aspect 2 of the present invention is the proximity sensor (100) according to aspect 1, wherein the first offset value, which is an offset value after the first calibration is performed, is received after the first calibration is performed. A second execution unit (always calibration execution unit 130) that executes a second calibration for updating the current value of the measurement current generated from the unit and the first offset value to an averaged value. preferable.

上記構成によれば、第2キャリブレーションにより、第1キャリブレーションを実行した後のオフセット値である第1オフセット値が、測定電流値と第1オフセット値とを平均化した値に更新されるので、例えば、オフセット値をフロアノイズや外部の変化に対して徐々に追従した値にすることができる。これにより精度の高いオフセット値を設定することができる。   According to the above configuration, the first offset value that is the offset value after the first calibration is updated by the second calibration to a value obtained by averaging the measured current value and the first offset value. For example, the offset value can be a value that gradually follows floor noise and external changes. Thereby, a highly accurate offset value can be set.

本発明の態様3に係る近接センサ(100)は、上記態様2において、前記第2キャリブレーションでは、前記第1キャリブレーションを実行した後に前記受光部から発生した測定電流の電流値から前記第1オフセット値を減算した補正測定値が常時閾値以下の場合に、前記第1オフセット値が更新されることが好ましい。   The proximity sensor (100) according to Aspect 3 of the present invention is the proximity sensor (100) according to Aspect 2, wherein, in the second calibration, the first calibration is performed based on a current value of a measurement current generated from the light receiving unit after executing the first calibration. It is preferable that the first offset value is updated when the corrected measurement value obtained by subtracting the offset value is always equal to or less than the threshold value.

上記構成によれば、例えば、常時閾値を近接があると判定するために用いられる近接検出用閾値とした場合、近接している検知対象物体があるときに第2キャリブレーションにおける第1オフセット値の更新を行わないことができる。これにより、第2キャリブレーションを適切に実行することができる。   According to the above configuration, for example, when the proximity detection threshold value used for determining that there is always proximity is used, the first offset value in the second calibration when there is a detection target object in proximity. It is not possible to update. Thereby, the second calibration can be appropriately executed.

本発明の態様4に係る近接センサ(100)は、上記態様2において、前記第1キャリブレーションと前記第2キャリブレーションとは交互に実行され、前記第2キャリブレーションでは、前記第1キャリブレーションを実行した後に前記受光部から発生した測定電流の電流値から前記第1オフセット値を減算した補正測定値が下限閾値以下の場合には、前記第1オフセット値は更新されないことが好ましい。   In the proximity sensor (100) according to aspect 4 of the present invention, in the aspect 2, the first calibration and the second calibration are executed alternately, and the second calibration performs the first calibration. It is preferable that the first offset value is not updated when a corrected measurement value obtained by subtracting the first offset value from the current value of the measurement current generated from the light receiving unit after execution is equal to or lower than a lower limit threshold value.

上記構成によれば、例えば、下限閾値を第1キャリブレーション実行時の測定電流値(初期測定電流値)からオフセット値を減算した値とすると、第1キャリブレーションが誤キャリブレーションであると判定できる場合に、第2キャリブレーションにおける第1オフセット値の更新を行わず第1キャリブレーションを再度行うことができる。これにより、出力の値に誤キャリブレーションによるオフセット値を用いることを排除できるので、キャリブレーションの精度がより高くなる。   According to the above configuration, for example, if the lower limit threshold is a value obtained by subtracting the offset value from the measured current value (initial measured current value) at the time of executing the first calibration, it can be determined that the first calibration is an erroneous calibration. In this case, the first calibration can be performed again without updating the first offset value in the second calibration. As a result, it is possible to eliminate the use of an offset value due to erroneous calibration as an output value, and therefore the accuracy of calibration is further increased.

本発明の態様5に係る近接センサ(100)は、上記態様2において、前記第2キャリブレーションでは、外光の変化を検知した場合には、前記第1オフセット値は更新されないことが好ましい。   In the proximity sensor (100) according to the aspect 5 of the present invention, in the aspect 2, it is preferable that the first offset value is not updated when a change in external light is detected in the second calibration.

上記構成によれば、外光の変化があった場合に、第2キャリブレーションにおける第1オフセット値の更新を行わず第1キャリブレーションを再度行うことができる。これにより、外光の変化を考慮して改めて第1キャリブレーションを実施することができる。   According to the above configuration, when there is a change in external light, the first calibration can be performed again without updating the first offset value in the second calibration. As a result, the first calibration can be performed again in consideration of changes in external light.

本発明の態様6に係る近接センサ(100)は、上記態様5のいずれかにおいて、前記第1キャリブレーションにおいて前記オフセット値が更新されたか否かを判定するオフセット値更新判定部(フラグ判定部121)を備え、前記第1実行部は、前記オフセット値更新判定部により、前記第1キャリブレーションにおいて前記オフセット値が更新されていないと判定された場合に前記第1キャリブレーションにおいて前記オフセット値を更新することが好ましい。   A proximity sensor (100) according to an aspect 6 of the present invention is the proximity sensor (100) according to any one of the aspects 5 described above, wherein an offset value update determination unit (flag determination unit 121) determines whether or not the offset value has been updated in the first calibration. The first execution unit updates the offset value in the first calibration when the offset value update determination unit determines that the offset value has not been updated in the first calibration. It is preferable to do.

上記構成によれば、第1キャリブレーションにおいてオフセット値が更新されていないと判定される場合に第1キャリブレーションが実行されるので、第1キャリブレーションと第2キャリブレーションとを交互に実行することができる。   According to the above configuration, since the first calibration is performed when it is determined that the offset value is not updated in the first calibration, the first calibration and the second calibration are performed alternately. Can do.

本発明の態様7に係る近接センサ(100)のキャリブレーション方法は、光を出射する発光ステップと、前記発光ステップにおいて出射され検知対象物体によって反射された反射光の受光量に応じた物体反射光電流と、前記反射光以外の光の受光量に応じた否検知対象物体反射光電流と、を含む測定電流を発生する受光ステップと、前記測定電流の電流値が初期閾値以下である場合に前記否検知対象物体反射光電流の電流値に応じたオフセット値を前記測定電流の電流値に基づき更新し、前記測定電流の電流値が前記初期閾値より大きい場合に前記オフセット値を更新しない第1キャリブレーションを実行する第1実行ステップと、を含む。   The proximity sensor (100) calibration method according to aspect 7 of the present invention includes: a light emitting step for emitting light; and an object reflected light corresponding to the amount of reflected light emitted in the light emitting step and reflected by the detection target object. A light receiving step for generating a measurement current including a current and a non-detection target object reflected photocurrent according to a received light amount of light other than the reflected light, and when the current value of the measurement current is equal to or less than an initial threshold value A first calibration that updates the offset value according to the current value of the non-detection target object reflected photocurrent based on the current value of the measurement current and does not update the offset value when the current value of the measurement current is larger than the initial threshold value. A first execution step for executing the operation.

上記構成によれば、態様1と同様の効果を奏する。   According to the said structure, there exists an effect similar to the aspect 1. FIG.

本発明の態様8に係る近接センサ(100)のキャリブレーション方法は、上記態様7において、前記第1キャリブレーションを実行した後のオフセット値である第1オフセット値を、前記第1キャリブレーションを実行した後に前記受光ステップにおいて発生した測定電流の電流値と前記第1オフセット値とを平均化処理した値に更新する第2キャリブレーションを実行する第2実行ステップを含むことが好ましい。   The proximity sensor (100) calibration method according to aspect 8 of the present invention is the above-described aspect 7, in which the first calibration is performed using the first offset value, which is the offset value after the first calibration is performed. After that, it is preferable to include a second execution step of executing a second calibration for updating the current value of the measurement current generated in the light receiving step and the first offset value to an averaged value.

上記構成によれば、態様2と同様の効果を奏する。   According to the said structure, there exists an effect similar to the aspect 2. FIG.

本発明の態様9に係る近接センサ(100)のキャリブレーション方法は、上記態様8において、前記第2キャリブレーションでは、前記第1キャリブレーションを実行した後に前記受光ステップから発生した測定電流の電流値から前記第1オフセット値を減算した補正測定値が常時閾値以下の場合に、前記第1オフセット値が更新されることが好ましい。   In the calibration method of the proximity sensor (100) according to the ninth aspect of the present invention, the current value of the measurement current generated from the light receiving step after executing the first calibration in the second calibration is the second calibration. It is preferable that the first offset value is updated when a corrected measurement value obtained by subtracting the first offset value from is always equal to or less than a threshold value.

上記構成によれば、態様3と同様の効果を奏する。   According to the said structure, there exists an effect similar to the aspect 3.

本発明の態様10に係る近接センサ(100)のキャリブレーション方法は、上記態様8において、前記第1キャリブレーションと前記第2キャリブレーションとは交互に実行され、前記第2キャリブレーションでは、前記第1キャリブレーションを実行した後に前記受光ステップから発生した測定電流の電流値から前記第1オフセット値を減算した補正測定値が下限閾値以下の場合には、前記第1オフセット値は更新されないことが好ましい。   The proximity sensor (100) calibration method according to aspect 10 of the present invention is the aspect 8 in which the first calibration and the second calibration are alternately performed, and in the second calibration, the first calibration is performed. When the corrected measurement value obtained by subtracting the first offset value from the current value of the measurement current generated from the light receiving step after performing one calibration is less than or equal to the lower threshold value, the first offset value is preferably not updated. .

上記構成によれば、態様4と同様の効果を奏する。   According to the said structure, there exists an effect similar to the aspect 4.

本発明の態様11に係る近接センサ(100)のキャリブレーション方法は、上記態様8において、前記第2キャリブレーションでは、外光の変化を検知した場合には、前記第1オフセット値は更新されないことが好ましい。   In the calibration method of the proximity sensor (100) according to the aspect 11 of the present invention, the first offset value is not updated when a change in external light is detected in the second calibration in the aspect 8. Is preferred.

上記構成によれば、態様5と同様の効果を奏する。   According to the said structure, there exists an effect similar to the aspect 5. FIG.

本発明の態様12に係る近接センサ(100)のキャリブレーション方法は、上記態様7から11のいずれかにおいて、前記第1キャリブレーションにおいて前記オフセット値が更新されたか否かを判定するオフセット値更新判定ステップを備え、前記第1実行ステップは、前記オフセット値更新判定ステップにおいて、前記第1キャリブレーションにおいて前記オフセット値が更新されていないと判定された場合に前記第1キャリブレーションにおいて前記オフセット値を更新することが好ましい。   The proximity sensor (100) calibration method according to aspect 12 of the present invention is the offset value update determination for determining whether or not the offset value has been updated in the first calibration in any of the above aspects 7 to 11. And the first execution step updates the offset value in the first calibration when it is determined in the offset value update determination step that the offset value is not updated in the first calibration. It is preferable to do.

上記構成によれば、態様6と同様の効果を奏する。   According to the said structure, there exists an effect similar to the aspect 6. FIG.

本発明の態様13に係る近接照度センサ(400)は、態様1から6のいずれかに記載の近接センサ(100)において、前記受光部(402)は、外光を受光し、受光した光量に応じた電流を発生することで、前記外光の照度を検知することが好ましい。   In the proximity illuminance sensor (400) according to Aspect 13 of the present invention, in the proximity sensor (100) according to any one of Aspects 1 to 6, the light receiving unit (402) receives external light and changes the received light amount. It is preferable to detect the illuminance of the external light by generating a corresponding current.

上記構成によれば、態様1と同様の効果を奏する近接照度センサを実現することができる。   According to the above configuration, it is possible to realize a proximity illuminance sensor that exhibits the same effect as that of the first aspect.

本発明の態様14に係る電子機器(携帯電話500、デジタルカメラ600)は、態様1から6のいずれかに記載の近接センサ(100)、または態様13に記載の近接照度センサ(400)を備えていることが好ましい。   An electronic device (mobile phone 500, digital camera 600) according to aspect 14 of the present invention includes the proximity sensor (100) according to any one of aspects 1 to 6, or the proximity illuminance sensor (400) according to aspect 13. It is preferable.

上記構成によれば、態様1と同様の効果を奏する電子機器を実現することができる。   According to the said structure, the electronic device which has an effect similar to the aspect 1 is realizable.

本発明の各態様に係る近接センサは、コンピュータによって実現してもよく、この場合には、コンピュータを上記近接センサが備える各部(ソフトウェア要素)として動作させることにより上記近接センサをコンピュータにて実現させる近接センサの制御プログラム、およびそれを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に入る。   The proximity sensor according to each aspect of the present invention may be realized by a computer. In this case, the proximity sensor is realized by the computer by operating the computer as each unit (software element) included in the proximity sensor. A proximity sensor control program and a computer-readable recording medium on which the control program is recorded also fall within the scope of the present invention.

本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。さらに、各実施形態にそれぞれ開示された技術的手段を組み合わせることにより、新しい技術的特徴を形成することができる。   The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope shown in the claims, and embodiments obtained by appropriately combining technical means disclosed in different embodiments. Is also included in the technical scope of the present invention. Furthermore, a new technical feature can be formed by combining the technical means disclosed in each embodiment.

100 近接センサ
101・401 発光部
102・402 受光部
120・420 初期キャリブレーション実行部(第1実行部)
121 フラグ判定部(オフセット値更新判定部)
130・430 常時キャリブレーション実行部(第2実行部)
400 近接照度センサ
500 携帯電話(電子機器)
600 デジタルカメラ(電子機器)
100 proximity sensor 101/401 light emitting unit 102/402 light receiving unit 120/420 initial calibration execution unit (first execution unit)
121 Flag determination unit (offset value update determination unit)
130/430 Constant calibration execution unit (second execution unit)
400 Proximity sensor 500 Mobile phone (electronic equipment)
600 Digital camera (electronic equipment)

受光部102はフォトダイオード等で構成されており、光を検知することで測定電流を発生させる。測定電流は、発光部101から出射され物体OBによって反射された反射光Lの受光量に応じた物体反射光電流と、反射光L以外の光(例えば、筐体11により反射された反射光L3)の受光量に応じた否検知対象物体反射光電流と、を含む。受光部102で発生した測定電流は近接センサAD変換部103に出力される。 The light receiving unit 102 includes a photodiode or the like, and generates a measurement current by detecting light. The measured current, and the object reflection light current corresponding to the received light amount of the reflected light L 2 reflected by the emitted object OB from the light emitting unit 101, the reflected light L 2 other than the light (e.g., reflected reflected by the housing 11 Non-detection target object reflected photocurrent according to the amount of received light L3). The measurement current generated by the light receiving unit 102 is output to the proximity sensor AD conversion unit 103.

この問題を回避するために、初期測定電流値からオフセット値を減算した値(初期補正測定値)が、下限値を超える(ここでは0を超える)ように初期キャリブレーション後のオフセット値を設定する。これにより、実行された初期キャリブレーションが誤キャリブレーションであるか否かを初期キャリブレーション後に判定することが可能である。 In order to avoid this problem, the offset value after the initial calibration is set so that the value obtained by subtracting the offset value from the initial measurement current value (initial correction measurement value) exceeds the lower limit value (in this case, exceeds 0 ) . . Thereby, it is possible to determine after the initial calibration whether or not the executed initial calibration is an erroneous calibration.

本発明の態様6に係る近接センサ(100)は、上記態様1から5のいずれかにおいて、前記第1キャリブレーションにおいて前記オフセット値が更新されたか否かを判定するオフセット値更新判定部(フラグ判定部121)を備え、前記第1実行部は、前記オフセット値更新判定部により、前記第1キャリブレーションにおいて前記オフセット値が更新されていないと判定された場合に前記第1キャリブレーションにおいて前記オフセット値を更新することが好ましい。 The proximity sensor (100) according to Aspect 6 of the present invention is the proximity sensor (100) according to any one of Aspects 1 to 5, wherein the offset value update determination unit (flag determination) determines whether or not the offset value has been updated in the first calibration. 121), and the first execution unit determines that the offset value is determined in the first calibration when the offset value update determination unit determines that the offset value is not updated in the first calibration. Is preferably updated.

Claims (15)

光を出射する発光部と、
前記発光部から出射され検知対象物体によって反射された反射光の受光量に応じた物体反射光電流と、前記反射光以外の光の受光量に応じた否検知対象物体反射光電流と、を含む測定電流を発生する受光部と、
前記測定電流の電流値が初期閾値以下である場合に前記否検知対象物体反射光電流の電流値に応じたオフセット値を前記測定電流の電流値に基づき更新し、前記測定電流の電流値が前記初期閾値より大きい場合に前記オフセット値を更新しない第1キャリブレーションを実行する第1実行部と、
を備えることを特徴とする近接センサ。
A light emitting unit for emitting light;
An object reflected photocurrent corresponding to the amount of reflected light emitted from the light emitting unit and reflected by the detection target object; and a non-detection target object reflected photocurrent corresponding to the amount of received light other than the reflected light. A light receiving section for generating a measurement current;
When the current value of the measurement current is equal to or less than an initial threshold, the offset value corresponding to the current value of the non-detection target object reflected photocurrent is updated based on the current value of the measurement current, and the current value of the measurement current is A first execution unit that executes a first calibration that does not update the offset value when greater than an initial threshold;
A proximity sensor comprising:
前記第1キャリブレーションを実行した後のオフセット値である第1オフセット値を、前記第1キャリブレーションを実行した後に前記受光部から発生した測定電流の電流値と前記第1オフセット値とを平均化処理した値に更新する第2キャリブレーションを実行する第2実行部を備えていることを特徴とする請求項1に記載の近接センサ。   A first offset value, which is an offset value after the first calibration is executed, is averaged between the current value of the measurement current generated from the light receiving unit and the first offset value after the first calibration is executed. The proximity sensor according to claim 1, further comprising a second execution unit that executes a second calibration for updating to a processed value. 前記第2キャリブレーションでは、前記第1キャリブレーションを実行した後に前記受光部から発生した測定電流の電流値から前記第1オフセット値を減算した補正測定値が常時閾値以下の場合に、前記第1オフセット値が更新されることを特徴とする請求項2に記載の近接センサ。   In the second calibration, when the corrected measurement value obtained by subtracting the first offset value from the current value of the measurement current generated from the light receiving unit after executing the first calibration is always equal to or less than the threshold value, the first calibration is performed. The proximity sensor according to claim 2, wherein the offset value is updated. 前記第1キャリブレーションと前記第2キャリブレーションとは交互に実行され、
前記第2キャリブレーションでは、前記第1キャリブレーションを実行した後に前記受光部から発生した測定電流の電流値から前記第1オフセット値を減算した補正測定値が下限閾値以下の場合には、前記第1オフセット値は更新されないことを特徴とする請求項2に記載の近接センサ。
The first calibration and the second calibration are executed alternately,
In the second calibration, when the corrected measurement value obtained by subtracting the first offset value from the current value of the measurement current generated from the light receiving unit after executing the first calibration is equal to or lower than a lower limit threshold value, The proximity sensor according to claim 2, wherein one offset value is not updated.
前記第2キャリブレーションでは、外光の変化を検知した場合には、前記第1オフセット値は更新されないことを特徴とする請求項2に記載の近接センサ。   The proximity sensor according to claim 2, wherein, in the second calibration, the first offset value is not updated when a change in external light is detected. 前記第1キャリブレーションにおいて前記オフセット値が更新されたか否かを判定するオフセット値更新判定部を備え、
前記第1実行部は、前記オフセット値更新判定部により、前記第1キャリブレーションにおいて前記オフセット値が更新されていないと判定された場合に前記第1キャリブレーションにおいて前記オフセット値を更新することを特徴とする請求項1から5のいずれか1項に記載の近接センサ。
An offset value update determination unit that determines whether or not the offset value has been updated in the first calibration;
The first execution unit updates the offset value in the first calibration when the offset value update determination unit determines that the offset value is not updated in the first calibration. The proximity sensor according to any one of claims 1 to 5.
光を出射する発光ステップと、
前記発光ステップにおいて出射され検知対象物体によって反射された反射光の受光量に応じた物体反射光電流と、前記反射光以外の光の受光量に応じた否検知対象物体反射光電流と、を含む測定電流を発生する受光ステップと、
前記測定電流の電流値が初期閾値以下である場合に前記否検知対象物体反射光電流の電流値に応じたオフセット値を前記測定電流の電流値に基づき更新し、前記測定電流の電流値が前記初期閾値より大きい場合に前記オフセット値を更新しない第1キャリブレーションを実行する第1実行ステップと、
を含むことを特徴とする近接センサのキャリブレーション方法。
A light emitting step for emitting light;
An object reflected photocurrent according to the amount of reflected light emitted in the light emitting step and reflected by the detection target object; and a non-detection target object reflected photocurrent according to the amount of received light other than the reflected light. A light receiving step for generating a measurement current;
When the current value of the measurement current is equal to or less than an initial threshold, the offset value corresponding to the current value of the non-detection target object reflected photocurrent is updated based on the current value of the measurement current, and the current value of the measurement current is A first execution step of executing a first calibration that does not update the offset value when greater than an initial threshold;
A proximity sensor calibration method comprising:
前記第1キャリブレーションを実行した後のオフセット値である第1オフセット値を、前記第1キャリブレーションを実行した後に前記受光ステップにおいて発生した測定電流の電流値と前記第1オフセット値とを平均化処理した値に更新する第2キャリブレーションを実行する第2実行ステップを含むことを特徴とする請求項7に記載の近接センサのキャリブレーション方法。   The first offset value, which is an offset value after the first calibration is executed, is averaged between the current value of the measurement current generated in the light receiving step and the first offset value after the first calibration is executed. The proximity sensor calibration method according to claim 7, further comprising a second execution step of executing a second calibration for updating to a processed value. 前記第2キャリブレーションでは、前記第1キャリブレーションを実行した後に前記受光ステップから発生した測定電流の電流値から前記第1オフセット値を減算した補正測定値が常時閾値以下の場合に、前記第1オフセット値が更新されることを特徴とする請求項8に記載の近接センサのキャリブレーション方法。   In the second calibration, when the corrected measurement value obtained by subtracting the first offset value from the current value of the measurement current generated from the light receiving step after executing the first calibration is always equal to or less than a threshold value, the first calibration is performed. 9. The proximity sensor calibration method according to claim 8, wherein the offset value is updated. 前記第1キャリブレーションと前記第2キャリブレーションとは交互に実行され、
前記第2キャリブレーションでは、前記第1キャリブレーションを実行した後に前記受光ステップから発生した測定電流の電流値から前記第1オフセット値を減算した補正測定値が下限閾値以下の場合には、前記第1オフセット値は更新されないことを特徴とする請求項8に記載の近接センサのキャリブレーション方法。
The first calibration and the second calibration are executed alternately,
In the second calibration, when the corrected measurement value obtained by subtracting the first offset value from the current value of the measurement current generated from the light receiving step after executing the first calibration is equal to or lower than a lower limit threshold, the second calibration is performed. 9. The proximity sensor calibration method according to claim 8, wherein one offset value is not updated.
前記第2キャリブレーションでは、外光の変化を検知した場合には、前記第1オフセット値は更新されないことを特徴とする請求項8に記載の近接センサのキャリブレーション方法。   9. The proximity sensor calibration method according to claim 8, wherein, in the second calibration, the first offset value is not updated when a change in external light is detected. 前記第1キャリブレーションにおいて前記オフセット値が更新されたか否かを判定するオフセット値更新判定ステップを備え、
前記第1実行ステップは、前記オフセット値更新判定ステップにおいて、前記第1キャリブレーションにおいて前記オフセット値が更新されていないと判定された場合に前記第1キャリブレーションにおいて前記オフセット値を更新することを特徴とする請求項7から11のいずれか1項に記載の近接センサのキャリブレーション方法。
An offset value update determination step for determining whether or not the offset value has been updated in the first calibration;
The first execution step updates the offset value in the first calibration when it is determined in the offset value update determination step that the offset value is not updated in the first calibration. The proximity sensor calibration method according to any one of claims 7 to 11.
請求項1から6のいずれか1項に記載の近接センサにおいて、
前記受光部は、外光を受光し、受光した光量に応じた電流を発生することで、前記外光の照度を検知することを特徴とする近接照度センサ。
The proximity sensor according to any one of claims 1 to 6,
The proximity illuminance sensor, wherein the light receiving unit receives external light and detects an illuminance of the external light by generating a current corresponding to the received light quantity.
請求項1から6のいずれか1項に記載の近接センサ、または請求項13に記載の近接照度センサを備えていることを特徴とする電子機器。   An electronic apparatus comprising the proximity sensor according to claim 1 or the proximity illuminance sensor according to claim 13. 請求項7から12のいずれか1項に記載の近接センサのキャリブレーション方法をコンピュータに実行させるためのプログラム。   A program for causing a computer to execute the proximity sensor calibration method according to any one of claims 7 to 12.
JP2018518117A 2016-05-17 2017-03-09 Proximity sensor, proximity illuminance sensor, electronic device, and proximity sensor calibration method Active JP6641469B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2016099006 2016-05-17
JP2016099006 2016-05-17
PCT/JP2017/009401 WO2017199550A1 (en) 2016-05-17 2017-03-09 Proximity sensor, proximity illumination intensity sensor, electronic device, and proximity sensor calibration method

Publications (2)

Publication Number Publication Date
JPWO2017199550A1 true JPWO2017199550A1 (en) 2019-02-28
JP6641469B2 JP6641469B2 (en) 2020-02-05

Family

ID=60325116

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018518117A Active JP6641469B2 (en) 2016-05-17 2017-03-09 Proximity sensor, proximity illuminance sensor, electronic device, and proximity sensor calibration method

Country Status (4)

Country Link
US (1) US10514448B2 (en)
JP (1) JP6641469B2 (en)
CN (1) CN109155628B (en)
WO (1) WO2017199550A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3605518A1 (en) * 2017-03-31 2020-02-05 Shenzhen Royole Technologies Co., Ltd. Method and apparatus for controlling display screen
CN108923865B (en) * 2018-07-06 2021-06-11 Oppo(重庆)智能科技有限公司 Calibration method and device of infrared distance sensor, mobile terminal and storage medium
CN109632266B (en) * 2019-01-28 2021-04-16 上海科世达-华阳汽车电器有限公司 Detection method for approach switch and related device
JP7036236B2 (en) 2019-02-15 2022-03-15 株式会社村田製作所 Tactile and proximity sensors
CN111239750B (en) * 2020-01-03 2023-03-03 歌尔光学科技有限公司 Proximity sensor testing method and proximity sensor testing system
JP2021150671A (en) * 2020-03-16 2021-09-27 ローム株式会社 Light receiving ic, proximity sensor, and electronic apparatus
JP2022001924A (en) 2020-06-22 2022-01-06 シャープ福山セミコンダクター株式会社 Proximity sensor and electronic apparatus
CN111736139B (en) * 2020-06-22 2023-05-23 歌尔科技有限公司 Infrared calibration method, distance detection method, device and medium
KR102379373B1 (en) * 2020-08-24 2022-03-28 곽병관 Contactless operated switch
CN113155240B (en) * 2020-12-31 2023-03-07 重庆川仪自动化股份有限公司 Full-automatic control method for radar level meter calibration device
CN117665958B (en) * 2024-01-31 2024-05-24 荣耀终端有限公司 Calibration method of proximity light sensor and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006080896A (en) * 2004-09-09 2006-03-23 Keyence Corp Detection switch, photoelectronic switch and detecting method
JP2007309917A (en) * 2006-04-19 2007-11-29 Sick Optex Kk Photoelectric sensor with automatic sensitivity correction
JP2009168492A (en) * 2008-01-11 2009-07-30 Anywire:Kk Photoelectric sensor system
JP2011004230A (en) * 2009-06-19 2011-01-06 Sharp Corp Object detecting device and electronic apparatus
JP2011128084A (en) * 2009-12-18 2011-06-30 Sharp Corp Object detecting device, method of manufacturing the same, and electronic device
JP2013250833A (en) * 2012-06-01 2013-12-12 Nec Saitama Ltd Portable electronic instrument, method for controlling the same, and program
US20140021331A1 (en) * 2012-07-20 2014-01-23 Sitronix Technology Corp. Proximity sensing method
JP2014053656A (en) * 2012-09-05 2014-03-20 Sharp Corp Portable telephone device, program and recording medium

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7486386B1 (en) * 2007-09-21 2009-02-03 Silison Laboratories Inc. Optical reflectance proximity sensor
US7960699B2 (en) * 2008-10-22 2011-06-14 Eminent Electronic Technology Corp. Light detection circuit for ambient light and proximity sensor
US20100245289A1 (en) * 2009-03-31 2010-09-30 Miroslav Svajda Apparatus and method for optical proximity sensing and touch input control
CN102265252B (en) * 2011-06-24 2013-04-24 华为终端有限公司 A method and a device for adjusting a sensing threshold value of an infrared proximity sensor
JP2013118565A (en) 2011-12-05 2013-06-13 Panasonic Corp Portable terminal and proximity sensor
US8766162B2 (en) * 2012-01-12 2014-07-01 Maxim Integrated Products, Inc. Ambient light based gesture detection
US8638989B2 (en) * 2012-01-17 2014-01-28 Leap Motion, Inc. Systems and methods for capturing motion in three-dimensional space
JP2013213680A (en) * 2012-03-30 2013-10-17 Pioneer Electronic Corp Object detecting device, object detecting method, object detecting program, and information recording medium
CN104937438B (en) * 2013-01-25 2017-03-08 夏普株式会社 Optical sensor and electronic equipment
FR3002329A1 (en) * 2013-02-20 2014-08-22 St Microelectronics Grenoble 2 PROXIMITY SENSOR
US9772398B2 (en) * 2014-06-26 2017-09-26 Intersil Americas LLC Optical proximity sensors with reconfigurable photodiode array
EP2988479B1 (en) * 2014-08-19 2019-01-30 Semtech Corporation Capacitive proximity sensor and mobile device
US9547365B2 (en) * 2014-09-15 2017-01-17 Google Inc. Managing information display
US9977512B2 (en) * 2014-10-24 2018-05-22 Intersil Americas LLC Open loop correction for optical proximity detectors
WO2018086133A1 (en) * 2016-11-14 2018-05-17 SZ DJI Technology Co., Ltd. Methods and systems for selective sensor fusion

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006080896A (en) * 2004-09-09 2006-03-23 Keyence Corp Detection switch, photoelectronic switch and detecting method
JP2007309917A (en) * 2006-04-19 2007-11-29 Sick Optex Kk Photoelectric sensor with automatic sensitivity correction
JP2009168492A (en) * 2008-01-11 2009-07-30 Anywire:Kk Photoelectric sensor system
JP2011004230A (en) * 2009-06-19 2011-01-06 Sharp Corp Object detecting device and electronic apparatus
JP2011128084A (en) * 2009-12-18 2011-06-30 Sharp Corp Object detecting device, method of manufacturing the same, and electronic device
JP2013250833A (en) * 2012-06-01 2013-12-12 Nec Saitama Ltd Portable electronic instrument, method for controlling the same, and program
US20140021331A1 (en) * 2012-07-20 2014-01-23 Sitronix Technology Corp. Proximity sensing method
JP2014053656A (en) * 2012-09-05 2014-03-20 Sharp Corp Portable telephone device, program and recording medium

Also Published As

Publication number Publication date
JP6641469B2 (en) 2020-02-05
US20190285735A1 (en) 2019-09-19
US10514448B2 (en) 2019-12-24
CN109155628A (en) 2019-01-04
CN109155628B (en) 2021-11-23
WO2017199550A1 (en) 2017-11-23

Similar Documents

Publication Publication Date Title
WO2017199550A1 (en) Proximity sensor, proximity illumination intensity sensor, electronic device, and proximity sensor calibration method
US10761642B2 (en) Method, mobile terminal and non-transitory computer-readable storage medium for adjusting scanning frequency of touch screen
CN107943345B (en) Method and device for calibrating proximity sensor, storage medium and electronic equipment
US8723149B2 (en) Systems and methods for advanced monitoring and control using an LED driver in an optical processor
US20200074956A1 (en) Screen-off control method and apparatus, storage medium, and terminal
CN106303023B (en) Screen state adjusting method and device
US9063010B2 (en) Method and apparatus for adjusting sensing threshold of infrared proximity sensor
JP6062175B2 (en) Portable terminal, power saving control program, and power saving control method
US8823682B2 (en) Proximity sensor and electronic device
US20150097789A1 (en) Electronic apparatus with proximity sensor and automatic calibration method thereof
US8838181B2 (en) Communication device for automatically switching its communication modes and operating method thereof
WO2019015417A1 (en) Proximity sensor control method and device, storage medium and mobile terminal
TW201405366A (en) Proximity sensing method
CN106768311B (en) A kind of environment light detection method, device and terminal
US11443701B2 (en) Screen state control method, device, and mobile terminal
US9134172B2 (en) Ambient light sensing method and an ambient light sensing device
CN111262986B (en) Calibration method and calibration device for proximity sensor and mobile terminal
JP2013118565A (en) Portable terminal and proximity sensor
KR102495326B1 (en) Electronic device and control method thereof
JP7317600B2 (en) Infrared measuring device and its measuring method
EP4183125A1 (en) Adaptive proximity detection system
JP6372367B2 (en) Information processing apparatus, power control method, and power control program
KR20210115543A (en) Image recognition sensor module and a mobile terminal having the same
CN107526088B (en) Proximity sensor based error cancellation method and related product
JP6279275B2 (en) Mobile terminal and method for controlling mobile terminal

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181018

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181018

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20191224

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191227

R150 Certificate of patent or registration of utility model

Ref document number: 6641469

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150