WO2020067078A1 - Photoelectric sensor - Google Patents

Photoelectric sensor Download PDF

Info

Publication number
WO2020067078A1
WO2020067078A1 PCT/JP2019/037434 JP2019037434W WO2020067078A1 WO 2020067078 A1 WO2020067078 A1 WO 2020067078A1 JP 2019037434 W JP2019037434 W JP 2019037434W WO 2020067078 A1 WO2020067078 A1 WO 2020067078A1
Authority
WO
WIPO (PCT)
Prior art keywords
threshold
unit
light receiving
distance
new
Prior art date
Application number
PCT/JP2019/037434
Other languages
French (fr)
Japanese (ja)
Inventor
拓矢 松嶋
信太郎 安藤
和斉 駒井
雅裕 黒川
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Publication of WO2020067078A1 publication Critical patent/WO2020067078A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders
    • G01C3/02Details
    • G01C3/06Use of electric means to obtain final indication

Definitions

  • the present disclosure relates to a photoelectric sensor.
  • the photoelectric sensor determines whether or not an object exists within a predetermined distance.
  • the photoelectric sensor irradiates the object with light by an LED (Light Emitting Diode) or the like, and the object exists within a predetermined distance depending on whether or not the light reflected by the object is detected by the photodiode. May be determined.
  • LED Light Emitting Diode
  • Patent Document 1 describes a reflective photoelectric sensor in which at least a light projecting lens has a lens body and a protruding portion protruding from a part of the back surface thereof. According to the reflection-type photoelectric sensor described in Patent Literature 1, both detection at a short distance and detection at a long distance are possible.
  • CMOS Complementary Metal Oxide Semiconductor
  • the CMOS laser sensor irradiates the object with laser light, receives the reflected light with the CMOS image sensor, and calculates the distance to the object based on the light receiving position.
  • the CMOS laser sensor needs to precisely condense the light reflected by the object and detect the light by the CMOS image sensor, the light reflected by the object is relatively coarsely condensed and detected by the photodiode. It is expensive compared to the configuration.
  • the present invention provides a photoelectric sensor capable of measuring the distance to an object with a relatively inexpensive configuration.
  • a photoelectric sensor includes a plurality of light receiving units arranged in a line from a first end to a second end, and a threshold setting unit configured to set a threshold corresponding to any of the plurality of light receiving units. And determining whether the reference light receiving unit for receiving the light reflected by the object is included in the distance from the light receiving unit located at the first end to the light receiving unit corresponding to the threshold, within a distance corresponding to the threshold.
  • a determination unit that determines whether an object is present, a search unit that repeats determination by the determination unit while changing a threshold set by the threshold setting unit, and searches for a reference threshold corresponding to the reference light receiving unit;
  • a conversion unit that converts the distance to the object.
  • the reference threshold corresponding to the reference light receiving unit that receives the light reflected by the object is searched, and the reference threshold is converted into the distance to the object, so that the object can be relatively inexpensively configured.
  • the distance to an object can be measured.
  • the search unit sets the position corresponding to the threshold as a new second end
  • the threshold setting unit sets the position corresponding to the first end.
  • a new threshold is set so as to correspond to the light receiving unit at the position where the threshold is bisected, and when the determination unit determines that the target object does not exist within the distance corresponding to the threshold, the position corresponding to the threshold is set to a new first position.
  • the threshold may be set as an end, and a new threshold may be set by the threshold setting unit so as to correspond to the light receiving unit at a position bisecting the second end and the threshold.
  • the reference threshold can be obtained by the binary search, and the reference threshold can be searched at high speed even when the number of the plurality of light receiving units increases.
  • the search unit continues the search until the new first end and the new second end are adjacent to each other, and changes the gains of the light receiving unit located at the new first end and the light receiving unit located at the new second end. While repeating the determination by the determination unit, search for the reference gain at which the light reflected by the object by the light receiving unit corresponding to the new threshold is detected, the conversion unit converts the reference threshold and the reference gain into the distance to the object May be.
  • the shift of the incident position is corrected by the gain, and the distance to the object can be measured more accurately. it can.
  • the conversion unit converts the reference threshold to the distance by the first conversion formula when the reference threshold is equal to or less than the reference value, and converts the reference threshold to the distance by the second conversion formula when the reference threshold is larger than the reference value. It may be converted.
  • the conversion from the reference threshold to the distance can be performed more accurately by changing the conversion formula according to the size of the reference threshold.
  • a first mode in which the determination unit determines whether an object exists within a distance corresponding to the threshold, and a second mode in which the determination unit, the search unit, and the conversion unit measure the distance to the object.
  • an input unit for receiving an input for switching between and.
  • the first mode for determining the presence / absence of the object and the second mode for measuring the distance to the object can be selectively used according to the purpose, and the convenience is improved.
  • an LED that irradiates the object with light may be further provided.
  • the distance to the object can be measured with a relatively inexpensive configuration using an LED instead of a laser.
  • a photoelectric sensor capable of measuring a distance to an object with a relatively inexpensive configuration.
  • the present embodiment an embodiment according to one aspect of the present invention (hereinafter, referred to as “the present embodiment”) will be described with reference to the drawings.
  • the components denoted by the same reference numerals have the same or similar configurations.
  • FIG. 1 is a diagram showing functional blocks of a photoelectric sensor 10 according to an embodiment of the present invention.
  • the photoelectric sensor 10 includes a plurality of light receiving units 10d, LEDs 10f, a threshold setting unit 11, a determination unit 12, a search unit 13, and a conversion unit 14.
  • the plurality of light receiving units 10d are arranged in a line from the first end to the second end.
  • the plurality of light receiving units 10d include 128 PDs (Photo @ Diodes).
  • the first PD 10d1 is located at the first end
  • the second PD 10d2 is adjacent to the first PD 10d1
  • the 128th PD 10d128 is located at the second end.
  • the number of PDs is arbitrary.
  • the LED 10f irradiates the object 100 with light.
  • the LED 10f may irradiate the target object 100 with light having a larger spot diameter than the laser light.
  • the photoelectric sensor 10 includes a light receiving lens that collects light emitted by the LED 10f and reflected by the object 100 to the plurality of PDs 10d.
  • the light receiving lens does not need to accurately focus light on the plurality of PDs 10d, and may have a simpler configuration than when a laser is used as a light source.
  • the photoelectric sensor 10 according to the present embodiment can measure the distance to the object 100 with a relatively inexpensive configuration using the LED 10f instead of the laser.
  • the threshold value setting unit 11 sets a threshold value corresponding to any of the light receiving units 10d.
  • the threshold setting unit 11 sets a threshold corresponding to any one of the first PD 10d1 to the 128th PD 10d128.
  • the threshold may be an integer value from 0 to 127.
  • the determination unit 12 corresponds to the threshold based on whether the reference light receiving unit that receives the light reflected by the object 100 is included from the light receiving unit located at the first end to the light receiving unit corresponding to the threshold. It is determined whether the target object 100 exists within the distance.
  • the light reflected by the object 100 and incident on the plurality of light receiving units 10d is detected by at least the n-th PD (n is any one of 1 to 128) among the first PD 10d1 to the 128-th PD 10d128.
  • the threshold value set by the threshold value setting unit 11 is the m-th PD (m is any one of 1 to 128)
  • the determination unit 12 determines whether or not n ⁇ m. In the case of, it is determined that the object 100 exists within the distance corresponding to the threshold, and when n ⁇ m is not satisfied (when n> m), it is determined that the object 100 does not exist within the distance corresponding to the threshold. I do.
  • the light reflected by the object 100 does not enter the plurality of light receiving units 10d. It may be determined that no light reception has been detected. The light reflected by the object 100 and incident on the plurality of light receiving units 10d may be detected by two adjacent PDs.
  • the search unit 13 sets the position corresponding to the threshold as a new second end, and sets the threshold setting unit 11
  • a new threshold may be set so as to correspond to the light receiving unit at a position that bisects the first end and the threshold.
  • the search unit 13 sets the position corresponding to the threshold as a new first end, and the threshold setting unit 11
  • a new threshold value may be set so as to correspond to the light receiving unit at a position where the two ends and the threshold value are bisected.
  • the search unit 13 when the light reflected by the object 100 is detected by the n-th PD (n is any one of 1 to 128) and the threshold is m (m is any one of 1 to 128), the search unit 13 When the determination unit 12 determines that the target object 100 exists within the distance corresponding to the threshold (when n ⁇ m), the m-th PD corresponding to the threshold is set as a new second end, and the threshold setting unit 11 A new threshold may be set as 1+ (m-1) / 2. Here, the fractional part may be rounded off or truncated.
  • the searching unit 13 sets the m-th PD corresponding to the threshold as a new first end.
  • the threshold setting unit 11 may set a new threshold as m + (128 ⁇ m) / 2.
  • the search unit 13 indicates the threshold c (c is any of 1 to 128), the first end is pn (pn is any of 1 to 128), and the second end is pf ( When pf is any of 1 to 128), when the determination unit 12 determines that the target object 100 exists within the distance corresponding to the threshold, the first end is updated by pn ⁇ c, and c ⁇ pn + The threshold may be updated by (pf-pn) / 2. Further, when the determination unit 12 determines that the target object 100 does not exist within the distance corresponding to the threshold, the search unit 13 updates the second end with pf ⁇ c, and c ⁇ pn + (pf ⁇ pn). The threshold may be updated by / 2.
  • the reference threshold can be obtained by the binary search, and the reference threshold can be searched at high speed even when the number of the plurality of light receiving units increases. Specifically, when the number of the plurality of light receiving units is N, the reference threshold value can be searched at about O (log 2 N).
  • the conversion unit 14 converts the reference threshold into a distance to the object 100.
  • the conversion unit 14 may convert the reference threshold value and the reference gain into a distance to the object 100.
  • the search unit 13 continues the search until the new first end and the new second end are adjacent to each other, and changes the gains of the light receiving unit located at the new first end and the light receiving unit located at the new second end.
  • the determination by the determination unit 12 may be repeated while searching for a reference gain at which light reflected by the object 100 is detected by the light receiving unit corresponding to the new threshold.
  • the search unit 13 continues the search until the new first end and the new second end are adjacent to each other.
  • the search unit 13 increments POTN ⁇ POTN + 1 and POTF ⁇ POTF + 1 when the determination unit 12 determines that the target object 100 does not exist within the distance corresponding to the threshold and when POTF ⁇ 200. I do.
  • the increment of the gain is continued until the determination unit 12 determines that the target object 100 exists within the distance corresponding to the threshold value or POTF ⁇ 200.
  • the search unit 13 uses the gain of the light receiving unit (the light receiving unit located at the new first end or the light receiving unit located at the new second end) corresponding to the new threshold value as the reference gain.
  • A1, A2, B1, B2, C1, and C2 are coefficients determined in advance so as to measure L for a certain X by another means and reproduce the relationship.
  • the conversion unit 14 converts the reference threshold into the distance by the first conversion formula when the reference threshold is equal to or smaller than the reference value, and converts the reference threshold into the distance by the second conversion formula when the reference threshold is larger than the reference value. May be converted to As described above, by changing the conversion formula according to the size of the reference threshold, the conversion from the reference threshold to the distance can be performed more accurately.
  • the reference threshold corresponding to the reference light receiving unit that receives the light reflected by the object 100 is searched for, and the reference threshold is converted into the distance to the object 100.
  • the distance to the object can be measured with a relatively inexpensive configuration.
  • the shift of the incident position is corrected by the gain, and the distance to the object can be measured more accurately.
  • FIG. 2 is a diagram illustrating a physical configuration of the photoelectric sensor 10 according to the present embodiment.
  • the photoelectric sensor 10 includes a CPU (Central Processing Unit) 10a corresponding to a calculation unit, a RAM (Random Access Memory) 10b corresponding to a storage unit, a ROM (Read Only Memory) 10c corresponding to a storage unit, and a plurality of light receiving units. It has a unit 10d, an input unit 10e, and an LED 10f. These components are connected via a bus so that data can be transmitted and received.
  • CPU Central Processing Unit
  • RAM Random Access Memory
  • ROM Read Only Memory
  • the CPU 10a is a control unit that performs control relating to execution of a program stored in the RAM 10b or the ROM 10c and calculates and processes data.
  • the CPU 10a is a calculation unit that executes a program (measurement program) for measuring a distance to the target 100 based on data detected by the plurality of light receiving units 10d.
  • the CPU 10a receives various data from the input unit 10e and the plurality of light receiving units 10d, outputs a calculation result of the data to an external device, and stores the calculation result in the RAM 10b or the ROM 10c.
  • the RAM 10b is a storage unit in which data can be rewritten, and may be composed of, for example, a semiconductor storage element.
  • the RAM 10b may store a measurement program executed by the CPU 10a, a threshold value, a gain, and the like. These are merely examples, and the RAM 10b may store data other than these or some of them may not be stored.
  • the ROM 10c is a storage unit from which data can be read out of the storage unit, and may be configured by, for example, a semiconductor storage element.
  • the ROM 10c may store, for example, a measurement program or data that is not rewritten.
  • the plurality of light receiving units 10d are light receiving elements arranged in a line from the first end to the second end.
  • the plurality of light receiving units 10d may be constituted by PDs, but may be constituted by other elements.
  • the input unit 10e accepts input of data from a user, and may include, for example, a push button or a touch panel.
  • the input unit 10e includes a first mode in which the determination unit 12 determines whether the target object 100 exists within a distance corresponding to the threshold, and a determination unit 12, a search unit 13, and a conversion unit 14 that determine whether the target object 100 is present.
  • An input for switching to the second mode for measuring a distance is received.
  • the first mode is a mode that also includes a conventional photoelectric sensor, and the second mode is a mode unique to the photoelectric sensor 10 according to the present embodiment.
  • the LED 10f irradiates the object 100 with light.
  • the LED 10f may be replaced with another light emitting element, the use of the LED 10f, which is a comparatively inexpensive element, can reduce the manufacturing cost of the photoelectric sensor 10.
  • the measurement program may be provided by being stored in a computer-readable storage medium such as the RAM 10b or the ROM 10c, or may be provided via a communication network when the photoelectric sensor 10 includes a communication unit.
  • the operations of the threshold setting unit 11, the determination unit 12, the search unit 13, and the conversion unit 14 described with reference to FIG. 1 are realized by the CPU 10a executing the measurement program.
  • the photoelectric sensor 10 may include an LSI (Large-Scale Integration) in which the CPU 10a and the RAM 10b or the ROM 10c are integrated.
  • FIG. 3 is a diagram schematically illustrating a process of measuring the distance to the object 100 by the photoelectric sensor 10 according to the present embodiment.
  • the photoelectric sensor 10 includes a plurality of light receiving units 10d arranged in a line from a first end to a second end. The positions of the light reflected by the object 100 on the plurality of light receiving units 10d change according to the distance to the object 100. When the object 100 is too far or too close to the photoelectric sensor 10, the light reflected by the object 100 does not enter the plurality of light receiving units 10d.
  • the distance corresponding to the first end is the minimum detection distance
  • the distance corresponding to the second end is the maximum detection distance.
  • the reference light receiving unit that receives the light reflected by the object 100 is from the light receiving unit located at the first end to the light receiving unit corresponding to the threshold. , It is determined that the target object 100 does not exist within the distance corresponding to the threshold.
  • FIG. 3 illustrates the distance (unknown) of the target object 100 and the distance corresponding to the first threshold Th1.
  • the photoelectric sensor 10 sets the position corresponding to the first threshold Th1 as a new first end, and sets a new threshold (second threshold Th2) so as to correspond to the light receiving unit at a position bisecting the second end and the first threshold Th1.
  • FIG. 3 illustrates a distance (unknown) of the target object 100, a distance corresponding to the second threshold Th2, and a distance corresponding to a new first end.
  • the threshold and the first end or the second end are narrowed so as to narrow the distance of the object 100 according to whether or not the object 100 is determined to be within the distance corresponding to the threshold by the determination unit 12.
  • the photoelectric sensor 10 Updating, in the Nth search, the photoelectric sensor 10 searches for the reference threshold Th corresponding to the reference light receiving unit that receives the light reflected by the object 100.
  • N is a value of log 2 M or less, where M represents the number of the plurality of light receiving units 10d.
  • FIG. 3 illustrates the distance (unknown) of the object 100 and the distance corresponding to the reference threshold Th.
  • the photoelectric sensor 10 calculates the distance to the target 100 by substituting the reference threshold value thus binary-searched into a predetermined conversion formula.
  • FIG. 4 is a first flowchart of a process for measuring the distance to the object 100 by the photoelectric sensor 10 according to the present embodiment.
  • the photoelectric sensor 10 sets a threshold value at a position that divides the first end and the second end into two (S10). Specifically, when the first PD 10d1 to the 128th PD 10d128 are arranged in a line, the photoelectric sensor 10 may set the threshold to 63 or 64. Here, it is assumed that the threshold is set to 64.
  • the photoelectric sensor 10 sets the position corresponding to the threshold to a new second end (S12), and sets the first end and the threshold to two minutes.
  • a new threshold value is set at the position to be performed (S13). Specifically, the new second end is set to the 64th PD, and the new threshold is set to 31 or 32.
  • the photoelectric sensor 10 sets a position corresponding to the threshold to a new first end (S14), and sets the second end and the threshold to a new end.
  • a new threshold is set at the position where the image is divided into two (S15). Specifically, the new first end is set to the 64th PD, and the new threshold is set to 96.
  • the photoelectric sensor 10 determines whether the new first end is adjacent to the new second end (S16). If the new first end is not adjacent to the new second end (S16: NO), the photoelectric sensor 10 determines whether an object exists within a distance corresponding to the new threshold (S11), and repeats the above processing. On the other hand, when the new first end is adjacent to the new second end (S16: YES), that is, when the binary search cannot be repeated any more, the latest threshold is determined as the reference threshold (S17).
  • the light receiving unit corresponding to the latest threshold is the light receiving unit at the first end or the light receiving unit at the second end.
  • FIG. 5 is a second flowchart of the process of measuring the distance to the object 100 by the photoelectric sensor 10 according to the present embodiment.
  • the second flowchart is executed following the first flowchart. Therefore, the first end and the second end are adjacent to each other, and the light receiving unit corresponding to the reference threshold is the light receiving unit at the first end or the light receiving unit at the second end.
  • the photoelectric sensor 10 initially sets the gain of the light receiving unit located at the first end and the gain of the light receiving unit located at the second end (S20). Specifically, when the gain can be adjusted in the range of 0 to 255, the gain of the light receiving unit located at the first end and the gain of the light receiving unit located at the second end may be set to 129, respectively.
  • the photoelectric sensor 10 determines whether or not the target exists within the distance corresponding to the threshold (S21).
  • the light reflected by the object 100 is collected between the light receiving unit located at the first end and the light receiving unit located at the second end.
  • the photoelectric sensor 10 determines whether the gain of the light receiving unit located at the second end is equal to or larger than a predetermined value (S22).
  • the predetermined value may be 200, for example. If the gain of the light receiving unit located at the second end is not equal to or greater than the predetermined value (S22: NO), the photoelectric sensor 10 determines the gain of the light receiving unit located at the first end and the gain of the light receiving unit located at the second end. Increase by one unit. That is, the gain of the light receiving unit located at the first end is increased by one, and the gain of the light receiving unit located at the second end is increased by one.
  • the photoelectric sensor 10 determines whether the target exists within the distance corresponding to the threshold under the increased gain (S21), and determines that the target exists within the distance corresponding to the threshold (S21). (S21: YES), the above processing is repeated until it is determined that the gain of the light receiving unit located at the second end is equal to or more than the predetermined value (S22: YES).
  • the photoelectric The sensor 10 determines the latest gain as the reference gain (S24). Then, the photoelectric sensor 10 converts the reference threshold value and the reference light receiving gain into a distance to the target object 100.
  • Appendix 1 A plurality of light receiving units (10d) arranged in a line from the first end to the second end; A threshold setting unit (11) for setting a threshold corresponding to any of the plurality of light receiving units (10d); Based on whether or not a reference light receiving unit for receiving light reflected by the object (100) is included from the light receiving unit located at the first end to the light receiving unit corresponding to the threshold, the light receiving unit corresponds to the threshold.
  • a photoelectric sensor (10) comprising:

