Sie sind auf Seite 1von 31

A Draft Report

ON
A remote home security system based on WSN and GSM

Submitted to
Amity University Uttar Pradesh

In partial fulfillment of the requirements for the award of the degree of

(B.tech - ECE)
By
Sushil kumar
Sachin mohan sharma
Under the guidance of
MR. Paurush bhulania
NAME OF THE INSTITUTE

AMITY UNIVERSITY UTTAR PRADESH


NOIDA (U.P.)
April 2014

Declaration
I/We,
..,
student(s) of (Name of the Programme) hereby declare that the project titled
.. which is submitted by me/us to Department of
., Name of the Institute, Amity University Uttar Pradesh, Noida,
in partial fulfillment of requirement for the award of the degree of (Name of the degree) in
.. , has not been previously formed the basis for the award of any degree, diploma or
other similar title or recognition.

The Author attests that permission has been obtained for the use of any copy righted
material appearing in the Project report other than brief excerpts requiring only proper
acknowledgement in scholarly writing and all such use is acknowledged.

Signature

Noida

Date Name and Signature of Student(s)

CERTIFICATE
On the basis of declaration submitted by .., student(s) of B. Tech.. .., I hereby

certify that the project titled ... which is


submitted to Name of the Institute, Amity University Uttar Pradesh, Noida, in partial
fulfillment of the requirement for the award of the degree of (Name of the degree) in .., is
an original contribution with existing knowledge and faithful record of work carried out by
him/them under my guidance and supervision.

To the best of my knowledge this work has not been submitted in part or full for any Degree
or Diploma to this University or elsewhere.

Acknowledgement
I express my sincere gratitude to my industry guide Mr. paurushbhulania, his able guidance,
continuous support and cooperation throughout my project, without which the present work
would not have been possible.
I would also like to put forward my special regards and thanks to Mr. paurushbhulaniafor his
untiring support and encouragement for our project.

ABSTRACT
In this paper, a low-power consumption remote home security alarm system developed by
applying WSN and GSM technology is presented. It can detect the theft, leaking of raw gas
and fire, and send alarm message remotely. The hardware of this system includes the single
chip C5081F310, wireless receiving and sending chip CC1100 as well as the SIMENS TC35
GSM module. The system software developed in C51 language has the ability of collecting,
wireless receiving and sending data, and can send a piece of alarm short message to the users
mobile phone when some dangerous condition has been detected. Security monitoring systems
are popular in home automation, it is capable of monitoring door & window magnetic contact,
smoke, gas leak, water flooding, providing simple controls such as turning off the valves, and
sending the alarms to the residential area security network etc. The security alarming system is
based on low power consumption micro-controller MSP430F135. A description of the system
architecture, circuit principle and the firmware flowchart is presented. The system uses a
control key fob for activating and de-activating the alarm easily, supports Web interface so that
user can access the system remotely to control, search or review the history record, and offers a
LCD panel for simple configuration.

Table of Contents
Declaration

Certificate

ii

Acknowledgement

iii

Abstract
Table of contents
1. Introduction
2. Selection and design of system hardware
2.1 Wireless sensor network node module
2.2 Chosen of GSM module
3 .Design of the system software
3.1 Software module for WSN node communication
3.2 Software module for GSM communication
4. Set up a prototype system and test
5. Wireless sensor network characteristics
5.1 Network topology
5.2 Power management
5.3 Network coverage
6. Proposed work
6.1 Temperature sensor
6.2 PIR sensor
6.3 Gas sensor
7. Microcontroller
7.1 Introduction to 8051 microcontroller
7.2 Architecture of 8051 microcontroller
7.3 PIN description of 8051
8. Programming in 8051
8.1 Assembling and running 8051
8.2 Addressing modes of 8051 programs
9. Advantages

iv
v

9.1 Advantages of c
9.2 KEIL
9.2.1 Working of KEIL
9.2.2 Block diagram of home security system based on WSN and GSM
10. GSM 300 module
10.1 Introduction
10.2 Application
10.3 Features
11. Current and future developments
12. Conclusion
13. Reference

