AirQMon : Indoor Air Quality Monitoring System Based on Microcontroller, Android and IoT

Humans were often unaware of the risk of contaminated indoor air quality. Based on this, the researcher designs an Indoor Air Quality Monitoring System based on Arduino which could help to raise the human awareness of air quality. This research is based on the Prototyping method. The system hardware built with Arduino Uno which connected to MQ135 sensor to monitor the air quality and Sound Buzzer to sound an alarm whenever the sensor sensed the air quality in a risky value. The Ethernet Shield is used to connect the Arduino Uno to the internet, which enables the process to upload the data which has been read by the sensor to an IoT platform called ThingSpeak. The air quality data which uploaded to ThingSpeak, then retrieved by AirQmon, a customized Android application developed by the researcher to monitor the air quality which is installed on the smartphone. The data is presented graphically to the user through AirQmon apps. This system results in a form of a device and application which could potentially be used as a monitoring system and raise human awareness of indoor air quality.


INTRODUCTION
uman need air to breathe. In the breathing process, clean air is important to support the human body to stay healthy, while a polluted air can affect humans' body negatively. The human breathing system can't filter the air they want to inhale by free will. The air consists of Oxygen (O2), but a human can also inhale dust particle, formaldehyde, pesticide, fungus and other dangerous things to human breathing system that can be found indoor.
Indoor air condition can be more harmful than outdoor air condition because there is more pollution source indoor and it's not as open as outdoor, so the air circulation is worse than the circulation outdoor. The indoor pollution can come from the condition of the building, the materials inside the building, or the activity of people inside. The humidity, heat, gas, air conditioner, chemical product, smoke, or even the floor material like woods can pollute the air [1].
Polluted air can affect humans' health [2]. The damage done by polluted air can be temporary, but some damage can be permanent [3]. It can cause headache, skin irritation, respiratory disorders and asthma. Some people won't be affected much by the polluted air, but there are also people whose health condition can be worsened by the polluted air.
The effects of polluted air need to be avoided and one of the alternatives is by using a system to monitor the air quality indoor. Based on the importance of indoor air quality, the researcher built a system which can monitor indoor air quality using microcontroller Arduino board and MQ135 sensors to detect the air quality with an interface of an Android application to get data and display the air quality, by means to raise the awareness to the user regarding any polluted air indoor.
The indoor air quality monitoring system is built by using Arduino and MQ135 sensors. Arduino is an electronic module which can be programmed. The input data read from MQ135 sensors, processed by Arduino (which connected to Ethernet Shield for internet connection) and then stored to IoT platform ThingSpeak. Sensor data stored to ThingSpeak channel which is already setup and then push the data to an Android application called AirQmon.
With the advances of information and communication technology triggered the modern equipment which can help human to get necessary information around its environment. Internet of Things (IoT) is evolved from time to time which integrates devices and supported human daily activities to be efficiently [4]. According to an article [5], every second there are 127 new IoT devices are connected to the web and during 2020, expert estimates 31 billion of IoT devices. In this research, we build an IoT device to monitor the air quality which is integrated with an Android application called AirQmon.

Indoor Air Quality
Air quality is a term which is related to how much pollution is present in the air. Good air quality means there is less air pollution, while poor air quality means there is more pollution [6]. Clean or unpolluted air is considered to be a basic requirement of human health. However, air pollution continues to pose a significant threat to the health of human worldwide [7]. The concentration of air pollutant should be monitored to increase human awareness regarding the quality of air.
Indoor air quality is essential to maintain a person's health because humans are spending most of their time indoors. The air quality indoor can be polluted by many factors, such as Respirable Particulate Contaminants, Asbestos, Carbon Monoxide, Mercury, Volatile Organic Compounds, Formaldehyde, Indoor Allergens, Indoor Pesticides, Radon, Indoor Molds and Environmental Tobacco Smoke [8]. A monitoring system can add human awareness of the air quality inside the room.
There are levels of pollution that humans need to avoid based on the Air Pollution Index. Table 1, shows the level of danger which is contained in air pollution [9].

System
The system is an entity, which is coherent with a boundary that is perceived around it to distinguish internal and external elements and to identify input and output relating to and emerging from the entity [10]. There are two types of system, that is the subsystem and supersystem. The subsystem is a system inside another system; it means that there is more than one level of the system. A supersystem is a rare case. If a system is a part of a bigger system, the bigger system is called supersystem.
System characteristics [10] consists of basic components (identifiable and moving parts of the system), interaction and structure, goals, behaviour and life cycle. The characteristic of a system is determined by the system elements, their properties and relations. The system elements have input, processor, and output.

