56
Independent project (degree project), 15 credits, for the degree of Bachelor of Science in Engineering in Computer Science, specialization in Internet of Things Spring Semester 2021 Faculty of Natural Sciences IoT-based Air Pollution Monitoring System for Smart Villages Hikmat Tatari Nedim Jazavac

IoT-based Air Pollution Monitoring System for Smart Villages

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: IoT-based Air Pollution Monitoring System for Smart Villages

Independent project (degree project), 15 credits, for the degree of Bachelor of Science in Engineering in Computer Science, specialization in Internet of Things Spring Semester 2021 Faculty of Natural Sciences

IoT-based Air Pollution Monitoring

System for Smart Villages

Hikmat Tatari Nedim Jazavac

Page 2: IoT-based Air Pollution Monitoring System for Smart Villages

Authors Hikmat Tatari Nedim Jazavac

Title IoT-based Air Pollution Monitoring System for Smart Villages

Supervisor Fredrik Frisk

Examiner Kamilla Klonowska

Abstract Air pollution is a global issue which has negative impacts not only on the environment but also on human health. Therefore, it is important to design and implement systems to allow cities and villages to monitor air quality so that they take the required actions to maintain a good air quality in the city/village. Since IoT facilitates implementing efficient monitoring systems, many IoT systems have been proposed to monitor air pollution. In this paper, we review different IoT-based systems to monitor air quality. In addition, we do an experiment where we propose and evaluate our system to monitor air pollution in a smart village, Veberöd, utilizing the LoRaWAN and the IoT platform, Yggio, which is already used in the village. Our proposed system is used to monitor temperature, humidity, pressure, PM1, PM2.5, PM10, CO2, and CO. As a result of our experiment, we found that the data received by Yggio was encoded, and Yggio did not provide the decoding functionality to decode the data sent from our devices. Therefore, another IoT platforms were used to decode, visualize, and analyse the data. The results of the experiments shows that as far as PM1, PM2.5, PM10, and CO are concerned, the air quality in the village is good. The results also showed that some LoRaWAN messages were lost and never received on Yggio.

Keywords Air Pollution, LoRaWAN, IoT, Smart Villages, Monitoring.

Page 3: IoT-based Air Pollution Monitoring System for Smart Villages

Contents

1. Introduction ..................................................................................................................... 1

1.1 Background ............................................................................................................... 1

1.2 LoRa and LoRaWAN ................................................................................................ 1

1.3 Air Pollution .............................................................................................................. 2

1.4 Motivation ................................................................................................................. 2

1.5 Research questions .................................................................................................... 3

1.6 Limitations ................................................................................................................. 3

1.7 Thesis structure .......................................................................................................... 3

2. Methods ........................................................................................................................... 5

2.1 Literature Search ....................................................................................................... 5

2.2 Experiment ................................................................................................................ 5

3. System overview ............................................................................................................. 9

3.1 Sensor node overview ............................................................................................. 10

3.2 Payload format of the LoRaWAN message ............................................................ 11

4. Results ........................................................................................................................... 12

4.1 Literature review ..................................................................................................... 12

4.2 Experimental results ................................................................................................ 15

4.2.1 Experiment Test 1 ............................................................................................ 15

4.2.2 Experiment Test 2 ............................................................................................ 19

4.2.3 Experiment Test 3 ............................................................................................ 23

5. Discussion ..................................................................................................................... 27

5.1 Literature review discussion .................................................................................... 27

5.2 Experiment discussion ............................................................................................. 27

5.2.1 Experiment Test 1 discussion ........................................................................... 29

5.2.2 Experiment Test 2 discussion ........................................................................... 30

Page 4: IoT-based Air Pollution Monitoring System for Smart Villages

5.2.3 Experiment Test 3 discussion ........................................................................... 31

6. Future work ................................................................................................................... 32

7. Conclusion ..................................................................................................................... 33

8. Social and ethical aspects .............................................................................................. 34

9. References ..................................................................................................................... 35

10. Appendix ..................................................................................................................... 37

10.1 Device Node 1 ....................................................................................................... 37

10.1.1 Temperature .................................................................................................... 37

10.1.2 Humidity ......................................................................................................... 38

10.1.3 Pressure .......................................................................................................... 39

10.1.4 PM1 ................................................................................................................. 40

10.1.5 PM2.5 ............................................................................................................... 41

10.1.6 PM10 ................................................................................................................ 42

10.1.7 CO2 ................................................................................................................. 43

10.1.8 CO .................................................................................................................. 44

10.2 Device Node 2 ....................................................................................................... 45

10.2.1 Temperature .................................................................................................... 45

10.2.2 Humidity ......................................................................................................... 46

10.2.3 Pressure .......................................................................................................... 47

10.2.4 PM1 ................................................................................................................. 48

10.2.5 PM2.5 ............................................................................................................... 49

10.2.6 PM10 ................................................................................................................ 50

10.2.7 CO2 ................................................................................................................. 51

10.2.8 CO .................................................................................................................. 52

Page 5: IoT-based Air Pollution Monitoring System for Smart Villages

1

1. Introduction

1.1 Background

Air pollution has many different negative impacts on both the environment and human

health [1]. Therefore, it would be useful to implement ways of measuring air pollution to

make it easier for cities and villages to know where the most pollutants come from and

what people can do to make the air as clean as possible. We are moving to a more

connected world, and the concept smart cities/villages becomes more and more popular.

One important element in the smart villages and smart cities is the air quality, and by

monitoring air pollution many improvements can be made, and together with an IoT

connected community, living conditions can be improved.

1.2 LoRa and LoRaWAN

The main form of communication between our air pollution devices and the smart villages

database is LoRaWAN. LoRa stands for Long Range and is a digital wireless data transfer

technology. The main focus of LoRa is long range while consuming as little energy as

