0% found this document useful (0 votes)
259 views25 pages

8051 PRJ

The document is a project report on a smoke alarm system using an 8051 microcontroller. The system consists of a smoke sensor, 8051 microcontroller, alarm circuit including a buzzer, and a power supply. The smoke sensor detects smoke and sends a signal to the microcontroller, which then activates the alarm circuit to alert occupants of potential fire hazards. The report provides details on the hardware components, software flow, testing process, and applications of the smoke alarm system.

Uploaded by

Parth
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)
259 views25 pages

8051 PRJ

The document is a project report on a smoke alarm system using an 8051 microcontroller. The system consists of a smoke sensor, 8051 microcontroller, alarm circuit including a buzzer, and a power supply. The smoke sensor detects smoke and sends a signal to the microcontroller, which then activates the alarm circuit to alert occupants of potential fire hazards. The report provides details on the hardware components, software flow, testing process, and applications of the smoke alarm system.

Uploaded by

Parth
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
You are on page 1/ 25

Mini Project Report on

Smoke Alarm System using 8051 Microcontroller


for

Mini Project 1A (REV- 2019 ‘C’ Scheme) of Second Year, (SE Sem-IV)
In

Electronics & Telecommunication Engineering

SUBMITTED BY

PRATHAM SAPKAL (34)

RATNESH WAGHARE (42)

ANKITA DARNULE (08)

JAY GANGAN (12)

UNDER GUIDANCE OF
MR. ADITYA DESAI

DEPARTMENT OF ELECTRONICS AND TELECOMMUNICATION ENGINEERING

SHREE L. R. TIWARI COLLEGE OF ENGINEERING,


KANAKIA PARK, MIRA ROAD (E) – 401 107

UNIVERSITY OF MUMBAI
Academic Year 2022–2023

1
UNIVERSITY OF MUMBAI Shree L. R. Tiwari college of Engineering

CERTIFICATE
This is to certify that the requirements for the Mini Project entitled “Smoke
Alarm System using 8051 Microcontroller” have been successfully completed by
following SE/T.E. Electronics and Telecommunication students.

PRATHAM SAPKAL (34)

RATNESH WAGHARE (42)

ANKITA DARNULE (08)

JAY GANGAN (12)

in partial fulfillment of Mumbai University in the Department of Electronics


and Telecommunication, Shree L. R. Tiwari College of Engineering, Mira Road
(E) – 401107 for Academic year 2022 - 2023.

Internal Examiner External Examiner

( Mr. ADITYA DESAI) Mrs. Aboli Moharil


Guide H.O.D. EXTC

2
ACKNOWLEGDEMENT

Special thanks to our Guide Mr. Aditya Desai for assisting us to partially complete our

Mini Project on “Smoke Alarm System using 8051 Microcontroller”.

His expertise and talent in designing and troubleshooting projects helped us effectively to
partially complete this project.

We'd like to express our gratitude to Mr. Aditya Desai sir, our Project Coordinator (Mini
Project), for guiding us through the process to fulfil Mumbai University's Mini Project
requirements.

Special thanks to Head of Department Mrs. Aboli Moharil madam for her constant
motivation, without which this work would not have become successful.

We are also thankful to our Principal Dr. Deven Shah sir for his continuous
encouragement throughout the process.

We would also like to thank our Electronics and Telecommunication Department for
providing us online/offline facility and labs, which helped us constantly in increasing our technical
knowledge, and to write this report.

3
INDEX

Page No.
Abstract 05

1. INTRODUCTION 06
Abstract
Objective
General Overview of Project
2. BLOCK DIAGRAM 07
3. HARDWARE SCHEME 08
Circuit Diagram
Circuit Diagram Description
Circuit Working
Component List
4. SOFTWARE SCHEME 15
Software Used
Flow Chart
Code
Program Algorithm
5. TESTING/RESULT AND ANALYSIS 21
6. CONCLUSION 22
7. APPLICATION 23
8. FUTURE SCOPE 24
9. REFERENCE 25

4
Abstract
A smoke alarm system using 8051 microcontroller is an electronic device designed to detect the
presence of smoke in a room or building and alert occupants of a potential fire hazard. The system
consists of a smoke sensor, 8051 microcontroller, alarm circuit, and power supply. The smoke
sensor detects the presence of smoke particles in the air, which triggers the microcontroller to
activate the alarm circuit. The alarm circuit may include buzzer to alert occupants of the building
of a potential fire hazard. Overall, a smoke alarm system using 8051 microcontroller is an
effective and reliable way to detect and alert occupants of a potential fire hazard. It can be used in
residential and commercial buildings to provide an added layer of safety and protection against
fire.

