Javascript is required
1.
S. Najiyati, Kopi: Budidaya dan Penanganan Lepas Panen. Jakarta: Penebar Swadaya, 1990. [Google Scholar]
2.
J. J. Spillane, Komoditi Kopi: Peranannya Dalam Perekonomian Indonesia. Kanisius Publishing House, 1990. [Google Scholar]
3.
E. Mahmoudi, “Electronic nose technology and its applications,” Sens. Transducers J., vol. 107, no. 8, pp. 17–25, 2009. [Google Scholar]
4.
B. R. Suteja, “Penerapan jaringan saraf tiruan propagasi balik studi kasus pengenalan jenis kopi,” J. Inform., vol. 3, no. 1, pp. 49–62, 2007. [Google Scholar]
5.
J. Z. Tan and J. Xu, “Applications of electronic nose (e-nose) and electronic tongue (e-tongue) in food quality-related properties determination: A review,” Artif. Intell. Agric., vol. 4, pp. 104–115, 2020. [Google Scholar] [Crossref]
6.
S. Dragonieri, R. Schot, B. J. A. Mertens, S. L. Cessie, S. A. Gauw, A. Spanevello, O. Resta, N. P. Willard, T. J. Vink, K. F. Rabe, E. H. Bel, and P. J. Sterk, “An electronic nose in the discrimination of patients with asthma and controls,” J. Allergy Clin. Immunol., vol. 120, no. 4, pp. 856–862, 2007. [Google Scholar] [Crossref]
7.
A. D. Wilson, “Applications of electronic-nose technologies for noninvasive early detection of plant, animal and human diseases,” Chemosensors, vol. 6, no. 4, p. 45, 2018. [Google Scholar] [Crossref]
8.
F. A. Aditama, L. Zulfikri, L. Mardiana, T. Mulyaningsih, N. Qomariyah, and R. Wirawan, “Electronic nose sensor development using ANN backpropagation for lombok agarwood classification,” Res. Agric. Eng., vol. 66, no. 3, pp. 97–103, 2020. [Google Scholar] [Crossref]
9.
D. Rabersyah, Firdaus, and Derisma, “Identifikasi jenis bubuk kopi menggunakan electronic nose dengan metode pembelajaran backpropagation,” J. Nas. Tek. Elektro, vol. 5, no. 3, pp. 332–338, 2016. [Google Scholar] [Crossref]
10.
S. Ampuero and J. O. Bosset, “The electronic nose applied to dairy products: A review,” Sensors Actuators B Chem., vol. 94, no. 1, pp. 1–12, 2003. [Google Scholar] [Crossref]
11.
A. D. Wilson, “Diverse applications of electronic-nose technologies in agriculture and forestry,” Sensors, vol. 13, no. 2, pp. 2295–2348, 2013. [Google Scholar] [Crossref]
12.
L. Lu, Z. Q. Hu, X. Q. Hu, D. Li, and S. Y. Tian, “Electronic tongue and electronic nose for food quality and safety,” Food Res. Int., vol. 162, p. 112214, 2022. [Google Scholar] [Crossref]
13.
D. Berrar, “Bayes’ theorem and naive bayes classifier,” in Encyclopedia of Bioinformatics and Computational Biology, 2019, pp. 403–412. [Google Scholar] [Crossref]
14.
R. Ariyanto, D. Puspitasari, and Y. Alfani, “Penerapan entropy based discretization pada metode naive bayes dalam klasifikasi penyakit diabetes mellitus,” J. Inform. Polinema, vol. 6, no. 4, pp. 17–22, 2020. [Google Scholar] [Crossref]
15.
C. H. Lee, I. T. Chen, H. C. Yang, and Y. J. Chen, “An AI-powered electronic nose system with fingerprint extraction for aroma recognition of coffee beans,” Micromachines, vol. 13, no. 8, p. 1313, 2022. [Google Scholar] [Crossref]
16.
W. Wojnowski, T. Majchrzak, T. Dymerski, J. Gkebicķi, and J. Namieśnik, “Portable electronic nose based on electrochemical sensors for food quality assessment,” Sensors, vol. 17, no. 12, p. 2715, 2017. [Google Scholar] [Crossref]
17.
A. Berna, “Metal oxide sensors for electronic noses and their application to food analysis,” Sensors, vol. 10, no. 4, pp. 3882–3910, 2010. [Google Scholar] [Crossref]
18.
R. Susanti, Z. Zaini, A. Hidayat, N. Alfitri, and M. I. Rusydi, “Identification of coffee types using an electronic nose with the backpropagation artificial neural network,” Int. J. Informatics Vis., vol. 7, no. 3, pp. 659–664, 2023. [Google Scholar] [Crossref]
19.
R. Selvanarayanan, S. Rajandran, and Y. Alotaibi, “Using hierarchical agglomerative clustering in e-nose for coffee aroma profiling: Identification, quantification, and disease detection,” Instrum. Mes. Metrol., vol. 22, no. 4, pp. 127–140, 2023. [Google Scholar] [Crossref]
20.
T. Liu, “Digital humidity and temperature sensor,” Adfruit, 2016. https://cdn-shop.adafruit.com/datasheets/Digital+humidity+and+temperature+sensor+AM2302.pdf [Google Scholar]
21.
O. A. Comparator et al., “MQ-3 semi-conductor sensor for alcohol,” Expert Syst. Appl., vol. 2, no. 1, pp. 2025–2030, 2015. [Google Scholar]
22.
C. Gonzalez Viejo, E. Tongson, and S. Fuentes, “Integrating a low-cost electronic nose and machine learning modelling to assess coffee aroma profile and intensity,” Sensors, vol. 21, no. 6, p. 2016, 2021. [Google Scholar] [Crossref]
23.
M. Pardo and G. Sberveglieri, “Coffee analysis with an electronic nose,” IEEE Trans. Instrum. Meas., vol. 51, no. 6, pp. 1334–1339, 2002. [Google Scholar] [Crossref]
24.
M. S. Ramadhan and M. Rivai, “Sistem kontrol tingkat kekeruhan pada aquarium menggunakan arduino uno,” Jurnal Teknik ITS, vol. 7, no. 1, pp. A87–A91, 2017. [Google Scholar] [Crossref]
25.
J. A. B. Delmo, M. V. Villarica, and A. A. Vinluan, “Correlation analysis between sensors for sensing coffee variations,” in IEEE 18th International Colloquium on Signal Processing & Applications (CSPA), Selangor, Malaysia, 2022, pp. 220–224. [Google Scholar] [Crossref]
26.
Z. Arifin, S. D. Prasetyo, R. A. Rachmanto, W. E. Juwana, E. Yohana, and D. Widhiyanuriyawan, “Optimizing photovoltaic thermal collector temperature with varying number of collectors: A CFD simulation study,” Int. J. Heat Technol., vol. 41, no. 5, pp. 1255–1263, 2023. [Google Scholar] [Crossref]
27.
E. Permata, “Prototipe rele proteksi overheating pada motor 1 phasa berbasis mikrokontroler AT89C51,” SETRUM, vol. 4, no. 2, p. 45, 2015. [Google Scholar] [Crossref]
28.
S. Sutono, “Monitoring distribusi air bersih,” J. Ilm. SETRUM, vol. 5, no. 1, pp. 37–42, 2016. [Google Scholar] [Crossref]
29.
A. R. Putri and P. N. Rahayu, “Food warmer system based on DHT-22,” J. Adv. Res. Electr. Eng., vol. 4, no. 1, pp. 56–63, 2020. [Google Scholar] [Crossref]
30.
M. M. Amin, M. A. A. Nugratama, A. Maseleno, M. Huda, and K. A. Jasmi, “Design of cigarette disposal blower and automatic freshner using MQ-5 sensor based on ATmega 8535 microcontroller,” Int. J. Eng. & Technol., vol. 7, no. 3, pp. 1108–1113, 2018. [Google Scholar] [Crossref]
31.
D. Furuta, T. Sayahi, J. Li, B. Wilson, A. A. Presto, and J. Y. Li, “Characterization of inexpensive metal oxide sensor performance for trace methane detection,” Atmos. Meas. Tech., vol. 15, pp. 5117–5128, 2022. [Google Scholar] [Crossref]
32.
N. Neha, B. S. Krishnaprasad, and M. L. J. Shruthi, “Real-time Alcohol Detection and Response System with Arduino and MQ-3 Sensor Integration,” in 2023 7th International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC), Kirtipur, Nepal, 2023, pp. 1095–1103. [Google Scholar] [Crossref]
33.
K. B. K. Sai, S. Ramasubbareddy, and A. K. Luhach, “IoT based air quality monitoring system using MQ135 and MQ7 with machine learning analysis,” Scalable Comput., vol. 20, no. 4, pp. 599–606, 2019. [Google Scholar] [Crossref]
34.
S. Usha Rani, S. Rajarajeswari, J. G. Jaimon, and R. Ravichandran, “Real-time air quality monitoring system using MQ135 and thingsboard,” J. Crit. Rev., vol. 7, no. 18, pp. 4107–4115, 2020. [Google Scholar]
35.
T. Liu, “Digital-output relative humidity temperature sensor/module DHT22,” Aosong Electronics Co., Ltd. https://www.sparkfun.com/datasheets/Sensors/Temperature/DHT22.pdf [Google Scholar]
36.
Zhengzhou Winsen Electronics Technology Co. Ltd., “MQ-4 flammable gas sensor,” 2018. https://www.alldatasheet.com/datasheet-pdf/download/1304541/WINSEN/MQ-4.html [Google Scholar]
37.
Hanwei Electronics, “Technical data MQ-4 gas sensor,” 2018. https://www.sparkfun.com/datasheets/Sensors/Biometric/MQ-4.pdf [Google Scholar]
38.
Winsen, “MQ-135 air qualitygas sensor.” https://www.winsen-sensor.com/sensors/voc-sensor/mq135.html [Google Scholar]
39.
Y. B. Utomo and G. Harsanto, “Penerapan metode certainty factor dan naïve bayes untuk mendiagnosa penyakit akibat gigitan nyamuk,” Gener. J., vol. 4, no. 2, pp. 49–60, 2020. [Google Scholar] [Crossref]
40.
M. S. Anam, “Social assistance decision support system using the naive bayes method,” JTECS: J. Sist. Telekomun. Elektron. Sist. Kontrol Power Sist. dan Komput., vol. 1, no. 1, pp. 85–92, 2021. [Google Scholar]
41.
W. Zhang and F. Gao, “An improvement to naive bayes for text classification,” Procedia Eng., vol. 15, pp. 2160–2164, 2011. [Google Scholar] [Crossref]
42.
A. Rabehi, H. Helal, D. Zappa, and E. Comini, “Advancements and prospects of electronic nose in various applications: A comprehensive review,” Appl. Sci., vol. 14, no. 11, p. 4506, 2024. [Google Scholar] [Crossref]
43.
S. M. Chen, Y. C. Wang, and S. Choi, “Applications and technology of electronic nose for clinical diagnosis,” Open J. Appl. Biosens., vol. 2, no. 2, pp. 39–50, 2013. [Google Scholar] [Crossref]
Search
Open Access
Research article