possible. It is a standard that has been growing and spreading across the world. [2]

LoRa radios work on several different frequencies that are all bellow 1GHz. 868MHz is

used in Europe, 915MHz is used for Australia and North America, India uses 865-

867MHz and in Asia the standard is 923MHz. [3]

LoRa and LoRaWAN are often confused with each other. LoRa represents the physical

layer of the network technology while LoRaWAN is a cloud based medium access control

(MAC) protocol but mainly acts as a network layer protocol for the communication

between LoRa gateways and nodes. LoRaWAN is specially designed for wireless battery

powered devices that need a low power consuming way to send collected data long

distances. [2] [3]

Page 6: IoT-based Air Pollution Monitoring System for Smart Villages

2

1.3 Air Pollution

Air pollution is the release of pollutants into the air. Air pollution is a mix of particles and

gases. Some air pollutants are poisonous and if inhaled can lead to or cause health

problems. Older people and children as well as people with heart and lung diseases are at

a greater risk from air pollution. Air pollution is also bad for the environment, as it is

closely linked to and contributes to climate change and raises the earth’s temperature. [4]

[5]

Every year an estimated 7 million people die due to exposure to air pollution. According

to the data from the World Health Organization (WHO), 9 out of 10 people breath air that

exceeds WHOs guidelines for levels of air pollution. The countries that are suffering the

most from this are low- and middle-income countries. 4.2 million deaths per year are

estimated to be caused by ambient air pollution and is caused by heart disease, lung cancer

and strokes, among others. There are many sources for air pollution. These include

residential heating, vehicles, power generation, incinerating waste and from industries.

[6]

It is estimated that 3.8 million deaths per year come from exposure to smoke from cooking

fires in low- and middle-income countries. The cause of this is burning wood and coal in

inefficient stoves that produce Particulate Matter (PM), carbon monoxide and

polyaromatic hydrocarbons. Exposure to PM has negative health impacts as the small

particles can penetrate tissues and organs. Indoor air pollutants lead to everything from

cancer to respiratory illness and eye problems. [6]

1.4 Motivation

There are different IoT-based systems that can be used to monitor air pollution, and we

want to review those systems. The different systems may use different architectures,

different network technologies, different sensors, and they can be appropriate for different

use-cases.

Furthermore, as a part of the development of the village Veberöd, the representatives of

the village wants to monitor the air quality to gain insights about how polluted the village

is. The village already has a LoRaWAN connection, and we would build a system to

monitor the air quality in the village using its LoRaWAN.

Page 7: IoT-based Air Pollution Monitoring System for Smart Villages

3

1.5 Research questions

Our research includes two research questions:

Research Question 1: What are the existing and proposed IoT-based air pollution

monitoring systems?

Research Question 2: How to design and implement an IoT-based system to monitor

air pollution in a smart village which has a LoRaWAN gateway?

1.6 Limitations

In order for us to be able to implement the air pollution monitoring system in the smart

village, and since the system depends on sending the data using LoRaWAN in the village,

our system can only be implemented in the village if:

1. The village has a working LoRaWAN gateway.

2. We have access to manipulate, interpret, or decode the data sent from our device

and received by the LoRaWAN gateway in the village. Otherwise, the data

received by the gateway may be useless.

In addition, due to time limitation and especially because there can be a long sampling

interval time, the number of samples gathered in the village are limited. Moreover, since

we needed to use some equipment from the village, the time at which we could start our

experiments were limited by the offices opening hours. Furthermore, the devices battery

life was limited by the fact that the gas sensor was very power consuming.

1.7 Thesis structure

The thesis consists of:

• Introduction chapter where we present information about background, LoRa and

LoRaWAN, Air Pollution, motivation, research questions, and limitations of the

thesis.

• Method chapter where we present which methods we used to conduct our thesis,

how each method is used, and why it is used.

• System overview chapter where we present our proposed system architecture,

sensor node overview, and payload format of the LoRaWAN message.

Page 8: IoT-based Air Pollution Monitoring System for Smart Villages

4

• Results chapter where we present the results of both the literature study and the

experiment.

• Discussion chapter where we discuss and evaluate the results we got from both

the literature review and the experiment.

• Future Work chapter we present our ideas about how our proposed system can be

improved.

• Conclusion chapter where we sum up our thesis report.

• Social and ethical aspects chapter where we present the social relevance of the

assignment.

Page 9: IoT-based Air Pollution Monitoring System for Smart Villages

5

2. Methods

This thesis consists of both a theoretical part and an experimental part. The theoretical

part consists of a literature review of the current existing and proposed IoT-based air

pollution monitoring systems. The practical part consists of testing and monitoring the air

pollution system in a smart village using air pollution monitoring devices that we have

designed and implemented.

2.1 Literature Search

The literature review is used to answer our first research question where we survey

different air quality systems that are based on IoT. To find the literature, we have searched

in ACM Digital Library database using the keywords: air pollution monitoring, air quality

system, IoT, and smart cities. In particular, most of the literature are found by searching

for “(("air pollution") OR ("air quality")) AND ("IoT") AND ("smart") AND ("system")”

in ACM database where we chose the publication date to be no older than 2015. In our

review, we focus on which pollutants each system can detect, where the sensors are

deployed, which sensors are used, and how the communication is done between the

different parts of the system. The literature review results are presented in the section

“4.1. Literature review”.

2.2 Experiment

The practical experiment is used to answer our second research question. We use two air

pollution monitoring devices that we have designed and implemented in the course

Systems Engineering. These devices are able to measure not only multiple different air

pollutants such as PM1, PM2.5, PM10, CO2, CO but also the temperature, humidity, and

air pressure. In our experiment, we have conducted three tests:

• Experiment Test 1: in this test, we used one device which we deployed on the roof

