Internet of things-based real-time monitoring of air quality in Sulaymaniyah, Iraq

. Providing accurate measurements and monitoring of air quality is considered to be one of the most prominent features of modern cities. One component of air pollution is particles of diameter between 2.5 and 10 micrometres and less. They are mixtures of small solid particles and liquid droplets produced due to chemical reactions. Having said this, in this paper, an attempt is made to design and program a low-cost air detector accumulating data about the concentration of particulate matter of diameters 2.5 and 10 micrometres in two different places in the city of Sulaymaniyah and at two different times, (i) during the institution of quarantine regulations, due to COVID pandemic, and (ii) after quarantine is lifted. In addition, a website is created simultaneouslytobothdemonstrateandsavethedataobtainedbytheairdetector.Moreover,usingthequantifying methoddevelopedbytheUnitedStatesEnvironmentalProtectionAgency(EPA),theaccumulateddatacanbe usedfordecisionmaking.Lastly,itshouldbementionedthatallthemillstonesofthisresearchwerecarriedout practically on a small scale, andthe created system was able to provide data with reasonableaccuracy. It should be pointedout thatthe processof data recordingwasbetween 20thofFebruary and10thofMay2020, intwodifferent places namely Sarchnar and Saholak, which was during quarantine. Thus, the concentration of both particulate matter of 2.5 and 10 micrometres till endof April was lowwith an average of 40 and 60 m g/m 3 for 2.5 micrometre in Sarchnar and Saholaka, and 90 and 140 m g/m 3 for 10 micrometres in Sarchnar and Saholaka since quarantine regulationswerestrict.However,from20thofApriltill10thofMayasthequarantineregulationsgotlessserious,the number increased to 75 and 70 m g/m 3 for 2.5 micrometre in Sarchnar and Saholaka, respectively and 140 and 180 m g/m 3 for 10 micrometres in Sarchnar and Saholaka, respectively.


Introduction
According to the World Health Organization (WHO), air pollution is considered to be the primary cause of about 7 million premature deaths all over the world annually [1].For instance, research studies have confirmed that only in the year 2016, 3.8 million people died due to being imposed in an unhealthy environment [2].Moreover, WHO has released a report claiming that about 90% of the world population is deprived of an environment with the kind of air qualities accepted by their standards [3].Despite all the above-mentioned data, now it has been confirmed that air pollution can also play a significant role in spreading COVID-19 [4].Recently, it has been discovered that particulate matter (PM) is one of the most dangerous components of air pollution [5].PM are particles with a diameter ranging between 2.5 and 10 micrometres or less, and they can be solid or droplets [6].They are produced due to natural phenomena like fires, or they can come from emissions of power stations, industries, etc. of course, Iraq is one of the countries which is considered to have been producing a lot of PM every day due to different activities performed in the country.For instance, in every city in Iraq, there is a huge number of cars, and according to research done, PM produced from car engines in Baghdad exceeds the standard adopted by WHO by 114% [7].Nevertheless, researchers have suggested that fulling the engine with biokerosene will reduce the concentration of PM 2.5 and 10 productions dramatically, namely 51.8% and 42.7% [8].Besides cars, oil, and gas, electricity production from local generators is also deemed to be one of the main sources of PM production.Thus, research has suggested that replacing the local generators with solar (photovoltaic) module will cause in reducing PM 2.5 and PM 10 by 85.6% and 52.4,respectively, in certain applications [9].In response to the above shown problem on one hand, and the fact that the number of official stations for air quality monitoring was highly restricted, and they are only able to provide data which has been averaged for 24 hours on the other hand, LuftDaten À Citizen Science Project initiated an endeavour aiming at using Internet of Thing (IoT) to collect data about air quality.The project terminated in creating a sensor that can be easily connected to a huge database which is used globally.Nowadays, there are over 14.322 thousand sensors in 69 countries [10].Even though the data accumulated from these sensors are not as accurate as those coming from the official stations, they have the advantage of being able to increase the coverage of air pollution considerably, and the collected data is demonstrated every minute.Having said all above, this paper makes an attempt to perform a case study for the city of Sulaymaniyah.However, it should be pointed out that this paper will use its own sensor and website developed by the authors of this paper.The main purpose of performing such a task is to create a system for the city of Sulaymaniyah so that the local government can easily monitor the air quality of the city.The scope and novelty of the research will be limited to developing and installing two sensors in Sarchanr and Saholak À for a cost-effective solution, and they only recorded data between 20th of February and 10th of May.However, the local government can easily repeat the model developed here in order to cover more areas once the budget is provided.Having such a system will provide the local government with crucial data for decision making.It will also give people knowledge about the quality of air in all places of the city.Lastly, the implementation of such system will reduce the possibility of inhabitants being imposed to air pollution, which prevents the spread of many diseases.

