# Real-Time Monitoring of Indoor Air Quality with Internet of Things-Based E-Nose
## 3 Materials and Methods  
Low air quality poses a significant health threat for individuals who spend most of their time indoors. Some pollutants such as tobacco smoke, CO, NO\({}_{2}\), formaldehyde, asbestos fibres, microorganisms and allergens are known to be closely related to health problems. Temperature and humidity monitoring are part of everyday life, but in the vast majority of buildings, real-time air quality monitoring is not performed. In this study, air quality measurement system with an IoT-based e-nose has been proposed for real-time, low-cost and easy-to-install air quality monitoring. With the proposed e-nose system the ambient temperature and humidity values are measured in real-time in addition to the polluting gases such as CO\({}_{2}\), CO, PM\({}_{10}\) and NO\({}_{2}\). Information on the presence of these monitoredgases in excessive quantities is transmitted to users via the mobile application as a notification. This is a completely wireless solution developed using the ESP32 module, which integrates the IEEE 802.11 b/g/n network protocol into the IoT architecture. The architecture of the proposed e-nose system is given in Figure 1. A real-time air quality monitoring system provides information about the concentration of pollutants in the environment. It provides precise and detailed information about the air quality of the living environment and helps to plan interventions that lead to improved air quality. The e-nose air quality monitoring system in Figure 1 consists of two parts: The first part is the detection and communication unit consisting of an ESP32 microcontroller-based sensor array with built-in Wi-Fi; and the second is the Android/iOS-based mobile user interface. The ESP32 module with a built-in Wi-Fi module is used in the e-nose system created for monitoring air quality. The low-cost and high-performance 32-bit controller is frequently preferred in IoT applications. An ESP32 has a dual-core structure and has many internal modules such as Wi-Fi, Bluetooth, RF, IR, CAN, Ethernet module, temperature sensor, hall effect sensor and touch sensor needed for smart home applications. In the ESP32 module structure, the Harvard Tensilica Xtensa LX6 32-bit Dual Core features a processor capable of operating at up to 240 MHz. The detection unit includes the sensors GP2Y1010 AU, MH-Z14, MICS-4514 and DHT22, which measure air quality parameters such as CO\({}_{2}\), CO, PM\({}_{10}\), NO\({}_{2}\), temperature and humidity. The GP2Y1010 AU is a dust sensor with an analogue output system. An infrared light-emitting diode (IRED) and a phototransistor are arranged across from each other. The IR beams reflected from dust entering the air chamber of the sensor is detected by the phototransistor and generates a corresponding voltage [32]. The MH-Z14A CO\({}_{2}\) sensor module uses the non-dispersive infrared (NDIR) principle. It measures between 0-5000 ppm, 5 ppm resolution with an accuracy of \(\pm\)50 ppm. The sensor module sends the CO\({}_{2}\) concentration in three different output modes: Serial output (RS-232), analogue output and pulse width modulation (PWM) [33]. The MICS-4514 is mainly used for measuring emissions from automobile exhausts but is also used for measuring concentrations of gases such as NO\({}_{2}\), CO and hydrocarbons. The sensor has a built-in heating element and a micro-sensing diaphragm on the upper side. The MICS-4514 includes two sensor chips with independent heaters and delicate layers. One sensor chip detects oxidizing gases (OX) and the other sensor detects reducing gases (RED) [34]. The DHT22 consists of two parts: A thermistor temperature sensor and a capacitive humidity sensor. The DHT22 is an advanced sensor unit that provides a calibrated digital signal output. It is equipped with an 8-bit microcontroller and has a short response time. It has a relative error of \(\pm\)0.5 \({}^{\circ}\)C  
Figure 1: The proposed e-nose system architecture. in temperature measurement and \(\pm\)2% rH in humidity measurement [35].