0% found this document useful (0 votes)
67 views20 pages

8051 Microcontroller Fire Alarm System

The document outlines a project on a Fire Alarm System using the 8051 microcontroller, detailing its objectives, implementation, advantages, and disadvantages. The system is designed to detect smoke and alert users through a buzzer and LCD display, emphasizing its importance in preventing fire-related damage. The project includes hardware components like the AT89C51 microcontroller, MQ-6 gas sensor, and ADC0804, along with software programming using Keil and Proteus.

Uploaded by

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

8051 Microcontroller Fire Alarm System

The document outlines a project on a Fire Alarm System using the 8051 microcontroller, detailing its objectives, implementation, advantages, and disadvantages. The system is designed to detect smoke and alert users through a buzzer and LCD display, emphasizing its importance in preventing fire-related damage. The project includes hardware components like the AT89C51 microcontroller, MQ-6 gas sensor, and ADC0804, along with software programming using Keil and Proteus.

Uploaded by

Nitin Khetade
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

College of Engineering, Pune

Depart. of Electronics and Telecommunication Engineering

SY Project – 2021-22

Project Name:FIRE ALARM SYSTEM USING 8051 MICROCONTROLLER

Done by:

1. 112007030 Nitin Khetade


2. 112007037 Amruta Mhetre
-Table of Contents

Sr. No. Topics Page No.

1. Abstract 3

2. Introduction 4

3. Objectives 5

4. Block Diagram 6

5. Implementation 7

6. Result 14

7. Advantages 17

8. Disadvantages 17

9. Conclusion 18

10. Reference 18

11. Appendix 19
Abstract:
Fire Alarm Circuit is a simple circuit that detects the fire and activates the
Buzzer. Fire Alarm Circuits are very important devices to detect fire in the right time
and prevent any damage to people and their property. Fire Alarm Circuits and Smoke
Sensors are the part of the security systems which help in detecting and preventing
damage. Installing Fire Alarm Systems and Smoke Sensors in commercial buildings like
school, colleges, offices, movie theatres, shopping malls and other public places is
compulsory.

There are many expensive and sophisticated Fire Alarm Circuit in the
form of stand-alone devices, but we have designed very simple Fire Alarm Circuits
using common components like 8051 micro - controller, ADC0804, 16 x 2 LCD display,
etc. This is a very simple alarm circuit using MQ 2 smoke sensor and a Buzzer. The
primary purpose of fire alarm system is to provide an early warning of fire so that
people can be evacuated& immediate action can be taken to stop or eliminate of the
fire effect as soon as possible. Alarm can be triggered by using detectors.
Introduction:
A fire alarm system is one of the basic systems that is required to be
installed in every household and building in many countries. Having the system
installed helps alert people of a possible fire, give them early warnings; automatically,
minimize the time it takes for the fire department to come; lower the risks of false fire
alarm; in the event of fault, it can tell the exact problem, it also have reduced damage
of property due to fire.

An automatic fire alarm is designs to detect the unwanted presence of


fire by monitoring environmental changes associated with combustion.

 The fire alarm system is classified as either automatically actuated,


manually actuated or both.
 The main objective of this project is To detect the automatically operated
fire and to control the spread of fire or smoke.
Objectives:
The objectives of this project are:
 To design a system that monitors smoke due to fire in an enclosed area
(home, car or industry);
 To design a system that display msg on LCD during detection of smoke.
 To design a system that alarms the user of smoke detection through a buzzer.
Smoke
Block Diagram:
Sensor

ADC

Power 8051 16 x 2
Supply Micro LCD
Controller

Buzzer
Implementation:
Hardware required:

1. AT89C51 microcontroller ic:

The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes


of Flash programmable and erasable read only memory (PEROM). The device is manufactured using
Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard
MCS-51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed
in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU
with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a
highly-flexible and cost-effective solution to many embedded control applications.

The AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of
RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full
duplex serial port, on-chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static
logic for operation down to zero frequency and supports two software selectable power saving modes.
The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system
to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator
disabling all other chip functions until the next hardware reset.
Pin Diagram:
2) MQ-6 Gas Sensor

MQ-6 is a semiconductor type gas sensor which detects the gas leakage. The sensitive
material of MQ-6 is tin dioxide (SnO2).It has very low conductivity in clean [Link] Gas sensor not
only has sensitivity to propane and butane but also to other natural gases, low sensitivity to cigarette
smoke and alcohol.

The concentration range of MQ-6 gas sensor is 200-1000ppm. This sensor is available in 6
pins package, out of which 4pins are used for fetching the signals and other 2 pins are used for
providing heating current. This sensor has fast response time. The power required by the sensor is 5V.
The sensor has different resistance value in different concentration.

They are used in gas leakage detecting equipment forhomes and industries. They are
suitable for detecting ofLPG, iso-butane, propane, Liquefied Natural Gas (LNG), very high
concentrations of alcohol, cooking fumes and cigarette smoke.