of the smart village’s headquarters, Figure 1 shows how the device was deployed

for this test. The main reason of this test was to evaluate if the measurements we

get from the device are reasonable or not.

Page 10: IoT-based Air Pollution Monitoring System for Smart Villages

6

Figure 1. The device deployed on the roof of the village’s headquarters.

• Experiment Test 2: This test was conducted to evaluate the performance and

accuracy of both of our devices. We compared the measurements of the two

devices by placing them in the same location, the smart village’s headquarters,

beside each other and turned them on at the same time so that they report data

simultaneously. See Figure 2.

Figure 2. Both devices deployed in the same location

Page 11: IoT-based Air Pollution Monitoring System for Smart Villages

7

• Experiment Test 3: In this test, the two devices were placed strategically in the

smart village in two different locations. The places we monitored were at the smart

village’s headquarters, and close to the country road that goes past Veberöd. The

reason we chose the headquarters was because it is located next to the main street

that goes through Veberöd and it is also located next to the main grocery store so

there will be a lot of stop and go traffic when people drive to shop, school or work.

We chose the country road because there are plenty of cars driving by at high

speeds. Figure 3 shows the devices’ positions on the map. Figure 4 shows the first

device deployed on the country road, and Figure 5 shows the second device

deployed outside of the headquarters.

Figure 3. Map of Veberöd and locations where our devices are placed.

Figure 4. Device 1 deployed next to the country road.

Page 12: IoT-based Air Pollution Monitoring System for Smart Villages

8

Figure 5. Device 2 deployed next to the headquarter.

While deployed in the smart village these air pollution devices periodically, each half an

hour, collected data and monitored the air quality. The data collected from the devices

was sent to the village’s database and platform Yggio using the village’s LoRaWAN

network. The data was then manually extracted from Yggio, decoded, saved, and plotted

on The Things Network and ThingSpeak platforms.

The way we monitored and analyzed the data was by accessing the smart villages database

where the devices sent all the data. This data was then manually extracted and decoded

in a separate platform called The Things Network. From The Things Network the data

was sent to and stored in ThingSpeak where it was visualized through graphs and

analyzed by adding a moving maximum, a moving minimum, and a moving average

graphs for each of the measurements (temperature, humidity, pressure, PM1, PM2.5, PM10,

CO2, and CO).

Page 13: IoT-based Air Pollution Monitoring System for Smart Villages

9

3. System overview

The system consists of several sensor nodes (devices) which collect air pollution data and

send it via LoRaWAN to Yggio, an IoT platform, where the data is saved, visualized, and

accessed by the users. Figure 6 shows our intended system overview. However, since the

data received on Yggio was encoded and Yggio did not have the functionality of decoding

the data, other IoT platforms, The Things Network and ThingSpeak, were used to decode,

store, visualize, and analyze the data.

Figure 6. System overview

Page 14: IoT-based Air Pollution Monitoring System for Smart Villages

10

3.1 Sensor node overview

To be able to measure the air quality, we used a device that we designed and implemented

in the course Systems Engineering. The device (sensor node), see Figure 7, that we used

has 3 sensors on it. There is the Laser Sensor HM3301 that is a sensor that measures PM1,

PM2.5, PM10, the Adafruit BME280 that is able to measure the temperature, humidity, and

air pressure. And then there is the MIKROE-1630 (MQ135) sensor that is able to detect

different gases such as CO and CO2.

To be able to connect to the LoRaWAN network and send the data to the database, the

Feather M0 LoRa radio is used. This is a module that has an integrated microcontroller

and LoRa radio.

To be able to send data through a short wireless connection a RN-41 Bluetooth module

is connected to a second microcontroller. The second microcontroller receives data from

the Feather M0 and sends it to the RN-41.

To power this device a 12V battery pack is used.

Figure 7. Sensor node overview

Page 15: IoT-based Air Pollution Monitoring System for Smart Villages

11

3.2 Payload format of the LoRaWAN message

In our system, each LoRaWAN message carries information about 8 measurements which

are temperature, humidity, air pressure, PM1, PM2.5, PM10, CO2, and CO. These

measurements are encoded into 16 bytes and saved in the payload of the LoRaWAN

message which means that the payload size of each LoRaWAN message is 16 bytes.

Figure 8 shows the payload format of each LoRaWAN message.

16 bytes payload

Figure 8. payload format of a LoRaWAN message

byte 15

byte 14

byte 13

byte 12

byte 11

byte 10

byte 9

byte 8

byte 7

byte 6

byte 5

byte 4

byte 3

byte 2

byte 1

byte 0

Encoded

temperature Encoded

humidity

Encoded

pressure

Encoded

PM1

Encoded

PM2.5

Encoded

PM10

Encoded

CO2

Encoded

CO

Page 16: IoT-based Air Pollution Monitoring System for Smart Villages

12

4. Results

4.1 Literature review

Saha et al. [7] propose a real-time system which consists of sensor nodes, sink nodes, and

a cloud storage. The sensor nodes are deployed on the public transport buses to collect

data about air quality index, process it, aggregate it, and when a bus passes by a close

sink node, the sensor node sends the collected data to the sink node. The sink nodes are

placed at roads junctions and they can also collect, process, and aggregate data. However,

they communicate not only with sensor nodes but also with other sink nodes forming a

mesh network which uses a long-range radio band. The sink nodes send the collected

data, using the mesh network, to a collection point which uploads the data to the cloud to

be further processed and analyzed. This proposed system has an advantage of covering

most areas of a city since the sensors nodes are deployed on the buses of the city.

Fuertes et al. [8] introduce a low-cost system to monitor three air pollutants which are

CO, CO2, and dust. The system includes sensor nodes, a MySQL database, and a web

application. Each sensor node consists of an Arduino UNO, a Xbee Shield to transfer the

