JP2024041242A - Distance measurement device - Google Patents

Distance measurement device Download PDF

Info

Publication number
JP2024041242A
JP2024041242A JP2022145942A JP2022145942A JP2024041242A JP 2024041242 A JP2024041242 A JP 2024041242A JP 2022145942 A JP2022145942 A JP 2022145942A JP 2022145942 A JP2022145942 A JP 2022145942A JP 2024041242 A JP2024041242 A JP 2024041242A
Authority
JP
Japan
Prior art keywords
distance
value
measuring device
distance measuring
illuminance
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.)
Pending
Application number
JP2022145942A
Other languages
Japanese (ja)
Inventor
匡 小林
Tadashi Kobayashi
志織 東
Shiori AZUMA
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.)
Rohm Co Ltd
Original Assignee
Rohm Co Ltd
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 Rohm Co Ltd filed Critical Rohm Co Ltd
Priority to JP2022145942A priority Critical patent/JP2024041242A/en
Publication of JP2024041242A publication Critical patent/JP2024041242A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Measurement Of Optical Distance (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a distance measurement device capable of improving distance measurement accuracy.
SOLUTION: A distance measurement device (1) includes: a light source (4) configured to emit light towards an object (10); an optical sensor (3) configured to receive reflected light from the object; and a distance detection unit (52) configured to calculate distance to the object based on a light detection value output from the optical sensor and the following calculation formula. Y=aXb, where Y is distance; X is the light detection value; and a and b are coefficients.
SELECTED DRAWING: Figure 1
COPYRIGHT: (C)2024,JPO&INPIT

Description

本開示は、距離測定装置に関する。 The present disclosure relates to a distance measuring device.

従来、対象物との距離を測定する距離測定装置が知られている。例えば水位計は、距離測定装置の一種である。水位計の場合、対象物が液面となり、液面との距離を測定することで液面の高さを測定できる。なお、従来の水位計としては、例えば、いわゆるフロート方式のものが知られている(例えば特許文献1)。 2. Description of the Related Art Distance measuring devices that measure distances to objects have been known. For example, a water level gauge is a type of distance measuring device. In the case of a water level gauge, the target object is the liquid level, and the height of the liquid level can be measured by measuring the distance to the liquid level. Note that, as a conventional water level gauge, for example, a so-called float type one is known (for example, Patent Document 1).

実開平4-24028号公報Utility Model Publication No. 4-24028

昨今、水位計においては、水位の測定精度を向上させることが要望されている。 Recently, there has been a demand for improved water level measurement accuracy in water level gauges.

上記状況に鑑み、本開示は、距離測定精度を向上させることができる距離測定装置を提供することを目的とする。 In view of the above situation, an object of the present disclosure is to provide a distance measuring device that can improve distance measurement accuracy.

例えば、本開示の例示的な距離測定装置は、
光を対象物に向かって照射するように構成される光源と、
前記対象物での反射光を受光するように構成される光センサと、
前記光センサから出力される光検出値と下記算出式に基づき、前記対象物との距離を算出するように構成される距離検出部と、を備える構成としている。
Y=a・X
ただし、Yは距離、Xは光検出値、aおよびbは係数
For example, an exemplary distance measuring device of the present disclosure includes:
a light source configured to emit light toward an object;
an optical sensor configured to receive reflected light from the target object;
The apparatus includes a distance detection section configured to calculate a distance to the target object based on the light detection value output from the optical sensor and the calculation formula below.
Y=a・X b
However, Y is distance, X is light detection value, a and b are coefficients

本開示の距離測定装置によれば、距離測定精度を向上させることができる。 According to the distance measuring device of the present disclosure, distance measurement accuracy can be improved.

図1は、距離測定装置の構成例を示す図である。FIG. 1 is a diagram showing an example of the configuration of a distance measuring device. 図2は、距離測定装置と対象物を示す概略図である。FIG. 2 is a schematic diagram showing a distance measuring device and a target object. 図3は、カラーセンサの構成例を示す図である。FIG. 3 is a diagram showing an example of the configuration of a color sensor. 図4は、実験の結果例を示す図である。FIG. 4 is a diagram showing an example of the results of the experiment. 図5は、図4における実際の距離と推定した距離とをプロットした結果を示す図である。FIG. 5 is a diagram showing the result of plotting the actual distance and estimated distance in FIG. 4. 図6は、変形例に係る距離測定装置の構成を示す図である。FIG. 6 is a diagram showing the configuration of a distance measuring device according to a modified example. 図7は、測定環境変動要因の例とその変動検出手段の例を挙げた表である。FIG. 7 is a table listing examples of measurement environment variation factors and examples of variation detection means. 図8は、測定環境変動の検出処理の一例を示すフローチャートである。FIG. 8 is a flowchart illustrating an example of measurement environment change detection processing. 図9は、キャリブレーション部の第1構成例を示す図である。FIG. 9 is a diagram showing a first configuration example of the calibration section. 図10は、キャリブレーション部の第2構成例を示す図である。FIG. 10 is a diagram showing a second configuration example of the calibration section. 図11は、キャリブレーション部の第3構成例を示す図である。FIG. 11 is a diagram showing a third configuration example of the calibration section. 図12は、トイレタンクの構成例を示す模式図である。FIG. 12 is a schematic diagram showing an example of the configuration of a toilet tank.

以下に、例示的な実施形態について図面を参照して説明する。 Exemplary embodiments will be described below with reference to the drawings.

<1.距離測定装置の構成>
図1は、距離測定装置の構成例を示す図である。図1に示す距離測定装置1は、基板2と、カラーセンサ3と、白色LED4と、制御部5と、スイッチSWと、抵抗Rと、を有している。カラーセンサ3、白色LED4、スイッチSW、および抵抗Rは、基板2に実装される。制御部5は、例えばマイコンである。
<1. Configuration of distance measuring device>
FIG. 1 is a diagram showing an example of the configuration of a distance measuring device. The distance measuring device 1 shown in FIG. 1 includes a substrate 2, a color sensor 3, a white LED 4, a control section 5, a switch SW, and a resistor R. The color sensor 3, white LED 4, switch SW, and resistor R are mounted on the substrate 2. The control unit 5 is, for example, a microcomputer.

白色LED(光源の一例)4は、白色光を発光するチップLEDである。スイッチSWおよび抵抗Rは、電源電圧VCCによって白色LED4に電流が流れる経路に配置される。スイッチSWは、制御部5によりオンオフを制御される。スイッチSWのオンオフにより、白色LED4の発光・消灯を切り替えることができる。抵抗Rは、白色LED4に流れる電流を制限し、白色光の光量を調整する。 The white LED (an example of a light source) 4 is a chip LED that emits white light. The switch SW and the resistor R are arranged on a path through which current flows to the white LED 4 by the power supply voltage VCC. The switch SW is turned on and off by the control unit 5. By turning the switch SW on and off, the white LED 4 can be turned on and off. The resistor R limits the current flowing through the white LED 4 and adjusts the amount of white light.

カラーセンサ(光センサの一例)3は、光の色成分を検出可能なセンサICである。上記色成分は、具体的には、R成分(赤色成分)、G成分(緑色成分)、B成分(青色成分)である。制御部5によりスイッチSWがオン状態とされることで白色LED4は白色光を発光する。図2に示すように、白色LED4は、対象物10に白色光を照射する。カラーセンサ3は、対象物10で反射された光を受光して色成分を検出する。カラーセンサ3は、検出した色成分をデジタルデータとして制御部5へ出力する。カラーセンサ3が出力するデジタルデータは、例えば16ビットデータである。 The color sensor (an example of an optical sensor) 3 is a sensor IC capable of detecting color components of light. Specifically, the color components are an R component (red component), a G component (green component), and a B component (blue component). When the switch SW is turned on by the control unit 5, the white LED 4 emits white light. As shown in FIG. 2, the white LED 4 irradiates the object 10 with white light. The color sensor 3 receives the light reflected by the object 10 and detects the color component. The color sensor 3 outputs the detected color components to the control unit 5 as digital data. The digital data output by the color sensor 3 is, for example, 16-bit data.

制御部5は、ビット変換部51と、距離検出部52と、環境変化検出部53と、通知部54と、キャリブレーション部55と、を有している。 The control unit 5 includes a bit conversion unit 51, a distance detection unit 52, an environmental change detection unit 53, a notification unit 54, and a calibration unit 55.

ビット変換部51は、カラーセンサ3から出力されるデジタルデータを例えば8ビットのデジタルデータに変換する。 The bit conversion unit 51 converts the digital data output from the color sensor 3 into, for example, 8-bit digital data.

距離検出部52は、ビット変換後の色成分検出値と、距離を算出するための算出式5Aに基づき、対象物100・カラーセンサ3間の距離L(図2)を算出する。算出式5Aは、制御部5(距離検出部52)にあらかじめ格納されている。算出式5Aの詳細については、後述する。 The distance detection unit 52 calculates the distance L between the object 100 and the color sensor 3 (FIG. 2) based on the bit-converted color component detection value and the calculation formula 5A for calculating the distance. The calculation formula 5A is stored in advance in the control section 5 (distance detection section 52). The details of calculation formula 5A will be described later.

環境変化検出部53は、距離測定環境の変化を検出する。通知部54は、環境変化検出部53の検出結果に基づいてユーザへの通知を行う。環境変化検出部53および通知部54の詳細については後述する。 The environmental change detection unit 53 detects a change in the distance measurement environment. The notification unit 54 notifies the user based on the detection result of the environmental change detection unit 53. Details of the environmental change detection section 53 and the notification section 54 will be described later.

キャリブレーション部55は、算出式5Aの更新を行うものであり、詳細は後述する。 The calibration unit 55 updates the calculation formula 5A, and the details will be described later.

なお、後述するように、カラーセンサ3は、RGB成分に加えて、IR(赤外線)成分を検出することも可能である。 Note that, as described later, the color sensor 3 can also detect an IR (infrared) component in addition to the RGB components.

<2.カラーセンサの構成>
図3は、カラーセンサ3の構成例を示す図である。図3に示すカラーセンサ3は、受光素子31A,31B,31C,31Dと、ADC(ADコンバータ)32A,32B,32Cと、ロジック回路33と、赤外線遮断フィルタ34と、赤色光透過フィルタ35Aと、緑色光透過フィルタ35Bと、青色光透過フィルタ35Cと、赤外線透過フィルタ35Dと、スイッチ36と、を有している。
<2. Color sensor configuration>
FIG. 3 is a diagram showing an example of the configuration of the color sensor 3. As shown in FIG. The color sensor 3 shown in FIG. 3 includes light receiving elements 31A, 31B, 31C, and 31D, ADCs (AD converters) 32A, 32B, and 32C, a logic circuit 33, an infrared cutoff filter 34, and a red light transmission filter 35A. It has a green light transmission filter 35B, a blue light transmission filter 35C, an infrared transmission filter 35D, and a switch 36.

受光素子31Aは、赤外線遮断フィルタ34および赤色光透過フィルタ35Aを介して入射される赤色光の光量に応じたアナログ電流信号を生成する。すなわち、受光素子31Aは、入力光のR成分(赤色成分)を検出する。 The light receiving element 31A generates an analog current signal according to the amount of red light incident through the infrared cutoff filter 34 and the red light transmission filter 35A. That is, the light receiving element 31A detects the R component (red component) of the input light.

受光素子31Bは、赤外線遮断フィルタ34および緑色光透過フィルタ35Bを介して入射される緑色光の光量に応じたアナログ電流信号を生成する。すなわち、受光素子31Bは、入力光のG成分(緑色成分)を検出する。 The light receiving element 31B generates an analog current signal according to the amount of green light incident through the infrared cutoff filter 34 and the green light transmission filter 35B. That is, the light receiving element 31B detects the G component (green component) of the input light.

受光素子31Cは、赤外線遮断フィルタ34および青色光透過フィルタ35Cを介して入射される青色光の光量に応じたアナログ電流信号を生成する。すなわち、受光素子31Cは、入力光のB成分(青色成分)を検出する。 The light receiving element 31C generates an analog current signal according to the amount of blue light incident through the infrared cutoff filter 34 and the blue light transmission filter 35C. That is, the light receiving element 31C detects the B component (blue component) of the input light.

受光素子31Dは、赤外線透過フィルタ35Dを介して入射される赤外線の光量に応じたアナログ電流信号を生成する。すなわち、受光素子31Dは、入力光のIR成分(赤外線成分)を検出する。 The light receiving element 31D generates an analog current signal according to the amount of infrared light incident through the infrared transmission filter 35D. That is, the light receiving element 31D detects the IR component (infrared component) of the input light.

上記の受光素子31A,31B,31C,31Dとしては、それぞれ、フォトダイオードあるいはフォトトランジスタなどを好適に用いることができる。 As each of the above-mentioned light receiving elements 31A, 31B, 31C, and 31D, a photodiode, a phototransistor, or the like can be suitably used.

ADC32A,32Bは、受光素子31A,31Bからのアナログ電流信号を例えば16ビットのデジタルデータに変換して出力する。また、ADC32Cは、受光素子31C,31Dいずれかからのアナログ電流信号をスイッチ36の切り替えに応じてデジタルデータに変換して出力する。 ADCs 32A and 32B convert the analog current signals from light receiving elements 31A and 31B into, for example, 16-bit digital data and output the converted data. ADC 32C also converts the analog current signal from either light receiving element 31C or 31D into digital data in response to switching of switch 36 and outputs the converted data.

赤外線遮断フィルタ34は、赤色光透過フィルタ35A、緑色光透過フィルタ35B、および、青色光透過フィルタ35Cそれぞれの上流側で、入力光に含まれるIR成分を遮断する。このような赤外線遮断フィルタ34を設けることにより、RGB成分を精度良く検出することができる。 The infrared blocking filter 34 blocks IR components contained in input light on the upstream side of each of the red light transmitting filter 35A, the green light transmitting filter 35B, and the blue light transmitting filter 35C. By providing such an infrared cutoff filter 34, RGB components can be detected with high accuracy.

ロジック回路33は、ADCロジック機能(=ADCの時分割制御機能)、および、ICインターフェイス機能(=データ信号SDAとクロック信号SCLの通信機能)を備えている。ロジック回路33は、ADC32A,32B,32Cから出力されるRGB成分検出信号およびIR成分検出信号としてのデジタルデータをIC通信によって制御部5に送出する。 The logic circuit 33 has an ADC logic function (=ADC time division control function) and an I 2 C interface function (=communication function of data signal SDA and clock signal SCL). The logic circuit 33 sends digital data as RGB component detection signals and IR component detection signals output from the ADCs 32A, 32B, and 32C to the control unit 5 through I 2 C communication.

<3.算出式>
カラーセンサ3(光センサ)の出力値をそのまま距離として採用することはできないため、センサ出力値を距離に変換する算出式が必要である。ここで、本願発明者は、カラーセンサ3と対象物との間の距離を変化させつつ、カラーセンサ3の出力値を取得する実験を実施した。図4に、その実験の結果例を示す。なお、図4では、カラーセンサ3のRGB各成分の検出値のうち、R成分検出値について図示している。
<3. Calculation formula>
Since the output value of the color sensor 3 (optical sensor) cannot be directly used as the distance, a calculation formula for converting the sensor output value into a distance is required. Here, the inventor conducted an experiment in which the output value of the color sensor 3 was obtained while changing the distance between the color sensor 3 and the object. FIG. 4 shows an example of the results of the experiment. Note that FIG. 4 illustrates the R component detection value among the detection values of the RGB components of the color sensor 3.

図4において、縦軸がカラーセンサ3と対象物との間の距離を示し、横軸がカラーセンサ3の出力値(R成分検出値)を示す。図4の破線で示すように、距離を所定のLminから所定のL1まで所定距離刻みで変化させつつ、カラーセンサ3の出力値を取得した。すなわち、図4の破線は、実際の距離(距離の実績値)とカラーセンサ3の出力値との組み合わせの点を線でつないで示したものである。なお、カラーセンサ3の出力値は、16ビットの例としている。距離が長くなるほど、カラーセンサ3の出力値は小さくなる。 In FIG. 4, the vertical axis indicates the distance between the color sensor 3 and the object, and the horizontal axis indicates the output value (R component detection value) of the color sensor 3. As shown by the broken line in FIG. 4, the output value of the color sensor 3 was acquired while changing the distance from a predetermined Lmin to a predetermined L1 in steps of a predetermined distance. That is, the broken line in FIG. 4 is a line connecting the points of the combination of the actual distance (actual distance value) and the output value of the color sensor 3. Note that the output value of the color sensor 3 is assumed to be 16 bits. The longer the distance, the smaller the output value of the color sensor 3 becomes.

実験の結果を受け、本願発明者による鋭意検討の結果、センサ出力値から対象物・センサ間の距離を導出する数式として、下記(1)式を見出した。
Y=a・X (1)
ただし、Yは距離、Xはセンサ出力値、aおよびbは係数
In response to the results of the experiment, the inventor of the present application conducted intensive studies and found the following equation (1) as a mathematical equation for deriving the distance between the object and the sensor from the sensor output value.
Y=a・X b (1)
However, Y is distance, X is sensor output value, a and b are coefficients

センサ出力値と実際の距離との組み合わせの点(X,Y)が2点あれば、(1)式における係数aおよびbを厳密に決定することができる。具体的には、2点(X1,Y1)(X2,Y2)それぞれを(1)式に代入した式の両辺の対数をとって連立方程式を解くことで、係数a,bを決定できる。 If there are two points (X, Y) where the sensor output value and the actual distance are combined, the coefficients a and b in equation (1) can be determined exactly. Specifically, the coefficients a and b can be determined by substituting the two points (X1, Y1) (X2, Y2) into the equation (1) and solving the simultaneous equations by taking the logarithm of both sides of the equation.

図4の例では、(距離,R成分検出値)が(L1,R1)、(L2,R2)の2点P1,P2を選択し、(1)式の係数a,bを導いている。このように決定された(1)式を使用してセンサ出力値から距離を推定した結果を図4の実線で示す。図4では、距離がL3(<L2)以下では距離の推定値が実績値よりも若干高くなって乖離しているが、距離がL3より長い区間では、距離の推定値が実績値と合致していることが分かる。距離がL3より長い区間に実際に使用する測定距離範囲が含まれるのであれば、精度良く距離を推定することが可能である。従って、使用する距離測定範囲が決まっているのであれば、当該距離測定範囲に含まれる2点を選択して(1)式を決定することが望ましい。 In the example of FIG. 4, two points P1 and P2 where (distance, R component detection value) is (L1, R1) and (L2, R2) are selected, and coefficients a and b of equation (1) are derived. The solid line in FIG. 4 shows the result of estimating the distance from the sensor output value using Equation (1) determined in this way. In Figure 4, when the distance is less than L3 (<L2), the estimated distance value becomes slightly higher than the actual value and deviates from it, but in sections where the distance is longer than L3, the estimated distance value does not match the actual value. I can see that If the measurement distance range actually used is included in the section where the distance is longer than L3, it is possible to estimate the distance with high accuracy. Therefore, if the distance measurement range to be used is determined, it is desirable to select two points included in the distance measurement range to determine equation (1).

図5は、図4における実際の距離と推定した距離とをプロットした結果を示す。図5において、実際の距離と推定した距離が同じ値となる点を結ぶ直線からプロットがずれていない場合に推定精度が最もよい。図5に示すように、距離がL3以下では距離の推定値が実績値を上回っているが、距離がL3より長い区間では精度良く距離を推定できる。 FIG. 5 shows the result of plotting the actual distance and estimated distance in FIG. 4. In FIG. 5, the estimation accuracy is best when the plot does not deviate from a straight line connecting points where the actual distance and the estimated distance have the same value. As shown in FIG. 5, when the distance is L3 or less, the estimated value of the distance exceeds the actual value, but in a section where the distance is longer than L3, the distance can be estimated with high accuracy.

本実施形態の距離測定装置1(図1)では、制御部5の距離検出部52が算出式5Aとして、上記(1)式を有している。距離検出部52は、カラーセンサ3の出力値、すなわちビット変換部51の出力に基づいて(1)式を使用して距離を算出することができる。なお、ビット変換部51を設けない場合は、カラーセンサ3の出力値を直接、距離の算出に使用してもよい。 In the distance measuring device 1 (FIG. 1) of this embodiment, the distance detection section 52 of the control section 5 has the above equation (1) as the calculation equation 5A. The distance detection section 52 can calculate the distance using equation (1) based on the output value of the color sensor 3, that is, the output of the bit conversion section 51. Note that if the bit converter 51 is not provided, the output value of the color sensor 3 may be directly used to calculate the distance.

距離検出部52は、算出式5Aとして、R成分検出値、G成分検出値、B成分検出値の少なくともいずれかについての(1)式を有することができる。すなわち、RGB成分のうち1つの成分についての(1)式のみを有してもよいし、RGB成分のうち複数の成分ごとについての(1)式(例えばR成分についての(1)式とG成分についての(1)式)を有してもよい。 The distance detection unit 52 can have equation (1) for at least one of the R component detection value, the G component detection value, and the B component detection value as the calculation formula 5A. That is, it is possible to have only the formula (1) for one component among the RGB components, or the formula (1) for each of multiple components among the RGB components (for example, the formula (1) for the R component and the formula (1) for the G component). (1) regarding the components).