5
INTRODUCTION
Abstract
A smoke alarm system using 8051 microcontroller is an electronic device designed to detect the
presence of smoke in a room or building and alert occupants of a potential fire hazard. The system
consists of a smoke sensor, 8051 microcontroller, alarm circuit, and power supply. The smoke
sensor detects the presence of smoke particles in the air, which triggers the microcontroller to
activate the alarm circuit. The alarm circuit may include buzzer to alert occupants of the building
of a potential fire hazard. Overall, a smoke alarm system using 8051 microcontroller is an
effective and reliable way to detect and alert occupants of a potential fire hazard. It can be used in
residential and commercial buildings to provide an added layer of safety and protection against
fire.

Objective
The main objective of the Smoke Alarm system using 8051 Microcontroller is to provide an early
warning system for potential fires by detecting smoke particles in the air. The system aims to
improve safety in residential and commercial buildings by alerting occupants of a potential fire
hazard in a timely manner. Additionally, the system is designed to be cost-effective, easy to install,
and reliable, making it an ideal solution for a variety of settings. Overall, the smoke alarm system
using 8051 aims to prevent property damage and save lives by detecting fires at an early stage.

General Overview of Project


The 8051 microcontroller is responsible for controlling the smoke alarm system. It receives input
from the smoke sensor and processes the information to determine if there is a potential fire
hazard. If there is, the microcontroller activates the alarm circuit to alert occupants of the building.
The power supply for the smoke alarm system is typically a battery. The battery backup is
essential in case of power failure, ensuring that the smoke alarm system remains operational.

6
BLOCK DIAGRAM

7
HARDWARE SCHEME

Circuit Diagram

8
Circuit Description
Smoke Sensor: The smoke sensor used in this circuit is usually an optical sensor that detects the
presence of smoke in the air. It consists of an infrared LED and a photodiode that detects the
scattering of light caused by smoke particles.
8051 Microcontroller: The 8051 microcontroller is the heart of the smoke alarm system. It
receives input from the smoke sensor and processes the information to determine if there is a
potential fire hazard. The microcontroller used in this circuit is programmed using C language.
Alarm Circuit: The alarm circuit is activated by the microcontroller when the smoke sensor detects
the presence of smoke particles. The alarm circuit may include a buzzer and LCD Display to alert
occupants of the building of a potential fire hazard.
Power Supply: The power supply for the smoke alarm system is a battery. The battery backup is
essential in case of power failure, ensuring that the smoke alarm system remains operational.

Circuit Working
When the smoke sensor detects the presence of smoke particles, it sends a signal to the 8051
Microcontroller. The microcontroller then processes this signal and activates the alarm circuit. The
alarm circuit generates a loud sound, which alerts the occupants of the building of a potential fire
hazard.

Component list
1. 8051 Microcontroller
2. 16X2 LCD Display
3. MQ2 Smoke Sensor
4. Buzzer
5. BC547 Transistor
6. 1K Ohm Resistor

9
8051 Microcontroller
The 8051 microcontroller is an 8-bit microcontroller that was first introduced by Intel in 1980. It
has since become a popular and versatile microcontroller that is widely used in embedded systems
and control applications. It is based on a Harvard architecture and has a wide range of applications
in various electronic systems such as automation, robotics, and embedded systems. The 8051
microcontroller has 4 KB of ROM, 128 bytes of RAM, and 32 I/O lines. It also has a built-in
UART, Timers, and Interrupts, which makes it easy to interface with other devices. The 8051
microcontroller supports a wide range of communication protocols such as SPI, I2C, and UART.
It also supports various programming languages such as Assembly, C, and Basic. The 8051
microcontroller is a low-cost and low-power microcontroller that is easy to program and can be
used in various projects due to its compatibility with a wide range of sensors and actuators