INTRODUCTION
Safety is the most important requirement of home for people. With the
development of IT technology, network and automatic control technology, a
remote home security monitoring and alarming system becomes more and
more practicable today. By combining wireless sensor network(WSN) and
GSM technology, this paper designs a low-power consumption remote home
security monitoring and alarming system that can detect the theft, leaking of
raw gas and fire, and send alarm message to the house owners mobile
phone. The Wireless sensor network is composed of a large amount of
miniature self-organizing wireless sensor nodes. By combining three kinds of
technology

such

as

sensor,

The

micromechatronics

and

wireless

communication, WSN can detect, collect and deal with the object information
in its covering area, and send data to the observer. In a word, WSN
technology has the advantages of wide covering area, able to remote
monitoring, high monitoring precision, fast network establishment and
reasonable cost. GSM network has the advantages of mature technology,
wide covering area, long communication distance, and sound communication
effect and so on. The remote home security system presented in this paper
combines so many advantages of WSN and GSM. Firstly, wherever the users
are, once some dangerous instance happens in home, such as gas leaking or
thief intruding, this system can send alarm short message to the users
through GSM network immediately, informing people the possible dangerous
circumstances in home. Secondly, the wireless sensor network established in
home has the features of establishment, without use of cable, and low-power
consumption. Intelligent home, also known as the smart residential home, is moving towards the
wireless remote control, multi-media control, and high-speed data transmission. The key technology of
intelligent home is compatible to household controllers and it can also meet the transmission requirements
through home networking . At present, lots of integrated transport network is based on comprehensive
wiring technology, limiting the system to special places ,and higher cost. Currently, researches on the
wireless intelligent home security surveillance system is becoming a hotspot due to its flexibility and
convenience .At present, the application of intelligent home wireless communication technologies mainly

include: IrDA infrared technology, and so on . IrDA is a short distance for the half-duplex point-to-point
communication. Besides, its inconvenient and of high error rate, which make IrDA not applicable to the
family network communication. Bluetooth technology islimited by network capacity and it costs much.
SoBluetooth technology is not suitable for the homenetwork with a large number of nodes.

1.System Architecture
Modular Design is throughout the system. System is built on the embedded system, and it can monitor the
important position through the CMOS camera. Home state SMS and images MMS are sent to specialized
mobile phones. Besides, household appliances can be remotely controlled by SMS. the system
motherboard with smoke, temperature, gas sensors, forming a wireless networking. The system
motherboard core controller is S3C44B0X-32 microcontroller and mainly responsible for dealing with the
data. And Expand access plate to smoke, infrared, gas and other domestic security state sensor. MMS
module makes the system controller send the family security status information to mobile phone users.
Users send and receive text messages of instruction. The system structure is illustrated in Fig.1.
It is composed of the MCU-based home wireless control center, one WSN center
node module, and several data collecting nodes, GSM module, GSM network and
mobile phone. The WSN data collecting node modules are connected with pyro
electric infrared detector, temperature sensor, smoke detector and gas sensor
separately. When the pyro electric infrared detector finds that some people intrudes
into the house abnormally; or when the temperature sensor detects too high indoor
temperature and at the same time, the smoke sensor detects over proof smoke
concentration; or when the gas sensor detects over proof. the combustible gas
concentration, the sensors will send encoded alarm signal to the home control
center through the wireless sensor network established in home. Once the wireless
control center receives alarm signal, it will send alarm short message to the users
through the GSM module and GSM network immediately.

2. SELECTION
HARDWARE
2.1

AND

DESIGN

OF

SYSTEM

Wireless Sensor Network Node Module

The wireless sensor network in home of this system is composed of one center node
module and several data collecting node modules, operating in point-to-multi point

communication mode. In different application, the formation of a WSN node is not


always the same. In general, a WSN node includes four parts: data collecting unit,
data processing unit, wireless communication unit and power management un it.

The data collecting unit is composed of the sensors and A/D conversion module. In
this remote wireless home security system, some pyro electric infrared detectors,
temperature sensors, smoke detectors and gas sensors are used .The data
processing unit is responsible to save and deal with the data collected by the
sensors and received from other nodes. In this system, the C8051F310 MCU from
Cygnal

Corporation

is