距離検出部52が複数の(1)式を有する場合、後述するようにキャリブレーションにより選択された最適な式を選択して距離の算出を行ってもよい。または、複数の式により算出されたそれぞれの距離の例えば平均値を距離測定値としてもよい。また、カラーセンサ3は、算出式5Aで使用する色成分のみを検出する構成としてもよい。すなわち、カラーセンサ3は、必ずしも3つの色成分を検出する必要はない。 When the distance detection unit 52 has a plurality of equations (1), the optimum equation selected by calibration may be selected to calculate the distance, as will be described later. Alternatively, for example, an average value of distances calculated using a plurality of formulas may be used as the distance measurement value. Further, the color sensor 3 may be configured to detect only the color components used in the calculation formula 5A. That is, the color sensor 3 does not necessarily need to detect three color components.

<4.照度センサを用いた構成>
図6は、本実施形態の変形例に係る距離測定装置1の構成を示す図である。図6に示す構成では、カラーセンサ3の代わりに照度センサ6を設けている。照度センサ6は、対象物10で反射された光の照度を検出する。この場合、距離検出部52は、算出式5Aとして、センサ出力値Xを照度とした(1)式を有する。これにより、距離検出部52は、照度センサ6の出力値に基づいて(1)式を使用して距離を算出することができる。
<4. Configuration using illuminance sensor>
FIG. 6 is a diagram showing the configuration of a distance measuring device 1 according to a modification of this embodiment. In the configuration shown in FIG. 6, an illuminance sensor 6 is provided in place of the color sensor 3. The illuminance sensor 6 detects the illuminance of light reflected by the object 10. In this case, the distance detection unit 52 has equation (1) with the sensor output value X as the illuminance as the calculation equation 5A. Thereby, the distance detection unit 52 can calculate the distance using equation (1) based on the output value of the illumination sensor 6.

