Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

Design and Construction of an ioT based Live

Weather Station Monitoring System.

This thesis is presented as part of


Bachelor of Science in Electrical and Electronic Engineering

SUBMITTED BY:

Md. Aminul islam ID: 13-221-0022


Md. Nazmul Haque ID: 13-221-0068
Sammit Hossain ID: 13-202-0037

SUPERVISED BY:
Tanmoy Roy
Lecturer
Department of Electrical & Electronic Engineering

ANWER KHAN MODERN UNIVERSITY


October 2023

i
Certificate
This is to certify that the report entitled “Design and Construction of an ioT
based Live Weather Station Monitoring System” is the valid record of the bona
fide work done by Tanmoy Roy our supervision in partial fulfillment of the award
of the degree of Bachelor of Science in Electrical and Electronics Engineering
from the Anwer Khan Modern University (AKMU).

-----------------------------
Signature of Supervisor
Tanmoy Roy
Lecturer
Department of Electrical and Electronics Engineering
Anwer Khan Modern University

ii
DECLARATION

We hereby do solemnly declare that the work presented in this project has been
carried out by us. This project is submitted as a particular fulfillment of the
requirement for the degree of Bachelor of Science in Electrical and Electronic
Engineering commenced from of ANWER KHAN MODERN UNIVERSITY
(AKMU) is the result of our own project work. We hereby declare that no part of
this project consists of materials copied or plagiarized from other published or
unpublished source have either been put under quotation or duly acknowledged
with full reference in appropriate places.

Thanking You,

Md. Aminul islam


ID: 13-221-0022
Department of Electrical and Electronic Engineering

Md. Nazmul Haque


ID: 13-221-0068
Department of Electrical and Electronic Engineering

Sammit Hossain
ID: 13-202-0037
Department of Electrical and Electronic Engineering

iii
ABSTRACT

Where pollution has become a major problem around the world, air pollution is
the most dangerous, shocking and severe pollution among other pollutions e.g.
water pollution, soil pollution, noise pollution, light pollution, thermal pollution
etc. Air pollution is the major cause of diseases like asthma, cancer, bronchitis,
birth defects and immune system like diseases. Air pollution affects our day to
day activities and quality of life. It poses a threat to the ecosystem and the quality
of life on the planet. The dire need to monitor air quality is very glaring, owing to
increased industrial activities over the past years. People need to know the extent
to which their activities affect air quality. This project proposes an air pollution
monitoring system. The system was developed using the Arduino microcontroller.
The air pollution monitoring system was designed to monitor and analyze air
quality in real-time and display it to LCD. Air quality measurements were taken
based on the Parts per Million (PPM) metrics. The air quality measurements taken
by the designed system was accurate. The goal is to make the system as reasonable
as possible so that people from every society background can use this and if some
research organization wants to do further research then if some nominal amount
of money is invested then it would be a great solution to install a weather station
thus air quality monitoring system.

iv
Table of Content's
CHAPTER 1 INTRODUCTION 1
1.2 Background Study 1
1.3 Objective 2
1.4 Project Organization 2

CHAPTER 2 THEORY OF THE PROJECT 3


2.1 Weather Monitoring System 3
2.2 Theory 3
2.3 Used Equipment 3
2.4 Arduino Nano 4
2.5 NodeMCU 8
2.6 Blynk application 10
2.7 Optical Dust Sensor 12
2.8 Temperature Sensor 13
2.9 Temperature sensor 15
2.10 LCD Display 16
2.11 Buzzer 17
2.12 Transformer 17
2.13 Diode 18
2.14 Full wave rectifier 18
2.15 Buck Converter Module 20

CHAPTER 3 SYSTEM DESIGN 21


3.1 Introduction 21
3.2 Block Diagram 21
3.2.1 Block Diagram Description 21
3.3 Circuit Diagram 22
3.3.1 Working Process of our Circuit 22
3.4 Arduino software 22
3.5 Project Picture 24
3.6 Summarization 24

v
CHAPTER 4 RESULT AND DISCUSSION 25
4.1 Introduction 25
4.2 Results 25
4.3 Application 26
4.4 Advantage 26
4.5 Limitation 26
4.6 Discussion 26
4.7 Cost Estimation 27

CHAPTER 5 CONCLUSION 28
5.1 Conclusion 28
5.2 Future Recommendation 28

References 29
Appendix 31

vi
List Figures
Fig 2. 1: Arduino Nano 4
Fig 2. 2: NodeMCU microcontroller 10
Fig 2. 3: Blynk application communication feature 11
Fig 2. 4: Blynk application widget box 11
Fig 2. 5: Optical Dust Sensor 12
Fig 2. 6: Temperature and humidity Sensor 14
Fig 2. 7: Temperature Sensor 15
Fig 2. 8: Arduino and temperature sensor connection 16
Fig 2. 9: LCD Display 17
Fig 2. 10: 220v to 12v step down transformer. 17
Fig 2. 11: Diode 18
Fig 2. 12: Full wave rectifier is a circuit diagram 19
Fig 2. 13: Full wave rectifier wave from 19
Fig 2. 14: DC-DC Buck Converter 20
Fig 3. 1: Block Diagram 21
Fig 3. 2: Circuit Diagram 22
Fig 3. 3: Programming platform for ARDUINO 23
Fig 3. 4: Project Picture 24
Fig 3. 5: Normal Status 37
Fig 3. 6: Temperature Alarm 25
Fig 3. 7: Smoke Alarm 37
Fig 3. 8: Dust Alarm 25

