Keywords

22.1 Introduction

In recent years, increased industrialization and demand for transportation have contributed to air pollution which is negative impact on human health, ecosystem, and the global climate [1,2,3,4]. Many efforts have been done by local authorities to monitor air quality and reduce the impacts of air pollution on human health and the global environment [3]. In Malaysia, the Department of Environment (DOE) of Malaysia’s Ministry of Environment and Water oversees managing the air quality [5]. The air pollutant index (API) was used in Malaysia to define the status of air quality by using six different pollutants, which are sulfur dioxide (SO2), nitrogen dioxide (NO2), carbon monoxide (CO), ozone (O3), particulate matter with a diameter of less than 10 μm (PM10), and particulate matter with a diameter of less than 2.5 μm (PM2.5) [6]. This index closely follows the pollution standards index created by the United States Environmental Protection Agency (USEPA) in giving accessible comprehensive information about the level of air pollution. The API value is calculated by converting the concentration of air pollutants into a single number, nomenclature, and color that the public can easily understand. The API classifies air quality into five categories; (1) below 50 (good); (2) 51–100 (moderate); (3) 101–200 (unhealthy); (4) 201–300 (very unhealthy); and (5) more than 300 (hazardous) [6].

To measure the quality of air, the DOE has placed 52 continuous air quality monitoring stations (CAQMs) all over Malaysia in strategic places such as areas that have a high density of population and industrial activities [6, 7]. These monitoring stations are stationary and equipped with expensive and conventional analytical instruments, such as samplers and analyzers. The air samples are collected with the samplers and analyzed in specialized laboratories. The procedure at these monitoring stations provides precise and reliable data, and a wide range of air pollutants can be assessed and monitored. This procedure, on the other hand, is time-consuming, costly, and unscalable [3]. Because geography and anthropogenic activities have an impact on air quality, placing monitoring stations in suitable locations is important for effective air quality monitoring. Changes in land use activities need the relocation or addition of a new monitoring station, making this approach unscalable and challenging to implement owing to cost inefficiency in the monitoring station’s acquisition and maintenance [3].

The Internet of Things (IoT) has recently emerged as a new approach of linking a wide range of things over the internet. These things can obtain data or information from the real physical world and can be linked directly through wireless technologies such as 3G, LTE, 5G, Wi-Fi, or through a gateway [forming a local thing network (LTN)] to connect to the internet [8]. These things can be linked to other devices through a network to evaluate data collected from the information sensing equipment and make independent decisions [8]. This paper proposes a low-cost, portable, IoT-based, and real-time monitoring system that can measure the air quality in terms of temperature, humidity, and air pollution level. Using this proposed system, the users can monitor or access the air quality in their areas using their smartphones. The users also will get a notification message if API levels reach health-threatening values. The data can be viewed graphically through the smartphone.

22.2 Methodology

22.2.1 The Proposed System

The impact of air pollution on humans depends on the area of their production and dispersion. In this paper, we have developed an IoT-enabled air pollution system on smartphones, which simultaneously monitors real-time data of different air parameters; temperature, humidity, and air pollutants to determine the status of air quality.

22.2.2 Components Used in the Proposed System

22.2.2.1 Gas Sensor

Two gas sensors were used in this proposed system: DHT 22 and MQ135. A DHT 22 gas sensor was used to measure temperature and humidity in a particular area. The DHT 22 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 [1]. Meanwhile, a MQ 135 gas sensor is a SnO2 semiconductor which is used to measure air parameters such as NH3, NOx, alcohol, Benzene, smoke, and CO2 [9]. Due to its rapid reaction, high sensitivity, stability, and long life, the sensor offers a broad detection range. It is mostly used in offices, buildings, and houses to monitor air quality [10]. Table 22.1 shows the specification of the DHT 22 and MQ 135 gas sensors.

Table 22.1 Specification and value of the DHT 22 and MQ 135

22.2.2.2 Microcontroller

We utilized the Arduino Uno development kit, which includes the ATMega 328P microcontroller. The Arduino Uno is the simplest and widely used of the Arduino boards. It has 14 digital input/output (I/O) pins and 6 analog input pins, which are adequate for all components in this device [7]. The Arduino is a single-board microcontroller designed to enable the application of interactive objects or environments more accessible [11]. The hardware comprises an open-source hardware board designed around an 8-bit Atmel AVR microcontroller, or a 32-bit Atmel ARM. Table 22.2 shows the specification and values of the Arduino Uno.