chosen

as

the

data

processing

unit.

The

wireless

communication unit is often composed of the low power consumption, short


distance radio frequency (RF) transceiver. In this system, the wireless dual-way chip
CC1100 dedicated in wireless and low power consumption application is chosen to
implement wireless communication. C8051F310 MCU can control the main working
parameter of CC1100 and communicate with CC1100 through SPI interface. The SPI

standard interface include main output slave input (MOSI), main input slave output
(MISO) and serial clock (CLK). The master CLK is synchronized with the slave
CLK.CC1100 can set the working mode, read and write cache data and status
register through SPI bus. The RF chip is connected with MCU through SPI interface to
make a wireless communication system that can control receiving and sending
function freely. The hardware connection between C8051F310 with CC1100 is
showed in Fig. 2.

2.2Chosen of GSM Module

As the third generation GSM dual frequency module, TC35 GSM module has
the following features: compact and low power consumption; support dual
frequency of GSM900 and GSM1800; provide standard AT command interface
to users; provide fast, reliable and safe transmission of data, voice, short
message and fax . It is ideal for this system because of its high quality short
message function.

3. DESIGN OF SYSTEM SOFTWARE


The system software, which is developed with C51 programming language,
has two main modules, one for the WSN node communication, and one for
the GSM communication.
3.1Software Module for WSN Node Communication
In the indoor wireless sensor network, the communication protocol is divided
into three layers. The first layer is physical layer whose function has been
implemented by CC1100 hardware itself. The second layer is network layer.
The second layer is network layer which applies TEEN(threshold sensitive energy
efficient sensor network) protocol. The data will be transmitted through the wireless
sensor network only when the observed value changes suddenly. The third layer is
application layer. In this layer, the systems application software is divided into two
modules, WSN data collecting node software module and WSN center node software
module. The former, running on the slave MCU of data collecting nodes, is
responsible for collecting sensor data and wireless transmitting them. The latter,
running on the master MCU of WSN center node, is responsible for wireless
receiving data and judging whether its need to start the alarming process or not. If
yes, it will drive TC35 GSM module to send alarm short message to users mobile
phone.
The software flow of center node module is illustrated in Fig. 4.And the software flow
of data collecting node module is illustrated.

3.2

3.2 Software Module for GSM Communication


When the WSN center node module receives abnormal data, it will drive TC35 GSM
module to send alarm short message through GSM network. TC35 GSM module
supports standard AT command set. MCU control the operation of TC35 module by
inputting different AT function commands through the serial port. Some GSM AT
commands relevant to short message are listed. The sending mode of short
message depends on the interface supported by the short message service center
in the GSM network. European Telecommunications Standards Institute (ETSI) has
defined three kinds of interface protocol for sending short message: Block mode,
Text mode and PDU mode. Block mode requires the mobile phone manufacture to
provide driving support. Text mode doesnt support Chinese text. So at present, PDU
mode has become the core of most mobile phone for their short message

communication. It can provide more powerful functions than the other modes. So,
this system applies PDU mode to send alarming short message.

4. SET UP A PROTOTYPE SYSTEM AND TEST


we set up a sample prototype system in our lab room. As mentioned above, choose
C8051F310 MCUas the data processing unit of WSN center node module and data
collecting node module. Here, C8051F310 has a temperature sensor imbedded that
can detect the in-room temperature. After hardware connection, install the
appropriate software developed with C51 on MCU-based indoor wireless control
center. Then, we can start the test with this prototype system by changing the
preset temperature threshold. When the actual in-room temperature exceeds this
preset temperature threshold, the control center will immediately trigger TC35GSM
module to send an alarm short message to our mobile phone. Through the test
process, this prototype system operated successfully and effectively with reliable
and well communication.

5.WIRELESS SENSOR NETWORK CHARACTERISTICS


