InTechOpen uses cookies to offer you the best online experience. By continuing to use our site, you agree to our Privacy Policy.

Computer and Information Science » Computer Science and Engineering » "Wireless Sensor Networks - Insights and Innovations", book edited by Philip Sallis, ISBN 978-953-51-3562-3, Print ISBN 978-953-51-3561-6, Published: October 4, 2017 under CC BY 3.0 license. © The Author(s).

Chapter 7

Low-Cost Energy-Efficient Air Quality Monitoring System Using Wireless Sensor Network

By Kavi Kumar Khedo and Vishwakarma Chikhooreeah
DOI: 10.5772/intechopen.70138

Article top


The SensorWebBike framework components [15].
Figure 1. The SensorWebBike framework components [15].
Air Quality Egg system diagram [16].
Figure 2. Air Quality Egg system diagram [16].
High level architecture of the proposed system.
Figure 3. High level architecture of the proposed system.
Crossover parent [19].
Figure 4. Crossover parent [19].
Crossover offspring [19].
Figure 5. Crossover offspring [19].
Original offspring [19].
Figure 6. Original offspring [19].
Mutated offspring [19].
Figure 7. Mutated offspring [19].
Transmitter setup.
Figure 8. Transmitter setup.
Receiver setup.
Figure 9. Receiver setup.
The service architecture of ThingSpeak.
Figure 10. The service architecture of ThingSpeak.
Monitoring application interface.
Figure 11. Monitoring application interface.
Graphical display of AQI value.
Figure 12. Graphical display of AQI value.

Low-Cost Energy-Efficient Air Quality Monitoring System Using Wireless Sensor Network

Kavi Kumar Khedo and Vishwakarma Chikhooreeah
Show details


Due to rapid industrialization and urbanization, Mauritius is witnessing an unprecedented increase in air pollution. The release of hazardous gases such as carbon monoxide and sulphur dioxide are not only harmful to the health of the population but are also causing irreversible impact to the environment. Currently, there are only two fixed air quality monitoring units on the island and therefore, air pollution cannot be monitored in real-time. The objective of this chapter is to describe the implementation of a low-cost and energy-efficient air quality monitoring system using wireless sensor network (WSN) that can be easily deployed in highly polluted areas of Mauritius. A Hierarchical Based Genetic Algorithm (HBGA) is proposed to address the issue of sensor nodes with limited energy. Based on hierarchical routing and genetic algorithm, HBGA has been designed to extend the lifetime of the network by minimizing the energy consumption. The proposed air quality monitoring system uses an air quality index that can be easily interpreted. The evaluation results confirm the potential of the proposed system for real-time temporal and spatial monitoring of air quality. Moreover, it possible for the general public to have access to the air quality monitoring results in real time.

Keywords: air pollution, sensor networks, genetic algorithms, hierarchical routing, air quality index

1. Introduction

The objective of this chapter is to report on the implementation of a low cost and energy-efficient air quality monitoring system using wireless sensor network (WSN) that is deployed in highly polluted areas in Mauritius. Mauritius is a densely populated island of around 1.3 million people. The air quality in Mauritius has been adversely affected over the past years due to the continuous economic development and alterations in the population consumption and production patterns that have contributed to the release of pollutants in the atmosphere [1]. The increasing level of air pollution in Mauritius from vehicles exhaust fumes, chemical discharge from industries and toxic gas leakages are seriously affecting the citizens’ health and damaging crops, ecosystems and materials. The release of gases such as carbon monoxide, sulphur dioxide, oxides of nitrogen, ozone, lead and dust particulates are not only harmful to human health but also have a great impact on the ecosystem [2]. As a result of industrialisation and urbanisation, ensuring a good ambient air quality has become a national challenge in Mauritius.

The emergence of wireless sensor networks (WSNs) has allowed the miniaturization and ubiquity of computing devices. WSNs can be deployed on a global scale for various activities such as environmental monitoring, habitat studying, infrastructure health monitoring, military surveillance, traffic control and others [3]. The construction of smart cities throughout the island can be leveraged to use the WSN medium for more effective and efficient air quality monitoring. There is currently a lack of well-developed network of air quality monitoring systems across the island. The smart city projects in Mauritius is providing the necessary conditions to set up a much better air quality monitoring system in terms of cost, power efficiency, scalability and communication by using cheap portable ambient sensors [4].

The implementation and deployment of the WSN system confirms the potential of such a system to allow the general public to have access to the monitoring results in real time by means of the IoT (Internet of Things) devices. The different WSN components such as sensors, microcontrollers, wireless modules and software that are used to implement the energy-efficient air quality monitoring system are described in this chapter. The system is able to show the real time monitoring readings and graphs of the pollution phenomenon on the monitoring application along with its air quality index (AQI) aspects. The real time readings are made available to any user across the world that is connected to the internet through the ThingSpeak cloud service.

2. Wireless sensor network systems for air quality monitoring