<5.測定環境変化の影響>
このように、本実施形態に係る距離測定装置1によれば、(1)式を用いて距離を算出することで、精度の高い距離測定が可能となる。しかしながら、時間が経過すると、(1)式の係数を決定したときの測定環境から測定環境が変化する場合が想定される。測定環境変化の要因としては、例えば、対象物の退色・変色、対象物の反射率の変化、白色LED4の光量変動、外部環境光の侵入などが挙げられる。この場合、現状の係数の(1)式を使用したまま距離を算出すると、距離の推定精度が低下することが想定される。
<5. Effects of measurement environment changes>
In this way, according to the distance measuring device 1 according to the present embodiment, by calculating the distance using equation (1), highly accurate distance measurement is possible. However, as time passes, it is assumed that the measurement environment changes from the measurement environment when the coefficients in equation (1) were determined. Factors that cause changes in the measurement environment include, for example, fading or discoloration of the object, changes in the reflectance of the object, fluctuations in the amount of light from the white LED 4, and intrusion of external environmental light. In this case, if the distance is calculated while using the current coefficient equation (1), it is assumed that the distance estimation accuracy will decrease.

図7は、上述した測定環境変動要因の例とその変動検出手段の例を挙げた表である。例えば、測定環境変動要因が対象物の退色・変色、あるいは対象物の反射率の変化である場合は、色温度を用いてその変動を検出することが可能である。図1のようにカラーセンサ3を用いた距離測定装置1の場合は、色温度に類するパラメータとしてRGB成分検出値の比率、あるいはRGB成分検出値から変換したHLS値などを変動検出に用いることができる。 FIG. 7 is a table listing examples of the measurement environment variation factors described above and examples of variation detection means. For example, if the measurement environment variation factor is fading or discoloration of the object, or a change in reflectance of the object, it is possible to detect the change using color temperature. In the case of a distance measuring device 1 using a color sensor 3 as shown in Fig. 1, it is possible to use a ratio of RGB component detection values or an HLS value converted from an RGB component detection value as a parameter similar to color temperature for variation detection. can.