For measuring and monitoring physical and non-physical activities in a remote area, various
types of wireless sensors are generally grouped in a network. Apart from the sensors, the network
may incorporate repeater hubs to extend the transmission range of the retrieved data. The
network may also incorporate processing units to analyze the data. The sensor networks employ
small, low power devices to do all the tasks. The sensors in the network capture the activity and
the collected data is communicated to a remote monitoring centre using wireless data transfer
techniques such as Radio Frequency (RF) communication. The size and cost constraints on these
types of network result in corresponding constraints being exerted on the resources such a
energy, memory, computational speed and bandwidth. a typical wireless sensor network, It
consists of a Data Acquisition Network (DAN) and a Data Distribution Network (DDN).In the
Data Acquisition Network, the data collected by the sensor nodes are transmitted, using RF

channel, to the Base Station Controller (BSC), which in turn is connected to the Management
Centre using wired or wireless connection. Some pre-processing of data is often done at the base
station which, for a small and simple sensor network, is generally equipped with a
microprocessor or microcontroller.The entire network is monitored and controlled by the
Management Centre which is equipped with large storage capacity and computational resources
to undertake data analysis and presentation. The Base Station provides a gateway to the Data
Distribution Network. For distribution of data with in the DDN, various kinds of transmission
techniques are used, such as Wi-Fi, Bluetooth and Cellular networks (CDMA/GSM). Data may
be distributed to remote PCs/ Notebooks, handheld PDAs and cellular phones. Thus, to build and
implement a sensor network, a designer needs to consider several aspects which are discussed in
the following sub-sections.
5.1 Network Topology

In any communication network, the message should be transmitted with a prescribed through put
and reliability. This is usually termed as Quality of Service (QoS). It can be specified in terms
of message delay, bit error rates, packet loss, economic cost of transmission, transmission power,
etc. Depending on the QoS, the installation environment, economic considerations, and the
application, one of several basic network topologies such as star, ring bus or tree connection may
be used. A communication network consists of nodes, which in our case are sensors, each of
which hascomputing power and can transmit and receive messagesover communication links,
wireless or cabled.
5.2 Power Management

Since the wireless sensors are geographically distributed, often in remote sites, the lifetime of the
sensor nodes is important. Power generation, power conservation and power management play
very important roles in extending the lifetime of the motes. Most of the power is consumed in the
process of RF communication since the required transmission power increases as the square of
the distance between source and destination. While software power management techniques can
greatly decrease the power consumed by RF sensor nodes, TDMA is especially useful for power
conservation, since a node can power down between its assigned time slots, waking up in time to
receive and transmit messages.
5.3 Network Coverage

The coverage area of the sensor is defined as the effective range of the sensor connected to its
sensor node. In a network, high coverage makes it robust system and this can be exploited to
extend the network lifetime by switching redundant nodes to power-saving and sleep modes.

6.PROPOSED WORK

The standard is aiming to be low cost, low power solutions for systems
consisting of devices in house, factories and offices.

In

the

transmitter

section

three

sensors

namely

gas

sensor,

temperature sensor and PIR sensor are connected for sensing the gas
leakage, excess temperature and human presence. The sensors
connected detect the changes occuring in the environment.
When any changes are detected the microcontroller transmits the

signal through gsm which could be analyzed through the pc with help
sensors also a message is sent to the user through GSM.
.6.1

TEMP SENSOR:-

The LM35 series are precision integrated-circuit temperature sensors, whose


output

voltage

is

linearly

proportional

to

the

Celsius

(Centigrade)

temperature. The LM35 thus has an advantage over linear temperature


sensors calibrated in Kelvin, as the user is not required to subtract a large
constant voltage from its output to obtain convenient Centigrade scaling.
The LM35 does not require any external calibration or trimming to provide
typical accuracies of 14Cat room temperature and 34C cover a full 55
to +150Ctemperature range. Low cost is assured by trimming and
calibration at the wafer level. The LM35s low output impedance, linear
output, and precise inherent calibration make interfacing to readout or
control circuitry especially easy. Itcan be used with single power supplies, or
with plus and minus supplies. As it draws only 60 A from its supply, it
hasvery low self-heating, less than 0.1C in still air. The LM35 israted to

operate over a 55 to +150C temperature range,while the LM35C is rated


