Vous êtes sur la page 1sur 27

ANDROID BASED HOME SECURITY AND AUTOMATION

Project report submitted


in partial fulfillment of the requirement for the degree of

Bachelor of Technology in Electronics and Communication Engineering

Guide:- Submitted By:-

Mr.Rakesh Kardam Vinod Kumar Gill(13EJCEC238)

(Assisstant Prof. ECE dept.) Vishal Ranjan (13EJCEC241)

Submitted to:- Yatin Kalia(13EJCEC247)

Mr. Rajesh Bhathija

(Associate Prof. ECE dept.)

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING


JAIPUR ENGINEERING COLLEGE & RESEARCH CENTRE, JAIPUR
MAY 2017
Approval Sheet

This project report entitled Android Based Home Security and


Automation by Vinod Kumar Gill (13EJCEC238), Vishal Ranjan
Prasad (13EJCEC241), Yatin Kalia (13EJCEC247) is approved for
the degree of Bachelor of Technology.

Examiners

Supervisor (s)

HOD

Date:
Place:
(ii)
DECLARATION

I declare that this written submission represents my ideas in my own


words and where others' ideas or words have been included, I have
adequately cited and referenced the original sources. I also declare
that I have adhered to all principles of academic honesty and integrity
and have not misrepresented or fabricated or falsified any
idea/data/fact/source in my submission. I understand that any
violation of the above will be cause for disciplinary action by
the Institute and can also evoke penal action from the sources which
have thus not been properly cited or from whom proper permission
has not been taken when needed.

VINOD KUMAR GILL (13EJCEC238)

VISHAL RANJAN PRASAD (13EJCEC241)

YATIN KALIA (13EJCEC247)

DATE- MAY/2017

(iii)
CERTIFICATE

It is certified that the work contained in the project report titled


ANDROID BASED HOME SECURITY & AUTOMATION by
VINOD KUMAR GILL (13EJCEC238), VISHAL RANJAN
PRASAD (13EJCEC241), YATIN KALIA (13EJCEC247) has been
carried out under my/our supervision and that this work has not been
submitted elsewhere for a degree

Mr. RAKESH KARDAM


ASSISTANT PROFESSOR ECE
DEPARTMENT JECRC,
JAIPUR
(iv)
MAY, 2017

(iv)
ABSTRACT

The smart mobile terminal operator platform Android is getting popular all over the world
with its wide variety of applications and enormous use in numerous spheres of our daily life.
Considering the fact of increasing demand of home security and automation, an Android
based control system is presented in this paper where the proposed system can maintain the
security of home main entrance. Another important feature of the designed system is that it
can control the overall appliances in a room. The mobile to security system or home
automation system interface is established through Bluetooth.

Security has becoming an important issue everywhere. Home security is becoming necessary
nowadays as the possibilities of intrusion are increasing day by day. Safety from theft,
leaking of raw gas and fire are the most important requirements of home security system for
people. A traditional home security system gives the signals in terms of alarm. However, the
GSM (Global System for Mobile communications) based security systems provides enhanced
security as whenever a signal from sensor occurs, a text message is sent to a desired number
to take necessary actions.

This paper suggests methods for home security system This method sends SMS which uses
GSM and 8051 microcontroller, sensors, relays and buzzers.

Keywords: GSM (Global System for Mobile communications), Microcontroller,


SMS(Short Message Service)

(v
)
CHAPTER 1. INTRODUCTION

Smart Home can be also known as Automated Home or intelligent home which indicates the
automation of daily tasks with electrical appliances used in homes. This could be the control
of lights, fans, viewing of the house interiors for surveillance purposes or giving the alarm
alteration or indication in case of gas leakage.

Home security has changed a lot from the last century and will be changing in coming years.
Security is an important aspect or feature in the smart home applications. terms of alarm.
However, a smart home security system offers many more benefits.

The new and emerging concept of smart homes offers a comfortable, convenient, and safe
environment for occupants.