In this section existing works on air quality monitoring and air quality indexing are described. Moreover, existing wireless sensor network (WSN) systems for air quality monitoring are surveyed and discussed.

2.1. Air quality monitoring

Air contains a mixture of gases, small solid and liquid particles. Some substances come from natural sources while others are caused by human activities. The air is said to be polluted when the contents of the air cause harm to the comfort or health of human and animals, or could even damage plants and other materials. These contents are termed as air pollutants and can be either particles, liquids or gaseous in nature. Air Quality Monitoring (AQM) is carried out to assess the extent of pollution, ensure compliance with national legislation, evaluate control options, and provide data for air quality modelling. The goal of AQM is to protect humans and the environment from harmful air pollution [5, 6]. There are different methods to assess any type of pollutant depending on the complexity, consistency and detail of data. These range from simple passive sampling techniques to highly sophisticated remote sensing devices.

The need for the implementation of AQM is to make mitigation strategies and arouse environmental awareness among citizens. Hence, several techniques and technologies have been introduced to monitor air quality [7]. According to a survey done by the World Health Organisation (WHO), it has been seen that urban outdoor air pollution and indoor air pollution accounts for more than 2 million premature deaths each year. More than half of this disease burden is borne by the populations of developing countries. It is therefore vital to constantly monitor the air quality in order to detect unfavourable conditions that must be avoided. Air pollution monitoring consists of systematically assessing the ambient pollutants level in the surrounding indoor and outdoor air. Many countries and cities usually have their own pollution control mechanisms complying with short and long-term air quality objectives set for acceptable levels of pollutants concentrations. Assessing the present and the unforeseen air pollution through continuous air quality monitoring is necessary so as to know the status and trends of ambient air quality and its effects on the environment. Evaluating the changes in air quality is necessary in developing precautionary and corrective measures to control and regulate pollution from various sources.

The increasing level of air pollution is mainly from sources such as smoke from vehicles exhaust and industrial activities. The common gases affecting the quality of air are carbon monoxide, sulphur dioxide, oxides of nitrogen, ozone, lead and dust particulates. Air quality monitoring is therefore needed so that appropriate actions can be taken in order to mitigate its negative impact. Usually databases are used to store the collected data from a monitoring system. The data is then retrieved and analysed to see if they are aligned to the pollution regulatory standards or not. In simple terms air quality monitoring network is used to record the concentration of pollutants and these information are delivered to the population to notify against danger. Another important consideration in air quality monitoring system is the locations of the monitoring stations and networks which should provide proper spatial coverage in populated areas such as busy roads, city centres or a particular location such a hospital and school [8].

Various technology and methodology have been used in order to provide air quality data in real time ranging from traditional way of passive sampling technique to the most sophisticated means such as use of sophisticated remote sensing devices. It is essential to define the options and monitoring methodology most appropriate in terms of cost, reliability and ease of operation. A means of monitoring air pollution is through online General Packet Radio Service (GPRS) sensors comprising of a microcontroller chip and an application server. The mobile data acquisition unit collects the pollution level and organise it into a frame with Global Positioning System (GPS) location, date and time. This frame is then uploaded to the GPRS modem and sent to the pollution server through the public mobile network [5, 9].

Air quality monitoring stations are often expensive and deliver a low resolution sensing data as these stations cannot be densely deployed. Alternatively, one of the effective solutions to provide real time pollution data is through the use of wireless sensor network (WSN) for air quality monitoring which is easy to set up and inexpensive. Consisting of calibrated sensors, WSN systems use a data aggregation algorithm and a routing protocol along with a light-weight middleware for transmission of the pollution data to a base station where they are visualised in graphical forms. Other parameters like humidity and temperature needs to be taken into consideration [9] for providing more accurate pollutant data as these parameters affect the measured gas concentrations.

2.2. Air quality indexing

The assessment and calculation of air pollution level is built on standards which is present in almost every country of the world. The United States Environmental Protection Agency (EPA), the World Health Organization (WHO), the European Commission (EC), the Chinese Ministry of Environmental Protection (MEP) and the Environmental Protecting Department(EPD) of Hong Kong have established different standard limits for pollutants in order to inform the public of the current air quality easily.

A suitable way for characterising atmospheric pollution is through air quality index (AQI). AQI is a quantitative tool which provides information on how fresh or polluted the air is by consolidating the pollution data in the form of reports. Many countries make use of some type of AQI to interpret the quality of the air. An AQI is useful in several ways such as easy interpretation of air quality situation by the general public [10]. Moreover, based on the AQI quick actions can be undertaken, corrective pollution control strategies may be implemented from the trend of events, the impact of regulatory actions may be assessed and scientific researches may be carried out.

The index values help to divide the air pollution situation into categories such that each category is identified by a simple informative descriptor which can be easily used to inform the public on the status of the air as shown in Table 1 [11].

Index valuesIntervalAQI category
1AQI > X1Very good
2X2 < AQI < X1Good
3X3 < AQI < X2Acceptable
4X4 < AQI < X3Poor
5AQI < X4Bad