Landscapes

  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Measurement Of Optical Distance (AREA)
  • Optical Radar Systems And Details Thereof (AREA)
  • Geophysics And Detection Of Objects (AREA)

Abstract

Provided is a photoelectric sensor capable of measuring the distance to a target object using a relatively inexpensive configuration. This photoelectric sensor is provided with: a plurality of light receiving units disposed side by side in one row from a first end to a second end; a threshold setting unit for setting a threshold corresponding to any of the plurality of light receiving units; a determining unit for determining whether a target object is present within a distance corresponding to the threshold, on the basis of whether a reference light receiving unit which receives light reflected by the target object is included between the light receiving unit positioned at the first end and the light receiving unit corresponding to the threshold; a search unit which searches for a reference threshold corresponding to the reference light receiving unit, by repeating the determination performed by the determining unit while changing the threshold set by the threshold setting unit; and a converting unit for converting the reference threshold into the distance to the target object.

Description

光電センサPhotoelectric sensor
 本開示は、光電センサに関する。 The present disclosure relates to a photoelectric sensor.
 従来、所定の距離内に対象物が存在するか否かを判定する光電センサが用いられている。光電センサは、LED(Light Emitting Diode)等によって対象物に光を照射し、対象物で反射された光がフォトダイオードによって検出されるか否かに応じて、所定の距離内に対象物が存在するか否かを判定することがある。 Conventionally, a photoelectric sensor that determines whether or not an object exists within a predetermined distance has been used. The photoelectric sensor irradiates the object with light by an LED (Light Emitting Diode) or the like, and the object exists within a predetermined distance depending on whether or not the light reflected by the object is detected by the photodiode. May be determined.
 下記特許文献1には、少なくとも投光レンズが、レンズ本体とその裏面の一部から突出する突出部とを有する反射型光電センサが記載されている。特許文献1に記載の反射型光電センサによれば、近距離での検出及び遠距離での検出の双方が可能となる。 Patent Document 1 below describes a reflective photoelectric sensor in which at least a light projecting lens has a lens body and a protruding portion protruding from a part of the back surface thereof. According to the reflection-type photoelectric sensor described in Patent Literature 1, both detection at a short distance and detection at a long distance are possible.