vii
CHAPTER 1
INTRODUCTION
1.1 Introduction
Considering the daily newspapers and any other electronic or print media, a
devastating news which is spreading day by day is people is becoming sick and
the climate is changing such a way that it has become miserable for living of
people. From the aspect from top to bottom, every people are suffering the curse
of climate change. The main reason for the climate change and people health is air
pollution. It has brought changes in climate like global warming, global dimming,
over raining, drought, storms, acid rain, foggy weather etc. The living things on
earth and under water are suffering many problems like change in life due to lack
of proper facilities of life.
Air is the most useful thing for each and every living thing. Researching on this
serious issue this system’s main purpose was to estimate the quality of air for
people and any other living thing which exist on earth. Very important to know
for our living is that how much safe we are now and how the weather and climate
has changed for air pollution and it will sustain sound. This system will ease to
know the answers for air quality.
Dust is responsible for the most air pollution, in this system we use optical dust
sensor and Temperature & Humidity Sensor. Noise sensor is also added to measure
the presence of noise in the environment. A server and an android app have been
made to know the statistics because now days almost everyone has an android
operating device and access to internet.

1.2 Background Study


A wireless distributed mobile air pollution monitoring system using General
Packet Radio Service (GPRS) sensors was reported. Advancements in wireless
communication and sensor technology are rapidly changing air pollution
monitoring paradigm. Internet of things (IoT) also allows the creation of smart
environments in which objects interact and cooperate with each other.

1
A lot of improvements have been made to existing air pollution monitoring
systems. For example, proposed a system for monitoring air quality at home. The
system transmits sensor data wirelessly by making use of the “request and
respond” protocol along with a combination of address and data centric protocols.
The system monitors the indoor air quality of a home and displays the sensor
reading on a screen. The researchers in employed an Unmanned Aerial Vehicle
(UAV) based system to monitor the air pollution in areas with poor accessibility.
The system was equipped with a Pixhawk autopilot for UAV control and a
Raspberry Pi for sensing and collating air pollution data. An adaptive algorithm
was used to analyze the gathered pollution data. A participatory sensor system for
monitoring air pollution in Sydney was proposed by scientists. In the proposed
system, sensors were mounted on vehicles and a mobile application was used to
upload data to a centralized repository. The system gave information to the user
about their private vulnerability to pollution in the air.. Recursive Converging
Quartiles (RCQ) algorithm aggregates and eliminates data duplicates by removing
invalid readings. This saves energy. The system consisted of sensor nodes and
wireless communication links to a server. The sensor nodes collated data
automatically and passed it on through the network to the server.

1.3 Objective
 To create a device which will monitor the quality of air of our environment
Content of dust, temperature and humidity present in air or area around us.
 Display the data on LCD.
 Make conscious for reduce air pollution
 To take action by local authority for prevent air pollution

1.4 Project Organization


In this report, Chapter one covers introduction, background, objectives. Chapter
two represents theory, description of the microcontroller, wind, solar & generator,
LCD display and other components. Chapter three describes and working principle
of the project. In chapter four we have discussed result and discussion, cost
estimation, future modification, conclusion.

2
CHAPTER 2
THEORY OF THE PROJECT
2.1 Weather Monitoring System
This chapter includes the total over view of the device. In this chapter we have
followed-up the theory of Arduino Nano, LCD Display, Resistor, Capacitor,
Temperature & Humidity sensor and Optical Dust Sensor, briefly describe of
Microcontroller (ATMEGA 328P), Crystal, LCD display (16x2), Vero board, and
other components. Here we can know that the total system overview of the
projects. And we will also know that how the equipment are working with each
other.

2.2 Theory
We’ve developed the system that can measure dust in air and also can measure
temperature and humidity of environment. In this project we use three optical dust
sensor and three temperature and humidity sensor. We assume three zones and
each zone contain a dust sensor and a temperature and humidity sensor. All sensor
of those three zone are connected to a microcontroller. Here we use Arduino Nano
microcontroller development board which is based on ATmega328p
microcontroller. A LCD is connected with this so that anyone can see the dust
status and environment status.

2.3 Used Equipment


 Arduino Nano
 NodeMCU
 Optical Dust sensor
 Temperature & Humidity sensor
 LCD
 Smoke Sensor

3
2.4 Arduino Nano
Microcontroller, as the name suggests, are small controllers. They are like single
chip computers that are often embedded into other systems to function as
processing/controlling unit. For example, the remote control you are using
probably has microcontrollers inside that do decoding and other controlling
functions. They are also used in automobiles, washing machines, microwave
ovens, toys ... etc, where automation is needed.
Arduino is an open-source prototyping platform based on easy-to-use hardware
and software. Arduino boards are able to read inputs - light on a sensor, a finger
on a button, or a Twitter message - and turn it into an output - activating a motor,
turning on an LED, publishing something online. We can tell this board what to
do by sending a set of instructions to the microcontroller on the board. To do so
you use the Arduino programming language and the Arduino Software (IDE),
based on Processing.

Fig 2. 1: Arduino Nano

Technical specifications:
Table 1. 1: Technical specifications of Arduino Nano

Microcontroller ATmega328P
Operating Voltage 5V
Input Voltage 7-12V
(recommended)
Digital I/O Pins 14 (of which 6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 8

4
DC Current per I/O Pin 20 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328P)of which 0.5 KB used by
bootloader
SRAM 2 KB (ATmega328P)
EEPROM 1 KB (ATmega328P)
Clock Speed 16 MHz

