JP2002171162A - Photoelectric sensor and method for adjusting sensitivity of photoelectric sensor - Google Patents

Photoelectric sensor and method for adjusting sensitivity of photoelectric sensor

Info

Publication number
JP2002171162A
JP2002171162A JP2000365742A JP2000365742A JP2002171162A JP 2002171162 A JP2002171162 A JP 2002171162A JP 2000365742 A JP2000365742 A JP 2000365742A JP 2000365742 A JP2000365742 A JP 2000365742A JP 2002171162 A JP2002171162 A JP 2002171162A
Authority
JP
Japan
Prior art keywords
reference value
light
signal
electric signal
hysteresis width
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
JP2000365742A
Other languages
Japanese (ja)
Other versions
JP3885489B2 (en
Inventor
Kiyohiko Gondo
清彦 権藤
Seiji Imai
清司 今井
Takashi Kamei
隆 亀井
Hiroyuki Inoue
宏之 井上
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP2000365742A priority Critical patent/JP3885489B2/en
Publication of JP2002171162A publication Critical patent/JP2002171162A/en
Application granted granted Critical
Publication of JP3885489B2 publication Critical patent/JP3885489B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a photoelectric sensor in which a reference value and a hysteresis width of a comparison operating means (comparator function) can be adjusted automatically corresponding to the gain adjustment of a light receiving means and high resolution is realized. SOLUTION: This photoelectric sensor is constituted of a light receiving means 2, a light projecting means 3 and a judging means 4. The light receiving means 2 is equipped with a gain adjusting means 7 for adjusting the gain of an amplifier 6 which amplifies an electric signal VS1, and outputs a position signal VP corresponding to an adjusting position of the gain adjusting means 7. The judging means 4 is equipped with the comparison operating means 12 which can adjust a reference value VK1 and a hysteresis width ΔV1. On the basis of the position signal VP supplied from the gain adjusting means 7, either or both of the reference value VK1 and the hysteresis width ΔV1 are adjusted.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は対象物の有無を高
分解能で判定する光電センサおよび光電センサの感度調
整方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a photoelectric sensor for determining the presence or absence of an object with high resolution, and a method for adjusting the sensitivity of the photoelectric sensor.

【0002】[0002]

【従来の技術】従来の光電センサにおいて、投光部の発
光ダイオード(LED)に流す電流を変化させ、対象物
までの距離に応じて発光ダイオード(LED)から放射
する光量を調整し、センサの感度を調整するように構成
されたものが知られている。
2. Description of the Related Art In a conventional photoelectric sensor, the amount of light radiated from a light emitting diode (LED) is adjusted according to the distance to an object by changing the current flowing through the light emitting diode (LED) in a light emitting section. One configured to adjust the sensitivity is known.

【0003】また、従来の光電センサにおいて、受光部
の増幅器の利得(ゲイン)を調整し、対象物が近距離に
ある場合に、センサの感度を調整するように構成された
ものも知られている。
Further, there is known a conventional photoelectric sensor which is configured to adjust the gain of an amplifier of a light receiving unit and adjust the sensitivity of the sensor when an object is at a short distance. I have.

【0004】さらに、従来の光電センサには、比較器
(コンパレータ)の閾値(基準値)を調整して感度を調
整することにより、センサの分解能を向上させるように
構成されたものがある。
Further, some conventional photoelectric sensors are configured to improve the resolution of the sensor by adjusting the sensitivity by adjusting the threshold value (reference value) of a comparator.

【0005】[0005]

【発明が解決しようとする課題】従来の光電センサは、
対象物の有無を判定する比較器(コンパレータ)の閾値
(基準値)が一定なので、投光部の発光ダイオード(L
ED)に流す電流を変えて発光ダイオード(LED)か
ら放射する光量を調整しても、受光する光信号のレベル
は変化するが、光信号とノイズの比(S/N比)は同じ
であるため、センサの分解能を向上させることができな
い課題がある。
SUMMARY OF THE INVENTION Conventional photoelectric sensors are:
Since the threshold value (reference value) of the comparator that determines the presence or absence of the object is constant, the light emitting diode (L
Even if the amount of light emitted from the light emitting diode (LED) is adjusted by changing the current flowing through the ED), the level of the received optical signal changes, but the ratio of the optical signal to the noise (S / N ratio) is the same. Therefore, there is a problem that the resolution of the sensor cannot be improved.

【0006】また、発光ダイオード(LED)から放射
する光量を調整する方法は、光量を必要以上に多くする
と受光部の増幅器で信号が飽和する虞や、光量を必要以
上に少なくすると対象物を判定できなくなる虞がある。
The method of adjusting the amount of light radiated from a light emitting diode (LED) is based on the risk that a signal may be saturated in an amplifier of a light receiving unit if the amount of light is increased more than necessary, or an object may be determined if the amount of light is reduced more than necessary. It may not be possible.

【0007】受光部の増幅器の利得(ゲイン)を調整す
る従来の光電センサは、対象物の有無を判定する比較器
(コンパレータ)にヒステリシス特性を設定している場
合には、利得(ゲイン)を低く設定すると信号のノイズ
成分が小さくなるが、信号成分も小さくなり、一方ヒス
テリシス特性のヒステリシス幅(オン−オフレベル)は
一定なので、分解能の低下を招く課題がある。
In a conventional photoelectric sensor for adjusting the gain of an amplifier in a light receiving unit, when a hysteresis characteristic is set in a comparator for judging the presence or absence of an object, the gain is not adjusted. When set low, the noise component of the signal is reduced, but the signal component is also reduced. On the other hand, the hysteresis width (on-off level) of the hysteresis characteristic is constant, so that there is a problem that the resolution is reduced.

【0008】また、比較器(コンパレータ)の閾値(基
準値)を調整する従来の光電センサは、閾値(基準値)
を大きなレベルに設定すると、受光部の増幅器の利得
(ゲイン)を高く設定し、増幅器から出力される信号を
大きなレベルにしなければ対象物有りの判定ができず、
増幅器の出力信号が飽和する虞がある。
A conventional photoelectric sensor for adjusting a threshold value (reference value) of a comparator has a threshold value (reference value).
Is set to a large level, the gain (gain) of the amplifier of the light receiving unit is set to be high, and unless the signal output from the amplifier is set to a large level, it cannot be determined that there is an object.
The output signal of the amplifier may be saturated.

【0009】また、分解能を向上させるために閾値(基
準値)を小さなレベルに設定すると、無信号時のノイズ
(例えば、蛍光灯の光)が閾値(基準値)を超え、復帰
(無信号時に検出出力なしの状態)不良を発生する虞も
ある。
If the threshold (reference value) is set to a small level in order to improve the resolution, noise when there is no signal (for example, light from a fluorescent lamp) exceeds the threshold (reference value) and returns (when there is no signal). (State without detection output) Failure may occur.

【0010】この発明はこのような課題を解決するため
になされたもので、第1の目的は受光手段の利得(ゲイ
ン)調整または投光手段の光量調節に対応して比較演算
手段(コンパレータ機能)の基準値およびヒステリシス
幅を自動的に調整でき、高分解能を実現する光電センサ
を提供することにある。
SUMMARY OF THE INVENTION The present invention has been made to solve such a problem, and a first object of the present invention is to provide a comparison operation means (comparator function) corresponding to adjustment of a gain of a light receiving means or adjustment of a light amount of a light projecting means. It is another object of the present invention to provide a photoelectric sensor that can automatically adjust the reference value and the hysteresis width of (1) and realize high resolution.

【0011】また、第2の目的は、受光手段の利得(ゲ
イン)調整または投光手段の光量調節に対応して比較演
算手段(コンパレータ機能)の基準およびヒステリシス
幅を自動的に調整して分解能アップを図る光電センサの
感度調整方法を提供することにある。
A second object is to automatically adjust the reference and the hysteresis width of the comparison operation means (comparator function) in accordance with the adjustment of the gain of the light receiving means or the adjustment of the light amount of the light projecting means. It is an object of the present invention to provide a method for adjusting the sensitivity of a photoelectric sensor for improving the sensitivity.

【0012】[0012]

【課題を解決するための手段】前記課題を解決するため
この発明に係る光電センサは、受光手段に、電気信号を
増幅する増幅器の利得を調整する利得調整手段を備え、
利得調整手段の調整位置に対応した位置信号を出力する
とともに、判定手段には、基準値ならびにヒステリシス
幅が調整可能な比較演算手段を備え、利得調整手段から
供給される位置信号に基づいて基準値とヒステリシス幅
のいずれか一方、または双方を調整することを特徴とす
る。
According to another aspect of the present invention, there is provided a photoelectric sensor according to the present invention, wherein light receiving means includes gain adjusting means for adjusting the gain of an amplifier for amplifying an electric signal.
In addition to outputting a position signal corresponding to the adjustment position of the gain adjustment means, the determination means includes comparison operation means capable of adjusting the reference value and the hysteresis width, and the reference value is determined based on the position signal supplied from the gain adjustment means. And / or the hysteresis width is adjusted.

【0013】この発明に係る光電センサは、受光手段の
利得を調整することにより、位置信号に基づいて比較演
算手段の基準値とヒステリシス幅のいずれか一方、また
は双方を調整することができるので、対象物が近距離に
あっても最適な感度ならびに最適な分解能で判定するこ
とができ、対象物を高精度に判別することができる。
In the photoelectric sensor according to the present invention, one or both of the reference value and the hysteresis width of the comparison operation means can be adjusted based on the position signal by adjusting the gain of the light receiving means. Even if the target is at a short distance, the determination can be made with the optimum sensitivity and the optimum resolution, and the target can be determined with high accuracy.

【0014】また、この発明に係る光電センサは、投光
手段に、放射する光量を調節する光量調節手段を備え、
光量調節手段の調節位置に対応した調節信号を出力する
とともに、判定手段は、基準値ならびにヒステリシス幅
が調整可能な比較演算手段を備え、利得調整手段から供
給される位置信号に基づいて基準値とヒステリシス幅の
いずれか一方、または双方を調整することを特徴とす
る。
In the photoelectric sensor according to the present invention, the light projecting means includes a light quantity adjusting means for adjusting a light quantity to be radiated,
Along with outputting an adjustment signal corresponding to the adjustment position of the light amount adjustment unit, the determination unit includes a comparison operation unit capable of adjusting a reference value and a hysteresis width, and determines a reference value and a reference value based on the position signal supplied from the gain adjustment unit. It is characterized in that one or both of the hysteresis widths are adjusted.

【0015】この発明に係る光電センサは、投光手段の
光量を調節することにより、調節信号に基づいて比較演
算手段の基準値とヒステリシス幅のいずれか一方、また
は双方を調整することができるので、対象物が近距離に
あっても最適な感度ならびに最適な分解能で判定するこ
とができ、対象物を高精度に判別することができる。
In the photoelectric sensor according to the present invention, one or both of the reference value and the hysteresis width of the comparison operation means can be adjusted based on the adjustment signal by adjusting the light amount of the light projecting means. Even if the object is at a short distance, the determination can be made with the optimum sensitivity and the optimum resolution, and the object can be determined with high accuracy.

【0016】さらに、この発明に係る判定手段は、位置
信号または調節信号、および電気信号をディジタル値に
変換するA/D変換手段と、位置信号または調節信号の
ディジタル値に対応した基準値とヒステリシス幅を記憶
する記憶手段と、を備え、位置信号または調節信号、お
よび電気信号が供給されると、記憶手段に記憶した基準
値とヒステリシス幅を読み出し、電気信号と基準値を比
較演算手段で比較演算して対象物の有無を判定すること
を特徴とする。
Further, the judging means according to the present invention comprises: A / D conversion means for converting a position signal or an adjustment signal and an electric signal into a digital value; a reference value and a hysteresis corresponding to the digital value of the position signal or the adjustment signal. Storage means for storing the width, when the position signal or the adjustment signal and the electric signal are supplied, the reference value and the hysteresis width stored in the storage means are read, and the electric signal and the reference value are compared by the comparison operation means. It is characterized in that the presence or absence of an object is determined by calculation.

【0017】この発明に係る判定手段は、位置信号また
は調節信号のディジタル値に対応した基準値とヒステリ
シス幅を記憶しておき、位置信号または調節信号が供給
されると記憶してある基準値とヒステリシス幅を読み出
し、電気信号と基準値を比較演算して対象物の有無を判
定するので、利得または光量に対応して最適な分解能で
対象物の判定を実現することができる。
The determining means according to the present invention stores a reference value and a hysteresis width corresponding to the digital value of the position signal or the adjustment signal, and stores the reference value and the stored reference value when the position signal or the adjustment signal is supplied. Since the hysteresis width is read and the electric signal is compared with the reference value to determine the presence or absence of the target, the determination of the target can be realized with an optimum resolution corresponding to the gain or the light amount.

【0018】また、この発明に係る記憶手段は、位置信
号または調節信号の変化に対して基準値を所定の範囲に
設定することを特徴とする。
Further, the storage means according to the present invention is characterized in that a reference value is set in a predetermined range with respect to a change in a position signal or an adjustment signal.

【0019】この発明に係る記憶手段は、位置信号また
は調節信号の変化に対して基準値を所定の範囲に設定す
るので、復帰不良または飽和を防止することができる。
The storage means according to the present invention sets the reference value within a predetermined range with respect to a change in the position signal or the adjustment signal, so that a return failure or saturation can be prevented.

【0020】さらに、この発明に係る記憶手段は、位置
信号または調節信号の変化に対して基準値をリニアに設
定することを特徴とする。
Further, the storage means according to the present invention is characterized in that the reference value is set linearly with respect to a change in the position signal or the adjustment signal.

【0021】この発明に係る記憶手段は、位置信号また
は調節信号の変化に対して基準値をリニアに設定するの
で、感度に対応して最適な分解能を実現することができ
る。
Since the storage means according to the present invention sets the reference value linearly with respect to the change of the position signal or the adjustment signal, it is possible to realize an optimum resolution corresponding to the sensitivity.

【0022】また、この発明に係る記憶手段は、位置信
号または調節信号の変化に対して基準値をノンリニアに
設定することを特徴とする。
Further, the storage means according to the present invention is characterized in that a reference value is set non-linearly with respect to a change in a position signal or an adjustment signal.

【0023】この発明に係る記憶手段は、位置信号また
は調節信号の変化に対して基準値をノンリニアに設定す
るので、感度に対応して最適な分解能を実現することが
できる。
The storage means according to the present invention sets the reference value non-linearly with respect to the change of the position signal or the adjustment signal, so that an optimum resolution can be realized in accordance with the sensitivity.

【0024】この発明に係る光電センサの感度調整方法
は、受光手段のゲインを調整するステップ1と、位置信
号をA/D変換し、ディジタル値を読み取るステップ2
と、ディジタル値に対応した基準値、ヒステリシス幅を
読み出すステップ3と、基準値、ヒステリシス幅を設定
するステップ4と、調整したゲインで増幅し、A/D変
換した電気信号と設定した基準値、ヒステリシス幅を比
較演算するステップ5と、比較結果に基づいて対象物の
有無を判定するステップ6とを備え、感度を調整するこ
とを特徴とする。
In the method for adjusting the sensitivity of the photoelectric sensor according to the present invention, step 1 for adjusting the gain of the light receiving means and step 2 for A / D converting the position signal and reading the digital value.
Step 3 for reading a reference value and a hysteresis width corresponding to the digital value, Step 4 for setting the reference value and the hysteresis width, and an electric signal amplified and A / D converted with the adjusted gain and the set reference value. The method includes a step 5 of comparing and calculating a hysteresis width, and a step 6 of determining the presence or absence of an object based on a result of the comparison, wherein sensitivity is adjusted.

【0025】この発明に係る光電センサの感度調整方法
は、ステップ1からステップ6を備えたので、対象物が
近距離にあっても最適な感度ならびに最適な分解能で判
定することができ、対象物を高精度に判別することがで
きる。
The method for adjusting the sensitivity of the photoelectric sensor according to the present invention includes Step 1 to Step 6, so that the determination can be made with the optimum sensitivity and the optimum resolution even when the object is at a short distance. Can be determined with high accuracy.

【0026】また、この発明に係る光電センサの感度調
整方法は、投光手段の光量を調節するステップ1と、調
節信号A/Dを変換し、ディジタル値を読み取るステッ
プ2と、ディジタル値に対応した基準値、ヒステリシス
幅を読み出すステップ3と、基準値、ヒステリシス幅を
設定するステップ4と、受光して増幅し、A/D変換し
た電気信号と設定した基準値、ヒステリシス幅を比較演
算するステップ5と、比較結果に基づいて対象物の有無
を判定するステップ6とを備え、感度を調整することを
特徴とする。
The sensitivity adjustment method for a photoelectric sensor according to the present invention includes a step 1 for adjusting the amount of light of the light projecting means, a step 2 for converting an adjustment signal A / D and reading a digital value, and a method for adjusting the digital value. Step 3 for reading the set reference value and hysteresis width, Step 4 for setting the reference value and hysteresis width, and Step for comparing and calculating the received, amplified, A / D converted electric signal and the set reference value and hysteresis width. 5 and a step 6 of determining the presence or absence of the target object based on the comparison result, wherein the sensitivity is adjusted.

【0027】この発明に係る光電センサの感度調整方法
は、ステップ1からステップ6を備えたので、対象物が
近距離にあっても最適な感度ならびに最適な分解能で判
定することができ、対象物を高精度に判別することがで
きる。
Since the method for adjusting the sensitivity of the photoelectric sensor according to the present invention includes Steps 1 to 6, even if the object is at a short distance, it is possible to determine with the optimum sensitivity and the optimum resolution. Can be determined with high accuracy.

【0028】[0028]

【発明の実施の形態】以下、この発明の実施の形態を添
付図面に基づいて説明する。図1はこの発明に係る光電
センサの一実施の形態要部ブロック構成図である。図1
において、光電センサ1は、受光手段2、投光手段3、
判定手段4を備え、投光手段3から対象物20に光信号
LSを投光し、対象物20で反射された反射光LRを受光
手段2で受光して光−電気変換を施した電気信号に基づ
いて判定手段4で対象物20の有無を判定する。
Embodiments of the present invention will be described below with reference to the accompanying drawings. FIG. 1 is a block diagram of a main part of an embodiment of a photoelectric sensor according to the present invention. FIG.
, The photoelectric sensor 1 includes a light receiving unit 2, a light projecting unit 3,
An electric signal which is provided with a judging means 4, which emits an optical signal LS from the light projecting means 3 to the object 20, receives light reflected by the object 20 LR reflected by the light receiving means 2, and performs optical-electrical conversion The presence or absence of the object 20 is determined by the determination means 4 based on

【0029】受光手段2は、受光素子5、増幅器6、利
得調整手段7を備える。受光素子5は、フォトダイオー
ド(PD)で構成し、対象物20で反射された反射光L
Rを受光し、反射光LRに光−電気変換を施し、電気変換
したアナログ量の電気信号VS1を増幅器6に供給する。
The light receiving means 2 includes a light receiving element 5, an amplifier 6, and a gain adjusting means 7. The light receiving element 5 is constituted by a photodiode (PD), and the reflected light L reflected by the object 20
R is received, the reflected light LR is subjected to light-to-electric conversion, and the converted electric signal VS1 of an analog amount is supplied to the amplifier 6.

【0030】増幅器6は、利得を変更可能な演算増幅器
等で構成し、受光素子5から供給される電気信号VS1を
増幅し、増幅した電気信号VS2を判定手段4のA/D変
換手段10Bに提供する。
The amplifier 6 is composed of an operational amplifier or the like whose gain can be changed. The amplifier 6 amplifies the electric signal VS1 supplied from the light receiving element 5 and sends the amplified electric signal VS2 to the A / D conversion means 10B of the judgment means 4. provide.

【0031】利得調整手段7は、増幅器6の利得が変更
できる可変抵抗器(ボリューム)等で構成し、外部から
可変抵抗器(ボリューム)を操作して増幅器6の利得
(ゲイン)を調整する。また、利得調整手段7は、可変
抵抗器(ボリューム)の位置(回転角度=抵抗値)に対
応した位置信号VP(直流電圧)を判定手段4のA/D
変換手段10Aに提供する。なお、利得調整手段7の可
変抵抗器(ボリューム)は、増幅器6の利得(ゲイン)
が増加するように調整すると、位置信号VP(直流電
圧)も増加するように構成する。
The gain adjusting means 7 is composed of a variable resistor (volume) or the like capable of changing the gain of the amplifier 6, and externally operates the variable resistor (volume) to adjust the gain (gain) of the amplifier 6. Further, the gain adjusting means 7 determines the position signal VP (DC voltage) corresponding to the position (rotation angle = resistance value) of the variable resistor (volume) by the A / D
It is provided to the conversion means 10A. Note that the variable resistor (volume) of the gain adjusting means 7 is the gain (gain) of the amplifier 6.
Is adjusted so as to increase, the position signal VP (DC voltage) also increases.

【0032】投光手段3は、発光素子8、駆動手段9を
備える。発光素子8は、発光ダイオード(LED)で構
成し、駆動手段9から供給される駆動信号PDに対応し
た光量のパルス波形の光信号LSを対象物20に投光す
る。
The light projecting means 3 includes a light emitting element 8 and a driving means 9. The light emitting element 8 is constituted by a light emitting diode (LED) and projects an optical signal LS having a pulse waveform of a light amount corresponding to the drive signal PD supplied from the drive means 9 to the object 20.

【0033】駆動手段9は、定電流源等のLED駆動回
路で構成し、判定手段4の発光制御手段13から提供さ
れる一定周期Tのパルス波形の発光制御信号CDに基づ
いてパルス幅TP、休止期間TK(T=TP+TK)の駆動
信号PDを発光素子8に供給する。従って、発光素子8
は、駆動信号PDのパルス幅TPの期間だけ周期的に発光
する。
The driving means 9 is constituted by an LED driving circuit such as a constant current source or the like. The driving means 9 has a pulse width TP, The drive signal PD for the idle period TK (T = TP + TK) is supplied to the light emitting element 8. Therefore, the light emitting element 8
Emits light periodically during the period of the pulse width TP of the drive signal PD.

【0034】判定手段4は、マイクロプロセッサを基本
に構成し、A/D変換手段10A,10B、記憶手段1
1、比較演算手段12、発光制御手段13を備える。A
/D変換手段10Aは、A/Dコンバータで構成し、利
得調整手段7から供給されるアナログ量の位置信号VP
に所定のサンプリング時間でA/D変換を施し、ディジ
タル値の位置信号VDPを記憶手段11に供給する。
The judging means 4 is basically constituted by a microprocessor, and comprises A / D converting means 10A and 10B,
1, a comparison operation unit 12 and a light emission control unit 13. A
The A / D converter 10A is composed of an A / D converter, and receives the analog position signal VP supplied from the gain adjuster 7.
Is subjected to A / D conversion at a predetermined sampling time, and a digital value position signal VDP is supplied to the storage means 11.

【0035】A/D変換手段10Bは、A/Dコンバー
タで構成し、増幅器6から供給されるアナログ量の電気
信号VS2に所定のサンプリング時間でA/D変換を施
し、ディジタル値の電気信号VDSを比較演算手段12に
供給する。
The A / D conversion means 10B comprises an A / D converter, performs A / D conversion on the analog electric signal VS2 supplied from the amplifier 6 at a predetermined sampling time, and outputs a digital electric signal VDS Is supplied to the comparison operation means 12.

【0036】記憶手段11は、ROM、EEPROM等
のメモリで構成し、予め実験や計算で求めた図2または
図3に示すディジタル値の位置信号VDPに対応する基準
値VK1,ヒステリシス幅ΔV1を設定しておき、A/D
変換手段10AからA/D変換された位置信号VDPが供
給されると、位置信号VDPに対応した基準値VK1および
ヒステリシス幅ΔV1を読み出して比較演算手段12に
設定する。
The storage means 11 comprises a memory such as a ROM or an EEPROM, and sets a reference value VK1 and a hysteresis width ΔV1 corresponding to the digital value position signal VDP shown in FIG. A / D
When the A / D-converted position signal VDP is supplied from the conversion means 10A, the reference value VK1 and the hysteresis width ΔV1 corresponding to the position signal VDP are read out and set in the comparison calculation means 12.

【0037】図2は位置信号VDPに対応した基準値VK
1,ヒステリシス幅ΔV1のリニア特性図である。図2に
おいて、位置信号VDPがVPSまでは基準値VK1を大きな
一定値に、ヒステリシス幅ΔV1を狭い一定値に設定す
る。また、位置信号VDPがVPSからVPTまでは基準値V
K1をリニア(直線的)に減少させ、ヒステリシス幅ΔV
1をリニア(直線的)に増加させてヒステリシス幅ΔV1
が位置信号VDPの増加に対して広がるように設定する。
さらに、位置信号VDPがVPTを超えると、基準値VK1を
小さな一定値に、ヒステリシス幅ΔV1を広い一定値に
設定する。基準値VK1を小さな一定値に制限し、無信号
時にノイズレベルが基準値VK1−ΔV1/2を超えない
よう設定してセンサの復帰不良を防止する。
FIG. 2 shows a reference value VK corresponding to the position signal VDP.
1 is a linear characteristic diagram of a hysteresis width ΔV1. In FIG. 2, the reference value VK1 is set to a large constant value and the hysteresis width ΔV1 is set to a narrow constant value until the position signal VDP reaches VPS. When the position signal VDP is from VPS to VPT, the reference value V
K1 is reduced linearly, and the hysteresis width ΔV
1 is increased linearly so that the hysteresis width ΔV1
Are set to spread with an increase in the position signal VDP.
Further, when the position signal VDP exceeds VPT, the reference value VK1 is set to a small constant value and the hysteresis width ΔV1 is set to a wide constant value. The reference value VK1 is limited to a small constant value, and the noise level is set so as not to exceed the reference value VK1−ΔV1 / 2 when there is no signal, thereby preventing the sensor from returning poorly.

【0038】位置信号VDPの増加は、増幅器6の利得
(ゲイン)の増加に対応するので、つまり光電センサ1
の感度を増加することになる。図2から明らかなよう
に、光電センサ1が低感度の場合には、基準値VK1を大
きく、ヒステリシス幅ΔV1を狭く設定するため、分解
能を高く設定することができる。また、位置信号VDPが
VPT以下(VDP≦VPT)では感度も次第に低くなるの
で、基準値VK1をリニア(直線的)に増加させてヒステ
リシス幅ΔV1をリニア(直線的)に減少させ、ヒステ
リシス幅ΔV1を次第に狭く設定するため、分解能も位
置信号VDPの減少に伴って次第に高くなる。
An increase in the position signal VDP corresponds to an increase in the gain of the amplifier 6, that is, the photoelectric sensor 1
Will increase the sensitivity. As is clear from FIG. 2, when the photoelectric sensor 1 has low sensitivity, the reference value VK1 is set large and the hysteresis width ΔV1 is set small, so that the resolution can be set high. When the position signal VDP is lower than VPT (VDP≤VPT), the sensitivity gradually decreases. Therefore, the reference value VK1 is increased linearly (linearly), and the hysteresis width ΔV1 is reduced linearly (linearly). Is gradually narrowed, so that the resolution gradually increases as the position signal VDP decreases.

【0039】図3は位置信号VDPに対応した基準値VK
1,ヒステリシス幅ΔV1のノンリニア特性図である。図
3において、位置信号VDPがVPSからVPTの範囲で、基
準値VK1をノンリニア(指数関数的)に減少させ、ヒス
テリシス幅ΔV1をノンリニア(指数関数的)に増加さ
せた点のみが図2と異なる。なお、図3ではノンリニア
特性を指数関数で設定したが、階段状(ステップ)関数
で設定してもよい。
FIG. 3 shows a reference value VK corresponding to the position signal VDP.
1 is a non-linear characteristic diagram of a hysteresis width ΔV1. 3 differs from FIG. 2 only in that the reference value VK1 is reduced nonlinearly (exponentially) and the hysteresis width ΔV1 is increased nonlinearly (exponentially) when the position signal VDP is in the range of VPS to VPT. . In FIG. 3, the non-linear characteristic is set by an exponential function, but may be set by a step function.

【0040】なお、図2または図3では、位置信号VDP
に対応して基準値VK1およびヒステリシス幅ΔV1を変
化させるようにしたが、基準値VK1またはヒステリシス
幅ΔV1の一方を固定し、他方を変化させるようにして
もよい。
In FIG. 2 or FIG. 3, the position signal VDP
Although the reference value VK1 and the hysteresis width ΔV1 are changed corresponding to the above, one of the reference value VK1 and the hysteresis width ΔV1 may be fixed and the other may be changed.

【0041】比較演算手段12は、ソフトウェア制御の
加算機能、減算機能、比較機能、判定機能等を備え、A
/D変換手段10Bから供給される電気信号VDS、記憶
手段11から供給(設定)される基準値VK1およびヒス
テリシス幅ΔV1に基づいて演算を実行し、判定信号HO
のレベルによって対象物20の有無を判定する。まず、
基準値VK1とヒステリシス幅ΔV1の1/2の値ΔV1/
2を加算して閾値(=VK1+ΔV1/2)を算出する。
次に、基準値VK1からヒステリシス幅ΔV1の1/2の
値ΔV1/2を減算して閾値(=VK1−ΔV1/2)を算
出する。
The comparison operation means 12 has an addition function, a subtraction function, a comparison function, a judgment function and the like under software control.
A calculation is executed based on the electric signal VDS supplied from the / D conversion means 10B, the reference value VK1 supplied from the storage means 11 (set) and the hysteresis width ΔV1, and the judgment signal HO is obtained.
The presence or absence of the target object 20 is determined based on the level of. First,
1/2 of the reference value VK1 and the hysteresis width ΔV1 ΔV1 /
2 is added to calculate a threshold value (= VK1 + ΔV1 / 2).
Next, a threshold value (= VK1−ΔV1 / 2) is calculated by subtracting a half value ΔV1 / 2 of the hysteresis width ΔV1 from the reference value VK1.

【0042】続いて、電気信号VDSと閾値(=VK1+Δ
V1/2)を比較し、電気信号VDSが閾値(=VK1+Δ
V1/2)を超える(VDS>VK1+ΔV1/2)場合に
は、Hレベル(例えば、直流電圧5V)の判定信号HO
を演算出力する。なお、電気信号VDSと閾値(=VK1+
ΔV1/2)が等しい場合、Lレベル(例えば、接地電
圧0V)からHレベル(例えば、直流電圧5V)に急激
に遷移する判定信号HOを演算出力する。
Subsequently, the electric signal VDS and the threshold value (= VK1 + Δ
V1 / 2), and the electric signal VDS becomes equal to the threshold value (= VK1 + Δ
(VDS> VK1 + .DELTA.V1 / 2), the determination signal HO at the H level (for example, DC voltage 5 V) is exceeded.
Is output. Note that the electric signal VDS and the threshold value (= VK1 +
If ΔV1 / 2) are equal, a determination signal H0 that rapidly transitions from an L level (for example, ground voltage 0 V) to an H level (for example, DC voltage 5 V) is output.

【0043】一方、電気信号VDSが閾値(=VK1+ΔV
1/2)以下の(VDS≦VK1+ΔV1/2)場合には、電
気信号VDSの過去(履歴)の値に従ってHレベル(例え
ば、直流電圧5V)またはLレベル(例えば、接地電圧
0V)の判定信号HOを演算出力する。
On the other hand, when the electric signal VDS has a threshold value (= VK1 + ΔV
In the case of (VDS ≦ VK1 + ΔV1 / 2) that is equal to or less than (1), the judgment signal of the H level (for example, DC voltage 5V) or the L level (for example, ground voltage 0V) according to the past (history) value of the electric signal VDS. HO is calculated and output.

【0044】電気信号VDSの過去(履歴)の値が閾値
(=VK1−ΔV1/2)を経過して増加する場合には、
Lレベルの判定信号HOを出力する。一方、電気信号VD
Sの過去(履歴)の値が閾値(=VK1+ΔV1/2)を経
過して減少する場合には、閾値(=VK1−ΔV1/2)
に達するまでHレベルの判定信号HOを演算出力する。
When the past (history) value of the electric signal VDS increases after the threshold value (= VK1−ΔV1 / 2),
An L-level determination signal Ho is output. On the other hand, the electric signal VD
If the past (history) value of S decreases after passing the threshold value (= VK1 + ΔV1 / 2), the threshold value (= VK1−ΔV1 / 2)
Until it reaches H, the arithmetic output of the judgment signal H0 at the H level.

【0045】また、電気信号VDSが閾値(=VK1−ΔV
1/2)を下回って減少する(VDS<VK1−ΔV1/2)
場合には、Lレベルの判定信号HOを出力する。なお、
電気信号VDSと閾値(=VK1−ΔV1/2)が等しい場
合には、HレベルからLレベルに急激に遷移する判定信
号HOを演算出力する。
When the electric signal VDS has a threshold value (= VK1−ΔV)
(VDS <VK1−ΔV1 / 2)
In this case, an L-level determination signal H0 is output. In addition,
When the electric signal VDS is equal to the threshold value (= VK1−ΔV1 / 2), a determination signal H0 that rapidly transitions from H level to L level is output.

【0046】図4はこの発明に係る比較演算手段のヒス
テリシス特性図である。図4において、判定信号HO
は、電気信号VDSが増加していき、閾値(=VK1−ΔV
1/2)を経過して閾値(=VK1+ΔV1/2)までLレ
ベル(→方向)にあり、閾値(=VK1+ΔV1/2)を
わずかでも超えるとLレベルから急激にHレベルに遷移
(↑方向)する。また、判定信号HOは、電気信号VDS
が閾値(=VK1+ΔV1/2)を超えてさらに増加して
もHレベルを維持(→方向)する。
FIG. 4 is a hysteresis characteristic diagram of the comparison operation means according to the present invention. Referring to FIG.
Means that the electric signal VDS increases and the threshold value (= VK1−ΔV
The threshold value (= VK1 + ΔV1 / 2) is at the L level (→ direction) after elapse of 1/2), and when the threshold value (= VK1 + ΔV1 / 2) is slightly exceeded, the L level rapidly transitions to the H level (↑ direction). I do. The determination signal HO is the electric signal VDS
Keeps the H level (→ direction) even if exceeds the threshold value (= VK1 + ΔV1 / 2).

【0047】一方、判定信号HOは、この状態から、電
気信号VDSが減少してもHレベルを維持(←方向)し、
Hレベル維持の状態は閾値(=VK1+ΔV1/2)を経
過して閾値(=VK1−ΔV1/2)まで継続(←方向)
する。また、判定信号HOは、閾値(=VK1−ΔV1/
2)をわずかでも下回るとHレベルから急激にLレベル
に遷移(↓方向)し、電気信号VDSが閾値(=VK1−Δ
V1/2)を下回ってさらに減少してもLレベルを維持
(←方向)する。
On the other hand, the judgment signal H0 maintains the H level (← direction) from this state even if the electric signal VDS decreases,
The state of maintaining the H level passes through the threshold value (= VK1 + ΔV1 / 2) and continues to the threshold value (= VK1−ΔV1 / 2) (← direction).
I do. Further, the judgment signal HO has a threshold value (= VK1−ΔV1 /
2) When the voltage falls slightly below the level, the level changes rapidly from the H level to the L level (in the direction of ↓), and the electric signal VDS becomes equal to the threshold value (= VK1−Δ).
V1 / 2), the L level is maintained (← direction) even if the voltage further decreases.

【0048】このように、比較演算手段12は、閾値
(=VK1−ΔV1/2)および閾値(=VK1+ΔV1/
2)のヒステリシス幅ΔV1のヒステリシス特性を有す
るので、電気信号VDSが閾値近傍にあり、信号の変動や
ノイズの影響によって閾値を挟んで変化しても、判定信
号HOを変動前のレベル(HレベルまたはLレベル)に
維持することができる。
As described above, the comparison calculation means 12 calculates the threshold value (= VK1−ΔV1 / 2) and the threshold value (= VK1 + ΔV1 /
Since the electric signal VDS is close to the threshold value due to the hysteresis characteristic of the hysteresis width ΔV1 of 2) and the electric signal VDS changes across the threshold value due to the fluctuation of the signal or noise, the judgment signal HO is changed to the level before the fluctuation (H level). Or L level).

【0049】また、比較演算手段12は、図2や図3に
示すように、感度を低く(増幅器6のゲイン:小)する
と、図4に示すヒステリシス特性が電気信号VDSの小さ
な方向にシフトし、ヒステリシス幅ΔV1も狭くなるの
で、光電センサ1の分解能を向上させることができる。
As shown in FIGS. 2 and 3, when the sensitivity is lowered (the gain of the amplifier 6 is small), the hysteresis characteristic shown in FIG. 4 shifts in the direction in which the electric signal VDS becomes smaller. , The hysteresis width ΔV1 is also reduced, so that the resolution of the photoelectric sensor 1 can be improved.

【0050】一方、比較演算手段12は、感度を高く
(増幅器6のゲイン:大)すると、図4に示すヒステリ
シス特性が電気信号VDSの大きな方向にシフトし、ヒス
テリシス幅ΔV1も広くなり、無信号時のノイズを誤検
知することを防止できるので、光電センサ1の復帰不良
を防止することができる。
On the other hand, when the sensitivity is increased (gain of the amplifier 6 is large), the hysteresis characteristic shown in FIG. 4 shifts in the direction of increasing the electric signal VDS, and the hysteresis width ΔV1 increases. Since it is possible to prevent erroneous detection of noise at the time, it is possible to prevent a poor return of the photoelectric sensor 1.

【0051】発光制御手段13は、パルス発生回路を備
え、パルス幅TP、休止期間TKの周期T(=TP+TK)
の発光制御信号CDを駆動手段9に供給する。
The light emission control means 13 includes a pulse generation circuit, and has a pulse width TP and a period T of a pause period TK (= TP + TK).
Is supplied to the driving means 9.

【0052】このように、この発明に係る光電センサ1
は、受光手段2の利得を調整することにより、位置信号
VDPに基づいて比較演算手段12の基準値VK1とヒステ
リシス幅ΔV1のいずれか一方、または双方を調整する
ことができるので、対象物20が近距離にあっても最適
な感度ならびに最適な分解能で判定することができ、対
象物20を高精度に判別することができる。
As described above, the photoelectric sensor 1 according to the present invention
By adjusting the gain of the light receiving means 2, one or both of the reference value VK1 and the hysteresis width ΔV1 of the comparing and calculating means 12 can be adjusted based on the position signal VDP. Even at a short distance, the determination can be made with the optimum sensitivity and the optimum resolution, and the object 20 can be determined with high accuracy.

【0053】また、この発明に係る判定手段4は、位置
信号VPのディジタル値VDPに対応した基準値VK1とヒ
ステリシス幅ΔV1を記憶しておき、位置信号VDPが供
給されると記憶してある基準値VK1とヒステリシス幅Δ
V1を読み出し、電気信号VDSと基準値VK1を比較演算
して対象物20の有無を判定するので、利得に対応して
最適な分解能で対象物20の判定を実現することができ
る。
The determining means 4 according to the present invention stores the reference value VK1 and the hysteresis width ΔV1 corresponding to the digital value VDP of the position signal VP, and stores the reference value when the position signal VDP is supplied. Value VK1 and hysteresis width Δ
Since V1 is read and the electric signal VDS is compared with the reference value VK1 to determine the presence or absence of the target 20, the determination of the target 20 can be realized with an optimum resolution corresponding to the gain.

【0054】さらに、この発明に係る記憶手段11は、
位置信号VDPの変化に対して基準値VK1を所定の範囲に
設定するので、復帰不良または飽和を防止することがで
きる。
Further, the storage means 11 according to the present invention comprises:
Since the reference value VK1 is set within a predetermined range with respect to the change in the position signal VDP, it is possible to prevent a return failure or saturation.

【0055】また、この発明に係る記憶手段11は、位
置信号VDPの変化に対して基準値VK1をリニアまたはノ
ンリニアに設定するので、感度に対応して最適な分解能
を実現することができる。
Further, since the storage means 11 according to the present invention sets the reference value VK1 to linear or non-linear with respect to the change of the position signal VDP, it is possible to realize an optimum resolution corresponding to the sensitivity.

【0056】次に、光電センサ1の感度調整方法を動作
フロー図に基づいて説明する。図5はこの発明に係る光
電センサの調整方法の一実施の形態動作フロー図であ
る。なお、本実施の形態は、増幅器の利得(ゲイン)調
整に対応してヒステリシス特性の基準値およびヒステリ
シス幅を決定し、最適な分解能を設定する光電センサの
調整方法を実現するものであり、図1を参照して説明す
る。
Next, a method of adjusting the sensitivity of the photoelectric sensor 1 will be described with reference to an operation flowchart. FIG. 5 is an operation flowchart of an embodiment of the method for adjusting a photoelectric sensor according to the present invention. In the present embodiment, a reference value of the hysteresis characteristic and a hysteresis width are determined in accordance with the gain (gain) adjustment of the amplifier, and a photoelectric sensor adjustment method for setting an optimum resolution is realized. This will be described with reference to FIG.

【0057】まず、ステップS1で、受光手段2の増幅
器6のゲインを調整する。ステップS2では、ゲイン調
整に伴い出力される位置信号VPのA/D変換されたデ
ィジタル値VDPを記憶手段11で読み取る。
First, in step S1, the gain of the amplifier 6 of the light receiving means 2 is adjusted. In step S2, the storage means 11 reads the A / D converted digital value VDP of the position signal VP output along with the gain adjustment.

【0058】ステップS3では、予め記憶手段11に設
定したディジタル値VDPと基準値VK1およびヒステリシ
ス幅ΔV1の対応データからディジタル値VDPに対応し
た基準値VK1およびヒステリシス幅ΔV1を読み出す。
ステップS4では、読み出した基準値VK1およびヒステ
リシス幅ΔV1を比較演算手段12に設定する。
In step S3, the reference value VK1 and the hysteresis width .DELTA.V1 corresponding to the digital value VDP are read from the data corresponding to the digital value VDP and the reference value VK1 and the hysteresis width .DELTA.V1 set in the storage means 11 in advance.
In step S4, the read reference value VK1 and the hysteresis width ΔV1 are set in the comparison calculation means 12.

【0059】ステップS5では、電気信号VS2のA/D
変換されたディジタル値VDSと基準値VK1およびヒステ
リシス幅ΔV1を比較演算手段12で比較演算してステ
ップS6に移行する。ステップS6では、ディジタル値
VDSと閾値(=VK1+ΔV1/2)の比較を行い、ディ
ジタル値VDSが閾値(=VK1+ΔV1/2)を超える
(VDS>VK1+ΔV1/2)場合にはステップS7に移
行し、一方、ディジタル値VDSが閾値(=VK1+ΔV1
/2)以下(VDS≦VK1+ΔV1/2)の場合にはステ
ップS9に移行する。
In step S5, the A / D of the electric signal VS2
The converted digital value VDS is compared with the reference value VK1 and the hysteresis width ΔV1 by the comparison calculation means 12, and the process proceeds to step S6. In step S6, the digital value VDS is compared with a threshold value (= VK1 + ΔV1 / 2). If the digital value VDS exceeds the threshold value (= VK1 + ΔV1 / 2) (VDS> VK1 + ΔV1 / 2), the process proceeds to step S7. , The digital value VDS is equal to the threshold value (= VK1 + ΔV1)
/ 2) or less (VDS ≦ VK1 + ΔV1 / 2), the process proceeds to step S9.