for a 40 to +110C range (10with improved accuracy). The LM35D is
also availablein an 8-lead surface mount small outline package and aplastic
TO-220 package.
Features
Calibrated directly in Celsius (Centigrade)
Linear + 10.0 mV/C scale factor
0.5C accuracy guaranteeable (at +25C)
Rated for full 55 to +150C range
Suitable for remote applications
Low cost due to wafer-level trimming
Operates from 4 to 30 volts
Less than 60 A current drain
Low self-heating, 0.08C in still air

6.2 PIR SENSOR


All PIR sensors detect changes in infra-red radiation, in the form of heat emitted by a number of
bodies including people, cars and, to a lesser extent, dogs or other small animals. The bigger the
body, the more infra-red radiation is emitted and the easier it is for a PIR sensor to detect.The
field of view is the area in which changes in infra-red radiation can be detected. The field of view
can alter with changes in temperature and the size of the heat source.The construction of the PIR
and the Fresnel Lens divide the field of view into a number of zones both vertically and
horizontally, as shown in the diagram overleaf. Each zone is constantly monitored by the sensor.
When a person or other heat source enters any zone, the level of infra-red radiation in that zone
increases .This change is detected and processed by the sensor, switching on the connected
lighting and starting the in-built Time process. Providing the heat source (person) continues to
move in the field of view, the PIR sensor will keep processing the changes in infra-red radiation
and the lighting will stay on. If a person stands still in the field of view or moves out of the

detection area, the sensor will not detect any changes in infra-red radiation between the zones
and the lights will go out after the Time period is complete.In order for the sensor to most
effectively detect changes in heat between zones, it is advisable to walk across the zones not up
or along a zone.PIR sensors are passive devices, they do not emit or radiate any energy or beams.

6.3 GAS SENSOR


Infrared (IR) gas detection is a well-developed measurement technology. Infrared gas analyzer shave a
reputation for being complicated, cumber some, and expensive .However, recent technical advancements,
including the availability of powerfull amplifiers and associated electronic components, have opened a
new frontier for infrared gas analysis. These advancements have resulted from an increase in demand in
the commercial sector, and these demands will likely continue to nourish the advancement of this
technology. Gases to be detected are often corrosive and reactive. With most sensor types, the sensor itself
is directly exposed to the gas, often causing the sensor to drift or die prematurely. The main advantage of
IR instruments is that the detector does not directly interact with the gas (or gases) to be detected. The
major functional components of the analyzer are protected with optical parts.
In other words, gas molecules interact only with a light beam. Only the sample cell and related
components are directly exposed to the gas sample stream. These components can be treated, making
them resistant to corrosion, and can be designed such that they are easily removable for maintenance or
replacement. Today, many IR instruments are available for a wide variety of applications. Many of

them offer simple, Hazardous Gas Monitors rugged, and reliable designs. In general, for toxic
and combustible gas monitoring applications, IR instruments are among the most user friendly
and require the least amount of maintenance. There is virtually an unlimited number of
applications for which IR technology can be used. Gases whose molecules consist of two or
more dissimilar atoms absorb infrared radiation in a unique manner and are detectable using
infrared techniques. Infrared sensors are highly selective and offer a
wide range of sensitivities, from parts per million levels to 100
percent concentrations. This chapter provides general information,
with a special emphasis on instruments used for area air quality and
safety applications.

7 MICROCONTROLLER (8051):7.1 Introduction to 8051 microcontrollers


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).
4 register banks.
128 user defined software flags.
8-bit data bus
16-bit address bus
32 general purpose registers each of 8 bits
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.

7.2 Architecture of 8051 microcontroller


It is 8-bit microcontroller, means MC 8051 can Read, Write and Process 8 bit data. This is mostly
used microcontroller in the robotics, home appliances likemp3 player, washing machines,
electronic iron and industries. Mostly used
blocks in the architecture of 8051 are as follows:

Fig1:
8051 architecture

7.3 PIN description of 8051

Fig2: PIN diagram of 8051


Pins 1-8: Port 1 Each of these pins can be configured as an input or an output.
Pin 9: RS A logic one on this pin disables the microcontroller and clears the contents of most
registers. In other words, the positive voltage on this pin resets the microcontroller. By applying
logic zero to this pin, the program starts execution from the beginning.
Pins10-17: Port 3 Similar to port 1, each of these pins can serve as general input or output.
Besides, all of them have alternative functions:
Pin 10: RXD Serial asynchronous communication input or Serial synchronous communication
output.