Development and Application of an Electronic Nose System for Classifying Coffee Varieties Based on Aromatic Profiles

danang erwanto1,
royb fatkhur rizal2,
dian efytra yuliana1,
misbahul munir2,
yuki trisnoaji2,
catur harsito3,4,
abram anggit mahadi5,
singgih dwi prasetyo2,6*
1
Electrical Engineering Study Program, Faculty of Engineering, Islamic University of Kediri, 64128 Kediri, Indonesia
2
Power Plant Engineering Technology, Faculty of Vocational Studies, State University of Malang, 65145 Malang, Indonesia
3
Department of Mechanical Engineering, Faculty of Vocational, Universitas Sebelas Maret, 57126 Surakarta, Indonesia
4
Department of Mechanical Computer Industrial and Management Engineering, Kangwoon National University, 25913 Gangwon, Republic of Korea
5
Department of Mechanical Systems and Engineering, Gifu University, 501-1193 Gifu, Japan
6
Department of Mechanical Engineering, Faculty of Engineering, Universitas Sebelas Maret, 57126 Surakarta, Indonesia
Journal of Intelligent Systems and Control
|
Volume 3, Issue 3, 2024
|
Pages 186-200
Received: 08-05-2024,
Revised: 09-16-2024,
Accepted: 09-24-2024,
Available online: 09-29-2024
View Full Article|Download PDF

Abstract:

Indonesia, a significant exporter of coffee, faces persistent challenges in accurately identifying and classifying coffee varieties based on aromatic characteristics, primarily due to the subjective variability of human sensory evaluation. To address these limitations, an electronic nose (e-nose) system was developed for the classification of coffee varieties through the analysis of aromatic profiles. The system integrates a DHT-22 sensor and four gas sensors (MQ-5, MQ-4, MQ-3, and MQ-135) to measure humidity, temperature, and gas concentrations from coffee vapor. Data acquisition was facilitated by the Arduino Uno platform, while classification was conducted using the Naive Bayes Classifier (NBC) algorithm. The e-nose achieved a classification accuracy of 82.2%, as validated through a confusion matrix and performance metrics, including precision, recall, and F1-score. Among the gas sensors employed, the MQ-4 sensor, which detects methane, demonstrated the highest response sensitivity, whereas the MQ-3 sensor, designed to detect alcohol, exhibited the lowest. This system significantly mitigates the inherent subjectivity associated with traditional aroma assessment methods and offers considerable potential for enhancing quality control protocols in coffee production processes. Future work will focus on integrating advanced machine-learning algorithms, optimizing sensor array performance, and expanding the dataset to include a broader diversity of coffee samples. These advancements are expected to further refine the system's classification capabilities and contribute to more robust quality assurance in the coffee industry.

Keywords: Coffee, Aroma, Electronic nose, Naive Bayes Classifier, Gas sensor, Quality control, Aroma classification, Sensor technology

1. Introduction

Coffee is a drink obtained from processing coffee beans (Coffea sp.), which are of various types and have distinctive flavors and aromas. Coffee plays a significant role as one of Indonesia's leading export commodities, contributing substantially to the national economy and providing livelihoods for millions of farmers. The continuous development of coffee-related industries underscores its importance to the country's economic growth and cultural identity [1], [2], [3]. The aroma of coffee is one of its defining characteristics, playing a crucial role in differentiating between various coffee types and influencing consumer preferences. This distinct feature is primarily attributed to the complex mixture of volatile compounds present in coffee [4]. However, relying solely on human olfactory senses for coffee aroma classification poses significant challenges. Sensory perceptions can be influenced by factors such as fatigue, environmental conditions, or individual psychological states, leading to variability and inconsistency in results [4], [5], [6]. In this context, e-nose systems have emerged as a promising alternative. By mimicking the human sense of smell, e-noses can detect and analyze volatile compounds in coffee aroma patterns with excellent stability and reproducibility. Leveraging advanced algorithms, these systems provide a practical, efficient, and objective method for classifying coffee aroma, addressing traditional approaches' shortcomings [7].

Several studies have classified coffee types through recognition and classification of branded coffee powder using an e-nose based on Artificial Neural Network (ANN) [8]. In this study, the e-nose utilizes the TGS 2602 and TGS 822 gas sensors as input for classification data to be processed by the ATMega 16 microcontroller, and the results show that the system can perform recognition and classification well [7], [8]. In the study of identifying types of coffee powder by applying the learning method carried out by Rabersyah et al. [9], the e-nose device uses five gas sensors, including TGS 2610, TGS 2611, TGS 2602, TGS 2620, and TGS 822. The data pattern was taken from the change in resistance on each sensor when detecting the aroma of coffee; the pattern was processed using a backpropagation ANN so that it can distinguish Arabica and Robusta coffee with a success rate of 40% on Arabica Coffee, 100% on Robusta Coffee and 100% in free air (without coffee) [6], [7], [10].

In the study by Wilson [11], nine commercial coffee samples with varying levels of aroma intensity were tested. Two ANN-based machine learning models were developed: the first model was used to classify samples based on low, medium, and high intensity, and the second model was used to predict the relative abundance of 45 different aroma types. The results showed that the coffee aroma intensity could be classified with high accuracy (98% in the first model). In addition, the second model successfully predicted certain aromas with a high correlation coefficient (R = 0.99) without overfitting or underfitting. The proposed method is fast, accurate, non-destructive, and reliable, effectively evaluating volatile compounds in coffee. This system has the potential to be applied at various stages of the production process, allowing early detection of undesirable characteristics and ensuring high-quality products [12].

In this study, the e-nose implements the DHT-22 sensor and four gas sensors, including MQ-5, MQ-4, MQ-3, and MQ-135, which were arranged to form a sensor array to read humidity, temperature, and gas levels from coffee steam [6], [10]. From the reading of the DHT-22 gas sensor, which includes MQ-5, MQ-4, MQ-3, and MQ-135, the data was processed using Arduino Uno and then was forwarded to the computer via a USB cable to be classified using the NBC method [13]. The NBC method is considered competitive and reliable in performance in classifying because the assumption of autonomous attributes owned by data is very appropriate to real-world applications [13], [14]. With the development of e-nose technology, it is expected that this system will become a reliable tool in identifying various types of superior Indonesian coffee, such as Aceh Gayo Wine Coffee, Lintong Coffee, and Toraja Coffee, based on their distinctive aroma [15]. In addition to supporting the increase in added value of coffee products, this system also has the potential to support further research in aroma analysis [16], [17].

