0% found this document useful (0 votes)
2 views54 pages

MINI PROJECT 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 54

AIR POLLUTION CHECK AND ALERT SYSTEM

Chapter 1 INTRODUCTION

1.1 Air pollution

Air pollution is the presence of excessive amounts of undesirable and unsafe solid or
gaseous substances such as Carbon Monoxide, Lead, Nitrogen Oxide, Ozone, Particulate
Matter, Sulphur Dioxide, etc., atmosphere.

1.2 Air pollution cause and effect

Air pollution has become an increasingly hazardous problem over the past few years.
This factor is directly related to human health. Global warming has become a severe concern
for many countries; one widely faced issue is air pollution. Other effects of air pollution also
include various diseases like lung cancer, ischemic heart disease, asthma attacks, etc.

1.3 Air pollution monitoring system

The Air pollution monitoring system is a facility to measure air pollutants using
sensors, processing using microcontrollers, and showing results using various displays. Air
quality is a measure of how clean or polluted the air is. Air pollution is usually measured as
Air Quality Index (AQI) in the PPM unit. The sensors are most suitable for identifying
hotspots at roadsides and near point sources. This sensor gets data that can be continuously
monitored via different displays.

Day to day, the level of Air pollution is increasing rapidly due to increase industries,
factories, vehicle use which affect human health. So here we have designed a device/system
which can measure air quality around it and monitor air pollution levels and also indicates
and warns us when the air quality goes down beyond a certain level. This system can sense
NH3, NOx, alcohol, Benzene, smoke, CO2, and some other gases, these gases are harmful to
human health. It has a small display that will show the air quality value in the PPM unit. So,
this system is perfect for Air Quality Monitoring. This is a small portable device, we can use
it at our home, office, classroom, and factory. It can save us from harmful gases.

Dept. of EEE SICET Page | 1


AIR POLLUTION CHECK AND ALERT SYSTEM

1.4 Aim of this project

The aim of the paper is to provide important of air quality both for taking real time
decision based on triggers set for the various gas sensors. The gas sensors used in the Air
monitoring system are “MQ2, MQ7 and MQ135” which are capable of monitoring various
proportions of gases such as carbon monoxide and various other combustible gases like
“LPG, Methane”. The system also provides maintenance schedule for devices which allows
the user to know the failure of the component and trigger mail alerts to the maintenance
person. It has a backup system that backs up the sensor data to the cloud at frequent intervals
of time which helps in providing analysis of the environment.

The system tends to be more effective than cloud systems as there is a more reliable
control over the entire system from the remote locations as well as the system does always
not require relating to internet. The system can be deployed at various places such as for
personal and Industrial use at home and hotels e.g. “Kitchen” and in industrial warehouses
that keep perishable items and harmful items that can release harmful gases, also in mining
and gas filling stations. The measured data can be remotely monitored and exported in
various formats to the local central authorities. The data can be published via the Internet for
easy public access to raise awareness on current air pollution levels.

1.5 Literature Survey

Air is one of the vital components for any living beings or non-living things.
Technical advancements are transforming the way air quality is monitored and controlled.
Recently people spend most of their time indoors either at home, in the workplace, or in
transit. Indoor Air Quality (IAQ) is recognized as an important factor to determine the public
health. Reducing pollutants in the air is vital for maintain employer’s health and environment
of any industry. Poor quality may lead to many harmful effects especially the respiratory and
cardiovascular systems. These pollutants not only harm for the humans and can also damage
the plants, building etc., some systems like that automatically sense the values of parameters
such as CO, temperature and pH in the industry. We have investigated all the previous work
on the Wireless Sensor Networks and that are obtaining the ground in all sectors home of
factories, traffic control to environmental monitoring. Generally, air pollution monitoring
system made up of sensors to monitor pollution parameter in industry that has three air

Dept. of EEE SICET Page | 2


AIR POLLUTION CHECK AND ALERT SYSTEM

pollutants gases including Sulphur dioxide, carbon monoxide and carbon dioxide in air
because these gases decide the degree of pollution level. The research work implemented
using Internet of Things that estimates the value of environmental parameters by using the
adaptable and smart monitoring systems. All existing model describes the original value of
the environmental parameters with the help of sensor networks Various government
organizations and market vendors are actively focusing on research to develop, evaluate, and
implement new air quality technologies. Hence, advancements in technology, which are
resulting in the development of low-cost and portable air quality monitoring sensors, continue
to offer growth opportunities to the market players. Air pollution in developing countries is
increasing at a high rate, as a result of rapid industrialization and growing number of
vehicles. Therefore, governments of these countries are framing regulations to curb air
pollution. This is resulting in increased demand for devices for monitoring air quality in
countries such as China and India, which, in turn, is creating lucrative opportunities for the
air quality monitoring market players.

1.6 Research Gap and Solution

Proposed work presents effective use of Internet of Things to address the industrial
pollution. Continuous monitoring of air quality is obligatory to ascertain level of pollution
and presence of certain harmful pollutants. Various gas sensors may be pressed into service
for this purpose. Accesses of reliable data on the Internet are currently not available for the
user and a data revolution is needed to better understand who uses the Internet, where and
how. Though cloud computing evolved a new impact on IoT, the fog computing reduces
latency and backhaul costs. Cloud computing is evolving due to the impact of innovative new
technologies. By processing and compressing data locally, the fog computing can reduce
latency and backhaul costs. It is bridging the Internet of Things (IoT) devices with existing
Internet computing infrastructure and creates more complex problem in Network topologies,
operations, and administration. IEEE Project (Number: P1931.1TM) working group actively
involved in the development of the IEEE Standard for an Architectural Framework for Real-
time Onsite Operations Facilitation (ROOF) for the Internet of Things. This standard defines
an architectural framework, protocols and Application Programming Interfaces (APIs) for
providing Real-time Onsite Operations Facilitation (ROOF). This paper proposes a system
design using ROOF architecture that represents the working flow based on IOT industrial
pollution monitoring and controlling.

Dept. of EEE SICET Page | 3


AIR POLLUTION CHECK AND ALERT SYSTEM

1.7 Existing Systems

Project Title: Pollution Monitoring using Sensors and Wireless Sensor Networks: A Survey

Author Name: R.A. Roseline1, M. Deva Priya, Year Of publish: 2013

Pollution has been aggravated by developments that typically occur as countries become
industrialized growing cities, increasing traffic, rapid economic development and
industrialization, and higher levels of energy consumption. The high influx of population to
urban areas, increase in consumption patterns and unplanned urban and industrial
development has led to the problem of air pollution. Air pollution has significant influence on
the concentration of constituents in the atmosphere leading to effects like global warming
and acid rains. To avoid such adverse imbalances in the nature, an air pollution monitoring
system is utmost important. Wireless Sensor Networks is an excellent technology that can
sense, measure, and gather information from the real world and, based on some local decision
process transmit the sensed data to the user. These networks allow the physical environment
to be measured at high resolutions, and greatly increase the quality and quantity of real-world
data and information for applications like pollution monitoring. The proposed work, a survey
on pollution sensors and pollution monitoring systems using Wireless sensor Networks is
presented.

Project Title: Can commercial low-cost sensor platforms contribute to air quality monitoring
and exposure estimates.

Author Name: Nuria Castell, Franck R. Dauge , Year of publish: 2016