Android
Android is a software stack for mobile devices which includes an operating system, middleware and key applications [11]. Android is popular in the electronic market because of its open-source and free development tools [12]. Android system has been developed continuously. The development introduces a new feature or bug fixes.

Microcontroller
Microcontrollers are small computing system used for low power and low memory purposes. A microcontroller consists of a microchip on a circuit board with read-write capabilities, memory, inputs and outputs [13]. A microcontroller is a little computer on a chip. The microcontroller has more than the first home computer had. It has a processor, a kilobyte or two of random-access memory (RAM) for holding data, a few kilobytes of erasable programmable read-only memory (EPROM) or flash memory for holding users' program and it has input and output pins. These input/output (I/O) pins link the microcontroller to the rest of the electronics [14].
Arduino is a popular AVR (Advanced Virtual RISC)-based microcontroller [13]. Arduino is a small microcontroller board with a universal serial bus (USB) plug to connect to users computer and several connection sockets that can be wired to external electronics such as motors, relays, light sensors, laser diodes, loudspeakers, microphones and more [14]. An Arduino board is a microcontroller development board that happens to be an independent open-source hardware design. It means that the design files for the printed circuit board (PCB) and the schematic diagrams are all publicly available, and everyone is free to use the designs to make and sell their own Arduino boards. There are various components on an Arduino board such as power supply, power connectors, analogue input, digital connection, microcontroller and other components.

Sensor
The sensor is a tool that detects and converts a physical measurement unit (light, heat, motion, moisture, pressure, or a great number of other environmental phenomena) into an electrical measurement unit (human-readable display for future processing) [15]. To be called a sensor, it needs some of these requirements: 1. high sensitivity (in accord with the measurement unit), 2. not sensitive to another measuring unit, 3. sensor won't impact the object natures.
MQ135 is a sensor that can detect air quality. MQ135 uses Stannic Oxide (SnO2) as its sensitivity material. When the target combustible gas exists, the sensors' conductivity increased and the gas concentration rise. MQ135 has a high sensitivity to NH3, NOx, alcohol, benzene, smoke, CO2 and other harmful gases [16]. Gas Sensor from the MQ series use a small heater with an electrochemical sensor and are usually used indoors at room temperature. The calibration of MQ135 is preferred to use a known concentration of the measured gas [17]. In this research, we use three MQ135 sensors.

Sound Buzzer
A buzzer or beeper is an audio signalling device, which may be mechanical, electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarm device, timers and confirmation of user input such as a mouse click or keystroke. The buzzer is widely used in computers, printers, copiers, alarms, electronic toys, automotive electronic equipment, telephones, timers and other electronic products for sound devices [18]. The sound buzzer will be used to sound an alarm to notify people nearby whenever the limit of dangerous gas or dust exceeds the normal limit.

Ethernet Shield
Ethernet shield is a shield that can connect an Arduino device to the internet. Ethernet shield is widely used for local area network. It is a link-layer protocol in the TCP/IP stack. By using the Ethernet library to write sketches, the Arduino can be connected to the internet [19]. The researcher needs the ethernet shield to connect the system to the internet. Ethernet shield will be connected to a router by using an RJ45 ethernet cable.

Internet of Things (IoT) and ThingSpeak™
ThingSpeak is an Internet of Things platform which can be collect and store sensor data in the cloud and develop IoT applications. The ThingSpeak IoT platform provides apps that let the user analyze and visualize the data and then act on the data. Sensor data can be sent to ThingSpeak from Arduino, Raspberry Pi, BeagleBone Black, and other hardware [20]. In this research, the device needs to connect to ThingSpeak to upload sensors data values and also to retrieve the sensor data values from ThingSpeak to the AirQmon Android application.

Programming Language
The programming language is a notation that is used to write a computer program. This language is divided into three levels, which are machine language, low-level language and highlevel language [21]. The machine language is microinstruction or hardwire. The programs are long and difficult to understand. Besides that, it is highly machine architecture-dependent. The advantage of machine languages is that the process is quick and users don't need an interpreter or low-level language interpreter, such as macroinstruction (assembly). Just as machine language, a low-level language is also machine architecture-dependent. The process is fast, but the programs are long and difficult.
High-level languages have a similar structure with the human language so that it's easier to understand. This language is not machine architecture-dependent, but it needs compiler or interpreter. There is two programming language which is used to build the system, as explained as follow.