The features of an MQ-6 gas sensors are:

 High sensitivity to LPG, iso-butane, propane;


 Small sensitivity to alcohol, smoke;
 Fast response;
 Stable and long life; and
 Simple drive circuit.
3) 16 x 2 LCD Display:
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this
LCD each character is displayed in 5x7 pixel matrix. The 16 x 2 intelligent alphanumeric dot matrix
display is capable of displaying 224 different characters and symbols.

The 16×2 LCD pinout is shown below.

 Pin1 (Ground/Source Pin): This is a GND pin of display, used to connect the GND terminal of the
microcontroller unit or power source.
 Pin2 (VCC/Source Pin): This is the voltage supply pin of the display, used to connect the supply pin of the
power source.
 Pin3 (V0/VEE/Control Pin): This pin regulates the difference of the display, used to connect a changeable
POT that can supply 0 to 5V.
 Pin4 (Register Select/Control Pin): This pin toggles among command or data register, used to connect a
microcontroller unit pin and obtains either 0 or 1(0 = data mode, and 1 = command mode).
 Pin5 (Read/Write/Control Pin): This pin toggles the display among the read or writes operation, and it is
connected to a microcontroller unit pin to get either 0 or 1 (0 = Write Operation, and 1 = Read Operation).
 Pin 6 (Enable/Control Pin): This pin should be held high to execute Read/Write process, and it is connected
to the microcontroller unit & constantly held high.
 Pins 7-14 (Data Pins): These pins are used to send data to the display. In 8-wire mode, 8-pins are connected
to microcontroller unit like 0 to 7.
 Pin15 (+ve pin of the LED): This pin is connected to +5V
 Pin 16 (-ve pin of the LED): This pin is connected to GND.
4) Buzzer:
An audio signaling device like a beeper or buzzer may be electromechanical
or piezoelectric or mechanical type. The main function of this is to convert the signal from audio
to sound. Generally, it is powered through DC voltage and used in timers, alarm devices,
printers, alarms, computers, etc. Based on the various designs, it can generate different sounds
like alarm, music, bell & siren.

5) ADC:
ADC0804 is an IC (integrated circuit) which converts the input analog voltage to its
equivalent digital output. It is used to givd digital input to the microcontroller. We have used
ADC section of arduino board.

6) Power supply:
We have used power supply of 5V for this project.

Software used:
1) Keil

2) Proteus
Circuit Diagram:

 LCD –
 RS : P1.0
 RW : P1.1
 EN : P1.2
 Data Lines : P2

 Gassensor : P1.0  Buzzer : P3.0


So, we have made all the required circuit connections as per above circuit
diagram. We have used keil software for programming microcontroller and then we have
created hex file and burned it into the microcontroller.
Result:
A] Before detection of smoke
B] After detection of smoke
Voltage requirement for all components:
1. AT89C51
Minimum operating voltage = 4V
Maximum operating voltage = 5.5V
Maximum operating temperature = 125 ˚C

2. MQ 2 sensor
Minimum operating voltage = 3.5V
Maximum operating voltage = 5V
Maximum operating temperature = 250 ˚C

3. 16 x 2 LCD display
Minimum operating voltage = 4.7V
Maximum operating voltage = 5.3V
Maximum operating temperature = 85 ˚C

4. Buzzer
Minimum operating voltage = 1.5V
Maximum operating voltage = 12V
Maximum operating temperature = 260 ˚C

5. ADC
Minimum operating voltage = 2.5V
Maximum operating voltage = 6.5V
Advantages:
 Low cost
 Reliable
 Fast response
 Circuit can be easily constructed
 High level security
 Easy to design
 Easy to modify
 Low power consumption
 Early warning benefits
 Can easily be installed anywhere in commercial buildings
 Early warning is essential to effective fire safety because fires can occur at any time any
place
 Detection distance
 Speed of response
 Sensitivity
 Range of applications
 Portable

Disadvantages:
 False alarm sometimes
 Blinded by thick smoke
 Senses near range smoke/heat (fire) only
 Uses continuous power supply
Conclusion:
In the practical part, a system was developed with 8051 micro controller as the main
control unit, connected with other devices, such as: a smoke/gas sensor, an LED, a buzzer, a 16x2
LCD. The sensors monitored constantly, operated fire detectors in a fire alarm system, the LED and
buzzer acted as alarms. After some tests, the system worked successfully.

Also, the system has distinguished advantages and disadvantages. On the one hand, the
advantages are its low cost, easy installation, maintenance, replacement, and improvement the
system. On the other hand, the system has some disadvantages. The most notable disadvantage is
that the system is not connected to the fire department like a normal system. There are also a few
drawbacks about Micro controller such as the connection and short lifespan.

Finally, there are some suggestions that would improve the system, for example: -
Having a separate back-up power system - Ability to connect multiple sensors wirelessly - Creating an
app as a wireless control method, which would make controlling the system easier in general. These
improvements would make the system more reliable and give it more applications for real life
situations.

Reference:

8051 Microcontroller datasheet