Microcontroller ATMEGA328P
The Atmel® picoPower® ATmega328/P is a low-power CMOS 8-bit
microcontroller based on the AVR® enhanced RISC architecture. By executing
powerful instructions in a single clock cycle, the ATmega328/P achieves
throughputs close to 1MIPS per MHz. This empowers system designer to optimize
the device for power consumption versus processing speed.
The Atmel AVR® core combines a rich instruction set with 32 general purpose
working registers. All the 32 registers are directly connected to the Arithmetic
Logic Unit (ALU), allowing two independent registers to be accessed in a single
instruction executed in one clock cycle. The resulting architecture is more code
efficient while achieving throughputs up to ten times faster than conventional
CISC microcontrollers. The ATmega328/P provides the following features:
32Kbytes of In-System Programmable Flash with Read-While-Write capabilities,
1Kbytes EEPROM, 2Kbytes SRAM, 23 general purpose I/O lines, 32 general
purpose working registers, Real Time Counter (RTC), three flexible
Timer/Counters with compare modes and PWM, 1 serial programmable USARTs
, 1 byte-oriented 2-wire Serial Interface (I2C), a 6- channel 10-bit ADC (8
channels in TQFP and QFN/MLF packages) , a programmable Watchdog Timer
with internal Oscillator, an SPI serial port, and six software selectable power
saving modes. The Idle mode stops the CPU while allowing the SRAM,
Timer/Counters, SPI port, and interrupt system to continue functioning. The
Power-down mode saves the register contents but freezes the Oscillator, disabling
all other chip functions until the next interrupt or hardware reset. In Power-save
mode, the asynchronous timer continues to run, allowing the user to maintain a

5
timer base while the rest of the device is sleeping. The ADC Noise Reduction
mode stops the CPU and all I/O modules except asynchronous timer and ADC to
minimize switching noise during ADC conversions. In Standby mode, the
crystal/resonator oscillator is running while the rest of the device is sleeping. This
allows very fast start-up combined with low power consumption. In Extended
Standby mode, both the main oscillator and the asynchronous timer continue to
run. Atmel offers the QTouch® library for embedding capacitive touch buttons,
sliders and wheels functionality into AVR microcontrollers. The patented charge-
transfer signal acquisition offers robust sensing and includes fully debounced
reporting of touch keys and includes Adjacent Key Suppression® (AKS™)
technology for unambiguous detection of key events. The easy-to-use QTouch
Suite toolchain allows you to explore, develop and debug your own touch
applications. The device is manufactured using Atmel’s high density non-volatile
memory technology. The On-chip ISP Flash allows the program memory to be
reprogrammed In-System through an SPI serial interface, by a conventional
nonvolatile memory programmer, or by an On-chip Boot program running on the
AVR core. The Boot program can use any interface to download the application
program in the Application Flash memory. Software in the Boot Flash section will
continue to run while the Application Flash section is updated, providing true
Read-While-Write operation. By combining an 8-bit RISC CPU with In-System
Self-Programmable Flash on a monolithic chip, the Atmel ATmega328/P is a
powerful microcontroller that provides a highly flexible and cost effective solution
to many embedded control applications. The ATmega328/P is supported with a
full suite of program and system development tools including: C Compilers,
Macro Assemblers, Program Debugger/Simulators, In-Circuit Emulators, and
Evaluation kits.

Power supply, inputs and outputs


Either Arduino is supplied with USB connection or with an external power supply
(recommended with 7-12V), outputs are going to have a continuous voltage due
to voltage regulators and stabilization capacitors present on the board. These
power supply pins are:

6
 VIN: it is the input power supply that will have the same voltage that we
are supplying the Arduino with the external power supply
 5V: power supply of 5V, this voltage may come from VIN pin and a
voltage regulator or from the USB connection.
 3.3V: power supply that will provide 3.3V generated by an internal
regulator, with a maximum current of 50 mA.
 GND: grounding pins

Digital inputs and outputs


Each of the 14 digital pins can be used as an input or output. Besides, each pin can
supply or receive a maximum of 40 mA and has a pull-p resistance from 20 to 50
kOhm. In addition, some pins have specialized functions such as:
 Pin 0 (RX) and 1 (TX). They are used to receive (RX) and transmit (TX)
in TTL serial communication.
 Pin 2 and 3. External interruptions. Pins in charge of interrupting the
sequential program stablished by the user.
 Pin 3, 5, 6, 9, 10 and 11. PWM (pulse width modulation). They form 8
output bits with PWM with the function analogWrite ().
 Pin 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
(Serial peripheral interface) communication.
 Pin 13. LED. There is a LED connected to the digital pin 13. When the pin
value is HIGH, the LED is on, and when the value is LOW, the LED is off.

Analog inputs
Arduino Nano has 8 analogical inputs, from A0 to A7, and each one offers
abresolution of 10 bits (1024 states). By default, there is a voltage of 5V, but that
range can be modified using the pin AREF and using the function
analogReference(), where the user introduces the DC external signal he wants to
use as reference.

7
2.5 NodeMCU

The ESP8266 is a low-cost Wi-Fi microchip with full TCP/IP stack and
microcontroller capability produced by manufacturer Espressif Systems. This
small module allows microcontrollers to connect to a Wi-Fi network and make
simple TCP/IP connections using Hayes-style commands. However, at first there
was almost no English-language documentation on the chip and the commands it
accepted. The ESP8285 is an ESP8266 with 1 MiB of built-in flash, allowing for
single-chip devices capable of connecting to Wi-Fi.

Advantages of IOT Microcontrollers:


The main advantages of microcontrollers are given.
a) Microcontrollers act as a microcomputer without any digital parts.
b) As the higher integration inside microcontroller reduces cost and size of
the system.
b) Usage of a microcontroller is simple, easy to troubleshoot and system
maintaining.
c) Most of the pins are programmable by the user for performing different
functions.
d) Easily interface additional RAM, ROM, I/O ports.
e) Low time required for performing operations.

Microcontrollers Applications:
Some basic applications of a microcontroller are given below.
1. Used in biomedical instruments.
2. Widely used in communication systems.
3. Used as a peripheral controller in PC.
4. Used in robotics.
5. Used in automobile fields.

