Home Security System Using Microcontroller 8051: Project Synopsis On

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 19

A

Project Synopsis on

Home Security System Using Microcontroller


8051
Submitted by
Name of student-: Deepesh Pratap Singh
Rahul Singh
Roll No -:131100020
131100042
In Partial Fulfillment of Semester VII

B. Tech. (Electrical)
2016-2017
Under the guidance of
Name of Supervisor-: Mr.Shakti Singh Soni

DEPARTMENT OF ELECTRICAL ENGINEERING

GLA UNIVERSITY MATHURA


MATHURA-281406

Year: 2016
Synopsis
Title of Dissertation

Home Security System Using Microcontroller


8051
Abstract
Home security system project consist of three basic
modules. First is IR transmitter and receiver module which
works for the safety of doors at night or in case we are out
of home. When the IR sensors are interrupted, a buzzer if
turned on indicating someone is entered into house. Second
module is LPG gas sensor. It is provided to detect the LPG
Gas leakage. A buzzer is turned on when Gas is detected by
the sensor. Third part of project serves the functionality of a
door-latch opening using a password entered through
keypad. This module also turns on buzzer if 3 wrong
passwords are entered consequently. Data from all modules
is sent to a computer through serial port.

Chapter 1: Introduction
The Intel 8051 is an 8-bit microcontroller which means that
most available operations are limited to 8 bits. There are 3
basic "sizes" of the 8051: Short, Standard, and Extended.
The Short and Standard chips are often available in DIP
(dual in-line package) form, but the Extended 8051 models
often have a different form factor, and are not "drop-in
compatible". All these things are called 8051 because they
can all be programmed using 8051 assembly language, and
they all share certain features (although the different models
all have their own special features).
Some of the features that have made the 8051 popular are:

4 KB on chip program memory.


128 bytes on chip data memory(RAM)

[ 32 bank reg + 16 bit addressable reg + 80 general purpose


reg ]

4 reg banks.
128 user defined software flags.
8-bit data bus
16-bit address bus
16 bit timers (usually 2, but may have more, or less).
3 internal and 2 external interrupts.
Bit as well as byte addressable RAM area of 16 bytes.
Four 8-bit ports, (short models have two 8-bit ports).
16-bit program counter and data pointer.
1 Microsecond instruction cycle with 12 MHz Crystal.

8051 models may also have a number of special, modelspecific features, such as UART, ADC, Op_Amps, etc... it is
a very powerful micro controller.

Chapter 2 Pin Diagram

Chapter 3: Block Diagram

Chapter 4 Part of 8051 Microcontroller

LPG SENSOR

Principle Introduction:
Sensitive material of MQ-6 gas sensor is SnO2, which
with lower conductivity in clean air. When the target
flammable gas exist, the sensors conductivity gets
higher along with the gas concentration rising. Users
can convert the change of conductivity to correspond
output signal of gas concentration through a simple
circuit.
MQ-6 gas sensor can detect kinds of flammable

gases, especially has high sensitivity to LPG


(propane). It is a kind of lowcost sensor for many
applications.

Applications:
It is widely used in domestic gas leakage alarm,
industrial flammable gas alarm and portable gas
detector.

Technical parameters:
Model
Sensor Type
Standard Encapsulation
Target Gas
Detection range
Loop Voltage
Standard Heater
Circuit
Voltage
Conditions Load
Resistance
Sensor
Heater
character Resistance
under
Heater
standard consumption
test
conditions Sensitivity
Output
Voltage

MQ-6
Semiconductor
Bakelite, Metal cap
LPG
30010000ppmPropane
Vc 24V DC
VH5.0V0.1V AC or DC
RL Adjustable
RH 263(room tem.)
PH 950mW
Rs(in air)/Rs( in 2000ppm
C3H8)5
Vs 2.5V4.0V (in 2000ppm
C3H8)
S

Concentration

Slope
Tem. Humidity
Standard
Standard test
test
conditions circuit
Preheat time

0.6(R3000ppm/R1000ppm
C3H8)
20255%5%RH
Vc:5.0V0.1V
VH:5.0V0.1V
Over 48 hours

TEMPERATURE SENSOR-

Description: This is the same temperature


sensor that is included in our SparkFun
Inventors Kit. The TMP36 is a low voltage,
precision centigrade temperature sensor. It
provides a voltage output that is linearly
proportional to the Celsius temperature. It also
doesnt require any external calibration to
provide typical accuracies of 1C at +25C and

2C over the 40C to +125C temperature


range. We like it because its so easy to use:
Just give the device a ground and 2.7 to 5.5
VDC and read the voltage on the Vout pin. The
output voltage can be converted to temperature
easily using the scale factor of 10 mV/C.
Features:

Voltage Input: 2.7 V to 5.5 VDC


10 mV/C scale factor
2C accuracy over temperature
0.5C linearity
Operating Range: 40C to +125C

DC MOTOR

A DC motor is any of a class of electrical


machines that converts direct current electrical
power into mechanical power. The most
common types rely on the forces produced by
magnetic fields. Nearly all types of DC motors
have some internal mechanism, either
electromechanical or electronic, to periodically
change the direction of current flow in part of the
motor. Most types produce rotary motion; a
linear motor directly produces force and motion
in a straight line.
DC motors were the first type widely used, since
they could be powered from existing directcurrent lighting power distribution systems. A DC
motor's speed can be controlled over a wide
range, using either a variable supply voltage or
by changing the strength of current in its field
windings. Small DC motors are used in tools,
toys, and appliances. The universal motor can
operate on direct current but is a lightweight
motor used for portable power tools and
appliances. Larger DC motors are used in
propulsion of electric vehicles, elevator and
hoists, or in drives for steel rolling mills. The
advent of power electronics has made
replacement of DC motors with AC
motors possible in man