:[Link]

Keil :[Link]

Proteus :[Link]

MQ 2 smoke sensor :[Link]


Appendix
Keil Programing:

#include<reg51.h>
#define lcd P2 // check

sbit GAS=P1^0;
sbit rs=P1^1; //register select
sbit rw=P1^2; //RW
sbit en=P1^3; //enable
sbit buzzer = P3^0;

void lcd_init();
void cmd(unsigned char);
void dat(unsigned char);
void delay();
void lcd_string(char *s);

void main(){
buzzer = 0;
GAS = 1;
lcd_init();
lcd_string(" Fire Alarm ");
cmd(0xc0);
lcd_string(" System ");
while(1) {
if(GAS == 1) {
cmd(0x01);
lcd_string("Fire Detected");
buzzer = 1;
delay();
}
else {
cmd(0x01);
lcd_string("Fire Alarm");
cmd(0xc0);
lcd_string(" System ");
}
}
}
void lcd_init(){
cmd(0x38);
cmd(0x01);
cmd(0x10);
cmd(0x0c);
cmd(0x80);
}

void cmd(unsigned char a){


lcd=a;
rs=0;
rw=0;
en=1;
delay();
en=0;
}

void dat(unsigned char b){


lcd=b;
rs=1;
rw=0;
en=1;
delay();
en=0;
}

void lcd_string(char *s){


while(*s) {
dat(*s++);
}
}

void delay(){
unsigned int i;
for(i=0;i<20000;i++);
}

Common questions

Powered by AI

The MQ-2 smoke sensor detects smoke and gases, with high sensitivity to LPG, iso-butane, and propane, and lesser sensitivity to alcohol and smoke. It operates by showing different resistance values at different gas concentrations . Limitations include its inability to sense through thick smoke and effective detection only in close proximity, potentially leading to false negatives if the smoke concentration isn't sufficient .

The programming workflow involves using Keil software to write and compile the code that empowers the 8051 microcontroller to process sensor data and control outputs, like the LCD and buzzer . It includes creating and loading a hex file into the microcontroller. This step is crucial as it defines the system's operational logic, ensuring components interact correctly to detect smoke and alert users, maintaining the system's effectiveness and reliability .

The fire alarm system using the 8051 microcontroller provides several advantages including low cost, easy installation, quick response time, and high-level security, making it suitable for commercial environments . However, it also presents disadvantages such as susceptibility to false alarms, limited detection range, and dependence on a continuous power supply. Additionally, it is not connected to the fire department and lacks wireless communication capabilities .

The fire alarm system's design aligns with the objectives by providing automatic smoke detection through the MQ-2 sensor and notifying users via a buzzer and LCD display upon detection, as intended. This setup fulfills the goal to detect and alert users of smoke in an enclosed area, effectively controlling potential fire spread . The 8051 microcontroller coordinates sensor data with these alert mechanisms, achieving efficient and timely warning .

The continuous power supply reliance poses risks like system failure during power outages, reducing reliability . Alternative solutions could include battery backups or solar power integration to ensure functionality during electrical disruptions. These alternatives would provide redundancy, ensuring the system remains operational under varied conditions and improving user confidence in its reliability.

Potential improvements include integrating a separate backup power system, enabling wireless sensor connections, and developing an app for wireless control. These changes would significantly enhance reliability by ensuring uninterrupted power supply and expanding sensor connectivity range, while the app would facilitate remote system monitoring and management . This could decrease false alarms and increase the system's adaptability to varying environments, ultimately improving overall performance.

Integrating a GSM module could greatly enhance connectivity by enabling the fire alarm system to send notifications via SMS or calls to predefined contacts or emergency services, regardless of its location . This capability would mean alerts could be sent even when the user is off-site, enhancing safety by shortening response times. Additionally, this connectivity ensures that users and authorities are aware of incidents in real-time, even during internet outages or other communication failures.

The 8051 microcontroller is critical in embedded applications due to its low power consumption, high-performance CMOS technology, and flexibility. It features 4K bytes of Flash memory for reprogramming, 32 I/O lines, and a full duplex serial port, making it highly versatile . Its idle and power-down modes ensure energy efficiency, which is crucial for continuous operations like a fire alarm system . These capabilities, combined with its cost-effectiveness, make it ideal for such applications.

Beyond conventional buildings, this fire alarm system could be adapted for use in vehicles, particularly to detect passenger compartment fires or engine compartment smoke. Its low cost and easy modification characteristics would suit installation in maritime vessels or remote industrial sites where robust, standalone systems are essential. Additionally, portable versions could provide temporary protection during outdoor events or for use in personal camping gear .

The 16x2 LCD display in the fire alarm system is used to provide a visual indication of smoke detection. It displays messages by using a 5x7 pixel matrix for each character across 2 lines with 16 characters each . Pin configurations include connections to the microcontroller: Pin1 and Pin16 are connected to ground, Pin2 to VCC, Pin4 toggles command/data registers, and Pins7-14 are used for data input .

You might also like