Related work
Throughout the last five decades, several methods have been used to measure and monitor the concentration of PM in the air.Some of them have been quite useful, and some others have demonstrated shortcomings.In order not to neglect those attempts on one hand and show why the selected method is more effective, this section will emphasize two essential points, namely summarizing some of the sensors which have been used for the mentioned purpose.And how other researchers have been able to monitor the air in different locations using the same mechanism and method adopted in this paper.

Types of sensors and their working mechanism
Various research studies have been conducted to design and propose different kinds of sensors using different mechanisms of working so that better air quality monitoring is accomplished.Each sensor has its distinctive features and is used for unique applications.Also, each of them has its own advantages and disadvantages.Having said this, Figure 1 illustrates a classification of the PM measurement devices available in the market [11].As it is illustrated in the above graph, the devices and methods are divided according to finding either (i) the concentration of PM or (ii) size distribution.The first method used to measure the concentration of PM is known as the Gravimetric method.Here, the main principle is that filters are weighed before and after sampling time.Nussbaumer used this method in the process of combustion of gases [12], and Giechaskiel in the process of nucleation accumulation [13].This method has the shortcoming of not being accurate and working under determined temperature and humidity levels.Also, it has been confirmed that this method demands future analysis in order to give certain results, such as Scanning Electronic Microscopy (SEM) and Transmission Electronic Microscopy (TEM).Another method which is also very common in measuring the concentration of PM is known as the optical method.Here, particles are imposed to light, and they will either scatter or absorb the light.The summation of both of them is also known as extinction [14].The light scattering photometer device measures all the lights reflected from the particles, and it uses visible light, 600 nm, with an angle of 45 and 90 [14].Each and every particle will have its own angle of reflection, and this is how the concentrations of both PM 10 and PM 2.5 are determined.Several techniques are used to measure absorbed light [15], but it is also confirmed that this method, despite its many difficulties, does not have good results [16].The light distinction is a method developed in a laboratory by Mellon et al. [16] and Pettersson [17].It has the shortcoming of not being available easily [11].The last method of measuring the concentration of PM is known as microbalance.Here, the resonance of frequency is used to determine the concentration of PM.This method was used by Jiang and bell for measuring PM 10 [18] and Elsasser for measuring PM 2.5 [19].As it is shown in the provided graph above, there are five methods to determine the size distribution of PM.However, it will not be explored here since they are not in the scope of this study.Lastly, it should be said that the selected method in this research is the best since it low-cost, it is easily available, it does not have restrictions, and it is accurate in range of 10% of error.It should be noted that correction functions can be used by employing large sets of data from the sensor and utilizing reference values from an air quality monitoring station [20].Moreover, having such systems can help in produce large sets of data which can used for forecasting PM values with respect to other parameters using Artificial Neural Network (ANN) techniques [21].