Table 1.

Summary of AQI range and descriptor [11].

2.3. Existing air quality monitoring systems

Recent engineering advances together with the internet, communications, and information technologies is enabling the creation of new generation low-cost sensors and actuators that are able to achieve great spatial and temporal resolution and exactitude. A wireless sensor network (WSN) is a wireless network comprising of spatially spread autonomous sensor devices to monitor environmental and physical conditions such as air pollution, light, sound, pressure and temperature etc. The sensors pass their data cooperatively through the network to a central location. There are diverse types of gas sensors that are available to measure different gas concentrations such as CO, CO2, SO2, and NO2 sensors. The WSN system can be deployed in cities to monitor the air pollution level. The air quality measurement is processed and presented to the end user in real time in a user friendly manner. This allows the citizens to take appropriate precautionary measures when required.

The nodes that make up the WSN can range from a few to several hundreds, where each node is connected to its sensor counterpart. Data sensed by each sensor is aggregated by the network and passed on to a sink node. A sensor node may vary in size and typically consist of several parts such as the radio, battery, microcontroller, analogue circuit, and sensor interface. The capabilities of the sensor node are usually constrained in terms of energy, memory, computational speed and communications bandwidth [5, 6]. Nowadays microprocessor developments for WSNs have reduced power consumption with increased processor speed. A WSN system also includes a gateway that provides wireless connectivity back to the distributed nodes through a wireless protocol that depends on the application requirements. Due to its low-power consumption and high-level communication protocols, many WSN systems today are based on IEEE 802.15.4-based specification commonly known as ZigBee. Using WSN for air quality monitoring provides many advantages as listed below:

  • Remote and real time measurement monitoring.

  • More accurate data for analysis and decision-making.

  • Require less human interaction in risky areas.

  • Maintain good quality of air and prevent pollution.

In order to overcome the problem of expensive sensing stations for air quality monitoring, researchers from the University of Pisa (UOP) came up with uSense, a sensing system for cooperative air quality monitoring in urban areas [12]. The main advantage of uSense is that it makes use of cheap and small-size sensors that are driven by long-lasting batteries. Moreover the Wi-Fi technology used in uSense allows for fast data transfer such that the air quality information is obtained in real-time. The system has been tested in different areas of interest, monitoring different places with promising results. This system allows its users to know which part of the city has less or no pollution so that they can decide on which routes to take to reach their destination.

In 2008, Ma et al. [13] presented a distributed infrastructure based project, called MoDisNet based on grid computing and WSN technology to monitor air pollution level. In this project, cheap and ubiquitous sensor network is developed to collect large environmental data from road traffic emissions in real-time. The MoDisNet system is based on two layer network framework and a peer-to-peer grid architecture with the implementation of a distributed data mining algorithm to address the challenges of the distributed system. Due to huge amount of data collected and being transferred, research on data fusion and aggregation technique was carried out to improve the system performance. The multi-hop routing capability and grid architecture enabled the development of a data fusion and aggregation technique for the MoDisNet system, thereby saving on the communication cost, reducing the power consumption of the sensor nodes, and increasing the available bandwidth of the wireless channel protocols.

Hu et al. [14] proposed a vehicular wireless sensor network (VSN) architecture to monitor microclimate based on geographic information of vehicles and Global System for Mobile communication (GSM) short messages. One of the objectives of this approach was to demonstrate fine-grained monitoring of the climate using GSM short messages and GPS receivers on vehicles. A prototype was developed using the ZigBee network to monitor the carbon dioxide (CO2) concentration in specific areas by sending the reported data to a server integrated with Google Maps. In this system, the vehicles are equipped with a CO2 sensor, a GPS receiver, and a GSM module, forming a ZigBee based intra-vehicle wireless network. Eventually each vehicular sensor travelling inside the area of interest intermittently report their sensed data through GSM short messages.

The SensorWebBike [15] is designed to manage a mobile platform developed with the ‘Arduino’ open source platform to monitor air quality in cities, in order to integrate the existing monitoring networks and to support public administration in improving urban environment. A circuit board was developed called ‘AirQuino’, Arduino Shield compatible, integrated with low cost and high resolution sensors, dedicated to the monitoring of environment and air quality, road pavement quality (accelerometer) and the indices of well-being in an urban environment. The board integrates a microprocessor unit that acquires all the sensor readings and analyses fast data from accelerometer and noise sensor. Through General Packet Radio Service (GPRS) technology, the sensor transmits geo-located data on environment and air quality to the server connected to the applications and web server allowing the visualization real time results on a web browser, as shown in Figure 1.


Figure 1.

The SensorWebBike framework components [15].