10
16X2 LCD Display
The 16x2 LCD display is a widely used alphanumeric display that consists of 16 columns and 2
rows of characters. It is a popular display for displaying text in various electronic projects due to
its low cost, ease of use, and compatibility with microcontrollers. The display has a size of 16
characters in each row and 2 rows of characters. It operates at a voltage of 5V DC and typically
has a built-in backlight that can be turned on or off to improve visibility in low-light conditions.
The 16x2 LCD display uses a parallel interface to communicate with a microcontroller or other
device, requiring a set of data lines and control signals to transmit data to the display.

11
MQ2 Smoke Sensor:
MQ2 is one of the commonly used gas sensors in MQ sensor series. It is a Metal Oxide
Semiconductor (MOS) type Gas Sensor also known as Chemiresistors as the detection is based
upon change of resistance of the sensing material when the Gas comes in contact with the material.
Using a simple voltage divider network, concentrations of gas can be detected.
MQ2 Gas sensor works on 5V DC and draws around 800mW. It can detect LPG, Smoke, Alcohol,
Propane, Hydrogen, Methane and Carbon Monoxide concentrations anywhere from 200 to
10000ppm.

VCC supplies power for the module. You can connect it to 5V output from your
Arduino.
GND is the Ground Pin and needs to be connected to GND pin on the Arduino.
D0 provides a digital representation of the presence of combustible gases.
A0 provides analog output voltage in proportional to the concentration of
smoke/gas.

12
Buzzer:
A buzzer or beeper is an audio signalling device, which may be mechanical, electromechanical, or
piezoelectric (piezo for short). Typical uses of buzzers and Beepers include alarm devices, timers,
and confirmation of user input.

BC547 Transistor:
The BC547 is a general-purpose NPN bipolar junction transistor commonly used in electronic
circuits. It has a maximum current rating of 100 mA and a maximum voltage rating of 45 V.
The BC547 transistor is widely used in amplification and switching circuits due to its low noise,
high gain, and fast switching speed. It is commonly used in small signal applications such as audio
amplifiers, signal processing, and voltage regulators. The BC547 is a popular choice for hobbyists
and professionals alike due to its low cost and versatility.

13
1K Ohm Resistor:
is an electronic component that provides resistance to the flow of electrical current in a circuit. It
has a resistance value of 1000 ohms, which means that it will restrict the flow of current to a
certain degree. The 1K ohm resistor is one of the most commonly used resistors in electronic
circuits due to its availability, low cost, and versatility.

14
SOFTWARE SCHEME
Software Used
Keil μVision5:- It is a window-based software development platform that combines a robust and
modern editor with a project manager and make facility tool. It integrates all the tools needed to
develop embedded applications including a C/C++ compiler, macro assembler, linker/locator, and
a HEX file generator.
Proteus 8:- The Proteus Design Suite is a proprietary software tool suite used primarily for
electronic design automation. The software is used mainly by electronic design engineers and
technicians to create schematics and electronic prints for manufacturing printed circuit boards.

15
Flow Chart

16
Code
#include<reg51.h>
#define lcd P2

sbit GAS=P1^0;

sbit rs=P3^7; //register select


sbit rw=P3^6; //RW
sbit en=P3^5; //enable
sbit Buzzer=P0^0; //alarm

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

void main()
{
Buzzer=0;
lcd_init();
lcd_string(" SE-EXTC ");
while(1) {
if(GAS) {
cmd(0xc0);
lcd_string(" Gas Detected ");
Buzzer=1;
delay();
} else {
cmd(0xc0);
lcd_string("No Gas Detected");

17
Buzzer=0;
delay();
}
}
}

void lcd_init()
{
cmd(0x38);
cmd(0x0e);
cmd(0x06);
cmd(0x01);
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;

18
delay();
en=0;
}

void lcd_string(char *s)


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

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

19
Program Algorithm
This is a code for a gas sensor system with a 16x2 LCD display and a buzzer.
The system detects gas using a gas sensor connected to P1.0 of the microcontroller.
The code initializes the LCD display and shows "SE-EXTC" on the first line.
It then enters a while loop that continuously checks the gas sensor.
If gas is detected, it shows "Gas Detected" on the second line of the LCD display and activates the
buzzer.
If no gas is detected, it shows "No Gas Detected" on the second line of the LCD display and turns
off the buzzer.
The functions used in this code are:
lcd_init(): Initializes the LCD display with the required commands.
cmd(unsigned char): Sends a command to the LCD display.
dat(unsigned char): Sends data to the LCD display.
lcd_string(char*): Displays a string on the LCD display.
delay(): Creates a delay of 20000 cycles.
The code uses the 8051 microcontroller with three control pins (P3.5, P3.6, P3.7) connected to the
RS, RW, and EN pins of the LCD display, respectively.
The LCD data pins are connected to P2.0-P2.7 of the microcontroller, while the gas sensor is
connected to P1.0.
The buzzer is connected to P0.0 of the microcontroller.