data, and three sensors which are MQ-7, MG-811, and GP2Y1010AU0F. The sensor

nodes collect data, format it in JSON format using an API, and send it to the web

application. The web application accesses the database and can visualize the sensors’

locations and their measurements on a map. As proof of concept of the introduced system,

the sensor nodes were deployed in three different cities in Ecuador, and the obtained

measurements were compared to the standard air quality limits so that the air quality in

each of the cities could be determined.

Okigbo et al. [9] compare the power consumption of two popular IoT boards in case of

monitoring air pollution. The compared boards are Arduino 101 BLE and Raspberry Pi

3, and each board is connected to Grove Sensors to collect temperature and Air Quality

Index data. The collected data is sent to a mobile app using BLE and the app sends the

data to Google fusion tables where the data is saved and analyzed. As a result of the

comparison, they find that Arduino 101 BLE consumes less energy than Raspberry Pi 3.

Hareva and Marsyaf [10] propose a system to monitor air quality in an outdoor

environment of a campus. They collect data about air quality using MQ_135 sensor which

is connected to WeMos-D1-R2 board. The board has a WiFi model, ESP8266, which

Page 17: IoT-based Air Pollution Monitoring System for Smart Villages

13

sends the collected data to a web server where the data is saved on a MySQL database.

The sensor units are configured to send data to the web server each 5 minutes and the

system has a web application that shows a graphical representation of the data and does

statistical analysis to show minimum, maximum, and average values of air quality.

Sun et al. [11] implement a real-time system which includes sensor nodes, mobile nodes,

gateway nodes, and a monitoring center to monitor air quality. Both sensor nodes and

mobile nodes measure the air pollution using several sensors which are: DSM501A to

measure PM2.5, MQ-131 to measure Ozon, MG811 to measure CO2, and DHT11 to

measure temperature and humidity. The sensor nodes are placed in fixed positions and

they use Zigbee modules to send the collected data to gateway nodes. Each gateway node

has a Zigbee module to receive data from sensor nodes, and a GSM module which is used

to send the data to the monitoring center where the data is saved and accessed. A mobile

node has also an embedded gateway node on it so that the data can be sent directly to the

monitoring center. Each mobile node has a GPS module, and it moves in a specific route

between the sensor nodes. When a mobile node becomes in the same position as a sensor

node, the mobile node collects and sends data to the monitoring center to calibrate the

reading from the sensor node. All nodes are powered by batteries and each gateway node

has a solar power module to charge its battery.

Wu et al. [12] build IoT sensing devices to collect data about PM2.5, PM5, PM10, CO2,

temperature, and humidity. The IoT devices are deployed on shared bikes and are

powered by batteries that can be charged using the bikes power system. The sensing

device sends the collected data to an application on the biker’s mobile via Bluetooth, and

the application combines the data with the geographical location and sends the combined

data to the back-end server. To make the measurements more accurate, the data from the

sensors is calibrated using a trained model on the server. The trained model is built by

comparing measurements from the used low-cost sensors with high-accurate reference

sensors where both types of sensors were collecting data about the same routes. In

addition, since the bike routes may not cover all positions of interest to monitor, the

system approximates the air quality of a position which does not have direct

measurements from the sensors by averaging the measurements collected in its nearby

places. In this way, the system can monitor a wide area including positions that bikes do

not pass through.

Page 18: IoT-based Air Pollution Monitoring System for Smart Villages

14

Shirai et al. [13] deploy sensors and gateways on garbage vehicles to monitor air quality.

Each vehicle has a gateway, and it collects data using several sensors which include:

GP2Y1010AU0F to measure dust, DN7C3JA001 to measure PM2.5, PS2 to measure

pollen, SHT71 to measure temperature and humidity, G5842 to measure ultraviolet,

BH171FVC to measure luminance, TGS2602 to measure CO, MICS-2614 to measure O3,

MICS-2714 to measure NO2, and GPS receiver to collect location information. The

collected data is sent to the gateway which sends the data to the remote server using

cellular phone networks. The system includes two software products, a Control Center

and a mobile application, which both communicate with the remote server. Both products

present and visualize the collected data in graphs. However, while the mobile app can be

used by any citizen to know how polluted his/her position is, the Control Center is used

by the system operator not only to present the data but also to control the sensor nodes.

The system operator can remotely update a sensor node program, for example changing

the sampling rate of a sensor, by using the Control Center to upload a new program to the

server from which gateways receive the program and deploy it on the sensor nodes.

Page 19: IoT-based Air Pollution Monitoring System for Smart Villages

15

4.2 Experimental results

4.2.1 Experiment Test 1

The graphs below show the results from the measured values taken from the first device

while it was deployed on the roof of the smart villages headquarters. The device was

active and taking measurements on Wednesday the 12th of May 2021 between the time

15:00 and 00:00.

Figure 9 shows the temperature measurements measured in Celsius (°C).

Figure 9. Temperature measurements (°C) collected by device 1.

Figure 10 shows the humidity measurements measured in percent.

Figure 10. Humidity measurements (%) collected by device 1.

Page 20: IoT-based Air Pollution Monitoring System for Smart Villages

16

Figure 11 shows the pressure measurements measured in hectopascal (hPa).

Figure 11. Pressure measurements (hPa) collected by device 1.

Figure 12 shows the PM1 measurements measured in micrograms of particles per cubic

meter (µg/m3).

Figure 12. PM1 measurements (µg/m3) collected by device 1.

Page 21: IoT-based Air Pollution Monitoring System for Smart Villages

17

Figure 13 shows the PM2.5 measurements measured in micrograms of particles per cubic

meter (µg/m3).

Figure 13. PM2.5 measurements (µg/m3) collected by device 1.

Figure 14 shows the PM10 measurements measured in micrograms of particles per cubic

meter(µg/m3).

