Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
147 views12 pages

SENSORS AND MEASUREMENTS MINI PROJECT (Autosaved)

The document describes an Arduino air quality detector that uses an MQ-135 sensor to measure air quality levels. It displays the readings on an LCD screen and triggers an alarm with blinking lights and a buzzer when air quality drops below a threshold. The circuit connects the various components like the Arduino board, sensor, LCD screen, LEDs and buzzer. The code reads the sensor values, displays it on the LCD and sets off the alarm if levels exceed a safe limit. The device aims to monitor indoor air quality and alert users of poor air conditions.

Uploaded by

Raj Aryan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
147 views12 pages

SENSORS AND MEASUREMENTS MINI PROJECT (Autosaved)

The document describes an Arduino air quality detector that uses an MQ-135 sensor to measure air quality levels. It displays the readings on an LCD screen and triggers an alarm with blinking lights and a buzzer when air quality drops below a threshold. The circuit connects the various components like the Arduino board, sensor, LCD screen, LEDs and buzzer. The code reads the sensor values, displays it on the LCD and sets off the alarm if levels exceed a safe limit. The device aims to monitor indoor air quality and alert users of poor air conditions.

Uploaded by

Raj Aryan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

SENSORS AND MEASUREMENTS

MINI PROJECT
TOPIC : ARDOUINO AIR QUALITY DETECTOR
USING MQ-135 SENSOR WITH
ALERT ALARM
INTRODUCTION
 Indoor air pollution has consistently been a major issue in most
countries. The quality of air we breath plays an important role in
our health.
 Poor air quality may cause increased short-term health problems
such as fatigue and nausea as well as chronic respiratory diseases,
heart disease, and lung cancer.
 In this project we have designed an Arduino Air quality Detector
using MQ-135 Sensor for measuring the quality of air in the
environment.
 The Smoke sensor we have used is MQ-135 sensor.
 This Circuit not only senses smoke in the air but also reads and
displays the level of Smoke or pollution in the Air.
 This circuit triggers the Buzzer when Smoke level becomes higher
than the desirable limit, this threshold value can be changed in the
Code according to the requirement.
MQ-135 SMOKE SENSOR MODULE

Introduction
MQ-135 Module sensor has lower conductivity in clean air. When the
target combustible gas exists, the sensor’s conductivity is higher along
with the gas concentration rising. MQ135 gas sensor has high
sensitivity to Ammonia, Sulphide and Benzene steam, also sensitive to
smoke and other harmful gases. It is with low cost and suitable for
different applications such as harmful gases/smoke detection.
COMPONENTS USED
For an Arduino Air quality Detector using a MQ-135
Sensor with Alert Alarm we need the following
components:
 Arduino UNO Board
 16*2 LCD
 MQ-135 Gas/Alcohol/smoke Sensor Module (You can use
MQ2, MQ3, MQ5 as well)
 LED (1 green & 1 red)
 Buzzer
 Breadboard
 Connecting Jumper Wires
MQ - 135 SENSOR
WORKING
The MQ-135 smoke sensor consists of a tin dioxide (SnO2), a
perspective layer inside aluminium oxide micro tubes (measuring
electrodes) and a heating element inside a tubular casing. The end
face of the sensor is enclosed by a stainless steel net and the back
side holds the connection terminals. Smoke is emitted from the
source by burning anything. With the smoke cascade on the tin
dioxide sensing layer, the resistance decreases. By using the external
load resistance the resistance variation is converted into a suitable
voltage variation.
Features
 Wide detecting scope
 Fast response and High sensitivity
 Stable and long life Simple drive circuit
 Used in air quality control equipment for buildings/offices, is suitable for
detecting of NH3, NOx, alcohol, Benzene, smoke, CO2, etc.
 Size: 35mm x 22mm x 23mm (length x width x height)
 Signal output instruction.
 ~ 4.2V analog output voltage, the higher the concentration the higher the
voltage.
Arduino Smoke Level Detector
using MQ-135 Sensor
Now after managing the components do the following connections for
designing Arduino Air quality Detector using MQ-135 Sensor.
 LCD Pins 1, 3 ,5 ,16 ——— GND
 LCD Pins 2, 16 ———— VCC (+5V)
 LCD Pin 4 ————— Arduino pin D7
 LCD Pin 6 ————— Arduino pin D6
 LCD Pin 11 ———— Arduino pin D5
 LCD Pin 12 ————— Arduino pin D4
 LCD Pin 13 ————- Arduino pin D3
 LCD Pin 14 ————- Arduino pin D2
 MQ-135 Module Pin -GND —— GND
 MQ-135 Module Pin +VCC —— VCC
 MQ-135 Module Pin A0 — Arduino Pin A0
 LED1 Pin +ve end ————- Arduino PinD10
 LED1 Pin -ve end ————-GND
 LED2 Pin +ve end ————- Arduino PinD12
 LED2 Pin -ve end ————-GND
 Buzzer Pin +ve end ————- Arduino PinD8
 Buzzer Pin -ve end ————-GND
A connection diagram is given below as well. Simply assemble the
circuit as this.
My code
#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

int redLed = 10;


int greenLed = 12;
int buzzer = 8;
int aq = A0;

void setup() {
pinMode(redLed, OUTPUT);
pinMode(greenLed, OUTPUT);
pinMode(buzzer, OUTPUT);
pinMode(aq, INPUT);
Serial.begin(9600);
lcd.begin(16,2);
}

void loop() {
int analogSensor = analogRead(aq);
Serial.print("Pin A0: ");
Serial.println(analogSensor);
lcd.print("air quaility:");
lcd.print(analogSensor-50);
// Checks if it has reached the threshold value

if (analogSensor-50 > 300)


{
digitalWrite(redLed, HIGH);
lcd.setCursor(0, 2);
lcd.print("Alert!!!");
digitalWrite(12, LOW);
tone(buzzer, 1000, 200);
}
else
{
digitalWrite(redLed, LOW);
digitalWrite(12, HIGH);
lcd.setCursor(0, 2);
lcd.print("Normal");
noTone(buzzer);
}

delay(1000);
lcd.clear();
}
The Future

 Adding a wifi module and gathering data on anroid


device
 Adding a filter and exhaust to purify the air when it
exceeds threshold
 Push notification for notifying the users during
hazardous situations
 Adding more sensors for detecting specific gases
Thank you

You might also like