Wireless technologies are becoming more popular around the world and for a short distance
communication, embedded Bluetooth technology can form a network of digital devices, in
which the appliances and devices can communicate with each other. Bluetooth technology is
the gift for the modern home automation. Operated over 2.4 GHz frequencies, Bluetooth
technology can link digital devices within a range of 10m to 100m at the speed of up to 3
Mbps depending on the Bluetooth device class.

Conventional security systems keep homeowners, and their property, safe from intruders by
giving the indication in this paper mainly focuses on the security of a home when the user is
away from the place. which is based on GSM technology and Sensors.

This security system is SMS based and uses GSM technology to send the SMS to the owner.
The proposed system is aimed at the security of Home against Intruders and Fire.

In any of the above cases happens while the owners are out of their home then the device
sends SMS to the emergency number which is provided to the system.

The system is made up of three components: 1) Sensors, GSM, 8051 microcontroller


2) Relays to control the device and 3) Buzzers to give security alert signal in terms of sound.
CHAPTER 2. HARDWARE DESIGN

Hardware of the system contains sensors, 8051 microcontroller, GSM module, Buzzer, in
system programmer and relays to control the appliances. The system design is shown in
Figure.

Fig 2.1:Hardware Block design

The outputs of all the sensors are connected to ADC. One IR is connected at window and
other is at door. The entry from the window is treated as unauthorized entry and entry from
door is treated as authorized entry. Temperature is continuously monitored, if it is high
(greater than 45 degree) in case of fire, a buzzer will be turned ON, Similar in case of GAS
leakage.

2
CHAPTER 3. SOFTWARE DESIGN

The proposed system uses AVR microcontroller, programming is done in C language and
to download the program into AVR chip, eXtreme burner is used.

3.1 MikroC PRO and eXtreme Burner for AVR

In this system MikroC PRO is used to develop the program for AVR microcontroller. To get
the HEX file from developed C program, eXtreme Burner software is used.

3.2 Android Application

A mobile application software or mobile app is an application software designed to run


on mobile devices such as smart phones and tablet computers. Most such devices are
sold with several apps bundled as pre-installed software, such as a web browser, email
client, calendar, mapping program, and an app for buying music or other media or more
apps. Some pre-installed apps can be removed by an ordinary uninstall process, thus leaving
more storage space for desired ones. Where the software does not allow this, some devices
can be rooted to eliminate the undesired apps.

3.3 Keil Software

Keil development tools for the 8051 Microcontroller Architecture support every level of
software developer from the professional applications engineer to the student just learning
about embedded software development.

3.4 Embedded C and assembly language

Embedded C Programming is the soul of the processor functioning inside each and
every embedded system we come across in our daily life, such as mobile phone, washing
machine, and digital camera.
Each processor is associated with an embedded software. The first and foremost thing is the
embedded software that decides functioning of the embedded system. Embedded C
language is most frequently used to program the microcontroller.
CHAPTER 4. COMPONENTS

4.1 MICROCONTROLLER UNIT

The control module is built with the microcontroller IC. The central controller is 8051 which
is 8-bit Microcontroller with 16/32/64K Bytes and in-System Programmable Flash. It is
having advanced RISC architecture. It consists of Two 8-bit Timer/Counters with separate
prescalers and Compare Modes, one 16-bit Timer/Counter with separate prescaler, compare
Mode, and capture Mode, Real time counter with separate oscillator, six PWM channels, 8-
channel 10-bit ADC and 32 Programmable I/O Lines.

Microcontroller is used on 8051 IC:

Fig 4.1: Pin diagram of 8051microcontroller


The high-performance 8-bit 8051 RISC-based microcontroller combines 32KB ISP flash
memory with read-while-write capabilities, 1KB EEPROM, 2KB SRAM, 23 general
purpose I/O lines, 32 general purpose working registers, three flexible timer/counters with
compare modes, internal and external interrupts, serial programmable USART, a byte-
oriented 2-wire serial interface, SPI serial port, 6-channel 10-bit A/D converter (8-channels
in TQFP and QFN/MLF packages), programmable watchdog timer with internal oscillator,
and five software selectable power saving modes. The device operates between 1.8-5.5
volts.
By executing powerful instructions in a single clock cycle, the device achieves throughputs
approaching 1 MIPS per MHz, balancing power consumption and processing speed.