Figure 14. PM10 measurements (µg/m3) collected by device 1.

Page 22: IoT-based Air Pollution Monitoring System for Smart Villages

18

Figure 15 shows the CO2 measurements measured in parts per million (ppm).

Figure 15. CO2 measurements (ppm) collected by device 1.

Figure 16 shows the CO measurements measured in parts per million (ppm).

Figure 16. CO measurements (ppm) collected by device 1.

Page 23: IoT-based Air Pollution Monitoring System for Smart Villages

19

4.2.2 Experiment Test 2

The graphs below show the results from the measured values taken from the devices while

they were deployed on a streetlight outside the smart villages headquarters. The devices

were active and taking measurements on Tuesday the 18th of May 2021 between the time

12:00 and 23:00.

Figure 17 shows a comparison between temperature readings of our two devices deployed

in the same location.

Figure 17. Temperature readings comparison of the two devices.

Figure 18 shows a comparison between humidity readings of our two devices deployed

in the same location.

Figure 18. Humidity readings comparison of the two devices.

Page 24: IoT-based Air Pollution Monitoring System for Smart Villages

20

Figure 19 shows a comparison between pressure readings of our two devices deployed in

the same location.

Figure 19. Pressure readings comparison of the two devices.

Figure 20 shows a comparison between PM1 readings of our two devices deployed in the

same location.

Figure 20. PM1 readings comparison of the two devices.

Page 25: IoT-based Air Pollution Monitoring System for Smart Villages

21

Figure 21 shows a comparison between PM2.5 readings of our two devices deployed in

the same location.

Figure 21. PM2.5 readings comparison of the two devices.

Figure 22 shows a comparison between PM10 readings of our two devices deployed in the

same location.

Figure 22. PM10 readings comparison of the two devices.

Page 26: IoT-based Air Pollution Monitoring System for Smart Villages

22

Figure 23 shows a comparison between CO2 readings of our two devices deployed in the

same location.

Figure 23. CO2 readings comparison of the two devices.

Figure 24 shows a comparison between CO readings of our two devices deployed in the

same location.

Figure 24. CO readings comparison of the two devices.

Page 27: IoT-based Air Pollution Monitoring System for Smart Villages

23

4.2.3 Experiment Test 3

The graphs below show the results from the measured values taken from the devices while

they were deployed on a streetlight outside the smart villages headquarters and close to

the country road. The devices were active and taking measurements on Wednesday the

19th of May 2021 between the time 11:00 and 22:00.

Figure 25 shows a comparison of temperature readings between the country road

(measured by node 1), and the headquarters (measured by node 2).

Figure 25. Temperature readings of the two devices deployed in different locations.

Figure 26 shows a comparison of humidity readings between the country road (measured

by node 1), and the headquarters (measured by node 2).

Figure 26. Humidity readings of the two devices deployed in different locations.

Page 28: IoT-based Air Pollution Monitoring System for Smart Villages

24

Figure 27 shows a comparison of pressure readings between the country road (measured

by node 1), and the headquarters (measured by node 2).

Figure 27. Pressure readings of the two devices deployed in different locations.

Figure 28 shows a comparison of PM1 readings between the country road (measured by

node 1), and the headquarters (measured by node 2).

Figure 28. PM1 readings of the two devices deployed in different locations.

Page 29: IoT-based Air Pollution Monitoring System for Smart Villages

25

Figure 29 shows a comparison of PM2.5 readings between the country road (measured by

node 1), and the headquarters (measured by node 2).

Figure 29. PM2.5 readings of the two devices deployed in different locations.

Figure 30 shows a comparison of PM10 readings between the country road (measured by

node 1), and the headquarters (measured by node 2).

Figure 30. PM10 readings of the two devices deployed in different locations.

Page 30: IoT-based Air Pollution Monitoring System for Smart Villages

26

Figure 31 shows a comparison of CO2 readings between the country road (measured by

node 1), and the headquarters (measured by node 2).

Figure 31. CO2 readings of the two devices deployed in different locations.

Figure 32 shows a comparison of CO readings between the country road (measured by

node 1), and the headquarters (measured by node 2).

Figure 32. CO readings of the two devices deployed in different locations.

Page 31: IoT-based Air Pollution Monitoring System for Smart Villages

27

5. Discussion

5.1 Literature review discussion

From our literature review, we observe that the most common monitored air pollution

parameters are CO, CO2, and different sizes of particulate matters. In addition, it is

observed that sensor unites can be deployed in different ways. For example, a sensor unit

is either placed in a fixed location, or it can be a mobile sensor unite that moves in specific

routes to collect data about different positions of interest. However, an air quality

monitoring system can include both static and mobile sensor units. Furthermore, we also

notice that a combination between a short-range communication, for example Bluetooth,

and a long-range communication, for example GSM, is common to be used in air

pollution monitoring systems.

5.2 Experiment discussion

The goal of our experiment was to monitor air pollution in Veberöd using its LoRaWAN

network and IoT platform Yggio, and as mentioned in Chapter 1.6, our experiment can

only be implemented if LoRaWAN network in Veberöd works, and if we have the

possibility to decode the data received on Yggio. The first problem was that we could not

connect to the LoRaWAN gateway until a late stage of our thesis since the gateway in the

village was not working properly. The gateway problem was fixed around the first of May

which is almost 3 weeks before the deadline of handing-in our thesis. The second problem

we had was that the received message in Yggio is hex encoded and we did not have the

possibility to decode the data. The Yggio platform has built-in decoders but only for a

limited number of standard devices, which our device was not a part of even though our

hardware was suggested and recommended by the village. To be able to have a decoder

for our device, Yggio company said it would take several weeks before we could have

the possibility to write a decoder to decode our data. In addition, Yggio does not save the

received data on its database unless the data is decoded. The result of this was that we