The Air Quality Egg [16] is a sensor system designed to collect very high resolution readings of NO2 and CO concentrations. These two gases are the most indicative elements related to urban air pollution that are sense-able by inexpensive, DIY sensors. There are two versions of the device: an Arduino shield for use by hobbyists, and a more consumer-ready ‘hobbyist kit’ device. The latter consists of two identical-looking plastic enclosures vaguely resembling white eggs. One unit, the base unit, is connected to the user’s Ethernet LAN connection. The second unit monitors NO2 and CO levels and reports these readings every few minutes back to the base unit via a custom wireless protocol where the readings are sent to for storage purpose. From there, the data is sent to the Air Quality Egg (AQE) website and to Xively, where the data are transformed into graphs and other visualization. The service also includes the ability to generate triggers for tweets and SMS alerts Figure 2 shows the Air Quality Egg System diagram.


Figure 2.

Air Quality Egg system diagram [16].

3. Situational analysis

This section describes the current air pollution problems and existing measures being undertaken to alleviate those problems in the Mauritian context by the local authorities. The related constraints pertaining to such a situation in Mauritius are analyzed.

3.1. Air quality in Mauritius

Clean fresh air is vital for human well-being and good health. However in Mauritius, an increase in air pollution level has been observed over the past few years due to industrialization and urbanization in the country whereby maintaining a good ambient air quality has become a challenge. Moreover drastic changes in the population production and consumption behaviour as well as continuous economic development have contributed to the rise of air pollution in Mauritius.

Some of the most common pollutants in Mauritius include carbon monoxide, sulphur dioxide, nitrogen oxide, ozone and particulate matter. The sources of air pollution in Mauritius are from industrial activities, electricity generation, transportation and as well as from burning of solid waste. Furthermore it is in the regions termed as industrial hotspots such as Valentina - Phoenix, Cité St. Luc - Forest Side, Terre Rouge, La Tour Koenig and Cité Vallejee where higher levels of air pollution have been recorded [17]. Also the exhaust emission from the vehicles is one of the major contributors of urban air pollution in Mauritius. There are also some cases of improper medical waste incineration releasing harmful pollutants and injurious metals such as lead and mercury into the environment affecting the inhabitants and crops. The health effects linked with the unsafe pollutants range from mild irritations of eye, nose, throat and skin to more serious diseases like asthma, chronic bronchitis and lung cancer. Therefore, it is observed that air pollution is having adverse impact on human health, crops, materials and the environment in general.

3.2. Air quality monitoring in Mauritius

Air pollution in Mauritius is controlled under the 1998 Environment Protection (Standards for Air) Regulations and in this regard, the National Environmental Laboratory (NEL) had been set up for monitoring of the ambient air quality in public places, industrial zones and residential areas. Air quality is monitored with a fixed monitoring station dispatched at Cassis and a mobile station used in various regions of the island where a high level of pollution is suspected. Special equipment at the stations are used to measure the concentrations of major pollutants such as carbon monoxide, sulphur dioxide, nitrogen oxide, and ozone [1]. Recently two more fixed ambient air monitoring stations were acquired by the Ministry of Environment and are in operation at the Mauritius Meteorological Services, Vacoas, and at the Islamic Cultural Centre, Port Louis, respectively. Data obtained from these stations are eventually interpreted by the NEL officers to ensure its compliance against the air quality standards.

Several steps have been undertaken to ensure better air quality and reduction of atmospheric pollution by the government of Mauritius. For example new air quality standards have been set, unleaded petrol has been introduced and chlorofluorocarbons (CFCs) have been phased out. Also concerning transport sector, monitoring of vehicular emissions as per the Road Traffic Regulations 2002 is carried by the National Transport Authority assisted by the environment police for visual road-side checks [1]. Moreover, with the ambitious economic development programme undertaken by the government of Mauritius regarding construction of smart cities throughout the island, there is a need to have environment monitoring system in place aligned with government vision of having technology driven facilities for creating a pleasant and clean living environment free from any pollution and nuisances.

3.3. Problem analysis

As Mauritius is becoming a more industrialized, urbanized and densely populated nation, maintaining a good ambient air quality becomes a major challenge. It is recognized that there is a pressing need to address the air pollution issues in Mauritius. With only a few air quality monitoring stations available, systematic monitoring of ambient air quality across the island is very difficult. Moreover due to lack of a well-built network, tracking the evolution of air quality in several locations simultaneously is presently not possible [17].

The conventional air pollution monitoring system used in Mauritius have limited scalability and besides being bulky and expensive, these monitoring stations require trained technical staff to be operated and requires continuous maintenance, upgrade and repairs to prevent reduction in their lifespan. Furthermore the sites of the monitoring stations necessitate careful placement to be effective as frequent relocation of the stations can be costly and time consuming. It is therefore difficult for the authorities to accomplish effective and efficient air quality monitoring exercises across the island.

Indeed, the conventional monitoring system is bulky and expensive necessitating a lot power for its operation. Therefore in order to overcome the difficulties and high costs involved in monitoring air quality using wired devices, a new wireless air monitoring system is required that is less costly and more power efficient with low energy consumption. Moreover due to the communication constraints of the conventional monitoring system, it cannot cover large-scale areas for monitoring. As such, there is a need to have a reliable and fault tolerant communication with minimum consumption of energy in order to have an enhanced air quality monitoring (AQM) system.