1) Java Language
An android use java as its programming language. Java is an object-oriented programming language developed by Sun Microsystems. Java is easier to learn than most other object-oriented programming languages because it's a collection of the best part of existing ones. Java language is standardized enough so that executable applications can run on any computer that contains a Virtual Machine (run-time environment). Java isn't slower than any other object-oriented language. Java can be compiled to native code and run as fast as any other program [22].

2) C Language
Arduino Integrated Development Environment (IDE) is used to upload the code to the device. Arduino programming language is based on C language. C is a general-purpose programming language with features economy of expression, modern flow control and data structures, and a rich set of operators. C is neither a very high-level language nor a big one and is not specialized to any particular area of application, but its absence of restrictions and its generality make it more convenient and effective for many tasks than supposedly more powerful languages [23].

Related Research
There are several related types of research which support the research of Indoor Air Quality Monitoring System based on Arduino. Besides the list of research related to air quality shown in Table 2, there are some previous works develop by the researcher related to detection and monitoring system using microcontroller and sensors [28][29]. These researches are basic ground fundamental in the design of AirQmon indoor air quality monitoring system.

SYSTEM DESIGN AND IMPLEMENTATION
System design related to how to build the AirQmon: Indoor Air Quality Monitoring System.

Conceptual Research Framework
The conceptual research framework is based on Prototyping Model [30]. The first phase is communication to gather information required to develop the system by literature review. The second phase is Quick Plan and Modeling Quick Design to design how the system will be represented with the user interface of an Android application, decide the programming language, the software and components needed. The researchers also analyze the application function. The third phase is the Construction of Prototype. The researcher develops the system, by coding the application and builds the prototype of an indoor air quality monitoring system using Android Studio for Android application and Arduino IDE to program the Arduino board and the whole system. The fourth phase is Testing to deploys a test to improve the system. Figure 1, explains the steps generated to run the system. First, MQ135 measured the level of air quality in a room. Then, the Arduino read the data provided by sensors. If the gas level exceeds certain amount value which is hazardous, the Arduino sound the alarm through the sound buzzer. Arduino will then upload the data to ThingSpeak through Ethernet Shield. Then, the user can view the data by using the AirQmon application (Indoor Air Quality Monitoring System based on Android). The AirQmon retrieve the data sent by ThingSpeak and display it to the user smartphone. Figure 1 Hardware Conceptual System Figure 2 shows the steps done by the user to run the application. First, the user will need to open the AirQmon application. Then, AirQmon will retrieve the data from ThingSpeak. The data retrieved then displayed to the user graphically. The user can then choose to reload the graph or just to display it. Figure 3, shows the hardware schematic and components interconnection. Arduino board is associated with Ethernet Shield to provide an Internet connection. There are three MQ135 sensors which are used to detect the indoor air quality. The Arduino board is programmed to sense the air quality through the MQ135 sensors. When the air quality is detected in a polluted condition, the alarm buzzer turned on as a direct sound warning sign to the people inside a room or building.

AirQmon: Android Application Interface Implementation
Figure 4(a) shows the home interface of AirQmon application which with graphical implementation which retrieved from ThingSpeak that shows the sensors data on AirQmon application. There is also a refresh button to reload both the graphs data from the internet. The about button gave information about the application. Figure 4(b), shows the interface of AirQmon when the user gives input touch to point on the graph. The AirQmon application can show data from each MQ135 sensors.

Testing Results
In this research, we use the Black Box method to test how the system works. The result of the testing is shown in Table 3.

CONCLUSION
As the results of this research of Indoor Air Quality Monitoring System Based on Microcontroller, Android and IoT, it can be concluded as follows: 1. the device can upload sensor data to ThingSpeak IoT platform, fetch and display sensor data to AirQmon application interface, which is installed on user Android smartphone, 2. the system can monitor air quality and can ease the user on accessing the information regarding the indoor air quality by using AirQmon application. 3. the system can sound the alarm to alert the user when the air quality is detected in a hazardous condition, 4. though it's still in a prototype model, the system could potentially be used as a tool to raise human awareness of air quality in certain indoor places and environment.

FUTURE WORK
The indoor air quality monitoring system still needs improvement for further development, as follow: 1. The device could be connected to the internet with a wireless connection. 2. The device could be improved by adding sensors such as temperature, humidity and dust sensor. 3. The AirQmon Android application should be able to work in the background and give push notification whenever the sensor value reached a certain level. 4. The AirQmon android application should be able to convert the data provided to PPM units.