could only see the most recent encoded data.

Page 32: IoT-based Air Pollution Monitoring System for Smart Villages

28

Figure 33 shows a received LoRaWAN message on Yggio. It shows that the received data

is hex encoded.

Figure 33. Received LoRaWAN message on Yggio

In order for us to get readable values that can be saved, analysed, and visualized in graphs,

we used another platform called The Things Network which enabled us to decode the

values and send them to ThingSpeak platform where the data was saved and visualized.

Page 33: IoT-based Air Pollution Monitoring System for Smart Villages

29

5.2.1 Experiment Test 1 discussion

The day the device was collecting data, according to our phone’s weather app, the outside

temperature was between 12 and 22 degrees in Veberöd. As seen in Figure 9, we observed

that our device was reporting temperatures of up to 32 degrees when it was expected to

be 22 degrees at that time and around 20 degrees when it was expected to be 12 degrees

at that time. We believe this was due to the fact that our device was in direct sunlight

which was heating up the sensor and also since it is in an enclosed box, the heat trapped

inside the box made the sensor report higher values than expected by the phone’s weather

app.

Moreover, we notice from Figure 11 that the pressure measurements were stable which

makes sense because the device was at a fixed altitude. We also believe that the air

pressure measured by our device was quite accurate since according to the weather app

in our phones the air pressure in Veberöd was 1003hPa, and our device showed air

pressure measurements in the range from 1002 to 1004hPa.

Regarding the PM1, PM2.5, and PM10 measurements and by looking at Figure 12, Figure

13, and Figure 14, we observe the PM10 value is always greater or equal to PM2.5 value

which is always greater or equal to PM1 value when the values were taken at the same

time. Furthermore, according to [14], for a 24-hour period the mean value for PM2.5

should not exceed 25 µg/m3. Our recording was only in a 9-hour period and none of the

PM2.5 values exceeded 25 µg/m3 which indicates a decent air quality index. [14] also

mentions that the mean value for PM10 should not exceed 50 µg/m3, and none of our

measurements exceeded 29 µg/m3. Therefore, as far as particulate matter is concerned,

air quality in the village is good.

Furthermore, CO and CO2 are measured using the same sensor. From Figure 15 and

Figure 16, we observe both CO and CO2 values were very high in the beginning when the

measurements started, and then they were decreasing in the first 4 hours before they

became kind of stable. We believe the reason that the values were decreasing in the

beginning is that the sensor has a long warm-up time. After the sensor has warmed-up,

we can see that the CO2 values were around 1000 ppm, and according to [15], the average

ambient value of CO2 is around 413 ppm. We believe that our measurements are higher

than the real CO2 concentration in the village. The reason of this may be that the sensor

has a bad accuracy since it is a cheap sensor. Another reason of the high values can be

Page 34: IoT-based Air Pollution Monitoring System for Smart Villages

30

that we had newly manufactured the box of the device where we used glue and the glue

is affecting the reading from the gas sensor because it was not fully dried. It is also

possible that the monitored location was highly polluted at the time we acquired the data.

According to [16] for an 8-hour period, the mean CO value should not exceed 4.4 ppm.

Our measured values are between 3.5 and 6. Therefore, we believe that as far as the CO

is concerned, the air quality is good.

5.2.2 Experiment Test 2 discussion

By examining and comparing the temperature data, see Figure 17, we see that the

temperature values measured by the 2 devices were close to each other which indicates a

high accuracy of measuring the temperature. From Figure 18, we notice that the humidity

figures of the two devices follow the same pattern and report almost the same values

which also indicates good accuracy of measuring the humidity. From Figure 19, we

observe that the pressure values measured by the devices are also the same.

As far as particulate matter is concerned and as can be seen from Figure 20, Figure 21,

and Figure 22, we notice that the graphs for node 1 and node 2 follow the same pattern.

However, node 2 seems to be reporting slightly higher values compared to node 1. Even

though the values are not exactly the same, they are within an acceptable range.

Regarding the CO2 values, as seen in Figure 23, we can see that after 4 hours the CO2

sensor is heated and starts to report stable values for both devices. The values from device

1 are around 500ppm while the values from device 2 are around 300ppm. Considering

that the ambient air CO2 concentration is around 400ppm and the fact that the sensor used

is a cheap one, we believe that a better sensor should be chosen for measuring CO2

accurately.

In addition, by looking at Figure 24, we observe that the CO values reported by the two

devices are almost identical which indicates high accuracy of measuring CO.

Furthermore, we noticed that there was one LoRaWAN message which was lost and not

received on Yggio. The message should have been sent from node 2 at 17:30.

Page 35: IoT-based Air Pollution Monitoring System for Smart Villages

31

5.2.3 Experiment Test 3 discussion

As far as particulate matter is concerned, and as can be seen from Figure 28, Figure 29,

and Figure 30, we observe that there are no considerable differences between the air

pollution by the country road compared to the air pollution by the headquarters.

As we can see in Figure 31, the CO2 values by the country road are higher than by the

headquarters. But since there were already differences in the reported values by the two

devices regarding CO2 values even when they were deployed in the same location in

Experiment Test 2, we cannot conclude if the values are accurate or which location has a

higher CO2 concentration.

After concluding experiment 1 we had some concerns about the accuracy of the

temperature sensor since it was giving high values, but after concluding experiment 3 we

reviewed and compared our temperature values with the temperature values from existing

sensors in the village that were deployed in similar places. And after this, we could

conclude that our sensor had accurate temperature readings since our values matched the

village’s sensor values.

Moreover, it was observed that node 1 reported 21 LoRaWAN messages, but node 2 only

reported 16 messages. We believe that there are several possible reasons which could be

the cause that some messages are never received. One of the possible reasons could be

that the messages are colliding with other LoRaWAN messages. Another reason could be