The AQM system should have the capability to inform the citizens about the concentrations of different gases in the air and create environmental consciousness so as to minimize the degradation of air quality. The use of sensor networks represents a solution for strong environmental surveillance. Data from sensor networks can capture more accurate input conditions which result in more reliable conclusion about air quality. The deployment of sensor networks can also contribute in air emission inventories and detecting pollution hotspots, as well as allowing real-time exposure assessment for deriving abatement strategies. Data retrieval from sensors is much direct and straightforward. Therefore, the use of sensor networks for AQM provides granularity that better identifies the presence of pollution sources and helps in the studies on the effects of air pollution on socio-ecological justice and human quality of life [18].

4. A low-cost energy-efficient WSN system for air quality monitoring

The air quality monitoring system proposed collects the ambient pollutant gases such as carbon monoxide (CO), ozone (O3), nitrogen dioxide (NO2) and sulphur dioxide (SO2). The gas sensors nodes deployed outdoor in the region of interest are classified into several clusters where each cluster consists of one cluster head and several member nodes. The member nodes send their data to the cluster heads (CHs) for their respective clusters. The CHs then forwards the aggregated data to the sink node. The data from the WSN is sent over to the gateway which forwards them to a cloud server where the data is stored and processed into graphical visualizations for the user’s monitoring purposes. The high level structure of the proposed system is shown in Figure 3.


Figure 3.

High level architecture of the proposed system.

4.1. Proposed algorithm for energy efficient hierarchical clusters generation

A genetic algorithm (GA) is an efficient algorithm that imitates the processes of biological evolution for solving particular problems. The idea behind this algorithm is to create a new population that is better and fitter from the existing population. The three main operations that are normally carried in the genetic algorithm include selection, crossover and mutation [19]. Each of the operations is briefly described below.

  1. Selection: Selection is generally the first operator applied for selecting the fitter chromosomes from the population to be used afterwards in the crossover process.

  2. Crossover: In this method two chromosomes are combined to produce a new offspring which is expected to be better than its parents provided it retains the best characteristics of both parents.

  3. Mutation: After a crossover is performed, mutation takes place for maintaining genetic diversity among the generations of the chromosomes population. This technique changes the gene values in a chromosome to a different state enabling the genetic algorithm to arrive at better solution than was previously possible.

4.1.1. Hierarchical Based Genetic Algorithm

A Hierarchical Based Genetic Algorithm (HBGA) is proposed to minimize the communication consumption energy of all sensor nodes and to efficiently maximize the network lifetime by finding the optimum number of CHs. In the proposed genetic algorithm, the nodes are represented as bits of a chromosome where the cluster head nodes are represented as 1s and the member nodes as 0s. Several chromosomes make up a population from which the best chromosome is used to create the next population. The parameters such as current energy levels and transfer distances are used to determine the fitness of the chromosome so that the population is transformed into a new generation based on its survival fitness.

  • Proposed selection method

The method to be used for selecting chromosomes for parents to crossover shall be the tournament selection method in which several ‘tournaments’ are run among a few chromosomes chosen at random from the population. The winner of each tournament is the one with the best fitness which is eventually selected for crossover.

  • Proposed crossover method

The crossover operator to be applied in the proposed algorithm is the uniform crossover technique. Using a probability ratio known as the mixing ratio, the uniform crossover operator decides which parent will contribute how much gene values in the offspring chromosomes. Consider the two parents selected for crossover as shown in Figure 4.


Figure 4.

Crossover parent [19].

If the mixing ratio is set to 0.5, then half of the genes in the offspring will come from parent 1 and other half will come from parent 2 as shown in Figure 5.

  • Proposed mutation method


Figure 5.

Crossover offspring [19].

The mutation operator to be used in the proposed algorithm is the Flip Bit method which basically inverts the value of the chosen gene. For example 2 original off-springs are selected for mutation as shown in Figure 6.


Figure 6.

Original offspring [19].

The value of the chosen gene is inverted from 0 to 1 and 1 to 0 and the mutated offspring produced are: Mutated offspring 1 Mutated offspring 2 as shown in Figure 7.


Figure 7.

Mutated offspring [19].

4.2. The proposed air quality monitoring system

The proposed AQM system uses a wireless sensor network with low-cost sensors and hardware components along with the necessary software to effective monitor the air pollution phenomenon. The WSN components used for the proposed system consist of microcontrollers, wireless modules and different gas sensors. The system uses the MQ series semiconductor gas sensors. Each MQ gas sensor is sensitive to a specific gas such as carbon monoxide, nitrogen dioxide, butane, hydrogen, and smoke among others that use a small heater with an electro-chemical sensor. These sensors can be calibrated using the load-resistor and burn-in technique. Its output is read with an analogue input of the Arduino platform. Table 2 provides a list of gas sensors that is used in the system implementation.

