Batch 08 PDF
Batch 08 PDF
ON
BACHELOR OF TECHNOLOGY
IN
ELECTRONICS AND COMMUNICATION ENGINEERING
BY
A. BHAVYA SREE - 209L1A0404
G. LAHARI - 209L1A0438
CERTIFICATE
This is to certify that the project report entitled “IOT BASED AIR QUALITY
MONITORING ANDALERTING SYSTEM” is a bonafide work carried out by
A. BHAVYA SREE - 209L1A0404
G. LAHARI - 209L1A0438
Viva-voice conducted on
DECLARATION
We hereby declare that the project report work entitled “IOT BASED AIR QUALITY
MONITORING AND ALERTING SYSTEM” is entirely our original work carried out under
the guidance of Mrs. P. SANDHYA RANI, Assistant Professor Department of Electronics and
Communication Engineering, Siddartha Educational Academy Group Of Institutions, C.
Gollapalli, Tirupati, Affiliated to JNTUA, Anantapuramu, for the award of the Degree of
BACHELOR OF TECHNOLOGY with the specialization in ELECTRONICS AND
COMMUNICATION ENGINEERING. The project report has not been submitted in a part or
full for the award of any degree of diploma of this or any other university or institutions.
G. LAHARI -209L1A0438
ACKNOWLEDGEMENT
All endeavours over a long period can be successful only with the advice and
support of many well-wishers. We take this opportunity to express our gratitude and
appreciation to all of them.
We wish to express deep sense of gratitude to our beloved and respected guide
Mrs. P. SANDHYA RANI, Assistant Professor Department of Electronics and
Communication Engineering, Siddartha Educational Academy Group of Institutions,
Tirupati, for her valuable guidance, given to us for the successful completion of work.
Our sincere thanks to Mr. P.SAI PRASAD, Head, Department of Electronics and
Communication Engineering for his valuable advice, guidance and encouragement given
to us for the successful completion of work.
We extend sincere thanks to the Dr. K. RAJASEKHAR, Principal for his kind
co-operation in completing and making the project a success.
We would like to thank the Management for their kind co-operation and for
providing infrastructure facilities.
We extend our thanks to all the Teaching staff and non-teaching staff of the
Department of Electronics and Communication Engineering for their support and
encouragement during the course of our project work.
We also thank our parents for being helpful in many ways in successful
completion of our work. Finally, we thank all these who helped us directly or indirectly
in successful completion of this project work.
G. LAHARI -209L1A0438
ABSTRACT
Monitoring System in which we will monitor the Air Quality over a web server using
internet and will trigger an alarm when the air quality goes down beyond a certain
level, means when there are sufficient amount of harmful gases are present in the air
like CO2, smoke, alcohol, benzene and NH3. It will show the air quality in PPM on
the LCD and as well as on webpage so that we can monitor it very easily. Previously
we have built the LPG detector using MQ6 sensor and Smoke detector using MQ2
sensor but this time we have used MQ135 sensor which is the best choice for
monitoring Air Quality index as it can detects most harmful gases and can measure
their amount accurately. In this IOT project, you can monitor the pollution level from
anywhere using your computer or mobile. We can install this system anywhere and
can also trigger some device when pollution goes beyond some level, like we can
switch on the Exhaust fan or can send alert to the user using Buzzer.
i
INDEX
CERTIFICATION
DECLARATION
ACKNOWLEDGEMENT
i
ABSTRACT
ii
CONTENTS
v
LIST OF FIGURES
vii
LIST OF TABLES
viii
LIST OF ACRONYMS
1.1 Introduction 2
1.2 Aim of the project 2
1.3 Proposed Methodology 5
ii
CHAPTER 3 ARDUINO UNO (12-21)
3.1 Introduction 13
3.2 Arduino UNO Microcontroller 13
3.3 Arduino uno board 16
5.8 DHT11 57
iii
6.3 How to get started 62
6.4 Advantages of IOT 64
6.5 Applications of IOT 65
6.6 Buzzer 65
8.1 Conclusion 73
8.2 Future Scope 73
REFERENCES 75
iv
LIST OF FIGURES
5.2 Transformers 36
v
5.10 Variable resistor 42
vi
LIST OF TABLES
vii
LIST OF ACRONYMS
Symbol Name
API APPLICATION PROGRAMMING INTERFACE
ONLYMEMORY
GND GROUND
PORT0
P0
PORT1
P1
PORT2
P2
PORT3
P3
PULSE WIDTH MODULATION
PWM
RAM RANDOM ACCESS MEMORY
viii
ROM READ ONLY MEMORY
ix
IOT BASED AIR QUALITY MONITORING AND ALERTING SYSTEM
CHAPTER – 1
INTRODUCTION
1.1. INTRODUCTION
The causes of pollution measure carbon dioxide gas, carbon monoxide gas,
pollutant, Particulate Matter, Ground Level gas. The Internet of things permits objects to
be detected or in dominant. Things in the IoT refers to the creation of devices like vehicles
with intrinsic sensors, etc. Development of pollution observance system will facilitate to
control and live pollution connected parameters.
Variety of the ways that to controls pollution parameters measure. We have a tendency
to measure reaching to implement pollution detection in vehicles if pollution is high or
low owing to combustion of fuel in vehicle. We tend to measure reaching to build it up
and implement it using Node MCU and different elements. This methodology is
becoming more and more important in pollution detection in vehicles. The Vehicles end
up carbonic acid gas (CO2), monoxide gas (CO).
We tend to activity pattern electronic text Transfer protocol (HTTP) for act and
transferring data and to boot assures. Here to make an IOT Based Air Pollution
Monitoring System in which we will monitor the Air quality over a web server using
internet and will trigger an alarm when the air quality goes down beyond a certain level,
means when there are sufficient number of harmful gases are present in the 1 air like
CO2, smoke, alcohol benzene and NH3. It will show the air quality in PPM on the LCD
and as well as on webpage so that we can monitor it very easily.
Air pollution occurs when harmful substances including particulates and biological
molecules are introduced into Earth’s atmosphere. The levels of the gases and the
temperature is displayed in an LCD display panel, which continuously shows the real
time output values of the gas sensors, temperature and humidity sensor which will help
Literature Review:
Monika Singh Et al. in August 2019 proposed an Air Pollution Monitoring System.
This system uses an Arduino microcontroller connected with MQ135 and MQ6 gas
sensor which senses the different types of gases present in the environment. It was then
connected to the Wi-Fi module which connects to the internet and LCD is used to display
the output to the user and buzzer alerts when the ppm crosses certain limit. Their
applications were industrial perimeter monitoring, indoor air quality monitoring, site
selection for reference monitoring stations, making data available to users Yamuna
Thangam in November 2018 used IoT by measuring the concentration of gas using
various sensors which were observed through serial monitor of Arduino. This data is
collected in Thing speak channels by means of Ethernet shield which is available in live
for further processing. These analysed results were viewed through thing speak in a
graphical format. Then the average pollution level was calculated using MATLAB
analysis and the time-controlled results were viewed through an android app. Further
based on the location, the air quality index value was obtained through the android app.
Along with this, the health effects were also displayed in this app, so that the users can
stay aware of the pollution levels.
and constructed to evaluate the performance of the sensor node. The sensor node was
tested by placing it inside the incubator; pumping gas into the incubator and observing
the measurements taken by the sensor node. The base station comprises a sink node
serially connected to a computer which runs the GUI software. The sink or receiving node
captures the data transmitted by the remote sensor node and serially forwards it to the
computer. The data was then plotted on the GUI and stored in text files.
Nitin Sadashiv Desai Et al. in 2017 proposed a system that consists of Beagle bone
Interfaced with air pollution measure sensors such as carbon dioxide [CO2], carbon
monoxide [CO] and noise sensor. Analog output from sensor was read from Analog Pin
of Beagle bone black which reads the input signal in the range 0 v to 1.8v. Data from
sensor was uploaded on Azure Cloud with the help of python SQL. Reserved data base
was created in the beagle bone itself in the form of .CSV file. At the end of each day,
same data present in the .CSV file is uploaded in the cloud data base. Old data in the
beagle bone have been deleted with the help of automated shell script. Data from different
sensor was stored in the Azure data base. This data from database has been fetched as
input for machine learning service. Machine learning service was used to train the module
with the help of previous data. Power BI have been used to represent sensor data fetched
by beagle bone black.
Harsh Gupta Et al.in 2019 presented an IOT based Air Pollution Monitoring System
which consists of sensors that were to constantly monitor the Temperature, Humidity,
Carbon Monoxide, Smoke, LPG, PM2.5 and PM10 levels in the atmosphere. In their
work, a one-way communication between Thing Speak, an open-source cloud platform,
and an Android Application has been developed. Raspberry Pi has been used as a gateway
to interface the hardware system. Once the firebase API was included in Android or iOS
App, firebase features like Analytics, Authentication, Storage, Messaging, Hosting,
Crash reporting, Real-time Database etc. were used. The Graphs were plotted in Thing
Speak according to the sensors data received and the same were visualized in an Android
App in a tabular format. Rajat Sankhe Et al. in 2017 used carbon sensor for sensing the
pollutants or the carbon particles in the air and it also detects the level of pollutants in air
and gives the output in form of analogy signal. The microcontroller takes input in digital
form, so ADC was used to convert the analogy output of the sensor into digital form and
gives it as input to the micro controller. These values are continuously displayed on the
LCD. A switch pad was used for entering the critical value. If the value of pollutants in
air exceeds the critical value entered, then the buzzer beeps and also a notification will be
sent to the webpage on the mobile phone by the micro controller through the GPRS
module. This information is continuously being updated on the webpage which can be
accessed globally. A notification was also received on the webpage when the level of
pollutants rises above critical value. Mobile phone receives the signal from modem which
it forward to server to the internet. Server analysis of the data received from the
smartphone. It concludes the output from the data received and sends the output over the
internet. Poonam Pal Et al. in October 2017 developed a system to monitor the air using
an Arduino microcontroller. They used MQ135 gas sensor to sense the different types of
dangerous gas and Arduino to control the entire process. MQ135 gas sensor gives the
output in the form of voltage levels and needs to be converted into PPM. A Wi-Fi module
was used to connect the whole process to the internet and LCD was used for the visual
output. When the value is less than 1000 PPM, the LCD and webpage will display “Fresh
Air” and when the PPM exceeds the limit then the buzzer starts beeping and the LCD and
webpage will display “Poor Air, Open Windows”. If it will increase 2000 then the buzzer
will keep beeping and the LCD and webpage will display “Danger! Move to fresh Air”.
The methodology required for quantifying the health effects of air pollution is
derived from the WHO. Study of joint initiative from the Health Research Council, the
Ministry for the Environment and the Ministry of Transport (Fisher et al, 2007). This
study represents the most comprehensive analysis of air pollution, its health implications,
and the resulting societal costs conducted in New Zealand. The research evaluated the
effects of specific source and categories of emissions from vehicles (including private
petrol cars, diesel cars, and diesel trucks), industry, domestic and total sources in New
Zealand. The research encompassed five interconnected components: 1. Air quality,
meteorology and emissions data analysis 2. Air pollution exposure assessment 3. Health
impact assessment 3 4. Economic impact assessment 5.
Preventative policy assessment.
BLOCK DIAGRAM
Supply
MQ2
Buzzer
MQ3
IoT
CHAPTER 2
EMBEDDED SYSTEMS
storage, with the application and operating system both part of a single program. The
program is written permanently into the system's memory in this case, rather than being
loaded into RAM (random access memory), as programs on a personal computer.
(8080,8086, 80286, 80386, 80486, and the Pentium) or Motorola's 680X0 family (68000,
68010, 68020, 68030, 68040, etc.). These microprocessors contain no RAM, no ROM,
and no I/O ports on the chip itself. For this reason, they are commonly referred to as
general-purpose Microprocessors.
CHAPTER 3
ARDUINO UNO
3.1. INTRODUCTION
Microcontroller as the name suggests, a small controller. They are like single chip
computers that are often embedded into other systems to function as
processing/controlling units. For example, the control you are using probably has
microcontrollers inside that do decoding and other controlling functions. They are also
used in automobiles, washing machines, microwaves ovens, toys…. etc., where
automation is needed.
The Uno differs from all preceding boards in that it does not use the FTDI USB-
to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2)
programmed as a USB-to-serial converters.
Technical Specifications:
1. USB Interface:
Arduino board can be powered by using the USB cable from your computer. All
you need to do is connect the USB cable to the USB connection
2. External power supply:
Arduino boards can be powered directly from the AC mains power supply by
connecting it to the power supply (Barrel Jack)
3. Voltage Regulator:
The function of the voltage regulator is to control the voltage given to the Arduino
board and stabilize the DC voltages used by the processor and other elements.
4. Crystal Oscillator:
The crystal oscillator helps Arduino in dealing with time issues. How does
Arduino calculate time? The answer is, by using the crystal oscillator. The number printed
on top of the Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000
Hertz or 16 MHz’s
5-17. Arduino Reset:
It can reset your Arduino board, i.e., start your program from the beginning. It can
reset the UNO board in two ways. First, by using the reset button (17) on the board.
Second, you can connect an external reset button to the Arduino pin labelled RESET (5).
6-9. Pins (3.3, 5, GND, Vin):
• 3.3V (6): Supply 3.3 output volt
• 5V (7): Supply 5 output volt
• Most of the components used with Arduino board works fine with 3.3 volt
and 5 volts.
• GND (8) (Ground): There are several GND pins on the Arduino, any of which can
be used to ground your circuit.
• Vin (9): This pin also can be used to power the Arduino board from an
external power source, like AC mains power supply.
Pin Description:
VCC: Digital supply voltage.
GND: Ground.
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected
for each bit). The Port B output buffers have symmetrical drive characteristics with both
high sink and source capability. As inputs, Port B pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port B pins are tri-stated when a
reset condition becomes active, even if the clock is not running.
Depending on the clock selection fuse settings, PB6 can be used as input to the
inverting Oscillator amplifier and input to the internal clock operating circuit.
Depending on the clock selection fuse settings, PB7 can be used as output from
the inverting Oscillator amplifier.
If the Internal Calibrated RC Oscillator is used as chip clock source, PB [7:6] is
used as TOSC [2:1] input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR
is set.
Port C (PC [5:0]):
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The PC [5:0] output buffers have symmetrical drive characteristics with both
high sink and source capability. As inputs,
Port C pins that are externally pulled low will source current if the pull-up resistors
are activated. The Port C pins are tri-stated when a reset condition becomes active, even
if the clock is not running.
PC6/RESET:
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the
electrical characteristics of PC6 differ from those of the other pins of Port C.
If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low
level on this pin for longer than the minimum pulse length will generate a Reset, even if
the clock is not running. Shorter pulses are not guaranteed to generate a Reset.
Port D (PD [7:0]):
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected
for each bit). The Port D output buffers have symmetrical drive characteristics with both
high sink and source capability. As inputs, Port D pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port D pins are tri-stated when a
CHAPTER 4
SOFTWARE
• Arduino boards can read analog or digital input signals from different sensors and turn
it into an output such as activating a motor, turning LED on/off, connect to the cloud
and many other actions.
• You can control your board functions by sending a set of instructions to the
microcontroller on the board via Arduino IDE (referred to as uploading software).
• Unlike most previous programmable circuit boards, Arduino does not need an extra
piece of hardware (called a programmer) in order to load a new code onto the board.
You can simply use a USB cable.
• Additionally, the Arduino IDE uses a simplified version of C++, making it easier to
learn to program.
• Finally, Arduino provides a standard form factor that breaks the functions of the micro-
controller into a more accessible package.
After learning about the main parts of the Arduino UNO board, we are ready to learn
how to set up the Arduino IDE. Once we learn this, we will be ready to upload our
program on the Arduino board.
4.2. Arduino data types:
Data types in C refers to an extensive system used for declaring variables or
functions of different types. The type of a variable determines how much space it occupies
in the storage and how the bit pattern stored is interpreted.
The following table provides all the data types that you will use during Arduino
programming.
Void:
The void keyword is used only in function declarations. It indicates that the
function is expected to return no information to the function from which it was called.
Example:
Void Loop ()
{
// rest of the code
}
Boolean:
A Boolean holds one of two values, true or false. Each Boolean variable occupies
one byte of memory.
Example:
Boolean state= false; // declaration of variable with type Boolean and initialize it
with false.
Boolean state = true; // declaration of variable with type Boolean and initialize it
with false.
Char: A data type that takes up one byte of memory that stores a character value.
Character literals are written in single quotes like this: 'A' and for multiple characters,
strings use double quotes: "ABC".
However, characters are stored as numbers. You can see the specific encoding in
the ASCII chart. This means that it is possible to do arithmetic operations on characters,
in which the ASCII value of the character is used. For example, 'A' + 1 has the value 66,
since the ASCII value of the capital letter A is 65.
Example:
Char chr_a = ‘a’ ;//declaration of variable with type char and initialize it with
character a.
Char chr_c = 97 ;//declaration of variable with type char and initialize it with
character 97
Unsigned char:
An unsigned char is an unsigned data type that occupies one byte of memory.
The unsigned char data type encodes numbers from 0 to 255.
Example:
Unsigned Char chr_y = 121; // declaration of variable with type Unsigned char
and initialize it with character y
Byte:
A byte stores an 8-bit unsigned number, from 0 to 255.
Example:
byte m = 25 ;//declaration of variable with type byte and initialize it with 25
int:
Integers are the primary datatype for number storage. int stores a 16-bit (2-byte)
value. This yields a range of -32,768 to 32,767 (minimum value of -2^15 and a maximum
value of (2^15) - 1).
The int size varies from board to board. On the Arduino Due, for example, an int
stores a 32-bit (4-byte) value. This yields a range of -2,147,483,648 to 2,147,483,647
(minimum value of -2^31 and a maximum value of (2^31) - 1).
Example:
int counter = 32 ;// declaration of variable with type int and initialize it with 32.
Unsigned int:
Unsigned int (unsigned integers) are the same as int in the way that they store a
2-byte value. Instead of storing negative numbers, however, they only store positive
values, yielding a useful range of 0 to 65,535 (2^16) - 1). The Due stores a 4-byte (32-
bit) value, ranging from 0 to 4,294,967,295 (2^32 - 1).
Example:
Unsigned int counter= 60; // declaration of variable with type unsigned int and
initialize it with 60.
Word:
On the Uno and other ATMEGA based boards, a word stores a 16-bit unsigned
number. On Due and Zero, it stores a 32-bit unsigned number.
Example
word w = 1000 ;//declaration of variable with type word and initialize it with 1000.
Long:
Long variables are extended size variables for number storage, and store 32 bits
Example:
double num = 45.352 ;// declaration of variable with type double and initialize it
with 45.352.
In this section, we will learn in easy steps, how to set up the Arduino IDE on our
computer and prepare the board to receive the program via USB cable.
Step 1: First you must have your Arduino board (you can choose your favorite board)
and a USB cable. In case you use Arduino UNO, Arduino Duemilanove, Nano, Arduino
Mega2560, or Decimal, you will need a standard USB cable (A plug to B plug), the kind
you would connect to a USB printer as shown in the following image.
To open an existing project example, select File -> Example -> Basics -> Blink.
Here, we are selecting just one of the examples with the name Blink. It turns the
LED on and off with some time delay. You can select any other example from the list.
Here, we have selected Arduino Uno board according to our tutorial, but you must
select the name matching the board that you are using.
Step 8: Upload the program to your board. Before explaining how we can upload our
program to the board, we must demonstrate the function of each symbol appearing in the
Arduino IDE toolbar.
Arduino programs can be divided into three main parts: Structure, Values
(variables and constants), and Functions. In this tutorial, we will learn about the Arduino
software program, step by step, and how we can write the program without any syntax or
compilation error.
Let us start with the Structure. Software structure consist of two main functions:
• Setup() function
• Loop() function
PURPOSE:
The setup () function is called when a sketch starts. Use it to initialize the
variables, pin modes, start using libraries, etc. The setup function will only run once, after
each power up or reset of the Arduino board.
PURPOSE:
After creating a setup () function, which initializes and sets the initial values, the
loop () function does precisely what its name suggests, and loops seductively, allowing
your program to change and respond. Use it to actively control the Arduino board.
CHAPTER 5
HARDWARE
Diodes: Diodes allow electricity to flow in only one direction. The arrow of the circuit
symbol shows the direction in which the current can flow. Diodes are the electrical
version of a valve, and early diodes were called valves.
A diode is a device which only allows current to flow through it in one direction. In this
direction, the diode is said to be 'forward biased' and the only effect on the signal is that
there will be a voltage loss of around 0.7V. In the opposite direction, the diode is said to
be 'reverse-biased' and no current will flow through it.
5.2. RECTIFIER
There are two different rectification circuits, known as 'half-wave' and 'full wave'
rectifiers. Both use components called diodes to convert AC into DC.
The Half-wave Rectifier
The half-wave rectifier is the simplest type of rectifier since it only uses one diode, as
shown in figure.
Figure 2 shows the AC input waveform to this circuit and the resulting output. As you
can see, when the AC input is positive, the diode is forward-biased and lets the current
through. When the AC input is negative, the diode is reverse-biased and the diode does
not let any current through, meaning the output is 0V. Because there is a 0.7V voltage
loss across the diode, the peak output voltage will be 0.7V less than Vs.
While the output of the half-wave rectifier is DC (it is all positive), it would not be
suitable as a power supply for a circuit. Firstly, the output voltage continually varies
between 0V and Vs-0.7V, and secondly, for half the time there is no output at all.
The Full-wave Bridge Rectifier
The circuit in figure 3 addresses the second of these problems since at no time is the
output voltage 0V. This time four diodes are arranged so that both the positive and
negative parts of the AC waveform are converted to DC. The resulting waveform is
shown in figure 4.
When the AC input is positive, diodes A and B are forward-biased, while diodes C
and D are reverse-biased. When the AC input is negative, the opposite is true - diodes C
and D are forward-biased, while diodes A and B are reverse-biased.
While the full-wave rectifier is an improvement on the half-wave rectifier, its output
still isn't suitable as a power supply for most circuits since the output voltage still varies
between 0V and Vs-1.4V. So, if you put 12V AC in, you will 10.6V DC out.
A liquid crystal display (LCD) is a thin, flat display device made up of any
number of color or monochrome pixels arrayed in front of a light source or reflector.
Each pixel consists of a column of liquid crystal molecules suspended between two
transparent electrodes, and two polarizing filters, the axes of polarity of which are
perpendicular to each other.
Without the liquid crystals between them, light passing through one would be
blocked by the other. The liquid crystal twists the polarization of light entering one filter
USES
LCD is used exclusively in watches, calculators and measuring instruments. It is
simple seven-segment display, having a limited amount of numeric data. The recent
advances in technology have resulted in better legibility, more information displaying
capability and a wider temperature range. These have resulted in the LCD s being
extensively used in telecommunications and entertainment electronics. The LCD s has
even started replacing the cathode ray tubes (CRTs) used for the display of text and
graphics, and in small TV applications
LCD PIN DIAGRAM
CONTROL LINES:
EN:
Line is called "Enable." This control line is used to tell the LCD that you are
sending it data. To send data to the LCD, your program should make sure this line is low
(0) and then set the other two control lines and/or put data on the data bus. When the
other lines are completely ready, bring EN high (1) and wait for the minimum amount of
time required by the LCD datasheet (this varies from LCD to LCD), and end by bringing
it low (0) again.
RS: Line is the "Register Select" line. When RS is low (0), the data is to be treated as
a command or special instruction (such as clear screen, position cursor, etc.). When RS
is high (1), the data being sent is text data which should be displayed on the screen.
RW:
Line is the "Read/Write" control line. When RW is low (0), the information on
the data bus is written to the LCD. When RW is high (1), the program is effectively
querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read
command. All others are writing commands, so RW will almost always be low.
▪ LOGIC STATUS ON CONTROL LINES
▪ CONTRAST CONTROL
To have a clear view of the characters on the LCD, contrast should be adjusted. To
adjust the contrast, the voltage should be varied. For this, a preset is used which can
behave like a variable voltage device. As the voltage of this preset is varied, the contrast
of the LCD can be adjusted.
5.4. POTENTIOMETER
Variable resistors used as potentiometers have all three terminals connected. This
arrangement is normally used to vary voltage, for example to set the switching point of
a circuit with a sensor or control the volume (loudness) in an amplifier circuit. If the
terminals at the ends of the track are connected across the power supply, then the wiper
terminal will provide a voltage which can be varied from zero up to the maximum of the
supply.
▪ It is also defined as any device that converts a signal from one form to another.
▪ Gas sensor measures the concentration of gas in its vicinity. Gas sensor interacts with
a gas to measure its concentration. Each gas has a unique breakdown voltage i.e. the
electric field at which it is ionized. Sensor identifies gases by measuring these
voltages. The concentration of the gas can be determined by measuring the current
discharge in the device.
Applications:
▪ Environmental monitoring.
▪ Boiler control.
▪ Fire detection.
▪ Home safety.
Types:
Metal Oxide Based Gas Sensors
▪ The gas-solid interactions affect the resistance of the film because of the density of
electronic species in the film.
▪ The simple theory behind it is if the dielectric constant of the film is lower than that
of the analyte, the capacitance will increase and vice versa.
▪ To launch the acoustic waves, this type of sensor uses piezoelectric material either
in the thin film form or in bulk form which has one or more transducers on its surface.
▪ Mostly the sensor will not sound an alarm at lower concentrations (e.g. 100 ppm).
The alarm will sound within a few minutes at 400 ppm. So, the function is specific
to concentration-time. Figure shows simple carbon monoxide sensor.
▪ Electrochemical sensor
▪ Digital sensor
▪ Biome
The MQ3 alcohol sensor is one of the series of MQ gas sensors, which can detect
and monitor the alcohol gas present in the atmosphere. It is capable of detecting 25-
500ppm alcohol gas concentration in the air. This article gives a brief description of the
pin configuration, specifications, and Arduino interfacing of the MQ3 alcohol sensor. The
alternatives of MQ3 alcohol sensors are MQ138 (benzene, hydrogen, alcohol, propane,
toluene, formaldehyde gas), MQ303A (ethanol, smoke, and alcohol), MQ2(methane,
smoke, LPG, butane), MQ214 (methane), MQ5 (natural gas and LPG), and MQ306A
(LPG and butane).
The MQ3 alcohol gas sensor is a module used for detecting alcohol, CH4, benzene,
gasoline, hexane, CO, and LPG. It has a sensitive material SnO2 for alcohol gas detection,
with lower electrical conductivity in the fresh air. It is a semiconductor alcohol gas sensor
that detects or monitors the presence or absence of alcohol. It is also known
as chemiresistors because sensing of the sensitive material depends on the resistance
change when the sensor is exposed to alcohol gas.
When the sensor is pointed closer to the alcohol gas, the SnO2 conductivity increases.
The increase in sensor conductivity is directly proportional to the alcohol concentration.
Therefore, the alcohol concentration is measured by any microcontroller very easily. The
MQ3 alcohol gas sensor is very fast and has a high sensitivity to alcohol, smoke, and
gasoline. An Alcohol detector can be made using this alcohol sensor.
The concentration of alcohol gas sensing range in fresh air or atmosphere by the
MQ3 sensor is 0.04mg/L-4 mg/L, which is acceptable for breathalyzers. It consumes 150
mA and operates with a 5V power supply at -10°C to 50°C temperature.
The configuration and structure of the MQ3 alcohol sensor are shown in the
figure below. It consists of 2 H-pins for supply and ground connection, 2 A-pins
connected to the power supply, and 2 B-pins for output and ground connection. Since A-
pins and B-pins can be interchanged.
Inside the MQ3 alcohol gas sensor, the resistance over A and B varies based on the
alcohol detection. As the level of alcohol concentration detection increases, the resistance
of the sensor decreases.The MQ3 alcohol gas sensor consists of an AL2O3 micro-ceramic
tube, a sensitive layer of tin dioxide (SnO2), a measuring electrode, and a heater attached
to a grid made of stainless steel and plastic. The heater is necessary for providing the
required conditions for the operation of sensitive components. The MQ-3 alcohol gas
sensor has 6-pin, of which 4-pins are used to extract the signal and 2-pins are used to
provide the heating current.
This alcohol sensor can generate an analogue output from the Ao pin (ranging from
0-5V) relating to the available alcohol gas concentration, otherwise use the built-
in/onboard potentiometer to get a digital output (0 or 1) from the Do pin (Do LED is used
to monitor the presence of alcohol gas concentration) for a specific gas concentration.
The MQ3 alcohol sensor comes in a 4-pin gas sensor module. The pin configuration/pin
diagram is shown in the figure below.
VCC: This pin refers to the positive power supply. To power up the sensor, the 5V
positive supply is connected to this pin.
Digital Output (Do): This pin generates the digital output signal by varying threshold
limits with the help ofan onboard potentiometer. This pin is to represent the digital output
as 0 or 1 based on the alcohol gas present in the air.
Analog Output (Ao): This pin generates an analogue output signal in the range of 0V to
5V and it depends on the alcohol gas intensity.
Technical Specifications:
Now, let’s have a look at how to interface the MQ3 alcohol sensor with
the Arduino UNO. In this case, the analogue output pin of the MQ3 sensor is used for
proper sensor calibration. The circuit diagram/how to use the MQ3 alcohol sensor with
the Arduino is shown in the figure below. The components required are;
• Arduino UNO.
• MQ3 alcohol sensor.
• 5V positive power supply.
• Connecting wires.
• Serial monitor to upload the Arduino code and observe the output.
Connect the MQ3 Sensor to Arduino UNO as per the above diagram.
The 5V operating voltage terminal of the Arduino is connected to the VCC pin of the
MQ3 alcohol sensor. The analogue output pin of the sensor is connected to the Ao pin of
the Arduino board. Note that an analogue output pin is used, and the digital output pin of
the sensor is left. The GND pin of the MQ3 sensor is connected to the GND pin of the
Arduino.
Calibrate the sensor and set the threshold value by using an in-built potentiometer to
detect and monitor alcohol concentration. Similar to the above way MQ3 Alcohol sensor
can also be interfaced with the other microcontroller.
Upload the Arduino code below in Arduino IDE to observe the analogue output of the
sensor.
To upload the Arduino code, select the Arduino board from the tools board and COM
port, to which the Arduino is connected from the tools.
#define analog pin0 (A0 pin of Arduino connected to the analog output pin of MQ3
sensor)
Float sensor value; (defines the sensor value to save the analog output of sensor)
Void setup () {
Delay (120000); //2 min warmup time (delay of 2 min to preheat the sensor for
operation at required temperature)
Void loop ()
Delay (2000); (This process is repeated, and the output is displayed on the serial
monitoring every second)
Applications:
5.8. DHT11
The DHT11 is a commonly used Temperature and humidity sensor that comes
with a dedicated NTC to measure temperature and an 8 -bit microcontroller to output the
values of temperature and humidity as serial data.
DHT11 Specifications:
The DHT11 is a commonly used Temperature and humidity sensor. The sensor
comes with a dedicated NTC to measure temperature and an 8 -bit microcontroller to
output the values of temperature and humidity as serial data. The sensor is also factory
calibrated and hence easy to interface with other microcontrollers.
The sensor can measure temperature from 0°C to 50°C and humidity from 20% to 90%
with an accuracy of ±1°C and ±1%. So, if you are looking to measure in this range then
this sensor might be the right choice for you.
CHAPTER 6
Internet Of Things
6.1. INTRODUCTION
What Is the Internet of Things (IoT)
The Internet of Things may be a hot topic in the industry but it’s not a new
concept. In the early 2000’s, Kevin Ashton was laying the groundwork for what would
become the Internet of Things (IoT) at MIT’s Auto ID lab. Ashton was one of the pioneers
who conceived this notion as he searched for ways that Proctor & Gamble could improve
its business by linking RFID information to the Internet. The concept was simple but
powerful. If all objects in daily life were equipped with identifiers and wireless
connectivity, these objects could be communicated with each other and be managed by
computers. In a 1999 article for the RFID Journal Ashton wrote:
“If we had computers that knew everything there was to know about things—
using data they gathered without any help from us -- we would be able to track and count
everything, and greatly reduce waste, loss and cost. We would know when things needed
replacing, repairing or recalling, and whether they were fresh or past their best. We need
to empower computers with their own means of gathering information, so they can see,
hear and smell the world for themselves, in all its random glory. RFID and sensor
technology enable computers to observe, identify and understand the world—without the
limitations of human-entered data.”
At the time, this vision required major technological improvements. After all, how
would we connect everything on the planet? What type of wireless communications could
be built into devices? What changes would need to be made to the existing Internet
infrastructure to support billions of new communication devices? What would power
these devices? What must be developed to make the solutions cost effective? There were
more questions than answers to the IoT concepts in 1999.
Today, many of these obstacles have been solved. The size and cost of wireless
radios has dropped tremendously. IPv6 allows us to assign a communications address to
billions of devices. Electronics companies are building Wi-Fi and cellular wireless
connectivity into a wide range of devices. ABI Research estimates over five billion
wireless chips will ship in 2013.2. Mobile data coverage has improved significantly with
many networks offering broadband speeds. While not perfect, battery technology has
improved, and solar recharging has been built into numerous devices. There will be
billions of objects connecting to the network within the next several years. For example,
Cisco’s Internet of Things Group (IOTG) predicts there will be over 50 billion connected
devices by 2020.
IoT describes a system where items in the physical world, and sensors within or
attached to these items, are connected to the Internet via wireless and wired Internet
connections. These sensors can use various types of local area connections such as RFID,
NFC, Wi-Fi, Bluetooth, and Zigbee. Sensors can also have wide area connectivity such
as GSM, GPRS, 3G, and LTE. The Internet of Things will:
• Connect both inanimate and living things: Early trials and deployments of Internet
of Things networks began with connecting industrial equipment. Today, the vision of IoT
has expanded to connect everything from industrial equipment to everyday objects. The
types of items range from gas turbines to automobiles to utility meters. It can also include
living organisms such as plants, farm animals and people. For example, the Cow Tracking
Project in Essex uses data collected from radio positioning tags to monitor cows for illness
and track behavior in the herd. Wearable computing and digital health devices, such as
Nike+ Fuel band and Fitbit, are examples of how people are connecting on the Internet
of Things landscape. Cisco has expanded the definition of IoT to the Internet of
Everything (IoE), which includes people, places, objects and things. Basically, anything
you can attach to a sensor and connectivity can participate in the new connected
ecosystems.
• Use sensors for data collection:
The physical objects that are being connected will possess one or more sensors. Each
sensor will monitor a specific condition such as location, vibration, motion and
temperature. In IoT, these sensors will connect to each other and to systems that can
understand or present information from the sensor’s data feeds. These sensors will
provide new information to a company’s systems and to people.
• Change what types of items communicate over an IP Network: In the past, people
communicated with people and with machines. Imagine if all of your equipment had the
ability to communicate. What would it tell you? IoT-enabled objects will share
information about their condition and the surrounding environment with people, software
systems and other machines. This information can be shared in Realtime or collected and
shared at defined intervals. Going forward, everything will have a digital identity and
connectivity, which means you can identify, track and communicate with objects. IoT
data differs from traditional computing. The data can be small in size and frequent in
transmission. The number of devices, or nodes, that are connecting to the network are
also greater in IoT than in traditional PC computing. Machine-to-Machine
communications and intelligence drawn from the devices and the network will allow
businesses to automate certain basic tasks without depending on central or cloud-based
applications and services. These attributes present opportunities to collect a wide range
of data but also provide challenges in terms of designing the appropriate data networking
and security.
What It Means for Your Business?
IoT impacts every business. Mobile and the Internet of Things will change the
types of devices that connect into a company’s systems. These newly connected devices
will produce new types of data. The Internet of Things will help a business gain
efficiencies, harness intelligence from a wide range of equipment, improve operations
and increase customer satisfaction. IoT will also have a profound impact on people’s
lives. It will improve public safety, transportation and healthcare with better information
and faster communications of this information. While there are many ways that the
Internet of Things could impact society and business, there are at least three major
benefits of IOT that will impact every business, which include: communication, control
and cost savings.
every company has a class of assets it could track. GPS-enabled assets can communicate
their current location and movement. Location is important for items that move, such as
trucks, but it’s also applicable for locating items and people within an organization. In
the healthcare industry, IoT can help a hospital track the location of everything from
wheelchairs to cardiac defibrillators to surgeons. In the transportation industry, a business
can deliver real-time tracking and conditioning of parcels and pallets. For example,
Maersk can use sensors to track the location of a refrigerated shipping container and its
current temperature.
Control and Automation: In a connected world, a business will have visibility into a
device’s condition. In many cases, a business or consumer will also be able to remotely
control a device. For example, a business can remotely turn on or shut down a specific
piece of equipment or adjust the temperature in a climate-controlled environment.
Meanwhile, a consumer can use IoT to unlock their car or start the washing machine.
Once a performance baseline has been established, a process can send alerts for anomalies
and possibly deliver an automated response. For example, if the brake pads on a truck are
about to fail, it can prompt the company to take the vehicle out of service and
automatically schedule maintenance.
Cost Savings: Many companies will adopt IoT to save money. Measurement provides
actual performance data and equipment health, instead of just estimates. Businesses,
particularly industrial companies, lose money when equipment fails. With new sensor
information, IoT can help a company save money by minimizing equipment failure and
allowing the business to perform planned maintenance. Sensors can also measure items,
such as driving behavior and speed, to reduce fuel expense and wear and tear on
consumables. New smart meters in homes and businesses can also provide data that helps
people understand energy consumption and opportunities for cost savings.
devices purchased will have sensors and many existing items can be retrofitted with
sensors. This will produce a wide range of new data sources for people and systems to
use to improve their lives and existing business processes. Within a business setting, IT
must define what types of information can be obtained from these sensors and work with
business leaders to define which business processes can be improved with this new IoT
information. For example, sensor data that highlights anomalies in equipment vibration
can be used to predict and avoid equipment failure.
2. Build an IOT network and security foundation: Many industrial IoT deployments
be overwhelmed with the volume and variety of data that IoT will generate. While each
sensor may only produce a small amount of data, a company will be collecting data from
thousands to millions of sensors. Firms must build a data collection and analytics strategy
that supports this new torrent of information in a scalable and cost-effective manner. Big
data technology, such as Hadoop and NoSQL, can give companies the ability to rapidly
collect, store and analyze large volumes of disparate IoT data. A company should collect
any data that is relevant to existing processes. If possible and cost-effective, a company
should also collect additional data that will enable the business to answer new questions
in the future.
4. Review the size and scale of IoT providers: IoT is a complicated landscape with
numerous categories and many vendors within each category. The four main categories
of an IoT solution are: a sensor(s) and radio(s) that often sits in the machine, an M2M
device-management platform, a solution delivery platform and apps that enable IoT
devices to report or act on data. While there are many vendors, no single vendor offers a
complete solution without building partnerships. As a firm begins its IoT voyage, IT and
line of business executives should build a cross-functional team to evaluate strategic
partners. The team should evaluate the financial position of the vendors, industry
knowledge, partnerships and breadth of offerings.
1. Data: The more the information, the easier it is to make the right decision. Knowing
what to get from the grocery while you are out, without having to check on your own, not
only saves time but is convenient as well.
2. Tracking: The computers keep track both on the quality and the viability of things at
home. Knowing the expiration date of products before one consumes them improves
safety and quality of life. Also, you will never run out of anything when you need it at
the last moment.
3. Time: The amount of time saved in monitoring and the number of trips done otherwise
would be tremendous.
4. Money: The financial aspect is the best advantage. This technology could replace
humans who oversee monitoring and maintaining supplies.
• Wearable’s.
• Smart City.
• Smart grids.
• Industrial internet.
• Connected car.
• Smart retail.
6.6. BUZZER
Magnetic Transducer
Magnetic transducers contain a magnetic circuit consisting of an iron core with a
wound coil and a yoke plate, a permanent magnet and a vibrating diaphragm with a
movable iron piece. The diaphragm is slightly pulled towards the top of the core by the
magnet's magnetic field. When a positive AC signal is applied, the current flowing
through the excitation coil produces a fluctuating magnetic field, which causes the
diaphragm to vibrate up and down, thus vibrating air. Resonance amplifies vibration
through resonator consisting of sound hole(s) and cavity and produces a loud sound.
Magnetic Buzzer (Sounder)
Buzzers like the TMB-series are magnetic audible signal devices with built-in
oscillating circuits. The construction combines an oscillation circuit unit with a detection
coil, a drive coil and a magnetic transducer. Transistors, resistors, diodes and other small
devices act as circuit devices for driving sound generators. With the application of
voltage, current flows to the drive coil on primary side and to the detection coil on the
secondary side.
The amplification circuit, including the transistor and the feedback circuit, causes
vibration. The oscillation current excites the coil, and the unit generates an AC magnetic
CHAPTER 7
RESULT AND ANALYSIS
STEP-1
Proposed Air Quality Monitoring System Model
STEP-2
Proposed model working condition of the the kit
STEP-3
Connecting the kit with Thingspeak software
STEP-4
Detected temperature or Command display on the LCD
CHAPTER-8
CONCLUSION AND FUTURE SCOPE
8.1. CONCLUSION
The data are automatically stored in the database and this information can be used
by the authorities to take prompt action. It also helps normal people to know about the
number of pollutants in their area and to take control measures. This is a robust system
which is very useful in industries because of the increasing pollution due to the increase
in industries. This system is user friendly, and the cost of the product is affordable
monitoring. The sensor was giving us a value of 90 when 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 of 1000 PPM, then it starts to cause Headaches, sleepiness and stagnant, stale,
stuffy air and if exceeds beyond 2000 PPM then it can cause increased heart rate and
many other diseases.
• Integration with Smart Cities Initiatives: Many cities are embracing the concept
of smart cities, which leverage technology to improve urban infrastructure and
services. IoT-based air quality monitoring systems will play a crucial role in these
initiatives by providing real-time data for informed decision-making regarding
environmental policies, urban planning, and public health interventions.
• Integration with Health and Wellness Platforms: There is growing awareness of the
impact of air quality on human health and well-being. IoT-based air quality monitoring
systems can integrate with health and wellness platforms to provide personalized
recommendations and alerts based on an individual's exposure to pollutants.
• The future of IoT-based air quality monitoring and alerting systems looks promising, with
opportunities for technological advancements, integration with smart city initiatives,
data-driven insights, and collaboration among stakeholders. These systems have the
potential to significantly improve air quality management and public health outcomes in
the years to come.
REFERENCES
[1] Rd. K Gomathy, Article: A Study on the recent Advancements in Online Surveying,
International Journal of Emerging technologies and Innovative Research (JETIR)
Volume 5 | Issue 11 | ISSN: 2349- 5162, P. No:327-331, Nov-2018.
[3] Dr.C.K. Gomathy, C K Hemalatha, Article: A Study on Employee Safety and Health
Management International Research Journal of Engineering and Technology (Irjet)-
Volume: 08 Issue: 04 | Apr 2021.
[4] Rd. K Gomathy, Article: A Study on the Effect of Digital Literacy and information
Management, IAETSD Journal for Advanced Research in Applied Sciences, Volume 7
Issue 3, P. No-51-57, ISSN NO: 2279- 543X, Mar/2018.
[6] Rd. K Gomathy, Article: Supply chain Impact of importance and Technology in
Software Release Management, International Journal of Scientific Research in Computer
Science Engineering and Information Technology (IJSRCSEIT) Volume 3 | Issue 6 |
ISSN: 2456-3307, P. No :1-4, July-2018.
Conference on Current Trends in Engineering and Technology - ICCTET 2014, 2014, pp.
41-47, Doi: 10.1109/ICCTET.2014.6966260.
[8] C K Gomathy and V Geetha. Article: A Real Time Analysis of Service based using
Mobile Phone Controlled Vehicle using DTMF for Accident Prevention. International
Journal of Computer Applications 138(2):11-13, March 2016. Published by Foundation
of Computer Science (FCS), NY, USA, ISSN No: 0975-8887.
[9] C K Gomathy and V Geetha. Article: Evaluation on Ethernet based Passive Optical
Network Service Enhancement through Splitting of Architecture. International Journal of
Computer Applications 138(2):14-17, March 2016. Published by Foundation of
Computer Science (FCS), NY, USA, ISSN No: 0975-8887.