that the gateway is having problems receiving multiple messages simultaneously.

Another reason could be that the signal strength is not always strong enough to reach the

gateway. In experiment Test 3 where we experienced more lost messages, all lost

messages were sent from node 1 which was deployed by the country road that is about

850 meters from the receiver gateway.

Page 36: IoT-based Air Pollution Monitoring System for Smart Villages

32

6. Future work

Our proposed system can be improved by:

• Connecting more sensors to the sensor unit so that more air pollutants can be

monitored. For example, sensors to measure Ozon and NO2 can be added to the

sensor unit.

• Replacing the gas sensor, MIKROE-1630 (MQ135), with other sensors to

measure CO and CO2 because of its low accuracy, high power consumption and

long warm-up time. For example, the NDIR sensor (T6713) is a better alternative

to measure CO2.

• Attaching a solar power module to the sensor unit to charge its battery.

• Calibrating the sensors by comparing the readings from the sensors with more

accurate reference sensors.

• Adding more sensor units to the system so that more positions in village can be

monitored at the same time.

• Investigating why some LoRaWAN messages are lost and not received on Yggio.

Page 37: IoT-based Air Pollution Monitoring System for Smart Villages

33

7. Conclusion

Due to the serious environmental and health impacts of air pollution, and because the

emergence of IoT eases designing and implementing systems to efficiently detect and

locate air pollution hotspots in smart cities/villages, there is an increasing need to

implement IoT-based systems to monitor air pollution.

In our work, we have reviewed different air pollution monitoring systems that are based

on IoT. In particular, we have focused on the architecture, sensors, monitored pollutants,

and how the communication is done in each of the reviewed systems.

In addition, we have proposed a system to monitor air pollution in Veberöd using the

LoRaWAN and the IoT platform, Yggio, in the village. The system includes 2 devices

with possibility to add more. During our experiment, there were problems in the

LoRaWAN gateway of the village and when the gateway problem was fixed, we found

that we do not have the possibility to decode the messages sent from our devices and

received by Yggio. This is a problem related to the Yggio platform and there was ongoing

work from the people who work with Yggio to fix it. The result of this was that the

received messages on Yggio were hex encoded and cannot be decoded. However, we

have used another IoT platforms, The Things Network and ThingSpeak, to decode,

visualize, and analyse the data.

After decoding the data on The Things Network and visualizing it using ThingSpeak, we

were able to monitor temperature, humidity, pressure, PM1, PM2.5, PM10, CO, and CO2

in the village. The results showed that the village has good air quality as far as PM1,

PM2.5, PM10, and CO are concerned. In addition, the results showed that the gas sensor

Mikroe1630 (MQ135) needs a long time to heat up and may not be able to accurately

measure CO2. Moreover, when the two devices were deployed in the same location, they

reported similar measurements for each of the measured values except for CO2. Our

results also showed that there were no considerable differences in air quality between the

country road and the headquarters area. Lastly, we have experienced some lost

LoRaWAN messages that should have been sent from the devices, but they were never

received.

Page 38: IoT-based Air Pollution Monitoring System for Smart Villages

34

8. Social and ethical aspects

This paper can be useful for anyone who wants to research or implement IoT air pollution

monitoring systems. The reader of this work can review and compare the different

sensors, monitored pollutants, and architectures of the reviewed systems.

In addition, our proposed system may be used in Veberöd to monitor air quality in the

village, and it can also be used to monitor air pollution in any village or city that has a

LoRaWAN network.

Page 39: IoT-based Air Pollution Monitoring System for Smart Villages

35

9. References

1. Manisalidis I, Stavropoulou , Stavropoulos A, Bezirtzoglou E. Environmental and

Health Impacts of Air Pollution: A Review. Frontiers in Public Health. 2020

February; 8: p. 4-9.

2. Induo. [Online]. [cited 2021 March 14]. Available from:

https://www.induo.com/s/g/vad-ar-lora/.

3. Wikipedia. [Online].; 2021 [cited 2021 March 14]. Available from:

https://en.wikipedia.org/wiki/LoRa.

4. MedlinePlus. [Online]. [cited 2021 March 28]. Available from:

https://medlineplus.gov/airpollution.html.

5. Mackenzie. NRDC. [Online].; 2016 [cited 2021 March 28]. Available from:

https://www.nrdc.org/stories/air-pollution-everything-you-need-know.

6. World Health Organization. [Online]. [cited 2021 March 28]. Available from:

https://www.who.int/health-topics/air-pollution#tab=tab_2.

7. Saha D, Shinde M, Thadeshwar S. IoT Based Air Quality Monitoring System Using

Wireless Sensors Deployed in Public Bus Services. In Proceedings of the Second

International Conference on Internet of things, Data and Cloud Computing; 2017;

Cambridge. p. 1-6.

8. Fuertes W, Carrera D, Villacís C, Toulkeridis T, Galárraga F, Torres E, et al.

Distributed System as Internet of Things for a new low-cost, Air Pollution Wireless

Monitoring on Real Time. In Proceedings of the 19th International Symposium on

Distributed Simulation and Real Time Applications; 2015; Chengdu. p. 58–67.

9. Okigbo , Seeam , Guness P, Bellekens JA, Bekaroo , Ramsurrun. Low cost air quality

monitoring: comparing the energy consumption of an arduino against a raspberry Pi

based system. In Proceedings of the 2nd International Conference on Intelligent and

Innovative Computing Applications; 2020; New York. p. 1-8.

10. Hareva , Marsyaf DP. Air quality monitoring at Pelita Harapan university using the

MQ-135 sensor. In Proceedings of the 3rd International Conference on

Page 40: IoT-based Air Pollution Monitoring System for Smart Villages

36