【0060】ステップS7では、判定信号HOをHレベ
ルに設定し、ステップS8で、対象物有りと判定する。
一方、ステップS9では、判定信号HOをLレベルに設
定し、ステップS10で、対象物無しと判定する。な
お、ステップS5〜ステップS10までは比較演算手段
12で実行する。
In step S7, the determination signal HO is set to H level, and in step S8, it is determined that there is an object.
On the other hand, in step S9, the determination signal HO is set to L level, and in step S10, it is determined that there is no target. Steps S5 to S10 are executed by the comparison operation means 12.

【0061】このように、この発明に係る光電センサ1
の感度調整方法は、ステップS1からステップS6を備
えたので、対象物20が近距離にあっても最適な感度な
らびに最適な分解能で判定することができ、対象物20
を高精度に判別することができる。
As described above, the photoelectric sensor 1 according to the present invention
Since the sensitivity adjustment method includes the steps S1 to S6, even if the object 20 is at a short distance, it is possible to determine with the optimum sensitivity and the optimum resolution.
Can be determined with high accuracy.

【0062】図6はこの発明に係る光電センサの別実施
の形態要部ブロック構成図である。図6において、光電
センサ15は、受光手段16、投光手段17、判定手段
18を備える。なお、図6の構成は、図1の受光手段3
から利得調整手段7を削除して受光手段16とし、投光
手段3に光量調節手段22を設けて投光手段17とした
点が基本的に異なる。
FIG. 6 is a block diagram showing a main part of another embodiment of the photoelectric sensor according to the present invention. 6, the photoelectric sensor 15 includes a light receiving unit 16, a light projecting unit 17, and a determining unit 18. The configuration shown in FIG. 6 corresponds to the light receiving unit 3 shown in FIG.
This is basically different from the first embodiment in that the gain adjusting means 7 is deleted and the light receiving means 16 is provided, and the light projecting means 3 is provided with the light amount adjusting means 22 and the light projecting means 17 is basically provided.