Examples of implementations of the method adopted in this paper
This section is devoted to exploring the works of some researchers who have implemented the same method adopted here.The main purpose here is to demonstrate how those researchers have used this method and to investigate the concentration of different elements in the air.
Marinova et al. [22] identified relative environmental parameters of a smart city using IoT.The system they have developed is encompassed in three main parts.The first part is called sensor nodes.Various sensors were used such as CO-AF sensor with a range of 0 to 5000 ppm for carbon monoxide, NO 2 -A42F sensor for nitrogen dioxide, OX-A421 sensor for ozone, O 2 -A2 sensor for oxygen, and HDC1050 sensor for humidity, temperature, and pressure.It should be mentioned that all those sensors are from Texas instruments.Once the data is received appropriately through all the above-mentioned sensors, using IoT, the data was sent to the second component of the system, which is the webserver.In the server, the data were collected and interpreted according to certain algorithms installed in it.Lastly, the third component of the system consists of a computer and other devices for the purpose of result demonstration.The research has concluded that the obtained results are very similar to the data released by the official station of the same city.Therefore, it is concluded that this method, despite the fact that it has almost the same result as the official stations, has the advantages of covering more area and giving fast results.
shown in detail so that anyone can duplicate the method, and consequently be able to monitor the concentration of PM in the air.

Material and methods
This section is devoted to explaining the two main millstones of this research, which are the hardware and software designs.However, Figure 2 shows a flow chart of the entire project in steps.

The hardware design
This section will be devoted to explaining all the parts that are included in the hardware design of the system, why they are chosen, and how they are connected.It should be pointed out that availability of materials, low cost, high accuracy, etc., factors played a significant role in choosing the following components.

Single board micro-controller (esp 8266 NodeMCU MCU-v3)
Taking into account the availability of materials and striving to select the best of them simultaneously, it was decided that esp 8266 NodeMCU À y3 will be used, which has the following features as it has RAM of 50K, it can be connected to Wi-Fi, and it has the capacity of 4 MB flash memory.The main function of this element is that it takes information from the sensors and it is programmed to interpret the information.Figure 2 provides a picture of esp 8266 NodeMCU À y3.In the coming sections, the coding of this element is vividly demonstrated.

Dust sensor (SDS011)
Among all the above-demonstrated sensors, SDS011 dust sensor was selected for the following reasons: (i) it allows the usage of a big fan which increases its quality, accuracy, and reliability, (ii) it can measure between 0.0 and 999.99 mg/m 3 , (iii) it requires the following features such as in put voltage of 5 V maximum, current of 80 mA, sleep current of 5 mA, the required time for the response of 1 second, the serial data output frequency of 1 time/second, the relative error of 10%, temperature range of 10-50 °C, the physical size of 71 mm * 70 mm * 23 mm, humidity range Storage of Max 70%, and Air pressure of 86 KPa ∼110 KPa. Figure 3 shows the components of SDS011.
The PCB (Printed Circuit Board), which is the part that has all other components placed on it, is used as one side of the casing.The diode is placed on the PCB side (this is compulsory since any noise between the diode and the LNA ought to be avoided).The diodes are laser and photodiode which are used to direct lights at the aimed particles.The laser placed on the plastic box is connected to the PCB via wire.The main CPU (Central Processor Unit) is an 8 bit processor, which is deemed appropriate for this application.Under the shielding, there is a Low Noise Amplifier, which is directly connected on the opposite side of the diode.Figure 4 shows a picture of the sensor connected to the selected CPU.When particles of the determined diameter go through the sensor, light scattering will occur.The process of light scattering will produce electrical signals, and the electrical signals will be interpreted and processed according to the program installed in the sensor.Then, the sensor will distinguish the wavelength of the scattered lights, and this is how the concentration of PM 2.5 and PM10 will be known.As it was said previously, the process is accurate with only about 10% of inaccuracy, and of course, this is with the certain limitations pointed out previously.

Connecting the parts
Before starting the assembly process, the following materials have to be prepared, namely Esp8266 NodeMCU model v3, SDS011 Dust Sensor, Power supply, Voltage regulator, Datable wire (for compiling code), Wire, Switch, Led, and a Waterproof plastic box.
Once all the parts were ready, the assembly process began.Taking into consideration many designs that are available in the market, it was decided that the following structure or design, as shown in Figure 5, is suitable.
Then, the final design was constructed and placed in a waterproof box to protect it from damage and climatic conditions since it is installed in outdoor environmental conditions.A pipe and a wire were taken out from the box for the sake of a power supply and an outlet for the sensor.Figure 6 provides a picture of the constructed system in a waterproof box.