2. State of the Art

Coffee aroma research has progressed significantly, as shown in Table 1, with various methodologies and focuses featuring different approaches to understanding and classifying coffee aromas. TGS sensors have been used to measure volatile compounds in other types of coffee, achieving high accuracy in distinguishing aromas. Hierarchical clustering and machine learning frameworks have been used to improve the coffee industry's aroma profiling and quality control mechanisms. An ANN-based model has been developed to classify aroma intensity, with a remarkable accuracy of 98% and high correlation in compound prediction. MQ and DHT-22 sensors have been used for environmental sensing, demonstrating the reliability of the NBC in real-world scenarios. Volatile organic compounds (VOCs) emitted from coffee have been identified, showing the sensor's sensitivity and potential application in coffee aroma analysis. Overall, cutting-edge coffee aroma research reflects a blend of traditional and innovative methodologies, improving people’s understanding of coffee quality and flavor profiles.

This study introduces a novel approach by combining advanced machine learning techniques and environmental sensing tools, addressing gaps identified in previous research. While previous studies have focused on classification and aroma profiling, the current work enhances the robustness of aroma analysis by integrating multiple sensor types and leveraging deep learning models for more accurate predictions of both aroma intensity and compound presence. Additionally, this research explores the practical application of real-world sensing scenarios, where integrating environmental factors such as humidity and temperature could lead to more reliable coffee aroma profiling [18].

Moreover, this study directly addresses the need for comprehensive data on VOCs specific to coffee varieties, providing a more detailed and accurate understanding of the chemical profile of coffee aromas. By filling these gaps, the proposed methodology offers a more holistic and reliable approach to coffee aroma analysis, improving quality control and enhancing flavor profiling in the coffee industry [19].

Table 1. State of the art

Reference

Focus

Number of Stages

Design Methodology

Scope/Sample/Validation

[18]

Distinguishing coffee powders (Arabica, Robusta, etc.)

Single stage

Utilized TGS sensors (2602, 2610, 2611, 2620) to measure volatile compounds; analyzed output voltages for gas concentration in ppm.

Validated with 70 coffee samples for each type, achieving high accuracy in aroma differentiation.

[19]

Coffee aroma profiling using hierarchical clustering

Three stages

Implemented hierarchical agglomerative clustering (HAC) and machine learning frameworks (TensorFlow, Keras) supported by GC-MS validation.

A dataset of 415 coffee aroma samples was analyzed for six odor classes (floral, roasted, earthy, etc.) and enhanced quality control mechanisms.

[18], [19]

Classifying coffee aroma intensity and compound prediction

Two models

Developed ANN-based models for aroma intensity classification (low, medium, high) and prediction of 45 aroma compounds.

Achieved 98% classification accuracy; high correlation ($R=0.99$) in predicting aroma compounds.

[18]

Machine learning-based coffee classification using MQ sensors

Single stage

Integrated MQ sensors (e.g., MQ-5, MQ-3, MQ-135) with DHT-22 for temperature/humidity sensing; NBC for analysis.

Successfully identified coffee types (e.g., Aceh Gayo, Toraja); NBC demonstrated reliability in real-world aroma applications.

[19]

Identifying volatile gases in coffee aroma

Single stage

Measured VOCs and gases (e.g., hydrogen sulfide, alcohol) using TGS sensors; correlated gas concentration changes with conductivity.

Demonstrated high sensitivity to VOCs for coffee quality analysis; highlighted sensor performance for specific gases (e.g., TGS 2620).

3. Research Methodology

This study classifies the aroma of Aceh Gayo Wine Coffee, Lintong Coffee, and Toraja Coffee by implementing an e-nose system that utilizes a sensor array. The sensor array includes DHT-22 sensors and various gas sensors, such as MQ-5, MQ-4, MQ-3, and MQ-135 [20], [21]. These sensors were chosen based on their sensitivity to the VOCs present in the coffee aromas, contributing to the unique characteristics of each coffee variety. The gas sensors were used to detect alcohols, aldehydes, methane, and other VOCs, while the DHT-22 sensor was used to monitor temperature and humidity levels, providing essential environmental data. The system was designed to interface with an Arduino Uno, where the analog signals from the gas sensors were converted into digital signals using the Analog-to-Digital Converter (ADC) integrated into the Arduino Uno. This setup allows for accurately classifying the coffee aroma profiles by capturing the complex mix of compounds specific to Aceh Gayo Wine Coffee, Lintong Coffee, and Toraja Coffee [22].

The specific coffee varieties of Aceh Gayo Wine Coffee, Lintong Coffee, and Toraja Coffee were selected based on their distinctive regional profiles and unique flavor characteristics, making them ideal candidates for studying aroma classification. Aceh Gayo Wine Coffee is known for its fruity, wine-like acidity and floral notes, which help distinguish different coffee aromas. Lintong Coffee provides a balanced, earthy flavor with hints of spices and chocolate, offering a different set of volatiles to detect. Toraja Coffee's rich, smoky flavor and caramel undertones add another layer of complexity to the studied aroma profiles [23].

The gas sensors used in this study, i.e., MQ-5, MQ-4, MQ-3, and MQ-135, were selected for their ability to detect the critical compounds found in coffee’s aroma. The MQ-5 is sensitive to methane, carbon monoxide, and alcohol, while the MQ-4 and MQ-3 are particularly sensitive to ethanol, a crucial volatile compound in coffee. The MQ-135 sensor is sensitive to gases like ammonia, benzene, and aldehydes, comprehensively detecting the broad spectrum of VOCs in coffee aromas. These sensors, in combination, enable the e-nose system to accurately classify and differentiate between the coffee types based on their aroma profiles, offering a cost-effective, practical solution for quality control and consumer preference studies in coffee production and processing [24].

In this study, each coffee variety was tested 15 to 16 times under controlled environmental conditions, with a temperature of approximately 30${ }^{\circ} \mathrm{C}$ and humidity levels ranging from 80% to 90%. This experimental setup ensured that the aroma profiles of each coffee variety could be accurately captured and analyzed, providing reliable data for the classification of coffee aromas using the e-nose system [25], [26].

3.1 Hardware Design

Figure 1 shows the e-nose hardware design used to classify Aceh Gayo Wine Coffee, Lein Coffee, and Toraja Coffee types based on their aroma. In Table 2, the sensors used include MQ-5, MQ-4, MQ-3, and MQ-135 gas sensors, which were arranged to form a sensor array as input to the Arduino Uno, as well as DHT-22 sensor. Liquid Crystal Display (LCD) is a device that can display numeric characters, letters, and other symbol characters [27], [28]. In this coffee-type classification system, LCD data from sensor readings was used.

Figure 1. E-nose hardware design

The DHT-22, or AM2302, sensor was used to detect temperature and humidity. This sensor has an output in the form of a digital signal and converts and calculates it using an integrated eight-bit Microcontroller Unit (MCU) [29]. The DHT-22 sensor was used to read the temperature and humidity of the coffee steam. The DHT-22 was accurately calibrated by adjusting the room temperature compensation with the coefficient value stored in the integrated One-Time Programmable (OTP) memory.

The MQ-5 sensor is a semiconductor sensor used to measure gas [30]. MQ-5 is capable of detecting gases such as butane $\left(\mathrm{C}_4 \mathrm{H}_{10}\right)$, propane $\left(\mathrm{C}_3 \mathrm{H}_8\right)$, ethanol $\left(\mathrm{CH}_3 \mathrm{CH}_2 \mathrm{OH}\right)$, methane $\left(\mathrm{CH}_4\right)$, carbon monoxide $(\mathrm{CO})$, hydrogen $\left(\mathrm{H}_2\right)$, and other hydrocarbon gases. The output of MQ-5 is in the form of analog resistance. When MQ-5 detects gas, the sensor conductivity and the increasing gas concentration increase.

The MQ-4 sensor is an electronic device used to measure the levels of compressed natural gas (CNG), primarily methane gas $\left(\mathrm{CH}_4\right)$, and is the simplest form of hydrocarbon [31]. The material of MQ-4 is $\mathrm{SnO}_2$. Conductivity increases proportionately to the increase in gas concentration detected by the MQ4 sensor.

The MQ-3 sensor is a sensor that can detect the presence of alcohol gas at a lower price than other types of gas sensor series, with almost the same level of sensor sensitivity. However, the MQ-3 sensor consumes quite a lot of power when compared to other types of gas sensors, which is around 750 mW [32]. The MQ-3 sensor was used to respond to the alcohol gas content in coffee steam.