8
NodeMCU Arduino Compatible ESP8266:
This NodeMCU development board is based on the ESP8266, which is a Wi-Fi
communication IC built by Espressif. At its core is a microcontroller that runs at a
blazing 80 MHz and includes a built-in TCP/IP stack and transceiver, which allows
for Wi-Fi communication. This low-cost option can, not only, add Wi-Fi capability
to your next project, it can run it. This board is a standalone microcontroller
development board that can be easily programmed using the Arduino IDE. Some
of the peripherals provided by that ESP8266 include 9 GPIOs, 1 analog input,
UART, SPI, and TWI/I2C, and Wi-Fi. It operates at a 3.3V logic level and it can
be powered from the USB voltage or AC adapter input. The NodeMCU D1 uses
the ESP 8266 microcontroller that is 2 x faster than an Uno, has 160Kbs of Ram
compared to the 2K of an Uno and a 100x the amount of Flash memory! And each
I/O pin is interruptible!

Technical Specs:
 Supply Voltage (Vin): 5 – 15V

 Logic Voltage: 3.3V

 Wi-Fi, UART, I2C, SPI

 Digital I/Os: 9

 Analog Inputs: 1

Resources
 Installing ESP8266 Support in Arduino IDE

 ESP8266 Arduino Core Reference

 ESP8266 Arduino Libraries

 Over-the-Air Update/Programming

 ESP8266 Datasheet

NodeMCU Wi-Fi ESP8266 Board


 An Arduino Nano Compatible Wi-Fi board based on
ESP8266EX.

9
 NodeMCU® Wi-Fi ESP8266 Development Board is
programmable via Arduino IDE.
 11 digital input/output pins, all pins have
interrupt/pwm/I2C/one-wire supported (except D0)
 1 analog input (3.3V max input)
 A Micro USB connection
 A power jack, 9-24V power input.
 Compatible with Arduino
 Compatible with nodemcu

Fig 2. 2: NodeMCU microcontroller

2.6 Blynk application


There are many apps to control the Wi-Fi communication with our smart phones.
In our project we have used Blynk app for controlling our project using our smart
phone. Blynk app for iOS and Android is the easiest way to build our own mobile
app that work with thehardware of our choice. Blynk Library is an extension that
runs on top of the hardware application. It handles all the connection routines and
data exchange between our hardware, Blynk Cloud, and our project.

10
Fig 2. 3: Blynk application communication feature

Major features
“Blynk app” It can control hardware remotely, it can display sensor data, it can
store data, visualize it and do many other cool things. There are three major
components in the platform: Blynk App - allows to you create amazing interfaces
for our projects using various widgets.

Fig 2. 4: Blynk application widget box

11
2.7 Optical Dust Sensor
Sharp's GP2Y1010AU0F is an optical air quality sensor, designed to sense dust
particles. An infrared emitting diode and a phototransistor are diagonally arranged
into this device, to allow it to detect the reflected light of dust in air. It is especially
effective in detecting very fine particles like cigarette smoke, and is commonly
used in air purifier systems.

Fig 2. 5: Optical Dust Sensor

Table 1. 2: Connection of Dust Sensor

12
Specifications:
 Low Current Consumption (MAX: 20mA)
 Typical Operating Voltage: 4.5V to 5.5V (MAX: 7V)
 The presence of dust can be detected by the photometry of only one pulse
 Enable to distinguish smoke from house dust
 Dimensions: 1.81 x 1.18 x 0.69'' (46.0 x 30.0 x 17.6mm)

2.8 Temperature Sensor


A sensor is an electronic device that converts a change in physical phenomenon
into an electrical signal. It can send the information to computers or other
electronic devices. Therefore, it is a part of the interface between the environment
or physical world and the electronics (Kenny, 2005). The function of a sensor is
to respond to an input physical signal and to convert it into an electrical signal
(voltage). It is a semiconductor device that is designed to respond on change in
their resistive or capacitive property depending upon the type of sensor. The
performance of sensor is characterized by: Transfer func-tion, Sensitivity, Range,
Accuracy/Uncertainty, Hysteresis, Linearity, Noise, Resolution and Bandwidth
(Wilson, 2005).
Sensors are used in many objects and places, for example, touch-sensitive phone
screen, motion sensitive light switch and several applications. The use of sensors
has been expanded widely with the development of microcontrollers. The sensors
are used in robotics, airplanes and aerospace, cars and many other applications.

The sensors used in this work is temperature and humidity sensor-DHT11. The
sensor-DHT11 is an Analog sensor designed to sense the physical change in heat
and moisture when exposed in air with suitable wiring and programming.
Its small size, cheap price, low power consumption, quick responses are the
character-istics for being one of the best choices for many users. The sensor
DHT11 is applicable in HVAC (heating, ventilation and air conditioning), it can
be used in testing and inspect-ing equipment and consumer goods. It is also
applicable to use in building a weather station or a humidity regulator. The use of

13
DHT11 sensor has shown its usefulness measuring and controlling temperature
and humidity in home appliances, medical and many other sector (Anon., 2017)
The Figure 2 shows the DHT11 temperature and humidity sensor. The sensor
DHT11 has following performance range and accuracy. A detailed datasheet is
included in Ap-pendices.
Measurement range:
Temperature: 0 to 50°C
Humidity: 20 to 90 % RH
Accuracy:
Temperature: ±2 %
Humidity: ±5 %
Where the operating Voltage remains between 3V to 5.5V (Anon., 2017)

Fig 2. 6: Temperature and humidity Sensor

Humidity is defined as the amount of water vapour contained in air. Usually, it is