The emergence of low-cost, user-friendly and very compact air pollution platforms enable
observations at high spatial resolution in near-real-time and provide new opportunities to
simultaneously enhance existing monitoring systems, as well as engage citizens in active
environmental monitoring. This provides a whole new set of capabilities in the assessment of
human exposure to air pollution. However, the data generated by these platforms are often of
questionable quality. We have conducted an exhaustive evaluation of 24 identical units of a
commercial low-cost sensor platform against CEN (European Standardization Organization)
reference analysers, evaluating their measurement capability over time and a range of
environmental conditions. Our results show that their performance varies spatially and
temporally, as it depends on the atmospheric composition and the meteorological conditions.
Our results show that the performance varies from unit to unit, which makes it necessary to

Dept. of EEE SICET Page | 4


AIR POLLUTION CHECK AND ALERT SYSTEM

examine the data quality of each node before its use. In general, guidance is lacking on how
to test such sensor nodes and ensure adequate performance prior to marketing these
platforms. We have implemented and tested diverse metrics in order to assess if the sensor
can be employed for applications that require high accuracy (i.e., to meet the Data Quality
Objectives defined in air quality legislation, epidemiological studies) or lower accuracy (i.e.,
to represent the pollution level on a coarse scale, for purposes such as awareness raising).
Data quality is a pertinent concern, especially in citizen science applications, where citizens
are collecting and interpreting the data. In general, while low-cost platforms present low
accuracy for regulatory or health purposes they can provide relative and aggregated
information about the observed air quality.

Dept. of EEE SICET Page | 5


AIR POLLUTION CHECK AND ALERT SYSTEM

Chapter 2 EMBEDDED SYSTEMS

An embedded system is nearly any computing system other than a desktop computer.
An embedded system is a dedicated system which performs the desired function upon power
up, repeatedly. Embedded systems are found in a variety of common electronic devices such
as consumer electronics ex. Cell phones, pagers, digital cameras, VCD players, portable
Video games, calculators, etc. Embedded systems are found in a variety of common
electronic devices, such as: (a)consumer electronics -- cell phones, pagers, digital cameras,
camcorders, videocassette recorders, portable video games, calculators, and personal digital
assistants; (b) home appliances-- microwave ovens, answering machines, thermostat, home
security, washing machines, and lighting systems; (c) office automation -- fax machines,
copiers, printers, and scanners; (d) business equipment -- cash registers, curb side check-in,
alarm systems, card readers, product scanners, and automated teller machines; (e)
automobiles --transmission control, cruise control, fuel injection, anti-lock brakes, and active
suspension.

2.1 Classification of Embedded systems

 Small Scale Embedded Systems: These systems are designed with a single 8- or 16-
bit microcontroller; they have little hardware and software complexities and involve
board- level design. They may even be battery operated. When developing embedded
software for these, an editor, assembler and cross assembler, specific to the
microcontroller or processor used, are the main programming tools. Usually, ‗C ‘is
used for developing these systems. ‗C ‘program compilation is done into the
assembly, and executable codes are then appropriately located in the system memory.
The software has to fit within the memory available and keep in view the need to
limit power dissipation when system is running continuously.

 Medium Scale Embedded Systems: These systems are usually designed with a
single or few 16- or 32-bit microcontrollers or DSPs or Reduced Instruction Set
Computers (RISCs). These have both hardware and software complexities. For
complex software design, there are the following programming tools: RTOS, Source

Dept. of EEE SICET Page | 6


AIR POLLUTION CHECK AND ALERT SYSTEM

code engineering tool, Simulator, Debugger and Integrated Development


Environment (IDE). Software tools also provide the solutions to the hardware
complexities. An assembler is of little use as a programming tool. These systems may
also employ the readily available ASSPs and IPs (explained later) for the various
functions for example, for the bus interfacing, encrypting, deciphering, discrete cosine
transformation and inverse transformation, TCP/IP protocol stacking and network
connecting functions.
 Sophisticated Embedded Systems: Sophisticated embedded systems have enormous
hardware and software complexities and may need scalable processors or
configurable processors and programmable logic arrays. They are used for cutting
edge applications that need hardware and software co-design and integration in the
final system; however, they are constrained by the processing speeds available in their
hardware units. Certain software functions such as encryption and deciphering
algorithms, discrete cosine transformation and inverse transformation algorithms,
TCP/IP protocol stacking and network driver functions are implemented in the
hardware to obtain additional speeds by saving time. Some of the functions of the
hardware resources in the system are also implemented by the software. Development
tools for these systems may not be readily available at a reasonable cost or may not be
available at all. In some cases, a compiler or retarget able compiler might have to be
developed for these.
2.2 The processing units of the embedded system

 Processor in an Embedded System A processor is an important unit in the embedded


system hardware. A microcontroller is an integrated chip that has the processor,
memory and several other hardware units in it; these form the microcomputer part of
the embedded system. An embedded processor is a processor with special features
that allow it to be embedded into a system. A digital signal processor (DSP) is a
processor meant for applications that process digital signals.

 Commonly used microprocessors, microcontrollers and DSPs in the small-, medium-


and large-scale embedded systems. A recently introduced technology that additionally
incorporates the application-specific system processors (ASSPs) in the embedded
systems. Multiple processors are used in a system.

Dept. of EEE SICET Page | 7


AIR POLLUTION CHECK AND ALERT SYSTEM

Embedded systems are a combination of hardware and software as well as other components
that we bring together inti products such as cell phones, music player, a network router, or an
aircraft guidance system. They are a system within another system as we see in Figure 2.1

Figure 2.1 A simple embedded system

2.3 Building an Embedded system

we embed 3 basic kinds of computing engines into our systems: microprocessor,


microcomputer and microcontrollers. The microcomputer and other hardware are connected
via A system bus is a single computer bus that connects the major components of a
computer system. The technique was developed to reduce costs and improve modularity. It
combines the functions of a data bus to carry information, an address bus to determine where
it should be sent, and a control bus to determine its operation.

Dept. of EEE SICET Page | 8


AIR POLLUTION CHECK AND ALERT SYSTEM

The system bus is further classified int address, data and control bus. The
microprocessor controls the whole system by executing a set of instructions call firmware
that is stored in ROM.

An instruction set, or instruction set architecture (ISA), is the part of the computer
architecture related to programming, including the native data types, instructions, registers,
addressing modes, memory architecture, interrupt and exception handling, and external I/O.
An ISA includes a specification of the set of opcodes (machine language), and the native
commands implemented by a particular processor. To run the application, when power is first
turned ON, the microprocessor addresses a predefined location and fetches, decodes, and
executes the instruction one after the other. The implementation of a microprocessor based
embedded system combines the individual pieces into an integrated whole as shown in Figure
2.2, which represents the architecture for a typical embedded system and identifies the
minimal set of necessary components.

Dept. of EEE SICET Page | 9


AIR POLLUTION CHECK AND ALERT SYSTEM

Figure 2.2 A Microprocessor based embedded system

2.4 The Microprocessor

A microprocessor (sometimes abbreviated µP) is a programmable digital electronic


component that incorporates the functions of a central processing unit (CPU) on a
single semiconducting integrated circuit (IC). It is a multipurpose, programmable device that
accepts digital data as input, processes it according to instructions stored in its memory, and
provides results as output. It is an example of sequential digital logic, as it has internal
memory. Microprocessors operate on numbers and symbols represented in the binary numeral
system.

A microprocessor control program can be easily tailored to different needs of a product line,
allowing upgrades in performance with minimal redesign of the product. Different features
can be implemented in different models of a product line at negligible production cost.

Figure 2.3 Block diagram of a microprocessor-based system

Dept. of EEE SICET Page | 10


AIR POLLUTION CHECK AND ALERT SYSTEM

2.5 The Microcomputer

The microcomputer is a complete computer system that uses a microprocessor as its


