Professional Documents
Culture Documents
Home Security System: Department of Ece
Home Security System: Department of Ece
PRESENTED BY
1.SYED OWAIS MOHIUDDIN (16M21A0477)
2.MUBINA BEGUM (17M25A0403)
3.MOHAMMED BILAL (16M21A0466)
4.MD.ADIL (15H11A0402)
• The Main Aim of the Project is “To Design and Implement the home
security system using micro controller”.
ABSTRACT
• This system helps you to upgrade your safety standards, comply statutory
requirements on environmental commitments.
• The most important and basic function being prevent accidents and
protect life and property from disaster
BLOCK DIAGRAM
POWER SUPPLY
MICRO
INTERFACING
CONTROLLER
CIRCUIT
INTERFACING BUZZER
CIRCUIT
THEFT SENSOR
SCHEMATIC DIAGRAM
HARDWARE COMPONENTS
• Power Supply
• 8051 microcontroller
• Gas Sensor
• Fire Sensor
• IR Sensor
• 16*2 LCD Display
• Buzzer
POWER SUPPLY
Transformer
Rectifier
Filter
Voltage Regulator
FILTERS:
• Filter remove unwanted frequency components from applied signal.
• It can be active or passive and analog or digital.
VOLTAGE REGULATOR
• It regulates the voltage, there are two types of regulators
a . Fixed Regulator
b . Variable Regulator
• We are using fixed regulators, There are two series
i. Series 7805
ii. Series 7905
• We are using series 7805 it provides
positive regulated voltage from
5v to 12v
MICRO CONTROLLER
FEATURES OF AT89C52:
• Compatible with MCS-51 Products
• 8K Bytes of In-System Reprogrammable Flash Memory
• Fully Static Operation: 0 Hz to 24 MHz
• Three-level Program Memory Lock
• 256 x 8-bit Internal RAM
• 32 Programmable I/O Lines
• Three 16-bit Timer/Counters
• Eight Interrupt Sources
• Programmable Serial Channel
• Low-power Idle and Power-down Modes
• 40-pin DIP
PIN DIAGRAM:
POWER SUPPLY PINS :
There are total 7 pins
– PC6 is Reset Pin
– IOREF
– 3.3V
– 5V
– GND
– GND
– Vin (I/P voltage)
PIN DIAGRAM
SENSORS
• A sensor is a device that detects and responds to some type of input from
the physical environment.
GAS SENSOR(MQ2):
• Gas sensor detects combustible gases and smoke.
WORKING PRINCIPLE
• MQ2 Gas sensor works on 5V DC
and draws around 800mW.
• It can detect LPG,Alcohol, Propane,
hydrogen,Methane concentration
any where from 200 to 10000ppm.
SPECIFICATION:
• Power Supply: 5 Volts
• Interface Type: Analog & Digital
• High Sensitivity to Smoke & combustible gasses like Hydrogen, LPG &
Propane.
• Low Cost.
• Stable & Long Life.
• On board Power indication.
Pin detail:
• pin 1: Vcc +5V
• pin 2: Ground
• pin 3: Digital out
• pin 4: Analog out
FIRE SENSOR:
• Detects fire and outputs digital and analog signal. The digital signal can
have a trigger level. LEDs indicate power and output signal.
Pin details
• VCC = 3.3V to 5V DC
• GND = Ground
• DO = Digital Output
• AO = Analog Output
SPECIFICATIONS:
• Operating Voltage: 3.3V to 5V DC
• Operating Current: 15ma
• Output Digital - 0V to 5V, Adjustable trigger level from preset
• Output Analog - 0V to 5V based on infrared radiation from fire
flame falling on the sensor
• LEDs indicating output and power
• PCB Size: 3.2cm x 1.4cm
• LM393 based design
IR SENSOR
FEATURES:
• Digital output
• Typical response time: 39ms
• Range: 10 to 80cm
• Typical startup delay: 44ms
• Average current consumption: 30mA
BUZZER
• A buzzer or beeper is a signalling device,
usually electronic, typically used in
automobiles, household appliances
such as a microwave oven, or
game shows etc.
16*2 LCD DISPLAY
• An LCD is an electronic display Module which uses liquid crystal to
• 2 lines by 16 character
PIN DESCRIPTION:
Pin 1- Ground
Pin 6 – Enable
KEIL UVISION:
• Proteus ISIS is the best simulation software in the world for various
designs with electronics & microcontroller.
• It is mainly popular because of availability of almost all microcontrollers
in it.
• So it is a handy tool to test programs and embedded designs for
electronics hobbyist & expert.
COMPONENTS INTERFACING WITH
MICROCONTROLLER
Micro controller Component
port number Name Sensor pins Description
#include<reg51.h>
//Function declarations
void cct_init(void);
void delay(int);
void lcdinit(void);
void writecmd(int);
void writedata(char);
void ReturnHome(void);
void LCD_String (char *str);
// Defines Pins
sbit RS = P2^0;
sbit E = P2^1;
// ***********************************************************
// Main program
//
void main(void)
{
cct_init(); //Make all ports zero
lcdinit();
ir=1;
fire=1;
buzz=1;
gas=1;
writecmd(0x80);LCD_String("HOME SECURITY");
writecmd(0xC0);LCD_String(" SYSTEM ");
delay(200);
writecmd(0x01);
while(1)
{
writecmd(0x80);LCD_String("Sensor Detection");
if(ir==0){writecmd(0x01);buzz=1;}
else{ writecmd(0x80);LCD_String("Sensor Detection");
writecmd(0xc0);LCD_String("Theft detected");buzz=0;}
if(fire==0){writecmd(0x80);LCD_String("Sensor Detection");
writecmd(0xc0);LCD_String("Fire detected");buzz=0;}
else{writecmd(0x01);buzz=1;}
if(gas==0){writecmd(0x80);LCD_String("Sensor Detection");
writecmd(0xc0);LCD_String("Gas detected");buzz=0;}
else{writecmd(0x01);buzz=1;}
}
}
void cct_init(void)
{
P0 = 0x00; //not used
P1 = 0x00; //not used
P2 = 0x00; //used as data port
P3 = 0x00; //used for generating E and RS
}
void delay(int t)
{
unsigned int i,j;
for(i=0;i<1275;i++)//1microsec
for(j=0;j<t;j++);
}
void writedata(char t)
{
RS = 1; // This is data
P2 &= 0x0F; // Make P2.4 to P2.7 zero
P2 |= (t&0xF0); // Write Upper nibble of data
E = 1; // => E = 1
delay(1);
E = 0; // => E = 0
E = 1; // => E = 1
delay(1);
E = 0; // => E = 0
}
void writecmd(int z)
{
RS = 0; // This is command
E = 1; // => E = 1
delay(1);
E = 0; // => E = 0
void lcdinit(void)
{
///////////// Reset process from datasheet /////////
// delay(150);
E = 1; // => E = 1
delay(1);
E = 0; // => E = 0
P2 &= 0x0F; // Make P2.4 to P2.7 zero
P2 |= (0x30&0xF0); // Write 0x3
E = 1; // => E = 1
delay(1);
E = 0; // => E = 0
E = 1; // => E = 1
delay(1);
E = 0; // => E = 0
P2 &= 0x0F; // Make P2.4 to P2.7 zero
P2 |= (0x20&0xF0); // Write 0x2
E = 1; // => E = 1
delay(1);
E = 0; // => E = 0
/////////////////////////////////////////////////////
writecmd(0x28); //function set
writecmd(0x0c); //display on,cursor off,blink off
writecmd(0x01); //clear display
writecmd(0x06); //entry mode, set increment
}
void ReturnHome(void) //Return to 0 location
{
writecmd(0x02);
delay(1500);
}
void LCD_String (char *str)
/* Send string to LCD function */
{
int i;
for(i=0;str[i]!=0;i++)
/* Send each char of string till the NULL */
{
writedata(str[i]);
/* Call LCD data write */
}
}
FLOWCHART
ADVANTAGES
• It is cost effective.
• Simple and reliable.
• Time complexity is less compared to other projects.
• The speed of execution increases as the hardware complexity decreases.
APPLICATIONS
• Used in lockers.
• Used home security.
• Used in top secret labrotories
• Miltary bases
BIBLIOGRAPHY