IoT Based Car Pollution Detection Using Cloud Computing

Air pollution is a critical problem that is currently plaguing Asia in the perilous fight against environmental pollution. It refers to the harmful substances and pollutants in the air that play an essential role in the depletion of the ozone layer while being a grave hazard to the ecological system. A principal cause of air pollution is the increase in vehicular traffic, especially in Asia, that has been noted in recent years. The combustion reaction that occurs when cars burn gasoline leads to the emission of Carbon Monoxide (one of the principal constituents of air pollution). According to many recent studies, Carbon Monoxide is fatal enough to cause health issues which may lead to death in some extreme cases. Thus, it comes as no surprise that regulating car pollution is a paramount step in finding a solution to this global issue. Therefore, we are developing a system using a carbon monoxide sensor (MQ-7) and Arduino Uno microcontroller, which detects the gas emission from the car exhaust. Internet will play an important role in the communication of physical things. Physical objects can be empowered through the embedded electronics into it, to make them smart and at the same time IoT gives the connection among these objects to give high quality of life to the people. Hardware, software components works cooperatively to build the IoT. This technology is used in the development of air pollution detection system.


I. INTRODUCTION
Environmental pollution is a great hazard to the future of not just humans, but also other species. With rising sea levels, inconsistent weather patterns, and destruction of natural habitats being observed all over the world, it comes as no surprise that combating environmental pollution is extremely imperative. Air pollution plays a major role in contributing to the negative effects of environmental pollution. Air pollution means the presence of chemicals or compounds in the air which are usually not present, and which lower the quality of the air or cause detrimental changes to the quality of life (such as the damaging of the ozone layer or causing global warming)" [1].
Air quality index (AQI) plays a pivotal role in sustenance Manuscript received January 13, 2021; revised March 15, 2021. This work was supported by University of Nottingham.
Thamilvaani Alvar is with the School of Science and Engineering, the University of Nottingham Malaysia, Malaysia (corresponding author; e-mail: Thamil.Vaani@nottingham.edu.my).
Thinagaran Perumal is with the Department of Computer Science, Faculty of Computer Science and Information Technology, Universiti Putra Malaysia, Malaysia. and functioning of our habitat and hence the whole ecosystem. With rapid economic and industrial development followed by large influx of automobile industry, emitting unwieldy amount of toxic gasses and particulate matter (PM) in the air results in polluting the atmosphere causing air pollution. Air pollution occurs because of impurities (particles) and gases that mix with the air and can reach harmful concentrations both outside and indoors. Breathing dirty air makes human beings vulnerable to various toxins in the air causing great harm. It may also affect ecosystem and may even cause destruction to it. These toxins may reach our lungs, heart, bloodstream and brain resulting in respiratory problems like asthma attacks, chronic pulmonary diseases, lung cancer, pneumonia, coronary artery disease, chronic bronchitis, and can even cause rise in mental illness. Those people who work in factory or in constructional sites are very vulnerable of falling ill because of emissions and dust particles. There are six common pollutants. The common pollutant and their health effects with its sources are tabulated in Table I. Malaysia is made up of thirteen states and three federal territories. These are separated by the South China Sea into two separate sections, with peninsular Malaysia being the region that it typically associated with the countries name, hosting the capital city of Kuala Lumpur. The other region is located in Borneo, being known as the eastern portion of Malaysia respectively. There are some noticeable discrepancies in the levels of pollution between the two regions. In 2019 Malaysia came in ranked 50th place amongst all the countries of the world, with a PM2.5 rating of 19.36 µg/m³, putting its yearly average into the "moderately" polluted range. With its 50th place ranking worldwide out of 98 countries ranked, it stands as a country that suffers from periods of extremely poor air quality where these PM2.5 levels will climb quickly to dangerous levels.
In order for a city or country to be classified as moderately polluted requires a PM2.5 reading anywhere between 12.1 to 35.4 µg/m³ , putting Malaysia somewhat at the lower end of this moderate spectrum, however as it can be observed, there are months throughout the year that experience rapid spikes in pollution, and as such it is of importance to take this into account, both in regards to the yearly average rating as well as the causes and appropriate measures that may be taken against it.
While there are numerous causes of air pollution, vehicular emissions can be considered a major pollution contributor due to their emission of harmful pollutants like Carbon Monoxide. Carbon Monoxide is emitted from vehicles into the air when there is an improper or incomplete combustion as a result of the burning of gasoline. This leads to a decrease in air quality and other disastrous effects such as global warming, acid raid, depletion of ozone layers, and health related respiratory problems. With such calamitous effects, it is no surprise that talks about finding a solution to this impending problem are being put on a pedestal by major world leaders and organizations. This is where we can utilize the numerous applications and advantages that the Internet of Things has to offer.
Internet of Things is a fast emerging technology, flourishing in many trends, like making smart homes, industries, healthcare and many more. From a technological outlook, it allows the expansion of fresh protocols and circumstances, as the existing protocols cannot handle the increasing amount of devices connected and the data being transferred. Internet of Things (IoT) can be defined as the prevalent and worldwide network which helps delivering a system for checking and regulating the physical world with the help of protocols and IoT sensors. The IoT enforces that all "objects", like smartphones, smart watches and similar gadgets insert with the other components as in sensors linked to a common network so any individual may communicate with any resource at any time when required, by using a source that is known in the network. Each IoT device may have unique ID and unique identifier and convey information.
IoT enable devices to communicate with each other, to access the information on the internet, to collect & store data and then sharing with the users, thus creating smart, ubiquitous and perpetually connected network Internet of things is expanding since few years. The basic aim behind this technology is to have different objects such as RFID, NFC, sensors, mobile phones, etc. using ideal addressing schemes that can interact among themselves By combining the transformative power of IoT, cloud space, and some hardware, we can put together a network infrastructure which is integrated to a computer system and managed by AWS IoT. Ultimately leading to the creation of a device that might aid in the preservation of a future that is much safer for the coming generations.