MQ-135 is an air sensor that is useful for measuring levels of sulfur gas/sulfur-hydroxide $\left(\mathrm{H}_2 \mathrm{~S}\right)$, carbon dioxide $\left(\mathrm{CO}_2\right)$, benzene $\left(\mathrm{C}_6 \mathrm{H}_6\right)$, alcohol/ethanol $\left(\mathrm{C}_2 \mathrm{H}_5 \mathrm{OH}\right)$, sodium-(di)oxide $\left(\mathrm{NO}_{\mathrm{x}}\right)$, ammonia $\left(\mathrm{NH}_3\right)$, and other gases. MQ 135 outputs air quality measurement results in changes in analog resistance values on its output pin. MQ-135 operates at a voltage of 5 volts, and the output signal is analog [33], [34]. Table 2 shows these sensors.

Figure 1 shows the working system. The analog signals from the gas sensors, such as the MQ-5, MQ-4, MQ-3, and MQ-135, are calibrated and converted into meaningful concentration values through a well-established process. Each sensor measures changes in resistance when exposed to specific gases. Since this relationship is typically nonlinear, the sensors are calibrated by exposing them to known concentrations of gases like methane, ethanol, and ammonia. The sensor resistance, which varies with gas concentration, is measured by the Arduino Uno. The readings are then processed and adjusted based on environmental factors, such as temperature and humidity, which are monitored by the DHT-22 sensor. These adjustments are crucial for ensuring that the data accurately reflects the gas concentration, allowing for precise classification of coffee aromas based on their unique volatile compounds. By considering these variables, the system ensures that the gas concentration data derived from the sensors is reliable for differentiating between the coffee types.

Table 2. Specification of sensors

Sensor

Figure

Parameters of Specification

DHT-22 sensor [20], [35]

Model: DHT22

Power supply: 3.3-6 V DC

Output signal: Digital signal via single bus

Sensing element: Polymer capacitor

Operating range: Humidity: 0-100% RH; Temperature: -40∼80${ }^{\circ} \mathrm{C}$

Accuracy: Humidity: ±2% RH (Max ±5% RH); Temperature: <±0.5${ }^{\circ} \mathrm{C}$

Resolution or sensitivity: Humidity: 0.1% RH; Temperature: 0.1${ }^{\circ} \mathrm{C}$

Repeatability: Humidity: ±1% RH; Temperature: ±0.2${ }^{\circ} \mathrm{C}$

Humidity hysteresis: ±0.3% RH

Long-term stability: ±0.5% RH/year

Sensing period: Average: 2 s

Interchangeability: Fully interchangeable

Dimensions: Small size: 14*18*5.5 mm; Big size: 22*28*5 mm

MQ-5 sensor [36]

Model: MQ-5

Sensor type: Semiconductor

Standard encapsulation: Bakelite, metal cap

Target gas: LPG, CH4

Detection range: 300∼10000 ppm (CH4, C3H8)

Loop voltage: ≤ 24 V DC

Heater voltage: 5.0V ± 0.1V AC or DC

Load resistance: Adjustable

Heater resistance: 26Ω ± 3% (room temp)

Heater consumption: ≤ 950mW

Sensitivity: Rs (in air) / Rs (in 2000 ppm C3H8) >5

Output voltage: 2.5 V∼4.0 V (in 2000 ppm C3H8)

Concentration slope: ≤ 0.6 (R3000 ppm / R1000 ppm C3H8)

Temperature, humidity: 20${ }^{\circ} \mathrm{C}$ ± 2${ }^{\circ} \mathrm{C}$; 55% ± 5% RH

Standard test circuit: Vc: 5.0 V±0.1 V; Vh: 5.0 V±0.1 V

Preheat time: Not less than 48 hours

O2 content: 21% (not less than 18%) O2 concentration affects initial value, sensitivity and repeatability.

Preheat time: Over 48 hours

MQ-4 sensor [37]

Model: MQ-4

Sensor type: Semiconductor

Circuit voltage: 5V ± 0.1

Heating voltage: 5V ± 0.1

Load resistance: 20KΩ

Detection range: Natural gas, methane

Heater resistance: 33Ω ± 5%

Heating consumption: Less than 750 mW

Using temp: -10${ }^{\circ} \mathrm{C}$-50${ }^{\circ} \mathrm{C}$

Storage temp: 20${ }^{\circ} \mathrm{C}$-70${ }^{\circ} \mathrm{C}$

Related humidity: Less than 95% RH

Oxygen concentration: 21% (standard condition) oxygen concentration can affect sensitivity

Sensing resistance: 10 KΩ − 60 KΩ(1000ppmCH4)

Concentration slope rate: ≤ 0.6

Temperature, humidity: 20${ }^{\circ} \mathrm{C}$ ± 2${ }^{\circ} \mathrm{C}$; 65% ± 5%RH

Standard test circuit: Vc: 5.0 V±0.1 V; Vh: 5.0 V±0.1 V

Preheat time: Over 24 hours

MQ-3 sensor [21]

Model: MQ-3

Sensor type: Semiconductor

Standard encapsulation: Bakelite (Black Bakelite)

Detection gas: Alcohol gas

Concentration: 0.04-4 mg/l alcohol

Loop voltage: ≤ 24 V DC

Heater voltage: 5.0 V ± 0.2V AC or DC

Load resistance: Adjustable

Heater resistance: 31Ω ± 3Ω (room temp)

Heater consumption: ≤ 900 mW

Sensing resistance: 2 KΩ − 20 KΩ (in 0.4 mg/ 1 alcohol)

Sensitivity: Rs ( in air ) / Rs (0.4mg/L alcohol ) ≥ 5

Slope: ≤ 0.6 (R300ppm/R100ppm alcohol)

Temperature, humidity: 20${ }^{\circ} \mathrm{C}$ ± 2${ }^{\circ} \mathrm{C}$; 65% ± 5% RH

Standard test circuit: Vc: 5.0 V± 0.1 V; Vh: 5.0 V± 0.1 V

Preheat time: Over 48 hours

MQ-135 sensor [38]

Model: MQ-135

Sensor type: Semiconductor

Standard encapsulation: Bakelite, metal cap

Target gas: Ammonia gas, sulfide, benzene series steam

Detection range: 10∼1000 ppm (ammonia gas, toluene, hydrogen, smoke)

Loop voltage: ≤ 24 V DC

Heater voltage: 5.0 V ± 0.1V AC or DC

Load resistance: Adjustable

Heater resistance: 29Ω ± 3Ω (room temp)

Heater consumption: ≤ 950 mW