特開2014-96036号公報JP 2014-96036 A
 対象物の有無だけでなく、対象物までの距離が測定できる光電センサとして、CMOS(Complementary Metal Oxide Semiconductor)レーザセンサが用いられている。CMOSレーザセンサは、対象物にレーザ光を照射して、反射された光をCMOSイメージセンサで受光して、受光位置に基づいて対象物までの距離を算出する。 A CMOS (Complementary Metal Oxide Semiconductor) laser sensor is used as a photoelectric sensor capable of measuring not only the presence or absence of an object but also the distance to the object. The CMOS laser sensor irradiates the object with laser light, receives the reflected light with the CMOS image sensor, and calculates the distance to the object based on the light receiving position.
 しかしながら、CMOSレーザセンサは、対象物で反射した光を精密に集光してCMOSイメージセンサで検出する必要があるため、対象物で反射した光を比較的粗く集光してフォトダイオードで検出する構成に比べて高価になる。 However, since the CMOS laser sensor needs to precisely condense the light reflected by the object and detect the light by the CMOS image sensor, the light reflected by the object is relatively coarsely condensed and detected by the photodiode. It is expensive compared to the configuration.
 そこで、本発明は、比較的安価な構成で対象物までの距離が測定できる光電センサを提供する。 Therefore, the present invention provides a photoelectric sensor capable of measuring the distance to an object with a relatively inexpensive configuration.
 本開示の一態様に係る光電センサは、第1端から第2端まで一列に並んで配置されている複数の受光部と、複数の受光部のいずれかに対応する閾値を設定する閾値設定部と、対象物によって反射された光を受光する基準受光部が第1端に位置する受光部から閾値に対応する受光部までに含まれるか否かに基づいて、閾値に対応する距離内に対象物が存在するか否かを判定する判定部と、閾値設定部により設定する閾値を変更しながら判定部による判定を繰り返し、基準受光部に対応する基準閾値を探索する探索部と、基準閾値を対象物までの距離に変換する変換部とを備える。 A photoelectric sensor according to an aspect of the present disclosure includes a plurality of light receiving units arranged in a line from a first end to a second end, and a threshold setting unit configured to set a threshold corresponding to any of the plurality of light receiving units. And determining whether the reference light receiving unit for receiving the light reflected by the object is included in the distance from the light receiving unit located at the first end to the light receiving unit corresponding to the threshold, within a distance corresponding to the threshold. A determination unit that determines whether an object is present, a search unit that repeats determination by the determination unit while changing a threshold set by the threshold setting unit, and searches for a reference threshold corresponding to the reference light receiving unit; A conversion unit that converts the distance to the object.
 この態様によれば、対象物によって反射された光を受光する基準受光部に対応する基準閾値を探索して、基準閾値を対象物までの距離に変換することで、比較的安価な構成で対象物までの距離が測定できる。 According to this aspect, the reference threshold corresponding to the reference light receiving unit that receives the light reflected by the object is searched, and the reference threshold is converted into the distance to the object, so that the object can be relatively inexpensively configured. The distance to an object can be measured.
 上記態様において、探索部は、判定部により閾値に対応する距離内に対象物が存在すると判定された場合に、閾値に対応する位置を新しい第2端とし、閾値設定部により、第1端と閾値を二分する位置の受光部に対応するように新しい閾値を設定させ、判定部により閾値に対応する距離内に対象物が存在しないと判定された場合に、閾値に対応する位置を新しい第1端とし、閾値設定部により、第2端と閾値を二分する位置の受光部に対応するように新しい閾値を設定させてもよい。 In the above aspect, when the determination unit determines that the target object is present within the distance corresponding to the threshold, the search unit sets the position corresponding to the threshold as a new second end, and the threshold setting unit sets the position corresponding to the first end. A new threshold is set so as to correspond to the light receiving unit at the position where the threshold is bisected, and when the determination unit determines that the target object does not exist within the distance corresponding to the threshold, the position corresponding to the threshold is set to a new first position. The threshold may be set as an end, and a new threshold may be set by the threshold setting unit so as to correspond to the light receiving unit at a position bisecting the second end and the threshold.
 この態様によれば、二分探索によって基準閾値を求めることができ、複数の受光部の数が多くなっても高速に基準閾値を探索することができる。 According to this aspect, the reference threshold can be obtained by the binary search, and the reference threshold can be searched at high speed even when the number of the plurality of light receiving units increases.
 上記態様において、探索部は、新しい第1端と新しい第2端が隣接するまで探索を継続し、新しい第1端に位置する受光部及び新しい第2端に位置する受光部のゲインを変化させながら判定部による判定を繰り返し、新しい閾値に対応する受光部によって対象物によって反射された光が検出される基準ゲインを探索し、変換部は、基準閾値及び基準ゲインを対象物までの距離に変換してもよい。 In the above aspect, the search unit continues the search until the new first end and the new second end are adjacent to each other, and changes the gains of the light receiving unit located at the new first end and the light receiving unit located at the new second end. While repeating the determination by the determination unit, search for the reference gain at which the light reflected by the object by the light receiving unit corresponding to the new threshold is detected, the conversion unit converts the reference threshold and the reference gain into the distance to the object May be.
 この態様によれば、対象物によって反射された光が2つの受光部の間に入射する場合に、入射位置のずれをゲインによって補正して、より正確に対象物までの距離を測定することができる。 According to this aspect, when the light reflected by the object enters between the two light receiving units, the shift of the incident position is corrected by the gain, and the distance to the object can be measured more accurately. it can.
 上記態様において、変換部は、基準閾値が基準値以下である場合に第1変換式によって基準閾値を距離に変換し、基準閾値が基準値より大きい場合に第2変換式によって基準閾値を距離に変換してもよい。 In the above aspect, the conversion unit converts the reference threshold to the distance by the first conversion formula when the reference threshold is equal to or less than the reference value, and converts the reference threshold to the distance by the second conversion formula when the reference threshold is larger than the reference value. It may be converted.
 この態様によれば、基準閾値の大きさによって変換式を変えることで、基準閾値から距離への変換をより正確に行うことができる。 According to this aspect, the conversion from the reference threshold to the distance can be performed more accurately by changing the conversion formula according to the size of the reference threshold.
 上記態様において、判定部によって閾値に対応する距離内に対象物が存在するか否かを判定する第1モードと、判定部、探索部及び変換部によって対象物までの距離を測定する第2モードとを切り替える入力を受け付ける入力部をさらに備えてもよい。 In the above aspect, a first mode in which the determination unit determines whether an object exists within a distance corresponding to the threshold, and a second mode in which the determination unit, the search unit, and the conversion unit measure the distance to the object. And an input unit for receiving an input for switching between and.
 この態様によれば、対象物の有無を判定する第1モードと、対象物までの距離を測定する第2モードとを目的に応じて使い分けることができ、利便性が向上する。 According to this aspect, the first mode for determining the presence / absence of the object and the second mode for measuring the distance to the object can be selectively used according to the purpose, and the convenience is improved.
 上記態様において、対象物に光を照射するLEDをさらに備えてもよい。 In the above aspect, an LED that irradiates the object with light may be further provided.
 この態様によれば、レーザではなくLEDを用いて、比較的安価な構成で対象物までの距離が測定できる。 According to this aspect, the distance to the object can be measured with a relatively inexpensive configuration using an LED instead of a laser.
 本発明によれば、比較的安価な構成で対象物までの距離が測定できる光電センサが提供される。 According to the present invention, there is provided a photoelectric sensor capable of measuring a distance to an object with a relatively inexpensive configuration.