ex-pressed as absolute humidity, dew point and relative humidity. The sensor used
in this thesis project, DHT1, is designed to measure humidity in terms of relative
humidity (RH). Relative humidity (RH) is the ratio of the amount of water vapour
content of the air to the saturated moisture level at the same pressure or
temperature: 𝑅𝐻=𝜌𝑤𝜌𝑠×100% ,
Where 𝑅𝐻 is relative humidity, 𝜌𝑤 is the density of water vapour, and 𝜌𝑠 is the
density of water vapour at saturation.

14
The sensor DHT11 detects moisture in the air by measuring the electrical
resistance between electrodes. It is fabricated with a moisture holding substrate.
When substrate absorbs moisture, ionization takes place and results in the increase
in conductivity be-tween the electrodes. The relative humidity is proportional to
the change in resistance between electrodes due to moisture absorbed.
The typical circuit diagram for DHT11 is shown in Figure 2.7 and the detailed
datasheet for DHT11

2.9 Temperature sensor


A temperature sensor is an electronic device that measures the temperature of its
environment and converts the input data into electronic data to record, monitor, or
signal temperature changes. There are many different types of temperature
sensors. Some temperature sensors require direct contact with the physical object
that is being monitored (contact temperature sensors), while others indirectly
measure the temperature of an object (non-contact temperature sensors).

Fig 2. 7: Temperature Sensor

The DS18B20 temperature sensor is a one-wire digital temperature sensor. This


means that it just requires one data line (and GND) to communicate with the
Arduino. It is one of the most popular temperature sensors on the market and
provides fairly high accuracy (±0.5 °C) over a large temperature range (-55 °C to
+ 125 °C). Because the operating voltage of the sensor is 3.0 to 5.5 V.

15
Fig 2. 8: Arduino and temperature sensor connection

2.10 LCD Display


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 combined with polarizers. Liquid crystals do not emit light directly,
instead using a backlight or reflector to produce images in color or monochrome.
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 preset words, digits, and seven-segment displays, as in a digital
clock. They use the same basic technology, except that arbitrary images are made
from a matrix of small pixels, while other displays have larger elements. LCDs
can either be normally on (positive) or off (negative), depending on the polarizer
arrangement. For example, a character positive LCD with a backlight will have
black lettering on a background that is the color of the backlight, and a character
negative LCD will have a black background with the letters being of the same
color as the backlight. Optical filters are added to white on blue LCDs to give them
their characteristic appearance.

16
Fig 2. 9: LCD Display

2.11 Buzzer
A buzzer is an electrical device that makes a buzzing noise and is used for
signaling. A buzzer has a piezo disc and an oscillator inside. When the buzzer is
powered, the oscillator generates a frequency around 2-4 kHz and the piezo
element vibrates accordingly to produce the sound. Assoon as the gas leak is
detected, the buzzer automatically rings to alert the users about the gas leak.

2.12 Transformer
A transformer is a passive electrical device that transfers electrical energy between
two or more circuits. A varying current in one coil of the transformer produces a
varying magnetic flux, which, in turn, induces a varying electromotive force across
a second coil wound around the same core. Electrical energy can be transferred
between the two coils, without a metallic connection between the two
circuits. Faraday's law of induction discovered in 1831 described the induced
voltage effect in any coil due to changing magnetic flux encircled by the coil.

Fig 2. 10: 220v to 12v step down transformer.

17
Transformers are used for increasing or decreasing the alternating voltages in
electric power applications, and for coupling the stages of signal processing
circuits.
Basically, transformer are two types.
1. Step up transformer
2. Step down transformer
We have used step down transformer as required for our project. Which is 220v to
9v 600ma step down transformer.

2.13 Diode
A diode is a specialized electronic component with two electrodes called the anode
and the cathode. Most diodes are made with semiconductor materials such as
silicon, germanium, or selenium. Some diodes are comprised of metal electrodes
in a chamber evacuated or filled with a pure elemental gas at low pressure. Here
we used converted AC into DC using a bridge-wave rectifier that consists of
four diodes

Fig 2. 11: Diode

2.14 Full wave rectifier


A Full wave rectifier is a circuit arrangement which makes use of both half cycles
of input alternating current (AC) and converts them to direct current (DC). ... This
arrangement is known as a Bridge Rectifier. It uses the entire AC wave (Both

18
positive and negative sections). Each diode uses 0.7v when conducting and there
are always two diodes conducting.

Fig 2. 12: Full wave rectifier is a circuit diagram

Fig 2. 13: Full wave rectifier wave from

19
2.15 Buck Converter Module
A buck converter (step-down converter) is a DC-to-DC power converter, which
steps down voltage from its input to its output. The basic operation of the buck
converter has the current in an inductor controlled by two switches. In the idealised
converter, all the components are considered to be perfect. Specifically, the switch
and the diode have zero voltage drop when on and zero current flow when off, and
the inductor has zero series resistance. Further, it is assumed that the input and
output voltages do not change over the course of a cycle

Fig 2. 14: DC-DC Buck Converter

20
CHAPTER 3
SYSTEM DESIGN

3.1 Introduction
In this Chapter we are going to Explain about the system Design construction
through Hardware and development of software. In addition, the chapter
elaborates the hardware and the software stage by stage. All the operations of
hardware and software are also included in this chapter.

3.2 Block Diagram

Fig 3. 1: Block Diagram

3.2.1 Block Diagram Description


Arduino is a prototyping platform for controlling many devices. Through Arduino, we
can built many prototypes that we imagine. A basic Arduino kit which forms the
connection between the LCD and different sensor. Here the LCD is the source to
display the output. Through this LCD display we can be able to see the status of the
station that comes.

21
3.3 Circuit Diagram

Fig 3. 2: Circuit Diagram

3.3.1 Working Process of our Circuit