Sensitivity: Rs (in air) / Rs (in 2000 ppm H2 > 5

Output voltage: 2.0 V ∼ 4.0 V (in 400 ppm H2 )

Concentration slope: ≤ 0.6(R400ppm/R100 ppmH2)

Temperature, humidity: 20${ }^{\circ} \mathrm{C}$ ± 2${ }^{\circ} \mathrm{C}$; 55% ± 5% RH

Standard test circuit: Vc: 5.0 V± 0.1 V; Vh: 5.0 V± 0.1 V

Preheat time: Not less than 48 hours

3.2 Software Design

The software design of the e-nose system to classify coffee types based on their aroma is presented in Figure 2. In the coffee type identification system based on its aroma by implementing e-nose, the NBC method was used to classify coffee types by processing data on gas content, humidity, and coffee steam temperature. NBC is a machine learning method that calculates the probability of class membership [39] in a more straightforward way. NBC is based on Bayes' theorem, which has classification capabilities similar to neural networks and decision trees [40]. Eq. (1) is the general form of the Bayes theorem equation [41].

$P\left(C_j \mid D\right)=\frac{P\left(D \mid C_j\right) P\left(C_j\right)}{P(D)}$
(1)

where, $D$ is data with an unknown class; $C_j$ is the hypothesis of data $D$ which is a specific class; $P\left(C_i \mid D\right)$ is the probability of hypothesis $C_j$ based on condition $D$ (posterior prob.); $P\left(D \mid C_j\right)$ is the probability of $D$ based on that condition; $P\left(C_j\right)$ is the probability of Hypothesis $C_i$ (prior prob.); and $P(D)$ is the probability of $D$.

NBC is well-suited for the e-nose system due to its ability to handle multiple features, such as gas content, humidity, and temperature, which are crucial in classifying coffee types based on aroma. It is computationally efficient, making it ideal for embedded systems like Arduino, which have limited processing power. Additionally, NBC offers a probabilistic classification approach, proving effective even in noisy or uncertain sensor data. While NBC assumes that features are conditionally independent, a simplification that may not hold perfectly in real-world sensor data generally performs well despite this limitation.

The training process for NBC involves collecting sensor data for each coffee type, extracting relevant features, and estimating prior probabilities and likelihoods for each class. Once trained, the classifier calculates the posterior probability for each coffee type based on new sensor data, selecting the class with the highest probability. This straightforward yet powerful method enables the system to classify different coffee types based on their aroma efficiently.

3.3 Classifier Evaluation

According to Figure 2, several data preprocessing steps were applied before feature extraction and classification to ensure the quality and consistency of the data collected by the e-nose system. First, sensor calibration is crucial to correct any inaccuracies or drift in the sensors, ensuring that the readings from the MQ-5, MQ-4, MQ-3, MQ-135, and DHT-22 sensors are accurate. Noise filtering was also applied to smooth out any fluctuations in sensor data, which are common in gas sensor readings due to environmental factors. This can be achieved using smoothing filters, such as moving averages or low-pass filters. Additionally, any missing data was handled through imputation methods, such as replacing missing values with the mean or median or removing the affected data points altogether [42].

Figure 2. E-nose flowchart for coffee aroma classification

To ensure that all features contribute equally to the classification process, scaling or normalization techniques were used to adjust the sensor data into a standard range or standardize the values to have zero mean and unit variance. Outlier detection is also essential, as extreme values in the data, such as unusually high or low readings, can negatively impact model performance. By identifying and handling these outliers, the model is less likely to be influenced by erroneous data points [43].

Feature engineering plays a role in enhancing the dataset by extracting additional meaningful features or aggregating sensor data over time to capture trends. Feature selection is another step where irrelevant or redundant features are removed, ensuring that only the most relevant data is used for classification. In some cases, data transformation techniques, such as logarithmic or exponential scaling, may be applied to make the data more suitable for classification. Finally, if the dataset is small or unbalanced, data augmentation methods, such as adding noise or synthesizing new samples, can be used to improve the classifier’s generalization ability [7].

Once these preprocessing steps are completed, the clean and transformed data is ready for classification with the Naive Bayes algorithm, which can classify the coffee aroma based on the prepared features. These preprocessing steps ensure that the raw sensor data is optimized, improving the accuracy and reliability of the classification process [13].

4. Results and Discussion

4.1 Tool Design Result

The system designed in Figure 3 aims to read the aroma of coffee through the steam produced from brewed coffee. The main components in this design include an LCD screen, a sensor array, an Arduino, and a battery. The LCD screen displays the results of sensor readings in real time, making it easier for users to monitor data. The sensor array, consisting of MQ-5, MQ-4, MQ-3, MQ-135, and DHT-22, was placed on the top of the device to capture coffee steam because steam tends to move upwards optimally. Arduino functions as the central data processor, reading sensor signals, processing them, and displaying the results on the screen. A battery was used to power this system. Therefore, it is portable and can be used in various locations, supporting the flexibility of testing in multiple places.

Figure 3. Tool design

Each sensor has a specific function to detect certain chemicals in coffee steam. The MQ-3 sensor detects alcohol and organic compounds, such as ethanol, which are relevant for measuring aromatic components in coffee steam. The MQ-4 is used to detect methane, which can appear due to the organic decomposition process during brewing. The MQ-5 sensor can detect methane and Liquefied Petroleum Gas (LPG), expanding the detection scope to include hydrocarbon gases. At the same time, the MQ-135 is designed to detect ammonia, carbon dioxide, and other organic compounds, providing the ability to analyze volatile gases in coffee steam. In addition, the DHT-22 sensor measures temperature and humidity, ensuring that measurements are carried out in controlled environmental conditions, making the results more accurate.

This system works by capturing coffee steam through an array of sensors. Arduino then processes the data from each sensor to calculate the concentration of substances such as ethanol, methane, alcohol, and ammonia. The information is displayed directly on the LCD screen so that users can monitor the analysis results quickly and in real time. By combining the functions of various sensors, this system can provide an in-depth analysis of the chemical content in coffee steam, helping to distinguish the quality or type of coffee based on the aromatic compounds produced.

The main advantages of this design are its portability powered by a battery, the broad detection capability of the sensor combination, and the ease of monitoring the results. The system also has the potential to be further developed, for example, by adding a WiFi or Bluetooth module for wireless data transmission to other devices. The collected data can be further analyzed using the NBC method to identify aroma patterns or even classify coffee based on the chemical profile of its steam. This approach provides a more comprehensive picture of the aroma characteristics of coffee, which can support further research and development in this area.

4.2 E-Nose Reading Result

The e-nose reading test was carried out 15 times on each type of coffee that had been brewed to produce coffee steam. The results of the e-nose reading on 15 samples of Aceh Gayo Wine Coffee are presented in Figure 4. Based on the results of the e-nose reading in Figure 4 (Aceh Gayo Wine Coffee sample), it is known that the MQ-4 sensor (methane) shows the highest response value with an average ADC of 500.33, indicating that the methane content in the sample is more dominant than other gases. Conversely, the MQ-3 sensor (alcohol) recorded the lowest response value with an average ADC of 150.67, indicating that the alcohol content in the sample was relatively low. The MQ-5 sensor (ethanol) shows a reasonably high response value, indicating the presence of significant ethanol, which may be related to the fermentation process in making coffee wine. Meanwhile, the MQ-135 sensor (ammonia) recorded a response value below methane and ethanol but higher than alcohol, indicating the presence of ammonia content, which may come from nitrogen compounds from fermentation or protein degradation. In addition, although the test was carried out in various humidity and temperature conditions, the sensor response pattern was relatively stable, indicating that the gas composition in the coffee sample is not too affected by changes in environmental conditions. These results show that Aceh Gayo Wine Coffee has a dominant methane gas content, followed by ethanol, with lower levels of ammonia and alcohol.

Figure 4. Result of e-nose reading on Aceh Gayo Wine Coffee samples

The results of e-nose readings on 15 Lein Coffee samples are presented in Figure 5. Based on the results of Figure 5, sensor readings on the aroma of Lein Coffee, the MQ-4 (methane) sensor showed the highest response value with an average ADC of 494.67, indicating that the methane content in the aroma of Lein coffee is more dominant than other gases detected. Conversely, the MQ-3 (alcohol) sensor recorded the lowest response value with an average ADC of 153.4, indicating that the alcohol content in the sample was relatively low. The MQ-5 (ethanol) sensor gave a reasonably high response, although not as high as methane, indicating the presence of significant ethanol in the aroma of this coffee. Meanwhile, the MQ-135 (ammonia) sensor recorded a response value below methane and ethanol but higher than alcohol, indicating the presence of ammonia, which likely came from nitrogen compounds or fermentation reactions.

Figure 5. Sensor reading results for Lein Coffee aroma

In addition, the figure shows that the response patterns of the four sensors are relatively consistent across the various humidity and temperature conditions tested, with values that are not too fluctuating. This indicates stability in detecting the aroma gas composition of Lein Coffee despite environmental changes. Overall, Lein Coffee has aroma characteristics dominated by methane, followed by ethanol, with moderate ammonia and low alcohol levels. These results reflect the presence of specific chemical processes in the aroma of coffee that are typical of this type of coffee.

The results of e-nose readings on 15 Toraja Coffee samples are presented in Figure 6. The MQ-4 (methane) sensor showed the highest response value with an average ADC of 518.67, indicating that methane content dominates the smell of this coffee compared to other gases. Conversely, the MQ-3 (alcohol) sensor recorded the lowest response value with an average ADC of 156.87, indicating that the alcohol content in the sample is relatively small. The MQ-5 (ethanol) sensor showed a reasonably high response value, although lower than methane, indicating the presence of significant ethanol as one of the aroma components. The MQ-135 (ammonia) sensor had a response value below methane and ethanol but higher than alcohol, indicating the presence of moderate ammonia content, possibly originating from nitrogen compounds from the fermentation process or organic decomposition.

Figure 6. Sensor reading results on the aroma of Toraja Coffee

The figure shows that the response pattern of each sensor tends to be stable despite variations in humidity and temperature. This shows the consistency of e-nose detection of the gas composition in the aroma of Toraja Coffee in various environmental conditions. Toraja Coffee has an aroma dominated by methane, followed by ethanol, with moderate ammonia and the lowest alcohol levels. These results reflect the distinctive smell of Toraja Coffee, which may be related to the processing or fermentation process typical of the region.

4.3 Classification Results Using the Naive Bayes Classifier Method

Table 3 shows the results of classifying types of Aceh Gayo Wine Coffee, Lein Coffee, and Toraja Coffee based on their aroma using the NBC method and the validation technique used, which is $k$-fold cross-validation with $k=10$.

Table 3 shows the classification results using the NBC method. The average correctness rate of 82.22% indicates that this method is reliable for classifying Aceh Gayo Wine, Lein, and Toraja coffee aroma. Based on the classification, Toraja Coffee has the highest correctness rate of 93.33%, Lein Coffee at 80%, and Aceh Gayo Wine Coffee at 73.33%. The high correctness rate in Toraja Coffee indicates that the aroma of this coffee has a more distinctive and consistent gas pattern, making it easier for the NBC model to recognize. Conversely, Aceh Gayo Wine Coffee has the lowest correctness rate, which can be caused by a more complex gas pattern or tends to be similar to other types of coffee.

Table 3. Results of classification using the Naive Bayes Classifier method

No.

Types of Coffee

Classification Results

% Truth

Correct

Wrong

1

Aceh Gayo Wine Coffee

11

4

73.33

2

Lein Coffee

12

3

80

3

Toraja Coffee

14

1

93.33

Average Percentage of Correctness

82.22

From the sensor reading graph, Toraja Coffee has the highest MQ-4 (methane) sensor response value with an average ADC of 518.67, followed by Aceh Gayo Wine Coffee (500.33) and Lein Coffee (494.67). The high and stable methane content in Toraja Coffee is likely a factor that makes it easier to classify. Meanwhile, despite having a high methane content, Aceh Gayo Wine Coffee shows a more even variation in other gas content (such as ethanol, alcohol, and ammonia), making it more difficult to distinguish by the model.

In addition, the figure shows the stability of the reading patterns of the four sensors (MQ-5 for ethanol, MQ-4 for methane, MQ-3 for alcohol, and MQ-135 for ammonia) at various humidity and temperatures, both in Aceh Gayo Wine Coffee, Lein Coffee, and Toraja Coffee. However, the ADC value of the MQ-3 sensor (alcohol) is always the lowest in all three types of coffee, indicating minimal alcohol content, which may be less significant in affecting the classification results. The high ADC value for methane (MQ-4) in Toraja Coffee can provide a more distinctive pattern, thereby increasing classification accuracy.

There are some additional analyses as follows:

a) Sensor response stability: All four sensors showed high stability across various environmental conditions (humidity and temperature). This stability supports the reliability of the NBC method in utilizing gas patterns for classification.