本発明の実施形態に係る光電センサの機能ブロックを示す図である。It is a figure showing the functional block of the photoelectric sensor concerning the embodiment of the present invention. 本実施形態に係る光電センサの物理的構成を示す図である。It is a figure showing the physical composition of the photoelectric sensor concerning this embodiment. 本実施形態に係る光電センサにより対象物までの距離を測定する処理の概略を示す図である。It is a figure showing the outline of the processing which measures the distance to the object with the photoelectric sensor concerning this embodiment. 本実施形態に係る光電センサにより対象物までの距離を測定する処理の第1フローチャートである。It is a 1st flowchart of the process which measures the distance to an object by the photoelectric sensor which concerns on this embodiment. 本実施形態に係る光電センサにより対象物までの距離を測定する処理の第2フローチャートである。It is a 2nd flowchart of the process which measures the distance to a target by the photoelectric sensor which concerns on this embodiment.
 以下、本発明の一側面に係る実施の形態(以下、「本実施形態」と表記する。)を、図面に基づいて説明する。なお、各図において、同一の符号を付したものは、同一又は同様の構成を有する。 Hereinafter, an embodiment according to one aspect of the present invention (hereinafter, referred to as “the present embodiment”) will be described with reference to the drawings. In each of the drawings, the components denoted by the same reference numerals have the same or similar configurations.
 図1は、本発明の実施形態に係る光電センサ10の機能ブロックを示す図である。光電センサ10は、複数の受光部10d、LED10f、閾値設定部11、判定部12、探索部13及び変換部14を備える。 FIG. 1 is a diagram showing functional blocks of a photoelectric sensor 10 according to an embodiment of the present invention. The photoelectric sensor 10 includes a plurality of light receiving units 10d, LEDs 10f, a threshold setting unit 11, a determination unit 12, a search unit 13, and a conversion unit 14.
 複数の受光部10dは、第1端から第2端まで一列に並んで配置されている。本実施形態では、複数の受光部10dは、128個のPD(Photo Diode)を含む。第1PD10d1は第1端に位置し、第2PD10d2は第1PD10d1に隣接し、第128PD10d128は第2端に位置する。なお、PDの数は任意である。 The plurality of light receiving units 10d are arranged in a line from the first end to the second end. In the present embodiment, the plurality of light receiving units 10d include 128 PDs (Photo @ Diodes). The first PD 10d1 is located at the first end, the second PD 10d2 is adjacent to the first PD 10d1, and the 128th PD 10d128 is located at the second end. The number of PDs is arbitrary.
 LED10fは、対象物100に光を照射する。LED10fは、レーザ光に比べてスポット径が大きい光を対象物100に照射してよい。また、光電センサ10は、LED10fにより照射され、対象物100によって反射された光を複数のPD10dに集光する受光レンズを備える。受光レンズは、複数のPD10dに正確に集光するものでなくてもよく、光源としてレーザを用いる場合よりも簡易な構成のものであってよい。このように、本実施形態に係る光電センサ10は、レーザではなくLED10fを用いて、比較的安価な構成で対象物100までの距離が測定できる。 The LED 10f irradiates the object 100 with light. The LED 10f may irradiate the target object 100 with light having a larger spot diameter than the laser light. In addition, the photoelectric sensor 10 includes a light receiving lens that collects light emitted by the LED 10f and reflected by the object 100 to the plurality of PDs 10d. The light receiving lens does not need to accurately focus light on the plurality of PDs 10d, and may have a simpler configuration than when a laser is used as a light source. As described above, the photoelectric sensor 10 according to the present embodiment can measure the distance to the object 100 with a relatively inexpensive configuration using the LED 10f instead of the laser.
 閾値設定部11は、複数の受光部10dのいずれかに対応する閾値を設定する。本例の場合、閾値設定部11は、第1PD10d1から第128PD10d128までのいずれかに対応する閾値を設定する。この場合、閾値は、0から127の整数値であってよい。 The threshold value setting unit 11 sets a threshold value corresponding to any of the light receiving units 10d. In the case of this example, the threshold setting unit 11 sets a threshold corresponding to any one of the first PD 10d1 to the 128th PD 10d128. In this case, the threshold may be an integer value from 0 to 127.
 判定部12は、対象物100によって反射された光を受光する基準受光部が第1端に位置する受光部から閾値に対応する受光部までに含まれるか否かに基づいて、閾値に対応する距離内に対象物100が存在するか否かを判定する。対象物100で反射され、複数の受光部10dに入射した光は、第1PD10d1から第128PD10d128のうち少なくとも第nPD(nは1~128のいずれか)によって検出される。ここで、閾値設定部11により設定された閾値が、第mPD(mは1~128のいずれか)である場合、判定部12は、n≦mであるか否かを判定し、n≦mである場合には閾値に対応する距離内に対象物100が存在すると判定し、n≦mでない場合(n>mの場合)には閾値に対応する距離内に対象物100が存在しないと判定する。 The determination unit 12 corresponds to the threshold based on whether the reference light receiving unit that receives the light reflected by the object 100 is included from the light receiving unit located at the first end to the light receiving unit corresponding to the threshold. It is determined whether the target object 100 exists within the distance. The light reflected by the object 100 and incident on the plurality of light receiving units 10d is detected by at least the n-th PD (n is any one of 1 to 128) among the first PD 10d1 to the 128-th PD 10d128. Here, when the threshold value set by the threshold value setting unit 11 is the m-th PD (m is any one of 1 to 128), the determination unit 12 determines whether or not n ≦ m. In the case of, it is determined that the object 100 exists within the distance corresponding to the threshold, and when n ≦ m is not satisfied (when n> m), it is determined that the object 100 does not exist within the distance corresponding to the threshold. I do.
 なお、対象物100が光電センサ10から遠すぎたり、近すぎたりする場合、対象物100で反射された光が複数の受光部10dに入射しないため、判定部12は、複数の受光部10dによる受光が検出されていないと判定してよい。また、対象物100で反射され、複数の受光部10dに入射した光は、隣接する2つのPDによって検出されることがあってもよい。 When the object 100 is too far or too close to the photoelectric sensor 10, the light reflected by the object 100 does not enter the plurality of light receiving units 10d. It may be determined that no light reception has been detected. The light reflected by the object 100 and incident on the plurality of light receiving units 10d may be detected by two adjacent PDs.
 探索部13は、閾値設定部11により設定する閾値を変更しながら判定部12による判定を繰り返し、対象物100によって反射された光を受光する基準受光部に対応する基準閾値を探索する。例えば、対象物100によって反射された光が第nPD(nは、1~128のいずれか)によって検出される場合、探索部13は、閾値mを変更しながら判定部12による判定を繰り返し、基準閾値m=nを探索する。 The search unit 13 repeats the determination by the determination unit 12 while changing the threshold set by the threshold setting unit 11, and searches for a reference threshold corresponding to a reference light receiving unit that receives light reflected by the object 100. For example, when the light reflected by the object 100 is detected by the n-th PD (n is any one of 1 to 128), the search unit 13 repeats the determination by the determination unit 12 while changing the threshold value m, and Search for threshold m = n.
 より具体的には、探索部13は、判定部12により閾値に対応する距離内に対象物100が存在すると判定された場合に、閾値に対応する位置を新しい第2端とし、閾値設定部11により、第1端と閾値を二分する位置の受光部に対応するように新しい閾値を設定させてよい。また、探索部13は、判定部12により閾値に対応する距離内に対象物100が存在しないと判定された場合に、閾値に対応する位置を新しい第1端とし、閾値設定部11により、第2端と閾値を二分する位置の受光部に対応するように新しい閾値を設定させてよい。例えば、対象物100によって反射された光が第nPD(nは1~128のいずれか)によって検出されており、閾値がm(mは1~128のいずれか)である場合、探索部13は、判定部12により閾値に対応する距離内に対象物100が存在すると判定された場合(n≦mである場合)に、閾値に対応する第mPDを新しい第2端とし、閾値設定部11により新しい閾値を1+(m-1)/2と設定してよい。ここで、小数点以下は四捨五入又は切り捨てしてよい。また、探索部13は、判定部12により閾値に対応する距離内に対象物100が存在しないと判定された場合(n>mの場合)に、閾値に対応する第mPDを新しい第1端とし、閾値設定部11により新しい閾値をm+(128-m)/2と設定してよい。 More specifically, when the determination unit 12 determines that the target object 100 exists within the distance corresponding to the threshold, the search unit 13 sets the position corresponding to the threshold as a new second end, and sets the threshold setting unit 11 Thus, a new threshold may be set so as to correspond to the light receiving unit at a position that bisects the first end and the threshold. In addition, when the determination unit 12 determines that the target object 100 does not exist within the distance corresponding to the threshold, the search unit 13 sets the position corresponding to the threshold as a new first end, and the threshold setting unit 11 A new threshold value may be set so as to correspond to the light receiving unit at a position where the two ends and the threshold value are bisected. For example, when the light reflected by the object 100 is detected by the n-th PD (n is any one of 1 to 128) and the threshold is m (m is any one of 1 to 128), the search unit 13 When the determination unit 12 determines that the target object 100 exists within the distance corresponding to the threshold (when n ≦ m), the m-th PD corresponding to the threshold is set as a new second end, and the threshold setting unit 11 A new threshold may be set as 1+ (m-1) / 2. Here, the fractional part may be rounded off or truncated. When the determining unit 12 determines that the target object 100 does not exist within the distance corresponding to the threshold (in the case of n> m), the searching unit 13 sets the m-th PD corresponding to the threshold as a new first end. , The threshold setting unit 11 may set a new threshold as m + (128−m) / 2.
 より一般的には、探索部13は、閾値c(cは1~128のいずれか)と表し、第1端をpn(pnは1~128のいずれか)と表し、第2端をpf(pfは1~128のいずれか)と表すとき、判定部12により閾値に対応する距離内に対象物100が存在すると判定された場合に、pn←cによって第1端を更新し、c←pn+(pf-pn)/2によって閾値を更新してよい。また、探索部13は、判定部12により閾値に対応する距離内に対象物100が存在しないと判定された場合に、pf←cによって第2端を更新し、c←pn+(pf-pn)/2によって閾値を更新してよい。 More generally, the search unit 13 indicates the threshold c (c is any of 1 to 128), the first end is pn (pn is any of 1 to 128), and the second end is pf ( When pf is any of 1 to 128), when the determination unit 12 determines that the target object 100 exists within the distance corresponding to the threshold, the first end is updated by pn ← c, and c ← pn + The threshold may be updated by (pf-pn) / 2. Further, when the determination unit 12 determines that the target object 100 does not exist within the distance corresponding to the threshold, the search unit 13 updates the second end with pf ← c, and c ← pn + (pf−pn). The threshold may be updated by / 2.
 本実施形態に係る光電センサ10によれば、二分探索によって基準閾値を求めることができ、複数の受光部の数が多くなっても高速に基準閾値を探索することができる。具体的には、複数の受光部の数がNの場合に、O(logN)程度で基準閾値を探索することができる。 According to the photoelectric sensor 10 according to the present embodiment, the reference threshold can be obtained by the binary search, and the reference threshold can be searched at high speed even when the number of the plurality of light receiving units increases. Specifically, when the number of the plurality of light receiving units is N, the reference threshold value can be searched at about O (log 2 N).
 変換部14は、基準閾値を対象物100までの距離に変換する。また、変換部14は、基準閾値及び基準ゲインを対象物100までの距離に変換してよい。その場合、探索部13は、新しい第1端と新しい第2端が隣接するまで探索を継続し、新しい第1端に位置する受光部及び新しい第2端に位置する受光部のゲインを変化させながら判定部12による判定を繰り返し、新しい閾値に対応する受光部によって対象物100によって反射された光が検出される基準ゲインを探索してよい。 The conversion unit 14 converts the reference threshold into a distance to the object 100. The conversion unit 14 may convert the reference threshold value and the reference gain into a distance to the object 100. In this case, the search unit 13 continues the search until the new first end and the new second end are adjacent to each other, and changes the gains of the light receiving unit located at the new first end and the light receiving unit located at the new second end. The determination by the determination unit 12 may be repeated while searching for a reference gain at which light reflected by the object 100 is detected by the light receiving unit corresponding to the new threshold.
 例えば、受光部のゲインを0~255のいずれかの整数とする場合、探索部13によって新しい第1端と新しい第2端が隣接するまで探索を継続した後、新しい第1端に位置する受光部のゲインをPOTN=129に設定し、新しい第2端に位置する受光部のゲインをPOTF=129に設定する。そして、探索部13は、判定部12により閾値に対応する距離内に対象物100が存在しないと判定された場合であって、POTF<200である場合に、POTN←POTN+1及びPOTF←POTF+1とインクリメントする。その後、判定部12により閾値に対応する距離内に対象物100が存在すると判定されるか又はPOTF≧200となるまでゲインのインクリメントを続ける。最終的に、探索部13は、新しい閾値に対応する受光部(新しい第1端に位置する受光部又は新しい第2端に位置する受光部)のゲインを基準ゲインとする。 For example, when the gain of the light receiving unit is an integer from 0 to 255, the search unit 13 continues the search until the new first end and the new second end are adjacent to each other. The gain of the unit is set to POTN = 129, and the gain of the light receiving unit located at the new second end is set to POTF = 129. Then, the search unit 13 increments POTN ← POTN + 1 and POTF ← POTF + 1 when the determination unit 12 determines that the target object 100 does not exist within the distance corresponding to the threshold and when POTF <200. I do. Thereafter, the increment of the gain is continued until the determination unit 12 determines that the target object 100 exists within the distance corresponding to the threshold value or POTF ≧ 200. Finally, the search unit 13 uses the gain of the light receiving unit (the light receiving unit located at the new first end or the light receiving unit located at the new second end) corresponding to the new threshold value as the reference gain.
 変換部14は、X=基準閾値×16+(基準ゲイン-128)によって、単位がmmである距離値Xを算出してよい。そして、変換部14は、X≦Z1の場合、L=B1/(A1-X)-C1によって、単位が10μmである対象物100までの距離を算出してよい。また、変換部14は、X>Z1の場合、L=B2/(A2-X)-C2によって、単位が10μmである対象物100までの距離を算出してよい。ここで、A1、A2、B1、B2、C1及びC2は、あるXに対するLを他の手段で実測して、その関係を再現するように予め定められる係数である。 The conversion unit 14 may calculate the distance value X having a unit of mm by X = reference threshold × 16 + (reference gain−128). Then, when X ≦ Z1, the conversion unit 14 may calculate the distance to the object 100 having a unit of 10 μm by L = B1 / (A1−X) −C1. Further, when X> Z1, the conversion unit 14 may calculate the distance to the object 100 having a unit of 10 μm by L = B2 / (A2-X) -C2. Here, A1, A2, B1, B2, C1, and C2 are coefficients determined in advance so as to measure L for a certain X by another means and reproduce the relationship.
 このように、変換部14は、基準閾値が基準値以下である場合に第1変換式によって基準閾値を距離に変換し、基準閾値が基準値より大きい場合に第2変換式によって基準閾値を距離に変換してよい。このように、基準閾値の大きさによって変換式を変えることで、基準閾値から距離への変換をより正確に行うことができる。 As described above, the conversion unit 14 converts the reference threshold into the distance by the first conversion formula when the reference threshold is equal to or smaller than the reference value, and converts the reference threshold into the distance by the second conversion formula when the reference threshold is larger than the reference value. May be converted to As described above, by changing the conversion formula according to the size of the reference threshold, the conversion from the reference threshold to the distance can be performed more accurately.
 また、本実施形態に係る光電センサ10によれば、対象物100によって反射された光を受光する基準受光部に対応する基準閾値を探索して、基準閾値を対象物100までの距離に変換することで、比較的安価な構成で対象物までの距離が測定できる。また、対象物100によって反射された光が2つの受光部の間に入射する場合に、入射位置のずれをゲインによって補正して、より正確に対象物までの距離を測定することができる。 Further, according to the photoelectric sensor 10 according to the present embodiment, the reference threshold corresponding to the reference light receiving unit that receives the light reflected by the object 100 is searched for, and the reference threshold is converted into the distance to the object 100. Thus, the distance to the object can be measured with a relatively inexpensive configuration. In addition, when the light reflected by the object 100 is incident between the two light receiving units, the shift of the incident position is corrected by the gain, and the distance to the object can be measured more accurately.
 図2は、本実施形態に係る光電センサ10の物理的構成を示す図である。光電センサ10は、演算部に相当するCPU(Central Processing Unit)10aと、記憶部に相当するRAM(Random Access Memory)10bと、記憶部に相当するROM(Read Only Memory)10cと、複数の受光部10dと、入力部10eと、LED10fと、を有する。これらの各構成は、バスを介してデータ送受信可能に接続される。 FIG. 2 is a diagram illustrating a physical configuration of the photoelectric sensor 10 according to the present embodiment. The photoelectric sensor 10 includes a CPU (Central Processing Unit) 10a corresponding to a calculation unit, a RAM (Random Access Memory) 10b corresponding to a storage unit, a ROM (Read Only Memory) 10c corresponding to a storage unit, and a plurality of light receiving units. It has a unit 10d, an input unit 10e, and an LED 10f. These components are connected via a bus so that data can be transmitted and received.
 CPU10aは、RAM10b又はROM10cに記憶されたプログラムの実行に関する制御やデータの演算、加工を行う制御部である。CPU10aは、複数の受光部10dにより検出されるデータに基づいて対象物100までの距離を測定するプログラム(測定プログラム)を実行する演算部である。CPU10aは、入力部10eや複数の受光部10dから種々のデータを受け取り、データの演算結果を外部機器に出力したり、RAM10bやROM10cに格納したりする。 The CPU 10a is a control unit that performs control relating to execution of a program stored in the RAM 10b or the ROM 10c and calculates and processes data. The CPU 10a is a calculation unit that executes a program (measurement program) for measuring a distance to the target 100 based on data detected by the plurality of light receiving units 10d. The CPU 10a receives various data from the input unit 10e and the plurality of light receiving units 10d, outputs a calculation result of the data to an external device, and stores the calculation result in the RAM 10b or the ROM 10c.
 RAM10bは、記憶部のうちデータの書き換えが可能なものであり、例えば半導体記憶素子で構成されてよい。RAM10bは、CPU10aが実行する測定プログラム、閾値及びゲイン等を記憶してよい。なお、これらは例示であって、RAM10bには、これら以外のデータが記憶されていてもよいし、これらの一部が記憶されていなくてもよい。 The RAM 10b is a storage unit in which data can be rewritten, and may be composed of, for example, a semiconductor storage element. The RAM 10b may store a measurement program executed by the CPU 10a, a threshold value, a gain, and the like. These are merely examples, and the RAM 10b may store data other than these or some of them may not be stored.
 ROM10cは、記憶部のうちデータの読み出しが可能なものであり、例えば半導体記憶素子で構成されてよい。ROM10cは、例えば測定プログラムや、書き換えが行われないデータを記憶してよい。 The ROM 10c is a storage unit from which data can be read out of the storage unit, and may be configured by, for example, a semiconductor storage element. The ROM 10c may store, for example, a measurement program or data that is not rewritten.
 複数の受光部10dは、第1端から第2端まで一列に並んで配置されている受光素子である。複数の受光部10dは、PDで構成されてよいが、その他の素子で構成されてもよい。 The plurality of light receiving units 10d are light receiving elements arranged in a line from the first end to the second end. The plurality of light receiving units 10d may be constituted by PDs, but may be constituted by other elements.
 入力部10eは、ユーザからデータの入力を受け付けるものであり、例えば、プッシュボタンやタッチパネルを含んでよい。入力部10eは、判定部12によって閾値に対応する距離内に対象物100が存在するか否かを判定する第1モードと、判定部12、探索部13及び変換部14によって対象物100までの距離を測定する第2モードとを切り替える入力を受け付ける。第1モードは、従来の光電センサも備えるモードであり、第2モードは、本実施形態に係る光電センサ10に特有のモードである。入力部10eによって、対象物100の有無を判定する第1モードと、対象物100までの距離を測定する第2モードとを目的に応じて使い分けることができ、利便性が向上する。 The input unit 10e accepts input of data from a user, and may include, for example, a push button or a touch panel. The input unit 10e includes a first mode in which the determination unit 12 determines whether the target object 100 exists within a distance corresponding to the threshold, and a determination unit 12, a search unit 13, and a conversion unit 14 that determine whether the target object 100 is present. An input for switching to the second mode for measuring a distance is received. The first mode is a mode that also includes a conventional photoelectric sensor, and the second mode is a mode unique to the photoelectric sensor 10 according to the present embodiment. With the input unit 10e, the first mode for determining the presence or absence of the target object 100 and the second mode for measuring the distance to the target object 100 can be selectively used according to the purpose, and the convenience is improved.
 LED10fは、対象物100に光を照射する。LED10fは、他の発光素子に置き換えられてもよいが、比較的な安価な素子であるLED10fを用いることで、光電センサ10の製造コストを低く抑えることができる。 The LED 10f irradiates the object 100 with light. Although the LED 10f may be replaced with another light emitting element, the use of the LED 10f, which is a comparatively inexpensive element, can reduce the manufacturing cost of the photoelectric sensor 10.
 測定プログラムは、RAM10bやROM10c等のコンピュータによって読み取り可能な記憶媒体に記憶されて提供されてもよいし、光電センサ10が通信部を備える場合には、通信ネットワークを介して提供されてもよい。光電センサ10では、CPU10aが測定プログラムを実行することにより、図1を用いて説明した閾値設定部11、判定部12、探索部13及び変換部14の動作が実現される。なお、これらの物理的な構成は例示であって、必ずしも独立した構成でなくてもよい。例えば、光電センサ10は、CPU10aとRAM10bやROM10cが一体化したLSI(Large-Scale Integration)を備えていてもよい。 The measurement program may be provided by being stored in a computer-readable storage medium such as the RAM 10b or the ROM 10c, or may be provided via a communication network when the photoelectric sensor 10 includes a communication unit. In the photoelectric sensor 10, the operations of the threshold setting unit 11, the determination unit 12, the search unit 13, and the conversion unit 14 described with reference to FIG. 1 are realized by the CPU 10a executing the measurement program. Note that these physical configurations are merely examples, and are not necessarily independent configurations. For example, the photoelectric sensor 10 may include an LSI (Large-Scale Integration) in which the CPU 10a and the RAM 10b or the ROM 10c are integrated.
 図3は、本実施形態に係る光電センサ10により対象物100までの距離を測定する処理の概略を示す図である。光電センサ10は、第1端から第2端まで一列に並んで配置されている複数の受光部10dを備える。対象物100により反射された光は、対象物100までの距離に応じて複数の受光部10dへの入射位置が変わる。また、対象物100が光電センサ10から遠すぎたり、近すぎたりする場合、対象物100で反射された光は、複数の受光部10dに入射しない。ここで、第1端に対応する距離が最小検出距離となり、第2端に対応する距離が最大検出距離となる。 FIG. 3 is a diagram schematically illustrating a process of measuring the distance to the object 100 by the photoelectric sensor 10 according to the present embodiment. The photoelectric sensor 10 includes a plurality of light receiving units 10d arranged in a line from a first end to a second end. The positions of the light reflected by the object 100 on the plurality of light receiving units 10d change according to the distance to the object 100. When the object 100 is too far or too close to the photoelectric sensor 10, the light reflected by the object 100 does not enter the plurality of light receiving units 10d. Here, the distance corresponding to the first end is the minimum detection distance, and the distance corresponding to the second end is the maximum detection distance.
 本例では、光電センサ10によって第1閾値Th1が設定された場合に、対象物100によって反射された光を受光する基準受光部が第1端に位置する受光部から閾値に対応する受光部までに含まれないため、閾値に対応する距離内に対象物100が存在しないと判定される。図3では、対象物100の距離(未知)と、第1閾値Th1に対応する距離とを図示している。 In this example, when the first threshold value Th1 is set by the photoelectric sensor 10, the reference light receiving unit that receives the light reflected by the object 100 is from the light receiving unit located at the first end to the light receiving unit corresponding to the threshold. , It is determined that the target object 100 does not exist within the distance corresponding to the threshold. FIG. 3 illustrates the distance (unknown) of the target object 100 and the distance corresponding to the first threshold Th1.
 その後、光電センサ10は、第1閾値Th1に対応する位置を新しい第1端とし、第2端と第1閾値Th1を二分する位置の受光部に対応するように新しい閾値(第2閾値Th2)を設定する。図3では、対象物100の距離(未知)と、第2閾値Th2に対応する距離と、新しい第1端に対応する距離とを図示している。 Thereafter, the photoelectric sensor 10 sets the position corresponding to the first threshold Th1 as a new first end, and sets a new threshold (second threshold Th2) so as to correspond to the light receiving unit at a position bisecting the second end and the first threshold Th1. Set. FIG. 3 illustrates a distance (unknown) of the target object 100, a distance corresponding to the second threshold Th2, and a distance corresponding to a new first end.
 このように、判定部12により閾値に対応する距離内に対象物100が存在すると判定されるか否かに応じて、対象物100の距離を絞り込むように閾値及び第1端又は第2端を更新していき、光電センサ10は、第N回目の探索で、対象物100によって反射された光を受光する基準受光部に対応する基準閾値Thを探索する。ここで、Nは、複数の受光部10dの数をMと表すとき、logM以下の値である。図3では、対象物100の距離(未知)と、基準閾値Thに対応する距離とを図示している。光電センサ10は、このようにして二分探索された基準閾値を、所定の変換式に代入して、対象物100までの距離を算出する。 In this manner, the threshold and the first end or the second end are narrowed so as to narrow the distance of the object 100 according to whether or not the object 100 is determined to be within the distance corresponding to the threshold by the determination unit 12. Updating, in the Nth search, the photoelectric sensor 10 searches for the reference threshold Th corresponding to the reference light receiving unit that receives the light reflected by the object 100. Here, N is a value of log 2 M or less, where M represents the number of the plurality of light receiving units 10d. FIG. 3 illustrates the distance (unknown) of the object 100 and the distance corresponding to the reference threshold Th. The photoelectric sensor 10 calculates the distance to the target 100 by substituting the reference threshold value thus binary-searched into a predetermined conversion formula.
 図4は、本実施形態に係る光電センサ10により対象物100までの距離を測定する処理の第1フローチャートである。光電センサ10は、第1端と第2端を2分する位置に閾値を設定する(S10)。具体的には、第1PD10d1から第128PD10d128まで一列に並んでいる場合、光電センサ10は、閾値を63又は64に設定してよい。ここでは、仮に、閾値を64に設定したとする。 FIG. 4 is a first flowchart of a process for measuring the distance to the object 100 by the photoelectric sensor 10 according to the present embodiment. The photoelectric sensor 10 sets a threshold value at a position that divides the first end and the second end into two (S10). Specifically, when the first PD 10d1 to the 128th PD 10d128 are arranged in a line, the photoelectric sensor 10 may set the threshold to 63 or 64. Here, it is assumed that the threshold is set to 64.
 光電センサ10は、閾値に対応する距離内に対象物100が存在する場合(S11:YES)、閾値に対応する位置を新しい第2端に設定し(S12)、第1端と閾値を2分する位置に新しい閾値を設定する(S13)。具体的には、新しい第2端を第64PDに設定し、新しい閾値を31又は32に設定する。 When the target object 100 exists within the distance corresponding to the threshold (S11: YES), the photoelectric sensor 10 sets the position corresponding to the threshold to a new second end (S12), and sets the first end and the threshold to two minutes. A new threshold value is set at the position to be performed (S13). Specifically, the new second end is set to the 64th PD, and the new threshold is set to 31 or 32.
 一方、閾値に対応する距離内に対象物100が存在しない場合(S11:NO)、光電センサ10は、閾値に対応する位置を新しい第1端に設定し(S14)、第2端と閾値を2分する位置に新しい閾値を設定する(S15)。具体的には、新しい第1端を第64PDに設定し、新しい閾値を96に設定する。 On the other hand, when the target object 100 does not exist within the distance corresponding to the threshold (S11: NO), the photoelectric sensor 10 sets a position corresponding to the threshold to a new first end (S14), and sets the second end and the threshold to a new end. A new threshold is set at the position where the image is divided into two (S15). Specifically, the new first end is set to the 64th PD, and the new threshold is set to 96.
 その後、光電センサ10は、新しい第1端と新しい第2端が隣接するか否かを判定する(S16)。新しい第1端と新しい第2端が隣接しない場合(S16:NO)、光電センサ10は、新しい閾値に対応する距離内に対象物が存在するか判定し(S11)、上記処理を繰り返す。一方、新しい第1端と新しい第2端が隣接する場合(S16:YES)、すなわち、これ以上二分探索を繰り返すことができない場合、最新の閾値を基準閾値と決定する(S17)。ここで、最新の閾値に対応する受光部は、第1端の受光部又は第2端の受光部となる。 (4) Thereafter, the photoelectric sensor 10 determines whether the new first end is adjacent to the new second end (S16). If the new first end is not adjacent to the new second end (S16: NO), the photoelectric sensor 10 determines whether an object exists within a distance corresponding to the new threshold (S11), and repeats the above processing. On the other hand, when the new first end is adjacent to the new second end (S16: YES), that is, when the binary search cannot be repeated any more, the latest threshold is determined as the reference threshold (S17). Here, the light receiving unit corresponding to the latest threshold is the light receiving unit at the first end or the light receiving unit at the second end.
 図5は、本実施形態に係る光電センサ10により対象物100までの距離を測定する処理の第2フローチャートである。第2フローチャートは、第1フローチャートに続いて実行される。そのため、第1端と第2端は隣接しており、基準閾値に対応する受光部は、第1端の受光部又は第2端の受光部となっている。 FIG. 5 is a second flowchart of the process of measuring the distance to the object 100 by the photoelectric sensor 10 according to the present embodiment. The second flowchart is executed following the first flowchart. Therefore, the first end and the second end are adjacent to each other, and the light receiving unit corresponding to the reference threshold is the light receiving unit at the first end or the light receiving unit at the second end.
 光電センサ10は、第1端に位置する受光部のゲインと、第2端に位置する受光部のゲインとを初期設定する(S20)。具体的には、ゲインを0~255の範囲で調整できるとき、第1端に位置する受光部のゲインと、第2端に位置する受光部のゲインとをそれぞれ129に設定してよい。 (4) The photoelectric sensor 10 initially sets the gain of the light receiving unit located at the first end and the gain of the light receiving unit located at the second end (S20). Specifically, when the gain can be adjusted in the range of 0 to 255, the gain of the light receiving unit located at the first end and the gain of the light receiving unit located at the second end may be set to 129, respectively.
 その後、光電センサ10は、閾値に対応する距離内に対象物が存在するか判定する(S21)。ここで、対象物100によって反射された光は、第1端に位置する受光部と、第2端に位置する受光部との間に集光されている。 {After that, the photoelectric sensor 10 determines whether or not the target exists within the distance corresponding to the threshold (S21). Here, the light reflected by the object 100 is collected between the light receiving unit located at the first end and the light receiving unit located at the second end.
 閾値に対応する距離内に対象物が存在しない場合(S21:NO)、光電センサ10は、第2端に位置する受光部のゲインが所定値以上であるか判定する(S22)。ここで、所定値は、例えば200であってよい。第2端に位置する受光部のゲインが所定値以上でない場合(S22:NO)、光電センサ10は、第1端に位置する受光部のゲインと、第2端に位置する受光部のゲインを一単位増加させる。すなわち、第1端に位置する受光部のゲインを+1し、第2端に位置する受光部のゲインを+1する。その後、光電センサ10は、増加させたゲインの下で閾値に対応する距離内に対象物が存在するか判定し(S21)、閾値に対応する距離内に対象物が存在すると判定されるか(S21:YES)、第2端に位置する受光部のゲインが所定値以上であると判定されるまで(S22:YES)、以上の処理を繰り返す。 If the target object does not exist within the distance corresponding to the threshold value (S21: NO), the photoelectric sensor 10 determines whether the gain of the light receiving unit located at the second end is equal to or larger than a predetermined value (S22). Here, the predetermined value may be 200, for example. If the gain of the light receiving unit located at the second end is not equal to or greater than the predetermined value (S22: NO), the photoelectric sensor 10 determines the gain of the light receiving unit located at the first end and the gain of the light receiving unit located at the second end. Increase by one unit. That is, the gain of the light receiving unit located at the first end is increased by one, and the gain of the light receiving unit located at the second end is increased by one. Thereafter, the photoelectric sensor 10 determines whether the target exists within the distance corresponding to the threshold under the increased gain (S21), and determines that the target exists within the distance corresponding to the threshold (S21). (S21: YES), the above processing is repeated until it is determined that the gain of the light receiving unit located at the second end is equal to or more than the predetermined value (S22: YES).
 閾値に対応する距離内に対象物が存在すると判定されるか(S21:YES)、第2端に位置する受光部のゲインが所定値以上であると判定された場合(S22:YES)、光電センサ10は、最新のゲインを基準ゲインと決定する(S24)。そして、光電センサ10は、基準閾値及び基準受光ゲインを対象物100までの距離に変換する。 If it is determined that the object exists within the distance corresponding to the threshold value (S21: YES), or if the gain of the light receiving unit located at the second end is determined to be equal to or more than a predetermined value (S22: YES), the photoelectric The sensor 10 determines the latest gain as the reference gain (S24). Then, the photoelectric sensor 10 converts the reference threshold value and the reference light receiving gain into a distance to the target object 100.
 以上説明した実施形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。実施形態が備える各要素並びにその配置、材料、条件、形状及びサイズ等は、例示したものに限定されるわけではなく適宜変更することができる。また、異なる実施形態で示した構成同士を部分的に置換し又は組み合わせることが可能である。 The embodiments described above are intended to facilitate understanding of the present invention, and are not intended to limit and interpret the present invention. The components included in the embodiment and their arrangement, material, condition, shape, size, and the like are not limited to those illustrated, but can be appropriately changed. It is also possible to partially replace or combine the configurations shown in the different embodiments.
 [附記1]
 第1端から第2端まで一列に並んで配置されている複数の受光部(10d)と、
 前記複数の受光部(10d)のいずれかに対応する閾値を設定する閾値設定部(11)と、
 対象物(100)によって反射された光を受光する基準受光部が前記第1端に位置する受光部から前記閾値に対応する受光部までに含まれるか否かに基づいて、前記閾値に対応する距離内に前記対象物が存在するか否かを判定する判定部(12)と、
 前記閾値設定部により設定する前記閾値を変更しながら前記判定部(12)による判定を繰り返し、前記基準受光部に対応する基準閾値を探索する探索部(13)と、
 前記基準閾値を前記対象物までの距離に変換する変換部(14)と、
 を備える光電センサ(10)。
[Appendix 1]
A plurality of light receiving units (10d) arranged in a line from the first end to the second end;
A threshold setting unit (11) for setting a threshold corresponding to any of the plurality of light receiving units (10d);
Based on whether or not a reference light receiving unit for receiving light reflected by the object (100) is included from the light receiving unit located at the first end to the light receiving unit corresponding to the threshold, the light receiving unit corresponds to the threshold. A determining unit (12) for determining whether or not the object exists within a distance;
A search unit (13) for repeating the determination by the determination unit (12) while changing the threshold set by the threshold setting unit, and searching for a reference threshold corresponding to the reference light receiving unit;
A conversion unit (14) configured to convert the reference threshold value into a distance to the object;
A photoelectric sensor (10) comprising:

Claims (6)

  1.  第1端から第2端まで一列に並んで配置されている複数の受光部と、
     前記複数の受光部のいずれかに対応する閾値を設定する閾値設定部と、
     対象物によって反射された光を受光する基準受光部が前記第1端に位置する受光部から前記閾値に対応する受光部までに含まれるか否かに基づいて、前記閾値に対応する距離内に前記対象物が存在するか否かを判定する判定部と、
     前記閾値設定部により設定する前記閾値を変更しながら前記判定部による判定を繰り返し、前記基準受光部に対応する基準閾値を探索する探索部と、
     前記基準閾値を前記対象物までの距離に変換する変換部と、
     を備える光電センサ。
    A plurality of light receiving units arranged in a line from a first end to a second end;
    A threshold setting unit that sets a threshold corresponding to any of the plurality of light receiving units;
    Based on whether or not a reference light receiving unit that receives light reflected by the object is included from a light receiving unit located at the first end to a light receiving unit corresponding to the threshold, within a distance corresponding to the threshold. A determining unit that determines whether or not the object exists;
    A search unit that repeats the determination by the determination unit while changing the threshold set by the threshold setting unit, and searches for a reference threshold corresponding to the reference light receiving unit,
    A conversion unit that converts the reference threshold into a distance to the object,
    A photoelectric sensor comprising:
  2.  前記探索部は、
     前記判定部により前記閾値に対応する距離内に前記対象物が存在すると判定された場合に、前記閾値に対応する位置を新しい第2端とし、前記閾値設定部により、前記第1端と前記閾値を二分する位置の受光部に対応するように新しい閾値を設定させ、
     前記判定部により前記閾値に対応する距離内に前記対象物が存在しないと判定された場合に、前記閾値に対応する位置を新しい第1端とし、前記閾値設定部により、前記第2端と前記閾値を二分する位置の受光部に対応するように新しい閾値を設定させる、
     請求項1に記載の光電センサ。
    The search unit,
    When the determination unit determines that the object is present within a distance corresponding to the threshold, a position corresponding to the threshold is set as a new second end, and the threshold setting unit sets the first end and the threshold. A new threshold value is set to correspond to the light receiving section at the position where
    When the determination unit determines that the object is not present within the distance corresponding to the threshold, a position corresponding to the threshold is set as a new first end, and the threshold setting unit sets the second end and the A new threshold is set to correspond to the light receiving unit at the position where the threshold is bisected,
    The photoelectric sensor according to claim 1.
  3.  前記探索部は、前記新しい第1端と前記新しい第2端が隣接するまで探索を継続し、前記新しい第1端に位置する受光部及び前記新しい第2端に位置する受光部のゲインを変化させながら前記判定部による判定を繰り返し、前記新しい閾値に対応する受光部によって前記対象物によって反射された光が検出される基準ゲインを探索し、
     前記変換部は、前記基準閾値及び前記基準ゲインを前記対象物までの距離に変換する、
     請求項1又は2に記載の光電センサ。
    The search unit continues searching until the new first end and the new second end are adjacent to each other, and changes gains of a light receiving unit located at the new first end and a light receiving unit located at the new second end. The determination by the determination unit is repeated while allowing the light receiving unit corresponding to the new threshold to search for a reference gain at which light reflected by the object is detected,
    The conversion unit converts the reference threshold and the reference gain into a distance to the object,
    The photoelectric sensor according to claim 1.
  4.  前記変換部は、
     前記基準閾値が基準値以下である場合に第1変換式によって前記基準閾値を前記距離に変換し、
     前記基準閾値が基準値より大きい場合に第2変換式によって前記基準閾値を前記距離に変換する、
     請求項1から3のいずれか一項に記載の光電センサ。
    The conversion unit,
    When the reference threshold is equal to or less than a reference value, the reference threshold is converted to the distance by a first conversion formula,
    When the reference threshold is larger than a reference value, the reference threshold is converted to the distance by a second conversion formula,
    The photoelectric sensor according to claim 1.
  5.  前記判定部によって前記閾値に対応する距離内に前記対象物が存在するか否かを判定する第1モードと、前記判定部、前記探索部及び前記変換部によって前記対象物までの距離を測定する第2モードとを切り替える入力を受け付ける入力部をさらに備える、
     請求項1から4のいずれか一項に記載の光電センサ。
    A first mode in which the determination unit determines whether the object is present within a distance corresponding to the threshold, and a distance to the object is measured by the determination unit, the search unit, and the conversion unit An input unit that receives an input for switching to the second mode;
    The photoelectric sensor according to claim 1.
  6.  前記対象物に光を照射するLEDをさらに備える、
     請求項1から5のいずれか一項に記載の光電センサ。
    Further comprising an LED that irradiates the object with light,
    The photoelectric sensor according to claim 1.
PCT/JP2019/037434 2018-09-26 2019-09-25 Photoelectric sensor WO2020067078A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018180065A JP7157923B2 (en) 2018-09-26 2018-09-26 photoelectric sensor
JP2018-180065 2018-09-26

Publications (1)

Publication Number Publication Date
WO2020067078A1 true WO2020067078A1 (en) 2020-04-02

Family

ID=69953507

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/037434 WO2020067078A1 (en) 2018-09-26 2019-09-25 Photoelectric sensor

Country Status (2)

Country Link
JP (1) JP7157923B2 (en)
WO (1) WO2020067078A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63108219A (en) * 1986-10-27 1988-05-13 Matsushita Electric Works Ltd Optical displacement measuring instrument
JPH1138135A (en) * 1997-07-23 1999-02-12 Denso Corp Distance measuring apparatus
US20100277711A1 (en) * 2009-05-04 2010-11-04 Capella Microsystems, Corp. Optical quantized distance measuring apparatus and method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63108219A (en) * 1986-10-27 1988-05-13 Matsushita Electric Works Ltd Optical displacement measuring instrument
JPH1138135A (en) * 1997-07-23 1999-02-12 Denso Corp Distance measuring apparatus
US20100277711A1 (en) * 2009-05-04 2010-11-04 Capella Microsystems, Corp. Optical quantized distance measuring apparatus and method thereof

Also Published As

Publication number Publication date
JP7157923B2 (en) 2022-10-21
JP2020051840A (en) 2020-04-02

Similar Documents

Publication Publication Date Title
JP2007171177A (en) Transmission of photon energy data by light
US20140355006A1 (en) Measuring device
WO2013180110A1 (en) Device for detecting object
KR101429838B1 (en) Displacement sensor
JP2015159385A (en) Photoelectronic sensor
CN111093490B (en) Signal adjusting method and device and computer storage medium
WO2020067078A1 (en) Photoelectric sensor
US20140166865A1 (en) Absolute encoder
JP2017153068A5 (en)
KR102338977B1 (en) Optical temperature sensor, and controlling method thereof
JP6428779B2 (en) Gas concentration detector
JP2020085477A (en) Optical distance measuring device and optical distance measuring method
JP2019027876A5 (en)
JP6399971B2 (en) Laser radar equipment
US10767979B2 (en) Optical measurement device and optical measurement method
JP2015031606A (en) Spectrometry device and spectrometry method
TW201314185A (en) System for light-emitting diode spectrum measurement
JP2020067373A (en) Photoelectronic sensor
SE0302205D0 (en) Position detecting device
CN117949961A (en) Laser ranging system, method and laser ranging sensor
WO2024101195A1 (en) Three-dimensional shape measurement device and three-dimensional shape measurement method
TWI754182B (en) Optical measuring device and optical measuring method
US20240094592A1 (en) Mach-zehnder interferometer device for wavelength locking
JP7052729B2 (en) Reflection / transmission characteristic measuring device
KR101418862B1 (en) Photo-signal detector circuit

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19867493

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19867493

Country of ref document: EP

Kind code of ref document: A1