Arduino Smoke Level Detector using MQ-135 Sensor with Alert Alarm

Arduino Smoke Level Detector using MQ-135 Sensor (Last Updated On: December 5, 2018)

Introduction

In this project we have designed Arduino Smoke Level Detector using MQ-135 Sensor for measuring the level of smoke in environment. Simply we have interfaced MQ-135 Gas Sensor module with Arduino and 16*2 LCD module for display. The Smoke sensor we used is the MQ-135 sensor. Smoke Detectors are very useful in detecting smoke or fire in buildings, and so are the important safety parameters.

Smoke Detector Circuit which not only sense the smoke in the air but also reads and displays the level of Smoke 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. Instead of MQ-135, you can use MQ2, MQ3, MQ5 module as well. Basically they all have similar functions.




Components Required

For Arduino Smoke Level Detector using MQ-135 Sensor with Alert Alarm we need the following components:

1. Arduino UNO Board
2. 16*2 LCD
3. MQ-135 Sensor Module (You can use MQ2/MQ3/MQ5 as well) - (Buy Online from Amazon)
4. LED (1 green & 1 red)
5. Buzzer
6. Breadboard
7. Connecting Jumper Wires

Arduino Smoke Level Detector using MQ-135 Sensor

Now after managing this components do this following connections for designing Arduino Smoke Level 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.

Arduino Smoke Level Detector using MQ-135 Sensor


MQ-135 Smoke Sensor Module

Introduction

Arduino Smoke Level Detector using MQ-135 Sensor
MQ-135 Module sensor has lower conductivity in clean air. When the target combustible gas exist, the sensors conductivity is more higher along with the gas concentration rising. Convert change of conductivity to correspond output signal of gas concentration. 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.

Features

1. Wide detecting scope
2. Fast response and High sensitivity
3. Stable and long life Simple drive circuit
4. Used in air quality control equipment for buildings/offices, is suitable for detecting of NH3, NOx, alcohol, Benzene, smoke, CO2, etc.
5. Size: 35mm x 22mm x 23mm (length x width x height)
6. Working voltage: DC 5 V
7. Signal output instruction.
8. Dual signal output (analog output, and high/low digital output)
9. ~ 4.2V analog output voltage, the higher the concentration the higher the voltage.

Working Mechanism

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.




Arduino Source Code

So here is a source code for designing Arduino Smoke Level Detector using MQ-135 Sensor. Simply copy the code and upload it to your Arduino Board using Arduino IDE.

#include <LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

int redLed = 10;
int greenLed = 12;
int buzzer = 8;
int smokeA0 = A0;
// Your threshold value
int sensorThres = 100;

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

void loop() {
  int analogSensor = analogRead(smokeA0);

  Serial.print("Pin A0: ");
  Serial.println(analogSensor);
  lcd.print("Smoke Level:");
  lcd.print(analogSensor-50);
  // Checks if it has reached the threshold value
  if (analogSensor-50 > sensorThres)
  {
    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(500);
  lcd.clear();
}

Video Preview & Explanation


Recommended For You

Ask A Question .......

Close