b) Distinctive aroma profile: The high level of truth in Toraja Coffee indicates that the aroma of this coffee has a more distinctive gas profile, mainly due to the high and relatively consistent methane content. In contrast, the more complex aroma profile of Aceh Gayo Wine Coffee causes a more significant challenge in its classification.

c) Improvement opportunities: To improve classification accuracy, especially for Aceh Gayo Wine Coffee, other features can be added, such as minor gas data that is not detected by the primary sensor or using different classification algorithms such as Random Forest (RF) or Support Vector Machine (SVM) to address more complex gas patterns.

d) Sensor significance: The MQ-4 (methane) sensor plays a significant role in distinguishing coffee types, considering that methane content tends to be the dominant marker in all three coffee types. The MQ-3 (alcohol) sensor has the lowest and most stable value, indicating that alcohol content may be less relevant in influencing aroma differences.

In addition, the figure shows the stability of the reading patterns of the four sensors. Overall, the average correctness rate of 82.22% indicates that the NBC method is quite effective in classifying coffee aroma based on gas patterns, especially for types of coffee with distinctive aroma profiles such as Toraja Coffee. Combining feature and algorithm improvements can further improve accuracy for types of coffee with more complex aroma patterns, such as Aceh Gayo Wine Coffee.

4.4 Classifier Evaluation Results Using Confusion Matrix

The results of the NBC evaluation using the confusion matrix table are presented in Table 4.

Table 4. Assessment of classifier performance through confusion matrix analysis

n = 45

Classified

Aceh Gayo Wine Coffee

Lein Coffee

Toraja Coffee

Original Data

Aceh Gayo Wine Coffee

11

3

1

Lein Coffee

3

12

0

Toraja Coffee

1

0

14

The confusion matrix in Table 4 has the accuracy obtained at 82.2%, indicating quite good performance in classifying the aroma of Aceh Gayo Wine Coffee, Lein Coffee, and Toraja Coffee. From the confusion matrix, the following can be observed:

a) Aceh Gayo Wine Coffee was correctly classified in 11 instances, but 3 samples were incorrectly classified as Lein Coffee, and 1 sample needed to be correctly classified as Toraja coffee.

b) Lein Coffee was accurately classified in 12 instances, but 3 samples were incorrectly classified as Aceh Gayo Wine Coffee.

c) Toraja Coffee performed the best, with 14 instances correctly classified and only 1 instance incorrectly classified as Aceh Gayo Wine Coffee.

The accuracy value of 0.822 indicates that, overall, NBC can classify coffee aroma well. However, for metrics such as precision, recall, and F1-score, it is seen that Toraja Coffee has a better value than other coffees, indicating that the aroma of this coffee has a more unique and easily recognizable gas profile.

4.5 Comparison with the Results of Previous Research

This study identifies the aromas of coffee (Aceh Gayo Wine, Lein, and Toraja) using the NBC method, achieving an overall accuracy of 82.22%. Toraja Coffee shows the highest accuracy at 93.33%, while Aceh Gayo Wine Coffee has the lowest at 73.33%, likely due to its more complex and less distinctive aroma profile. The study also highlights the significant role of the MQ-4 (methane) sensor in differentiating coffee types, with Toraja Coffee exhibiting the highest methane levels.

When compared to the referenced studies, there are both similarities and differences. Susanti et al. [18] also used an NBC model with MQ sensors to demonstrate reliable coffee classification, which is similar to the findings of this study. In this study, gases like methane (MQ-4) are also crucial for classification. On the other hand, Selvanarayanan et al. [19] employed HAC and machine learning frameworks, focusing on classifying coffee aromas into odor classes like floral and roasted rather than using sensors. The research relies more on clustering techniques, while this study focuses on using sensor data for classification.

Susanti et al. [18] and Selvanarayanan et al. [19] developed ANN-based models for aroma intensity classification and compound prediction and achieved higher accuracy (98%) in predicting specific aroma compounds. This differs from this study, which focuses on overall aroma classification based on sensor responses rather than predicting individual compounds. Additionally, Susanti et al. [18] identified volatile gases, which also aligns with this study in measuring VOCs using TGS sensors and correlating gas concentration with conductivity changes.

The critical difference between this study and the referenced ones is the accuracy. Studies using clustering techniques or ANN-based models report higher accuracy, especially in compound prediction, while this study with the NBC shows a moderate accuracy of 82.22%. Furthermore, although this study relies on MQ sensors, others focus more on broader gas detection or compound profiling. Methodologically, while other studies use advanced machine learning techniques like hierarchical clustering or ANN, this study uses the more straightforward yet effective NBC model. This indicates room for improving classification accuracy, especially for more complex coffee aromas like Aceh Gayo Wine Coffee, by adding additional features or experimenting with algorithms like RF or SVM.

5. Conclusions and Recommendations for Further Research

5.1 Conclusions

a) Sensor response analysis

Measurements using an e-nose based on a series of gas sensors (DHT-22, MQ-5, MQ-4, MQ-3, and MQ-135) showed the following results:

$\bullet$ The highest gas levels in Aceh Gayo Wine Coffee, Lein Coffee, and Toraja Coffee were detected by the MQ-4 sensor, which is sensitive to methane.

$\bullet$ The MQ-3 sensor, sensitive to alcohol, detected the lowest gas levels. These results indicate differences in the content of the main volatile compounds in the aroma of coffee that distinguish between the types of coffee tested.

b) NBC performance evaluation

Based on the evaluation results using the confusion matrix, the NBC method performed exceptionally well in classifying coffee types. The accuracy obtained was 82.2%, with precision and recall indicating the model's ability to recognize and distinguish classes well. The F1-score value approaching accuracy suggests a balance between precision and recall. Therefore, this method is considered adequate for classifying coffee types based on e-nose data.

5.2 Recommendations for Further Research

For testing to produce more accurate and representative data, the following steps need to be taken:

a) Air sterilization in the test box. The test box environment must be free from gas contamination or other volatile compounds that can affect sensor readings. This can be done by:

$\bullet$ Using an air filtration system (air purifier) to remove particles and residual gases.

$\bullet$ Isolating the test box from external environmental influences.

b) Improvement of coffee aroma extraction techniques. To produce more robust and more consistent aroma vapor, coffee grounds should be brewed with hot water according to standard parameters (e.g., temperature of 90-95$^{\circ} \mathrm{C}$ and brewing time of 3-5 minutes). This step allows volatile compounds characteristic of coffee aroma to be optimally detected by the gas sensor.

c) Adding sensors to diversify data. Integrating other sensors sensitive to specific volatile compounds, such as carbon dioxide $\left(\mathrm{CO}_2\right)$ or sulfur dioxide $\left(\mathrm{SO}_2\right)$, can help expand the scope of analysis. This allows for more detailed classification.

d) Testing under various environmental conditions. Testing under various environmental conditions (e.g., varying temperature and humidity) can be conducted to ensure the generalizability and reliability of the model in real-world situations.