computational core. Typically, a microcomputer will also utilize numerous other large scale
integrated circuits to provide necessary peripheral functionality. The complexity of
microcomputers varies from simple units that are implemented on a single chip along with a
small amount of on chip memory and elementary I/O system to the complex that will
augment the microprocessor with a wide array of powerful peripheral support circuitry.

2.6 The Microcontroller

A microcontroller (sometimes abbreviated µC, or MCU) is a small computer on a


single integrated circuit containing a processor core, memory, and programmable
input/output peripheral. Program memory in the form of NOR flash or OTP.
ROM is also often included on chip, as well as a typically small amount of RAM.
Microcontrollers are designed for embedded applications, in contrast to the microprocessors
used in personal computers or other general-purpose applications.

Figure 2.4 Block diagram of a micro controller-based system

Dept. of EEE SICET Page | 11


AIR POLLUTION CHECK AND ALERT SYSTEM

Microcontrollers are used in automatically controlled products and devices, such as


automobile engine control systems, implantable medical devices, remote controls, office
machines, appliances, power tools, toys and other embedded systems. By reducing the size
and cost compared to a design that uses a separate microprocessor, memory, and input/output
devices, microcontrollers make it economical to digitally control even more devices and
processes. Mixed signal microcontrollers are common, integrating analog components needed
to control non-digital electronic systems.

Chapter 3 HARDWARE TOOLS USED

3.1 Arduino UNO

The Arduino UNO is a standard board of Arduino. Here UNO means 'one' in Italian.
It was named as UNO to label the first release of Arduino Software. It was also the first USB
board released by Arduino. It is considered as the powerful board used in various projects.
Arduino.cc developed the Arduino UNO board.

Arduino UNO is based on an ATmega328P microcontroller. It is easy to use


compared to other boards, such as the Arduino Mega board, etc. The board consists of digital
and analog Input/output pins (I/O), shields, and other circuits.

The Arduino UNO includes 6 analog pin inputs, 14 digital pins, a USB connector, a
power jack, and an ICSP (In-Circuit Serial Programming) header. It is programmed based on
IDE, which stands for Integrated Development Environment. It can run on both online and
offline platforms. The IDE is common to all available boards of Arduino.

Dept. of EEE SICET Page | 12


AIR POLLUTION CHECK AND ALERT SYSTEM

Figure 3.1 Arduino UNO

The components of Arduino UNO board are shown below:

Dept. of EEE SICET Page | 13


AIR POLLUTION CHECK AND ALERT SYSTEM

Figure 3.2 Arduino UNO components

Let's discuss each component in detail.

 ATmega328 Microcontroller- It is a single chip Microcontroller of the Atmel family.


The processor code inside it is of 8-bit. It combines Memory (SRAM, EEPROM,
and Flash), Analog to Digital Converter, SPI serial ports, I/O lines, registers,
timer, external and internal interrupts, and oscillator.
 ICSP pin - The In-Circuit Serial Programming pin allows the user to program using
the firmware of the Arduino board.
 Power LED Indicator- The ON status of LED shows the power is activated. When
the power is OFF, the LED will not light up.
 Digital I/O pins- The digital pins have the value HIGH or LOW. The pins numbered
from D0 to D13 are digital pins.
 TX and RX LED's- The successful flow of data is represented by the lighting of these
LED's.

Dept. of EEE SICET Page | 14


AIR POLLUTION CHECK AND ALERT SYSTEM

 AREF- The Analog Reference (AREF) pin is used to feed a reference voltage to the
Arduino UNO board from the external power supply.
 Reset button- It is used to add a Reset button to the connection.
 USB- It allows the board to connect to the computer. It is essential for the
programming of the Arduino UNO board.
 Crystal Oscillator- The Crystal oscillator has a frequency of 16MHz, which makes
the Arduino UNO a powerful board.
 Voltage Regulator- The voltage regulator converts the input voltage to 5V.
 GND- Ground pins. The ground pin acts as a pin with zero voltage.
 Vin- It is the input voltage.
 Analog Pins- The pins numbered from A0 to A5 are analog pins. The function of
Analog pins is to read the analog sensor used in the connection. It can also act as GPIO
(General Purpose Input Output) pins.

3.1.1 Memory
The memory structure is shown in the below image:

Figure 3.3 Memory Structure

The preinstalled flash has a bootloader, which takes the memory of 0.5 kb.

Dept. of EEE SICET Page | 15


AIR POLLUTION CHECK AND ALERT SYSTEM

Here, SRAM stands for Static Random-Access Memory, and EEPROM stands for
Electrically Erasable Programmable Read-Only Memory.

3.1.2 Technical Specifications of Arduino UNO


 There are 20 Input/output pins present on the Arduino UNO board. These 20 pins
include 6 PWM pins, 6 analog pins, and 8 digital I/O pins.
 The PWM pins are Pulse Width Modulation capable pins.
 The crystal oscillator present in Arduino UNO comes with a frequency of 16MHz.
 It also has a Arduino integrated WIFI module. Such Arduino UNO board is based on
the Integrated WIFI ESP8266 Module and ATmega328P microcontroller.
 The input voltage of the UNO board varies from 7V to 20V.
 Arduino UNO automatically draws power from the external power supply. It can also draw
power from the USB.

Figure 3.4 Arduino UNO Pins overview

3.1.3 Arduino UNO Pinout

Dept. of EEE SICET Page | 16


AIR POLLUTION CHECK AND ALERT SYSTEM

 The Arduino UNO is a standard board of Arduino, which is based on


an ATmega328P microcontroller. It is easier to use than other types of Arduino
Boards. Let's discuss each pin in detail.

 ATmega328 Microcontroller: It is a single chip Microcontroller of the Atmel family.


The processor core inside it is of 8-bit. It is a low-cost, low powered, and a simple
microcontroller. The Arduino UNO and Nano models are based on the ATmega328
Microcontroller.
 Voltage Regulator: The voltage regulator converts the input voltage to 5V. The
primary function of voltage regulator is to regulate the voltage level in the Arduino
board. For any changes in the input voltage of the regulator, the output voltage is
constant and steady.
 GND - Ground pins. The ground pins are used to ground the circuit.
 TXD and RXD: TXD and RXD pins are used for serial communication. The TXD is
used for transmitting the data, and RXD is used for receiving the data. It also
represents the successful flow of data.
 USB Interface: The USB Interface is used to plug-in the USB cable. It allows the
board to connect to the computer. It is essential for the programming of
the Arduino UNO board.
 RESET: It is used to add a Reset button to the connection.
 SCK: It stands for Serial Clock. These are the clock pulses, which are used to
synchronize the transmission of data.
 MISO: It stands for Master Input/ Slave Output. The save line in the MISO pin is
used to send the data to the master.
 VCC: It is the modulated DC supply voltage, which is used to regulate the IC's used
in the connection. It is also called as the primary voltage for IC's present on the
Arduino board. The Vcc voltage value can be negative or positive with respect to the
GND pin.
 Crystal Oscillator- The Crystal oscillator has a frequency of 16MHz, which makes
the Arduino UNO a powerful board.
 ICSP: It stands for In-Circuit Serial Programming. The users can program the
Arduino board's firmware using the ICSP pins. The program or firmware with the

Dept. of EEE SICET Page | 17


AIR POLLUTION CHECK AND ALERT SYSTEM

advanced functionalities is received by microcontroller with the help of the ICSP


header. The ICSP header consists of 6 pins.
 SDA: It stands for Serial Data. It is a line used by the slave and master to send and
receive data. It is called as a data line, while SCL is called as a clock line.
 SCL: It stands for Serial Clock. It is defined as the line that carries the clock data. It
is used to synchronize the transfer of data between the two devices. The Serial Clock
is generated by the device and it is called as master.
 SPI: It stands for Serial Peripheral Interface. It is popularly used by the
