Classification of Two Volatiles Using an eNose Composed by an Array of 16 Single-Type Miniature Micro-Machined Metal-Oxide Gas Sensors

The artificial replication of an olfactory system is currently an open problem. The development of a portable and low-cost artificial olfactory system, also called electronic nose or eNose, is usually based on the use of an array of different gas sensors types, sensitive to different target gases. Low-cost Metal-Oxide semiconductor (MOX) gas sensors are widely used in such arrays. MOX sensors are based on a thin layer of silicon oxide with embedded heaters that can operate at different temperature set points, which usually have the disadvantages of different volatile sensitivity in each individual sensor unit and also different crossed sensitivity to different volatiles (unspecificity). This paper presents and eNose composed by an array of 16 low-cost BME680 digital miniature sensors embedding a miniature MOX gas sensor proposed to unspecifically evaluate air quality. In this paper, the inherent variability and unspecificity that must be expected from the 16 embedded MOX gas sensors, combined with signal processing, are exploited to classify two target volatiles: ethanol and acetone. The proposed eNose reads the resistance of the sensing layer of the 16 embedded MOX gas sensors, applies PCA for dimensional reduction and k-NN for classification. The validation results have shown an instantaneous classification success higher than 94% two days after the calibration and higher than 70% two weeks after, so the majority classification of a sequence of measures has been always successful in laboratory conditions. These first validation results and the low-power consumption of the eNose (0.9 W) enables its future improvement and its use in portable and battery-operated applications.


Introduction
Odor management has many practical applications for monitoring and quality supervision [1,2]. The measurement of the odor or aroma can be done with a panel of trained expert human operators, with a technical measurement of the individual chemical compounds or with an artificial olfactory system also called electronic nose, e-nose, or eNose.
Covington et al. [3] defined an eNose as an array of sensors that vary their selectivity according to the classes of chemical species analyzed. In general, this array is expected to include different types of sensors, which should have high sensitivity to a specific gas, rapid response time, a return to baseline levels, and high resistance to variable environmental conditions. However, the reality is that a sensor designed to have high sensitivity to a specific gas is also capable of detecting a variety of different gas and volatile compounds [4]. The effect of this cross-sensitivity is that there is no significant specificity in response to any gas although the appropriate combination of an array of sensors can be employed to maximize the number of relevant gases that can be incorporated into their response.
According to Wilson [5], an eNose can be used (1) to identify the source (plant, animal, or derived product) that produced a unique mixture of organic compounds (not the individual compounds) or (2) to assess one or more chemical, biological or physical characteristics disadvantage of any MOX gas sensor is its different volatile sensitivity and its different crossed sensitivity. These differences can become a very big problem for an application using only one MOX gas sensor. However, in this paper, the inherent variability and unspecificity of single-type MOX gas sensors, combined with signal processing, have been applied to create an eNose optimized to classify two target volatiles: ethanol and acetone. The proposed eNose reads the resistance of the sensing layer of the 16 embedded MOX gas sensors, applies PCA for dimensional reduction and k-NN for classification. The validation results have shown successful volatile classification of the two target volatiles in laboratory conditions. Table 1 presents a short reference list of scientific papers firstly presenting a specific eNose design based on an array of MOX gas sensors. As a summary, the majority of the papers listed in Table 1 propose the conventional development of an eNose based on an array of different sensor-types in which each type is sensitive to a specific gas: the number of MOX gas-sensors reported is between 2 and 96 with an average value of 15.6 and the sensor-types between 1 and 16 with an average value of 5.5.