Pin 11: TXD Serial asynchronous communication output or Serial synchronous communication
clock output.
Pin 12: INT0 Interrupt 0 input.
Pin 13: INT1 Interrupt 1 input.
Pin 14: T0 Counter 0 clock input.
Pin 15: T1 Counter 1 clock input.
Pin 16: WR Write to external (additional) RAM.
Pin 17: RD Read from external RAM.
Pin 18, 19: X2, X1 Internal oscillator input and output. A quartz crystal which specifies operating
frequency is usually connected to these pins. Instead of it, miniature ceramics resonators can also
be used for frequency stability. Later versions of microcontrollers operate at a frequency of 0 Hz
up to over 50 Hz.
Pin 20: GND Ground.
Pin 21-28: Port 2 If there is no intention to use external memory then these port pins are
configured as general inputs/outputs. In case external memory is used, the higher address byte,
i.e. addresses A8-A15 will appear on this port. Even though memory with capacity of 64Kb is
not used, which means that not all eight port bits are used for its addressing, the rest of them are
not available as inputs/outputs.
Pin 29: PSEN If external ROM is used for storing program then a logic zero (0) appears on it
every time the microcontroller reads a byte from memory.

Pin 30: ALE Prior to reading from external memory, the microcontroller puts the lower address
byte (A0-A7) on P0 and activates the ALE output. After receiving signal from the ALE pin, the
external register (usually 74HCT373 or 74HCT375 add-on chip) memorizes the state of P0 and
uses it as a memory chip address. Immediately after that, the ALU pin is returned its previous
logic state and P0 is now used as a Data Bus. As seen, port data multiplexing is performed by
means of only one additional (and cheap) integrated circuit. In other words, this port is used for
both data and address transmission.
Pin 31: EA By applying logic zero to this pin, P2 and P3 are used for data and address
transmission with no regard to whether there is internal memory or not. It means that even there
is a program written to the microcontroller, it will not be executed. Instead, the program written
to external ROM will be executed. By applying logic one to the EA pin, the microcontroller will
use both memories, first internal then external (if exists).
Pin 32-39: Port 0 Similar to P2, if external memory is not used, these pins can be used as general
inputs/outputs. Otherwise, P0 is configured as address output (A0-A7) when the ALE pin is
driven high (1) or as data output (Data Bus) when the ALE pin is driven low (0).
Pin 40: VCC +5V power supply.
8.1 Assembling and Running 8051 Program

Fig Flow chart


Steps:
Type your program in editor of software widely used editors are notepad.
Save this file with file name . asm } depending on assembler or file name . src notepad produce
ASCII file.
ASM source file contains program code assembler converts the instruction into machine code
and produces obj file and 1st file (object file and link file). Linker program takes one or
more object files and produces an absolute object file with extension abs.
abs file is used by 8051 trainer that have a monitor program.
abs file is fed into a program code called OH
Which create a file with extension Hex that is ready to burn into ROM lst file contains all
opcode and address as well as error that assembler detected.

8.2 Addressing modes of 8051


Immediate Addressing Mode
Example:
MOV A, #6AH

In general we can write MOV A, #data


This addressing mode is named as immediate because it transfers an 8-bit data immediately to
the accumulator (destination operand).
Direct Addressing Mode
This is another way of addressing an operand. Here the address of the data (source data ) is given
as operand. Lets take an example.
MOV A, 04H
Here 04H is the address of register 4 of register bank#0. When this instruction is executed,
whatever data is stored in register 04H is moved to accumulator. In the picture below we can see,
register 04H holds the data 1FH. So the data 1FH is moved to accumulator.
Register Direct addressing Mode
In this addressing mode we use the register name directly (as source operand). An example is
shown below.
MOV A, R4
At a time registers can take value from R0,R1to R7. You may already know there are 32 such
registers.
Register Indirect Addressing Mode
So in this addressing mode, address of the data (source data to transfer) is given in the register
operand.
MOV A, @R0
Here the value inside R0 is considered as an address, which holds the data to be transferred to
accumulator.
Example: If R0 holds the value 20H, and we have a data 2F H stored at the address 20H, then the
value 2FH will get transferred to accumulator after executing this instruction.
Indexed Addressing Mode
Well lets see two examples first.
MOVC A, @A+DPTR and MOVC A, @A+PC