Gas sensor IDMonitoring gas
MQ-7Carbon monoxide
MiCS-2714Nitrogen dioxide
MQ-136Sulphur dioxide

Table 2.

MQ series semiconductor gas sensors.

The monitoring node consists of an Arduino Uno microcontroller board built on the ATmega328. It has 14 digital input/output pins with 6 analogue inputs, a 16 MHz ceramic resonator and a USB connection. The ATmega328 has a pre-burned bootloader that permits upload of new code to it without the need of an external hardware programmer. The program inside this chip coordinates the data transmission to the central server over an UART TTL (5 V) serial communication.

The radio frequency (RF) module comprises of an RF Transmitter and an RF Receiver. The RF 433 MHz modules have a wide applications in various systems that require wireless control. These low-cost modules can be used with any microcontroller. The transmitter/receiver (Tx/Rx) pair functions at a frequency of 433 MHz. The RF transmitter receives serial data from the sensor and transmits it wirelessly using radio frequency to the receiver through its antenna at the rate of 1–10 Kbps. A gateway application is implemented to read incoming data from the receiver module through serial port communication and sending the data to the ThingSpeak cloud server.

The sensing node is set up such as the pollutant measurements are read from the analogue output of the microcontroller. The MQ-7 sensor is wired to the first Arduino board together with the transmitter as shown in Figure 8. The receiver is connected to the second Arduino board as shown in Figure 9. The MQ-7 sensor would require calibration of about 30 s sensor heating cycle and a 60 s sampling cycle before the actual pollutant concentration values transmitted can be considered.


Figure 8.

Transmitter setup.


Figure 9.

Receiver setup.

The AQI breakpoints shown in Table 3 are used for AQI calculation [20] in the air quality monitoring system. This particular AQI breakpoints is used as it provides a simple and easily interpretable air quality condition that may be used by the general public.

O3 (ppm)
CO (ppm)SO2 (ppm)NO2 (ppm)AQICategoryColour code
0.085–0.1049.5–12.40.145–0.224*2101–150Unhealthy for Sensitive GroupsOrange
0.125–0.37415.5–30.40.305–0.6040.65–1.24201–300Very UnhealthyRed
*140.5–50.40.805–1.0041.65–2.04401–500Extremely HazardousBlack

Table 3.

AQI breakpoints.

*1—8-hour O3 values do not define higher AQI values (>301).

*2—NO2 can generate an AQI only above a value of 200.

The AQI is calculated using the recorded pollutant concentration data with the following equation [20]:


Where Ip = the index for pollutant p; Cp = the rounded concentration of pollutant p; BPHi = the breakpoint that is greater than or equal to Cp; BPLo = the breakpoint that is less than or equal to Cp; BPHi = the breakpoint that is greater than or equal to Cp; IHi = the AQI value corresponding to BPHi; ILo = the AQI value corresponding to BPLo.

For the purpose of the air quality monitoring system, the ThingSpeak Internet of Things (IoT) cloud service provider is used to store the sensed data. The ThingSpeak service makes provision for sensed data to be uploaded to its server using IoT devices such as Arduino and Raspberry Pi. By using the ThingSpeak’s write Application Developer Interface (API) key, the sensed data from the sensor nodes are sent to the cloud server. The data are then fetched, analysed and visualized in the client monitoring application in real time as shown in Figure 10.


Figure 10.

The service architecture of ThingSpeak.

The monitoring application allows the visualization of the sensors deployed in different regions as shown in Figure 11. Moreover, it provides the end user with graphical representation of the current level of gas concentration detected in real time. The monitoring application will also enable the user to view the current AQI value with respect to the gas concentration measured as shown in Figure 12.


Figure 11.

Monitoring application interface.


Figure 12.

Graphical display of AQI value.

5. Results and discussions

A number of tests were carried out to assess the performance of the proposed HBGA technique. The results are compared with the popular LEACH protocol with varying simulation parameters to determine its efficiency for several scenarios. The input parameters for the tests include the number of nodes, the sensor network area covered in metres square and the number of rounds. The results of the tests include the dissipation energy, the remaining energy and the number of dead nodes of the network for each round. Also the overall network lifetime is derived from the remaining energy at the end of each test (Table 4).

Number of nodesInputNumber of nodes indicates the size of the network. The algorithm is tested with varying number of nodes to study its scalability
AreaInputNetwork coverage area in metres square
Number of roundsInputNumber of iteration for cluster formation
Dissipation energyOutputEnergy capacity loss during clustering and transmission
Remaining energyOutputEnergy capacity left of the network
Number of dead nodesOutputIndicates the number of dead nodes for the network
Overall network lifetimeOutputSum of energy remaining for each round

Table 4.

List of test parameters.

Table 5 summarizes the list of tests carried out. Each scenario is different from one another in terms of the constant and varying parameters used.