microcontrollers to communicate with one or more peripheral devices quickly. It uses
conductors for data receiving, data sending, synchronization, and device selection (for
communication).
 MOSI: It stands for Master Output/ Slave Input. The MOSI and SCK are driven by
the Master.
 SS: It stands for Slave Select. It is the Slave Select line, which is used by the master.
It acts as the enable line.
 I2C: It is the two-wire serial communication protocol. It stands for Inter Integrated
Circuits. The I2C is a serial communication protocol that uses SCL (Serial Clock) and
SDA (Serial Data) to receive and send data between two devices.

3.1.4 Basic Functions of Arduino Technology:


 The digital read pin will read the value of the given pin.
 Digital value is written by digital write pin.
 Pin mode pin is used to assign the pin to input output mode.
 Analog read pin read value and returns the value.
 Analog write pin will writes the value of the pin.
3.1.5 Advantages
 It is cheap
 It is an open source hardware feature that permits users to develop their own kit.
 The Arduino ide supports all the operating systems
 And it is easier to implement
 The ide is open source it every library are free to use.

Dept. of EEE SICET Page | 18


AIR POLLUTION CHECK AND ALERT SYSTEM

3.2 GAS Sensors


A device that detects the presence or concentration of gases in the atmosphere is
called a gas sensor. By altering the resistance of the material inside the sensor, the sensor
generates a corresponding potential difference based on the gas concentration, which may be
recorded as output voltage. The type and concentration of the gas can be inferred from this
voltage value. The sensing substance that is contained inside the sensor determines the sort of
gas that it is capable of detecting. These sensors are typically sold as modules with
comparators, as was demonstrated above. These comparators can be configured for a certain
gas concentration threshold value. The digital pin swings high when the gas concentration
surpasses this level. The gas concentration can be determined using the analog pin.

3.2.1 Applications of Gas Sensors

 Used in industries to monitor the concentration of the toxic gases.


 Used in households to detect an emergency incidents.
 Used at oil rig locations to monitor the concentration of the gases those are released.
 Used at hotels to avoid customers from smoking.
 Used in air quality check at offices.
 Used in air conditioners to monitor the CO2 levels.
 Used in detecting fire.
 Used to check concentration of gases in mines.
 Breath analyzer.

3.2.2 Different types of gas sensors

 MQ-2 - Methane, Butane, LPG, smoke


 MQ-3 - Alcohol, Ethanol, smoke
 MQ-4 - Methane, CNG Gas
 MQ-5 - Natural gas, LPG
 MQ-6 - LPG, butane gas
 MQ-7 - Carbon Monoxide
 MQ-8 - Hydrogen Gas
 MQ-9 - Carbon Monoxide, flammable gasses
 MQ131 - Ozone
 MQ135 - Air Quality (CO, Ammonia, Benzene, Alcohol, smoke)
 MQ136 - Hydrogen Sulphide gas

Dept. of EEE SICET Page | 19


AIR POLLUTION CHECK AND ALERT SYSTEM

 MQ137 - Ammonia
 MQ138 - Benzene, Toluene, Alcohol, Acetone, Propane, Formaldehyde gas, Hydrogen
 MQ214 - Methane, Natural gas
 MQ216 - Natural gas, Coal Gas
 MQ303A - Alcohol, Ethanol, smoke
 MQ306A - LPG, butane
 MQ307A - Carbon Monoxide
 MQ309A - Carbon Monoxide, flammable gas

3.3 MQ-2 Gas Sensor

Gas Sensor (MQ2) module is useful for gas leakage detection (home and industry). It is
suitable for detecting H2, LPG, CH4, CO, Alcohol, Smoke, or Propane. Due to its high
sensitivity and fast response time, a measurement can be taken as soon as possible. The
sensitivity of the sensor can be adjusted by the potentiometer.

Figure 3.5 MQ-2 Smoke LPG Butane Hydrogen Gas Sensor

3.3.1 Working of MQ2 Gas Sensor

 When high-temperature tin dioxide (semiconductor particles) is heated in air, oxygen


is adsorbed on the surface. Donor electrons in tin dioxide are attracted to oxygen
adsorbed on the surface of the sensing material in clean air. This prevents the flow of
electric current.

Dept. of EEE SICET Page | 20


AIR POLLUTION CHECK AND ALERT SYSTEM

 The surface density of adsorbed oxygen decreases in the presence of reducing gases
as it reacts with the reducing gases. After that, electrons are released into the tin
dioxide, allowing current to freely flow through the sensor.

 The MQ-2 gas sensor’s sensitive component is SnO2, which has a reduced
conductivity in clean air. The conductivity of the sensor increases as the concentration
of the target flammable gas rises.

 Sensitivity of this sensor is not fixed it can be adjusted by rotating the potentiometer.

3.3.2 Features & Specifications

 Operating Voltage is +5V


 Analog output voltage: 0V to 5V
 Digital Output Voltage: 0V or 5V (TTL Logic)
 Preheat duration 20 seconds
 Can be used as a Digital or analog sensor
 The Sensitivity of Digital pin can be varied using the potentiometer
 Wide detecting scope
 Stable and long lifetime
 Fast response and High sensitivity

3.3.2 Pin Configuration

Figure 3.6 MQ-2 Pinout

Dept. of EEE SICET Page | 21


AIR POLLUTION CHECK AND ALERT SYSTEM

Pin Pin Description


No: Name:

1 Vcc This pin powers the module, typically the operating


voltage is +5V

2 Ground Used to connect the module to system ground

3 Digital You can also use this sensor to get digital output from
Out this pin, by setting a threshold value using the
potentiometer

4 Analog This pin outputs 0-5V analog voltage based on the


Out intensity of the gas

Table 1: Pin configuration of MQ-2 sensor

3.3.3 Applications of MQ2 Gas Sensor

 It is used in domestic gas leakage detectors.


 It is utilized in a variety of applications, including breath analyzers, smoke detectors,
fire detection systems, and air quality monitoring systems.

 It is also used in Industrial Combustible gas detectors.

 It can be used as a portable gas detector

3.4 MQ-5 Sensor

The Gas Sensor(MQ5) module is useful for gas leakage detection (in home and
industry). It is suitable for detecting H2, LPG, CH4, CO, Alcohol. Due to its high sensitivity
and fast response time, measurements can be taken as soon as possible. The sensitivity of the
sensor can be adjusted by using the potentiometer.

Dept. of EEE SICET Page | 22


AIR POLLUTION CHECK AND ALERT SYSTEM

3.4.1 Working Principle of MQ5

The sensor includes a sensitive filament formed of tin dioxide. In clean air, this
filament has lower electrical conductivity. When there is a combustible gas like LPG in the
surrounding, the conductivity of filament rises, and the amount of change in its resistance can
show the equivalent gas concentration.

Figure 3.7 MQ –5 Gas sensor

3.4.2 Features
 Small sensitivity to alcohol, smoke.
 Fast response
 Stable and long life
 Simple drive circuit
 Indication of the signal output.
 Dual signal output (analog output, and TTL level output)
 TTL output signal is low. (When low output signal light, and can be connected
directly to the microcontroller)
 Liquefied petroleum gas, natural gas, city gas, better sensitivity.
 Has a long life and reliable stability

3.4.3 Specifications
 Working Voltage: 4.9V-5.1V
 Heater Resistance: 31±10%

Dept. of EEE SICET Page | 23


AIR POLLUTION CHECK AND ALERT SYSTEM

 Adjustable Resistance
 Sensing Resistance Range: 10 – 60K
 Sensor Heat Consumption: 0.5-800mW
 Detecting Concentration: 200-10000ppm