where DPTR is data pointer and PC is program counter (both are 16 bit registers). Lets take the
first example.
MOVC A, @A+DPTR
Whats the first impression you have now? The source operand is @A+DPTR and we know we
will get the source data (to transfer) from this location. It is nothing but adding contents of DPTR
with present content of accumulator. This addition will result a new data which is taken as the
address of source data (to transfer). The data at this address is then transferred to accumulator.

9.1 Advantages of C
It is a mid-level language, with high-level features (such as support for functions and
modules), and low-level features (such as good access to hardware via pointers);
It is very efficient;
It is popular and well understood;
Even desktop developers who have used only Java or C++
can soon understand C syntax;
Good, well-proven compilers are available for every
embedded processor (8-bit to 32-bit or more);
Experienced staff are available;
9.2 KEIL
The Vision IDE from Keil combines project management, make facilities, source code editing,
program debugging, and complete simulation in one powerful environment. The Vision
development platform is easy-to-use and helping you quickly create embedded programs that
work. The Vision editor and debugger are integrated in a single application that provides a
seamless embedded project development environment.
9.2.1 Working in Keil
Building an Application in Vision4
To build (compile, assemble, and link) an application in Vision4, you must:

Select Project - Open Project.

If loading a Vision3 project, change the file filter in the Select Project File dialog to
Previous Project Files (*.uv2; *.uv3; *.mpw).

Select the project to load

Select Project - Rebuild all target files or Build target.

Vision4 compiles, assembles, and links the files in your project

Debugging an Application in Vision4


To debug an application created using Vision4, you must:

Select Debug - Start/Stop Debug Session.

Use the Step toolbar buttons to single-step through your program. You may enter G, main
in the Output Window to execute to the main C function.

Open the UART #2 Window using the Serial Windows - UART #2 button on the toolbar.

Debug your program using standard options like Step, Go, Break, and so on.

Creating Your Own Application in Vision4


To create a new project in Vision4, you must:

Select Project - New Project.

Select a directory and enter the name of the project file.

Select Project - Select Device and select an ARM, 8051, 251, or C16x/ST10 device from
the Device Database.

Create source files to add to the project.

Select Project - Targets, Groups, Files. Add/Files, select Source Group1, and add the
source files to the project.

Select Project - Options and set the tool options. Note when you select the target device
from the Device Database all special options are set automatically. You typically only
need to configure the memory map of your target hardware. Default memory model
settings are optimal for most applications.

Select Project - Rebuild all target files or Build target.

MOBILE
MEMS

Variable
to be
sensed by
sensor

