Temperature Compensation Methods of Nondispersive Infrared CO2 Gas Sensor with Dual Ellipsoidal Optical Waveguide

To measure CO2 gas concentration, a nondispersive infrared (NDIR) gas sensor is fabricated by implementing a thermopile detector that includes an application-specific integrated circuit (ASIC) chip for signal conditioning, a temperature sensor, and a unique dual ellipsoid optical waveguide. To characterize its temperature dependence, the sensor module is tested with varying temperature ranging from 253 to 333 K at different CO2 gas concentration levels. In the absence of CO2 gas (0 ppm), as ambient temperature increases, the output voltages of the CO2 and reference sensors show a linear dependence: the output voltage-to-temperature ratios are 13.4 and 8.4 mV/K, respectively. The temperature sensor’s output also indicates good linearity as a function of temperature, and ambient temperature can be expressed as T(V) = 216.03 + 67.087VT. The concentration-dependent property of the sensor module is expressed using three parameters, each of which exhibits temperature dependence only. By combining the temperature and concentration dependences, a general equation is derived by which the CO2 gas concentration is estimated at different temperatures with an average error of 1.544% and a standard deviation of 4.799% from 253 to 333 K.


Introduction
Following the invention and commercialization of semiconductor gas sensors five decades ago, considerable amount of research was undertaken to improve their performance. (1,2) The three types of gas sensors that have been commonly used in domestic, industrial, and automotive areas are semiconductor-, catalytic-, and electrochemical cell-based units. (3)(4)(5) Because the principles of the abovementioned sensors are mainly based on the chemical reactions between the target gas and the surface of the sensor, they are heated to activate the surfaces of the sensors to improve the sensitivity of the sensor itself. However, devices working on this principle show poor selectivity amongst other ambient gases (mainly water vapor, hydrocarbons, and carbon monoxide) because the surfaces are exposed directly to the ambient environment, (6,7) whereas nondispersive infrared (NDIR) sensors are considered to be specific to those species alone. (8) Although there are some technical methods for improving the selectivity of nonoptical sensors, it is cumbersome to discriminate the target gas from other ambient gases in practical applications.
Approximately one decade ago, the NDIR principle was applied to sensors for home and office automation applications with silicon thermopiles or passive infrared detectors. (9,10) Because these use infrared (IR) filters to detect temperature and gases, they can enhance the selectivity that hinders the improvement of gas sensors. Furthermore, gas sensors that use the NDIR principle alleviate the contamination of the sensors and increase the sensitivity with signal conditioning, reliable operating period, and accuracy without the deterioration of the selectivity. Therefore, there is a shift from ceramic gas sensors to optical gas sensors in some specific gas sensor applications. Research in this area has concentrated on the following requirements: (i) the need for an effective waveguide, (ii) maximizing the path length to enhance sensitivity, and (iii) maximizing the proportion of light coupled through the waveguide to the detector to overcome the detector noise limit. (11) Because NDIR gas sensors are associated with the optical absorption principle with a narrow bandpass filter, the signal conditioning of the voltage output from IR detectors plays a vital role in measuring the target gas. Generally, the output voltages of IR detectors that receive the focused radiated energy through a waveguide are trivial (up to 600 µV); therefore, amplification is important for further signal conditioning, manipulation, and analysis. When an external amplification circuit is used for this purpose, it amplifies not only the desired signal but also the unwanted noise signal coming from the surrounding environment. (12) Owing to these noises, the accuracy in detecting the target gas and the resolution of the NDIR gas sensor decrease markedly. To overcome this critical issue, application-specific integrated circuit (ASIC)-implemented thermopile IR detectors are applied in the sensor module, in which the ASIC chip serves as a built-in amplifier, which is not affected by the ambient noises and can produce true amplified output voltages.
In this research paper, an NDIR sensor module is presented, which consists of a unique dual ellipsoidal optical waveguide, a blackbody IR source, and ASIC-implemented thermopile IR detectors to increase signal-to-noise ratio. The elliptical waveguide with inside mirrored surfaces is designed for the detectors to achieve lossless and intensified radiated energy. Therefore, by analyzing the temperature dependence of the output signals of the sensor module, an effective means of temperature compensation has been proposed to calculate the CO 2 gas concentration up to 2000 ppm at any temperature ranging from 253 to 333 K.