ここで、測定環境変動の検出処理の一例について、図8に示すフローチャートを参照して説明する。 Here, an example of the measurement environment change detection process will be described with reference to the flowchart shown in FIG. 8.

環境変化検出部53は、前回に(1)式の係数を決定したときの上記色温度に類するパラメータを保持しており、一定時間が経過すると(ステップS1のY)、現在のカラーセンサ3の出力値に基づいて上記色温度に類するパラメータを取得する(ステップS2)。すると、環境変化検出部53は、取得された現在の上記色温度に類するパラメータと上記保持されたパラメータとを比較して(ステップS3)、測定環境変動の有無を判定する(ステップS4)。 The environmental change detection unit 53 retains parameters similar to the color temperature described above when determining the coefficients of equation (1) last time, and when a certain period of time has elapsed (Y in step S1), the current color temperature of the color sensor 3 is stored. A parameter similar to the color temperature is obtained based on the output value (step S2). Then, the environmental change detection unit 53 compares the obtained parameter similar to the current color temperature with the retained parameter (step S3), and determines whether there is a change in the measurement environment (step S4).

測定環境変動があった場合は(ステップS4のY)、通知部54がユーザに(1)式の係数の更新(キャリブレーション)が必要である旨を通知する(ステップS5)。通知は、表示または音声などにより行う。この場合、ユーザ操作を契機としてキャリブレーション部55によりキャリブレーションが実施されると、環境変化検出部53は、そのときの上記色温度に類するパラメータをカラーセンサ3の出力値に基づいて取得し、保持するパラメータを取得されたパラメータに更新する(ステップS6)。ステップS6から一定時間が経過すると、再度ステップS2に移行する。 If there is a change in the measurement environment (Y in step S4), the notification unit 54 notifies the user that the coefficients in equation (1) need to be updated (calibrated) (step S5). The notification is made by display or sound. In this case, when the calibration unit 55 performs calibration triggered by a user operation, the environmental change detection unit 53 acquires a parameter similar to the color temperature at that time based on the output value of the color sensor 3, The held parameters are updated to the acquired parameters (step S6). When a certain period of time has passed since step S6, the process moves to step S2 again.

一方、測定環境変動がなかった場合は(ステップS4のN)、キャリブレーションの通知は行わず、一定時間が経過すると、再度ステップS2に移行する。 On the other hand, if there is no change in the measurement environment (N in step S4), the calibration is not notified, and after a certain period of time has passed, the process returns to step S2.

このように、本実施形態では、測定環境変動を自動的に検出することで、ユーザにキャリブレーションの必要性を通知し、算出式5Aの精度を良好に維持することができる。なお、キャリブレーションのより具体的な説明については、後述する。 In this manner, in this embodiment, by automatically detecting measurement environment fluctuations, it is possible to notify the user of the necessity of calibration and maintain good accuracy of calculation formula 5A. Note that a more specific explanation of the calibration will be given later.

また、図7の表に示すように、測定環境変動の要因が対象物の反射率の変化、あるいは白色LED4の光量変動である場合は、照度を用いてその変動を検出することができる。図1のようにカラーセンサ3を用いた距離測定装置1の場合は、照度に類するパラメータとして、RGB成分のうち1つの成分の検出値のみ(Gのみなど)、あるいは、RGB成分のうち複数の検出値の合計値(R+G+B、R+Gなど)を用いることができる。または、図6のように照度センサ6を用いた距離測定装置1の場合は、照度センサ6の出力値を用いて測定環境変動を検出することができる。そして、このような照度自体、あるいは照度に類するパラメータを用いて先述した図8に示す処理を実施することで、算出式5Aの精度維持が可能となる。 Further, as shown in the table of FIG. 7, if the cause of the measurement environment change is a change in the reflectance of the object or a change in the amount of light from the white LED 4, the change can be detected using illuminance. In the case of a distance measuring device 1 that uses a color sensor 3 as shown in FIG. A total value of detected values (R+G+B, R+G, etc.) can be used. Alternatively, in the case of the distance measuring device 1 using the illuminance sensor 6 as shown in FIG. 6, the output value of the illuminance sensor 6 can be used to detect changes in the measurement environment. Then, by performing the process shown in FIG. 8 described above using the illuminance itself or a parameter similar to the illuminance, it is possible to maintain the accuracy of calculation formula 5A.

また、図7の表に示すように、測定環境変動の要因が外部環境光の侵入である場合は、白色LED4を消灯したときの照度を用いて、その変動を検出することができる。図1のようにカラーセンサ3を用いた距離測定装置1の場合は、制御部5によりスイッチSWをオフとして白色LED4が消灯した状態で、カラーセンサ3の出力値に基づいて照度に類するパラメータを取得する。図1のように照度センサ6を用いた距離測定装置1の場合は、制御部5によりスイッチSWをオフとして白色LED4が消灯した状態で、照度センサ6の出力値に基づいて照度を取得する。そして、このような照度自体、あるいは照度に類するパラメータを用いて先述した図8に示す処理を実施することで、算出式5Aの精度維持が可能となる。 Further, as shown in the table of FIG. 7, if the cause of measurement environment variation is the intrusion of external environmental light, the variation can be detected using the illuminance when the white LED 4 is turned off. In the case of the distance measuring device 1 using the color sensor 3 as shown in FIG. get. In the case of the distance measuring device 1 using the illuminance sensor 6 as shown in FIG. 1, the illuminance is acquired based on the output value of the illuminance sensor 6 with the switch SW turned off by the control unit 5 and the white LED 4 extinguished. Then, by performing the process shown in FIG. 8 described above using the illuminance itself or a parameter similar to the illuminance, it is possible to maintain the accuracy of calculation formula 5A.

白色LED4消灯時の照度(あるいはそれに類するパラメータ)を保持した値と現在値とで比較する場合(例えば図8のステップS3)、例えば下記のようにパラメータの変動具合を定量化することもできる。 When comparing the held value of the illuminance (or a similar parameter) when the white LED 4 is turned off with the current value (for example, step S3 in FIG. 8), it is also possible to quantify the degree of parameter variation, for example, as shown below.

例えば、下記(2)式あるいは(3)式からパラメータの変動具合を算出することができる。
(変動具合)=|(現在の照度値)-(保持された照度値)| (2)
(変動具合)=|1-(現在の照度値)/(保持された照度値)| (3)
For example, the degree of parameter variation can be calculated from equation (2) or equation (3) below.
(Fluctuation level) = | (Current illuminance value) - (Holded illuminance value) | (2)
(Fluctuation level) = | 1 - (current illuminance value) / (held illuminance value) | (3)

上記(2)(3)式ともに現在の照度値と保持された照度値に大きな乖離がない場合には変動具合はほぼ0となり、乖離が生じるほど変動具合の値が大きくなる。従って、算出されるパラメータの変動具合を閾値と比較することで、測定環境変動の有無を判定できる。 In both equations (2) and (3) above, if there is no large discrepancy between the current illuminance value and the held illuminance value, the degree of variation will be approximately 0, and the more the discrepancy occurs, the greater the value of the degree of variation. Therefore, by comparing the degree of change in the calculated parameter with a threshold value, it is possible to determine whether there is a change in the measurement environment.

<6.キャリブレーション>
ここでは、キャリブレーションについて説明する。図9は、制御部5に含まれるキャリブレーション部55の第1構成例を示す図である。図9に示すキャリブレーション部55は、測定実施部551と、算出式更新部552と、を有する。
<6. Calibration>
Here, calibration will be explained. FIG. 9 is a diagram showing a first configuration example of the calibration section 55 included in the control section 5. As shown in FIG. The calibration section 55 shown in FIG. 9 includes a measurement execution section 551 and a calculation formula updating section 552.

測定実施部551は、センサ・対象物間の距離L(図2)を所望の第1距離に設定した状態で、ユーザ操作に基づきカラーセンサ3によるRGB成分検出値の測定を実施する。さらに、測定実施部551は、センサ・対象物間の距離Lを所望の第2距離に設定した状態で、ユーザ操作に基づきカラーセンサ3によるRGB成分検出値の測定を実施する。従って、測定実施部551により、距離の実績値とRGB成分検出値の組み合わせの2点が取得される。算出式更新部552は、取得された2点のデータに基づき、(1)式で表される算出式5Aの係数a,bを更新する。 The measurement execution unit 551 measures the RGB component detection values by the color sensor 3 based on the user's operation while the distance L between the sensor and the target object (FIG. 2) is set to a desired first distance. Furthermore, the measurement execution unit 551 measures the RGB component detection values by the color sensor 3 based on the user's operation, with the distance L between the sensor and the target object set to a desired second distance. Therefore, the measurement execution unit 551 obtains two points: the actual distance value and the combination of the RGB component detection values. The calculation formula updating unit 552 updates coefficients a and b of the calculation formula 5A expressed by equation (1) based on the acquired two-point data.