Software part
An explanation of all the programming parts of the system is laid out in detail in this section.All the coding is provided in the appendices so that others can follow the process and duplicate what has been accomplished in this study.The software part has three main millstones that have to be completed.First, free web hosting has to be registered.Then, a database has to be created inside the free host.Appendix one showcases a step-by-step guide on how to create the database inside a free host.Once the data base is created, then it has to be programmed so that it accomplishes the task given to it.Appendix two has all the coding of the database and other additional details that are necessary.Lastly, the Arduino microcontroller has to be programmed.Appendix three presents the details of how to program and do other technical works so that the system functions as it is required.

Accuracy, uncertainty and data availability
DSD011 is one of the best types of sensors available in the market.The working principle is based on light scattering, which is considered to be effective, especially when working with small particles.It is also deemed to be highly accurate and reliable due to distinctive parameter features, which are demonstrated in the table below.
Besides all the parameters mentioned above, some additional information should also be pointed out.Since the size of the sensor is L*W*H = 71 * 70 * 23 mm cube, it is considered to be very suitable for many applications.Also, its working hours are estimated to be about 8000 hours which is again very reasonable.

An overview of the system
Up to now, all the hardware parts of the system have been assembled together very well on the one hand, and on the other hand, the software part has been programmed.Moreover, it should be said that while designing the two mentioned part, it has been made sure, through initial tests, that they can work in one system.After the two designs were completed, a practical test was conducted, and the result showed that the system works according to what was created in the design part.Effectively, making this system an appropriate example of the Internet of Things (IoT) since all the parts are well connected together, and using internet information can be transformed and interpreted well.Figure 7 is an example of the system and the places where the sensors are installed.Having said the main objectives for conducting this research, this section seeks to provide two tables that will demonstrate an example of all the data accumulated during the data collection period.The data is illustrated in two columns, each capturing the details of a particular area in Sulaymaniyah, namely Saholaka and Sarchnar.After the data is recorded according to the procedure set previously, the designed website, using the codes given to it, demonstrated the result.Large data was collected for 4 months, starting from February to May, from two places so that it can be determined how polluted the atmosphere of those mentioned places has become.The results are provided in Figures 9 and 10.
As it is depicted above, the first and second columns demonstrate concentrations PM-10 and PM-2.5 in the air.The third column is the place from which the data was accumulated, and the last column is the time during which the data collection took place.However, before performing any analysis, it should be said that the concentration of PM in the air has global standards according to which it is analyzed.
Columns P_10 and P_2.5 provide data showcasing the pollution of air, and they vary in the size of the particles that they investigate in the air.As it is illustrated in the table above in Figures 9 and 10 Further the data is displayed across time of measurement for the two location and is provided in Figures 11-14; a visual demonstration of the results obtained above has been shown.
Having provided the data for 22nd February in Figure 8 and 22nd April in Figure 9, a sample was taken from Saholaka to see how the system actually works.The P_10 and P_25 for 22nd February shows 1.7 and 1.4, and it shows P_10 and P_25 of 2.30 and 1.8 for 22nd April.As it can be seen, the number has increased slightly; this increase can be traced back to the fact that as the weather gets hotter, the movement of the particles increase and the machine consequently will read higher numbers.This conclusion is right for Sarchnar as well.However, the main reason for this expected increase is that as time passes, gradually, quarantine regulations have been made less serious, and more PM producing activities have started to take place.
Taking a close look at the data provided in the graphs depicted above, it can be seen obviously that the concentration of both PM 2.5 and 10 in the area of Saholaka is higher than in Sarchnar.The reason can be traced back to the fact that the area of Saholaka is more crowded, and it has more cars.Also, the concentration of trees is very higher in Sarchnar compared to Saholaka.
Ho Jo et al. [31] have determined the average concentration of PM2.5 and 10 to be around 260 and 190 mg/m 3 for the years of 2017 and 2018 in Bupyeongsamgeori station tunnel.this means that Jo has chosen the most polluted place in the city, and the concentration of PM cannot be higher in anywhere else.This number is very close to the number that this research has found.However, it should be mentioned that the number found in this research for the city of Sulaymaniyah is during the time of COVID-19 more specifically after long period of quarantine.Thus, it can be concluded that the two chosen place of this research are as polluted by PM 2.5 and 10 as it is very close to one of the most polluted places in South Korea.Moreover, Tagle et al. [32] have calculated the average concentration of PM 2.5 and 10 for the city of Santiago in Chile to be around 80 and 50 mg/m 3 for the last six months of 2018.The above-mentioned concentration of PM is for a normal time of a city in Chile which is lower than the quarantine time of Sulaymaniyah.This again confirms that the city has high concentration of PM in its area.Lastly, Firoz Khan et al. [33] have also determined the concentration of PM 2.5 and 10 to be 20.6 and 9.6 in Yokohama Japan.Even though they have claimed that such findings exceed the international standards, it should be mentioned that those results are very low compare to the findings of this paper.However, the standards adopted for countries are different, and it is known that Japan is one of the countries that bestows a lot of emphasis to environmental problems [31].
Lastly, it should be said that the data accumulated in this research tells that the city of Sulaymaniyah is polluted compared to other cities around the world.Therefore, it must be said that the city of Sulaymaniyah has to take serious steps toward solving the problem so that the risk will not have too severe consequences.