Background
As far as we now, Persaud et al. [25] presented in 1982 the first eNose using three MOX gas sensors with different sensitivities. The device analyzed odor quality and classified the types of odorants, including mixtures of odorous volatile compounds and single gases. This paper demonstrated that odor discrimination can be achieved without using highly specific receptors. The next paper highlighted in Table 1 was proposed in 1998 by Marco et al. [26] that proposed gas classification based on a self-organized map (SOM) [27] to identify different gases using an array of 6 MOX gas sensors. In close relationship with the objectives of this paper, in 2002 Arnold et al. [28] developed an array of 38 identical custom MOX gas sensors operating at different heating temperatures for air quality monitoring and early fire detection. This proposal was probably the first that demonstrated that an eNose created with a matrix of single-type MOX gas sensors can detect different volatiles. However, this proposal was based on custom MOX gas sensors that required a considerable amount of power to operate.
In the following decades different authors proposed a wide number of implementations combining different number and types of MOX gas sensors and applying different classification strategies. As far as we know, the next eNose reference paper using the same-type of MOX gas sensor was proposed in 2012 by Bennets [29], who used a matrix of 6 MOX gas sensors to detect and identify two gases. Lately, in 2014 Marco et al. [30] proposed the biggest eNose application combining 96 MOX gas sensors of 12 model types (with 8 units per sensor type) with 4 huge arrays of 4096 non-MOX resistive chemical gas sensors, that can be increased up to 65,536 gas sensors (16 arrays). Lately, in 2018 Burgués et al. [31,32] proposed two eNoses based on 12 and 7 MOX gas sensors of the same type for evaluating odor concentration. Table 1 also presents the power spent by the eNose proposals. In general, this information is not described in the related papers as it was not considered relevant. This information was provided by Rossi et al. [33], but for the case of using a minimum array with 2 MOX gas sensors; by Palacín et al. [34], who used an eNose with 16 MOX gas sensors of 4 different sensor types with a total power consumption of 12.0 W, which was assumable for a medium size mobile robot application; and by Burgués [35], who proposed a portable eNose with 16 MOX gas sensors of 4 different types carried in an unmanned aerial vehicle (UAV) operating as a drone and using an operation strategy that reduced the average power consumption to 1.0 W. Finally, the power consumption of the custom eNose proposed in this current paper is 0.9 W in continuous gas sampling operation because of the low-power requirements of the commercial MOX gas sensors used.

Materials and Methods
The materials used in this this paper are the BME680 MOX gas sensor, a custom array of 16 MOX gas sensors based on the BME680, and two target gases: ethanol and acetone. The methods used in this paper to classify the readout of the array of gas sensors are the principal component analysis (PCA) and the k-nearest neighbor algorithm (k-NN). Figure 1 shows the BME680 sensor used in this paper, manufactured by Bosh Sensortec (Reutlingen, Germany). The BME680 is a digital miniature sensor able to measure air quality, temperature, humidity and pressure. The BME680 includes an internal miniature MOX gas sensor to externally estimate the air quality. This eNose proposal is based on reading the resistance of the sensing layer of the embedded MOX gas sensor, so the BME680 is used as a kind of digital MOX gas sensor. This paper then exploits the inherent variability and unspecificity that must be expected from this embedded MOX gas sensor to implement an eNose tailored to classify two target volatiles.

BME680 Sensor
quality. The BME680 includes integrated circuits for signal conditioning and bus serial communication, and can be externally accessed by using the I 2 C and the SPI serial bus. The BME680 operating as a gas sensor is proposed and optimized to unspecifically detect volatile organic compounds (VOCs) in indoor air quality management applications. The MOX gas sensor embedded in the BME680 measures the conductance change of the metaloxide layer caused by the adsorption of total volatile organic compounds (TVOC) polluting the air (except CO2). The MOX gas sensor of the BME680 is not selective or specific, so the effect of a specific gas is not distinguished from the others. Finally, the information gathered by the BME680 can be externally processed in order to estimate an indoor air quality (IAQ) index in a scale range from 0 (clean air) to 500 (heavily polluted air).