RGB成分のうち1つの成分についての算出式5Aのみが距離検出部52に保持される場合は(すなわち算出式Aは1つ)、当該1つの成分の検出値に基づき算出式5Aを更新する。RGB成分のうち複数の成分についての算出式5Aが保持される場合は(すなわち算出式Aは複数)、当該複数の成分の検出値に基づき複数の算出式5Aをそれぞれ更新する。 When only the calculation formula 5A for one of the RGB components is held in the distance detection unit 52 (that is, there is one calculation formula A), the calculation formula 5A is updated based on the detected value of the one component. When calculation formulas 5A for a plurality of RGB components are retained (that is, there are multiple calculation formulas A), each of the calculation formulas 5A is updated based on the detected values of the plurality of components.

なお、上記第1構成例は、カラーセンサ3の代わりに照度センサ6を用いた場合にも適用可能である。 Note that the first configuration example described above is also applicable to a case where the illuminance sensor 6 is used instead of the color sensor 3.

図10は、制御部5に含まれるキャリブレーション部55の第2構成例を示す図である。図10に示すキャリブレーション部55は、測定実施部551と算出式更新部552に加えて、距離算出部553と、誤差指標算出部554と、算出式選択部555と、を有する。図10の構成では、RGBのうち複数の成分についての複数の算出式5Aが保持される場合に、複数の算出式5Aを更新しつつ、最適な算出式5Aを選択することができる。 Fig. 10 is a diagram showing a second configuration example of the calibration unit 55 included in the control unit 5. The calibration unit 55 shown in Fig. 10 has a distance calculation unit 553, an error index calculation unit 554, and a calculation formula selection unit 555 in addition to a measurement implementation unit 551 and a calculation formula update unit 552. In the configuration of Fig. 10, when multiple calculation formulas 5A for multiple components of RGB are held, the multiple calculation formulas 5A can be updated and the optimal calculation formula 5A can be selected.

測定実施部551は、算出式5Aの係数更新に用いるための距離の実績値とRGB成分検出値の組み合わせの2点に加えて、別の距離の実績値とRGB成分検出値の組み合わせも取得する。算出式更新部552は、取得された2点のデータに基づき複数の算出式5Aの係数を更新する。 In addition to the two combinations of the actual distance value and the RGB component detected value for use in updating the coefficients of calculation formula 5A, the measurement implementation unit 551 also acquires another combination of the actual distance value and the detected RGB component value. . The calculation formula updating unit 552 updates the coefficients of the plurality of calculation formulas 5A based on the acquired two points of data.

距離算出部553は、上記で更新された各算出式に、上記で取得されたRGB成分検出値を代入して距離を算出する。これにより、距離の実績値と距離の推定値との組み合わせが算出式5Aごとに得られる。誤差指標算出部554は、上記組み合わせに基づき算出式5Aごとの誤差指標を算出する。誤差指標は、例えば、実績値と推定値との誤差の平均値および当該誤差の3σ(σ:標準偏差)である。3σは、誤差ばらつきを示す指標である。 The distance calculation unit 553 calculates the distance by substituting the RGB component detection values obtained above into each calculation formula updated above. As a result, a combination of the actual distance value and the estimated distance value is obtained for each calculation formula 5A. The error index calculation unit 554 calculates an error index for each calculation formula 5A based on the above combination. The error index is, for example, the average value of the error between the actual value and the estimated value and 3σ (σ: standard deviation) of the error. 3σ is an index indicating error variation.

算出式選択部555は、上記で算出された算出式5Aごとの誤差指標に基づき、精度が最も高い算出式5Aを選択する。以降、距離検出部52は、上記選択された算出式5Aを用いて距離の測定を実施する。 The calculation formula selection unit 555 selects the calculation formula 5A with the highest accuracy based on the error index for each calculation formula 5A calculated above. Thereafter, the distance detection unit 52 measures the distance using the selected calculation formula 5A.

図11は、制御部5に含まれるキャリブレーション部55の第3構成例を示す図である。図11に示すキャリブレーション部55は、上記第2構成例との違いとして、誤差指標算出部554の代わりに3σ算出部(ばらつき算出部)556を有する。 FIG. 11 is a diagram showing a third configuration example of the calibration section 55 included in the control section 5. As shown in FIG. The calibration section 55 shown in FIG. 11 differs from the second configuration example described above in that it includes a 3σ calculation section (variation calculation section) 556 instead of the error index calculation section 554.

測定実施部551は、算出式5Aの係数更新に用いるための距離の実績値とRGB成分検出値の組み合わせの2点に加えて、別の距離の実績値とRGB成分検出値の組み合わせも取得する。このとき、同じ距離の実績値に対して複数回(例えば3回)のRGB成分検出が行われる。算出式更新部552は、取得された2点のデータに基づき複数の算出式5Aの係数を更新する。 In addition to the two combinations of the actual distance value and the RGB component detected value for use in updating the coefficients of calculation formula 5A, the measurement implementation unit 551 also acquires another combination of the actual distance value and the detected RGB component value. . At this time, RGB component detection is performed multiple times (for example, three times) for the actual value of the same distance. The calculation formula updating unit 552 updates the coefficients of the plurality of calculation formulas 5A based on the acquired two points of data.

距離算出部553は、上記で更新された各算出式に、上記で取得されたRGB成分検出値を代入して距離を算出する。これにより、距離の実績値と距離の推定値との組み合わせが算出式5Aごとに得られる。このとき、同じ距離の実績値に対して複数の距離の推定値が得られる。3σ算出部556は、同じ距離の実績値ごとの距離の推定値の3σを算出する。算出式選択部555は、上記で算出された3σに基づき、複数の算出式5Aから、ばらつきの最も少ない算出式5Aを選択する。これにより、同じ距離の実績値に対してRGB成分検出値のばらつきが小さい成分の算出式5Aを選択できる。 The distance calculation unit 553 calculates the distance by substituting the RGB component detection values obtained above into each calculation formula updated above. As a result, a combination of the actual distance value and the estimated distance value is obtained for each calculation formula 5A. At this time, a plurality of distance estimates are obtained for the same actual distance value. The 3σ calculation unit 556 calculates 3σ of the estimated distance value for each actual value of the same distance. The calculation formula selection unit 555 selects the calculation formula 5A with the least variation from the plurality of calculation formulas 5A based on the 3σ calculated above. As a result, it is possible to select the calculation formula 5A for components with small variations in detected RGB component values with respect to actual values of the same distance.

<7.機器への適用>
本実施形態に係る距離測定装置1は、様々な対象物10との間の距離の測定に利用可能である。図12は、距離測定装置1を適用機器の一例としてのトイレタンク150に搭載する場合の構成例を模式的に示す。この場合、距離測定装置1は、カラーセンサ3と対象物10としての水100の液面との間の距離L、すなわち、液面高さHを測定する水位測定装置として機能する。距離Lが長いほど、液面高さHは短くなる。
<7. Application to equipment>
The distance measuring device 1 according to this embodiment can be used to measure distances to various objects 10. FIG. 12 schematically shows a configuration example in which the distance measuring device 1 is mounted on a toilet tank 150 as an example of an applicable device. In this case, the distance measuring device 1 functions as a water level measuring device that measures the distance L between the color sensor 3 and the liquid level of the water 100 as the object 10, that is, the liquid level height H. The longer the distance L, the shorter the liquid level height H becomes.

図12に示すように、トイレタンク150は、収容部70を有する。距離測定装置1に含まれる基板2、カラーセンサ3、および白色LED4は、収容部70内部の上方に配置される。収容部70は、水100を収容可能である。収容部70自体の色は、白色である。なお、図12の構成に限らず例えば、白色のシート材を、収容部70の内部の底面上に配置してもよいし、収容部70の透明な底部の下方に配置してもよい。また、収容部70は、トイレタンク以外の用途での容器であってもよい。 As shown in FIG. 12, the toilet tank 150 has a housing section 70. The substrate 2, color sensor 3, and white LED 4 included in the distance measuring device 1 are arranged above inside the housing section 70. The storage section 70 can store water 100. The color of the accommodating portion 70 itself is white. Note that the configuration is not limited to the configuration shown in FIG. 12, and for example, a white sheet material may be placed on the inner bottom surface of the storage section 70, or may be placed below the transparent bottom of the storage section 70. Further, the storage portion 70 may be a container for purposes other than a toilet tank.