3.4.4 Pin configuration

Figure 3.8 MQ – 5 Pinout

Pin Description
Name

Vcc Power Pin requires an operating voltage of 5V.

GND Ground pin.

DO Digital out the pin, to get the digital output from the sensor, need to set the
threshold value using Pot.

AO Analog out the pin. It based the output of this pin on the intensity of the methane
gas.

Dept. of EEE SICET Page | 24


AIR POLLUTION CHECK AND ALERT SYSTEM

Table 2: MQ-5 Pin configuration

3.4.5 Applications

 Gas leakage detector


 Domestic gas leakage alarm
 Industrial flammable gas alarm
 Portable gas detector

3.5 16X2 LCD Panel

A liquid-crystal display (LCD) is a flat-panel display or other electronically


modulated optical device that uses the light-modulating properties of liquid crystals. Liquid
crystals do not emit light directly, instead using a backlight or reflector to produce images in
colour or monochrome. [1] LCDs are available to display arbitrary images (as in a general-
purpose computer display) or fixed images with low information content, which can be
displayed or hidden, such as pre-set words, digits, and seven-segment displays.

Dept. of EEE SICET Page | 25


AIR POLLUTION CHECK AND ALERT SYSTEM

Figure 3.9 16X2 LCD Panel

3.5.1 Pin Description:

Pin
Function Name
No
1 Ground (0V) Ground
2 Supply voltage; 5V (4.7V – 5.3V) Vcc
3 Contrast adjustment; through a variable resistor VEE
4 Selects command register when low; and data register when high Register Select

5 Low to write to the register; High to read from the register Read/write
6 Sends data to data pins when a high to low pulse is given Enable
7 8-bit data pins DB0
8 DB1

Dept. of EEE SICET Page | 26


AIR POLLUTION CHECK AND ALERT SYSTEM

9 DB2
10 DB3
11 DB4
12 DB5
13 DB6
14 DB7
15 Backlight VCC (5V) Led+
16 Backlight Ground (0V) Led-

Table 2: Pin Description of 16x2 LCD Panel

 Pin1 (Ground/Source Pin): This is a GND pin of display, used to connect the GND
terminal of the microcontroller unit or power source.
 Pin2 (VCC/Source Pin): This is the voltage supply pin of the display, used to connect
the supply pin of the power source.
 Pin3 (V0/VEE/Control Pin): This pin regulates the difference of the display, used to
connect a changeable POT that can supply 0 to 5V.
 Pin4 (Register Select/Control Pin): This pin toggles among command or data
register, used to connect a microcontroller unit pin and obtains either 0 or 1(0 = data
mode, and 1 = command mode).
 Pin5 (Read/Write/Control Pin): This pin toggles the display among the read or
writes operation, and it is connected to a microcontroller unit pin to get either 0 or 1 (0
= Write Operation, and 1 = Read Operation).
 Pin 6 (Enable/Control Pin): This pin should be held high to execute Read/Write
process, and it is connected to the microcontroller unit & constantly held high.
 Pins 7-14 (Data Pins): These pins are used to send data to the display. These pins are
connected in two-wire modes like 4-wire mode and 8-wire mode. In 4-wire mode, only
four pins are connected to the microcontroller unit like 0 to 3, whereas in 8-wire mode,
8-pins are connected to microcontroller unit like 0 to 7.
 Pin15 (+ve pin of the LED): This pin is connected to +5V
 Pin 16 (-ve pin of the LED): This pin is connected to GND.

Dept. of EEE SICET Page | 27


AIR POLLUTION CHECK AND ALERT SYSTEM

3.6 Buzzer
An audio signaling device like a beeper or buzzer may be electromechanical
or piezoelectric or mechanical type. The main function of this is to convert the signal from
audio to sound. Generally, it is powered through DC voltage and used in timers, alarm
devices, printers, alarms, computers, etc. Based on the various designs, it can generate
different sounds like alarm, music, bell & siren.

Figure 3.10 Buzzer Pin Configuration

3.6.1 Pin configuration


It includes two pins namely positive and negative. The positive terminal of this is
represented with the ‘+’ symbol or a longer terminal. This terminal is powered through
6Volts whereas the negative terminal is represented with the ‘-‘symbol or short terminal and
it is connected to the GND terminal.

3.6.2 Specifications
 Color is black
 The frequency range is 3,300Hz
 Operating Temperature ranges from – 20° C to +60°C
 Operating voltage ranges from 3V to 24V DC
 The sound pressure level is 85dBA or 10cm
 The supply current is below 15mA

Dept. of EEE SICET Page | 28


AIR POLLUTION CHECK AND ALERT SYSTEM

3.7 Regulated Power Supply

Regulated power supply is an electronic circuit that is designed to provide a constant


dc voltage of predetermined value across load terminals irrespective of ac mains fluctuations
or load variations.

Figure 3.11 Block diagram of Regulated Power Supply

A regulated power supply essentially consists of an ordinary power supply and a


voltage regulating device, as illustrated in the figure. The output from an ordinary power
supply is fed to the voltage regulating device that provides the final output. The output
voltage remains constant irrespective of variations in the ac input voltage or variations in
output (or load) current.

Figure 3.11 shows the complete circuit of a regulated power supply with a transistor series
regulator as a regulating device. Each part of the circuit is explained in detail.

3.7.1 Transformer

A step-down transformer is used to step down the voltage from the input AC to the required
voltage of the electronic device. This output voltage of the transformer is customized by
changing the turns ratio of the transformer according the electronic device specs. The input of
the transformer being 230 Volts AC mains, the output is provided to a full bridge rectifier
circuit.

3.7.2 Full Wave Rectifier Circuit

Dept. of EEE SICET Page | 29


AIR POLLUTION CHECK AND ALERT SYSTEM

The FWR consists of 4 diodes which rectifies the output AC voltage or current from the
transistor to its equivalent DC quantity. As the name implies the FWR rectifies both half’s of
the AC input. The rectified DC output is given as input to the filter circuit.

3.7.3 Filter Circuit

The filter circuit is used to convert the high rippled DC output of the FWR to ripple free DC
content. Filter is used to make the waveforms ripple free.

Figure 4.2 IC7805 Filter Circuit

A variable regulated power supply, also called a variable bench power supply, is one
which you can continuously adjust the output voltage to your requirements. Varying the
output of the power supply is recommended way to test a project after having double checked
parts placement against circuit drawings and the parts placement.

This type of regulation is ideal for having a simple variable bench power supply.
Actually, this is quite important because one of the first projects a hobbyist should undertake
is the construction of a variable regulated power supply. While a dedicated supply is quite
handy e.g., 5V or 12V, it’s much handier to have a variable supply on hand, especially for
testing.

Most digital logic circuits and processors need a 5-volt power supply. To use these
parts, we need to build a regulated 5-volt source. Usually, you start with an unregulated
power to make a 5-volt power supply, we use a LM7805 voltage regulator IC (Integrated
Circuit).

Dept. of EEE SICET Page | 30


AIR POLLUTION CHECK AND ALERT SYSTEM

Figure 4.3 LM 7805 block diagram

Figure 4.4 Pin representation of LM 7805

The LM7805 is simple to use. You simply connect the positive lead of your
unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect the
negative lead to the Common pin and then when you turn on the power, you get a 5-volt
supply from the Output pin.

3.7.4 Circuit features:


 Brief description of operation: Gives out well-regulated +5V output, output current
capability of 100mA.
 Circuit protection: Built-in overheating protection shuts down output when regulator
IC gets too hot.
 Circuit complexity: Very simple and easy to build.
 Circuit performance: Very stable +5V output voltage, reliable operation