Microcontroller receive signal from optical dust sensor by using analog input (A2, A3).
Temperature, smoke & Humidity sensor is connected to digital pin 2, 7, 8 to detect
Temperature, smoke & Humidity. A LCD is connected to the microcontroller via a
LCD Driver to display Sensor information. Microcontroller Monitor sensor data and
transfer to internet via NodeMCU continuously.

3.4 Arduino software


The smart microcontroller unit named as Arduino Nano can be programmed with
the Arduino software. There is no any requirement for installing other software
rather than Arduino. Firstly, Select "Arduino Nano from the Tools , Board menu
(according to the microcontroller on your board).The IC used named as
ATmega328 on the Arduino Nano comes pre burned with a boot loader that allows
you to upload new code to it without the use of an external hardware programmer.
Programming software of this line follower is known as ARDUINO-1.6.8. This is
open source programming platform. The open-source ARDUINO environment

22
makes it easy to write code and upload it to the input/output board. Here we use
ARDUINO-1.6.8 platform.
To configure software, we have to use ARDUINO -1.6.8 named arduino.exe

Fig 3. 3: Programming platform for ARDUINO

Serial communication
It is used for the communication between Arduino and a computer or other
devices. Every Arduino board has at least one serial port. This ports
communicates thanks to the digital pins 0 (RX) and 1 (TX), and with the
computer thanks to the USB connection.
Serial.begin(speed)
It establishes the speed of data in bits per second (bauds) for the transmission
of data in serial communication.
Serial.read()
It reads the data from the serial port.
Serial.print(val,[format])
It prints the data to the serial port as ASCII text
Serial.println(val,[format])
It prints the data to the serial port as ASCII text but it jumps to a new line.

23
Serial.available()
It gives back the number of available bytes to be read by the serial port. It refers
to data that has already been received and is available in the buffer of the port.

3.5 Project Picture

Fig 3. 4: Project Picture

3.6 Summarization
In this chapter all hardware and software configuration and implementation and
simulation are explained properly. ARDUINO is an open source platform so clear
concept is necessary to work with ARDUINO. After study this chapter concept
will be clear about Arduino Nano and project related all other equipment.

24
CHAPTER 4
RESULT AND DISCUSSION
4.1 Introduction
This chapter contains the results obtained and discussion about the project. We
have also covered discussions about advantages, disadvantages, and limitation of
current version of the protection system

4.2 Results
The Final Project was tested and the following were the obtained results:
 Dust particle of air can be monitor properly
 Temperature and humidity is measured properly
 Air status of can be monitor
 All sensor data displaying using LCD display

Fig 3. 5: Normal Status Fig 3. 6: Temperature Alarm

Fig 3. 7: Smoke Alarm Fig 3. 8: Dust Alarm

25
4.3 Application
This project can be used at
 Roadside pollution Monitoring.
 Industrial Perimeter Monitoring.
 Indoor Air Quality Monitoring.
 To make this data available to the common man.
 To make this data available for Authority.
 Industry
 Garments
 Pharmaceutical
 Laboratory
It also can be used at office or industries for avoiding illegal use of electricity.

4.4 Advantage
 Easy to install
 Fully automated
 No maintenance cost
 No need checker

4.5 Limitation
 The system can monitor only temperature, Humidity, Smoke and Dust.
 Data transfer using NodeMCU is depends on internet connectivity.
 It can monitor environment of a limited area.
 For more area it needs more sensor.

4.6 Discussion
In the proposed model, every parameter is provided with an automated meter with
inbuilt sensor to monitor the data consumed at regular intervals, the Atmega
microcontroller can be employed at supervisor to monitoring and collecting sensor
data from the sensor. sensors send data continuously and microcontroller processes
data. The project has met all the objectives as listed previously. The objective as

26
defined earlier was to Environment Pollution Monitor which is fulfill. Some
excellent features also can be add such as IOT or wireless Environment Pollution
Monitor which may need to add Ethernet or wifi module but it needs internet
connection.

4.7 Cost Estimation


Table 4. 1: Price list of hardware used at Monitoring System

Sl. Parts Name Qty. Unit Price Total Price


1 Arduino Nano 1 800 800
2 NodeMCU 1 500 500
3 Dust Sensor 1 450 450
4 Temp. Sensor 1 130 130
5 Smoke Sensor 1 120 120
Temp. & Humidity
6 1 150 150
Sensor
7 LCD Display 1 250 250
8 Display Driver 1 120 120
9 Jumper Wire 1 100 100
10 Male rail 1 50 50
11 Female Rail 1 50 50
12 Vero Board 1 60 60
13 PVC Board 1 250 250
14 Transformer 1 350 350
15 Buck Converter 1 90 90
16 Others 1 150 150
Total 3,620/-

27
CHAPTER 5
CONCLUSION
5.1 Conclusion
Where pollution has become a major problem around the world, air pollution is
the most dangerous, shocking and severe pollution among other pollutions e.g.
water pollution, soil pollution, noise pollution, light pollution, thermal pollution
etc. Air pollution is the major cause of diseases like asthma, cancer, bronchitis,
birth defects and immune system like diseases. The goal is to make the system as
reasonable as possible so that people from every society background can use this
and if some research organization wants to do further research then if some
nominal amount of money is invested then it would be a great solution to install a
weather station thus air quality monitoring system.

5.2 Future Recommendation


 Oxygen Senor can be used for measuring air oxygen.
 Website or server can be used for store pollution information.
 GSM system can be added to send pollution information sms to authority.

28
References
[1] Tudose, D. Ş., Pătraşcu, N., Voinescu, A., Tataroiu, R., and Ţăpuş, N. , “Mobile
Sensors in Air Pollution Measurement.”, in Positioning Navigation and
Communication (WPNC), IEEE , pp. 166-170, 7 Apr 2011.