<8.その他>
なお、本明細書中に開示されている種々の技術的特徴は、上記実施形態のほか、その技術的創作の主旨を逸脱しない範囲で種々の変更を加えることが可能である。すなわち、上記実施形態は、全ての点で例示であって制限的なものではないと考えられるべきであり、本発明の技術的範囲は、上記実施形態に限定されるものではなく、特許請求の範囲と均等の意味および範囲内に属する全ての変更が含まれると理解されるべきである。
<8. Others>
Note that the various technical features disclosed in this specification can be modified in addition to the embodiments described above without departing from the gist of the technical creation. In other words, the above embodiments should be considered to be illustrative and not restrictive in all respects, and the technical scope of the present invention is not limited to the above embodiments, and the claims Ranges and equivalents should be understood to include all changes falling within the range.

<9.付記>
以上のように、本開示の一態様に係る距離測定装置(1)は、
光を対象物(10)に向かって照射するように構成される光源(4)と、
前記対象物での反射光を受光するように構成される光センサ(3)と、
前記光センサから出力される光検出値と下記算出式に基づき、前記対象物との距離を算出するように構成される距離検出部(52)と、を備える構成としている(第1の構成)。
Y=a・X
ただし、Yは距離、Xは光検出値、aおよびbは係数
<9. Additional notes>
As described above, the distance measuring device (1) according to one aspect of the present disclosure includes:
a light source (4) configured to emit light toward an object (10);
an optical sensor (3) configured to receive reflected light from the target object;
A distance detection unit (52) configured to calculate the distance to the target object based on the light detection value output from the optical sensor and the calculation formula below (first configuration) .
Y=a・X b
However, Y is distance, X is light detection value, a and b are coefficients

また、上記第1の構成において、前記光センサ(3)は、R(赤色)成分検出値、G(緑色)成分検出値、B(青色)成分検出値の少なくともいずれかの前記光検出値を出力するように構成され、
前記距離検出部(52)は、前記R成分検出値、前記G成分検出値、前記B成分検出値の少なくともいずれかについての前記算出式を有する構成としてもよい(第2の構成)。
Further, in the first configuration, the optical sensor (3) detects at least one of the optical detection value of an R (red) component detection value, a G (green) component detection value, and a B (blue) component detection value. is configured to output
The distance detection unit (52) may have a configuration including the calculation formula for at least one of the R component detection value, the G component detection value, and the B component detection value (second configuration).

また、上記第1の構成において、前記光センサ(6)は、照度の前記光検出値を出力するように構成され、前記距離検出部(52)は、前記照度についての前記算出式を有する構成としてもよい(第3の構成)。 Further, in the first configuration, the optical sensor (6) is configured to output the photodetected value of illuminance, and the distance detection unit (52) is configured to have the calculation formula for the illuminance. (third configuration).

また、上記第1から第3のいずれかの構成において、距離測定環境の変化を検出するように構成される環境変化検出部(53)をさらに備え、
前記環境変化検出部は、前回に前記係数が決定されたときの前記距離測定環境の変化を検出するためのパラメータと、現在の前記パラメータとの比較に基づいて前記距離測定環境の有無を検出するように構成されることとしてもよい(第4の構成)。
Further, in any one of the first to third configurations, further comprising an environment change detection section (53) configured to detect a change in the distance measurement environment,
The environment change detection unit detects the presence or absence of the distance measurement environment based on a comparison between a parameter for detecting a change in the distance measurement environment when the coefficient was determined last time and the current parameter. It may be configured as follows (fourth configuration).

また、上記第4の構成において、前記パラメータは、色温度に類するパラメータである構成としてもよい(第5の構成)。 Furthermore, in the fourth configuration, the parameter may be a parameter similar to color temperature (fifth configuration).

また、上記第5の構成において、前記色温度に類するパラメータは、前記光センサ(3)から出力されるRGB検出値に基づいて算出されるパラメータである構成としてもよい(第6の構成)。 Furthermore, in the fifth configuration, the parameter similar to the color temperature may be a parameter calculated based on the RGB detection values output from the optical sensor (3) (sixth configuration).

また、上記第4の構成において、前記パラメータは、照度、あるいは照度に類するパラメータである構成としてもよい(第7の構成)。 In addition, in the fourth configuration, the parameter may be illuminance or a parameter similar to illuminance (seventh configuration).

また、上記第7の構成において、前記照度に類するパラメータは、前記光センサ(3)から出力されるRGB成分のうち1つの成分の検出値であるか、あるいは前記光センサから出力されるRGBのうち複数成分の検出値の合計値である構成としてもよい(第8の構成)。 Further, in the seventh configuration, the parameter similar to the illuminance is a detected value of one of the RGB components output from the optical sensor (3), or a detected value of one of the RGB components output from the optical sensor (3). A configuration may be adopted in which the total value of the detected values of a plurality of components is used (eighth configuration).

また、上記第7または第8の構成において、前記パラメータは、前記光源の消灯時における前記照度、あるいは前記照度に類するパラメータである構成としてもよい(第9の構成)。 Furthermore, in the seventh or eighth configuration, the parameter may be the illuminance when the light source is turned off, or a parameter similar to the illuminance (ninth configuration).

また、上記第7の構成において、前記環境変化検出部(53)は、下記式により算出される前記距離測定環境の変動具合に基づいて前記距離測定環境の有無を検出するように構成されることとしてもよい(第10の構成)。
(変動具合)=|(現在の照度値)-(保持された照度値)|
ただし、前記照度値には、前記照度に類するパラメータの値も含まれる。
In addition, in the above-mentioned seventh configuration, the environmental change detection unit (53) may be configured to detect the presence or absence of the distance measurement environment based on the degree of fluctuation of the distance measurement environment calculated by the following formula (tenth configuration).
(fluctuation level) = | (current illuminance value) - (held illuminance value) |
However, the illuminance value also includes the value of a parameter similar to the illuminance.

また、上記第7の構成において、前記環境変化検出部(53)は、下記式により算出される前記距離測定環境の変動具合に基づいて前記距離測定環境の有無を検出するように構成されることとしてもよい(第11の構成)。
(変動具合)=|1-(現在の照度値)/(保持された照度値)|
ただし、前記照度値には、前記照度に類するパラメータの値も含まれる。
Further, in the seventh configuration, the environment change detection unit (53) is configured to detect the presence or absence of the distance measurement environment based on the degree of change in the distance measurement environment calculated by the following formula. (11th configuration).
(Fluctuation level) = | 1 - (current illuminance value) / (held illuminance value) |
However, the illuminance value also includes values of parameters similar to the illuminance.

また、上記第4から第11のいずれかの構成において、前記距離測定環境の変化があった場合に、ユーザに通知するように構成される通知部(54)をさらに備える構成としてもよい(第12の構成)。 Further, in any one of the fourth to eleventh configurations, a configuration may further include a notification section (54) configured to notify the user when there is a change in the distance measurement environment. 12 configurations).

また、上記第1から第12のいずれかの構成において、距離の実績値と前記光センサの出力値との組み合わせを2点取得するように構成される測定実施部(551)と、
取得された前記2点に基づいて前記算出式を更新するように構成される算出式更新部(552)と、を有するキャリブレーション部(55)をさらに備える構成としてもよい(第13の構成)。
Further, in any one of the first to twelfth configurations, a measurement execution unit (551) configured to obtain two combinations of the actual distance value and the output value of the optical sensor;
A configuration may further include a calculation formula updating unit (552) configured to update the calculation formula based on the two acquired points, and a calibration unit (55) having the calculation formula update unit (552) (13th configuration). .

また、上記第13の構成において、前記算出式更新部(552)により更新された複数の前記算出式のうち最適な前記算出式を選択するように構成される算出式選択部(555)をさらに備える構成としてもよい(第14の構成)。 Further, in the thirteenth configuration, a calculation formula selection unit (555) configured to select the optimal calculation formula from among the plurality of calculation formulas updated by the calculation formula update unit (552). (fourteenth configuration).