Theoretical background and optical simulation
When a monochromatic light beam is passed through an absorbing medium such as gas, the Beer-Lambert law gives the amount of transmitted light energy (I d ) using the following equation: (13) where I 0 is the incident light (W/m 2 ) on the gas cell, α is the absorption coefficient of the molecules of the sample, l is the cell's optical path length (m), and c is the target gas concentration (ppm). The typical filter characteristics for CO 2 measurement using two IR detectors were described previously, (14) alongside the gas absorption spectrum, with the measurement whereby the chosen CO 2 and reference sensors do not overlap significantly with the absorption bands of other gas species present in the application.
In an elliptical waveguide structure, when light radiates from one focal point, it reflects on the inside mirrored surfaces of the elliptical structure until it reaches the other focal point. If the mirrored surfaces reflect whole rays that are directed perfectly at one focal point, whole radiated energy will reach the other focal point except for the energy that might be absorbed during the reflection from the mirrored surfaces. (15) If the characteristics of the target gas are well known, the transmitted energy will be determined by the gas concentration and the optical path length as described in Eq. (1). When the focused bundle of the radiation beam is considered in the waveguide, the output voltage of the CO 2 sensor (V CO 2 ) can be described using Eq. (2) as a function of temperature and concentration: (16) where V 0 is the voltage caused by the ambient thermal radiation that exists between the upper and lower cutoff wavelengths (except the central wavelength of the target gas) of the narrow bandpass filter. Here, a represents the difference in output voltage when there is no CO 2 gas (0 ppm) and when a significantly high concentration of CO 2 exists (more than 5000 ppm); at a specific temperature, b is a constant related to the optical path length and the absorption coefficient of the target gas; and c is the CO 2 gas concentration.
The performance of an NDIR gas sensor greatly depends on two factors: the optical path length and the diameter of the incident rays. (13) A larger optical path length can be achieved using a long cylindrical structure or by multiple reflections of a light beam within a small waveguide, (17,18) which increases the sensitivity of the NDIR gas sensor. The focusing of light can be satisfied using an optical lens (19) or a curved mirror structure, (13) which enhances the signal-to-noise ratio according to the increase in the output voltage of the sensor. However, the use of an optical lens will increase the number of manufacturing steps and the cost of materials. Therefore, a unique optical waveguide is implemented with two ellipses in which focused radiated energy is received by the detectors without using any lens, as shown in Fig. 1. Generally, when light is emitted from one focal point in an ellipse, it reflects once at the inside of the elliptical mirror surface and then reaches to the other focal point. If the mirror is a perfect elliptical reflector, the emitted light energy can be focused at the other focal point.
Thus, the energy density can be highly increased, and enlarged output voltage is found from the IR detectors, which might enhance the signal-to-noise ratio because it generates high output voltage. Considering this fundamental principle, two elliptical structures are used for design purposes with an identical focus point for placing an IR source and the other two foci for locating two thermopile IR detectors. The ray emitted from the blackbody IR source (at the common foci, point A in Fig. 1) is reflected from the mirrored surfaces and finally irradiated onto the detector area (at the left side, points B and C in Fig. 1) with a diameter of less than 2 mm, (15) as seen in Fig. 2. The lengths of the major and minor axes in the ellipses are 100 and 40 mm, respectively. The properties of the IR source, detector, and mirrored surfaces are assumed to be as follows: the IR source type is a Lambertian disc with 5000 rays and 10 W at a wavelength of 4.26 µm, the detector absorbs the incident rays perfectly, and the reflectance of the mirror surfaces is 0.95.

Sensor fabrication and experiments
On the basis of the simulation, a prototype CO 2 sensor that has two IR detectors (CO 2 sensor: HIS A21 F4.26, Reference IR: HIS A21 F3.91, Heimann GMBH, Germany) and one blackbody source (IR-50, Hawkeyes Inc., USA) has been fabricated, as shown in Fig. 3(a). The power supply unit consisted of two parts: analog voltage and digital voltage supply circuits in order to alleviate the voltage fluctuation during the high current driving. These output voltages fed into the related components positioned in the printed circuit board. The microcontroller unit generated digital signals; one was to trigger the pulse for the infrared light radiation, the other was to transmit the averaged output voltages and also the calculated CO 2 gas concentration. Two analog output signals of IR detectors were converted into digital signals using an analog-to-digital converter in order to average the output signals and also to calculate the CO 2 gas concentrations. The overall block diagram is depicted in Fig. 3(b).
After implementing the basic algorithm in the microcontroller unit (MCU), the sensor was installed in the gas measurement system as described in previous articles. (12,13) The temperature of the gas measurement system was then changed from 253 to 333 K in steps of 20 K. After stabilizing the temperature and the initial CO 2 gas concentration, the dry CO 2 gas was injected into the gas chamber by manipulating the mass flow controller. The prototype sensor downloaded the information over an RS485 link into the computer to analyze the outputs of the sensors-carbon dioxide (with a center wavelength of 4.26 um), reference IR (with a center wavelength of 3.91 um), and temperature sensors.