20
TESTING/RESULT AND ANALYSIS
When the circuit is on everything is stable so it Display ‘No Gas Detected’, but when the smoke
particle’s is detected by MQ2 Sensor, it sends a signal to the 8051 Microcontroller. The
microcontroller then processes this signal and activates the Buzzer and Display ‘Gas Detected’
message on the 16X2 LCD Display.

21
CONCLUSION
A smoke alarm system using 8051 microcontroller is an efficient and reliable method for detecting
and alerting occupants of a potential fire hazard. The smoke sensor detects the presence of smoke
particles in the air, which triggers the microcontroller to activate the Buzzer and display message
on LCD display. Overall, a smoke alarm system using 8051 microcontroller is an effective and
cost-effective solution for ensuring the safety of residential and commercial buildings. It provides
an added layer of protection against fire hazards and ensures that occupants can be alerted in a
timely manner in case of emergencies.

22
APPLICATION
1. Residential Buildings: The smoke alarm system is commonly used in homes to detect and
alert occupants of a potential fire hazard. It can be installed in bedrooms, living rooms, and
other areas of the home.

2. Commercial Buildings: The smoke alarm system is also used in commercial buildings,
such as offices, shopping malls, and hospitals. It can be installed in common areas, such as
hallways and stairwells, to ensure the safety of occupants in case of fire.

3. Industrial Settings: The smoke alarm system is used in industrial settings, such as factories
and warehouses, to detect and alert workers of a potential fire hazard. It can be installed in
high-risk areas, such as near machinery or hazardous materials.

4. Automotive Industry: The smoke alarm system is used in the automotive industry to detect
and alert drivers of a potential fire hazard. It can be installed in cars and trucks to ensure
the safety of drivers and passengers.

5. Aerospace Industry: The smoke alarm system is used in the aerospace industry to detect
and alert astronauts of a potential fire hazard in spacecraft. It can be installed in various
parts of the spacecraft to ensure the safety of astronauts during space missions.

Overall, a smoke alarm system using 8051 microcontroller has widespread applications in various
industries and settings, ensuring the safety of occupants and workers in case of fire emergencies.

23
FURTURE SCOPE
1. Integration with IoT: The smoke alarm system can be integrated with the Internet of
Things (IoT) to provide real-time data on the status of the system. This integration can help
in the early detection of fire hazards, enabling a timely response.

2. Machine Learning: Machine learning algorithms can be incorporated into the smoke alarm
system to improve the accuracy of the detection of smoke particles. This will help in
reducing false alarms and enhancing the overall reliability of the system.

3. Remote Monitoring: The smoke alarm system can be monitored remotely using a mobile
application. This will enable users to monitor the status of the system from anywhere,
anytime.

4. Improved Battery Life: Battery life can be improved by incorporating low power
consumption sensors and microcontrollers. This will help in reducing the overall cost of
the system and ensuring that the system remains operational during power failures.

5. Integration with Smart Home Systems: The smoke alarm system can be integrated with
smart home systems to provide a comprehensive solution for home automation. This
integration will enable users to control the smoke alarm system remotely and receive
notifications on their mobile devices.

Overall, the future scope of smoke alarm system using 8051 microcontroller is promising, with
several advancements expected to enhance the reliability and functionality of the system. These
advancements will help in ensuring the safety of occupants in various industries and settings.

24
REFERENCE
[1]. Radiation-Hardened-by-Design (RHBD) Digital Design Approaches: A Case Study on an
8051 Microcontroller
Kwen-Siong Chong;Ne Kyaw Zwa Lwin;Wei Shu;Joseph S. Chang
2020 IEEE International Symposium on Circuits and Systems (ISCAS)
Year: 2020 | Conference Paper | Publisher: IEEE
[2]. Application Oriented Sensor Database System
G. S. R. Satyanarayana;Debarka Chakraborty;Santos Kumar Das
2017 International Conference on Networking and Network Applications (NaNA)
Year: 2017 | Conference Paper | Publisher: IEEE

25

You might also like