Table 22.2 Specification and value of the microcontroller (Arduino Uno)

22.2.2.3 Wi-Fi Module

The ESP 8266 is a low-cost Wi-Fi microchip with a complete TCP/IP stack that allows the microcontroller to connect to a Wi-Fi network and make simple TCP/IP connections using Hayes-style instructions [12]. The module can function as an access point (creating a hotspot) and as a station (connecting to Wi-Fi), allowing it to quickly acquire data and upload it to the internet, making IoT as easy as possible. Table 22.3 displays the specification and values of the ESP 8266 Wi-Fi module.

Table 22.3 Specification of the ESP 8266 Wi-Fi module

22.2.2.4 Cloud Database

The free Blynk application was utilized in this paper; it is an IoT platform built for iOS and Android applications that enables the management of various controllers such as Raspberry Pi, ESP 8266, ESP 32, chipKIT, Intel, LeMarker, Onion Omega, SparkFun, and STM32 [1]. Air quality data such as temperature, humidity and air pollutant levels are saved and easily accessible via the Blynk cloud server service [10, 13].

22.2.3 Process of the Proposed System

The process of the proposed system, IoT-enabled air pollution system on smartphones is shown in Fig. 22.1. First, gas sensors are used to measure the air quality parameters, humidity, and temperature of an area. The following part of the process involves the use of the Arduino Uno as a microcontroller to process data from the gas sensors. Then, the data are transmitted to an IoT gateway which forwards it to a cloud database using the internet. In the cloud database, the data are analyzed to provide information on the air quality and shared through a smartphone app. This allows the users to easily assess the quality of air by using the smartphone apps in real-time and useful for the relevant authority to take remedial action and the community to take precautionary measures. The flowchart of the air pollution level system process is shown in Fig. 22.2.

Fig. 22.1
figure 1

Proposed system

Fig. 22.2
figure 2

Flowchart of process air pollution level system

22.2.4 Schematic Diagram

The schematic diagram of the proposed system is shown in Fig. 22.3. It shows the Arduino pin connections in the system in further detail. The connection for the sensor system is made using 3 pins digital, 1 analog, 5, 3.3 V, and ground. The connection for the DHT22 to the Arduino is the 5 V, ground, and 1 digital. The MQ135 requires 3 pins; start 5 V, ground, and 1 analog. Finally, the ESP8266 Wi-Fi Module uses 4 pins for connection to the Arduino; start 3.3 V, ground, RXD (receiver data), TXD (transmit data). The actual outline of the circuit is shown in Fig. 22.4.

Fig. 22.3
figure 3

Schematic diagram

Fig. 22.4
figure 4

Actual picture of the circuit

Figure 22.5 illustrates the dimensional view of the concept model. SolidWorks 2017 was used to draw and model the project’s prototype. The top, side, and front views of the project are shown in the plan diagram. The project design specifications are 9 cm in length, 4 cm in width, and 14 cm in height. The net hole sensor has a small dimension of 2.5 cm × 2.10 cm, allowing it to detect more accurately. A heat resistant and waterproof material is chosen for the sensor device.

Fig. 22.5
figure 5

Dimensional drawing for sensor device and Isometric view

22.2.5 Air Pollutant Index Measurement

The air pollutant index (API) was developed to offer the public simple information on the level of air pollution. Now, the API is computed using the Ambient Air Quality Standards. The new standard included particulate matter with a diameter of less than 2.5 μm (PM2.5) to the existing pollutants of CO, O3, NO2, SO2, and PM10 [6]. For calculation of the API, first, the sub-API value for each pollutant is determined. Then, each sub-API value is compared, and the highest sub-API value is deemed the dominant pollutant and is used as the API value. Figure 22.6 shows the air pollutant index calculation. The value of API, status, and effects on human health is tabulated in Table 22.4.

Fig. 22.6
figure 6

Determination of air pollutant index (API)

Table 22.4 Values of API, status, and effects on human health

22.3 Results and Discussion

22.3.1 Blynk Application