Dept. of EEE SICET Page | 31


AIR POLLUTION CHECK AND ALERT SYSTEM

 Availability of components: Easy to get, uses only very common basic components.
 Design testing: Based on datasheet example circuit, I have used this circuit
successfully as part of many electronic projects.
 Applications: Part of electronics devices, small laboratory power supply

Chapter 4 SOFTWARE TOOLS

4.1 Arduino IDE

The Arduino IDE is an open-source software, which is used to write and upload code
to the Arduino boards. The IDE application is suitable for different operating systems such
as Windows, Mac OS X, and Linux. It supports the programming languages C and C++.
Here, IDE stands for Integrated Development Environment.

The program or code written in the Arduino IDE is often called as sketching. We need
to connect the Genuine and Arduino board with the IDE to upload the sketch written in the
Arduino IDE software. The sketch is saved with the extension ‘. ino.'

Dept. of EEE SICET Page | 32


AIR POLLUTION CHECK AND ALERT SYSTEM

The Arduino IDE will appear as:

Figure 4.1 Arduino IDE Display

4.2 Toolbar Button

The icons displayed on the toolbar are New, Open, Save, Upload, and Verify.

Upload: The Upload button compiles and runs our code written on the screen. It further
uploads the code to the connected board. Before uploading the sketch, we need to make sure
that the correct board and ports are selected. We also need a USB connection to connect the
board and the computer. Once all the above measures are done, click on the Upload button
present on the toolbar.

Dept. of EEE SICET Page | 33


AIR POLLUTION CHECK AND ALERT SYSTEM

The latest Arduino boards can be reset automatically before beginning with Upload.
In the older boards, we need to press the Reset button present on it. As soon as the uploading
is done successfully, we can notice the blink of the Tx and Rx LED. If the uploading is failed,
it will display the message in the error window.

We do not require any additional hardware to upload our sketch using the Arduino
Bootloader. A Bootloader is defined as a small program, which is loaded in the
microcontroller present on the board. The LED will blink on PIN 13.

Open: The Open button is used to open the already created file. The selected file will be
opened in the current window.
Save: The save button is used to save the current sketch or code.
New: It is used to create a new sketch or opens a new window.
Verify: The Verify button is used to check the compilation error of the sketch or the written
code.
Serial Monitor: The serial monitor button is present on the right corner of the toolbar. It
opens the serial monitor.

When we connect the serial monitor, the board will reset on the operating system
Windows, Linux, and Mac OS X. If we want to process the control characters in our sketch,
we need to use an external terminal program. The terminal program should be connected to
the COM port, which will be assigned when we connect the board to the computer.

Dept. of EEE SICET Page | 34


AIR POLLUTION CHECK AND ALERT SYSTEM

Figure 4.2 Compiling Window

4.3 Menu Bar


 File: When we click on the File button on the Menu bar, a drop-down list will appear.
 New: The New button opens the new window. It does not remove the sketch which is
already present.
 Open: It allows opening the sketch, which can be browsed from the folders and
computer drivers.
 Open Recent: The Open Recent button contains the list of the recent sketches.
 Sketchbook: It stores the current sketches created in the Arduino IDE software. It
opens the selected sketch or code in a new editor at an instance.

Dept. of EEE SICET Page | 35


AIR POLLUTION CHECK AND ALERT SYSTEM

 Examples: It shows the different examples of small projects for a better


understanding of the IDE and the board. The IDE provides examples of self-practice.
 Close: The Close button closes the window from which the button is clicked.
 Save: The save button is used to save the current sketch. It also saves the changes
made to the current sketch. If we have not specified the name of the file, it will open
the 'Save As...' window.
 Save As : We can save the sketch with a different name using the 'Save As...' button.
We can also change the name accordingly.
 Page Setup: It allows setting the page margins, orientation, and size for printing. The
'Page Setup' window will appear as:
 Print: According to the settings specified in the 'Page Setup', it prepares the current sketch
for printing.
 Preferences: It allows the customization settings of the Arduino IDE.
 Quit: The Quit button is used to close all the IDE windows. The same closed sketch
will be reopened when we will open the Arduino IDE.
 Edit: When we click on the Edit button on the Menu bar, a drop-down list appears.
 Undo: The Undo button is used to reverse the last modification done to the sketch
while editing.
 Redo: The Redo button is used to repeat the last modification done to the sketch
while editing.
 Cut: It allows us to remove the selected text from the written code. The text is further
placed to the clipboard. We can also paste that text anywhere in our sketch.
 Copy: It creates a duplicate copy of the selected text. The text is further placed on the
clipboard.
 Copy for Forum: The 'Copy for Forum' button is used to copy the selected text to the
clipboard, which is also suitable for posting to the forum.
 Copy as HTML: The 'Copy for Forum' button is used to copy the selected text as
HTML to the clipboard. It is desirable for embedding in web pages.
 Paste: The Paste button is used to paste the selected text of the clipboard to the
specified position of the cursor.
 Select All: It selects all the text of the sketch.
 Go to line.: It moves the cursor to the specified line number.
 Comment/de comment: The Comment/ de comment button is used to put or remove
