Proposal of a Method to Automatically Identify a Sensor as Energy Conversion or Energy Control

There are three output types of sensors, which represent a voltage output type sensor, a current output type sensor, and a resistance change type sensor. If the output type is different, the detection circuit is also different. In the previous study, one unique analog detection circuit that can measure the output of different sensors has been proposed. However, the circuit had a switch and had to be switched manually. Therefore, the user needed to know in advance what type of output the sensor had. In this study, the switch is automatically switched according to the sensor type. We classify sensors into energy conversion type (voltage output type and current output type) and energy control type (resistance change type), and propose a method to automatically identify them. Using three types of sensors, we experimentally investigated whether they could be identified correctly. As a result, it became clear that any sensor can be automatically identified. For this reason, we do not need to know the type of sensor in advance. The switch is automatically switched according to the type of sensor. This makes it possible to operate the sensor correctly simply by connecting the sensor to one circuit.


Introduction
In recent years, many electronic devices such as home appliances have IoT functions. Figure 1 shows the transition and forecast of the number of IoT devices in the world. From this figure, it is expected that IoT devices will continue to spread in the future (1). Most IoTs are equipped with sensors, and the demand for sensors will continue to grow. A sensor is a device that converts physical quantities such as heat, light, temperature, and force into electrical quantities such as voltage and current. There are many types of sensors. Since the output types such as voltage, current, and resistance differ depending on the type of sensor, it is necessary to create a detection circuit suitable for the type. Therefore, there are many devices. In addition, it is necessary to learn how to use it according to the manufacturer and type of equipment. To solve this problem, a circuit that can measure three types of voltage, current, and resistance with one unique detection circuit has been proposed in previous research (2). The sensor can be divided into an energy conversion type sensor (voltage output type sensor and a current output type sensor) that does not require power supply and an energy control type sensor (resistance change type sensor) that requires power supply. In the previous study, we needed to know in advance what type of sensor was used, and we had to manually switch accordingly. Therefore, the correct output was not always obtained just by connecting the sensor.  In order to solve this problem, in this study, we will develop a system that automatically recognizes energy conversion type and energy control type sensors and switches them. Therefore, we propose a method to automatically identify whether the sensor belongs to the energy conversion type sensor or the energy control type sensor. As a result, the user can operate correctly by connecting to one unique detection circuit without knowing the sensor type in advance.

Energy conversion and control type sensor
Sensors are classified into energy conversion type and control type. Thermocouples, photodiodes, phototransistors, etc. convert thermal energy and light energy into electrical energy, as shown in Fig. 2 (a). That is, the energy given as input is converted into another energy. For this reason, this type of sensor is called an energy conversion type sensor. On the other hand, in the thermistor, a change in temperature replaces a change in resistance value. In the CdS cell, the light intensity changes the resistance value. These sensors do not generate voltage or current. It is necessary to supply power to measure the resistance value. When the power supply is connected to the sensor, the current changes as the resistance changes. In other words, it is thought that the resistance value changes depending on the energy of heat and light, and the current from the power supply is controlled accordingly. Therefore, this type of sensor is called an energy control type sensor. (3)

Inverted amplifier circuit
The detection circuit used in this study uses an inverting amplifier circuit composed of operational amplifiers. The operational amplifier is made of an integrated circuit and has an extremely large voltage amplification factor. An ideal operational amplifier has the characteristics that the input impedance is equal to infinity and the output impedance is equal to 0. When used with negative feedback, the inverting input terminal and non-inverting input terminal of the operational amplifier are virtually short-circuited, and the voltage between the two terminals is almost 0 [V] (4). Figure 3 shows the inverting amplifier circuit. The phase of the output voltage VOUT is the inversion of the phase of the input voltage VIN. The amplification factor is determined by the values of R1 and R2. Here, the reference voltage is regarded as VREF.

Analog detection circuit
The circuit used in the previous study uses an inverting amplifier circuit. Regardless of the three types of sensors, the output is converted to voltage. In other words, one unique circuit functions as a detection circuit for all three types of sensors. Figure 4 shows the detection circuit. In the case of the voltage output type sensor and the current output type sensor, which are energy conversion type sensors, the switch on the upper left is connected to VREF. When a resistance change type sensor corresponding to an energy control type sensor is connected to the input terminal, the switch on the upper left is connected to Vcc. Here, VIN, IIN, and RIN in the figure are regarded as sensor inputs. As a result of considering the characteristics of the operational amplifier, the amplification factor of this circuit is determined by R1 and R2, and the equations (1), (2), and (3) are valid. In the case of a voltage output type sensor and a current output type sensor, the relationship between input and output is linear. On the other hand, in the case of a resistance change type sensor, the relationship between input and output is non-linear. The amplification factor is automatically determined by controlling the resistance value of R2 using a microcomputer. From the above, no matter what type of sensor is connected, it is converted into an output with an appropriate amplitude according to the amplitude of the input signal. That is, any of the three types of sensors can be used by this circuit.

Sensor identification
Sensors are classified into two types: energy conversion type and energy control type. Energy conversion does not require powering to obtain output. On the other hand, the energy control type requires a power supply to obtain an output. Therefore, in order to detect two types of sensors with one circuit, it is necessary to automatically identify the type of sensor. Figure 5 shows the circuit at the case of identification. The switch on the upper left is connected to the reference voltage VREF. In this circuit, it is assumed that the resistance value of R2 is large and the amplification factor of the amplifier is very high. At first, it is assumed that the switch is connected to the VREF side. When an energy conversion type sensor (for example, a thermocouple) is connected to the input terminal, the amplification factor is very large as seen from Eq. (1), so even if a small voltage is input, the output changes significantly. When a current output type sensor (for example, a photodiode) is connected to the input terminal, the resistance value of R2 is very large according to Eq. (2), so even if a small current is input, the output changes significantly. That is, when the energy conversion type sensor is connected to the input terminal, the output voltage VOUT becomes a large value. On the other hand, when an energy control type sensor (for example, CdS cell) is connected to the input terminal, the output voltage VOUT in Eq. (4) is VREF because the power supply is VREF. That is, it becomes a constant value. Using this principle, it can be identified as an energy conversion type if the output changes beyond a certain threshold voltage, and as an energy control type if the output is constant at VREF.