The visual graphic of the air quality by the Blynk application is shown in Fig. 22.7. The interface of Blynks displays the values of air pollution, temperature, and humidity. To make it easier to differentiate the parameters, the values of each parameter were displayed in a contrasting color. This application also notifies users of the status of air quality in their area via a pop-up message (see Fig. 22.8). When the air quality status is unhealthy or very unhealthy, the users will be notified and will be able to respond promptly.

Fig. 22.7
figure 7

Visual graphic of the air quality by the Blynk

Fig. 22.8
figure 8

A pop-up notification by the Blynk

22.3.2 Experimental Testing

To test the IoT-enabled air pollution system, experiments were carried out in two locations, Seri Manjung and Kuala Selangor. In Seri Manjung, the Universiti Kuala Lumpur Malaysian Institute of Marine Engineering Technology (UniKL-MIMET) was chosen as a study location, whereas in Kuala Selangor, a location near the Kuala Selangor’s monitoring station was chosen. Every day at 12 p.m. for two weeks, the pollution level, temperature, and humidity values were recorded for each location. Table 22.5 shows the air pollution level, temperature, and humidity readings at the Seri Manjung and Kuala Selangor study locations over two weeks for each location.

Table 22.5 Air pollution level, temperature, and humidity at Seri Manjung and Kuala Selangor

The air pollution levels measured by this system were compared with the air quality index (AQI) measured by the Seri Manjung and Kuala Selangor monitoring stations. The comparison results are shown in Figs. 22.9 and 22.10. In Seri Manjung, it can be observed that the air pollution values from the experiment were lower compared to the AQI values indicated by the monitoring station. The lowest and highest percentages of error were discovered to be 5% and 10.71%, respectively, with a mean of 7.68%. According to the AQI values, air quality was moderately polluted from day 1 to day 5 (AQI value > 50) at 12 p.m. Meanwhile, according to the air pollution levels measured by this project, only day 1 to day 3 shows moderate air pollution status at 12 p.m. In Kuala Selangor, the results also revealed that the air pollution level values recorded by this project were lower than the AQI values measured by the monitoring station. The mean percentage error of air quality in Kuala Selangor was 14.67% with the lowest and highest percentage of error were 11.1% and 18.6%, respectively. The Kuala Selangor monitoring station recorded higher AQI values (> 50) on days 1, 2, 7, and 10 indicating moderate pollution.

Fig. 22.9
figure 9

Air quality at Seri Manjung

Fig. 22.10
figure 10

Air quality at Kuala Selangor

Based on the error percentage result, the error percentages of air quality in Kuala Selangor were found to be increased following the Seri Manjung experiment. This might be because the calibration process, which was not performed before conducting the experiment in Kuala Selangor, contributes to the less accurate gas sensors. The calibration of sensors is required before conducting the experiment to ensure accurate results, as factors such as environmental effects may influence their accuracy [3]. This study has shown that the use of gas sensors may certainly serve as a cost-effective and user-friendly complementary solution for the establishment of an ambient air quality monitoring network. Nevertheless, special attention should be given to the selected sensors to ensure their accuracy.

The findings also show that most of the air quality data in both areas; Seri Manjung and Kuala Selangor have values of AQI less than 50 which means low pollution. This might be related to the experiment period which was conducted during the implementation of the Movement Control Order (MCO) by the Malaysian governments to isolate the source of the COVID-19 outbreak. Several activities, including company operation, are prohibited during MCO, except for necessary services. Since people are working from home and some companies have ceased operations, traffic congestion and industrial emissions have decreased, resulting in improved air quality [5].

22.4 Conclusion

This study proposes an IoT-enabled air pollution system on smartphones for the monitoring air quality in real-time at any desirable location. The IoT idea enables comprehensive data assimilation, revealing crucial information regarding air quality levels. The cloud database that was developed can be searched for relevant information related to the air quality analysis. In this study, the Blynk platform is shown to be highly useful for analyzing cloud data on the environmental condition, as an air quality monitoring system. In conclusion, this system is cost-effective when compared to the existing system of stationary monitoring. The use of this system helps the people to know about the degree of air pollution in a certain area as well as the health risk associated with it. Because it is based on a cloud platform, the system is scalable and supports any number of IoT devices that may be deployed.