Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
13 views17 pages

MPMC Final 2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 17

MINOR PROJECT IN MICROPROCESSORS AND

MICROCONTROLLERS LABORATORY (191ECC511L)


BRANCH
III-Electronics and Communication Engineering-A
PROJECT TITLE
FIRE AND SMOKE DETECTION SYSTEM
SUBMITTED BY

Dhanusri S 310622106028
Janani Sai S 310622106052
Jayashree N 310622106054
Karunya Vikashini G 310622106061
Kashmira K 310622106062

Easwari Engineering College


(Autonomous)
Ramapuram Campus
Chennai – 600 089 Tamil Nadu
October 29, 2024

1
1. AIM AND OBJECTIVE:
The aim of the fire and smoke detection system using an Arduino Nano is to provide
an efficient, cost-effective, and customizable solution for early detection of fire
hazards. The primary objective is to ensure safety by identifying the presence of
smoke or a sudden rise in temperature, allowing for rapid response to potential
emergencies. Equipped with sensors such as a smoke sensor (like the MQ-2) , the
system continuously monitors the environment and triggers an alert when abnormal
conditions are detected. The Arduino Nano processes data from these sensors and
activates alarms, like buzzers or LED indicators, to warn individuals nearby. For
added functionality, the system can be integrated with communication modules to
send alerts via SMS or notifications, enhancing remote monitoring capabilities. This
project also emphasizes energy efficiency and compactness, making it suitable for
installation in residential, commercial, or industrial settings. Moreover, fire and
smoke detection systems based on Arduino Nano serve as excellent educational
tools, helping students and enthusiasts learn about sensor integration, programming,
and automation. Additionally, they offer flexibility for further customization, enabling
developers to upgrade the system with features like IoT integration, data logging, or
connection to centralized monitoring networks, making it highly adaptable to
evolving safety needs.

Objectives:

1.1.1 Design and Construction:

 Develop a fire and smoke detection system using an Arduino Nano with
affordable components such as the MQ-2 smoke sensor.

 Ensure the system design is compact and energy-efficient, suitable for


residential, commercial, or industrial settings.

1.1.2. Control System Development:

 Utilize Arduino Nano as the central control unit to process data from the smoke
sensor and manage alert mechanisms

 Implement a smoke sensor (such as the MQ-2) to detect smoke accurately and
activate alarms, like buzzers or LED indicators, when hazardous conditions are
identified

1.1.3. Programming and Software Integration:

 Write Arduino code to process sensor data from the smoke detector,
implementing thresholds to trigger alerts when smoke is detected

 Create an intuitive interface for users to monitor system status, using LEDs for
visual indicators and buttons for manual override or to reset alarms.

1. APPARATUS REQUIRED

 Arduino Nano

 Flame sensor

 Breadboard
2
 Jumper wires

 GSM 800L

 MQ2

 Buzzer

3
2. ABSTRACT
This project presents the design and implementation of a fire and smoke detection
system controlled by an Arduino microcontroller, aiming to enhance safety through
early hazard detection. The system utilizes an MQ-2 smoke sensor to accurately
detect smoke and combustible gases, triggering alerts when hazardous conditions
are identified. The Arduino Nano serves as the central control unit, processing sensor
data and activating alarms, such as buzzers and LED indicators, to notify users
promptly. Incorporating communication modules, such as GSM or Wi-Fi, allows for
remote notifications, enabling users to monitor the system status from their mobile
devices. The project follows a systematic approach, including design, programming,
testing, and optimization phases, culminating in a fully operational fire detection
prototype.The results demonstrate the system’s effectiveness in various applications,
showcasing its potential use in residential, commercial, and industrial settings to
improve fire safety. This project not only serves as an educational tool for
understanding sensor integration and automation but also lays the groundwork for
future advancements in fire safety technology. The comprehensive documentation
and demonstration of the system’s functionality aim to inspire further exploration in
the field of safety engineering and robotics.

3. INTRODUCTION:

4.1 PROBLEM STATEMENT:

The rapid advancement of automation and smart technology has underscored the
importance of developing cost-effective, user-friendly solutions for enhancing safety
in various environments. Traditional fire detection systems can be expensive and
often require professional installation and monitoring, posing a challenge for
residential users, small businesses, and educational institutions that aim to
implement effective safety measures without incurring excessive costs. The objective
of this project is to create a fire and smoke detection system controlled by an
Arduino Nano that is both affordable and accessible. The system must accurately
detect smoke and hazardous gases, providing timely alerts to users through alarms
and notifications. It serves as a platform for learning about sensor integration,
programming, and safety technology. Key challenges include ensuring the reliability
of the smoke detection sensor, integrating an intuitive user interface for monitoring
system status, and incorporating communication modules for remote alerts to
enhance user awareness and response capabilities.

4. COMPONENTS USED:

5.1 Arduino Nano

The Arduino Nano is a compact, versatile microcontroller board that combines essential
features with ease of use, catering to hobbyists and professionals alike. Its small form
factor makes it ideal for projects where space is limited, while still providing robust
functionality. The board features a USB Mini-B programming port for easy connection to
computers, enabling straightforward programming and data transfer.One of the key
aspects of the Arduino Nano is its ATmega328P microcontroller, which operates at 16
MHz and provides sufficient processing power for various applications. This
microcontroller is complemented by 32 KB of flash memory, allowing users to store and

4
run complex programs effectively. The Nano’s 2 KB of SRAM ensures adequate memory
for variable storage, making it suitable for projects that require real-time data
processing.The Arduino Nano includes a range of digital and analog input/output pins,
with 14 digital pins and 8 analog pins, allowing for extensive connectivity with sensors,
actuators, and other devices. This flexibility is essential for projects that require multiple
inputs or outputs, enabling seamless integration into diverse applications.For enhanced
debugging and monitoring capabilities, the Nano features onboard LEDs for power and
pin status indication, making it easier to troubleshoot and understand the board’s
operation during development. The reset button is conveniently located on the board,
providing a simple way to restart the program without needing to disconnect the power
supply, which is especially useful for testing and debugging purposes.In addition to its
robust features, the Arduino Nano is compatible with a wide range of shields and
modules, ensuring that users can expand its capabilities without starting from scratch.
This compatibility allows for a seamless transition from other Arduino boards and access
to an extensive library of resources, tutorials, and community support.In summary, the
Arduino Nano combines essential features with a compact design, making it a highly
adaptable tool for various projects, from simple prototypes to more complex applications
in robotics, automation, and IoT.

Summary Of Specifications:

Feature Specification

Microcontroller ATmega328P (16 MHz)

Flash Memory 32 KB

SRAM 2 kB

Digital I/O Pins 14

Analog Input Pins 8

Operating Voltage 5V

USB USB Mini B

Dimensions 18 x 45 mm

5.1.1. Other Components

Programming Port: The Arduino Nano features a USB Mini-B programming port that
allows users to upload code and firmware updates easily. This port enables developers to
program the board with specific instructions and algorithms, making it straightforward to
develop various applications.

TX – RX LEDs:The TX (transmit) and RX (receive) indicator LEDs on the Nano blink


during data transmission and reception. These visual indicators help users monitor
serial communication, facilitating debugging and ensuring smooth data flow between
the Arduino Nano and connected devices.

5
Crystal Oscillator:The Arduino Nano utilizes a crystal oscillator that operates at 16
MHz, providing precise timing for the microcontroller’s operations. This reliable clock
signal is crucial for executing tasks accurately, ensuring that time-sensitive
applications run smoothly.

Reset Switch:The reset switch on the Arduino Nano allows users to reset the
microcontroller easily. Pressing this switch sends a logical pulse to the reset pin,
causing the microcontroller to restart the program from the beginning, which is
particularly useful during testing and debugging phases.

Analog Input Pins:The Arduino Nano includes several analog input pins that enable
it to read variable signals from sensors. This feature is essential for applications
requiring real-time data processing and environmental monitoring.

Fig 1:Arudino Nano

6
5.2 FLAME SENSOR:
The flame sensor is an essential component for fire detection systems, providing a
reliable way to identify the presence of flames. This sensor typically utilizes a
photodiode or phototransistor that is sensitive to infrared radiation emitted by
flames. When a flame is detected, the sensor generates an output signal, indicating
the presence of fire. The flame sensor is designed to operate effectively in various
environments, making it suitable for applications in safety and automation systems.
It can be integrated with an Arduino Nano to create a responsive fire detection
system. The sensor’s output can be read as a digital signal, which allows the Arduino
to trigger alarms, activate emergency protocols, or initiate other safety measures
when a flame is detected. The compact size of the flame sensor allows for easy
installation in diverse settings, whether in residential, commercial, or industrial
applications. Its fast response time ensures that potential fire hazards are detected
promptly, enhancing overall safety and reducing the risk of fire-related incidents.