4.1.1 Key Parameters:

PARAMETER VALUE
Flash (kBytes): 32 kByt

Pin Count: 40

Max. Operating Frequency (MHz): 20 MHz

CPU: 8-bit AV

# of Touch Channels: 16

Hardware QTouch Acquistion: No

Max I/O Pins: 23

Ext Interrupts: 24

USB Speed: No

USB Interface: No

SPI: 2

TWI (12C): 1

UART: 1

Graphic LCD: No

Video Recorder: No

Camera Interface No
ADC Channels: 8

ADC Resolution (bits): 10

ADC Speed (kbps): 15

Analog Comparators: 1

Resistive Touch Screen: No

DAC Resolution (bits): 0

Temp. Sensor: Yes

Crypto Engine: No

SRAM (KBytes): 2

EEPROM (Bytes): 1024

Self Program Memory: Yes

External Bus Interface: 0

DRAM Memory: No

NAND Interface: No

picoPower: No

Temp. Range (deg C): -40 to 85

I/O Supply Class: 1.8 to 5.5

Operating Voltage (Vcc): 1.8 to 5.5

FPU: No

MPU/MMU: No/No

Timers: 3

Output Compare Channels: 6

Input Capture Channels: 1


The 8051 8-bit AVR RISC-based microcontroller combines 32 kB ISP flash memory with
read-while-write capabilities, 1 kB EEPROM, 2 kB SRAM, 23 general purpose I/O lines, 32
general purpose working registers, three flexible timer/counters with compare modes,
internal and external interrupts, serial programmable USART, a byte-oriented 2-wire serial
interface, SPI serial port, 6-channel 10-bit A/D converter (8-channels
in TQFP and QFN/MLF packages), programmable watchdog timer with internal oscillator,
and five software selectable power saving modes. The device operates between 1.8-5.5
volts. The device achieves throughput approaching 1 MIPS per MHz.

4.2 GSM MODULE:

GSM/GPRS MODEM is a class of wireless MODEM devices that are designed for
communication of a computer with the GSM and GPRS network. It requires a SIM
(Subscriber Identity Module) card just like mobile phones to activate communication with
the network. Also, they have IMEI (International Mobile Equipment Identity) number
similar to mobile phones for their identification. A GSM/GPRS MODEM can perform the
following operations:
1. Receive, send or delete SMS messages in a SIM.
2. Read, add, search phonebook entries of the SIM.
3. Make, Receive, or reject a voice call.
The MODEM needs AT commands, for interacting with processor or controller, which are
communicated through serial communication. These commands are sent by the
controller/processor. The MODEM sends back a result after it receives a command.
Different AT commands supported by the MODEM can be sent by the
processor/controller/computer to interact with the GSM and GPRS cellular network.

Fig 4.2: GSM Module


GSM is a mobile communication modem; it is stands for global system for mobile
communication (GSM). The idea of GSM was developed at Bell Laboratories in 1970. It is
widely used mobile communication system in the world. GSM is an open and digital cellular
technology used for transmitting mobile voice and data services operates at the 850MHz,
900MHz, 1800MHz and 1900MHz frequency bands.

GSM system was developed as a digital system using time division multiple access (TDMA)
technique for communication purpose. A GSM digitizes and reduces the data, then sends it
down through a channel with two different streams of client data, each in its own particular
time slot. The digital system has an ability to carry 64 kbps to 120 Mbps of data rates.

There are various cell sizes in a GSM system such as macro, micro, pico and umbrella cells.
Each cell varies as per the implementation domain. There are five different cell sizes in a
GSM network macro, micro, pico and umbrella cells. The coverage area of each cell varies
according to the implementation environment.

4.2.1 Time Division Multiple Access

TDMA technique relies on assigning different time slots to each user on the same frequency.
It can easily adapt to data transmission and voice communication and can carry 64kbps to
120Mbps of data rate.

4.2.2 GSM Architecture:

A GSM network consists of the following components:

o A Mobile Station: It is the mobile phone which consists of the transceiver, the display and
the processor and is controlled by a SIM card operating over the network.
o Base Station Subsystem: It acts as an interface between the mobile station and the network
subsystem. It consists of the Base Transceiver Station which contains the radio transceivers
and handles the protocols for communication with mobiles. It also consists of the Base
Station Controller which controls the Base Transceiver station and acts as a interface
between the mobile station and mobile switching centre.
o Network Subsystem: It provides the basic network connection to the mobile stations. The
basic part of the Network Subsystem is the Mobile Service Switching Centre which provides
access to different networks like ISDN, PSTN etc. It also consists of the Home Location
Register and the Visitor Location Register which provides the call routing and roaming
capabilities of GSM. It also contains the Equipment Identity Register which maintains an
account of all the mobile equipments wherein each mobile is identified by its own IMEI
number. IMEI stands for International Mobile Equipment Identity.

4.2.3 Features of GSM Module:

o Improved spectrum efficiency


o International roaming
o Compatibility with integrated services digital network (ISDN)
o Support for new services.
o SIM phonebook management
o Fixed dialing number (FDN)
o Real time clock with alarm management
o High-quality speech
o Uses encryption to make phone calls more secure
o Short message service (SMS)

The security strategies standardized for the GSM system make it the most secure
telecommunications standard currently accessible. Although the confidentiality of a call and
secrecy of the GSM subscriber is just ensured on the radio channel, this is a major step in
achieving end-to- end security.

4.2.4 GSM Modem:

A GSM modem is a device which can be either a mobile phone or a modem device which
can be used to make a computer or any other processor communicate over a network.

A GSM modem requires a SIM card to be operated and operates over a network range
subscribed by the network operator. It can be connected to a computer through serial, USB
or Bluetooth connection.

A GSM modem can also be a standard GSM mobile phone with the appropriate cable and
software driver to connect to a serial port or USB port on your computer. GSM modem is
usually preferable to a GSM mobile phone.

The GSM modem has wide range of applications in transaction terminals, supply chain
management, security applications, weather stations and GPRS mode remote data logging.
4.3 RELAY SWITCH:

Relays are electromechanical devices that use an electromagnet to operate a pair of movable
contacts from an open position to a closed position. The advantage of relays is that it takes a
relatively small amount of power to operate the relay coil, but the relay itself can be used to
control motors, heaters, lamps or AC circuits which themselves can draw a lot more
electrical power.

Fig 4.3: Relay Switch Circuit.

The electro-mechanical relay is an output device (actuator) which come in a whole host of
shapes, sizes and designs, and have many uses and applications in electronic circuits. But
while electrical relays can be used to allow low power electronic or computer type circuits
to switch relatively high currents or voltages both ON or OFF, some form of relay
switch circuit is required to control it.

The design and types of relay switching circuits is huge, but many small electronic projects
use transistors and MOSFETs as their main switching device as the transistor can provide
fast DC switching (ON-OFF) control of the relay coil from a variety of input sources so here
is a small collection of some of the more common ways of switching relays.

1
0
4.4 SENSORS USED

Ultrasonic sensors are used to detect the intruder. They are used at doors and at windows.
The IR pair that is IR transmitter and IR receiver detects the obstacle within the range of 5-6
feet. The LM35 is used as temperature sensor whose output voltage is linearly proportional
to the Celsius (Centigrade) temperature. It gives linear output 10.0 mV/0 C as scale factor.

4.4.1 ULTRASONIC SENSOR:


The Ultrasonic Sensor sends out a high-frequency sound pulse and then times how long it
takes for the echo of the sound to reflect back. The sensor has 2 openings on its front. One
opening transmits ultrasonic waves, (like a tiny speaker), the other receives them.
The speed of sound is approximately 341 meters (1100 feet) per second in air. The
ultrasonic sensor uses this information along with the time difference between sending and
receiving the sound pulse to determine the distance to an object. It uses:

Distance = Time x Speed of Sound divided by 2

Time = the time between when an ultrasonic wave is transmitted and when it is received
You divide this number by 2 because the sound wave has to travel to the object and back.

Fig 4.4.1: Ultrasonic Sensor.