These steps are expected to improve measurement accuracy and the classification performance of the NBC method in distinguishing coffee types.

5.3 Future Research Direction and Integration

The scalability and generalizability of the e-nose system are promising, as it can be easily extended to classify other coffee varieties or even adapted for different aroma classification tasks. The system's core principle of detecting and analyzing volatile compounds in the aroma is versatile, and by adjusting the sensor array or modifying calibration settings, it can be tailored to accommodate different types of coffee or even other products with distinct aroma profiles, such as tea, wine, or spices. With sufficient data and proper training, the model could generalize well across various coffee types and environmental conditions, allowing for broad applications beyond the coffee industry.

Future research directions should focus on enhancing the system’s capability by integrating advanced sensors. These sensors could be more sensitive to specific volatile compounds, expanding the range of aromas that can be detected. For instance, incorporating sensors that detect specific organic compounds, such as aldehydes or esters, would improve the system's ability to differentiate between nuanced aroma profiles in coffee. Moreover, exploring alternative classification algorithms beyond Naive Bayes, such as deep learning models or SVMs, could improve classification accuracy and robustness, mainly when dealing with complex, high-dimensional data from the e-nose.

Another exciting avenue for future research is developing a portable e-nose device. By miniaturizing the system and optimizing it for real-time data acquisition, a portable e-nose could be used by producers, roasters, or even consumers to assess coffee quality on-site, providing immediate feedback. This would allow for quality control in the field, making the technology more accessible and practical for everyday use. Additionally, the integration of wireless communication could enable remote monitoring and data collection, further enhancing the versatility and convenience of the system.

The economic benefits of such technology are significant. For producers, the ability to automatically classify coffee and assess its quality could reduce labor costs and increase throughput. Additionally, it could provide an opportunity to differentiate high-quality coffee in the market, potentially leading to higher sales and brand recognition. Such advancements could also be extended to supply chain management, helping producers and roasters better understand the properties of their beans as they move through different processing stages. By developing more robust systems and incorporating additional sensors, the e-nose could also improve sustainability in coffee production by identifying inefficient practices or subpar quality early in the process, reducing waste, and optimizing resource usage. Ultimately, future research should focus on refining sensor technologies and expanding the range of compounds detected, leading to more accurate, real-time monitoring of coffee quality from farm to cup.

Overall, by refining sensor technologies, exploring new classification algorithms, and developing portable solutions, the e-nose system can revolutionize coffee production and quality control and be adapted for various applications in aroma-based classification.

5.4 Challenges and Limitations Encountered

Several challenges and limitations were encountered during the development and testing of the e-nose system. One of the primary challenges was the sensitivity and calibration of the sensors. Environmental variables, such as temperature and humidity, can influence sensor readings, causing inconsistencies that affect the accuracy of measurements. Moreover, while the sensors can detect various volatile compounds, the complexity of coffee aroma made it difficult to distinguish subtle differences between coffee types, especially given the wide variety of compounds involved. This complexity requires a more refined sensor array to capture all the relevant aroma characteristics. Data variability also posed a challenge, as differences in coffee samples, such as variations in roast levels, storage conditions, or geographical origin, could impact the sensor responses, making consistent data collection difficult. Additionally, integrating e-nose technology into existing coffee production systems presents technical hurdles, including seamless integration with current machinery and adjusting calibration settings as the system is scaled. These challenges highlight the need for further refinement of both the sensors and the experimental protocols to enhance the accuracy and applicability of the e-nose in real-world coffee production environments.

Data Availability

The data used to support the research findings are available from the corresponding author upon request.

Conflicts of Interest

The authors declare no conflict of interest.