Operation of the BME680 Sensor
The BME680 sensor supports two operation modes: Sleep and Forced mode. The sensor automatically operates in Sleep mode after a power-up sequence. In Sleep mode no measurements are performed and the power consumption is minimum. When the device operates in Forced mode the sensor starts a measurement sequence to get the temperature (T), pressure (P), humidity (H) and gas resistance (G) and then operates automatically in Sleep mode (see Figure 2). The BME680 has internal registers to control the effective measurement of the TPHG values and it can be configured, for example, to measure only temperature (T) or only temperature and humidity (TH) or only gas (G). This paper is only focused on the gas sensor readout (G) obtained from the sensor. The real duration of this TPHG measurement sequence depends on the configuration of the oversampling values The BME680 digital miniature sensor is encapsulated on a small and compact metallic LGA package with a footprint of 3.0 × 3.0 mm and a height of 1.00 mm ( Figure 1). The BME680 is a low-power digital 4-in-1 micro-electromechanical system (MEMS) sensor, which is able to simultaneously measure temperature, pressure, humidity and indoor air quality. The BME680 includes integrated circuits for signal conditioning and bus serial communication, and can be externally accessed by using the I 2 C and the SPI serial bus. The BME680 operating as a gas sensor is proposed and optimized to unspecifically detect volatile organic compounds (VOCs) in indoor air quality management applications. The MOX gas sensor embedded in the BME680 measures the conductance change of the metaloxide layer caused by the adsorption of total volatile organic compounds (TVOC) polluting the air (except CO 2 ). The MOX gas sensor of the BME680 is not selective or specific, so the effect of a specific gas is not distinguished from the others. Finally, the information gathered by the BME680 can be externally processed in order to estimate an indoor air quality (IAQ) index in a scale range from 0 (clean air) to 500 (heavily polluted air).

Operation of the BME680 Sensor
The BME680 sensor supports two operation modes: Sleep and Forced mode. The sensor automatically operates in Sleep mode after a power-up sequence. In Sleep mode no measurements are performed and the power consumption is minimum. When the device operates in Forced mode the sensor starts a measurement sequence to get the temperature (T), pressure (P), humidity (H) and gas resistance (G) and then operates automatically in Sleep mode (see Figure 2). The BME680 has internal registers to control the effective measurement of the TPHG values and it can be configured, for example, to measure only temperature (T) or only temperature and humidity (TH) or only gas (G). This paper is only focused on the gas sensor readout (G) obtained from the sensor. The real duration of this TPHG measurement sequence depends on the configuration of the oversampling values of the temperature, pressure, humidity sensor and the duration of the heat up defined to complete a gas sensor measurement.

Configuration of the BME680
The BME680 has a set of control registers that must be used to configure the main parameters of the sensor: Config, Ctrl_meas, Ctrl_hum, Ctrl_gas_1, Ctrl_gas_0, Gas_wait_x, Res_heat_x. The operation mode (Sleep or Forced) is defined in the two least significant bits of the control register Ctrl_meas<1:0>. The values of the configuration parameters that define the behavior of the BME680 are summarized in Table 2. These parameters allow:

Configuration of the BME680
The BME680 has a set of control registers that must be used to configure the main parameters of the sensor: Config, Ctrl_meas, Ctrl_hum, Ctrl_gas_1, Ctrl_gas_0, Gas_wait_x, Res_heat_x. The operation mode (Sleep or Forced) is defined in the two least significant bits of the control register Ctrl_meas<1:0>. The values of the configuration parameters that define the behavior of the BME680 are summarized in Table 2. These parameters allow: (1) skipping or defining a sampling time for the measurement of temperature (T), pressure (P) and humidity (H) and setting the oversampling value; (2) configuring the length of the IIR filter coefficient used to filter and remove short-term fluctuations on the temperature and pressure measurements; (3) configuring the gas (G) measurement procedure by defining four parameters: enable heater, enable gas conversion, setting the heat up duration (a value that codes a range from 1 to 4032 ms) and setting the target heater temperature (a value that codes a range from 200 to 400 • C).
Heater off (G) The use of the MOX gas sensor embedded in the BME680 requires three steps: heating the gas sensor hot plate at a defined target heater temperature (the typical values are between 200 • C and 400 • C); maintaining this temperature during the defined heat up duration (the typical value is 100 ms); and finally measuring the resistance of the gas sensitive layer of the MOX gas sensor.
The final determination of the value of the resistance of the gas sensing layer requires the readout of the ADC values stored on two internal registers: gas_r_lsb<7:6> and gas_r_msb<7:0>. The resolution of the gas ADC value is 10 bit. The conversion of the ADC value into a resistance expressed in ohms is determined by the following equation provided by the manufacturer: (1) where range_sw_err is an internal configuration parameter that must be read from the register address 0x04 <7:4> (signed 4 bit). The gasRange is another internal configuration parameter that must be read from the register gas_r_lsb<3:0> in order to determine the constants required to compute the resistance. The gas_adc is the ADC value read from the gas_r_lsb<7:6> and gas_r_msb<7:0> registers. The list of possible values of the register gasRange and the corresponding array values of const_array1 and const_array2 arrays are provided in the datasheet of the sensor and summarized on Table 3. As a summary, the determination of the value of the resistance of the sensing layer of the MOX gas sensor (gas_res) requires the reading of: range_sw_err, gasRange, gas_adc, and the use of the vector of constants defined in const_array1 and const_array2. Figure 3 shows the eNose presented in this paper, which is based on a single Printed Circuit Board (PCB) (80.87 mm × 40.01 mm) designed with Autodesk Eagle software. The PCB includes holes to facilitate air circulation around the gas sensors. This electronic board has been designed to be powered from two redundant sources: the main USB connector, which provides 5.0 V, and an additional power connector designed to plug a redundant or backup power to maintain the eNose activated after powering off the main USB connector. The 5.0 V are converted to the internal 3.3 V used by the electronic devices through a voltage regulator (LD3985M33R). The board also includes different LEDs for status information and a Serial Wire Debug (SWD) interface to program the microcontroller.