【0063】受光手段16は、受光素子5、増幅器6を
備え、対象物20で反射された反射光LRを受光し、反
射光LRに光−電気変換を施し、電気変換したアナログ
量の電気信号VS1を増幅した電気信号VS2を判定手段1
8のA/D変換手段19Bに提供する。
The light receiving means 16 includes the light receiving element 5 and the amplifier 6, receives the reflected light LR reflected by the object 20, performs light-to-electric conversion on the reflected light LR, and converts the electric signal into an analog electric signal. The determination means 1 determines the electric signal VS2 obtained by amplifying VS1.
8 to the A / D conversion means 19B.

【0064】投光手段17は、発光素子8、駆動手段
9、光量調節手段22を備え、判定手段18の発光制御
手段13から提供される一定周期Tのパルス波形の発光
制御信号CDに基づいてパルス幅TP、休止期間TK(T
=TP+TK)の駆動信号PDを発光素子8に供給し、発
光素子8を駆動信号PDのパルス幅TPの期間で周期的に
発光させて光信号LSを対象物20に投光する。また、
駆動手段9を光量調節手段22で調節し、駆動信号PD
の振幅を変更することによって光信号LSの光量を調節
する。
The light projecting means 17 includes a light emitting element 8, a driving means 9, and a light quantity adjusting means 22. Based on a light emission control signal CD having a pulse waveform of a constant period T provided from the light emission controlling means 13 of the determining means 18. The pulse width TP and the rest period TK (T
= TP + TK) is supplied to the light emitting element 8, and the light emitting element 8 is caused to emit light periodically during the period of the pulse width TP of the driving signal PD, and the optical signal LS is projected on the object 20. Also,
The driving means 9 is adjusted by the light amount adjusting means 22, and the driving signal PD is adjusted.
Of the optical signal LS is adjusted by changing the amplitude of the optical signal LS.