Results and Discussion
In the absence of CO 2 gas (0 ppm) in the chamber, as the temperature is increased from 253 to 333 K, the output voltages of the CO 2 and reference sensors increase linearly as shown in Fig.  4. This phenomenon can be explained from blackbody radiation and central wavelength shifting of the narrow bandpass filters. The central wavelengths of the bandpass filters are 4.26 and 3.91 µm for the CO 2 and reference sensors, respectively. When the temperature is varied, owing to the change in the refractive index of the optical materials and the thickness of the layers inside the filter, the central wavelength shifts significantly. (20) If there is an increase in temperature, the central wavelength shifts toward a high wavelength, which allows the thermopile detector to receive an IR beam with more intensified thermal energy.
Because the output voltage of a thermopile detector is proportional to the received radiated energy, with increasing ambient temperature, the output voltages of the CO 2 and reference sensors were increased linearly as can be seen in Fig. 4 and follow the equations given below: To characterize the output voltage of the CO 2 thermopile detector, it is essential to be familiar with its response as the target gas concentration changes. Although a narrow bandpass filter is used to obtain the IR rays of 4.26 µm, the filter has lower and higher cut-off wavelengths. Because of this, whereas CO 2 gas does not exist in the ambient, the bandpass filter still passes thermal energy coming from the IR source, which is present between the lower and higher cut-off wavelengths of the filter as described in Eq. (5). Because thermopile detectors always provide an output voltage proportional to the received thermal energy, an offset voltage is always found, which depends on the temperature but is independent of the concentration of the target gas. Therefore, the output voltage of the thermopile detector has two portions: one that comes only from the IR source, which is temperature dependent, but irrelevant to the absorption of CO 2 gas, and the other from the absorption of CO 2 gas near 4.26 µm, which depends on the temperature and concentration of the gas [(as expressed by Eq. (6)].
Here, I BPF is the received radiated thermal energy from the IR source between the lower cutoff wavelength and the higher cut-off wavelength, and I Gas is the energy that contains the CO 2 absorption wavelength of the bandpass filter (at this wavelength, the IR optical absorption of CO 2 is highest), and it is obvious that as the concentration increases, owing to the higher absorption of the CO 2 gas, the received intensity decreases exponentially. Because of the proportional relationship between the output voltage and the radiated energy, the thermopile output voltage of the CO 2 sensor

249
(V CO 2 ) also shows an exponentially decaying trend, as shown in Fig. 5 and described by Eq. (6).
Here, V 0 is the voltage caused by the thermal radiation that exists between the upper and lower cutoff wavelengths of the narrow bandpass filter. The difference in output voltages when there is no CO 2 gas (0 ppm) and when a significantly high concentration of CO 2 exists is represented by a, c expresses the CO 2 gas concentration, and at a specific temperature, b signifies a constant related to the optical path length and the absorption coefficient of the target gas at a certain temperature. As mentioned earlier, the output voltage of a CO 2 sensor depends on two variables: temperature and CO 2 gas concentration; in Fig. 6, the trend of output voltage is clearly depicted, whereas both the temperature and concentration are simultaneously changed. It can also be assumed from the figure that if the output voltage of the CO 2 sensor and the ambient temperature are accurately known, the existing CO 2 gas concentration can be precisely predicted as a multivariable function of output voltage and temperature.
Because the offset voltage (output voltage when there is no CO 2 gas) is the combination of V 0 and a, if these two variables can be determined as functions of temperature and the output voltage trend of the respective sensor is well known, the CO 2 gas concentration can be measured at any temperature. After careful analysis of the experimental data, it is evident that the temperature dependences of both V 0 and a are linear, as shown in Fig. 7.
From the above mathematical expressions, it is evident that the determination of temperature at the time of CO 2 gas concentration measurement is crucial. Because the thermopile detector has a built-in temperature sensor and its output voltage (V T ) linearly increases with increasing temperature, the following equation can be generated from  During the temperature measurement, the deviations of the output voltage of the temperature sensor were smaller than 4 mV, so the temperature accuracy was less than ±0.3 K with Eq. (7).
For the calculation of CO 2 gas concentration (c) at a specific time, Eq. (6) can be modified as where b signifies the decay rate of the trend, which is also temperature dependent.
Because V CO 2 is found from the CO 2 sensor's output voltage, at the time of calculation, V 0 , a, and b can be determined from Figs. 6, 7, and 8, respectively, and by using Eq. (7), which depends on the temperature given by the temperature sensor's output voltage. For the mathematical calculation of the concentration, a microcontroller unit (MCU) is deployed, which estimates the value using the expansion of natural logarithmic function found from Eq. (8). The percentage of the error of the concentration estimation is given below Table 1. Figure 9 shows the accuracy with which the sensor module can measure the CO 2 gas concentration from 0 to 2000 ppm. Because the trend of the estimated CO 2 concentration shows a very good linearity with respect to the actual concentration when the measurement range of temperature is 80 K (from 253 to 333K), it can be said that effect of the temperature has been   accurately compensated throughout the measurement process. From Table 1, which clearly represents the percentage of error of the estimation at different temperatures, it is conclusive that the CO 2 gas concentration can be determined in the mentioned range of temperature with an approximate maximum error of 5%.

Conclusions
To develop a novel expression for determining CO 2 concentration while varying both temperature and concentration, the sensor module was tested precisely in a chamber to analyze its temperature and concentration dependences. The main challenge was to combine these two properties in a single expression and calculate it using MCU. However, with the help of Tailor's expansion, the CO 2 gas concentration was accurately calculated through the MCU. Although there were some errors considering actual concentration, these might include human or MCU calculation error. The general expression that has been developed for measuring the concentration will not be the same for other NDIR CO 2 gas sensors, but any research group can follow the protocol to generate the equation for determining the concentration for that particular sensor. Because the effect of temperature is compensated with a substantial variation of temperature, the sensor module can be used either indoors or outdoors efficiently to detect small amounts of CO 2 gas (with a maximum error of 5%).