Conclusions and recommendations
In conclusion, throughout conducting this case study for the city of Sulaymaniyah, a huge amount of data was able to be accumulated, which can be easily utilized in decision making, and of course, this will result in many advantages.This research was able to find that the concentration of both a particulate matter of 2.5 and 10 micrometres till the end of April was low namely around an average of 40 and 60 mg/m 3 for 2.5 micrometres in Sarchnar and Saholaka and 90 and 140 mg/m 3 for 10 micrometres in Sarchnar and Saholaka since quarantine regulation was in vagarious practice.However, from 20th of April till 10th May as the quarantine regulations were removed, the number increased to 75 and 70 mg/m 3 for 2.5 micrometre in Sarchnar and Saholaka and 140 and 180 mg/m 3 for 10 micrometres in Sarchnar and Saholaka.Moreover, while conducting this research, many questions were raised to which there were not straightforward answers.Therefore, it is deemed necessary that some of those questions are mentioned here to be addressed in future research.For instance, it is crucial to precisely determine the main sources of PM production such as cars, oil and gas burning, electricity production, factors, etc., and the contribution of each source.This will result in quantifying the amount of PM coming from different sources, and of course, this will help researchers to give more emphasis to the source which causes more pollution.Moreover, it is important to improve the data collection methodology so that the process will be made as accurate as possible.In addition to providing suggestions about how to replace those old technologies causing PM production with more sustainable products and services.Moreover, it is also suggested that the government and private sector work on enlarging the scale of this project so to cover all areas of Iraq and not only Sulaymaniyah.However, doing so will require a lot of research devoted to predicting the final cost of the project, choosing best type of sensor, database, and other equipment, determining the best positions for the sensors, and many other concerns.It is important to consider these findings in policymaking and awareness efforts, in general, to educate the public about the risks of

Fig. 2 .
Fig. 2. A flow chart of the stages conducted to create the low-cost IoT-based air quality sensing system.

Fig. 5 .
Fig. 5. Photograph of the (SDS011) sensor and the CPU with the Fan.

Fig. 7 .
Fig. 7. Picture of the final product embedded into a waterproof box.

Table 1 .
The main parameters of the sensor used in this research.
, the data accumulated over time shown by P_10 and P_25 are different for various times and places.

Fig. 8 .
Fig. 8.The diagram of the system and places of the sensors on map.