【0065】光量調節手段22は、駆動手段9の駆動信
号PDの振幅が変更できる可変抵抗器(ボリューム)等
で構成し、外部から可変抵抗器(ボリューム)を操作し
て駆動手段9の駆動信号PDの振幅を調節する。また、
光量調節手段22は、可変抵抗器(ボリューム)の位置
(回転角度=抵抗値)に対応した調節信号VT(直流電
圧)を判定手段18のA/D変換手段19Aに提供す
る。なお、光量調節手段22の可変抵抗器(ボリュー
ム)は、駆動信号PDの振幅が増加(光量が増加)する
ように調節すると、調節信号VT(直流電圧)も増加す
るように構成する。
The light quantity adjusting means 22 is constituted by a variable resistor (volume) or the like capable of changing the amplitude of the driving signal PD of the driving means 9, and the driving signal of the driving means 9 is operated by operating the variable resistor (volume) from outside. Adjust the amplitude of PD. Also,
The light amount adjusting means 22 provides an adjustment signal VT (DC voltage) corresponding to the position (rotation angle = resistance value) of the variable resistor (volume) to the A / D converting means 19A of the judging means 18. The variable resistor (volume) of the light amount adjusting means 22 is configured so that when the amplitude of the drive signal PD is adjusted to increase (the light amount increases), the adjustment signal VT (DC voltage) also increases.