References
1.
S. Najiyati, Kopi: Budidaya dan Penanganan Lepas Panen. Jakarta: Penebar Swadaya, 1990. [Google Scholar]
2.
J. J. Spillane, Komoditi Kopi: Peranannya Dalam Perekonomian Indonesia. Kanisius Publishing House, 1990. [Google Scholar]
3.
E. Mahmoudi, “Electronic nose technology and its applications,” Sens. Transducers J., vol. 107, no. 8, pp. 17–25, 2009. [Google Scholar]
4.
B. R. Suteja, “Penerapan jaringan saraf tiruan propagasi balik studi kasus pengenalan jenis kopi,” J. Inform., vol. 3, no. 1, pp. 49–62, 2007. [Google Scholar]
5.
J. Z. Tan and J. Xu, “Applications of electronic nose (e-nose) and electronic tongue (e-tongue) in food quality-related properties determination: A review,” Artif. Intell. Agric., vol. 4, pp. 104–115, 2020. [Google Scholar] [Crossref]
6.
S. Dragonieri, R. Schot, B. J. A. Mertens, S. L. Cessie, S. A. Gauw, A. Spanevello, O. Resta, N. P. Willard, T. J. Vink, K. F. Rabe, E. H. Bel, and P. J. Sterk, “An electronic nose in the discrimination of patients with asthma and controls,” J. Allergy Clin. Immunol., vol. 120, no. 4, pp. 856–862, 2007. [Google Scholar] [Crossref]
7.
A. D. Wilson, “Applications of electronic-nose technologies for noninvasive early detection of plant, animal and human diseases,” Chemosensors, vol. 6, no. 4, p. 45, 2018. [Google Scholar] [Crossref]
8.
F. A. Aditama, L. Zulfikri, L. Mardiana, T. Mulyaningsih, N. Qomariyah, and R. Wirawan, “Electronic nose sensor development using ANN backpropagation for lombok agarwood classification,” Res. Agric. Eng., vol. 66, no. 3, pp. 97–103, 2020. [Google Scholar] [Crossref]
9.
D. Rabersyah, Firdaus, and Derisma, “Identifikasi jenis bubuk kopi menggunakan electronic nose dengan metode pembelajaran backpropagation,” J. Nas. Tek. Elektro, vol. 5, no. 3, pp. 332–338, 2016. [Google Scholar] [Crossref]
10.
S. Ampuero and J. O. Bosset, “The electronic nose applied to dairy products: A review,” Sensors Actuators B Chem., vol. 94, no. 1, pp. 1–12, 2003. [Google Scholar] [Crossref]
11.
A. D. Wilson, “Diverse applications of electronic-nose technologies in agriculture and forestry,” Sensors, vol. 13, no. 2, pp. 2295–2348, 2013. [Google Scholar] [Crossref]
12.
L. Lu, Z. Q. Hu, X. Q. Hu, D. Li, and S. Y. Tian, “Electronic tongue and electronic nose for food quality and safety,” Food Res. Int., vol. 162, p. 112214, 2022. [Google Scholar] [Crossref]
13.
D. Berrar, “Bayes’ theorem and naive bayes classifier,” in Encyclopedia of Bioinformatics and Computational Biology, 2019, pp. 403–412. [Google Scholar] [Crossref]
14.
R. Ariyanto, D. Puspitasari, and Y. Alfani, “Penerapan entropy based discretization pada metode naive bayes dalam klasifikasi penyakit diabetes mellitus,” J. Inform. Polinema, vol. 6, no. 4, pp. 17–22, 2020. [Google Scholar] [Crossref]
15.
C. H. Lee, I. T. Chen, H. C. Yang, and Y. J. Chen, “An AI-powered electronic nose system with fingerprint extraction for aroma recognition of coffee beans,” Micromachines, vol. 13, no. 8, p. 1313, 2022. [Google Scholar] [Crossref]
16.
W. Wojnowski, T. Majchrzak, T. Dymerski, J. Gkebicķi, and J. Namieśnik, “Portable electronic nose based on electrochemical sensors for food quality assessment,” Sensors, vol. 17, no. 12, p. 2715, 2017. [Google Scholar] [Crossref]
17.
A. Berna, “Metal oxide sensors for electronic noses and their application to food analysis,” Sensors, vol. 10, no. 4, pp. 3882–3910, 2010. [Google Scholar] [Crossref]
18.
R. Susanti, Z. Zaini, A. Hidayat, N. Alfitri, and M. I. Rusydi, “Identification of coffee types using an electronic nose with the backpropagation artificial neural network,” Int. J. Informatics Vis., vol. 7, no. 3, pp. 659–664, 2023. [Google Scholar] [Crossref]
19.
R. Selvanarayanan, S. Rajandran, and Y. Alotaibi, “Using hierarchical agglomerative clustering in e-nose for coffee aroma profiling: Identification, quantification, and disease detection,” Instrum. Mes. Metrol., vol. 22, no. 4, pp. 127–140, 2023. [Google Scholar] [Crossref]
20.
T. Liu, “Digital humidity and temperature sensor,” Adfruit, 2016. https://cdn-shop.adafruit.com/datasheets/Digital+humidity+and+temperature+sensor+AM2302.pdf [Google Scholar]
21.
O. A. Comparator et al., “MQ-3 semi-conductor sensor for alcohol,” Expert Syst. Appl., vol. 2, no. 1, pp. 2025–2030, 2015. [Google Scholar]
22.
C. Gonzalez Viejo, E. Tongson, and S. Fuentes, “Integrating a low-cost electronic nose and machine learning modelling to assess coffee aroma profile and intensity,” Sensors, vol. 21, no. 6, p. 2016, 2021. [Google Scholar] [Crossref]
23.
M. Pardo and G. Sberveglieri, “Coffee analysis with an electronic nose,” IEEE Trans. Instrum. Meas., vol. 51, no. 6, pp. 1334–1339, 2002. [Google Scholar] [Crossref]
24.
M. S. Ramadhan and M. Rivai, “Sistem kontrol tingkat kekeruhan pada aquarium menggunakan arduino uno,” Jurnal Teknik ITS, vol. 7, no. 1, pp. A87–A91, 2017. [Google Scholar] [Crossref]
25.
J. A. B. Delmo, M. V. Villarica, and A. A. Vinluan, “Correlation analysis between sensors for sensing coffee variations,” in IEEE 18th International Colloquium on Signal Processing & Applications (CSPA), Selangor, Malaysia, 2022, pp. 220–224. [Google Scholar] [Crossref]
26.
Z. Arifin, S. D. Prasetyo, R. A. Rachmanto, W. E. Juwana, E. Yohana, and D. Widhiyanuriyawan, “Optimizing photovoltaic thermal collector temperature with varying number of collectors: A CFD simulation study,” Int. J. Heat Technol., vol. 41, no. 5, pp. 1255–1263, 2023. [Google Scholar] [Crossref]
27.
E. Permata, “Prototipe rele proteksi overheating pada motor 1 phasa berbasis mikrokontroler AT89C51,” SETRUM, vol. 4, no. 2, p. 45, 2015. [Google Scholar] [Crossref]
28.
S. Sutono, “Monitoring distribusi air bersih,” J. Ilm. SETRUM, vol. 5, no. 1, pp. 37–42, 2016. [Google Scholar] [Crossref]
29.
A. R. Putri and P. N. Rahayu, “Food warmer system based on DHT-22,” J. Adv. Res. Electr. Eng., vol. 4, no. 1, pp. 56–63, 2020. [Google Scholar] [Crossref]
30.
M. M. Amin, M. A. A. Nugratama, A. Maseleno, M. Huda, and K. A. Jasmi, “Design of cigarette disposal blower and automatic freshner using MQ-5 sensor based on ATmega 8535 microcontroller,” Int. J. Eng. & Technol., vol. 7, no. 3, pp. 1108–1113, 2018. [Google Scholar] [Crossref]
31.
D. Furuta, T. Sayahi, J. Li, B. Wilson, A. A. Presto, and J. Y. Li, “Characterization of inexpensive metal oxide sensor performance for trace methane detection,” Atmos. Meas. Tech., vol. 15, pp. 5117–5128, 2022. [Google Scholar] [Crossref]
32.
N. Neha, B. S. Krishnaprasad, and M. L. J. Shruthi, “Real-time Alcohol Detection and Response System with Arduino and MQ-3 Sensor Integration,” in 2023 7th International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC), Kirtipur, Nepal, 2023, pp. 1095–1103. [Google Scholar] [Crossref]
33.
K. B. K. Sai, S. Ramasubbareddy, and A. K. Luhach, “IoT based air quality monitoring system using MQ135 and MQ7 with machine learning analysis,” Scalable Comput., vol. 20, no. 4, pp. 599–606, 2019. [Google Scholar] [Crossref]
34.
S. Usha Rani, S. Rajarajeswari, J. G. Jaimon, and R. Ravichandran, “Real-time air quality monitoring system using MQ135 and thingsboard,” J. Crit. Rev., vol. 7, no. 18, pp. 4107–4115, 2020. [Google Scholar]
35.
T. Liu, “Digital-output relative humidity temperature sensor/module DHT22,” Aosong Electronics Co., Ltd. https://www.sparkfun.com/datasheets/Sensors/Temperature/DHT22.pdf [Google Scholar]
36.
Zhengzhou Winsen Electronics Technology Co. Ltd., “MQ-4 flammable gas sensor,” 2018. https://www.alldatasheet.com/datasheet-pdf/download/1304541/WINSEN/MQ-4.html [Google Scholar]
37.
Hanwei Electronics, “Technical data MQ-4 gas sensor,” 2018. https://www.sparkfun.com/datasheets/Sensors/Biometric/MQ-4.pdf [Google Scholar]
38.
Winsen, “MQ-135 air qualitygas sensor.” https://www.winsen-sensor.com/sensors/voc-sensor/mq135.html [Google Scholar]
39.
Y. B. Utomo and G. Harsanto, “Penerapan metode certainty factor dan naïve bayes untuk mendiagnosa penyakit akibat gigitan nyamuk,” Gener. J., vol. 4, no. 2, pp. 49–60, 2020. [Google Scholar] [Crossref]
40.
M. S. Anam, “Social assistance decision support system using the naive bayes method,” JTECS: J. Sist. Telekomun. Elektron. Sist. Kontrol Power Sist. dan Komput., vol. 1, no. 1, pp. 85–92, 2021. [Google Scholar]
41.
W. Zhang and F. Gao, “An improvement to naive bayes for text classification,” Procedia Eng., vol. 15, pp. 2160–2164, 2011. [Google Scholar] [Crossref]
42.
A. Rabehi, H. Helal, D. Zappa, and E. Comini, “Advancements and prospects of electronic nose in various applications: A comprehensive review,” Appl. Sci., vol. 14, no. 11, p. 4506, 2024. [Google Scholar] [Crossref]
43.
S. M. Chen, Y. C. Wang, and S. Choi, “Applications and technology of electronic nose for clinical diagnosis,” Open J. Appl. Biosens., vol. 2, no. 2, pp. 39–50, 2013. [Google Scholar] [Crossref]

Cite this:
APA Style
IEEE Style
BibTex Style
MLA Style
Chicago Style
GB-T-7714-2015
Erwanto, D., Rizal, R. F., Yuliana, D. E., Munir, M., Trisnoaji, Y., Harsito, C., Mahadi,A. A., & Prasetyo, S. D. (2024). Development and Application of an Electronic Nose System for Classifying Coffee Varieties Based on Aromatic Profiles. J. Intell Syst. Control, 3(3), 186-200. https://doi.org/10.56578/jisc030305
D. Erwanto, R. F. Rizal, D. E. Yuliana, M. Munir, Y. Trisnoaji, C. Harsito, A. A. Mahadi, and S. D. Prasetyo, "Development and Application of an Electronic Nose System for Classifying Coffee Varieties Based on Aromatic Profiles," J. Intell Syst. Control, vol. 3, no. 3, pp. 186-200, 2024. https://doi.org/10.56578/jisc030305
@research-article{Erwanto2024DevelopmentAA,
title={Development and Application of an Electronic Nose System for Classifying Coffee Varieties Based on Aromatic Profiles},
author={Danang Erwanto and Royb Fatkhur Rizal and Dian Efytra Yuliana and Misbahul Munir and Yuki Trisnoaji and Catur Harsito and Abram Anggit Mahadi and Singgih Dwi Prasetyo},
journal={Journal of Intelligent Systems and Control},
year={2024},
page={186-200},
doi={https://doi.org/10.56578/jisc030305}
}
Danang Erwanto, et al. "Development and Application of an Electronic Nose System for Classifying Coffee Varieties Based on Aromatic Profiles." Journal of Intelligent Systems and Control, v 3, pp 186-200. doi: https://doi.org/10.56578/jisc030305
Danang Erwanto, Royb Fatkhur Rizal, Dian Efytra Yuliana, Misbahul Munir, Yuki Trisnoaji, Catur Harsito, Abram Anggit Mahadi and Singgih Dwi Prasetyo. "Development and Application of an Electronic Nose System for Classifying Coffee Varieties Based on Aromatic Profiles." Journal of Intelligent Systems and Control, 3, (2024): 186-200. doi: https://doi.org/10.56578/jisc030305
ERWANTO D, RIZAL R F, YULIANA D E, et al. Development and Application of an Electronic Nose System for Classifying Coffee Varieties Based on Aromatic Profiles[J]. Journal of Intelligent Systems and Control, 2024, 3(3): 186-200. https://doi.org/10.56578/jisc030305
cc
©2024 by the author(s). Published by Acadlore Publishing Services Limited, Hong Kong. This article is available for free download and can be reused and cited, provided that the original published version is credited, under the CC BY 4.0 license.