LCD DISPLAY

Display units are the most important output devices


in embedded projects and electronics products. 16x2
LCD is one of the most used display unit. 16x2 LCD
means that there are two rows in which 16 characters
can be displayed per line, and each character takes
5X7 matrix space on LCD. In this tutorial we are going
to connect 16X2 LCD module to the 8051
microcontroller (AT89S52). Interfacing LCD with

8051 microcontroller might look quite complex to


newbies, but after understanding the concept it would
look very simple and easy. Although it may be time
taking because you need to understand and connect
16 pins of LCD to the microcontroller. So first let's
understand the 16 pins of LCD module.
We can divide it in five categories, Power Pins,
contrast pin, Control Pins, Data pins and Backlight
pins.
Category Pin
NO.
Power
Pins

1
2

Pin
Name

Function

VSS

Ground
Ground

Pin,

connected

to

VDD
Vcc

or Voltage Pin +5V


or Contrast Setting, connected to
Vcc thorough a variable resistor.

Contrast
Pin

V0
VEE

Control
Pins

RS

Register Select
Command mode,
RS=1 Data mode

Pin,

RS=0

RW

Read/ Write pin, RW=0 Write


mode,
RW=1 Read mode

6
Data Pins 7-14

Backlight
Pins

15
16

Enable, a high to low pulse


need to enable the LCD

D0-D7

Data Pins, Stores the Data to be


displayed on LCD or the
command instructions

LED+
A

or To power the Backlight +5V

LED- or K Backlight Ground

All the pins are clearly understandable by their


name and functions, except the control pins, so they
are explained below:
RS: RS is the register select pin. We need to set it
to 1, if we are sending some data to be displayed on
LCD. And we will set it to 0 if we are sending some
command instruction like clear the screen (hex code
01).
RW: This is Read/write pin, we will set it to 0, if we
are going to write some data on LCD. And set it to 1,

if we are reading from LCD module. Generally this is


set to 0, because we do not have need to read data
from LCD. Only one instruction Get LCD status,
need to be read some times.
E: This pin is used to enable the module when a
high to low pulse is given to it. A pulse of 450 ns
should be given. That transition from HIGH to LOW
makes the module ENABLE.
There are some preset command instructions in
LCD, we have used them in our program below to
prepare the LCD (in lcd_init () function). Some
important command instructions are given below:
Hex Code

Command to LCD Instruction Register

0F

LCD ON, cursor ON

01

Clear display screen

02

Return home

04

Decrement cursor (shift cursor to left)

06

Increment cursor (shift cursor to right)

05

Shift display right

07

Shift display left

0E

Display ON, cursor blinking

80

Force cursor to beginning of first line

C0

Force cursor to beginning of second line

38

2 lines and 57 matrix

83

Cursor line 1 position 3

3C

Activate second line

08

Display OFF, cursor OFF

C1

Jump to second line, position 1

OC

Display ON, cursor OFF

C1

Jump to second line, position 1

C2

Jump to second line, position 2

MAX 232

The MAX232 is an integrated circuit first created in


1987 by Maxim Integrated Products that converts
signals from a TIA-232 (RS-232) serial port to signals
suitable for use in TTL-compatible digital logic circuits.
The MAX232 is a dual transmitter / dual receiver that
typically is used to convert the RX, TX, CTS, RTS
signals.
The drivers provide TIA-232 voltage level outputs
(about 7.5 volts) from a single 5-volt supply by onchip charge pumps and external capacitors. This
makes it useful for implementing TIA-232 in devices
that otherwise do not need any other voltages.
The receivers reduce TIA-232 inputs, which may be
as high as 25 volts, to standard 5 volt TTL levels.
These receivers have a typical threshold of 1.3 volts
and a typical hysteresis of 0.5 volts.
The MAX232 replaced an older pair of chips MC1488
and MC1489 that performed similar RS-232

translation. The MC1488 quad transmitter chip


required 12 volt and -12 volt power,[1] and MC1489
quad receiver chip required 5 volt power.[2] The main
disadvantages of this older solution was the +/- 12
volt power requirement, only supported 5 volt digital
logic, and two chips instead of one.

BUZZER
Buzzer interface with 8051 microcontroller
Buzzer is a electronic device that converts the
electronic signal into buzzing noise, that is applied to
it. It can be used as electronic bell or as quiz buzzer
in many applications around us. Here, i world like to
discuss the interfacing of a small buzzer with 8051
microcontroller and how different projects can be
constructed.

Buzzer Interfacing:
This project shows the interface with AT89S52
microcontroller to a buzzer. When a push button is
pressed, the buzzer will get ON and OFF (number of
times set in the code) and then stops.

Circuit Diagram:
- The port P1 of the microcontroller is connected to
buzzer. This type of connection is possible, if the
current requirements of the buzzer is not more than
20mA. The output is in current source mode so that

buzzer will turn ON when the output of the port is logic


LOW. Switch is connected to port P3 which remains
at logic HIGH by pull up resistor.

ReferencesWikipedia

Appendix A: Software Listing


B: Simulation Results

Name of student-:
Deepesh Pratap Singh
Rahul Singh

Mr. Sakti Singh Soni


(Project Guide)

You might also like