You are on page 1of 7

POLLUTION CONTROL USING MICROCONTROLER

NICOLA GABRIEL
IUSTULIN ORLANDO
VIRBANESCU ALEXANDRU
PUZDREA RAZVAN
GRUPA: ICC 2-B

Abstract

Today, air pollution is the biggest environmental health problem in the world. Air
pollution leads to adverse effects on human health, climate and ecosystems. Air is
contaminated by toxic gases released by industry, vehicle emissions and the increased
concentration of harmful gases and particulate matter in the atmosphere.
Recently, mobile technologies, especially the Internet of Things, data and machine
learning technologies have a positive impact on the way we manage our health. With the
production of IoT-based portable air quality measuring devices and their widespread use,
people can monitor the air quality in their living areas instantly. In this study, Pollution
Control, a real-time mobile air quality monitoring system is proposed.[1]
The air quality data measured by the MQ-2 sensor and can be monitored via the 32-bit
ESP8266 Wi-Fi controller and the mobile interface developed by Android Studio. The
received data are recorded in a cloud server (Firebase).

1. Introduction
In recent years, air pollution has been a major environmental problem and a global
concern that has exceeded recommended national limits. Air pollution has negative effects on
human health and ecosystems, as well as affecting the world’s climate. Air pollution can be
classified as internal or external air pollution, depending on where the activities take place.
Indoor air pollution, found in offices, hospitals, schools, libraries, entertainment areas,
gymnasiums, public transport vehicles, etc., is classified as the pollution of the air of indoor
areas. Major indoor air pollutants include NOx, SO2, O3, CO, carbon dioxide (CO2).
Exposure to air pollution, especially indoor air pollution, is one of the largest
environmental health risk factors and is directly related to millions of premature deaths
worldwide each year. Air pollution comes second on the list of deaths caused by non-
contagious health reasons.
In this study, a low-cost, portable, IoT-based and real-time monitoring system that can
measure ambient air quality is proposed. For the proposed system, an Android interface has been
designed primarily with Android Studio IDE. Then, with the embedded architecture ESP8266
module, the controller unit of the system is created. Using this IoT controller with an internal Wi-
Fi module, all measured air quality data are displayed in the mobile app and these data are stored
on a cloud server. The mobile interface provides users with numerical data on contaminating gas
concentrations. The proposed measurement system sends a notification to the users via the mobile
application if any gas concentration levels reach health-threatening
values. In this way, households can take measures to reduce gas concentrations when
necessary.
In addition, the IoT-based air quality measurement system has a low-cost (about $100),
easy-to-install and open-source feature produced by a DIY approach.[1]

2. Related Studies
The interactions between humans and their physical surroundings have been extensively
studied, as multiple human activities influence the environment.
The environment is a coupling of the biotic (living organisms and microorganisms) and
the abiotic (hydrosphere, lithosphere, and atmosphere).
Pollution is defined as the introduction into the environment of substances harmful to
humans and other living organisms. Pollutants are harmful solids, liquids, or gases produced
in higher than usual concentrations that reduce the quality of our environment.
Human activities have an adverse effect on the environment by polluting the water we drink,
the air we breathe, and the soil in which plants grow. Although the industrial revolution was a
great success in terms of technology, society, and the provision of multiple services, it also
introduced the production of huge quantities of pollutants emitted into the air that are harmful to
human health. Without any doubt, the global environmental pollution is considered an
international public health issue with multiple facets. Social, economic, and legislative concerns
and lifestyle habits are related to this major problem. Clearly, urbanization and industrialization
are reaching unprecedented and upsetting proportions worldwide in our era.
Anthropogenic air pollution is one of the biggest public health hazards worldwide, given
that it accounts for about 9 million deaths per year.
Air pollution mainly affects those living in large urban areas, where road emissions
contribute the most to the degradation of air quality. That is why a portable Pollution Control
System is useful in every home, because is simple to use and can reduce drastically the side
effects of environmental pollution.[2]
3. Overview
From the Hardware point of view, the following were used:
• Arduino Uno R3;
• ESP8266 – Wi-Fi module;
• MQ-2 – gas sensor;
• Relay;
• MOSFET N-Channel;
• PC Fan;
• Wires;
• Breadboard;
These components where connected as shown bellow:
1. Wi-Fi Module:

(Fig.1 – Connection of the ESP8266 Wi-Fi Module)

2. Complete Scheme of the electronic circuit:

(Fig.2 – Final Circuit Scheme)


3. Finally, bellow will be shown an overview at the project, after all the parts
where connected together:

(Fig.3 – Pollution Control System)