PEER REVIEW
8 of 20 selected because it was the smallest low-power STM32 microcontroller capable to handle the USB and SPI communication interfaces simultaneously. The communication with the array of BME680 is performed using the SPI serial bus. The MCU operates as a SPI master and the 16 BME680 sensors operate as slaves through a multi-slave SPI topology where the SCLK, MOSI and MISO lines of the SPI communication are shared between all the sensors. The SPI communication with a specific BME680 The main Micro Controller Unit (MCU) is the STM32F070CBT6 from STMicroelectronics, which is a low-power version of the high-performance ARM Cortex-M0 32-bit RISC (Reduced Instruction Set Computing) core operating internally at 48 MHz by using an external 8 MHz crystal oscillator. This MCU incorporates 128 Kbytes of Flash memory and 16 Kbytes of SRAM in a small surface mount LQFP48 package. This MCU offers standard serial communication interfaces (I2Cs, SPIs, and USARTs), one USB 2.0 Full-speed interface, one 12-bit ADC and several general-purpose 16-bit timers. This MCU was selected because it was the smallest low-power STM32 microcontroller capable to handle the USB and SPI communication interfaces simultaneously.
The communication with the array of BME680 is performed using the SPI serial bus. The MCU operates as a SPI master and the 16 BME680 sensors operate as slaves through a multi-slave SPI topology where the SCLK, MOSI and MISO lines of the SPI communication are shared between all the sensors. The SPI communication with a specific BME680 chip is controlled with the chip select line (CSB line). This configuration allows to obtain the data from an array of BME680 sensors by using a single SPI peripheral bus (using the SCK, SDI and SDO lines) from the MCU but requires the use of 16 dedicated digital lines to individually select the CSB line of a specific sensor BME680 sensor.
As stated in the background section, the average number of MOX gas sensors used in the arrays listed in Table 1 is 15.6, but the decision to use 16 sensors in the eNose does not have a scientific motivation. In this case, the small MCU selected was not able to handle 25 sensors using a wire selection, so this number was practically limited to 16. The USB connection of the electronic board of the eNose has been designed to operate as a slave USB device controlled by an external master USB device such as a Personal Computer, an Arduino, a RaspberryPI, an additional control board, etc. The USB communication is a USB-CDC software-based serial port (software compatible with the old RS-232 protocol) operating as a Virtual Com port. This configuration simplifies the integration of the eNose in a general measurement framework.
Finally, the maximum power consumption of the complete eNose device is 0.9 W (5.0 V and 180 mA) when continuously measuring the gas sensor readout with the BME680 sensors operating in Force mode at the maximum heating temperature, and only 0.05 W (5.0 V and 10 mA) whit the BEM680 sensors in Sleep mode. Table 4 details the configuration of the individual parameters that must be set or defined in order to perform a gas measurement with a BME680 sensor. The main parameters that define a gas measurement are the Heat up duration and the Target heater temperature. Table 5 shows the individual values assigned in this paper to the array of 16 BME680 sensors: a common value of 150 ms for the Heat up duration and a lineal range from 200 • C to 400 • C for the Target heater temperature. This array configuration is proposed just as an initial (trial) selection with the expectation that the different heater temperatures combined with the inherent MOX gas sensors variability will provide different sensitivities to individual gases. The number of possible combinations is huge but this proposal is in concordance with the linear range of power or PWM applied to the same type of MOX gas sensors used in other conventional eNoses [34]. A detailed analysis focused in the determination of an optimal configuration of the array of gas sensors will be performed in future analysis. Table 4. Configuration of the individual parameters of a BME680 used as a gas sensor.

