CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM CHAPTER 1 PREAMBLE 1.1 INTRODUCTION Home automation offers comfort and security. Home surveillance systems are being used for more than three decades. Many improvements have been made in the system and now it is yet to be commercialized due to the High cost of server usage .This study combines the use of Cloud computing and image processing. The standard cloud computing model is in which we make our services available to the general public over the Internet as long as they use our web interface . It emphasizes in enhancing home security using cloud computing technology. Cloud computing offers remote services with a user's data, software and computation. End users access cloud-based applications through a web browser or a light-weight desktop or mobile app while the business software and user's data are stored on servers at a remote location Its usage is very much needed for safety and security. This technology is used to detect an intruder at home when nobody is present. As soon as the intruder is in, the controller captures the video and sends it to the user and in turn he/she receives an SMS alert and is ready to watch the video of the intruded room through any remote device. DEPT. OF E&CE, GECH 2014 Page 1
83
Embed
Cloud Controlled Intrusion Detection & Burglary Prevention Stratagems in Home Automation Systems
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
CHAPTER 1
PREAMBLE
1.1 INTRODUCTION
Home automation offers comfort and security. Home surveillance systems are being used for
more than three decades. Many improvements have been made in the system and now it is
yet to be commercialized due to the High cost of server usage .This study combines the use
of Cloud computing and image processing. The standard cloud computing model is in which
we make our services available to the general public over the Internet as long as they use our
web interface . It emphasizes in enhancing home security using cloud computing technology.
Cloud computing offers remote services with a user's data, software and computation. End
users access cloud-based applications through a web browser or a light-weight desktop or
mobile app while the business software and user's data are stored on servers at a remote
location Its usage is very much needed for safety and security. This technology is used to
detect an intruder at home when nobody is present. As soon as the intruder is in, the
controller captures the video and sends it to the user and in turn he/she receives an SMS alert
and is ready to watch the video of the intruded room through any remote device.
1.2 Objective
To develop an intelligent security system where it helps the user to have a
secured home.
To prevent the burglary and intrusion
To get the real time video of the home environment when burglary or instrusion
is detected
DEPT. OF E&CE, GECH 2014 Page 1
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
1.3 Problem definition
Home automation, as a model of pervasive computing, is progressively becoming substantial
for people homed in developed societies. With the proliferation in the usage of household
electronic and electrical appliances, numerous data and multifarious control cumbersome
burden on residential home automation control units, making it expensive and difficult for
the users to autonomously install, control and monitor the home automation system.
Security surveillance part takes in significant number of home automation systems,
deploying digital cameras and sensors to monitor and report intrusion events and thereby
reducing damages caused by burglary
1.4 Methodology
1) Intrusion detected.
2) Report intrusion to cloud server.
3) Notify user with SMS.
4) User seeks surveillance views.
5) Output from surveillance cameras are streamed to cloud.
6) User views the status of all rooms.
7) User confirms real intrusion.
8) Action 1: inform neighbors.
9) Action 2: inform police.
10) Action 3: ringing alarm bell sound.
DEPT. OF E&CE, GECH 2014 Page 2
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
1.4 LITERATURE SURVEY
In our earlier works, we designed and implemented our cloud based home power
management system (a vital part of most home automation systems). The design of our home
automation system makes it low cost, flexible and easy to install. We replaced the traditional
electrical switch board of each room with our cloud connected board where each board is
a node of the home automation system, as a result creating an ad-hoc wireless network
among all the boards in a household, using 802.11n standard. The use of 802.11n empowers
us to create an ad-hoc network with adequate signal range to operate across a house and
concurrently connect each node of the distributed home automation system directly to the
cloud over Internet Protocol, without the requirement of dedicated or specialized gateway as
commonly required. In addition to an 802.11n radio, every node can be equipped with a low
cost Universal Mobile Telecommunications System (UMTS) Release 5 modem. Using such a
UMTS modem, we configured one board to act as the Internet gateway for an entire ad-hoc
network, by connecting it to a public High-Speed Downlink Packet Access (HSDPA)
network of a national Internet Service Provider (ISP) with down-link speed of 7.2 Megabit/s
and uplink speed of 1.8 Megabit/s.
Digital video recorder (DVR) captures videos continuously but it requires some human
resource to monitor it which is applicable only in organizations and business areas whereas
this will not be suitable for a home environment. If any motion is detected by the camera, it
will be sent to the controller. Controller analyses the signal and processes it by using
thresholding algorithm. By using LAN connection in the room, it can be transferred to the
cloud server and stored in it. To inform the status of the room, the user will be receiving the
SMS alert in his/her mobile. So, user can view the video of the intruder by entering the URL
of the server using internet connection anywhere from the world. If an alert is to be given, the
alert button on the page can be clicked so that the alarm rings. Alert is also sent to the nearby
police station to protect the house. Cloud computing (or simply cloud) refers to the online
services provided over the Internet together with the hardware and software resources of the
server that offer those services.
DEPT. OF E&CE, GECH 2014 Page 3
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
CHAPTER 2
CLOUD COMPUTING
2.1 What is cloud computing?
Cloud computing is a subscription-based service where you can obtain networked storage
space and computer resources. One way to think of cloud computing is to consider your
experience with email. Your email client, if it is Yahoo!, Gmail, Hotmail, and so on, takes
care of housing all of the hardware and software necessary to support your personal email
account. When you want to access your email you open your web browser, go to the email
client, and log in. The most important part of the equation is having internet access. Your
email is not housed on your physical computer; you access it through an internet connection,
and you can access it anywhere. If you are on a trip, at work, or down the street getting
coffee, you can check your email as long as you have access to the internet. Your email is
different than software installed on your computer, such as a word processing program.
When you create a document using word processing software, that document stays on the
device you used to make it unless you physically move it. An email client is similar to how
cloud computing works. Except instead of accessing just your email, you can choose what
information you have access to within the cloud.
Fig: 2.1 cloud computing
DEPT. OF E&CE, GECH 2014 Page 4
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
2.2 Use of cloud computing
The cloud makes it possible for you to access your information from anywhere at any time.
While a traditional computer setup requires you to be in the same location as your data
storage device, the cloud takes away that step. The cloud removes the need for you to be in
the same physical location as the hardware that stores your data. Your cloud provider can
both own and house the hardware and software necessary to run your home or business
applications. This is especially helpful for businesses that cannot afford the same amount of
hardware and storage space as a bigger company. Small companies can store their
information in the cloud, removing the cost of purchasing and storing memory devices.
Additionally, because you only reduce their subscription as their business grows or as they
find they need less storage space. One requirement is that you need to have an internet
connection in order to access the cloud. This means that if you want to look at a specific
document you have housed in the cloud, you must first establish an internet connection either
through a wireless or wired internet or a mobile broadband connection. The benefit is that
you can access that same document from wherever you are with any device that can access
the internet. These devices could be a desktop, laptop, tablet, or phone. This can also help
your business to function more smoothly because anyone who can connect to the internet and
your cloud can work on documents, access software, and store data. Imagine picking up your
smart phone and downloading a .pdf document to review instead of having to stop by the
office to print it or upload it to your laptop.
Fig: 2.2 use of cloud computation
DEPT. OF E&CE, GECH 2014 Page 5
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
CHAPTER 3
PROJECT OVERVIEW
3.1 BLOCK DIAGRAM
User
BUZZER
Fig: 3.1 block diagram of project
DEPT. OF E&CE, GECH 2014 Page 6
P89v51RD2
Power supply
PIR Sensor
UART
MAX232PC
Camera
Cloud sever
LCD Display
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
Fig: 3.2 working of project
DEPT. OF E&CE, GECH 2014 Page 7
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
Fig: 3.3 A photograph of the security surveillance page opened on a mobile
DEPT. OF E&CE, GECH 2014 Page 8
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
Fig: 3.4 A photograph of a mobile device displaying a SMS alert to the user
in case of an intrusion event.
DEPT. OF E&CE, GECH 2014 Page 9
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
CHAPTER 4
HARDWARE COMPONENTS
4.1 Microcontroller
4.1.1 P89V51RD2
The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and 1024 bytes of data
RAM.A key feature of the P89V51RD2 is its X2 mode option. The design engineer can
choose to run the application with the conventional 80C51 clock rate (12 clocks per machine
cycle) or select the X2 mode (6 clocks per machine cycle) to achieve twice the throughput at
the same clock frequency. Another way to benefit from this feature is to keep the same
performance by reducing the clock frequency by half, thus dramatically reducing the EMI.
The Flash program memory supports both parallel programming and in serial In-System
Programming (ISP). Parallel programming mode offers gang-programming at high speed,
reducing programming costs and time to market. ISP allows a device to be reprogrammed in
the end product under software control. The capability to field/update the application
firmware makes a wide range of applications possible. The P89V51RD2 is also In-
Application Programmable (IAP), allowing the Flash program memory to be reconfigured
even while the application is running.
4.1.2. FEATURES
80C51 Central Processing Unit
5 V Operating voltage from 0 to 40 MHz
64 kB of on-chip Flash program memory with ISP (In-System Programming) and
IAP (In-Application Programming)
Supports 12-clock (default) or 6-clock mode selection via software or ISP
DEPT. OF E&CE, GECH 2014 Page 10
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
SPI (Serial Peripheral Interface) and enhanced UART
PCA (Programmable Counter Array) with PWM and Capture/Compare functions
Four 8-bit I/O ports with three high-current Port 1 pins (16 mA each)
Three 16-bit timers/counters
Programmable Watchdog timer (WDT)
Eight interrupt sources with four priority levels
Second DPTR register
Low EMI mode (ALE inhibit)
TTL- and CMOS-compatible logic level.
Brown-out detection
Low power modes
Power-down mode with external interrupt wake-up
Idle mode
PDIP40, PLCC44 and TQFP44 packages
Brown-out detection
Low power modes
Power-down mode with external interrupt wake-up
Idle mode
DEPT. OF E&CE, GECH 2014 Page 11
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
4.1.3 BLOCK DIAGRAM OF P89V51RD2
Fig: 4.1 block dig of microcontroller P89V51RD2
DEPT. OF E&CE, GECH 2014 Page 12
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
Port 0: Port 0 is an 8-bit open drain bi-directional I/O port. Port 0 pins that have ‘1’s written
to them float, and in this state can be used as high-impedance inputs. Port 0 is also the
multiplexed low-order address and data bus during accesses to external code and data
memory. In this application, it uses strong internal pull-ups when transitioning to ‘1’s.Port 0
also receives the code bytes during the external host mode programming, and outputs the
code bytes during the external host mode verification. External pull-ups are required during
program verifications a general purpose I/O port.
Port 1: Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 pins are
pulled high by the internal pull-ups when ‘1 ’s are written to them and can be used as inputs
in this state. As inputs, Port 1 pins that are externally pulled LOW will source current (IIL)
because of the internal pull-ups. P1.5, P1.6, P1.7 have high current drive of 16 mA. Port 1
also receives the
low-order address bytes during the external host mode programming and verification.
Port 2: Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. Port 2 pins are pulled
HIGH by the internal pull-ups when ‘1’s are written to them and can be used as inputs in this
state. As inputs, Port 2 pins that are externally pulled LOW will source current (IIL) because
of the internal pull-ups. Port 2 sends the high-order address byte during fetches from external
program memory and during accesses to external Data Memory that use 16-bit address
(MOVX@DPTR). In this application, it uses strong internal pull-ups when transitioning to
‘1’s. Port 2 also receives some control signals and a partial of high-order address bits during
the external host mode programming and verification.
Port 3: Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. Port 3 pins are pulled
HIGH by the internal pull-ups when ‘1 ’s are written to them and can be used as inputs in this
state. As inputs, Port 3 pins that are externally pulled LOW will source current (IIL) because
of the internal pull-ups. Port 3 also receives some control signals and a partial of high-order
address bits during the external host mode programming and verification.
DEPT. OF E&CE, GECH 2014 Page 13
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
RXD: serial input port
TXD: serial output port
INT0: external interrupt 0 input
INT1: external interrupt 1 input
T0: external count input to Timer/Counter 0
T1: external count input to Timer/Counter 1
WR: external data memory write strobe
RD: external data memory read strobe
Program Store Enable: PSEN is the read strobe for external program memory. When the
device
is executing from internal program memory, PSEN is inactive (HIGH). When the device is
executing code from external program memory, PSEN is activated twice each machine cycle,
except that two PSEN activations are skipped during each access to external data memory. A
forced HIGH-to-LOW input transition on the PSEN pin while the RST input is continually
held HIGH for more than 10 machine cycles will cause the device to enter external host
mode programming.
Reset: While the oscillator is running, a HIGH logic state on this pin for two machine cycles
will reset the device. If the PSEN pin is driven by a HIGH-to-LOW input transition while the
RST input pin is held HIGH, the device will enter the external host mode, otherwise the
device will enter the normal operation mode.
External Access Enable: EA must be connected to VSS in order to enable the device to
fetch code from the external program memory. EA must be strapped to VDD for internal
program execution. However, Security lock level 4 will disable EA, and program execution
is only possible from internal program memory. The EA pin can tolerate a high voltage of 12
Address Latch Enable: ALE is the output signal for latching the low byte of the address
during an access to external memory. This pin is also the programming pulse input (PROG)
for flash programming. Normally the ALE is emitted at a constant rate of 1¤6 the crystal
DEPT. OF E&CE, GECH 2014 Page 14
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
frequency and an be used for external timing and clocking. One ALE pulse is skipped during
each access to external data memory. However, if AO is set to ‘1’,ALE is disabled.
Crystal 1: Input to the inverting oscillator amplifier and input to the internal clock generator
circuits.
Crystal 2: Output from the inverting oscillator amplifier.
4.1.4 FUNCTIONAL DESCRIPTION
Memory organization
The device has separate address spaces for program and data memory.
Flash program memory
There are two internal flash memory blocks in the device. Block 0 has 64 Kbytes and
contains the user ’s code. Block 1 contains the Philips -provided ISP/IAP routines and may
be enabled such that it overlays the first 8 Kbytes of the user code memory. The 64 kB Block
0 is organized as 512 sectors, each sector consists of 128 bytes. Access to the IAP routines
may be enabled by clearing the BSEL bit in the FCF register. However, caution must be
taken when dynamically changing the BSEL bit. Since this will cause different physical
memory to be mapped to the logical program address space, the user must avoid clearing the
BSEL bit when executing user code within the address range 0000H to 1FFFH.
Data RAM memory
The data RAM has 1024 bytes of internal memory. The device can also address up to 64 kB
for external data memory.
Expanded data RAM addressing
The P89V51RD2 has 1 kB of RAM.
The device has four sections of internal data memory:
1. The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly addressable.
2. The higher 128 bytes of RAM (80H to FFH) are indirectly addressable.
3. The special function registers (80H to FFH) are directly addressable only.
DEPT. OF E&CE, GECH 2014 Page 15
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
4. The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable by the move
external instruction (MOVX) and clearing the EXTRAM bit Since the upper 128 bytes
occupy
the same addresses as the SFRs, the RAM must be accessed indirectly. The RAM and SFRs
space are physically separate even though they have the same addresses.
Flash organization
The P89V51RD2 program memory consists of a 64 kB block. An In-System Programming
(ISP) capability, in a second 8 kB block, is provided to allow the user code to be
programmed in-circuit through the serial port. There are three methods of erasing or
programming of the Flash memory that may be used. First, the Flash may be programmed or
erased in the end-user application by calling low-level routines through a common entry
point (IAP). Second, the on-chip ISP boot loader may be invoked. This ISP boot loader will,
in turn, call low-level routines through the same common entry point that can be used by the
end-user application. Third, the Flash may be programmed or erased using the parallel
method by using a commercially available EPROM programmer which supports this device.
Boot block
When the microcontroller programs its own Flash memory, all of the low level details are
handled by code that is contained in a Boot block that is separate from the user Flash
memory. A
user program calls the common entry point in the Boot block with appropriate parameters to
accomplish the desired operation. Boot block operations include erase user code, program
user code, program security bits, etc. A Chip-Erase operation can be performed using a
commercially available parallel programer. This operation will erase the contents of this Boot
Block and it will be necessary for the user to reprogram this Boot Block (Block 1) with the
Philips-provided ISP/IAP code in order to use the ISP or IAP capabilities of this device.
DEPT. OF E&CE, GECH 2014 Page 16
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
Power-On reset code execution
Following reset, the P89V51RD2 will either enter the Soft ICE mode (if previously enabled
via ISP command) or attempt to auto baud to the ISP boot loader. If this auto baud is not
successful within about 400 ms, the device will begin execution of the user code.
In-System Programming (ISP)
In-System Programming is performed without removing the microcontroller from the system.
The In-System Programming facility consists of a series of internal hardware resources
coupled with internal firmware to facilitate remote programming of the P89V51RD2 through
the serial port. This firmware is provided by Philips and embedded within each P89V51RD2
device. The Philips In-System Programming facility has made in-circuit programming in an
embedded application possible with a minimum of additional expense in components and
circuit board area.
The ISP function uses five pins (VDD, VSS, TxD, RxD, and RST). Only a small connector
needs to be available to interface your application to an external circuit in order to use this
feature.
Using the In-System Programming
The ISP feature allows for a wide range of baud rates to be used in your application,
independent of the oscillator frequency. It is also adaptable to a wide range of oscillator
frequencies. This is accomplished by measuring the bit-time of a single bit in a received
character. This information is then used to program the baud rate in terms of timer counts
based on the oscillator frequency. The ISP feature requires that an initial character (an
uppercase U) be sent to the P89V51RD2 to establish the baud rate. The ISP firmware
provides auto-echo of received characters. Once baud rate initialization has been performed,
the ISP firmware will only accept Intel Hex-type records. In the Intel Hex record, the ‘NN’
represents the number of data bytes in the record. The P89V51RD2 will accept up to 32 data
bytes. The ‘AAAA ’string represents the address of the first byte in the record. If there are
zero bytes in the record, this field is often set to 0000. The ‘RR ’string indicates the record
type. A record type of ‘00 ’ is a data record. A record type of ‘01’ indicates the end-of-file
DEPT. OF E&CE, GECH 2014 Page 17
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
mark. In this application, additional record types will be added to indicate either commands
or data for the ISP facility. The maximum number of data bytes in a record is limited to 32
(decimal). As a record is received by the P89V51RD2, the information in the record is stored
internally and a checksum calculation is performed. The operation indicated by the record
type is not performed until the entire record has been received. Should an error occur in the
checksum, the P89V51RD2 will send an ‘X ’ out the serial port indicating a checksum error.
If the checksum calculation is found to match the checksum in the record, then the command
will be executed. In most cases, successful reception of the record will be indicated
by transmitting a ‘.’ character out the serial port.
DEPT. OF E&CE, GECH 2014 Page 18
CLOUD CONTROLLED INSTRUSION DETECTION AND BURGLARY PREVENTION STRATAGEMS IN HOME AUTOMATION SYSTEM
4.2 RS232
RS-232 is a telecommunications standard for connecting certain types of electronic
equipment. In computer networking, RS-232 cables were commonly used to connect
modems to the compatible serial ports of personal computers. So-called null modem cables
could also be connected directly between the RS-232 ports of two computers to create a
simple network interface suitable for transferring files. Today, most uses of RS-232 in
computer networking have been replaced by USB technology. Some computers and network
routers possess RS-232 ports to support modem connections. RS-232 also continues to be
used in some industrial devices, including newer fiber optic cable and wireless
implementations.
Fig: 4.2 pin dig of RS232
RS232 works at the physical level so you will know what signals you can expect to see at
the microcontroller pins. It is a method (or protocol - an agreed standard) that defines how to
transfer data between two devices using a few wires. It uses a serial transmission method
where bytes of data are output one bit at a time onto a single wire. Data is only transmitted
uart_tx(0X0D);while(RX_DATA() != '>');TX_STRING("SOMEONE HAS ENTERED YOUR HOME");uart_tx(0X1A);lcdcmd(0x01);lcd_string(" SMS sent..");delay(500);BUZZER=0;