A. Air Pollution Monitoring and Analysis System
According to this paper by Ramagiri and Chandra, they had proposed an introduction of vehicular pollution monitoring system, see Fig. 1, using Internet of Things (IoT) which can detect and identify vehicles that caused pollution to the environment [2]. Gas sensor to detect Sulphur oxide and carbon dioxide are used to measure and monitor the level in air continuously. All the related information such as the level of Sulphur oxide and carbon dioxide will be stored in the server database of the authorized agencies for analysis. In 2017, Daudi had demonstrated an industrial air pollution monitoring system which is based on wireless sensor network system [3]. The data collected by the sensors will be analyzed and sent to the regulatory agents. This system can complete the real-time analysis system correctly within time constrains and helps the authorities such as the government to take appropriate action based on the final statistics with the results from data acquisition system.
For this project, we will be implementing a cloud based vehicle pollution monitoring and analysis system using the AWS IoT. The data collected from the gas sensor MQ-7 will be stored in Dynamo NoSQL (DynamoDB). AWS IoT provides a bi-directional and secured communication between devices easily. It also helps in managing devices as it enables collection of data and analyzing the data from the database.

B. Automated Control System for Air Pollution Detection and Control in Vehicles
By using various sensors in a pollution control circuit, Siva, Sudharshan and Sabeshkumar had aim to detect and control the pollution caused by vehicles [4]. This pollution control circuit includes sensors like GSM and GPS device, temperature and smoke sensor are connected and integrated to a controller. If the vehicle had emitted a certain level of pollutants higher than the threshold level allowed by the government, the controller will send a signal to fuel injector to switch off the vehicle engine and a message will be sent to the user.
Referring to the paper by Souvik, Suman and Mandini, the amount of air pollution needs to be monitored and vehicles responsible for polluting should be identified [5] in order to control the air pollution. A system that includes sensors is proposed to check the pollution level caused by vehicle with the data collected from the sensors. The aim of this system is to control the emission level of exhaust gas emitted by vehicle so that control action can be carried out accordingly.
In order to control the emission of carbon monoxide from vehicles, we decided to develop a system that will be sending out a notification to user using AWS Short Notification Service (SNS). Once the concentrated of carbon monoxide that is detected has exceed the threshold level, this service will help to alert the user regarding this matter so the user can take further action.

C. Vehicular Pollution Detection
Marina and Dr. Josephine is mainly interested in reducing pollution mainly from vehicles using IoT [6]. MQ-7 Arduino is implemented in the system to detect the pollution focusing on carbon monoxide caused by public transport. The level of carbon monoxide released by the vehicle is detected in a fixed distance and Global Positioning System (GPS) is implemented as well to locate the area which is facing serious pollution, see Fig. 2.
Prof. Ghewari, Tejaswini, Pooja and Anupama has designed a system to detect and monitors vehicle"s pollution. Once the system in the vehicle detected pollution, warns will be sent to the owner/ user to check and service the vehicle [7]. Gas sensor MQ-135 will be used in this system to detect the pollution range of the gas emitted by the vehicle. The Regional Transport Office will block the vehicle using relay which is connected between vehicle battery supply and machine engine and starter if the owner did not take any action regarding the received warn.
The increasing of air pollution can be related to the increase in number of automobile vehicle. In order to realize green traffic, Nandhine and M. S. Geetha had proposed an automated vehicle health monitoring to detect the vehicle's current health condition and helps in control the emission of carbon dioxide to the environment [8]. Gas sensor is equipped in the monitoring system which is able to detect and

D. Arduino
It is an open source hardware. The Arduino contains programming languages such as C and C++. We use ATmega328P AVR. It has total 28 pins, from which 14 pins are digital pins, 6 pins are analog input. It contains one transmitter pin and one receiver pin and this pins are digital pins. It has 16MHz crystal oscillator frequency. Arduino board is powered by using the USB cable from your computer. All you need do is connect the USB cable to the USB connection. This is flexible combined with the fact that the Arduino software is free ,the hardware boards are pretty cheap ,and both the software and hardware are easy to learn has led to a large community of users who have contributed code and released instructions for a huge variety of Arduino -based projects.
Arduino boards are able to read analog or digital input signals from different sensors and turn it into an output such as an activating a motor, turning LED on or off, connect to the cloud and many other action.
Therefore, we will be using a gas sensor MQ-7 which is connected to the Arduino board as our architecture of pollution detection system. This mentioned sensor has a fast response time as it has high sensitivity. The Arduino board will be programmed to capture the data from gas sensor MQ-7 and transfer the data to the database for further analyzing.