ScenarioVarying parameterConstant parameterOutput
1Number of nodesArea
Number of rounds
CH probability
Residual energy against number of rounds
2AreaNumber of nodes
Number of rounds
CH probability
Residual energy against number of rounds
3Number of roundsNumber of nodes
CH probability
Residual energy against number of rounds
4Number of nodesArea
Number of rounds
CH probability
Remaining energy against number of rounds
5AreaNumber of nodes
Number of rounds
CH probability
Remaining energy against number of rounds
6Number of roundsNumber of nodes
CH probability
Remaining energy against number of rounds
7Number of nodesArea
Number of rounds
CH probability
Number of dead nodes against number of rounds
8AreaNumber of nodes
Number of rounds
CH probability
Number of dead nodes against number of rounds
9Number of roundsNumber of nodes
CH probability
Number of dead nodes against number of rounds

Table 5.

List of test scenarios.

5.1. Dissipation energy

From the results obtained in scenarios 1, 2 and 3, it is observed that the dissipation energy values for the HBGA technique do not fluctuate much compared to the LEACH protocol. It is seen that there is higher energy dissipation during the first 40 rounds using the LEACH protocol compared to the HBGA technique in which the dissipation energy values remain more or less the same throughout all the rounds. The LEACH protocol has lower energy dissipation after about 40 rounds due to the fact that the remaining alive nodes are located nearer to the BS. Therefore in the LEACH protocol much energy is dissipated for the farthest nodes from the BS making them to die faster compared to the HBGA in which the dissipated energy remains consistent for longer number of rounds.

5.2. Remaining energy

From the results obtained in scenarios 4, 5 and 6, it observed that as the number of rounds increases, the remaining energy decreases for both HBGA and LEACH protocol as expected. However there is much difference in the decreasing remaining energy values between the two techniques. In HBGA the remaining energy for the network remains much higher than that of the LEACH protocol for the same number of rounds and other parameters. For example in scenario 4 for increasing number of nodes, the remaining energy from the HBGA technique remains approximately 2 times higher than that of the LEACH protocol for the last round. Similarly in scenario 5 for increasing area, the remaining energy from the HBGA technique is noticed to be approximately 3 to 6 times higher than that of the LEACH protocol for the last round. Likewise the remaining energy from the HBGA technique is observed to be approximately 2–3 times higher than that of the LEACH protocol for the last round in the 6th scenario for increasing number of rounds. It can therefore be concluded that HBGA is more energy-efficient than the popular LEACH protocol.

5.3. Dead nodes

From the results obtained in scenarios 7, 8 and 9, it is found that as the number of rounds increases, the number of dead nodes also increases for both HBGA and LEACH protocol which is expected due to energy loss. However there is a huge difference in the number of dead nodes between HBGA and LEACH for the same number of rounds. For example in scenario 7 where number of nodes is 50, it can be seen that at the end of simulation only 2 nodes are dead using the HBGA technique compared to 22 dead nodes using the LEACH protocol. From scenario 8 it is observed that the number of dead nodes increases as the network area increases. In this scenario as well a large difference in the number of dead nodes is found between HBGA and LEACH. For example in a network area of 600 × 600 m2, 22 dead nodes is observed using the HBGA technique and 80 dead nodes is observed using the LEACH protocol. Also a common observation from scenarios 7, 8 and 9 is that in HBGA, the number of dead nodes remains 0 for a higher number of rounds compared to LEACH.

5.4. Overall system test

Moreover, it is observed that the network lifetime of HBGA is always greater than that of the LEACH protocol for all the scenarios tested whether it is varying nodes, varying distance or varying rounds. The HBGA performs better than LEACH in all of the scenarios because HBGA make use of the hierarchical cluster based routing and genetic algorithm technique making the network survive for a longer time. The proposed HBGA technique has proven to be a better technique than the LEACH protocol and has been able to meet its requirements in terms of energy efficiency, robustness, prolonged network lifetime and scalability.

The air quality monitoring (AQM) system has been tested for different air quality conditions and it has shown its effectiveness by displaying the real data successfully on the monitoring application. Moreover, the corresponding AQI is displayed for the different air quality situation. This proves the effectiveness of the system in successfully showing the air pollution level in real time by means of the RF wireless transmission of the data to the receiver from where it is eventually sent to the cloud server.

6. Conclusion

Mauritius is witnessing an unprecedented level of air pollution lately as attested by the latest statistics report (Statistics Mauritius—environment statistics year 2014, 2015). In order to ensure air quality standards are being respected, an effective and efficient monitoring system is required. In this chapter the implementation of a low-cost efficient air monitoring system using the wireless sensor network is described. WSNs consisting of low-priced components such as tiny sensor nodes, microcontrollers and wireless modules have proven their effectiveness and efficiency in many areas. The main challenge in the design of communication protocols for wireless sensor network is energy efficiency due to the limited amount of energy in the sensor nodes.