【0066】判定手段18は、マイクロプロセッサを基
本に構成し、A/D変換手段19A,19B、記憶手段
23、比較演算手段21、発光制御手段13を備える。
A/D変換手段19Aは、A/Dコンバータで構成し、
光量調節手段22から供給されるアナログ量の調節信号
VTに所定のサンプリング時間でA/D変換を施し、デ
ィジタル値の調節信号VDTを記憶手段23に供給する。
The judging means 18 is basically composed of a microprocessor, and includes A / D converting means 19A and 19B, a storage means 23, a comparison operation means 21, and a light emission control means 13.
The A / D conversion means 19A is constituted by an A / D converter,
A / D conversion is performed on the analog amount adjustment signal VT supplied from the light amount adjustment unit 22 for a predetermined sampling time, and a digital value adjustment signal VDT is supplied to the storage unit 23.

【0067】A/D変換手段19Bは、A/Dコンバー
タで構成し、増幅器6から供給されるアナログ量の電気
信号VS2に所定のサンプリング時間でA/D変換を施
し、ディジタル値の電気信号VDSを比較演算手段21に
供給する。
The A / D conversion means 19B comprises an A / D converter, performs A / D conversion on the analog electric signal VS2 supplied from the amplifier 6 at a predetermined sampling time, and outputs a digital electric signal VDS Is supplied to the comparison operation means 21.

【0068】記憶手段23は、ROM、EEPROM等
のメモリで構成し、予め実験や計算で求めた図7または
図8に示すディジタル値の調節信号VDTに対応する基準
値VK2,ヒステリシス幅ΔV2を設定しておき、A/D
変換手19AからA/D変換された調節信号VDTが供給
されると、調節信号VDTに対応した基準値VK2およびヒ
ステリシス幅ΔV2を読み出して比較演算手段21に設
定する。
The storage means 23 is composed of a memory such as a ROM or an EEPROM, and sets a reference value VK2 and a hysteresis width ΔV2 corresponding to the digital value adjustment signal VDT shown in FIG. A / D
When the A / D-converted adjustment signal VDT is supplied from the converter 19A, the reference value VK2 and the hysteresis width ΔV2 corresponding to the adjustment signal VDT are read and set in the comparison operation means 21.

【0069】図7は調節信号VDTに対応した基準値VK
2,ヒステリシス幅ΔV2のリニア特性図である。図7に
おいて、調節信号VDTがVTSまでは基準値VK2を大きな
一定値に、ヒステリシス幅ΔV2を狭い一定値に設定す
る。また、調節信号VDTがVTSからVTTまでは基準値V
K2をリニア(直線的)に減少させ、ヒステリシス幅ΔV
2をリニア(直線的)に増加させてヒステリシス幅ΔV2
が調節信号VDTの増加に対して広がるように設定する。
さらに、調節信号VDTがVTTを超えると、基準値VK2を
小さな一定値に、ヒステリシス幅ΔV2を広い一定値に
設定する。基準値VK2を小さな一定値に制限し、無信号
時にノイズレベルが基準値VK2−ΔV2/2を超えない
よう設定してセンサの復帰不良を防止する。
FIG. 7 shows a reference value VK corresponding to the adjustment signal VDT.
2 is a linear characteristic diagram of the hysteresis width ΔV2. In FIG. 7, the reference value VK2 is set to a large constant value and the hysteresis width ΔV2 is set to a narrow constant value until the adjustment signal VDT reaches VTS. When the adjustment signal VDT is from VTS to VTT, the reference value VDT is used.
K2 is reduced linearly, and the hysteresis width ΔV
2 is increased linearly, and the hysteresis width ΔV2
Are set so as to spread as the adjustment signal VDT increases.
Further, when the adjustment signal VDT exceeds VTT, the reference value VK2 is set to a small constant value, and the hysteresis width ΔV2 is set to a wide constant value. The reference value VK2 is limited to a small constant value, and the noise level is set so as not to exceed the reference value VK2−ΔV2 / 2 when there is no signal, thereby preventing the sensor from returning poorly.

【0070】調節信号VDTの増加は、発光素子8の光量
の増加に対応するので、つまり光電センサ15の感度を
増加することになる。図7から明らかなように、光電セ
ンサ15が低感度の場合には、基準値VK2を大きく、ヒ
ステリシス幅ΔV2を狭く設定するため、分解能を高く
設定することができる。また、調節信号VDTがVTT以下
(VDT≦VTT)では感度も次第に低くなるので、基準値
VK2をリニア(直線的)に増加させてヒステリシス幅Δ
V2をリニア(直線的)に減少させ、ヒステリシス幅Δ
V2を次第に狭く設定するため、分解能も調節信号VDT
の減少に伴って次第に高くなる。
The increase in the adjustment signal VDT corresponds to the increase in the light amount of the light emitting element 8, that is, the sensitivity of the photoelectric sensor 15 increases. As is clear from FIG. 7, when the photoelectric sensor 15 has low sensitivity, the reference value VK2 is set to be large and the hysteresis width ΔV2 is set to be small, so that the resolution can be set to be high. When the adjustment signal VDT is equal to or lower than VTT (VDT≤VTT), the sensitivity gradually decreases. Therefore, the reference value VK2 is increased linearly so that the hysteresis width Δ
V2 is reduced linearly, and the hysteresis width Δ
To set V2 gradually narrower, the resolution is also adjusted by the control signal VDT.
It becomes gradually higher with the decrease of.

【0071】図8は調節信号VDTに対応した基準値VK
2,ヒステリシス幅ΔV2のノンリニア特性図である。図
8において、調節信号VDTがVTSからVTTの範囲で、基
準値VK2をノンリニア(指数関数的)に減少させ、ヒス
テリシス幅ΔV2をノンリニア(指数関数的)に増加さ
せた点のみが図7と異なる。なお、図8ではノンリニア
特性を指数関数で設定したが、階段状(ステップ)関数
で設定してもよい。
FIG. 8 shows a reference value VK corresponding to the adjustment signal VDT.
2, a non-linear characteristic diagram of a hysteresis width ΔV2. 8 differs from FIG. 7 only in that the reference value VK2 is reduced non-linearly (exponentially) and the hysteresis width ΔV2 is increased non-linearly (exponentially) within the range of the adjustment signal VDT from VTS to VTT. . In FIG. 8, the non-linear characteristic is set by an exponential function, but may be set by a step function.

【0072】なお、図7または図8では、調節信号VDT
に対応して基準値VK2およびヒステリシス幅ΔV2を変
化させるようにしたが、基準値VK2またはヒステリシス
幅ΔV2の一方を固定し、他方を変化させるようにして
もよい。
Note that, in FIG. 7 or FIG.
Although the reference value VK2 and the hysteresis width ΔV2 are changed in response to the above, one of the reference value VK2 and the hysteresis width ΔV2 may be fixed and the other may be changed.

【0073】比較演算手段21は、ソフトウェア制御の
加算機能、減算機能、比較機能、判定機能等を備え、A
/D変換手段19Bから供給される電気信号VDS、記憶
手段23から供給(設定)される基準値VK2およびヒス
テリシス幅ΔV2に基づいて演算を実行し、判定信号HO
のレベルによって対象物20の有無を判定する。まず、
基準値VK2とヒステリシス幅ΔV2の1/2の値ΔV2/
2を加算して閾値(=VK2+ΔV2/2)を算出する。
次に、基準値VK2からヒステリシス幅ΔV2の1/2の
値ΔV2/2を減算して閾値(=VK2−ΔV2/2)を算
出する。
The comparison operation means 21 has an addition function, a subtraction function, a comparison function, a judgment function, and the like of software control.
A calculation is executed based on the electric signal VDS supplied from the / D conversion means 19B, the reference value VK2 supplied from the storage means 23, and the hysteresis width ΔV2, and the determination signal HO
The presence or absence of the target object 20 is determined based on the level of. First,
The value ΔV2 / which is half of the reference value VK2 and the hysteresis width ΔV2
2 is added to calculate a threshold value (= VK2 + ΔV2 / 2).
Next, a threshold value (= VK2−ΔV2 / 2) is calculated by subtracting a value ΔV2 / 2 of ヒ of the hysteresis width ΔV2 from the reference value VK2.