E. Carbon Monoxide (CO) Detector
A carbon monoxide (CO) detector is a device that detects the presence of CO gases in order to prevent carbon monoxide poisoning. CO is a colorless, tasteless, and odorless compound produced by an incomplete combustion of carbon-containing materials. It is often referred to as the "silent killer" because it is virtually undetectable by humans without using detection technology. Elevated levels of CO can be dangerous to humans, depending on the amount of gas that is present and the length of exposure. Smaller concentrations can be harmful over longer periods of time, while increasing concentrations require diminishing exposure times to be harmful.

III. PROPOSED WORK
This section is to describe the setup of the research, components used and the device setup. Most of our setup is hardware work using Arduino UNO, Wi-Fi Shield and MQ-7 carbon monoxide sensor. Components involved in this research include data collection devices (MQ-7), communication device to integrate with AWS cloud services, AWS IoT services, and a mobile application to notify user via AWS SNS service. The MQ-7 Carbon Monoxide sensor is installed onto an Arduino UNO board, which will be powered using an external power supply (Power bank with USB output). MQ-7 will measure and CO, transmit CO concentration via analogue out pin AOUT into AO1 socket of Arduino UNO microprocessor, see Fig. 3. The Arduino, see Fig. 4, then uploads data in AWS dynamoDB where it will be stored and processed. If CO data collected by MQ-7 sensor exceeds a certain threshold, AWS SNS service will be used to send an alert notification to user via mobile application. The MQ-7 carbon monoxide has 4 pins, GND (Ground), DOUT (Digital OUT), AOUT (Analogue OUT), and VCC (Voltage at the Common Collector). The GND and VCC are pins to supply power to the circuit and the DOUT and AOUT are data transmission pins that transmit the output from the circuit. In this research, out of the two OUT pins, we will only utilize the AOUT pin to collect data from sensor.

B. Amazon Web Service
Amazon Web Service is a platform that provides flexible, reliable, scalable, easy-to-use and cost-effective cloud computing solutions. AWS is a comprehensive and easy-to-use computing platform offered by Amazon. The platform is being developed with a combination of service infrastructure (IaaS), service platform (PaaS) and packaged service software (SaaS) offerings. We used AWS as our server to develop our system and store our database. Using AWS allowed fast deployment and cloud access quickly with limitless capacity.

MQ-7 Sensor
Arduino  The MQ7 carbon monoxide sensor requires to be heated up before measuring carbon monoxide. The sensor was heated at 5V for 60 seconds and then at 1.4V for 90 seconds. After preheating, the sensor is now ready to read, but to provide reliable measurements, the sensor had to be calibrated. The sensor was left in clear air to produce stable readings for 48 hours. The sensor only requires 100 microseconds to get an analogue reading of carbon monoxide. The output of A0 socket is continuously logged into sensor value to printout After calibration, we exposed the sensor into carbon monoxide from various sources, including cigarette smoke and incomplete combustion of tree branches where we were able to detect a sharp change in reading. The analogue output of the sensor dropped rapidly as soon as it was exposed to carbon monoxide, see Fig. 8. This is because the AOUT reading is the resistance of the sensor, not the actual concentration of CO. The details of connection, see Fig. 9, between device and AWS IoT represent in graph form. Once the connection is established, the device will keep sending data to AWS without interruption.
The graph on number of messages published by Arduino UNO setup with MQ7, see Fig. 10 which connected to AWS IOT. Thus, the user will get the notification on the level of Carbon Monoxide.  The data published by the device are inserted into the table in AWS DynamoDB, see Fig. 11. The original MQTT message which is in JSON format is inserted into the column readings and plot a graph. Blue line, (see Fig. 7), indicate AOUT value after stabilization in clean air.
"rawData" as further reference. When the CO level detected by the device is higher than the threshold value, a notification email will be sent to user. The time stamp and detect CO level is included in the email to provide more information to the user.

V. CONCLUSION AND FUTURE WORKS
In conclusion, it can be said that we are very hopeful in coming up with a device that stores data about air pollutants present in vehicular emission in AWS IoT in order to notify the vehicle"s owner about the air pollution that is being emitted by their vehicle by the end of this project. The proposed initial prototype is successfully been developed and we are currently carrying out tests on the prototype of this device. While results indicate that the sensors can detect Carbon Monoxide, they are showing a decrease in analogue output of MQ7 sensor. With the successful completion of this, there are certain aspects that can be investigated as potential features additionally to the existing functionalities and non-functionalities of this project.
This research can be extended by replacing the MQ-7 sensor to other sensors of same nature, or sensors for different operating environment such as temperature, or humidity. The sensor can be even extended to sensors to detect other pollutants such as carbon dioxide, nitrogen oxides or sulfur oxides.