When using the flame sensor with the Arduino Nano, developers can utilize the
board’s analog or digital input capabilities to process sensor data effectively. This
integration enables the development of more complex fire detection systems that
can include additional features, such as visual or audible alarms, data logging, or
remote notifications.

Fig 2: Flame Sensor

5.3 BREAD BOARD AND CONNECTING WIRES:


7
To create a manually operated mechanical arm using a breadboard and connecting
wires, you will first need to gather your materials, including a breadboard, connecting
wires, servos or stepper motors, and input devices like potentiometers or joysticks.
Begin by assembling the mechanical arm, ensuring that each joint is equipped with a
motor for movement. Next, connect the motors to the breadboard and attach the
potentiometers or joystick, wiring them for power, ground, and signal. Use the
connecting wires to establish a secure connection between all components, ensuring
the ground and power are consistent throughout the circuit. Once everything is
wired, power on the setup and test the arm's movements by adjusting the
potentiometers or manipulating the joystick. This hands-on project provides a
practical way to learn about robotics and electronics while allowing for manual
control of the arm.

8
5.3 LIQUID CRYSTAL DISPLAY (LCD):
The LCD (Liquid Crystal Display) is a widely used output component in Arduino
projects, providing a user-friendly interface for displaying information. Typically, a
16x2 LCD display, which can show two lines of text with up to 16 characters each, is
commonly integrated with the Arduino Nano for various applications, including data
visualization and system monitoring.The LCD display operates on a simple principle,
utilizing a backlight to Illuminate the liquid crystals, which control the visibility of
characters and symbols on the screen. When connected to an Arduino Nano, it can
be easily programmed to display real-time data, such as sensor readings, status
messages, or notifications, enhancing user interaction with the project. To interface
an LCD display with the Arduino Nano, users typically utilize a library such as the
LiquidCrystal library, which simplifies the process of controlling the display. The
display is connected to several digital pins on the Arduino, allowing for both data
and control signals to be sent effectively.

Fig 4 : Liquid crystal display

9
5.5 SMOKE DETECTOR (MQ2):
The MQ-2 gas sensor is a versatile device widely used for detecting a variety of gases,
including smoke, propane, butane, and other combustible gases. This sensor is
particularly valuable in applications related to safety and environmental monitoring. It
consists of a sensitive material that changes resistance in the presence of certain
gases, allowing it to provide reliable gas detection.When integrated with an Arduino
Nano, the MQ-2 sensor can offer real-time monitoring capabilities. It typically provides
both analog and digital output, enabling users to read varying gas concentrations as
well as detect the presence of gases through a simple high/low signal. The analog
output can be connected to one of the Nano’s analog input pins, allowing for more
detailed readings and enabling developers to set specific thresholds for alarm
conditions. The MQ-2 sensor is relatively easy to use, and its compact size allows for
straightforward integration into various projects. It is often employed in fire detection
systems, air quality monitoring, and gas leak detection applications. When a gas
concentration exceeds a predefined level, the Arduino can activate alarms, send
notifications, or trigger other safety measures. Calibration of the MQ-2 sensor is crucial
for accurate readings, as environmental conditions and specific gas types can affect
its performance. Developers typically implement calibration routines to ensure the
sensor provides reliable and consistent data throughout its operation.Overall, the MQ-
2 gas sensor, when paired with the Arduino Nano, offers a powerful solution for
detecting gas leaks and monitoring air quality, making it an essential component in
many safety and automation projects.

Fig 5 : Smoke Detector MQ2

1
0
5.6 GSM 800L:

GSM 800L is a wireless communication standard utilized in mobile networks, operating within
the 800 MHz frequency band. It boasts features such as 200 kHz bandwidth, 45 MHz duplex
spacing, and 200 kHz channel spacing, employing GMSK modulation to achieve data rates of
up to 9.6 kbps. GSM 800L offers advantages including wide coverage, low power
consumption, high capacity, good indoor penetration, and cost-effectiveness. Applications
include mobile networks (2G, 3G), wireless local loop (WLL), rural telephony, IoT (Internet of
Things), and M2M (Machine-to-Machine) communications. Network architecture comprises
Base Transceiver Station (BTS), Base Station Controller (BSC), Mobile Switching Center
(MSC), and Gateway Mobile Switching Center (GMSC). Devices compatible with GSM 800L
range from mobile phones and modems to routers, IoT modules, and M2M devices, with
countries like India, China, Japan, South Korea, and Brazil adopting this standard.

Fig 6 : GSM 800L

1
1
5.7 BUZZER:

A buzzer is a simple and effective audio output device used in various electronic projects,
including those involving the Arduino Nano. It generates sound when an electrical current is
applied, making it ideal for alerting users or indicating system status through audible signals
When connected to an Arduino Nano, a buzzer can be controlled using simple digital output
commands. By programming the Nano to send high or low signals to the buzzer, developers
can create various sound patterns to convey different messages or alerts. For example, a
continuous beep might indicate an alarm condition, while short beeps can be used for
notifications or feedback. In fire and smoke detection systems, a buzzer can be programmed
to sound an alarm when the corresponding sensors, such as the MQ-2 or flame sensor,
detect hazardous conditions. This immediate auditory alert can help ensure that users
respond promptly to potential dangers, enhancing safety in residential, commercial, and
industrial environments.

1
2
6.Woking
To create a fire and smoke detection system using an Arduino Nano and the specified
components, including the flame sensor, MQ-2 gas sensor, buzzer, and LCD display, you
will follow a systematic approach involving hardware assembly, coding, integration, and
testing. Begin by preparing your workspace with the Arduino Nano, which will function as
the central control unit for the detection system. The first step is to connect the sensors
to the Arduino Nano. Start with the flame sensor, which typically has three pins: VCC
(power), GND (ground), and OUT (signal). Connect the VCC pin to the Nano’s 5V, the
GND pin to the ground, and the OUT pin to a digital pin on the Nano (e.g., D2). Next,
connect the MQ-2 gas sensor, which usually has four pins: VCC, GND, AO (analog
output), and DO (digital output). Connect the VCC pin to the Nano’s 5V, the GND pin to
ground, AO to an analog input pin (e.g., A0), and DO to a digital pin (e.g., D3).Following
the sensor connections, wire the buzzer to a digital pin on the Arduino Nano (e.g., D4),
ensuring the positive terminal connects to the designated pin and the negative terminal
connects to ground. For visual feedback, connect the LCD display using I2C
communication; connect the SDA and SCL pins of the LCD to the corresponding pins on
the Nano (A4 for SDA and A5 for SCL), along with the VCC and GND connections. After
completing the hardware assembly, move on to programming the Arduino. Write code to
read data from both the flame sensor and the MQ-2 gas sensor. If either sensor detects a
fire or high gas concentration, the Arduino should trigger the buzzer to sound an alarm.
Utilize the Liquid Crystal library to display relevant information, such as sensor status
and alert messages, on the LCD screen. Once the code is uploaded to the Arduino Nano,
conduct tests by simulating fire and smoke conditions. Ensure that the sensors respond
correctly, activating the buzzer and displaying alerts on the LCD. Monitor the system’s
performance, making adjustments as needed to optimize reliability and response times.
By following these steps, you will successfully create an effective fire and smoke
detection system utilizing the Arduino Nano and the specified components, enhancing
safety and monitoring capabilities in various environments.
7.CODING:
7.1MAIN CODE

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>

// Define the SoftwareSerial pins for SIM800L


SoftwareSerial sim800(3, 4); // RX (D3), TX (D4)

// Define pins for sensors and buzzer


Const int flamePin = 2; // Flame sensor pin
Const int gasPin = A0; // MQ2 gas sensor pin
Const int buzzerPin = 5; // Buzzer pin

// Set up LCD with I2C address 0x27 and dimensions


LiquidCrystal_I2C lcd(0x27, 16, 2);

// Define gas detection threshold


Const int gasThreshold = 150; // Adjust based on sensor calibration