【0074】続いて、電気信号VDSと閾値(=VK2+Δ
V2/2)を比較し、電気信号VDSが閾値(=VK2+Δ
V2/2)を超える(VDS>VK2+ΔV2/2)場合に
は、Hレベル(例えば、直流電圧5V)の判定信号HO
を演算出力する。なお、電気信号VDSと閾値(=VK2+
ΔV2/2)が等しい場合、Lレベル(例えば、接地電
圧0V)からHレベル(例えば、直流電圧5V)に急激
に遷移する判定信号HOを演算出力する。
Subsequently, the electric signal VDS and the threshold value (= VK2 + Δ
V2 / 2), and the electric signal VDS is compared with the threshold value (= VK2 + Δ
V2 / 2) (VDS> VK2 + .DELTA.V2 / 2), the judgment signal H0 of H level (for example, DC voltage 5 V)
Is output. Note that the electric signal VDS and the threshold value (= VK2 +
If ΔV2 / 2) are equal, a determination signal HO that rapidly transitions from an L level (for example, a ground voltage of 0 V) to an H level (for example, a DC voltage of 5 V) is output.

【0075】一方、電気信号VDSが閾値(=VK2+ΔV
2/2)以下の(VDS≦VK2+ΔV2/2)場合には、電
気信号VDSの過去(履歴)の値に従ってHレベル(例え
ば、直流電圧5V)またはLレベル(例えば、接地電圧
0V)の判定信号HOを演算出力する。
On the other hand, when the electric signal VDS has a threshold value (= VK2 + ΔV
2/2) or less (VDS ≦ VK2 + ΔV2 / 2), a judgment signal of H level (for example, DC voltage 5V) or L level (for example, ground voltage 0V) according to the past (history) value of the electric signal VDS HO is calculated and output.

【0076】電気信号VDSの過去(履歴)の値が閾値
(=VK2−ΔV2/2)を経過して増加する場合には、
Lレベルの判定信号HOを出力する。一方、電気信号VD
Sの過去(履歴)の値が閾値(=VK2+ΔV2/2)を経
過して減少する場合には、閾値(=VK2−ΔV2/2)
に達するまでHレベルの判定信号HOを演算出力する。
When the past (history) value of the electric signal VDS increases after the threshold value (= VK2−ΔV2 / 2),
An L-level determination signal Ho is output. On the other hand, the electric signal VD
If the past (history) value of S decreases after passing the threshold value (= VK2 + ΔV2 / 2), the threshold value (= VK2−ΔV2 / 2)
Until it reaches H, a calculation signal of the H level judgment signal HO is output.

【0077】また、電気信号VDSが閾値(=VK2−ΔV
2/2)を下回って減少する(VDS<VK2−ΔV2/2)
場合には、Lレベルの判定信号HOを出力する。なお、
電気信号VDSと閾値(=VK2−ΔV2/2)が等しい場
合には、HレベルからLレベルに急激に遷移する判定信
号HOを演算出力する。
When the electric signal VDS has a threshold value (= VK2−ΔV
2/2) (VDS <VK2-ΔV2 / 2)
In this case, an L-level determination signal H0 is output. In addition,
When the electric signal VDS is equal to the threshold value (= VK2-.DELTA.V2 / 2), the determination signal HO that rapidly transitions from the H level to the L level is output.

【0078】図9はこの発明に係る比較演算手段のヒス
テリシス特性図である。図9において、判定信号HO
は、電気信号VDSが増加して閾値(=VK2−ΔV2/
2)を経過して閾値(=VK2+ΔV2/2)までLレベ
ル(→方向)にあり、閾値(=VK2+ΔV2/2)をわ
ずかでも超えるとLレベルから急激にHレベルに遷移
(↑方向)する。また、判定信号HOは、電気信号VDS
が閾値(=VK2+ΔV2/2)を超えてさらに増加して
もHレベルを維持(→方向)する。
FIG. 9 is a hysteresis characteristic diagram of the comparison operation means according to the present invention. In FIG. 9, the judgment signal H0
Means that the electric signal VDS increases and the threshold value (= VK2−ΔV2 /
After 2), the signal is at the L level (→ direction) up to the threshold value (= VK2 + ΔV2 / 2). If the threshold value (= VK2 + ΔV2 / 2) is slightly exceeded, the L level rapidly transitions to the H level (↑ direction). The determination signal HO is the electric signal VDS
Keeps the H level (→ direction) even if exceeds the threshold value (= VK2 + ΔV2 / 2).

【0079】一方、判定信号HOは、この状態から、電
気信号VDSが減少してもHレベルを維持(←方向)し、
Hレベル維持の状態は閾値(=VK2+ΔV2/2)を経
過して閾値(=VK2−ΔV2/2)まで継続(←方向)
する。また、判定信号HOは、閾値(=VK2−ΔV2/
2)をわずかでも下回るとHレベルから急激にLレベル
に遷移(↓方向)し、電気信号VDSが閾値(=VK2−Δ
V2/2)を下回ってさらに減少してもLレベルを維持
(←方向)する。
On the other hand, the determination signal HO maintains the H level (← direction) from this state even if the electric signal VDS decreases,
The state of maintaining the H level passes through the threshold value (= VK2 + ΔV2 / 2) and continues to the threshold value (= VK2−ΔV2 / 2) (← direction).
I do. The determination signal HO is a threshold value (= VK2−ΔV2 /
2) When the voltage slightly falls below the level, the level rapidly changes from the H level to the L level (in the direction of the arrow ↓), and the electric signal VDS changes to the threshold value (= VK2−Δ
V2 / 2), the L level is maintained (← direction) even if it further decreases.

【0080】このように、比較演算手段21は、閾値
(=VK2−ΔV2/2)および閾値(=VK2+ΔV2/
2)のヒステリシス幅ΔV2のヒステリシス特性を有す
るので、電気信号VDSが閾値近傍にあり、信号の変動や
ノイズの影響によって閾値を挟んで変化しても、判定信
号HOを変動前のレベル(HレベルまたはLレベル)に
維持することができる。
As described above, the comparison operation means 21 calculates the threshold value (= VK2−ΔV2 / 2) and the threshold value (= VK2 + ΔV2 /
2) has a hysteresis characteristic of the hysteresis width ΔV2, so that even if the electric signal VDS is close to the threshold value and changes across the threshold value due to signal fluctuation or noise, the judgment signal HO is not changed to the level before the fluctuation (H level). Or L level).

【0081】また、比較演算手段21は、図7や図8に
示すように、感度(発光素子8の光量)を減少すると、
図9に示すヒステリシス特性が電気信号VDSの小さな方
向にシフトし、ヒステリシス幅ΔV2も狭くなるので、
光電センサ15の分解能を向上させることができる。
As shown in FIGS. 7 and 8, when the sensitivity (light quantity of the light emitting element 8) is reduced,
Since the hysteresis characteristic shown in FIG. 9 shifts in the direction in which the electric signal VDS decreases, the hysteresis width ΔV2 also decreases.
The resolution of the photoelectric sensor 15 can be improved.

【0082】一方、比較演算手段21は、感度(発光素
子8の光量)を増加すると、図9に示すヒステリシス特
性が電気信号VDSの大きな方向にシフトし、ヒステリシ
ス幅ΔV2も広くなり、無信号時のノイズを誤検知する
ことを防止できるので、光電センサ15の復帰不良を防
止することができる。
On the other hand, when the sensitivity (light quantity of the light emitting element 8) increases, the comparison operation means 21 shifts the hysteresis characteristic shown in FIG. 9 to a direction in which the electric signal VDS increases, the hysteresis width ΔV2 also increases, and Can be prevented from being erroneously detected, so that a reset failure of the photoelectric sensor 15 can be prevented.

【0083】発光制御手段13は、パルス発生回路を備
え、パルス幅TP、休止期間TKの周期T(=TP+TK)
の発光制御信号CDを駆動手段9に供給する。
The light emission control means 13 includes a pulse generation circuit, and has a pulse width TP and a period T of a pause period TK (= TP + TK).
Is supplied to the driving means 9.

【0084】このように、この発明に係る光電センサ1
5は、投光手段17の光量を調節することにより、調節
信号VDTに基づいて比較演算手段21の基準値VK2とヒ
ステリシス幅ΔV2のいずれか一方、または双方を調整
することができるので、対象物20が近距離にあっても
最適な感度ならびに最適な分解能で判定することがで
き、対象物20を高精度に判別することができる。
As described above, the photoelectric sensor 1 according to the present invention
5 can adjust one or both of the reference value VK2 and the hysteresis width ΔV2 of the comparison / calculation means 21 based on the adjustment signal VDT by adjusting the light quantity of the light projecting means 17; Even when the object 20 is at a short distance, the determination can be made with the optimum sensitivity and the optimum resolution, and the object 20 can be determined with high accuracy.

【0085】また、この発明に係る判定手段18は、調
節信号VTのディジタル値VDTに対応した基準値VK2と
ヒステリシス幅ΔV2を記憶しておき、調節信号VDTが
供給されると記憶してある基準値VK2とヒステリシス幅
ΔV2を読み出し、電気信号VDSと基準値VK2を比較演
算して対象物20の有無を判定するので、光量に対応し
て最適な分解能で対象物20の判定を実現することがで
きる。
The determining means 18 according to the present invention stores the reference value VK2 and the hysteresis width ΔV2 corresponding to the digital value VDT of the adjustment signal VT, and stores the reference value when the adjustment signal VDT is supplied. The value VK2 and the hysteresis width ΔV2 are read, and the presence / absence of the object 20 is determined by comparing the electric signal VDS with the reference value VK2, so that the determination of the object 20 can be realized with an optimal resolution corresponding to the light amount. it can.

【0086】さらに、この発明に係る記憶手段23は、
調節信号VDTに対して基準値VK2を所定の範囲に設定す
るので、復帰不良および飽和を防止することができる。
Further, the storage means 23 according to the present invention
Since the reference value VK2 is set within a predetermined range with respect to the adjustment signal VDT, it is possible to prevent restoration failure and saturation.

【0087】また、この発明に係る記憶手段23は、調
節信号VDTの変化に対して基準値VK2をリニアまたはノ
ンリニアに設定するので、感度に対応して最適な分解能
を実現することができる。
Further, since the storage means 23 according to the present invention sets the reference value VK2 to linear or non-linear with respect to the change of the adjustment signal VDT, it is possible to realize an optimum resolution according to the sensitivity.

【0088】次に、光電センサ15の感度調整方法を動
作フロー図に基づいて説明する。図10はこの発明に係
る光電センサの調整方法の別実施の形態動作フロー図で
ある。なお、本実施の形態は、発光素子の光量調整に対
応してヒステリシス特性の基準値およびヒステリシス幅
を決定し、最適な分解能を設定する光電センサの調整方
法を実現するものであり、図6を参照して説明する。
Next, a method of adjusting the sensitivity of the photoelectric sensor 15 will be described with reference to an operation flowchart. FIG. 10 is an operation flowchart of another embodiment of the photoelectric sensor adjustment method according to the present invention. In this embodiment, a reference value of the hysteresis characteristic and a hysteresis width are determined corresponding to the light amount adjustment of the light emitting element, and an adjustment method of the photoelectric sensor for setting an optimum resolution is realized. It will be described with reference to FIG.

【0089】まず、ステップP1で、投光手段17の発
光素子8の光量を調節することにより、光電センサ15
の感度を設定する。ステップP2では、光量調節に伴い
出力される調節信号VTのA/D変換されたディジタル
値VDTを記憶手段23で読み取る。
First, in step P1, the light intensity of the light emitting element 8 of the light projecting means 17 is adjusted, so that the photoelectric sensor 15 is adjusted.
Set the sensitivity of. In step P2, the storage means 23 reads the A / D converted digital value VDT of the adjustment signal VT output with the light quantity adjustment.

