0% found this document useful (0 votes)
7 views

Smoke Sensor with Arduino buzzer

The document outlines the process of creating a Smoke Detection Alarm using an Arduino UNO and an MQ2 gas sensor. It details the necessary components, circuit connections, and provides Arduino code to operate the system, which triggers a buzzer and LED indicators based on smoke detection levels. The system activates a red LED and buzzer when smoke is detected, and a green LED when smoke levels are normal.

Uploaded by

manojdhawan2017
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Smoke Sensor with Arduino buzzer

The document outlines the process of creating a Smoke Detection Alarm using an Arduino UNO and an MQ2 gas sensor. It details the necessary components, circuit connections, and provides Arduino code to operate the system, which triggers a buzzer and LED indicators based on smoke detection levels. The system activates a red LED and buzzer when smoke is detected, and a green LED when smoke levels are normal.

Uploaded by

manojdhawan2017
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Aim- Study about that, How to make Smoke Detection Alarm using Arduino

Equipment Components Required


1. Arduino UNO -A microcontroller board based on the ATmega328P 2. MQ2 Gas Sensor - which
detects the level of smoke 3. Buzzer -A device that produces sound or alarm 4. 5V LED -A
Light-emitting diode that emits light 5. 100ohm Resistor To resist the current 6. Jumper Wires
-For connecting the elements of the circuit

Processor- Arduino is an open-source electronics platform based on easy-to-use hardware and


software. Arduino boards can read digital & analog inputs from the sensors and The MQ2 smoke
sensor is sensitive to smoke gases like LPG, Butane, Propane, Methane, Alcohol, and Hydrogen.
In this article, we will learn how we can make a Smoke Detector Alarm using Arduino. When the
MQ2 Gas Sensor will detect the smoke level high, the red led will glow and the buzzer will start.
In this circuit, the MQ2 gas sensor detects the level of smoke in the environment and sends the
analog value to the Arduino. Which compares the value with the standard value if the value is
higher, Arduino sends the signal to the led and the red light will be illuminated and the buzzer will
be started. Otherwise, green led will be illuminated.

Circuit Diagram-
Pins Connection

1. Arduino Digital pin 0 is connected with the (+ve) pin of Buzzer 2. Arduino Digital pin 1 is connected
with the (+ve) pin of LED1 (green) 3. Arduino Digital pin 2 is connected with the (+ve) pin of LED2(red)
4. Arduino Analog pin A0 is connected with A0 Pin of MQ2 Gas sensor 5. Arduino 5v Power pin is
connected with VCC pin of Gas sensor 6. Arduino GND Power pin is connected with GND pin of Gas
sensor 7. Arduino GND Power pin is connected with (-ve) pins of LED’s with resistance 8.Arduino
GND Power pin is connected with GND pins of a Buzzer with resistance

Arduino Code
//stored pins in variables

#define gasSensor A0
#define buzzer 0
#define ledGreen 1
#define ledRed 2
#define HIGH 600

void setup() {

//Initialising all pins

pinMode(gasSensor, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(ledGreen, OUTPUT);
pinMode(ledRed, OUTPUT);
}

void loop() {
//Read data from the sensor
int gas_value = analogRead(gasSensor);

//check data from sensor if there is smoke, if will execute otherwise else will execute
if(gas_value > HIGH)
{
tone(buzzer,1000,500);
digitalWrite(ledRed, HIGH);
digitalWrite(ledGreen,LOW);

}
else
{
noTone(buzzer);
digitalWrite(ledGreen,HIGH);
digitalWrite(ledRed, LOW);
}
delay(200);

Result- Find the result by smoke sensor detect signal and buzzer start beeping

You might also like