Professional Documents
Culture Documents
PROJECT REPORT ON
Submitted by`
Omkar Vinchurkar (2018BIN032)
Nilesh Nagalwar(2018BIN006)
Associate Professor
Year 2021-2022
Semester-1
Table of Content:
This is to certify that the project entitled “Air Quality Monitoring System” in the partial
fulfilment of the “Project- I, B. Tech” for Shri Guru Gobind Singhji Institute of Engineering and
Technology, Vishnupuri, Nanded. This Bonafide work carried and completed under guidance
and supervision of our guide Dr. V. G. Asutkar during academic schedule 2021-2022.
Submitted by:
Omkar Vinchurkar
Rupesh Malu
Nilesh Nagalwar
We express our sincere gratitude to Dr.V. G. Asutkar, Associate Professor and guide of the project, for their
stimulating guidance, continuous encouragement, and supervision throughout the present work. We are
very thankful to Dr.R.S.Sarwadnya, Head of Instrumentation Engineering Department, for their guidance
and support. Lastly, we would like to thank all our friends and faculty whose encouragement and
suggestion helped us to complete our project. We are also thankful to all, who have contributed directly or
indirectly to the completion of the project.
Thank You!
Abstract:
This project deals with measuring Air Quality using MQ135 sensor along with Carbon Monoxide CO
using MQ7 sensor. Measuring Air Quality is an important element for bringing a lot of awareness in the
people to take care of the future generations a healthier life. Based on this, the Government of India has
already taken certain measures to ban ‘Single Stroke’ and ‘Two Stroke’ Engine based motorcycles which
are emitting high pollution comparatively. We are trying to implement the same system using IoT
platforms like Thingspeak, we can bring awareness to every individual about the harm we are doing to our
environment. Already, New Delhi is remarked as the most polluted city in the world recording Air Quality
above 300 PPM. We have used the easiest platform like Thingspeak and set the dashboard to the public
such that everyone can come to know the Air Quality at the location where the system is installed. Also, we
have made a project which is cost e ective.
It introduces aspects of instrumentation, computer, mechanical and electronics engineering, including
following primary areas:
1. Sensor Application
2. Hardware Applications
3. Software Application
4. Electronics Equipment Application
5. Arduino Programming
6. Presentation Skills
7. Project Planning
Components:
• Arduino Uno R3
• DHT22 Temperature and Humidity Sensor Module
• MQ135 Air Quality Gas Sensor
• MQ7 Gas Sensor Module for Carbon Monoxide
• ESP-01 WiFi Module
• LCD Display 16X2
• 10 ohm potentiometer
Arduino Uno R3 Development Board
• The Arduino Uno is an open-source microcontroller board based on the
Microchip ATmega328P microcontroller.
• The board is equipped with sets of digital and analog input/output (I/O) pins that may
be interfaced to various expansion boards (shields) and other circuits. The board has 14
digital I/O pins (six capable of PWM output), 6 analog I/O pins, and is programmable
with the Arduino IDE (Integrated Development Environment), via a type B USB cable.
• It can be powered by the USB cable or by an external 9-volt battery, though it accepts
voltages between 7 and 20 volts. It is similar to the Arduino Nano and Leonardo.
OTHER SPECS:
OTHER SPECS:
• MQ-7 CO Carbon Monoxide Coal Gas Sensor Module detects the concentrations of CO in
the air and outputs its reading as an analog voltage. The sensor can measure
concentrations of 10 to 10,000 ppm.
• The sensor can operate at temperatures from -10 to 50°C and consumes less than
150 mA at 5 V.
• This module provides both digital and analog outputs. The threshold level for digital
output can be easily adjusted using the preset on the board. The MQ-7 sensor module
can be easily interfaced with Micro-controllers, Arduino etc.
OTHER SPECS:
● OPERATING VOLTAGE: 5V
● RANGE: CO: 10 -1000ppm
● SENSITIVITY: 3%
● HEATING RESISTANCE: 31 ohm
DHT22 Temperature and Humidity Sensor
• The DHT22 is a low-cost digital temperature and humidity sensor with a single wire
digital interface. It uses a capacitive humidity sensor and a thermistor to measure the
surrounding air and spits out a digital signal on the data pin (no analog input pins
needed).
• The sensor is calibrated and doesn’t require extra components so you can get the right
to measure relative humidity and temperature.
• It is quite simple to use but requires careful timing to grab data. You can only get new
data from it once every 2 seconds
OTHER SPECS:
● OPERATING VOLTAGE : 3.5 -5V
● OUTPUT CURRENT: 0.3mA
● TEMP. RANGE: -40°C to 80°
● HUMIDITY RANGE :0% - 100%
● ±
ACCURACY: 5 ℃ & 1%
ESP8266-01 WiFi Transceiver Module
OTHERS SPECS:
.
Basic Circuit Diagram:
Circuit Diagram
Flow-Chart:
The flowchart for the AIR POLLUTION MONITORING is as shown in Figure 2.
Figure 2
Working:
● AS YOU START THE PROGRAM FIRSTLY THE ESP MODULE SEARCHING FOR THE
INTERNET NETWORK AS IT FIND THE NETWORK IS SEND THE AT COMMAND AND AFTER
RECEIVING OK COMMAND RECEIVED IT SET AS CLIENT THEN IT CONNECTED TO THE
NETWORK.
● AFTER SETTING UP THE NETWORK THE SENSOR STARTED DETECTING AIR QUALITY AND
TEMP , HUMIDITY.
● MQ135 GAS SENSOR DETECTS THE AIR QUALITY THAT IS GASES PRESENT IN AIR
WHICH INCLUDES NH3, BENZENE,ALCOHOLS ETC. AFTER DETECTING THE GASES THE
RESISTANCE CHANGES AND AND SENSOR GIVES THE OUTPUT.
● MQ7 GAS SENSOR DETECTED THE CARBON MONOXIDE GAS IN AIR & IT’S RESISTANCE
CHANGES AND SENSOR GIVE THE OUTPUT .
● DHT22 DETECTED TEMP & HUMIDITY IN DHT THERE IS NTC TYPE THERMISTOR
PRESENT WHOSE RESISTANCE DECREASES WITH INCREASING THE TEMP. FOR
HUMIDITY THE HUMIDITY SENSING ELEMENT SENSES THE HUMIDITY AND IT’S
CAPACITANCE CHANGES AND WE GET THE OUTPUT .
● AFTER COLLECTING ALL THE DATA THE ESP MODULE CONNECTED WITH THE THING
SPEAKS SERVER AND SEND THE ALL THE COLLECTED DATA TO THE SERVER .
● ON THINGSPEAK WE SEE ALL THE REAL TIME DATA IN GRAPHICAL MANNER WE CAN
STORE THIS DATA ALSO .
● AFTER SENDING THE DATA IT CLOSES THE CONNECTION AND AGAIN AFTER COLLECTING
THE DATA FROM SENSOR ESP MODULE ESTABLISHED THE CONNECTION WITH
THINGSPEAK
ARDUINO PROGRAM:
#include <dht11.h>
#include "DHT.h"
#include <SoftwareSerial.h>
#define dhttype DHT22
#include <LiquidCrystal.h>
const int rs = 12, en = 11, d4 = 7, d5 = 8, d6 = 9, d7 =10;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
int gas_sensor = A2; //Sensor pin
float m = -0.3376; //Slope
float b = 0.7165; //Y-Intercept
float R0 = 2.82; //Sensor Resistance in fresh air from previous code
int CO_sensor = A3; //Sensor pin
float m1 = -0.6527; //Slope
float b1 = 1.30; //Y-Intercept
float R01 = 7.22; //Sensor Resistance
String agAdi = "honor"; // We write the name of our network here.
String agSifresi = "123456789";// We write the password of our network here.
int rxPin = 2; //ESP8266 RX pini
int txPin = 3; //ESP8266 TX pini
int dht11Pin = 5;
String ip = "184.106.153.149"; //Thingspeak ip adresi
float sicaklik, nem,hif,hic,f,ppm,ppml;
//dht11 DHT22;
DHT dht(dht11Pin,dhttype);
SoftwareSerial esp(rxPin, txPin);
void setup() {
{ lcd.begin(16, 1);
// Print a message to the LCD.
lcd.print("-----AQI-----");
// Serial.begin(9600);
Serial.println(F("DHTxx test!"));
Serial.begin(9600); // PC to Arduino Serial Monitor
// Serial.begin(115200); // Arduino to ESP01 Communication
// pinMode(gas_sensor, INPUT);
// pinMode(CO_sensor,INPUT);
// pinMode(A2,INPUT); //For dht Sensor
dht.begin();
lcd.begin(16, 2);
// Print a message to the LCD.
// lcd.print(" AIR POLLUTION MONITORING ");
}
void loop(){
{
delay(2000);
esp.println("AT+CIPSTART=\"TCP\",\""+ip+"\",80"); // We connect to Thingspeak.
if(esp.find("Error")){ // We check the connection error.
Serial.println("AT+CIPSTART Error");
}
Serial.print(F("Humidity: "));
Serial.print(nem);
Serial.print(F(" Temperature: "));
Serial.print(sicaklik);
Serial.print(F("°C "));
Serial.print(f);
Serial.print(F("°F Heat index: "));
Serial.print(hic);
Serial.print(F("°C "));
Serial.print(hif);
Serial.println(F("°F"));
// thingspeak communication
String veri = "GET https://api.thingspeak.com/update?api_key=NH9PJBNW0O563CGG"; // Thingspeak command. We write
our own api key in the key part.
veri += "&field1=";
veri += float(sicaklik);// The temperature variable we will send
veri += "&field2=";
veri += float(nem);// The moisture variable we will send
veri += "&field3=";
veri += float(ppm);
veri += "&field4=";
veri += float(ppm1);
veri += "\r\n\r\n";
esp.print("AT+CIPSEND="); // We give the length of data that we will send to ESP.
esp.println(veri.length()+2);
delay(2000);
if(esp.find(">")){ // The commands in it are running when ESP8266 is ready..
esp.print(veri); // We send the data.
Serial.println(veri);
Serial.println("Data sent.");
delay(1000);
Serial.println("Connection Closed.");
esp.println("AT+CIPCLOSE"); // we close the link
delay(1000); // We wait 1 minute for sending new data.
// lcd.clear();} }
Program Description:
REFERENCES:
https://www.instructables.com/Air-Pollution-Detector/
https://robu.in/mq-series-gas-sensor/