Parameters Register Values
Heater off (G) 0: Heater On Enable gas conversion (G) 1: Run Gas Heat up duration (G) Value from 1 ms to 4032 ms Target heater temperature (G) Value from 200 • C to 400 • C

eNose Normal Measurement Operation
The eNose is in a normal measurement mode after power up. Figure 4 shows the three main tasks developed by the MCU in a normal measurement operation. The first task consists on a non-blocking continuous measurement procedure that sequentially reads the temperature, pressure, humidity and gas resistance of the sixteen BME680 sensors at the maximum velocity provided by the SPI serial bus and allowed by the sensors. The data gathered are stored internally on a SRAM buffer in order to provide fast response upon external demand. The second task receives the USB-CDC commands from the host device and provides specific answers if needed. The commands allow the configuration of all eNose parameters and can be used to request the current gas sensor measurements internally stored. The third task is activated by a specific host command and is in charge of continuously submitting the gas sensor measurements to the USB host at a requested interval. This feature is very interesting in order to simplify the automatic analysis of the data gathered by the eNose, which can be automatically implemented in the host USB as an isolated procedure activated upon receiving this periodic submission [34].

Target Gases Used to Train and Test the eNose
The target gases used in this paper to validate the array of single-type miniature MOX sensors are ethanol and acetone. These two gases have been widely used in the scientific literature [34,43,46]. Both gases are liquid in their standard state, which is used in many industrial and academic activities, but they evaporate quickly and thus can appear as volatiles in a human workspace as a consequence of an accidental leakage.

Target Gases Used to Train and Test the eNose
The target gases used in this paper to validate the array of single-type miniature MOX sensors are ethanol and acetone. These two gases have been widely used in the scientific literature [34,43,46]. Both gases are liquid in their standard state, which is used in many industrial and academic activities, but they evaporate quickly and thus can appear as volatiles in a human workspace as a consequence of an accidental leakage.

Reference Measurements of Volatile Concentration
In this paper, the measurement of the real concentration of the volatiles analyzed is performed with a compact photo ionization detector (PID) ppbRAE 3000, manufactured by RAE Systems. This PID provides a fast and true concentration measurement of a known gas or chemical compound. However, the target chemical compound (up to 200 compounds) must be correctly configured in the device because a PID has no classification capabilities as it only provides a concentration value corresponding to the mixture of all present gases with an ionization energy below what its ionization unit delivers [59]. Therefore, the concentration measured with a PID is not useful when the gas or chemical compound measured is unknown.

Principal Component Analysis (PCA)
The principal component analysis (PCA) proposed by Pearson [71] is the process of computing the principal components of a collection of points and using them to change the basis of the data [36]. The result of the PCA are the eigenvectors of the covariance matrix of a collection of points. In this paper, PCA is used to reduce the dimension of the data gathered from the eNose while preserving as much of the variation of the data as possible.

k-Nearest Neighbors (k-NN)
The k-nearest neighbors algorithm (k-NN) proposed by Fix and Hodges [72] is a non-parametric classification method that finds the k-closest data samples in a data set describing different classes and determines a classification membership according to the plurality vote of the classes of the k-closest nearest neighbors. The class membership is the most common class among its k-nearest neighbors. If k = 1, then the object is simply assigned to the class of that single nearest neighbor. In this paper, k-NN is used to classify the PCA projection of the current eNose data sample using as a reference data set the PCA projection of the results of the calibration experiments. The final objective of k-NN will be the classification of the current eNose data sample into ethanol or acetone.