また、上記第14の構成において、距離算出部(553)と、誤差指標算出部(554)と、をさらに備え、
前記測定実施部(551)は、前記2点以外の距離の実績値と前記光センサの出力値との組み合わせも取得するように構成され、
前記距離算出部は、更新された各算出式に、取得された前記光センサの出力値を代入して距離を算出するように構成され、
前記誤差指標算出部は、距離の実績値と前記距離算出部により算出された距離との組み合わせに基づき前記複数の算出式ごとの誤差指標を算出するように構成され、
前記算出式選択部(555)は、算出された前記誤差指標に基づき前記算出式を選択するように構成されることとしてもよい(第15の構成)。
Further, in the fourteenth configuration, further comprising a distance calculation section (553) and an error index calculation section (554),
The measurement implementation unit (551) is configured to also obtain a combination of the actual value of the distance other than the two points and the output value of the optical sensor,
The distance calculation unit is configured to calculate the distance by substituting the obtained output value of the optical sensor into each updated calculation formula,
The error index calculation unit is configured to calculate an error index for each of the plurality of calculation formulas based on a combination of the actual distance value and the distance calculated by the distance calculation unit,
The calculation formula selection unit (555) may be configured to select the calculation formula based on the calculated error index (fifteenth configuration).

また、上記第14の構成において、距離算出部(553)と、ばらつき算出部(556)と、をさらに備え、
前記測定実施部(551)は、前記2点以外の距離の実績値と前記光センサの出力値との組み合わせも取得するように、かつ、同じ距離の実績値に対して前記光センサによる複数回の測定を実施するように構成され、
前記距離算出部は、更新された各算出式に、取得された前記光センサの出力値を代入して距離を算出するように構成され、
前記ばらつき算出部は、同じ距離の実績値に対応して算出される距離のばらつきを算出するように構成され、
前記算出式選択部は、算出された前記ばらつきに基づき前記算出式を選択するように構成されることとしてもよい(第16の構成)。
Further, in the fourteenth configuration, further comprising a distance calculation section (553) and a variation calculation section (556),
The measurement execution unit (551) also acquires a combination of the actual value of the distance other than the two points and the output value of the optical sensor, and measures the actual value of the same distance multiple times using the optical sensor. configured to carry out measurements of
The distance calculation unit is configured to calculate the distance by substituting the obtained output value of the optical sensor into each updated calculation formula,
The variation calculation unit is configured to calculate a variation in distances calculated corresponding to actual values of the same distance,
The calculation formula selection unit may be configured to select the calculation formula based on the calculated variation (sixteenth configuration).

また、上記第1から第16のいずれかの構成において、前記対象物(10)は液体であり、液面高さ測定装置として構成される距離測定装置としてもよい(第17の構成)。 In addition, in any of the first to sixteenth configurations, the object (10) may be a liquid, and the distance measuring device may be configured as a liquid level measuring device (seventeenth configuration).

また、本開示の一態様に係る機器(150)は、上記第17の構成の距離測定装置(1)と、液体を収容可能な収容部(70)と、を備える(第18の構成)。 Furthermore, the device (150) according to one aspect of the present disclosure includes the distance measuring device (1) of the seventeenth configuration, and a storage section (70) that can accommodate a liquid (eighteenth configuration).

また、上記第18の構成において、前記収容部(70)の底部の下方あるいは前記収容部の内部の底面上に配置される白色の部材をさらに備え、前記光源(4)は、白色光を発光するように構成されることとしてもよい(第19の構成)。 Further, in the eighteenth configuration, the light source (4) further includes a white member disposed below the bottom of the accommodating part (70) or on the bottom surface inside the accommodating part, and the light source (4) emits white light. (19th configuration).

また、上記第18の構成において、前記収容部(70)の底部は、白色であり、前記光源(4)は、白色光を発光するように構成されることとしてもよい(第20の構成)。 Furthermore, in the eighteenth configuration, the bottom of the housing section (70) may be white, and the light source (4) may be configured to emit white light (twentieth configuration). .

本開示は、例えば、各種用途の距離測定に利用することができる。 The present disclosure can be used, for example, for distance measurement in various applications.

1 距離測定装置
2 基板
3 カラーセンサ
4 白色LED
5 制御部
5A 算出式
6 照度センサ
10 対象物
31A,31B,31C,31D 受光素子
32A,32B,32C ADC
33 ロジック回路
34 赤外線遮断フィルタ
35A 赤色光透過フィルタ
35B 緑色光透過フィルタ
35C 青色光透過フィルタ
35D 赤外線透過フィルタ
36 スイッチ
51 ビット変換部
52 距離検出部
53 環境変化検出部
54 通知部
55 キャリブレーション部
70 収容部
100 水
150 トイレタンク
551 想定実施部
552 算出式更新部
553 距離算出部
554 誤差指標算出部
555 算出式選択部
556 3σ算出部
R 抵抗
SW スイッチ
1 Distance measuring device 2 Board 3 Color sensor 4 White LED
5 Control unit 5A Calculation formula 6 Illuminance sensor 10 Target object 31A, 31B, 31C, 31D Light receiving element 32A, 32B, 32C ADC
33 Logic circuit 34 Infrared cutoff filter 35A Red light transmission filter 35B Green light transmission filter 35C Blue light transmission filter 35D Infrared transmission filter 36 Switch 51 Bit conversion section 52 Distance detection section 53 Environmental change detection section 54 Notification section 55 Calibration section 70 Housing Section 100 Water 150 Toilet tank 551 Assumption implementation section 552 Calculation formula update section 553 Distance calculation section 554 Error index calculation section 555 Calculation formula selection section 556 3σ calculation section R Resistance SW Switch

Claims (20)