A Hierarchical Based Genetic Algorithm (HBGA) has been put forward to achieve energy-efficient cluster formation and minimal energy dissipation of the nodes resulting in an extended network lifetime. The testing results shown that the HBGA scheme offers a better performance than the LEACH protocol in terms of energy consumption and network lifetime. Therefore, the proposed clustering approach is more energy efficient and hence effective in prolonging the network life time compared to the LEACH protocol. The proposed system has proven air quality monitoring using WSN to be effective and achievable. The working system further confirms the potential of making it possible for the general public to have access to the air quality monitoring results in real time by means of IoT devices connected to the internet. The air quality system can be enhanced to include a module for predicting the air pollution propagation in cases of gas leakages so that the people can be evacuated safely before the occurrence of any serious threats to their health. The pollution propagation can be predicted based on the gas diffusion theory or by using a diffusion model in which the windy conditions can be used to locate the pollution source and forecast its dispersion pattern.


1 - Ministry of Environment and Sustainable Development (MOESD). Mauritius Environment Outlook Report 2011 [Internet]. 2011. Available from: [Accessed: 2017/05/10]
2 - Hoek G, Krishnan RM, Beelen R, Peters A, Ostro B, Brunekreef B, Kaufman JD. Long-term air pollution exposure and cardio-respiratory mortality: A review. Environmental Health. 2013 May 28;12(1):43
3 - Mead MI, Popoola OA, Stewart GB, Landshoff P, Calleja M, Hayes M, Baldovi JJ, McLeod MW, Hodgson TF, Dicks J, Lewis A. The use of electrochemical sensors for monitoring urban air quality in low-cost, high-density networks. Atmospheric Environment. 2013 May 31;70:186-203
4 - Khedo KK, Perseedoss R, Mungur A. A wireless sensor network air pollution monitoring system. arXiv preprint arXiv:1005.1737. 2010 May 11
5 - Al-Ali AR, Zualkernan I, Aloul F. A mobile GPRS-sensors array for air pollution monitoring. IEEE Sensors Journal. 2010 Oct;10(10):1666-1671
6 - Postolache OA, Pereira JD, Girao PS. Smart sensors network for air quality monitoring applications. IEEE Transactions on Instrumentation and Measurement. 2009;58(9):3253-3262
7 - Penza M, Suriano D, Villani MG, Spinelle L, Gerboles M. Towards air quality indices in smart cities by calibrated low-cost sensors applied to networks. IEEE SENSORS 2014 Proc. 2012-2017. DOI: 10.1109/ICSENS.2014.6985429
8 - Popescu F, Ionel N, Lontis L, Calin I, Dungan I. Air quality monitoring in an urban agglomeration. Optoelectronic Techniques for Environmental Monitoring. 2009;56:495-506
9 - Sirisikar S, Karemore P. Review paper on air pollution monitoring system. International Journal of Advanced Research in Computer and Communication Engineering. 2015 Jan;4(2):218-220
10 - Sharma M, Bhattacharya A. National Air Quality Index – India. Central Pollution Control Board [Internet]. 2014. p. 5-8. Available from: [Accessed: 2017/05/10]
11 - Taieb D, Brahim AB. Methodology for developing an air quality index (AQI) for Tunisia. International Journal of Renewable Energy Technology. 2013;4(1):86. DOI: 10.1504/ijret.2013.051067
12 - Brienza S, Galli A, Anastasi G, Bruschi P. A low-cost sensing system for cooperative air quality monitoring in urban areas. Sensors. 2015;15(6):12242-12259. DOI: 10.3390/s150612242
13 - Ma Y, Richards M, Ghanem M, Guo Y, Hassard J. Air pollution monitoring and mining based on sensor grid in London. Sensors. 2008;8(6):3601-3623. DOI: 10.3390/s8063601
14 - Hu SC, Wang YC, Huang CY, Tseng YC. Measuring air quality in city areas by vehicular wireless sensor networks. Journal of Systems and Software. 2011;84(11):2005-2012. DOI: 10.1016/j.jss.2011.06.043
15 - Vagnoli C, Martelli F, De Filippis T, Di Lonardo S, Gioli B, Gualtieri G, Matese A, Rocchi L, Toscano P, Zaldei A. The SensorWebBike for Air Quality Monitoring in a Smart City. IET Conference on Future Intelligent Cities, 4-5 Dec. 2014, London, UK
16 - Wicked Device. Air Quality Egg [Internet]. Available from: [Accessed: 2017/04/25]
17 - Acclimate. Mauritius Environmental Report [Internet]. 2011. Available from: [Accessed: 2017/02/15]
18 - Kumar P, Morawska L, Martani C, Biskos G, Neophytou M, Di Sabatino S, Bell M, Norford L, Britter R. The rise of low cost sensing for managing air pollution in cities. Environment International. 2015;75:199-205
19 - Chakraborty RC. Fundamentals of genetic algorithms. Reproduction. 2010 Jun;22:35
20 - Mintz D. Guidelines for the Reporting of Daily Air Quality—The Air Quality Index (AQI). Vol. 1. North Carolina: U.S. Environmental Protection Agency Research Triangle Park; 2006. pp. 12-16