Calibration of the eNose with Ethanol and Acetone
This section shows the calibration of the proposed eNose in order to detect two target gases: ethanol and acetone. This calibration is inspired in [34], in which a custom eNose based on conventional MOX gas sensors was embedded in a mobile robot in order to early detect gas leaks of the similar target gases. Therefore, the goal of this calibration is to obtain static evaporation profiles similar to the dynamic evaporation profiles analyzed in [34]. The result of this calibration will allow the future application of the eNose proposed in this paper in similar early detection applications.
The calibration experiments are based on using a heater of 60 W to force the evaporation of liquid acetone and ethanol during 250 s. During this calibration experiments the eNose and the PID are placed above the evaporator at a relative height of 0.25 m. The eNose and the sample tube of the PID are placed together to measure the convective currents generated by the evaporator. Figure 5 shows the raw measurement results obtained with the eNose and the PID. Figure 5a shows the evolution of the concentration of ethanol measured with the PID that is provided just as a reference. The concentration of ethanol suddenly increases when power is applied to the evaporator heater and slowly decreases when power is removed and forced evaporation ends. Figure 5b shows the raw evolution of the resistance of the sensing layer of the 16 MOX gas sensors of the eNose. This resistance suddenly decreases as a consequence of the presence of evaporated ethanol. Unexpectedly, the response of the MOX gas sensors to the presence of ethanol in air is faster than the PID, probably because the circulation of a forced convection. Figure 5c shows the deduced evolution of the conductance and Figure 5d shows the evolution of the average conductance of the 16 MOX gas sensors of the eNose. This average conductance is used in this paper to binary detect the presence of gas by the application of a threshold value relative to the background conductance level obtained in clean air conditions.  This calibration experiment has been repeated evaporating acetone obtaining very similar transitory results to those obtained when evaporating ethanol. Figure 6 shows the normalized radial representation of the maximum conductance measured with the sensors of the eNose in the presence of ethanol (orange line), and acetone (yellow line). Figure 6 also shows the average conductance measured in the case of clean air (blue line). Figure 6 shows small differences between the ethanol and acetone profiles, which may allow the classification of both gasses. Specifically, the sensor that offers the maximum difference between the ethanol and acetone cases is S12, heated at 350 • C, which is the recommended operation temperature of the MOX gas sensor embedded into the BME680.  S8 S9 S10 S11 S12 S13 S14 S15 S16 Air Ethanol Acetone Figure 6. Normalized representation of the maximum conductance values when the sensors are exposed to air (blue), ethanol (orange) and acetone (yellow). Figure 7 shows the results of a PCA analysis applied to the raw conductance information measured from the 16 MOX gas sensors embedded in the 16 BME680 used in the eNose presented in this paper. Figure 7 shows the first and second principal components proposed by the PCA analysis of data measured for the cases of forced evaporation of ethanol (yellow) and acetone (red) (see Figures 5 and 6). The first component scores the 99.77% of the variation of the conductance of the MOX gas sensors and the second component scores the 0.17% of this variation. The first component is truly representative of the variation of the measurement, but the use of two components facilitates the visual interpretation of the results. After completing the PCA using the reference samples of ethanol (yellow) and acetone (red) we have applied the PCA projection to general air measurements (blue) just to observe its location in the projected space. Figure 7 shows these three classes (ethanol, acetone and air) clearly differentiated in the projected space.

Validation of the eNose to Detect Ethanol and Acetone
The ethanol and acetone projections shown in Figure 7 are used as a reference dataset for a k-NN classification (with k = 5). Figure 8 shows the instantaneous classification results obtained in two validation experiments conducted with (a) ethanol and (b) acetone. Figure 8 shows the evolution of the average conductance measured by the eNose and the result of the volatile classification labeled with colors. Table 6 summarizes the classification results obtained in four validation experiments conducted two days after the calibration of the eNose (using the PCA of Figure 7 as reference data sets for the k-NN). The instantaneous classification of the gas detected in Figure 8 was successful in the 94% of the measurements, with an average instantaneous success of 97% in all the experiments conducted in this paper. Therefore, the majority decision of which gas is detected in each experiment was successful in all cases.
Finally, Table 7 summarizes the classification results obtained in four additional validation experiments conducted two weeks after the calibration of the eNose (using the PCA of Figure 7 as reference data sets for the k-NN). The classification results show successful instantaneous classification ratios higher than 70% and an average instantaneous success of 77%, so again the majority decision of which gas is detected in each validation experiment has been successful in all cases. However, the comparison of the results of Tables 6 and 7 evidences that the PCA projection used in the k-NN is less representative after two weeks of continuous operation. In this paper, we apply a threshold to the variation of conductance to detect a variation in the concentration of volatile substances. The relative conductance threshold was defined as 0.6 mΩ after a trial and error procedure. This means that the eNose detects the existence of a volatile substance when the average conductance increases 0.6 mΩ from a background reference value that has been obtained by averaging this average conductance during a time window of 300 s. At this stage, this background reference value is constantly updated until the detection of a gas, as we usually end the experiments after detecting a gas.
The use of this detection threshold is in part responsible of the good scores of the two principal components shown in Figure 7. This is because the application of the threshold potentially avoids the classification of conflictive measurement points obtained in the cases of very low gas concentrations and very low and similar conductance values. Therefore, the use of a detection threshold simplifies the PCA analysis and contributes to separate the gas classes.