the comment mark (//) at the beginning of the specified line.

Dept. of EEE SICET Page | 36


AIR POLLUTION CHECK AND ALERT SYSTEM

 Increase Indent: It is used to add the space at the starting of the specified line. The
spacing moves the text towards the right.
 Decrease Indent: It is used to subtract or remove the space at the starting of the
specified line. The spacing moves the text towards the left.
 Increase Font Size: It increases the font size of the written text.
 Decrease Font Size: It decreases the font size of the written text.
 Find...: It is used to find the specified text. We can also replace the text. It highlights
the text in the sketch.
 Find Next: It highlights the next word, which has specified in the 'Find...' window. If
there is no such word, it will not show any highlighted text.
 Find Previous: It highlights the previous word, which has specified in the
'Find...' window. If there is no such word, it will not show any highlighted text.
 Sketch: When we click on the Sketch button on the Menu bar, a drop-down list appears.
 Let's discuss each option in detail.
 Verify/Compile: It will check for the errors in the code while compiling. The
memory in the console area is also reported by the IDE.
 Upload: The Upload button is used to configure the code to the specified board
through the port.
 Upload Using Programmer: It is used to override the Bootloader that is present on
the board. We can utilize the full capacity of the Flash memory using the 'Upload
Using Programmer' option. To implement this, we need to restore the Bootloader
using the Tools-> Burn Bootloader option to upload it to the USB serial port.
 Export compiled Binary: It allows saving a .hex file and can be kept archived.
Using other tools, .hex file can also be sent to the board.
 Show Sketch Folder: It opens the folder of the current code written or sketch.
 Include Library: Include Library includes various Arduino libraries. The libraries
are inserted into our code at the beginning of the code starting with the #. We can also
import the libraries from .zip file.
 Add File...: The Add File... button is used to add the created file in a new tab on the
existing file.

4.4 Tools

Dept. of EEE SICET Page | 37


AIR POLLUTION CHECK AND ALERT SYSTEM

When we click on the Tools button on the Menu bar, a drop-down list appears. Let's discuss
each option in detail.

 Auto Format: The Auto Format button is used to format the written code. For
example, lining the open and closed curly brackets in the code.
 Archive Sketch: The copy of the current sketch or code is archived in the .zip format.
The directory of the archived is same as the sketch.
 Fix Encoding and Reload: This button is used to fix the inconsistency between the
operating system char maps and editor char map encoding.
 Manage Libraries...: It shows the updated list of all the installed libraries. We can
also use this option to install a new library into the Arduino IDE.
 Serial Monitor: It allows the exchange of data with the connected board on the port.
 Serial Plotter: The Serial Plotter button is used to display the serial data in a plot. It
comes preinstalled in the Arduino IDE.
 WiFi101/WIFI NINA Firmware Updater: It is used to check and update the Wi-Fi
Firmware of the connected board.
 Board: We are required to select the board from the list of boards. The selected board
must be similar to the board connected to the computer.
 Processor: It displays the processor according to the selected board. It refreshes every
time during the selection of the board.
 Port: It consists of the virtual and real serial devices present on our machine.
 Get Board Info: It gives the information about the selected board. We need to select
the appropriate port before getting information about the board.
 Programmer: We need to select the hardware programmer while programming the
board. It is required when we are not using the onboard USB serial connection. It is
also required during the burning of the Bootloader.
 Burn Bootloader: The Bootloader is present on the board onto the microcontroller.
The option is useful when we have purchased the microcontroller without the
bootloader. Before burning the bootloader, we need to make sure about the correct
selected board and port.

4.5 Help

Dept. of EEE SICET Page | 38


AIR POLLUTION CHECK AND ALERT SYSTEM

When we click on the Help button on the Menu bar, a drop-down list will appear. The
Help section includes several documents that are easy to access, which comes along with the
Arduino IDE. It consists of the number of options such as Getting Started, Environment,
Troubleshooting, Reference, etc. We can also consider the image shown above, which
includes all the options under the Help section.
Some documents like Getting started, Reference, etc., can be accessed without the internet
connection as well. It will directly link us to the official website of Arduino.

Dept. of EEE SICET Page | 39


AIR POLLUTION CHECK AND ALERT SYSTEM

Chapter 5 METHODOLOGY AND DESIGN

5.1 Block diagram

Figure 5.1 Block diagram of this project

Dept. of EEE SICET Page | 40


AIR POLLUTION CHECK AND ALERT SYSTEM

5.2 Block Diagram Description


The system includes an Arduino board connected to gas sensors (MQ2 and MQ3), a
buzzer, and an LCD display. The sensors detect various gases, and the Arduino processes the
analog readings, comparing them to predefined thresholds. If gas concentrations exceed these
thresholds, the system triggers a buzzer for an audible alert and displays real-time data on the
LCD. Calibration ensures accurate readings, and optional features like data logging and
connectivity enhance the system's functionality.

5.3 Wiring and Connections


Connection of the sensors to the analog pins of the Arduino, and the buzzer and LCD
display to digital pins.
5.3.1 Sensors Connections
 MQ - 2’s voltage and ground are connected to +5V and 0V and the analog output pin
is connected to analog pin A0 of Arduino Uno.
 MQ - 5’s voltage and ground are connected to +5V and 0V and the analog output pin
is connected to analog pin A1 of Arduino Uno.
5.3.4 LCD Display Connections
 LCD RS pin to digital pin 12
 Enable pin to digital pin 11
 D11 pin to digital pin 5, D12 pin to digital pin 4, D13 pin to digital pin 3, D14 pin to
digital pin 2
 R/W pin to ground, VSS pin to ground, VCC pin to 5V
5.3.5 Buzzer connections
 Positive (+ve) pin to digital pin 10
 Negative (-ve) pin to GND

5.4 Working
The MQ-2 and MQ-5 sensors can sense NH3, methane, alcohol, Benzene, smoke,
CO2, LPG and some other gases, so these sensors are perfect gas sensors for our Air
Pollution Check and Alert System Project. When we connect the sensors to Arduino then
they senses the gases, and we will get the Pollution level in PPM (parts per million). MQ-2

Dept. of EEE SICET Page | 41


AIR POLLUTION CHECK AND ALERT SYSTEM

and MQ-5 gas sensors gives the output in form of voltage levels and we need to convert it
into PPM. So, for converting the output in PPM, here we have used a library for MQ135
sensor, it is explained in detail in “Code Explanation” section below.

If Sensors are giving us values of 90 and 100 then there was no gas near it and the
safe level of air quality is 350 PPM and it should not exceed 1000 PPM. When it exceeds the
limit then the buzzer triggers and gives the alarm. Exceeding the limit of air quality causes
Headaches, sleepiness and stagnant, stale, stuffy air and if exceeds beyond 2000 PPM then it
can cause increased heart rate and many other diseases.

Figure 5.2 Experimental setup

Dept. of EEE SICET Page | 42


AIR POLLUTION CHECK AND ALERT SYSTEM

Figure 5.3 Schematic Diagram

Dept. of EEE SICET Page | 43


AIR POLLUTION CHECK AND ALERT SYSTEM

5.5 Arduino IDE Code


#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Include MQ gas sensor libraries
#include <MQUnifiedsensor.h>
// Define LCD parameters
LiquidCrystal_I2C lcd(0x27, 16, 2);
// Define MQ sensor pins
int mq2Pin = A0;
int mq5Pin = A1;
// Define buzzer pin
int buzzerPin = 8;
// Threshold values for gas concentration (adjust as needed)
float thresholdMQ2 = 300; // Example threshold for MQ-2
float thresholdMQ5 = 200; // Example threshold for MQ-5
// Create instances of MQ sensors
MQUnifiedsensor mq2(2, 3, mq2Pin, 1);
MQUnifiedsensor mq5(2, 3, mq5Pin, 1);
void setup() {
// Initialize LCD
lcd.begin(16, 2);
// Initialize MQ sensors
mq2.begin();
mq5.begin();
// Initialize buzzer
pinMode(buzzerPin, OUTPUT);
}

void loop() {

Dept. of EEE SICET Page | 44


AIR POLLUTION CHECK AND ALERT SYSTEM

// Read gas concentrations


float mq2Value = mq2.readSensor();
float mq5Value = mq5.readSensor();
// Display values on LCD
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("MQ2: ");
lcd.print(mq2Value);
lcd.setCursor(0, 1);
lcd.print("MQ5: ");
lcd.print(mq5Value);

// Check if gas concentrations exceed thresholds


if (mq2Value > thresholdMQ2 || mq5Value > thresholdMQ5) {
// Alert and trigger buzzer
lcd.setCursor(0, 1);
lcd.print("ALERT! ");
tone(buzzerPin, 1000); // Adjust the frequency as needed
delay(1000); // Adjust the delay as needed
noTone(buzzerPin);
}

delay(1000); // Adjust the delay as needed


}

5.6 Result
The result of the air pollution check and alert system using Arduino with MQ-2 and
MQ-5 gas sensors is an effective solution for real-time air quality monitoring. Users receive
immediate alerts through a buzzer if gas concentrations exceed predefined thresholds. The

Dept. of EEE SICET Page | 45


AIR POLLUTION CHECK AND ALERT SYSTEM

LCD display provides on-the-spot information about detected gases. The system's optional
features, such as calibration for accuracy, data logging for historical analysis, and
connectivity for remote monitoring, enhance its overall functionality. This project serves as a
practical tool to promote awareness and proactive measures in addressing air quality
concerns.

Dept. of EEE SICET Page | 46


AIR POLLUTION CHECK AND ALERT SYSTEM

Chapter 6 DISCUSSIONS

6.1 Discussion
Based on the analysis of the characteristic of IOT and operators’ network, this article
demonstrates how to construct the operational and manageable IOT structure by means of the
new network element IOT gateway. This article describes the composition and technical
points of IOT gateway, and illustrates the application situation of IOT gateway by examples.

6.2Applications: -
 Home Air Quality Monitoring: Individuals can deploy the system in homes to monitor
indoor air quality and ensure a healthy living environment.
 Educational Institutions: Schools and colleges can use the project as an educational
tool to teach students about environmental monitoring and the impact of air pollution.
 Community Centers: Community centers can install the system to promote awareness
about air quality issues and encourage collective efforts to address pollution.
 Small Offices or Workspaces: The project is suitable for monitoring air quality in
small office spaces, ensuring a comfortable and healthy working environment.
 DIY Environmental Projects: Enthusiasts interested in DIY environmental projects
can use this system as a foundation for more extensive monitoring initiatives.
 Air Quality Research: Researchers can deploy multiple units of the system in different
locations to gather data for air quality studies and research.
 Environmental Activism: Environmental groups can utilize the system to monitor and
raise awareness about air pollution in specific areas, advocating for policy changes.
 Public Spaces: Parks, recreational areas, or public spaces can benefit from the
installation of these systems to ensure the well-being of visitors.
 Emergency Response: The system can be integrated into emergency response plans,
providing a quick indication of potentially hazardous conditions in specific areas.
 Prototype for Larger Systems: The project can serve as a prototype for more
comprehensive air quality monitoring systems, guiding the development of larger and
more sophisticated setups.

Dept. of EEE SICET Page | 47


AIR POLLUTION CHECK AND ALERT SYSTEM

 These applications highlight the versatility of the project, making it suitable for a
range of settings where real-time air quality monitoring is essential.
 Industrial perimeter monitoring
 Indoor air quality monitoring.
 Site selection for reference monitoring stations.
 Making data available to users.

6.3 Advantages: -
 This project uses cost-effective components, making it accessible to a wide range of
users, including individuals and small communities.
 The Arduino platform and straightforward sensor integration simplify the
development process, allowing individuals with basic technical skills to build and
deploy the system.
 Real-time Monitoring: Provides immediate feedback on air quality, enabling users to
take prompt actions in response to elevated pollution levels.
 Users can adjust threshold values based on specific air quality standards or personal
preferences, allowing for customization.
 The inclusion of an LCD display makes the system user-friendly, presenting air
quality data in a clear and understandable format.
 Audible Alerts: The buzzer provides audible alerts, ensuring users are promptly
notified when pollution levels exceed predefined thresholds.
 Flexibility for additional features like calibration for accuracy, data logging, and
connectivity for remote monitoring enhances overall functionality.
 Serves as an educational tool, promoting awareness about air quality issues and
providing a hands-on experience in environmental monitoring.
 The project's simplicity and affordability encourage community engagement and
collaboration in addressing local environmental concerns.
 Can be easily scaled for broader deployment in various settings, such as homes,
schools, or community spaces.
 Updates On mobile phone directly
 Accurate Pollution monitoring

Dept. of EEE SICET Page | 48


AIR POLLUTION CHECK AND ALERT SYSTEM

 Remote location monitoring

6.4Limitations
 Low-cost gas sensors may provide less accurate readings compared to professional-
grade equipment, leading to potential inaccuracies in air quality measurements.
 The MQ2 and MQ5 sensors are sensitive to a range of gases, but they may not be
highly selective for specific pollutants, limiting the system's ability to detect certain
contaminants.
 Maintaining accurate calibration over time can be challenging, and frequent
adjustments may be required to compensate for sensor drift or environmental changes.
 Gas sensors may exhibit cross-sensitivity, meaning they can respond to multiple
gases, making it difficult to isolate the contribution of a particular pollutant.
 The sensors may have a limited detection range, potentially missing certain gases or
pollutants that fall outside their specified sensitivity range.
 External environmental factors, such as temperature and humidity, can impact sensor
performance, leading to variations in readings.
 The response time of low-cost sensors may be slower compared to high-end devices,
affecting the system's ability to provide real-time alerts in rapidly changing
conditions.
 The project may lack advanced communication options, limiting its integration into
more extensive data networks or smart city initiatives.
 The system may not meet regulatory standards required for official air quality
compliance assessments, limiting its use in formal regulatory monitoring.
 Regular maintenance is necessary to ensure the sensors remain calibrated and function
properly, adding to the operational overhead.
 Wireless Sensor Networks are gaining importance in the area of research, mainly of
their wide potential applications. Atmospheric contamination in the various elements
of air leading to hazardous effects of global warming and acid rains which have
become a crucial apprehension for the wellness of the population. An atmosphere

Dept. of EEE SICET Page | 49


AIR POLLUTION CHECK AND ALERT SYSTEM

pollution monitoring system is extremely important.


Despite these limitations, the project serves as a valuable entry-level solution for basic air
quality monitoring and awareness in smaller-scale environments. Users should be aware of
these constraints when considering the system's application and interpreting its results.

CONCLUSION
In conclusion, the air pollution check and alert system utilizing Arduino with MQ2
and MQ5 gas sensors offers a practical solution for monitoring air quality. The project
demonstrates the feasibility of using inexpensive sensors to detect harmful gases and
provides real-time alerts through a buzzer when pollution levels exceed predefined
thresholds. The system's simplicity, coupled with optional features like calibration for
accuracy and connectivity for remote monitoring, makes it a versatile tool for promoting
environmental awareness and facilitating timely responses to deteriorating air quality. This
project underscores the potential for accessible and DIY solutions to address pressing
environmental concerns.

The importance of real-time wireless air pollution monitoring system is investigated


considering the vital technical and economic issues for vast area deployment. Commercially
available gas sensors were calibrated using the appropriate calibration technologies.

Dept. of EEE SICET Page | 50


AIR POLLUTION CHECK AND ALERT SYSTEM

FUTURE SCOPE
The future scope of an air pollution check and alert system is significant, driven by
the increasing global awareness of environmental issues and the need for sustainable living.
Here are several potential developments and trends that could shape the future of such
systems.

As more cities embrace the concept of smart cities, air pollution check and alert
systems may become integral components of urban planning and management. Integration
with other smart city technologies, such as traffic management systems and energy grids, can
lead to more comprehensive solutions for pollution control.

Integration with educational programs and public awareness campaigns can empower
individuals to take actions to reduce their contribution to air pollution. Interactive apps and
platforms can educate the public about the sources of pollution, its health impacts, and ways
to mitigate it.

Integration with healthcare systems can help in studying the long-term health effects
of air pollution exposure. Health advisories and alerts can be directly communicated to
healthcare providers to ensure timely intervention for vulnerable populations.

Dept. of EEE SICET Page | 51


AIR POLLUTION CHECK AND ALERT SYSTEM

Dept. of EEE SICET Page | 52


AIR POLLUTION CHECK AND ALERT SYSTEM

REFERENCES

[1] Department of Transport, Transport ten-year plan stationary Office, London, 2000.

[2] Wasp mote technical guide-libelium system, http://www.libelium.com/support

[3] http://www.opengeospatial.org/standards/html

[4]https://www.google.com/search?q=IOT+Based+
+future+work&source=lnms&sa=X&ved=0ahUKEwiCmu-
Oz4fiAhW0muYKHbCeAgkQ_AUICSgA&biw=1366&bih=608&dpr=1

[5] https://issuu.com/grdjournals/docs/grdcf002046

[6]https://www.researchgate.net/publication/
328015436_A_Smart_Air_Pollution_Monitoring_System

[7]https://www.google.com/search?
biw=1366&bih=608&tbm=isch&sa=1&ei=tYfQXJrjL5vgz7sPrYei2As&q=IOT+Based+
+future+work&oq=IOT+Based+
+future+work&gs_l=img.12...114046.115922..117456...0.0..0.157.1120.0j8......1....1..gws-
wiz-img.I1C2TP4DoWs#imgrc=_

Dept. of EEE SICET Page | 53


AIR POLLUTION CHECK AND ALERT SYSTEM

Dept. of EEE SICET Page | 54

You might also like