11
In industrial applications, ultrasonic sensors are characterized by
their reliability and outstanding versatility. Ultrasonic sensors can be used to solve even the
most complex tasks involving object detection or level measurement with millimeter
precision.

No other measuring method can be successfully put to use on such a wide scale and in so
many different applications. The devices are extremely robust, making them suitable for
even the toughest conditions. The sensor surface cleans itself through vibration, and that is
not the only reason why the sensor is insensitive to dirt. The physical principle the
propagation of the sound works, with a few more exceptions.

The measuring method employed by ultrasonic sensors has been viewed as an excessively
complex technology, and only used as a last resort ... as a solution for particularly difficult
applications. Those times have long since passed!
Ultrasonic sensors have proven their reliability and endurance in virtually all industrial
sectors.

4.4.2 GAS SENSOR:

Fig 4.4.2: Gas Sensors

In current technology scenario, monitoring of gases produced is very important. From home
appliances, such as air conditioners to electric chimneys and safety systems at industries
Monitoring of gases is very crucial. Gas sensors are very important part of such systems.
Small like a nose, gas sensors spontaneously react to the gas present, thus keeping the
system updated about any alterations that occur in the concentration of molecules at gaseous
state.

Gas sensors are available in wide specifications depending on the sensitivity levels, type of
gas to be sensed, physical dimensions and numerous other factors. This Insight covers
a methane gas sensor that can sense gases such as ammonia which might get produced from
methane. When a gas interacts with this sensor, it is first ionized into its constituents and is
then adsorbed by the sensing element. This adsorption creates a potential difference on the
element which is conveyed to the processor unit through output pins in form of current.
What is this sensing element? Is it kept in some chamber or is kept exposed? How does it
get current and how it is taken out? Lets find out in this Insight!!!
The connecting leads of the sensor are thick so that sensor can be connected firmly to the
circuit and sufficient amount of heat gets conducted to the inside part. They are casted from
copper and have tin plating over them. Four of the six leads (A, B, C, D) are for signal
fetching while two (1,2) are used to provide sufficient heat to the sensing element.
The pins are placed on a Bakelite base which is a good insulator and provides firm gripping
to the connecting leads of the sensor.

4.4.3 LDR SENSOR:

Fig 4.4.3(a) : Photo Resistor

A Light Dependent Resistor (LDR) or a photo resistor is a device whose resistivity is a


function of the incident electromagnetic radiation. Hence, they are light sensitive devices.
They are also called as photo conductors, photo conductive cells or simply photocells. They
are made up of semiconductor materials having high resistance. There are many different
symbols used to indicate a LDR, one of the symbol is shown in the figure below. The arrow
indicates light falling on it.

Fig 4.4.3(b) : Working of LDR

Working Principle of LDR


A light dependent resistor works on the principle of photo conductivity. Photo conductivity
is an optical phenomenon in which the materials conductivity is increased when light is
absorbed by the material. When light falls i.e. when the photons fall on the device, the
electrons in the valence band of the semiconductor material are excited to the conduction
band. These photons in the incident light should have energy greater than the band gap of
the semiconductor material to make the electrons jump from the valence band to the
conduction band. Hence when light having enough energy strikes on the device, more and
more electrons are excited to the conduction band which results in large number of charge
carriers. The result of this process is more and more current starts flowing through the
device when the circuit is closed and hence it is said that the resistance of the device has
been decreased. This is the most common working principle of LDR.

Fig 4.4.3 (c): LDR Module


4.5 BLOCK DIAGRAM:

Fig 4.5: Block Diagram

The aim of this project is to develop a home automation system that can be controlled
remotely using a landline connection. The home automation is one of the most emerging
trends in modernization of home appliance control. Presently, conventional wall switches
are located in different parts of the house and one has to physically go near them and press
them to turn the loads on/off. It becomes very difficult for the elderly or physically
handicapped people to do so

This system is designed to provide control of home appliances through landline by dialing
the designated number for the particular load. Dialing can be done from the home phone or a
call made to the home number from outside. This system is designed without engaging a
programmable microcontroller but is based on digital logic using GSM which receives the
command from the mobile phone to develop digital output.
CHAPTER 5. CHALLENGES OF SMART HOMES