Validation of the eNose to Detect Ethanol and Acetone
The ethanol and acetone projections shown in Figure 7 are used as a reference dataset for a k-NN classification (with k = 5). Figure 8 shows the instantaneous classification results obtained in two validation experiments conducted with (a) ethanol and (b) acetone. Figure 8 shows the evolution of the average conductance measured by the eNose and the result of the volatile classification labeled with colors. Table 6 summarizes the classification results obtained in four validation experiments conducted two days after the calibration of the eNose (using the PCA of Figure 7 as reference data sets for the k-NN). The instantaneous classification of the gas detected in Figure 8 was successful in the 94% of the measurements, with an average instantaneous success of 97% in all the experiments conducted in this paper. Therefore, the majority decision of which gas is detected in each experiment was successful in all cases.   Finally, Table 7 summarizes the classification results obtained in four additional validation experiments conducted two weeks after the calibration of the eNose (using the PCA of Figure 7 as reference data sets for the k-NN). The classification results show successful instantaneous classification ratios higher than 70% and an average instantaneous success of 77%, so again the majority decision of which gas is detected in each validation experiment has been successful in all cases. However, the comparison of the results of Tables 6 and 7 evidences that the PCA projection used in the k-NN is less representative after two weeks of continuous operation.

Conclusions
This paper proposes the development and test of a compact and portable eNose based on the use of 16 single-type miniature MEMS MOX gas sensors operating at different heating temperatures. The eNose presented in this paper has been implemented on a single PCB of 80.87 mm × 40.01 mm using a low-power ARM microcontroller and 16 miniature BME680 sensors capable of performing simultaneous measures of air temperature, pressure, humidity and also the total volatile organic compounds that are measured with an embedded MEMS MOX gas sensor. The maximum power consumption of this eNose implementation is 0.9 W (5.0 V, 180 mA) and the standby power is 0.05 W (5.0 V, 10 mA), making it ideal for portable and battery-based applications.
The main disadvantage of common MOX gas sensors are crossed sensitivity to different gases and different crossed sensitivities. This eNose proposal increases these sensor differences by applying different target heater temperature to the 16 MOX gas sensors. Then, the inherent variability and unspecificity that must be expected from the 16 MOX gas sensors, combined with signal processing, are exploited to classify two target volatiles: ethanol and acetone. The proposed eNose reads the resistance of the sensing layer of the 16 embedded MOX gas sensors, applies PCA for dimensional reduction and k-NN for classification.
The validation experiments presented in this paper have shown that two individual target volatiles can be detected and classified with an instantaneous classification success higher than 94% two days after the calibration of the eNose and higher than 70% two weeks after this initial calibration. As a summary, in all validation experiments conducted within this period with the proposed eNose, the majority classification of the two target volatiles based on the sequence of instantaneous classification results (threshold > 50%) has been always successfully in controlled laboratory conditions.
The future works planned are mainly the evaluation and improvement of the eNose as a time-varying instrument, such as the analysis of the effect of relative humidity on the sensing in long-term operation, the analysis of the effect of some reducing and oxidizing gases in long-term operation, the refinement of the classificatory and the improvement of the classification performances, and also the application of the eNose in mobile robots as early gas leak detector and as air quality supervisor in unstructured environments.