The ESP8266 works with 3.3V and not 5V. Connection has been made by the bellow
scheme, resulting the circuit from Fig.1:
ESP8266:-------------- >Arduino:
GND -------------------------- GND
GPIO-2 (IO2) -------------------- Not connected (open)
GPIO-0 (IO0)---------------------GND
RX --------------------------------RX
TX ---------------------------------TX
CHPD (EN) ------------------------ 3.3V
RST -------------------------------- Not connected (open)
VCC (3v3) -------------------------- 3.3V
Remark: connect Arduino Uno RESET Pin to Uno's Ground/GND Pin.[3]
After connecting the Wi-Fi module, rest of the components will be connected to
Arduino (as shown in Fig.2):
• MQ-2 gas sensor VCC->Arduino 5v, GND->Arduino GND, A0->Arduino A0
analog Pin to send data. Range: 200 to 10000 ppm;
• N-Channel MOSFET S->Arduino GND, D->PC Fan 12V Coil1, G-
>10KOHM resistor and Pin 5 of Arduino; it is used for providing greater
efficiency while operating at lower voltages;
• Green LED with a 330Ohm resistor for sensor value less than 300 ppm;
• Red LED with a 220Ohm resistor for sensor value greater than 300 ppm;
• Relay Signal->Arduino Pin 2, Power->5V, Ground->GND; it is used to control
the opening and closing of the circuit contacts.
and the system will be controlled by a code in Arduino IDE that will contain the control of
the Fan, as well as the transmission and reception of its status (on / off) (Fig.3).

4. Mobile App Implementation


Smart home products are defined by their ability to connect wireless, allowing users to
interact with them from their smartphones. We live in an age where home appliances are
becoming “smarter” every day. That means they have more powerful computer chips
installed within their plastic / stainless steel bodies and they can talk to each other and to your
smartphone via Wi-Fi connectivity.
The internet of things helps people live and work smarter, as well as gain complete
control over their lives. In addition to offering smart devices to automate homes, IoT is
essential to business. IoT provides businesses with a real-time look into how their systems
really work, delivering insights into everything from the performance of machines to supply
chain and logistics operations.
An IoT ecosystem consists of web-enabled smart devices that use embedded systems,
such as processors, sensors and communication hardware, to collect, send and act on data
they acquire from their environments. IoT devices share the sensor data they collect by
connecting to an IoT gateway or other edge device where data is either sent to the cloud to be
analyzed or analyzed locally.
The devices do most of the work without human intervention, although people can
interact with the devices – for instance, to set them up, give them instructions or access the
data. The connectivity, networking and communication protocols used with these web-
enabled devices largely depend on the specific IoT applications deployed.
The implementation of the application started from its objectives, leading to the creation
of a project in Android Studio.[1]
Title of the
App Current Date

Detected Value

Button for turning on/off


Maximum value
the fan manually
detected

Button for starting


the app

(Fig.4 – Android App Interface)

(Fig.5 – Firebase Database)


In the “Data” field, when the Start button is pressed, user will be able to see the current date
and time. “Valoare Detectata” field will retrieve the Value field from Firebase Database, as shown in
Fig.5. Also, the “Valoare Maxima Detectata” field will retrieve the Max value from the Database.
Max value will be based on the code from Arduino Code:
airData = analogRead(airPin);
if (airData > maxValue) {
maxValue = airData;
Serial.println ("");
Serial.println ("Sensor detected value: ");Serial.println (airData);
The two buttons for turning on and off the FAN will sent value 1 and 0 to Database,
depending if the FAN is turned on or off (Fig.5).
A series of Notification will also appear, depending on the value detected by the sensor:

• <100 - "Nivel redus de poluare detectat! Nu este necesara


pornirea ventilatorului!"
• >100 & <=300 – “Poluare Detectata! Va rugam sa porniti ventilatorul!”
• >300 – “Nivel extrem de poluare! Ventilatorul va porni automat!”

5. Conclusions
The purpose of this project was achieved, the application can be used by anyone to
control a pollution control system, quite useful nowadays, with an android device.
The whole set, consisting of the mobile and android structure and android is just a practical
implementation of the knowledges acquired in college and it can be improved in the future
with other functionalities such as humidity detector, temperature detector or noise detector.

References:
1. „Real-Time Monitoring of Indoor Air Quality with Internet of Things-Based E-Nose” by
Mehmet Tastan and Hayrettin Gokozan https://www.mdpi.com/2076-3417/9/16/3435/html
2. „Enviromental and Health Impacts of Air Pollution: A Review” by Ioannis Manisalidis,
Elisavet Stavropoulou, Agathangelos Stavropoulou and Eugenia Bezirtzoglou
https://www.frontiersin.org/articles/10.3389/fpubh.2020.00014/full
3. “Connecting ESP8266 to Firebase to Send&Receive Data” by Pulasthi Nanayakkara
https://eldontronics.wordpress.com/2017/08/28/beginning-iot-with-esp8266-01-
wifi-module-and-cayenne-iot-platform/

You might also like