Telecommunications and Communication Engineering (ICTCE '19); 2019; New

York. p. 6-10.

11. Sun , Zhang , Shen , Zou. An Improved Air Quality Monitoring System Based On

Wireless Sensor Networks. In Proceedings of the 2017 2nd International Conference

on Communication and Information Systems (ICCIS 2017); 2017; New York. p. 31-

36.

12. Wu , Xiao T, Liao , Luo , Wu , Zhang S, et al. When Sharing Economy Meets IoT:

Towards Fine-grained Urban Air Quality Monitoring through Mobile Crowdsensing

on Bike-share System. Proc. ACM Interact. Mob. Wearable Ubiquitous Technol.

2020 June; 4: p. 26.

13. Shirai , Kishino , Naya , Yanagisawa. Toward On-Demand Urban Air Quality

Monitoring using Public Vehicles. In Proceedings of the 2nd International

Workshop on Smart (SmartCities '16); 2016; New York. p. 1–6.

14. World Health Organization. [Online].; 2018 [cited 2021 May 14]. Available from:

https://www.who.int/news-room/fact-sheets/detail/ambient-(outdoor)-air-quality-

and-health.

15. Holmgren P. Pär Holmgren. [Online].; 2021 [cited 2021 May 14]. Available from:

https://www.parholmgren.se/co2.php.

16. Agency USEP. Air Now. [Online].; 2018 [cited 2021 May 14 [Page 4]]. Available

from: https://www.airnow.gov/sites/default/files/2020-05/aqi-technical-assistance-

document-sept2018.pdf.

Page 41: IoT-based Air Pollution Monitoring System for Smart Villages

37

10. Appendix

All data related to device 1 is presented in the section “10.1 Device Node 1”, and all data

related to device 2 is presented in the section “10.2 Device Node 2”. The system plots

moving minimum, moving maximum, and moving average graphs of each of the

measurements allowing the system’s users to easily analyze the data. The sliding window

of the moving minimum, the moving maximum, and the moving average is 8, and the

graphs are plotted on ThingSpeak.

10.1 Device Node 1

10.1.1 Temperature

Figure 34 shows all graphs related to temperature values reported by device 1.

Figure 34. Graphs related to temperature values reported by device 1.

Page 42: IoT-based Air Pollution Monitoring System for Smart Villages

38

10.1.2 Humidity

Figure 35 shows all graphs related to humidity values reported by device 1.

Figure 35. Graphs related to humidity values reported by device 1.

Page 43: IoT-based Air Pollution Monitoring System for Smart Villages

39

10.1.3 Pressure

Figure 36 shows all graphs related to pressure values reported by device 1.

Figure 36. Graphs related to pressure values reported by device 1.

Page 44: IoT-based Air Pollution Monitoring System for Smart Villages

40

10.1.4 PM1

Figure 37 shows all graphs related to PM1 values reported by device 1.

Figure 37. Graphs related to PM1 values reported by device 1.

Page 45: IoT-based Air Pollution Monitoring System for Smart Villages

41

10.1.5 PM2.5

Figure 38 shows all graphs related to PM2.5 values reported by device 1.

Figure 38. Graphs related to PM2.5 values reported by device 1.

Page 46: IoT-based Air Pollution Monitoring System for Smart Villages

42

10.1.6 PM10

Figure 39 shows all graphs related to PM10 values reported by device 1.

Figure 39. Graphs related to PM10 values reported by device 1.

Page 47: IoT-based Air Pollution Monitoring System for Smart Villages

43

10.1.7 CO2

Figure 40 shows all graphs related to CO2 values reported by device 1.

Figure 40. Graphs related to CO2 values reported by device 1.

Page 48: IoT-based Air Pollution Monitoring System for Smart Villages

44

10.1.8 CO

Figure 41 shows all graphs related to CO values reported by device 1.

Figure 41. Graphs related to CO values reported by device 1.

Page 49: IoT-based Air Pollution Monitoring System for Smart Villages

45

10.2 Device Node 2

In 18th of May, we have sent a LoRaWAN message which does not have any payload.

Therefore, we see all values were zeros at that time.

10.2.1 Temperature

Figure 42 shows all graphs related to temperature values reported by device 2.

Figure 42. Graphs related to temperature values reported by device 2.

Page 50: IoT-based Air Pollution Monitoring System for Smart Villages

46

10.2.2 Humidity

Figure 43 shows all graphs related to humidity values reported by device 2.

Figure 43. Graphs related to humidity values reported by device 2.

Page 51: IoT-based Air Pollution Monitoring System for Smart Villages

47

10.2.3 Pressure

Figure 44 shows all graphs related to pressure values reported by device 2.

Figure 44. Graphs related to pressure values reported by device 2.

Page 52: IoT-based Air Pollution Monitoring System for Smart Villages

48

10.2.4 PM1

Figure 45 shows all graphs related to PM1 values reported by device 2.

Figure 45. Graphs related to PM1 values reported by device 2.

Page 53: IoT-based Air Pollution Monitoring System for Smart Villages

49

10.2.5 PM2.5

Figure 46 shows all graphs related to PM2.5 values reported by device 2.

Figure 46. Graphs related to PM2.5 values reported by device 2.

Page 54: IoT-based Air Pollution Monitoring System for Smart Villages

50

10.2.6 PM10

Figure 47 shows all graphs related to PM10 values reported by device 2.

Figure 47. Graphs related to PM10 values reported by device 2.

Page 55: IoT-based Air Pollution Monitoring System for Smart Villages

51

10.2.7 CO2

Figure 48 shows all graphs related to CO2 values reported by device 2.

Figure 48. Graphs related to CO2 values reported by device 2.

Page 56: IoT-based Air Pollution Monitoring System for Smart Villages

52

10.2.8 CO

Figure 49 shows all graphs related to CO values reported by device 2.

Figure 49. Graphs related to CO values reported by device 2.