Void setup() {
// Start serial communication
Serial.begin(9600);
Sim800.begin(9600); // SIM800L communication

// Initialize LCD and sensors


Lcd.begin(16, 2);
Lcd.backlight();

// Display startup message on LCD


Lcd.clear();
Lcd.print(“Fire and Smoke”);
Lcd.setCursor(0, 1); // Move to the second row
Lcd.print(“Detection System”);
Delay(3000); // Show message for 3 seconds

// Clear the screen after the message


Lcd.clear();
Lcd.print(“System Ready”);
Delay(2000);
Lcd.clear();

// Set sensor and buzzer pins


pinMode(flamePin, INPUT);
pinMode(gasPin, INPUT);
pinMode(buzzerPin, OUTPUT);
}

Void loop() {
Int flameStatus = digitalRead(flamePin); // Flame sensor reading
Int gasValue = analogRead(gasPin); // MQ2 gas sensor reading

// Debugging – print sensor values to serial monitor


Serial.print(“Flame Sensor: “);
Serial.println(flameStatus);
Serial.print(“Gas Sensor: “);
Serial.println(gasValue);

// Check for fire detection


If (flameStatus == LOW) { // LOW means flame detected
Alert(“Fire detected!”);
}
// Check for smoke detection
Else if (gasValue > gasThreshold) { // Exceeds threshold means smoke detected
Alert(“Smoke detected!”);
}
Else {
// No danger detected
Lcd.clear();
Lcd.print(“All Clear”);
digitalWrite(buzzerPin, LOW); // Turn off buzzer
}

Delay(1000); // Short delay for stability


}

Void alert(String alertMessage) {


// Display alert message on LCD
Lcd.clear();
Lcd.print(alertMessage);

// Sound buzzer
digitalWrite(buzzerPin, HIGH);
delay(500); // Keep buzzer on for half a second
digitalWrite(buzzerPin, LOW);
// Send SMS and make call
sendSMS(alertMessage);
makeCall();
}

// Function to send SMS


Void sendSMS(String message) {
Sim800.println(“AT+CMGF=1”); // Set SMS mode to text
Delay(1000);
Sim800.println(“AT+CMGS=\”+919940137419\””); // Replace with recipient’s number
Delay(1000);
Sim800.println(message); // Send message
Delay(100);
Sim800.write(26); // ASCII code for Ctrl+Z to send SMS
Delay(1000);

Serial.println(“SMS Sent!”);
}

// Function to make a call


Void makeCall() {
Sim800.println(“ATD+919940137419;”); // Replace with recipient’s number
Delay(10000); // Wait for the call duration
Sim800.println(“ATH”); // Hang up the call
Serial.println(“Call Ended”);
}
8.SCOPE AND LIMITATIONS:

The project of a fire and smoke detection system using an Arduino Nano serves as
an educational platform for understanding electronics, programming, and sensor
integration. It allows users to explore the principles of gas detection and
environmental monitoring while providing hands-on experience with components
such as the flame sensor, MQ-2 gas sensor, buzzer, and LCD display. This project
can be applied in various settings, including residential safety, laboratories, and
educational environments, making it a versatile tool for promoting safety
awareness. However, the system has certain limitations. The effectiveness of the
flame and gas sensors can be influenced by environmental factors, such as
humidity, temperature, and air quality, potentially leading to false positives or
negatives in detection. Additionally, the response time of the sensors may not be
instantaneous, which could delay alarms in critical situations. The project also relies
on the accuracy and calibration of the sensors, and improper calibration can
compromise reliability. The buzzer provides only an audible alert, which may not be
sufficient in noisy environments or for individuals with hearing impairments. While
the Arduino Nano is user-friendly, there is still a learning curve for beginners in
programming and circuit assembly that may limit accessibility for some users.
Overall, while the fire and smoke detection system presents valuable educational
opportunities and practical applications, its effectiveness can be constrained by
environmental factors, sensor performance, and the user's proficiency with
electronics.

9.Conclusion

In conclusion, a fire and smoke detection system using an Arduino Nano is an


engaging project that combines safety and education. It offers hands-on experience
in electronics, programming, and sensor integration, enabling users to grasp
essential concepts of environmental monitoring. The Arduino platform allows for
customization and experimentation, although limitations like environmental
interference and sensor calibration must be considered. Overall, this project
enhances technical skills and promotes safety awareness, making it a valuable
learning opportunity for students and hobbyists alike.

17

You might also like