【0090】ステップP3では、予め記憶手段23に設
定したディジタル値VDTと基準値VK2およびヒステリシ
ス幅ΔV2の対応データからディジタル値VDTに対応し
た基準値VK2およびヒステリシス幅ΔV2を読み出す。
ステップP4では、読み出した基準値VK2およびヒステ
リシス幅ΔV2を比較演算手段21に設定する。
In step P3, the reference value VK2 and the hysteresis width ΔV2 corresponding to the digital value VDT are read from the data corresponding to the digital value VDT and the reference value VK2 and the hysteresis width ΔV2 set in the storage means 23 in advance.
In Step P4, the read reference value VK2 and the hysteresis width ΔV2 are set in the comparison calculation means 21.

【0091】ステップP5では、電気信号VS2のA/D
変換されたディジタル値VDSと基準値VK2およびヒステ
リシス幅ΔV2を比較演算手段21で比較演算してステ
ップP6に移行する。ステップP6では、ディジタル値
VDSと閾値(=VK2+ΔV2/2)の比較を行い、ディ
ジタル値VDSが閾値(=VK2+ΔV2/2)を超える
(VDS>VK2+ΔV2/2)場合にはステップP7に移
行し、一方、ディジタル値VDSが閾値(=VK2+ΔV2
/2)以下(VDS≦VK2+ΔV2/2)の場合にはステ
ップP9に移行する。
In Step P5, the A / D of the electric signal VS2
The converted digital value VDS is compared with the reference value VK2 and the hysteresis width .DELTA.V2 by the comparing and calculating means 21, and the routine goes to Step P6. In step P6, the digital value VDS is compared with a threshold value (= VK2 + ΔV2 / 2). If the digital value VDS exceeds the threshold value (= VK2 + ΔV2 / 2) (VDS> VK2 + ΔV2 / 2), the flow shifts to step P7. , The digital value VDS is equal to the threshold value (= VK2 + ΔV2)
/ 2) or less (VDS ≦ VK2 + ΔV2 / 2), the program shifts to Step P9.

【0092】ステップP7では、判定信号HOをHレベ
ルに設定し、ステップP8で、対象物有りと判定する。
一方、ステップP9では、判定信号HOをLレベルに設
定し、ステップP10で、対象物無しと判定する。な
お、ステップP5〜ステップP10までは比較演算手段
21で実行する。
In step P7, the determination signal HO is set to H level, and in step P8, it is determined that there is an object.
On the other hand, in step P9, the determination signal HO is set to L level, and in step P10, it is determined that there is no target. Steps P5 to P10 are executed by the comparison operation means 21.

【0093】このように、この発明に係る光電センサ1
5の感度調整方法は、ステップP1からステップP6を
備えたので、対象物20が近距離にあっても最適な感度
ならびに最適な分解能で判定することができ、対象物2
0を高精度に判別することができる。
As described above, the photoelectric sensor 1 according to the present invention
Since the sensitivity adjustment method of No. 5 includes Steps P1 to P6, it is possible to determine with the optimum sensitivity and the optimum resolution even when the object 20 is at a short distance, and
0 can be determined with high accuracy.

【0094】[0094]

【発明の効果】以上説明したように、この発明に係る光
電センサは、受光手段の利得を調整することにより、位
置信号に基づいて比較演算手段の基準値とヒステリシス
幅のいずれか一方、または双方を調整することができる
ので、対象物が近距離にあっても最適な感度ならびに最
適な分解能で判定することができ、対象物を高精度に判
別することができる。
As described above, in the photoelectric sensor according to the present invention, by adjusting the gain of the light receiving means, one or both of the reference value and the hysteresis width of the comparison operation means based on the position signal. Can be adjusted, the determination can be made with the optimum sensitivity and the optimum resolution even when the target is at a short distance, and the target can be determined with high accuracy.

【0095】また、この発明に係る光電センサは、投光
手段の光量を調節することにより、調節信号に基づいて
比較演算手段の基準値とヒステリシス幅のいずれか一
方、または双方を調整することができるので、対象物が
近距離にあっても最適な感度ならびに最適な分解能で判
定することができ、対象物を高精度に判別することがで
きる。
In the photoelectric sensor according to the present invention, one or both of the reference value and the hysteresis width of the comparison / calculation means can be adjusted based on the adjustment signal by adjusting the light quantity of the light projecting means. Since it is possible to perform the determination with the optimum sensitivity and the optimum resolution even if the target is at a short distance, the target can be determined with high accuracy.

【0096】さらに、この発明に係る光電センサの感度
調整方法は、受光手段のゲインを調整するステップ1
と、位置信号をA/D変換し、ディジタル値を読み取る
ステップ2と、ディジタル値に対応した基準値、ヒステ
リシス幅を読み出すステップ3と、基準値、ヒステリシ
ス幅を設定するステップ4と、調整したゲインで増幅
し、A/D変換した電気信号と設定した基準値、ヒステ
リシス幅を比較演算するステップ5と、比較結果に基づ
いて対象物の有無を判定するステップ6とを備えたの
で、対象物が近距離にあっても最適な感度ならびに最適
な分解能で判定することができ、対象物を高精度に判別
することができる。
Further, in the method for adjusting the sensitivity of the photoelectric sensor according to the present invention, the step 1 of adjusting the gain of the light receiving means is performed.
A / D conversion of the position signal and step 2 for reading a digital value, step 3 for reading a reference value and a hysteresis width corresponding to the digital value, step 4 for setting a reference value and a hysteresis width, and an adjusted gain Step 5 for comparing the amplified and A / D-converted electric signal with the set reference value and hysteresis width, and Step 6 for judging the presence or absence of the object based on the comparison result. Even at a short distance, the determination can be made with the optimum sensitivity and the optimum resolution, and the object can be determined with high accuracy.

【0097】また、この発明に係る光電センサの感度調
整方法は、投光手段の光量を調節するステップ1と、調
節信号をA/D変換し、ディジタル値を読み取るステッ
プ2と、ディジタル値に対応した基準値、ヒステリシス
幅を読み出すステップ3と、基準値、ヒステリシス幅を
設定するステップ4と、受光して増幅し、A/D変換し
た電気信号と設定した基準値、ヒステリシス幅を比較演
算するステップ5と、比較結果に基づいて対象物の有無
を判定するステップ6とを備えたので、対象物が近距離
にあっても最適な感度ならびに最適な分解能で判定する
ことができ、対象物を高精度に判別することができる。
The sensitivity adjustment method for a photoelectric sensor according to the present invention includes a step 1 for adjusting the light amount of the light projecting means, a step 2 for A / D converting the adjustment signal and reading a digital value, and a step for adjusting the digital value. Step 3 for reading the reference value and the hysteresis width obtained, Step 4 for setting the reference value and the hysteresis width, and Step for comparing and receiving the received, amplified, A / D-converted electric signal with the set reference value and the hysteresis width. 5 and step 6 for judging the presence or absence of the object based on the comparison result, so that the object can be judged with the optimum sensitivity and the optimum resolution even when the object is at a short distance, and Accuracy can be determined.

【図面の簡単な説明】[Brief description of the drawings]

【図1】この発明に係る光電センサの一実施の形態要部
ブロック構成図
FIG. 1 is a block diagram of a main part of an embodiment of a photoelectric sensor according to the present invention.

【図2】位置信号(VDP)に対応した基準値(VK1),
ヒステリシス幅(ΔV1)のリニア特性図
FIG. 2 shows a reference value (VK1) corresponding to a position signal (VDP),
Linear characteristic diagram of hysteresis width (ΔV1)

【図3】位置信号(VDP)に対応した基準値(VK1),
ヒステリシス幅(ΔV1)のノンリニア特性図
FIG. 3 shows a reference value (VK1) corresponding to a position signal (VDP),
Non-linear characteristic diagram of hysteresis width (ΔV1)

【図4】この発明に係る比較演算手段のヒステリシス特
性図
FIG. 4 is a hysteresis characteristic diagram of the comparison operation means according to the present invention.

【図5】この発明に係る光電センサの感度調整方法の一
実施の形態動作フロー図
FIG. 5 is an operation flowchart of a photoelectric sensor sensitivity adjusting method according to an embodiment of the present invention;

【図6】この発明に係る光電センサの別実施の形態要部
ブロック構成図
FIG. 6 is a block diagram of a main part of another embodiment of the photoelectric sensor according to the present invention.

【図7】調節信号(VDT)に対応した基準値(VK2),
ヒステリシス幅(ΔV2)のリニア特性図
FIG. 7 shows a reference value (VK2) corresponding to an adjustment signal (VDT),
Linear characteristic diagram of hysteresis width (ΔV2)

【図8】調節信号(VDT)に対応した基準値(VK2),
ヒステリシス幅(ΔV2)のノンリニア特性図
FIG. 8 shows a reference value (VK2) corresponding to an adjustment signal (VDT),
Non-linear characteristic diagram of hysteresis width (ΔV2)

【図9】この発明に係る比較演算手段のヒステリシス特
性図
FIG. 9 is a hysteresis characteristic diagram of the comparison operation means according to the present invention.

【図10】この発明に係る光電センサの感度調整方法の
別実施の形態動作フロー図
FIG. 10 is an operation flowchart of another embodiment of the sensitivity adjustment method of the photoelectric sensor according to the present invention.

【符号の説明】[Explanation of symbols]

1,15 光電センサ 2,16 受光手段 3,17 投光手段 4,18 判定手段 5 受光素子 6 増幅器 7 利得調整手段 8 発光素子 9 駆動手段 10A,10B,19A,19B A/D変換手段 11,23 記憶手段 12,21 比較演算手段 13 発光制御手段 Reference Signs List 1,15 photoelectric sensor 2,16 light receiving means 3,17 light emitting means 4,18 determining means 5 light receiving element 6 amplifier 7 gain adjusting means 8 light emitting element 9 driving means 10A, 10B, 19A, 19B A / D converting means 11, 23 storage means 12, 21 comparison operation means 13 light emission control means