(authorized
LCD
EMBED
DED

LCD

IR
ADC

CONTR
OLLER

GSM MODULE

LPG/SMOKE

TEMP/PIR

MAX 232
MAX 232

Block diagram of home security system based on GSM and WSN

GSM SIM 300 Module


INTRODUCTION

This GSM Modem can accept any GSM network operator SIM card and act just like a mobile
phone with its own unique phone number. Advantage of using this modem will be that you can
use its RS232 port to communicate and develop embedded applications. Applications like SMS
Control, data transfer, remote control and logging can be developed easily. The modem can either
be connected to PC serial port directly or to any microcontroller. It can be used to send and
receive SMS or make/receive voice calls. It can also be used in GPRS mode to connect to

internet and do many applications for data logging and control. In GPRS mode you can also
connect to any remote FTP server and upload files for data logging.
This GSM modem is a highly flexible plug and play quad band GSM modem for direct and easy
integration to RS232 applications. Supports features like Voice, SMS, Data/Fax, GPRS and
integrated TCP/IP stack.

APPLICATIONS

SMS based Remote Control & Alerts


Security Applications
Sensor Monitoring
GPRS Mode Remote Data Logging

FEATURES

Highly Reliable for 24x7 operation with Matched Antenna


Status of Modem Indicated by LED
Simple to Use & Low Cost
Quad Band Modem supports all GSM operator SIM cards

OUR PACKAGE INCLUDES

GSM Modem - Assembled & Tested


GSM Antenna
12V/1.5A SMPS
QUICK START GUIDE

Insert SIM card: Press the yellow pin to remove the tray from the SIM cardholder. After
properly fixing the SIM card in the tray, insert the tray in the slot provided.
Connect Antenna: Screw the RF antenna if not already connected.
Connect RS232 Cable to PC/MCU: (Cable provided for RS232 communication).
Default baud rate is 9600 with 8-N-1, no hardware handshaking.
Connect the power Supply (12V 1A) to the power input of board. Polarity should be
Center +ve and outer ve DC jack.
Network Led indicating various status of GSM module eg. Power on, network
registration & GPRS connectivity.

11. CURRENT & FUTURE DEVELOPMENTS

The reported inventions on home monitoring are based on different sensors, collection of sensors
data by a central processor, comparison of activities with a standard pattern and detection of
unusual or abnormal event in many situations. The cost of the complete system may be a critical
factor for its universal use. In future, the research should be targeted to develop a low-cost system
with the sensors essential to monitor the elder people at home. The time to detect any abnormal or
unusual incident should be detected as fast as possible and the message to the caregiver should
reach as quickly as practicable.

CONCLUSIONS
This paper presents one solution for establishing a low power consumption
remote home security alarm system. The system, based on WSN and GSM
technology, can detect the theft, leaking of raw gas and fire, and send alarm
message remotely. The hardware of this system includes the single
chipC5081F310, wireless receiving and sending chip CC1100 as well as the
SIMENS TC35 GSM module. The system software developed in C51 language
has the ability of collecting, wireless receiving and transmitting data, and can
send a piece of alarm short message to the users mobile phone when some
dangerous condition has been detected. With the advantages of reliability,
easy usage, complement wireless, and low power consumption, the system
also has practical value in other fields. Through connecting the traditional

sensor alarm system and image monitoring system, a new type of smart
security system is formed. Users can use the phone or PC to receive MMS
information. According to the need, users can set the mobile phone to
achieve a flexible and convenient home security monitoring.

REFERENCES
1. 2010 Second International Conference on Networks Security, Wireless
Communications and Trusted Computing.
2.Li Wenzhong, DuanChaoyu, C8051F Series MCU and Short DistanceWireless
Data Communication, Beijing, Beijing University ofAeronautics & Astronautics
Press, 2007, pp.188-190.
3.International Symposium on Intelligent Information Technology Application
Workshop Jun Hou, Chengdong Wu, Zhongjia Yuan, Jiyuan Tan, Qiaoqiao Wang, Yun Zhou
4. 2009 Pacific-Asia Conference on Circuits,Communications and System:
Anan Fang, XiaolingXu, WenlingYang,Li Zhang

Electronic Department of Information Engineering School


Nan Chang University
5.A Home Security Zigbee Network for Remote MonitoringApplication
Dechuan Chen, Meifang Wang
School of Automation, Hangzhou Dianzi University, Hangzhou 310018, P. R. China
6.Y.

Zhao and Z. Ye: A Low Cost GSM/GPRS Based Wireless Home Security System , 2008

IEEE

7.2010 Second International Conference on Networks Security, Wireless Communications and


Trusted
Computing NSWCTC 2010 Table of Contents Volume - 2
8.Secure - Way an Affordable Home Security System
J. G. Vinson, D. L. Knight, and B. R. Mahafza

9.Wireless Sensors for Home Monitoring - A Review


Subhas C. Mukhopadhyay*, AnuroopGaddam and Gourab S. Gupta
10.The Wireless Sensor Network for Home-Care System Using ZigBee
Mao-Cheng Huang, Jyun-Ciang Huang, Jing-Cyun You, Gwo-Jia Jong
11. Analysis of Remote Control Techniques Employedin Home Automation
and Security Systems
K. Balasubramanian and A. Cellatoglu
12.ZigBee for wireless networking
Johan Lnn
Jonas Olsson
15th March 2005

Das könnte Ihnen auch gefallen