[2] TERI. 2015. Air Pollution and Health. Discussion Paper by The Energy and
Resources Institute: New Delhi by Rinki Jain (Associate Fellow,TERI),
KarnikaPalwa (Research Associate, TERI)

[3] João Ramos Maria, João Dias, “Analyses of Indoor Environmental Quality and
Ventilation in a Building of a School of Higher Education in Portugal”, in the
4th Advanced Research in Scientific Areas conference, pp. 273-278, 1 Nov
2015.

[4] Dias, M. J. et al., (2010). “Indoor Air Quality Evaluation in School Buildings
Ventilated by Natural and Mechanical Systems”. Clima pp. R6-TS62-0P02,
Turkey: REHVA. ISBN Code of the CD 978-975-6907-14-6, 2010.

[5] Olesen, B. W., &Brager, G. S., “A Better Way to Predict Comfort: The New
ASHRAE Standard 55-2004”, ASHRAE Journal, pp. 20-26, 8 Aug 2007.

[6] Al-Haija, Q. A., Al-Qadeeb, H., & Al-Lwaimi, A.,“Case study: Monitoring of
air quality in king Faisal University using a microcontroller and WSN”,
Procedia Computer Science, volume 21, pp. 517–521, 31 Dec 2013.

[7] Sricharan, K. S., Shrivasan, M. A., & Kumar, S. S., “An Intelligent Automated
Emission Quality Monitoring System Designed to Test the Vehicles in the
Signal”, in Green Computing, Communication and Conservation of Energy
(ICGCE), International Conference on IEEE , pp. 590-593, 12 Dec 2013.

[8] Zhang, S., & Zhang, H., “A Review of Wireless Sensor Networks and its
Applications”, in Automation and Logistics (ICAL), IEEE International
Conference on pp. 386-389, 15 Aug 2012.

[9] Mahmoudzadeh, B., &Faez, K., “HCTT&R: A Complete Scheme for Object
Tracking and Recovery of Lost Objects in Cluster-Based Wireless Sensor
Networks”, in Telecommunications (IST), Sixth International Symposium
IEEE conference, pp. 691-696, 6 Nov 2012.

[10] Qasem Abu Al-Haija, “Toward Secure Non-Deterministic Distributed


Wireless Sensor Network Using Probabilistic Key Management
Approaches”, Journal of Information Assurance and Security, Vol-6, issue-
1, pp. 10-18, 2010.

29
[11] Polastre, J., Szewczyk, R., Sharp, C., & Culler, D., “The Mote Revolution:
Low Power Wireless Sensor Network Devices”, in Hot Chips, Vol.6, pp. 22-
24, 22 Aug 2004.

[12] Jeffrey M. Sadler, Daniel P. Ames, RohitKhattar, “Open-Hardware Meets


Open Software for Environmental Monitoring”, in International
Environmental Modelling and Software Society (iEMSs) , San Diego, CA,
USA, 2014

[13] Wang, H., Wu, T., & Wu, G., “Air Quality Monitoring System Based on
Frequency Hopping System”, in Intelligent Control and Information
Processing (ICICIP), IEEE Conference, pp. 641-64, Aug 2010.

[14] Raja Vara Prasad Y, Mirza Sami Baig, Rahul K. Mishra, P. Rajalakshmi, U.
B. Desai5 And S.N. Merchant„ “Real Time Wireless Air Pollution
Monitoring System” Ictact Journal On Communication Technology: On
Next Generation Wireless Networks And Applications, Vol. 2, Issue 2, June
2011.

[15] Devarakonda, S., Sevusu, P., Liu, H., Liu, R., Iftode, L., &Nath, B., “Real-
time Air Quality Monitoring Through Mobile Sensing in Metropolitan
Areas”, in Proceedings of the 2nd ACM SIGKDD International Workshop
on Urban Computing, pp. 15, Aug 2013.

[16] Prockop, L. D., &Chichkova, R. I., “Carbon Monoxide Intoxication: an


Updated Review”, Journal of the neurological sciences, Vol. 262, Issue 1,
pp.122-130, 15 Nov 2007.

[17] Buckley, N. A., Isbister, G. K., Stokes, B., &Juurlink, D. N, "Hyperbaric


Oxygen for Carbon Monoxide Poisoning: a Systematic Review and Critical
Analysis of the Evidence", Toxicological Reviews,Vol. 24, Issue 2, pp. 75-
92, 1 Jun 2005

[18] Weaver LK, "Clinical practice. Carbon Monoxide Poisoning". The New
England Journal of Medicine, Vol. 3601, Issue 12,pp. 1217-1225, Mar 2009.

[19] Asmi, A., Putra, J. C. P., &Rahman, I. B. A., “A Study of Indoor Air Quality
of Public Toilet in University's Building”, in Humanities, Science and
Engineering (CHUSER), IEEE Colloquium ,pp. 403-408, 3 Dec 2012.

30
Appendix
Programming Code:

#include <SoftwareSerial.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
SoftwareSerial mySerial(A1,A0);
LiquidCrystal_I2C lcd(0x3F,20,4);
#include <EEPROM.h>
#include <DS18B20.h>
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>

DS18B20 ds(2);
uint8_t address2[] = {40, 250, 31, 218, 4, 0, 0, 52};
uint8_t selected;
int address1 = 1; //Temp Data store
byte scountt=EEPROM.read(address1);;
boolean state = true;
#define DHTPIN 8 // Digital pin connected to the DHT sensor
#define DHTTYPE DHT11 // DHT 11
DHT_Unified dht(DHTPIN, DHTTYPE);

#define Ainc 3 //increase


#define Adec 4 //decrease
#define temp 2 //Temp Sensor
#define smoke 7 //Temp Sensor
#define Exhaust 13 //Fan Relay
#define redLed 6
#define Buzzer 9 //buzzer