光を対象物に向かって照射するように構成される光源と、
前記対象物での反射光を受光するように構成される光センサと、
前記光センサから出力される光検出値と下記算出式に基づき、前記対象物との距離を算出するように構成される距離検出部と、
を備える、距離測定装置。
Y=a・X
ただし、Yは距離、Xは光検出値、aおよびbは係数
a light source configured to emit light toward an object;
an optical sensor configured to receive reflected light from the target object;
a distance detection unit configured to calculate the distance to the target object based on the light detection value output from the optical sensor and the calculation formula below;
A distance measuring device comprising:
Y=a・X b
However, Y is the distance, X is the light detection value, and a and b are the coefficients.
前記光センサは、R(赤色)成分検出値、G(緑色)成分検出値、B(青色)成分検出値の少なくともいずれかの前記光検出値を出力するように構成され、
前記距離検出部は、前記R成分検出値、前記G成分検出値、前記B成分検出値の少なくともいずれかについての前記算出式を有する、請求項1に記載の距離測定装置。
The optical sensor is configured to output the optical detection value of at least one of an R (red) component detection value, a G (green) component detection value, and a B (blue) component detection value,
The distance measuring device according to claim 1, wherein the distance detection section has the calculation formula for at least one of the R component detection value, the G component detection value, and the B component detection value.
前記光センサは、照度の前記光検出値を出力するように構成され、
前記距離検出部は、前記照度についての前記算出式を有する、請求項1に記載の距離測定装置。
The optical sensor is configured to output the optical detection value of illuminance,
The distance measuring device according to claim 1, wherein the distance detection section has the calculation formula for the illuminance.
距離測定環境の変化を検出するように構成される環境変化検出部をさらに備え、
前記環境変化検出部は、前回に前記係数が決定されたときの前記距離測定環境の変化を検出するためのパラメータと、現在の前記パラメータとの比較に基づいて前記距離測定環境の有無を検出するように構成される、請求項1に記載の距離測定装置。
further comprising an environment change detection section configured to detect a change in the distance measurement environment;
The environment change detection unit detects the presence or absence of the distance measurement environment based on a comparison between a parameter for detecting a change in the distance measurement environment when the coefficient was determined last time and the current parameter. The distance measuring device according to claim 1, configured as follows.
前記パラメータは、色温度に類するパラメータである、請求項4に記載の距離測定装置。 The distance measuring device according to claim 4, wherein the parameter is a parameter similar to color temperature. 前記色温度に類するパラメータは、前記光センサから出力されるRGB検出値に基づいて算出されるパラメータである、請求項5に記載の距離測定装置。 The distance measuring device according to claim 5, wherein the parameter similar to the color temperature is a parameter calculated based on RGB detection values output from the optical sensor. 前記パラメータは、照度、あるいは照度に類するパラメータである、請求項4に記載の距離測定装置。 The distance measuring device according to claim 4, wherein the parameter is illuminance or a parameter similar to illuminance. 前記照度に類するパラメータは、前記光センサから出力されるRGB成分のうち1つの成分の検出値であるか、あるいは前記光センサから出力されるRGBのうち複数成分の検出値の合計値である、請求項7に記載の測定装置。 The parameter similar to the illuminance is a detected value of one component among the RGB components output from the optical sensor, or a total value of detected values of multiple components among the RGB components output from the optical sensor. The measuring device according to claim 7. 前記パラメータは、前記光源の消灯時における前記照度、あるいは前記照度に類するパラメータである、請求項7に記載の距離測定装置。 The distance measuring device according to claim 7, wherein the parameter is the illuminance when the light source is turned off, or a parameter similar to the illuminance. 前記環境変化検出部は、下記式により算出される前記距離測定環境の変動具合に基づいて前記距離測定環境の有無を検出するように構成される、請求項7に記載の距離測定装置。
(変動具合)=|(現在の照度値)-(保持された照度値)|
ただし、前記照度値には、前記照度に類するパラメータの値も含まれる。
The distance measuring device according to claim 7, wherein the environmental change detection unit is configured to detect the presence or absence of the distance measuring environment based on the degree of change in the distance measuring environment calculated by the following formula.
(Fluctuation level) = | (Current illuminance value) - (Holded illuminance value) |
However, the illuminance value also includes values of parameters similar to the illuminance.
前記環境変化検出部は、下記式により算出される前記距離測定環境の変動具合に基づいて前記距離測定環境の有無を検出するように構成される、請求項7に記載の距離測定装置。
(変動具合)=|1-(現在の照度値)/(保持された照度値)|
ただし、前記照度値には、前記照度に類するパラメータの値も含まれる。
The distance measuring device according to claim 7, wherein the environmental change detection unit is configured to detect the presence or absence of the distance measuring environment based on the degree of change in the distance measuring environment calculated by the following formula.
(Fluctuation level) = | 1 - (current illuminance value) / (held illuminance value) |
However, the illuminance value also includes values of parameters similar to the illuminance.
前記距離測定環境の変化があった場合に、ユーザに通知するように構成される通知部をさらに備える、請求項4に記載の距離測定装置。 The distance measuring device according to claim 4, further comprising a notification unit configured to notify a user when there is a change in the distance measuring environment. 距離の実績値と前記光センサの出力値との組み合わせを2点取得するように構成される測定実施部と、
取得された前記2点に基づいて前記算出式を更新するように構成される算出式更新部と、
を有するキャリブレーション部をさらに備える、請求項1に記載の距離測定装置。
a measurement execution unit configured to acquire two combinations of an actual distance value and an output value of the optical sensor;
a calculation formula update unit configured to update the calculation formula based on the two acquired points;
The distance measuring device according to claim 1 , further comprising a calibration unit having:
前記算出式更新部により更新された複数の前記算出式のうち最適な前記算出式を選択するように構成される算出式選択部をさらに備える、請求項13に記載の距離測定装置。 The distance measuring device according to claim 13, further comprising a calculation formula selection unit configured to select the optimal calculation formula from among the multiple calculation formulas updated by the calculation formula update unit. 距離算出部と、誤差指標算出部と、をさらに備え、
前記測定実施部は、前記2点以外の距離の実績値と前記光センサの出力値との組み合わせも取得するように構成され、
前記距離算出部は、更新された各算出式に、取得された前記光センサの出力値を代入して距離を算出するように構成され、
前記誤差指標算出部は、距離の実績値と前記距離算出部により算出された距離との組み合わせに基づき前記複数の算出式ごとの誤差指標を算出するように構成され、
前記算出式選択部は、算出された前記誤差指標に基づき前記算出式を選択するように構成される、請求項14に記載の距離測定装置。
further comprising a distance calculation section and an error index calculation section,
The measurement implementation unit is configured to also obtain a combination of the actual value of the distance other than the two points and the output value of the optical sensor,
The distance calculation unit is configured to calculate the distance by substituting the obtained output value of the optical sensor into each updated calculation formula,
The error index calculation unit is configured to calculate an error index for each of the plurality of calculation formulas based on a combination of the actual distance value and the distance calculated by the distance calculation unit,
The distance measuring device according to claim 14, wherein the calculation formula selection unit is configured to select the calculation formula based on the calculated error index.
距離算出部と、ばらつき算出部と、をさらに備え、
前記測定実施部は、前記2点以外の距離の実績値と前記光センサの出力値との組み合わせも取得するように、かつ、同じ距離の実績値に対して前記光センサによる複数回の測定を実施するように構成され、
前記距離算出部は、更新された各算出式に、取得された前記光センサの出力値を代入して距離を算出するように構成され、
前記ばらつき算出部は、同じ距離の実績値に対応して算出される距離のばらつきを算出するように構成され、
前記算出式選択部は、算出された前記ばらつきに基づき前記算出式を選択するように構成される、請求項14に記載の距離測定装置。
The apparatus further includes a distance calculation unit and a variation calculation unit,
the measurement execution unit is configured to acquire combinations of actual distance values other than the two points and output values of the optical sensor, and to execute measurements of the same distance actual values multiple times using the optical sensor;
the distance calculation unit is configured to calculate a distance by substituting the acquired output value of the optical sensor into each updated calculation formula;
The variation calculation unit is configured to calculate a variation of distances calculated corresponding to actual values of the same distance,
The distance measuring device according to claim 14 , wherein the calculation formula selection unit is configured to select the calculation formula based on the calculated variation.
前記対象物は液体であり、液面高さ測定装置として構成される、請求項1から請求項16のいずれか1項に記載の距離測定装置。 The distance measuring device according to any one of claims 1 to 16, wherein the object is a liquid, and the distance measuring device is configured as a liquid level height measuring device. 請求項17に記載の距離測定装置と、液体を収容可能な収容部と、を備える機器。 An apparatus comprising the distance measuring device according to claim 17 and a housing section capable of housing a liquid. 前記収容部の底部の下方あるいは前記収容部の内部の底面上に配置される白色の部材をさらに備え、前記光源は、白色光を発光するように構成される、請求項18に記載の機器。 The device according to claim 18, further comprising a white member disposed below a bottom of the housing or on a bottom surface inside the housing, and wherein the light source is configured to emit white light. 前記収容部の底部は、白色であり、前記光源は、白色光を発光するように構成される、請求項18に記載の機器。 19. The device of claim 18, wherein the bottom of the housing is white and the light source is configured to emit white light.
JP2022145942A 2022-09-14 2022-09-14 Distance measurement device Pending JP2024041242A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022145942A JP2024041242A (en) 2022-09-14 2022-09-14 Distance measurement device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022145942A JP2024041242A (en) 2022-09-14 2022-09-14 Distance measurement device

Publications (1)

Publication Number Publication Date
JP2024041242A true JP2024041242A (en) 2024-03-27

Family

ID=90417148

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022145942A Pending JP2024041242A (en) 2022-09-14 2022-09-14 Distance measurement device

Country Status (1)

Country Link
JP (1) JP2024041242A (en)

Similar Documents

Publication Publication Date Title
KR100622959B1 (en) A separate type photoelectric switch
US6891625B2 (en) Optical reflection sensor
JP6412669B2 (en) Light emitting / receiving device and compensation method for light emitting / receiving device
JP2024041242A (en) Distance measurement device
JP4575861B2 (en) Detector with temperature compensation function
TWI576596B (en) Electric capacity measurement apparatus with temperature compensation and temperature compensation method thereof
JP2006300748A (en) Device for measuring temperature distribution
US20050190370A1 (en) Turbidity sensing system with reduced temperature effects
CN107664527B (en) Liquid level detection method and liquid level detection device
KR102409396B1 (en) Gas detector and gas detector calibration method
JP2014081275A (en) Correction method for spectral sensitivity characteristic of light metering device and light metering device
WO2008077015A2 (en) Contamination degree measurement apparatus and contamination degree measurement method
KR101229571B1 (en) Sensor callibration system and method
WO2022255342A1 (en) Liquid surface height detecting device
JPH0875413A (en) Distance measuring device
JP2010216854A (en) Film thickness measuring apparatus
US20120126100A1 (en) Photoelectric Switch
JP5139049B2 (en) Photoelectric sensor
JP5061319B2 (en) Optical phase difference detection type object detection sensor
WO2023189428A1 (en) Color discernment device, color discernment system, and image forming device
WO2016203902A1 (en) Optical characteristic measuring apparatus and setting method for optical characteristic measuring apparatus
US20050271398A1 (en) Photo-detector arrangement and process for the calibration thereof
JP2009145071A (en) Optical characteristic measuring instrument and optical characteristic measuring method
KR100827399B1 (en) Robust signal correction device of analog input measured under changing temperature condition and method thereof
TW201823695A (en) Microelectromechanical apparatus having a measuring range selector