A recent study by Microsoft researchers determined that the top four barriers to wider
adoption of smart homes are the issues associated with linking disparate systems, poor
manageability, high cost of ownership, and difficulty of integrating security systems.

5.1 Linking disparate systems

The smart home market is fragmented, at present. Many competing manufacturers are
developing disparate smart home systems and technologies, as can be seen in a cursory
glance at Amazons new home automation storefront. Its easy to integrate devices made by
the same vendor, but that requires, in many cases, consumers to buy replacement devices.

5.2 Limited functionality

Integrating devices from disparate vendors often results in limited functionality and
unreliable service. Further, many systems on the market have complex interfaces that limit
the functionality of smart homes. Finally, app-based smart home systems, while cheaper
than fully custom integrated systems, have more limited functionality than full systems. For
example, systems like Lowes Iris and Revolv are not compatible with home entertainment
products.

5.3 Costs

Fully integrated custom systems are expensive and often require a consultant to install them,
and structural changes to the home, both costs of course tacked on to the price of the system
itself. This of course, does not include the costs of maintenance and repair.

5.4 Awareness

Due to the market fragmentation and limited existing consumer adoption, there is little
mainstream awareness of what is currently available. The market is almost entirely
comprised of the wealthy who are offered the features as part of either new construction or
relatively new high-end homes on the market; and do-it-yourselfers.
CHAPTER 6. FUTURE OF SMART HOMES:

While the smart home market of the present is fragmented and small, and faces many
challenges to widespread adoption, the smart home market is growing, in functionality,
sales, and expectations. Its future looks bright, at least in part due to the following trends:

6.1 IOT in Smart Homes

Increasing connectivity may one day connect everything in your home, from your placemats
to your plant vases. The more connected objects, the more functionality the smart home will
possess.

6.2 Robotics in Smart Homes

Many experts and futurists predict that in the next several decades, robots will be in every
household. Whether these are humanoid robots or those more functional in form, their
integration into the smart home of the future is a near-certainty. Robots will likely either be
fully integrated with the smart home operating system and help manage it, along with
providing assistance doing manual task.
CHAPTER 7. CONCLUSIONS

In this paper a security interface and home automation system is presented using an Android
mobile device. It is a short range system that is simple to use and easy to interface. Multiple
layered passwords are implemented to make the whole system versatile and trustworthy for
the users. Home automation system part is also very flexible and user friendly. In future this
proposed system can also be expanded to multiple doors and windows and more home
appliances can be integrated with the system. The purpose of the system is to use mobile
phones inbuilt Bluetooth facility for automation. Different hardware and software unit of the
system are described. The complete application software has been designed using Android,
using C Language. It is a good paradigm for any Automation System based on Android
Mobile Phone and Bluetooth.

18
CHAPTER 8. REFERENCES

1. N. Sriskanthan ,Tan Karand, Bluetooth Based Home Automation System.


Journal of Microprocessors and Microsystems, Vol. 26, pp.281-289, 2002.

2. Muhammad Izhar Ramli, Mohd Helmy Abd Wahab, Nabihah, TOWARDS


SMART HOME: CONTROL ELECTRICAL DEVICES ONLINE ,Nornabihah
Ahmad International Conference on Science and Technology: Application in
Industry and Education (2006).

3. Al-Ali, Member, IEEE & M. AL-Rousan,Java-Based Home Automation System


R. IEEE Transactions on Consumer Electronics, Vol. 50, No. 2, MAY 2004.

4. Pradeep.G, B.Santhi Chandra, M.Venkateswarao, Ad-Hoc Low Powered


802.15.1 Protocol Based Automation System for Residence using Mobile Devices,
Dept.of ECE, K L University, Vijayawada, Andhra Pradesh, India IJCST Vo l. 2, SP
1, December 2011.

5. E. Yavuz, B. Hasan, I. Serkan and K. Duygu, Safe and Secure PIC Based
Remote Control Application for Intelligent Home. International Journal of
Computer

Vous aimerez peut-être aussi