31
#define greenLed 5
String cdata; //

int led= A2; // White cable Using A2 pin as digital output Pin
int dust=A3; /////black cable
float voMeasured = 0;
float calcVoltage = 0;
int dustDensity = 0;
int dustlim =300;

void setup() {
Serial.begin(9600);
mySerial.begin(9600);
lcd.init();
lcd.backlight();
lcd.setCursor(4,0);
lcd.print("WELCOME");
pinMode(redLed, OUTPUT);
pinMode(Buzzer, OUTPUT);
pinMode(Exhaust, OUTPUT);
pinMode(Ainc, INPUT_PULLUP);
pinMode(Adec, INPUT_PULLUP);
pinMode(smoke, INPUT);
pinMode(greenLed, OUTPUT);
digitalWrite(redLed, LOW); // Make sure led is off
digitalWrite(Buzzer, LOW);
digitalWrite(Exhaust, HIGH); // Fan is off
analogWrite(greenLed, 8);
pinMode(led,OUTPUT);
dht.begin();
Serial.println(F("DHTxx Unified Sensor Example"));
sensor_t sensor;

32
lcd.clear();
int teme=(ds.getTempC());
lcd.setCursor(0,0);
lcd.print("Temp:");
lcd.print(teme);
lcd.setCursor(14,0);
lcd.print(scountt);
lcd.setCursor(16,0);
lcd.print(".0 C");
}

void loop() {
int smokes=digitalRead(smoke);
Serial.print("! Temperature is ");
Serial.print(ds.getTempC());
Serial.print(" C");
Serial.print(" smoke ");
Serial.println(smokes);
int teme=(ds.getTempC());
lcd.setCursor(0,0);
lcd.print("Temp:");
lcd.print(teme);

if (smokes== 1)
{
lcd.setCursor(0,2);
lcd.print("Smoke: No ");
lcd.setCursor(18,2);
lcd.print(" ");
}

33
if (smokes== 0)
{
lcd.setCursor(0,2);
lcd.print("Smoke: Yes");
lcd.setCursor(18,2);
lcd.print("*E");
}

if (!digitalRead(Ainc) && state){


EEPROM.write(address1, scountt);
Serial.print("Set Temp. Is: ");
Serial.println(scountt);
lcd.setCursor(14,0);
lcd.print(" ");
lcd.setCursor(14,0);
lcd.print(scountt);
lcd.setCursor(16,0);
lcd.print(".0 C");
}
if (digitalRead(Ainc))
{ //digitalWrite(Buzzer, LOW);
state = true;
}

if (!digitalRead(Adec) && state){


EEPROM.write(address1, scountt);
Serial.print("Set Temp. Is: ");
Serial.println(scountt);
lcd.setCursor(14,0);
lcd.print(" ");
lcd.setCursor(14,0);
lcd.print(scountt);

34
lcd.setCursor(16,0);
lcd.print(".0 C");
}

if (digitalRead(Adec))
{
}

sensors_event_t event;
dht.temperature().getEvent(&event);
if (isnan(event.temperature)) {
Serial.println(F("Error reading temperature!"));
}
else {
Serial.print(F("Temperature: "));
Serial.print(event.temperature);
Serial.println(F("°C"));
}

// Get humidity event and print its value.


dht.humidity().getEvent(&event);
if (isnan(event.relative_humidity)) {
Serial.println(F("Error reading humidity!"));
}
else {
Serial.print(F("Humidity: "));
Serial.print(event.relative_humidity);
Serial.println(F("%"));
lcd.setCursor(0,1);

35
lcd.print("Humidity:");
lcd.setCursor(9,1);
lcd.print(event.relative_humidity);
lcd.setCursor(11,1);
lcd.print(" % ");
}

int totalVoltage = 0;
for(int i=0;i<10;i++)
{
digitalWrite(led,LOW);
delayMicroseconds(280);
totalVoltage += analogRead(dust);
Serial.println(totalVoltage);
delayMicroseconds(10);
digitalWrite(led,HIGH);
delay(100);

}
Serial.print(totalVoltage);
voMeasured = totalVoltage/10.0;
calcVoltage = voMeasured/1024.0 * 5.0;
Serial.println(calcVoltage);
dustDensity = (170* calcVoltage -0.1);
//lcd.clear();
lcd.setCursor(0,3);
lcd.print("Dust :");
lcd.setCursor(6,3);
lcd.print(dustDensity);
lcd.print(" ug/m^3 ");
Serial.print("Dust Density:");
Serial.print(dustDensity);

36
Serial.println("ug/m^3");
sdata4 = (dustDensity);

if (dustDensity<dustlim)
{
lcd.setCursor(18,3);
lcd.print(" ");
}

if (dustDensity>dustlim)
{
lcd.setCursor(18,3);
lcd.print("*E");
}

///////////////////////////// ALARM //////////////////////////////////


if (teme>scountt || dustDensity>dustlim || smokes== 0)
{
digitalWrite(redLed, HIGH); // Make led is on
analogWrite(greenLed, LOW);
digitalWrite(Buzzer, HIGH);
lcd.setCursor(16,0);
lcd.print(".0 C");
}

if (teme<scountt && dustDensity<dustlim && smokes== 1)


{
digitalWrite(redLed, LOW); // Make led is off
analogWrite(greenLed, HIGH);
digitalWrite(Buzzer, LOW);
lcd.setCursor(16,0);
lcd.print(".0 C");

37
}

if (teme<scountt)
{
lcd.setCursor(11,0);
lcd.print(" ");
}

if (teme>scountt)
{
lcd.setCursor(11,0);
lcd.print("*E");
}
delay(10);
}

38

You might also like