───────────────────────────────────────────────────── フロントページの続き (72)発明者 亀井 隆 京都府京都市下京区塩小路通堀川東入南不 動堂町801番地 オムロン株式会社内 (72)発明者 井上 宏之 京都府京都市下京区塩小路通堀川東入南不 動堂町801番地 オムロン株式会社内 Fターム(参考) 2G065 AA04 AB22 AB28 BA09 BC10 BC13 BC14 BC21 BC28 BC33 DA15 DA20 5F089 BB01 BC02 CA16 CA17 CA21 FA03 FA05 FA06 5J050 AA12 BB17 BB27 BB29 CC11 DD03 EE35 FF04  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Takashi Kamei 801 Shidoji Horikawa Higashi-iridani-Fudodoucho, Shimogyo-ku, Kyoto-shi, Kyoto Inside OMRON Corporation (72) Inventor Hiroyuki Inoue Shiokyo-dori, Shimogyo-ku, Kyoto-shi, Kyoto 801 Horikawa Higashiiri Minami Fudodoucho OMRON Corporation F-term (reference) 2G065 AA04 AB22 AB28 BA09 BC10 BC13 BC14 BC21 BC28 BC33 DA15 DA20 5F089 BB01 BC02 CA16 CA17 CA21 FA03 FA05 FA06 5J050 AA12 BB17 BB27 BB29 CC11 DD04 EE35

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 光を放射する投光手段と、対象物からの
光を受光し、電気信号に変換して増幅する受光手段と、
前記受光手段から供給される電気信号と基準値を比較し
て前記対象物の有無を判定する判定手段と、を備えた光
電センサにおいて、 前記受光手段は、電気信号を増幅する増幅器の利得を調
整する利得調整手段を備え、前記利得調整手段の調整位
置に対応した位置信号を出力するとともに、前記判定手
段は、基準値ならびにヒステリシス幅が調整可能な比較
演算手段を備え、前記利得調整手段から供給される位置
信号に基づいて基準値とヒステリシス幅のいずれか一
方、または双方を調整することを特徴とする光電セン
サ。
A light projecting means for emitting light, a light receiving means for receiving light from an object, converting the light into an electric signal, and amplifying the electric signal;
Determining means for comparing the electric signal supplied from the light receiving means with a reference value to determine the presence or absence of the object; and wherein the light receiving means adjusts a gain of an amplifier for amplifying the electric signal. And a position signal corresponding to an adjustment position of the gain adjustment means, and the determination means includes a comparison operation means capable of adjusting a reference value and a hysteresis width, and supplies the comparison signal from the gain adjustment means. A photoelectric sensor that adjusts one or both of a reference value and a hysteresis width based on a position signal to be performed.
【請求項2】 光を放射する投光手段と、対象物からの
光を受光し、電気信号に変換して増幅する受光手段と、
前記受光手段から供給される電気信号と基準値を比較し
て前記対象物の有無を判定する判定手段と、を備えた光
電センサにおいて、 前記投光手段は、放射する光量を調節する光量調節手段
を備え、前記光量調節手段の調節位置に対応した調節信
号を出力するとともに、前記判定手段は、基準値ならび
にヒステリシス幅が調整可能な比較演算手段を備え、前
記光量調節手段から供給される調節信号に基づいて基準
値とヒステリシス幅のいずれか一方、または双方を調整
することを特徴とする光電センサ。
2. Light emitting means for emitting light, light receiving means for receiving light from an object, converting the light into an electric signal, and amplifying the electric signal;
Determining means for comparing the electric signal supplied from the light receiving means with a reference value to determine the presence or absence of the object; and a light amount adjusting means for adjusting an amount of emitted light. Output the adjustment signal corresponding to the adjustment position of the light amount adjustment means, the determination means includes a comparison operation means capable of adjusting a reference value and a hysteresis width, the adjustment signal supplied from the light amount adjustment means A photoelectric sensor, wherein one or both of a reference value and a hysteresis width are adjusted based on the following.
【請求項3】 前記判定手段は、位置信号または調節信
号、および電気信号をディジタル値に変換するA/D変
換手段と、位置信号または調節信号のディジタル値に対
応した基準値とヒステリシス幅を記憶する記憶手段と、
を備え、位置信号または調節信号、および電気信号が供
給されると、前記記憶手段に記憶した基準値とヒステリ
シス幅を読み出し、電気信号と基準値を前記比較演算手
段で比較演算して前記対象物の有無を判定することを特
徴とする請求項1または請求項2記載の光電センサ。
3. An A / D converter for converting a position signal or an adjustment signal and an electric signal into a digital value, and a reference value and a hysteresis width corresponding to the digital value of the position signal or the adjustment signal. Storage means for performing
When the position signal or the adjustment signal and the electric signal are supplied, the reference value and the hysteresis width stored in the storage unit are read, and the electric signal and the reference value are compared and calculated by the comparison calculation unit, and the object is read. The photoelectric sensor according to claim 1, wherein the presence or absence of the sensor is determined.
【請求項4】 前記記憶手段は、位置信号または調節信
号の変化に対して基準値を所定の範囲に設定することを
特徴とする請求項3記載の光電センサ。
4. The photoelectric sensor according to claim 3, wherein said storage means sets a reference value in a predetermined range with respect to a change in the position signal or the adjustment signal.
【請求項5】 前記記憶手段は、位置信号または調節信
号の変化に対して基準値をリニアに設定することを特徴
とする請求項3記載の光電センサ。
5. The photoelectric sensor according to claim 3, wherein said storage means sets a reference value linearly with respect to a change in a position signal or an adjustment signal.
【請求項6】 前記記憶手段は、位置信号または調節信
号の変化に対して基準値をノンリニアに設定することを
特徴とする請求項3記載の光電センサ。
6. The photoelectric sensor according to claim 3, wherein said storage means sets a reference value in a non-linear manner with respect to a change in a position signal or an adjustment signal.
【請求項7】 光を放射する投光手段と、対象物からの
光を受光し、電気信号に変換して増幅する受光手段と、
前記受光手段から供給される電気信号と基準値を比較し
て前記対象物の有無を判定する判定手段と、を備えた光
電センサを用い、以下のステップで感度を調整すること
を特徴とする光電センサの感度調整方法。 ステップ1:受光手段のゲインを調整する。 ステップ2:位置信号をA/D変換し、ディジタル値を
読み取る。 ステップ3:ディジタル値に対応した基準値、ヒステリ
シス幅を読み出す。 ステップ4:基準値、ヒステリシス幅を設定する。 ステップ5:調整したゲインで増幅し、A/D変換した
電気信号と設定した基準値、ヒステリシス幅を比較演算
する。 ステップ6:比較結果に基づいて対象物の有無を判定す
る。
7. Light emitting means for emitting light, light receiving means for receiving light from an object, converting the light into an electric signal, and amplifying the electric signal;
And a determination unit that determines the presence or absence of the object by comparing an electric signal supplied from the light receiving unit with a reference value, and adjusts the sensitivity in the following steps using a photoelectric sensor. Sensor sensitivity adjustment method. Step 1: Adjust the gain of the light receiving means. Step 2: A / D convert the position signal and read a digital value. Step 3: Read a reference value and a hysteresis width corresponding to the digital value. Step 4: Set a reference value and a hysteresis width. Step 5: The electric signal amplified by the adjusted gain and A / D converted is compared with the set reference value and hysteresis width. Step 6: The presence or absence of the object is determined based on the comparison result.
【請求項8】 光を放射する投光手段と、対象物からの
光を受光し、電気信号に変換して増幅する受光手段と、
前記受光手段から供給される電気信号と基準値を比較し
て前記対象物の有無を判定する判定手段と、を備えた光
電センサを用い、以下のステップで感度を調整すること
を特徴とする光電センサの感度調整方法。 ステップ1:投光手段の光量を調節する。 ステップ2:調節信号A/Dを変換し、ディジタル値を
読み取る。 ステップ3:ディジタル値に対応した基準値、ヒステリ
シス幅を読み出す。 ステップ4:基準値、ヒステリシス幅を設定する。 ステップ5:受光して増幅し、A/D変換した電気信号
と設定した基準値、ヒステリシス幅を比較演算する。 ステップ6:比較結果に基づいて対象物の有無を判定す
る。
8. Light emitting means for emitting light, light receiving means for receiving light from an object, converting the light into an electric signal, and amplifying the electric signal;
And a determination unit that determines the presence or absence of the object by comparing an electric signal supplied from the light receiving unit with a reference value, and adjusts the sensitivity in the following steps using a photoelectric sensor. Sensor sensitivity adjustment method. Step 1: Adjust the light intensity of the light projecting means. Step 2: Convert the adjustment signal A / D and read the digital value. Step 3: Read a reference value and a hysteresis width corresponding to the digital value. Step 4: Set a reference value and a hysteresis width. Step 5: A comparison operation is performed between the received, amplified, A / D converted electric signal, the set reference value, and the hysteresis width. Step 6: The presence or absence of the object is determined based on the comparison result.
JP2000365742A 2000-11-30 2000-11-30 Photoelectric sensor Expired - Lifetime JP3885489B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000365742A JP3885489B2 (en) 2000-11-30 2000-11-30 Photoelectric sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000365742A JP3885489B2 (en) 2000-11-30 2000-11-30 Photoelectric sensor

Publications (2)

Publication Number Publication Date
JP2002171162A true JP2002171162A (en) 2002-06-14
JP3885489B2 JP3885489B2 (en) 2007-02-21

Family

ID=18836460

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000365742A Expired - Lifetime JP3885489B2 (en) 2000-11-30 2000-11-30 Photoelectric sensor

Country Status (1)

Country Link
JP (1) JP3885489B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100388626C (en) * 2002-09-11 2008-05-14 欧姆龙株式会社 Photoelectric sensor and its adjusting method
EP2910981A2 (en) 2014-02-23 2015-08-26 Omron Corporation Photoelectric sensor with sensitivity parameter adjusting means
EP2910982A2 (en) 2014-02-23 2015-08-26 Omron Corporation Photoelectric sensor
US9507049B2 (en) 2013-10-04 2016-11-29 Banner Engineering Object sensing using dynamic demodulation
EP3196596A1 (en) * 2016-01-21 2017-07-26 Omron Corporation Sensor, sensor system and measuring method
CN113176205A (en) * 2021-02-25 2021-07-27 宜科(天津)电子有限公司 Sensing device suitable for transparent body detection

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107170147B (en) * 2017-05-17 2019-12-10 深圳怡化电脑股份有限公司 method and apparatus for correcting photoelectric sensor, electronic device and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100388626C (en) * 2002-09-11 2008-05-14 欧姆龙株式会社 Photoelectric sensor and its adjusting method
US9507049B2 (en) 2013-10-04 2016-11-29 Banner Engineering Object sensing using dynamic demodulation
EP2910981A2 (en) 2014-02-23 2015-08-26 Omron Corporation Photoelectric sensor with sensitivity parameter adjusting means
EP2910982A2 (en) 2014-02-23 2015-08-26 Omron Corporation Photoelectric sensor
EP3196596A1 (en) * 2016-01-21 2017-07-26 Omron Corporation Sensor, sensor system and measuring method
US10598772B2 (en) 2016-01-21 2020-03-24 Omron Corporation Sensor, sensor system and measuring method
CN113176205A (en) * 2021-02-25 2021-07-27 宜科(天津)电子有限公司 Sensing device suitable for transparent body detection

Also Published As

Publication number Publication date
JP3885489B2 (en) 2007-02-21

Similar Documents

Publication Publication Date Title
KR930006797B1 (en) Article detection method and device
JP2575614B2 (en) Optical output stabilizer
US6310682B1 (en) System and method for laser range finder
KR20190005377A (en) Distance measuring device and method for measuring distance by using thereof
JP2002171162A (en) Photoelectric sensor and method for adjusting sensitivity of photoelectric sensor
JPH08139583A (en) Touch key
JP5335638B2 (en) Smoke detector and fire alarm
JP2006180175A (en) Photoelectric sensor
JP5020187B2 (en) Image reading apparatus, image reading apparatus control method, and program
JPH08201519A (en) Light reception circuit
JP3401800B2 (en) Photoelectric switch
JPH10267648A (en) Optical displacement gauge
JP2551344B2 (en) Photo sensor circuit for medium detection
KR970011143B1 (en) Laserdiode control system for quantity of light and method of the same
JP3676924B2 (en) Light beam sensor
JP2968423B2 (en) Photoelectric sensor and method for correcting received light signal level
JP2002324909A (en) Photoelectric conversion circuit and laser range finder
JPH07162597A (en) Device for making light quantity constant in image input device or the like
JP2743038B2 (en) Underwater distance measuring device using laser light
JP2814389B2 (en) Distance measuring device
JPH0869550A (en) Automatic correcting device for optical sensor output
JPH05145393A (en) Photoelectric switch
JP3272429B2 (en) Distance measuring device
JPS59111588A (en) Maintenance of photosensor accuracy
JP3267195B2 (en) Photoelectric smoke detector

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040826

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060621

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060711

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060911

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: 20061031

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061113

R150 Certificate of patent or registration of utility model

Ref document number: 3885489

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101201

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101201

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111201

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111201

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121201

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131201

Year of fee payment: 7

EXPY Cancellation because of completion of term