Experimental method
In this experiment, the value of the resistor R2 shown in Fig. 5 is regarded as a large value, and the amplification factor of the amplifier is considered to be very large. At first, the switch is connected to VREF, and then the sensor is connected to the input terminal. If the output voltage VOUT exceeds a certain threshold value, it is judged as an energy conversion type sensor, and the switch is used as it is. On the other hand, when the output voltage VOUT is less than the threshold value, it is considered that there is no change in the output, and it is judged as an energy control type sensor. In this case, the switch is reconnected to the VCC side. This makes it possible to use energy-controlled sensors. In this study, the output range of the detection , and R2 is set to 1 [MΩ] in order to increase the amplification factor very much. An identification experiment was performed using the flowchart shown in Fig. 6. At first, the switch is connected to VREF = 2.5 [V]. Then, the output voltage VOUT is measured using a microcomputer. If the difference between VOUT and the reference voltage VREF (2.5 [V]) is equal to or greater than a certain threshold value VTH, the sensor is regarded as an energy conversion type sensor, and the switch remains connected to 2.5 [V]. If the difference between the output voltage VOUT and the reference voltage VREF is less than the threshold VTH, the sensor is regarded as an energy control type sensor, and the switch is changed to VCC = 5 [V].
In this experiment, the threshold voltage VTH was set to 0.5 [V]. The above experiment was performed 100 times to investigate the success rate of identification.

Identification of voltage output type sensor
A K-type thermocouple was used as the voltage output type sensor. This thermocouple has an electromotive force of 0 [V] at about 24.5 [℃]. Figure 7 shows the outline of the experiment. A thermocouple was inserted into the water and the water temperature was changed between 10 [℃] and 50 [℃]. Figure 8 shows the relationship between the output voltage and the temperature. The output voltage in Fig. 8 is the average value of the output voltage values measured 100 times. From this figure, it is confirmed that the output voltage at about 25 [℃] is 2.5 [V], which is equal to the reference voltage VREF. Table 1 shows the temperature vs. sensor identification success rate. Since the input becomes 0 [V] near 25 [℃], identification fails 100 times. As the temperature was raised, the number of failures decreased, and the identification success rate was 100% at 27 [℃] and above. That is, if the temperature of the sensor differs from the air temperature by 2 [℃] or more, the identification rate is 100%. Since the human body temperature is about 36 [℃], it was found that if the sensor is touched by hand, it can be identified 100% correctly and can be identified as an energy conversion type.

Identification of current output type sensor
A photodiode was used as the current output type sensor. Figure 9 shows the outline of the experiment. The illuminance meter and the photodiode were placed in the same position, and a certain light source was moved in sequence, and the illuminance and the output of the photodiode were measured. The illuminance was changed between 0 and 1000 [lux] by changing the distance from the light source. Figure 10 shows the relationship between the output voltage of the photodiode and the illuminance. The output voltage is the average value of 100 measurements. From this figure, when the illuminance is 0 [lux], the input current is 0 [A] and the output voltage is 2.5 [V], which equals the reference voltage VREF. Table 2 shows the identification success rate vs. illuminance. The illuminance increased as the light source approached the illuminometer, and the identification success rate increased. At illuminance of 73 [lux] or higher, the identification success rate was 100%. A value of 73 [lux] corresponds to a dark state in a typical home living room. Considering that an illuminance in the living room is about 200 [lux], if a photodiode is connected to detection circuit in a room, it can be correctly recognized as an energy conversion type sensor.

Identification of resistance change type sensor
A variable resistor was used instead of the resistance change type sensor. Figure 11 shows the outline of the experiment. The output voltage of the detection circuit was measured by changing the value of the variable resistor from 0 to 100 [kΩ]. Figure 12 shows the relationship between resistance and output voltage. The output voltage in this figure is the average value measured 100 times. Regardless of the resistance value of the input, the output voltage is 2.5 [V], which corresponds to the reference voltage VREF. Table 3 shows the relationship between the resistance values and the identification success rate. The identification success rate was 100% for all resistance values. Therefore, it was found that the resistance change type sensor can be identified as the energy control type.

Conclusions
In the previous study, we proposed a system that can detect the output with one unique circuit for all types of voltage output type sensor, current output type sensor, and resistance change type sensor. However, in this detection system, it was necessary to know in advance which type the sensor belonged to, and it was necessary to change the switch according to that type.
In order to solve this problem, in this study, we classified three types of sensors with outputs of voltage, current, and resistance into energy conversion type sensors and energy control type sensors, and proposed an automatic identification method for them. As a result, it was found that the switch was automatically changed according to the sensor type, and any sensor could be used in one unique circuit. Therefore, the user does not need to know which type of sensor is used, and three types of sensors can be operated correctly by simply connecting them to the detection circuit.
As a future work, since only thermocouples, photodiodes, and variable resistors are identified and verified in this study, it is necessary to identify and verify other various types of sensors as well.

References
(1) Ministry of Internal Affairs and Communications，Part 1: 5G Promotes Digital Transformation and the Construction of New Everyday Life， Section 4: 5G will change the structure of the ICT industry， (3)