You are on page 1of 44

University

A
Project Report On

HOME SECURITY AND APPLIANCE CONTROL USING ARDUINO AND WIRELESS


SUPERVISION USING GSM

Submitted by:

NAME

(team)

Submitted to:

Department of Electrical Engineering

University

Date:

1
DECLARATION

I hereby declare that this project work entitled “” submitted to COLLEGE, is a record of an

original work done by me under the guidance of SIR, project supervisor and member of

Electronics and Communication Department, COLLEGE, and this project work is submitted in

the partial fulfillment of the requirements for the award of Bachelor Degree in Electronics and

Communication Engineering. The results embodied in this thesis have not been submitted in any

other University for the award of any degree.

STUDENT NAME

2
PAGE OF APPROVAL

UNIVERSITY

COLLEGE

DEPARTMENT OF ELECTRONICS ENGINEERING

The undersigned certify that we have read and recommended to the COLLEGE for acceptance,
a major project report entitled”” submitted by STUDENT NAME in partial fulfillment of the
requirements for the Bachelor’s Degree in Electronics and Communication Engineering

Supervisor External Examiner

SUPERVISOR NAME EXAMINER NAME

Lecturer Department of Electronics and


Communication Engineering
Department of Electronics Engineering
COLLEGE NAME
COLLEGE NAME

Head of Department Coordinator


Name Er. NAME
Sr. Lecturer Lecturer
Department of Electronics Engineering Department of Electronics Engineering

Date of Approval: DATE

3
Acknowledgment

First and foremost, we would like to express sincerest gratitude to our supervisor Er. SIR for his

invaluable suggestions for the project. We must oblige to his feedback and immense help during

the development of the project.

We express our special thanks to our Head of Department sir for his constructive suggestion

during the planning of this project work. We would like to express gratitude to our project

coordinator Er. Sir for his encouragement, suggestions and assistance during development of the

project.

Also we would like to thanks all teaching member of our electronics and communication

department for their tremendous support and help.

A special thanks to families and class mate for providing us the moral support and advices

throughout the project.

4
ABSTRACT

With the swift progression in technology the world is evolving promptly. With the plethora of

new and useful tech available, it will be naivety to neglect them in our daily life. In the fast

paced busy life it will be forgivable if people sometime fail to maintain home equipment and

monitor them. Also as people spend more time in work; it has created a vacuum in the case of

providing security to our beloved home. Our project strides to eliminate that vacuum and provide

every economic background people the system that allows them to remotely operate electronics

device and security. Existing technology like GSM and sensors are used. Arduino board was

used to provide interface to all components required. Future evolve is also possible as one could

reprogram the board. This makes the project flexible and open to future technology

enhancement. We learned how sensors worked and which engineering principle it implemented.

Our programming skills become more efficient. This project will be new stem in the field of

technology advancement, security and automatic operation of equipment.

5
Table of Contents
Declaration ---------------------------------------------------------------------------------------------------- 2
Page of Approval -------------------------------------------------------------------------------------------- 3
Acknowledgment ------------------------------------------------------------------------------------------ 4
Abstract ------------------------------------------------------------------------------------------------------ 5
Table of Content
Chapter 1
Introduction --------------------------------------------------------------------------------------------------- 9
1.1 Background ---------------------------------------------------------------------------------------------- 9
1.2 Motivation --------------------------------------------------------------------------------------------- 10
1.3 Project Objective -------------------------------------------------------------------------------------- 10
1.4Problem Definition ------------------------------------------------------------------------------------ 10
1.5 Scopes and Application ------------------------------------------------------------------------------ 12
1.6 Research Scope --------------------------------------------------------------------------------------- 12
1.7 Literature Review--------------------------------------------------------------------------------------- 12
Chapter 2
HARDWARE COMPOENTS-----------------------------------------------------------------------------
15
2.1 GSM Architecture-------------------------------------------------------------------------------------- 15
2.1.1 Mobile Station (MS) -------------------------------------------------------------------------------- 15
2.1.2 Base Station System (BSS) ------------------------------------------------------------------------- 16
2.1.3 Network Switching System (NSS) ---------------------------------------------------------------- 16
2.1.4 Operation and maintenance subsystem (OMSS) ------------------------------------------------ 16
2.1.5 GSM Based Control Toolkit------------------------------------------------------------------------ 17

2.1.6 GSM Based Data Acquisition System------------------------------------------------------------- 18

6
2.1.7 GSM Module ----------------------------------------------------------------------------------------- 18

2.2 Sim Card ------------------------------------------------------------------------------------------------ 19

2.3. Arduino ------------------------------------------------------------------------------------------------- 19


2.4 LCD ------------------------------------------------------------------------------------------------------ 21
2.5 Relay----------------------------------------------------------------------------------------------------- 24
2.6 ULN2003 IC -------------------------------------------------------------------------------------------- 25
2.7 Gas Sensor ---------------------------------------------------------------------------------------------- 26

2.8 Temperature sensor ------------------------------------------------------------------------------------ 26

2.9 Laser light security ------------------------------------------------------------------------------------ 28

2.10 Crystal Oscillator ---------------------------------------------------------------------------------- 29


CHAPTER 3
SOFTWARE COMPONENTS----------------------------------------------------------------------------
30
3.1 Eagle ---------------------------------------------------------------------------------------------------- 30

3.2 Proteus 7 professional IDE --------------------------------------------------------------------------- 30

3.3 C language ----------------------------------------------------------------------------------------------31

3.4 AT Command ------------------------------------------------------------------------------------------ 31

CHAPTER 4

WOEKING MECHANISM------------------------------------------------------------------------------- 32

CHAPTER 5

5.1 Hardware fabrication---------------------------------------------------------------------------------- 34


5.2 Testing and Debugging ------------------------------------------------------------------------------- 34
5.3.Software Simulation ---------------------------------------------------------------------------------- 35
5.4 Algorithm ----------------------------------------------------------------------------------------------- 37
5.5 Flowchart ------------------------------------------------------------------------------------------------38
CHAPTER 6

7
6.1 RESULTS -----------------------------------------------------------------------------------------------
40
6.2 Conclusion --------------------------------------------------------------------------------------------- 41

6.3 Limitations ---------------------------------------------------------------------------------------------- 41


6.4 Future Enhancement --------------------------------------------------------------------------------- 41
REFERENCE--------------------------------------------------------------------------------------------- 43

8
CHAPTER 1

INTRODUCTION

The contemporary technology has successfully converged the field of wireless domain and
automation of almost all electrical equipment and appliances wielded in industries and also
households. It is well established that we can easily maintain equipment that can be wirelessly
controlled and in addition to that could be made more responsive as compared to traditional
manually operated equipment. The safety of equipment operator could also be added to the
account of benefit from utilizing it. Contemplating all these above mentioned points a control
system has been designed which successfully borrows the existing wireless tech for controlling
and manipulating the action of electrical appliances along with providing security to home. For
achieving our goal we used wireless communication system i.e. GSM network for automatic and
remote wireless regulation and control of electrical appliances in home or in industries.

1.1 Background

It will not be false to state that communication sector has advanced exponentially in modern
time. The rapid advancement in technology has certainly reshaped the communication. Be
highly stacked featured phones or simple phones, nevertheless almost all population have access
to mobile phones making our world a global village. Due to this it has become easier to remain
connected to any person from around the globe via mobile phones. One can use social media like
Facebook, Gmail, Yahoo and Skype or simply make national / international call. Connecting
people around the globe are only the scratch of what mobile phones could able to achieve. As an
engineer we could utilize this technology to plethora of field. This in turn enhances the
capabilities of mobile phones itself. Technology field has seen rise of Infra-red and Bluetooth in
recent years which itself is multiple step forward in the direction of advancement. This

9
concurrently whisper in the ear of engineer that further improvement and new ideas are possible
which could make life of all people easier.

In this advancement climate interest in remote management of home appliances and remote
operation of industrial equipment has surged. On foundation of this idea control system has been
designed which amalgamates wireless mechanization of GSM which helps in remote control of
any electrical equipment. The primary benefit of this technology is it eradicates need of physical
presence of human to control and operate electronics appliances in any establishment.

Primary objective is to design a control system that allows the complete remote control of the
appliances. Secondary but equally important objectives of this project are:

 To control or superintend electronics home appliance which are connected in


microcontroller.
 To establish connection between user in remote location and system using GSM.
 To provide security in home or the establishment.
 To minimize the usage of electricity.
 To build system for security and automation of devices in reasonable cost.
.

1.2 Motivation

Since the evolution of human race began, human started to control the appliances themselves.
Before few decades due to low advancement of science and technology people have to be
physically present to control the electrical appliances. But now the situation is opposite.

Also in our country due to the lack of enough electricity we all are being deprived of energy
every day. In such context, this project helps to minimize the energy crisis and provide a cheap
and efficient way of saving the electricity. As wireless technology has taken mammoth steps in
its development, each fabric of this technological development could be utilized to make almost
all day to day tasks simple, easy and comfortable. It could be applied to effectively control the
electrical devices. It consequence is efficient use of electricity reducing electrical loss. This
platter has not yet been explored. So we undertook the beautiful opportunity to design and put
forward a reasonable cost effective system which wirelessly switches the electrical appliances.

10
.

1.3 Project Objective

The primary objectives that are fulfilling in this GSM based secured home automation system are
as follows:

1. To remotely and automatically control the home appliances when user are away from
home or even busy in other works in home using cellular phone.
2. To be familiar with all the electronics components and to learn how to interface
electronics devices with the microcontroller.
3. To effectively transmit and receive data and to minimize the power and wastage of time.

1.4 Problem Definition

Technology advancement has certainly skyrocketed the last decade or two. It has become
blessing to people around the globe as it has transformed people’s life to comfort. As up
growing through various technologies in future, the probable or optimal solutions were lack to
meet the desired tasks. Although, there were such system in previous time but lacks the exact
implementation in real time. Thus, our project can be addressed fulfilling the following points:
1. By using appropriate sensors, unnecessary loss of electricity can be detected accurately
and efficiently control it in order to save power.
2. The project provides the actual means to know the exact information and status of the
appliances.
3. Prevailing throughout the project, the actual means for security purpose of the home and
excessive electricity consumption can be minimized in real world.

As new breakthroughs and advancement of technology has become so fast that it has make
people life easier but also little more complicated. Now most people are using the technology
they do not understand. It also has alleviated the risk of using them as general user hardly
understands the new technology.
With the utilization of our designed system, everybody can safely draw attention towards home
security and home appliances. Our designed system comes in handy when there is actual means

11
needed to know exact information and status of the appliances to save electricity. Also for the
people who want to know status of the home and the appliances such as light, security,
temperature etc. They can now do so(know the status of appliances) by transmitting order like
text message from users mobile phone to the designed device and get forward reply message
from the device to our mobile phone. With this development, we know could efficiently and
successfully save electricity as well as some unusual electrical accidents.
1.5 Scope and Applications

The scope of our designed project is broad. Peoples or organizations want to control the
appliances so there is an ever hiking demand of control systems because of human advancement.

1. This project can contribute to different type of sector such as home, bank, corporate,
businesses, amusement parks, military areas and as well as hotels. Hence the user can be
secure by this system.
2. By using this system, the different sectors can save electricity and be safe from the
unusual electrical accidents.
3. As the system is not too expensive, every ordinary would be benefited.

1.6 Research Scope

Research in the field of this control system can give anticipated benefits. Moreover, this system
is most economical in the present scenario of developing countries like Nepal. With minimum
cost of implementation we can get accurate and durable system like our control system based on
GSM technology. Inefficiency of the people that is caused by traditional controlling process can
be improved by readily available affordable technology. If this project becomes successful then
there will be high demand in market since the people in today's world need easier and
comfortable system along with the security.

1.7 Literature Review

Our project denominated as “HOME SECURITY AND APPLIANCE CONTROL USING


ARDUINO AND WIRELESS SUPERVISION USING GSM” is not truly original in itself
12
from the very scratch. It did not magically appear from thin air. Previously too many attempts
were persistently done for achieving the control of electrical appliances.

As we have selected this project, we did our study and research in the related field. We have not
seen such project before in our college and neighboring colleges but some projects related on
similar interfacing were seen. This project however is entirely based on new concept. In the
quest of this sort of project we found only the projects related to the similar interfacings and
using some components similar to ours. We also did our research to find the related projects in
different universities in abroad; they were especially targeted using GSM technology. As our
country mainly uses GSM, it makes our project effective in context of Nepal. We simply
implemented the components available in local market to implement this system. Our designed
system can act in real time and can manipulate the functions of the electrical appliances upon
changing condition.

Our research work explores the potential of controlling all electrical and electronic aspect of
home which could leads to automation system in home. Our vision is to implement automation
in all possible aspect of home. To achieve this vision we use GSM modem to operate electrical
devices at home. Parameters like light of house, security system and other electrical appliances
via SMS which is detailed and elaborated in this paper. The research work primary enthralled on
function of the GSM protocol to allowed us to remotely control the designed control system
residing in home. It could be done using the frequency bandwidths. Further, AT commands for
GSM module and serial communication has been utilized in this development of this control
system which works on the foundation of GSM to automate home devices. With this design we
will be able to receive notification and status of any electrical home devices and manipulate them
by being far away from home if they have mobile phone. To achieve the baud rate, rate at which
information is send and received in channel, of 9600 bps we used GSM module in
microcontroller. Our proposed prototype of control system based on the foundation of GSM for
home automation was deployed, implemented and tested with maximum of four loads
(appliances) and was able to achieve the accuracy of ≥98%.

This designed control system relates to controlling devices, particularly adapted for the
appliances in homes, hotels, security areas and the like wherein it is desirable to periodically
change the configuration. For example, in case of home, electrical appliances may cause some

13
uncertain results which may be harmful if we do not manage them properly; both economic and
practical consideration precludes the manual control of this system in an effort to prevent such
uncertainties. This systems may not be suitable for some areas since power is generally required,
thereby presenting both practical and safety problems in case of power failure. Generally in
accordance with the invention, this system is provided for the manipulation of home based
electrical devices. It is such type of system that might be installed in an office or like that. Such a
home and office will provide a plurality of the rooms usually grouped by floor. In the
embodiment depicted the rooms consists of different electrical appliances that has to be
controlled by the user.

We have finalized this project for the high secured home automation system for the sector where
the control of electrical appliances is needed highly. We get knowledge about the control system
where we connect different device at once. When we got the knowledge about different
components then we fully studied about the home automation system. After that we saw the
background about how this project is performing their task in past and we came in decision that
this system is highly secured and giving its best result than the other system. The main thing that
we came in this project is that it also gives the indication that some unusual activities is taking
place and also this control system is more efficient.

As we have seen a similar work but not a same idea has been used by the other. Others have
done a system that only connects one device and also not a reprogrammable device but the
reprogrammable system is such system that can connect multiple devices. And also this system is
more secured than the other control system. The outcome of the works done by the other is good
in the view that they have got the output they wanted but we have a different process then the
other system.

Hence the decision of doing this project is for the purpose to improve the control system in our
country in different sector such as home and many more. The purpose of doing this project is
discussed above and the past scenario of this project is also discussed above. The main result of
GSM based control system for home automation is to give better results than other control
system.

14
CHAPTER 2

HARDWARE COMPONENTS

2.1 GSM Architecture

Though we did not make it as it us nearly impossible in our current capacity, we used preexisting
GSM architecture. GSM is an international digital cellular telecommunication. Here we utilize
the second -generation GSM networks for our operation of sending and receiving SMS.

Figure 2.1 Descriptive Architecture of GSM

15
2.1.1 Mobile Station (MS)

To properly establish communication between GSM module and wireless mobile phones it is
required to have mobile station. It facilitates the mobility and control of PSTN (Public Switch
Telephone Network) and PDN (Public Data Network) to user. It provides radio channels required
to transmit message.

2.1.2 Base Station System (BSS)

The base station system (BSS) is the bridge between the GSM mobile –services switching center
(MSC) and MS. Base transceiver system (BTS) and the base station controller (BSC) are two
elements of BSS. The BTS establishes communication with the MS over air wirelessly and
follows the encoded protocols. The BSC communicates with the MSC through the use of
standard wire line protocols. The BSC and BTS communicate with each other using a data link
protocol called LAPD (Link Access Protocol for D channel). The BTS is always physically
located near the antenna for the cell site.

2.1.3 Network Switching System (NSS)

NSS facilitates the communication between GSM and other network users. It also has our
database. It also controls switching function which is done by MSC. Our data is kept in HLR
(Home Location Register). It monitors the mobility of subscriber which is vital to update
location and perform handover functions. When user moves away from one geographical
location to other, it plays a major part.

2.1.4 Operation and maintenance subsystem (OMSS)

The OMSS function is to validate the identities of telecommunication entities for system
security. Authentication Centre (AUC) and EIR (Equipment Identity Register) performs thus
crucial function. AuC determines whether service will be granted to MS. MS information used
by MSC is provided by EIR. It also maintains the list of legitimate/illegitimate and faulty MS.

16
Figure 2.1.2 Specification table of GSM

2.1.5 GSM Based Control Toolkit

Wireless communication already has taken world by storm and world has pretty much gone
mobile, leaving behind the era of wire attached telephones. This has created the desire of
controlling the electronics appliances without moving an iota of inch. However, this desire could

17
be fulfilled through the help if Embedded System. Through this project we want to displace
programmable electronic control toolkit by SMS driven control toolkit.

We undertake this project to design a control toolkit that one could be able to control from
authorized mobile phone. The control message is sent from mobile phone a SMS. Designed
toolkit receives the send SMS and then checks and validates the Mobile Identification Number
(MIN) of message sending phone. If the verification is positive it decodes the message and
implements the order or code.

2.1.6 GSM Based Data Acquisition System

Data acquisition based on GSM allows the monitoring and also control of processes that are
remotely distributed. In our project we have designed the system that could successfully monitor
the multiple parameters like gas leakage in kitchen, temperature rise or fall in home, status of
home electrical appliances and security of home. This system effectively prevent the loss of
money and also saves time of owner. The poetic part of this project is that it could be applied to
all type of houses, factories, and industries.

2.1.7 GSM Module


To establish the connection between our microcontroller and mobile phones of us , GSM module
SIM900 is used in our project. It provides the facility of sending codes and commands and
receiving notifications or feedback from microcontroller. AT commands is used to program the
microcontroller so that it could successfully communicate with GSM module. It has receiver and
transmitter pins used for serial communication with the attached microcontroller, audio input and
output pins to establish connection with mobile phones, flash programming signal pins, mute
control pin and external power pins.

18
Figure 2.1.7 GSM Module

2.2 Sim Card

Sim Card is used as the personal number for the user. Every user have unique phone number and
is etched in sim card. It is inserted in mobile phone. It will establish connection from
telecommunication tower to mobile phone. User could then communicate with other user having
mobile phones with sim card. In our project we specified the phone no of sim card in GSM
module. Microcontroller then will be able to send notifications and feedback to that mobile
phone which have specified sim card.

2.3. Arduino

Arduino is computing platform which is open platform. Individual having the knowledge of
programming could create and write program for the board. One can use it to controls electrical
components, to interact and collect data from environment using sensors and actuators. We have
used arduino UNO.

19
It have predefined pin and ports itched on it. Using C and C++ programming language one can
program the arduino. This program could be loaded to the board through serial communication
interface like USB.It is relatively in expensive, easy to use and its IDE holds the benefit of being
able to run on all operating system.

For operation it constitutes 14 digital pins for input/output operation. For connecting sensors it
has allocated 6 analog pin. It also has the facility of USB connection which could be used to load
program and to make connection to other devices. Its preprogrammed bootloader allows the
programmer to upload their code without needing interface of external computer component. If
current is higher than 500 mA in USB port, arduino is equipped with polyfuse which
automatically breaks the connection until the overload portion is dislodged. It comes with 32 KB
memory. Used Arduino UNO has 14 digital pins for input and output operation. It could be done
by using pinMode(), digitalWrite(), and digitalRead() functions. We have to be critical of
voltage ad current that it could sustain to prevent the damage on the board. The suggested
operating condition is 20 mA and threshold is 40 mA. If exceeded, it will permanently damage
board.To fully grasp the pin located at arduino UNO and better understanding, we have added
the picture below.

Figure 2.3 Pin description of Arduino UNO

20
2.4 LCD

LCD is an electronic display used to exhibit intended information. As LCD are reasonably
priced, could be easily programmed and have little to no restriction for displaying special
characters and animation it is preferred in place of LEDs and seen segments. We use 16*2 LCD
for our project. It means it supports 16 characters per line and has 2 columns display. LCD has
two registers. They are Command and Data registers.

The function of command register is to store instructions provided to the LCD by


microcontroller. Those commands could be clearing the screen of LCD, setting the position of
cursor, controlling what to display on screen etc.

The function of data register is to store data that is to be displayed on the screen.

It works on +5V power supply and has duty cycle of 1/16.

21
Figure 2.4 (a): LCD board

Figure 2.4 (b): Pin Diagram of LCD

PIN NO. FUNCTION NAME

1 Ground(0V) Ground

2 Supply Voltage to pin (5V) Vcc

3 Contrast Adjustment via variable resistor Vee

4 When low selects command register and when high selects Resistor

22
Select

5 To write to the register: low Read/Write


To read from the register: high

6 when a high to low pulse is given it ends data to data pins Enable

7 DB0

8 DB1

9 DB2

10 DB3

11 DB4
8-bit Data Pins
12 DB5

13 DB6

14 DB7

15 Backlight Vcc (5V) LED+

16 Backlight Ground(0V) LED-

Figure 2.4 Pin Description of 16*2 LCD

2.5 Relay

The relays have a vital role in controlling the appliances. It functions on the principle of
electromagnetic force. Coil gets converted to electromagnet when electricity flows through it.
Steel plates in relay are attracted by this newly formed electromagnet which is carefully annexed
to the switch. Hence the control of switch i.e. ON or OFF is controlled by the current flowing in
the newly formed coil.
Relay plays a prominent role in isolating the various parts of circuit electrically. The control
reside in the microcontroller board which uses 5V DC but with relay it could be able to switch
the high voltage circuit (100 V AC and more).

23
Figure 2.5 (a): Schematic electric diagram of relay

Figure 2.5 (b): Relay as seen by user

2.6 ULN2003 IC
ULN2003 is a Darlington array IC and can sustain high voltage and high current. It is a
combination or electrical arrangement of two bipolar transistors. Each transistor can withstand

24
60mA current. It has a suppression diode. That diode fritter away voltage spikes while driving
inductive loads. If high input is provided it gives out low input and vice versa.
The logical diagram is shown below.

Figure 2.6 Logic diagram of ULN2003

2.7 Gas Sensor

Gas sensor is used to sense the presence of combustible gases and leaked LPG gas in kitchen or
in any room. Leakage of LPG gas could result in disaster, damage of property and life. Hence
gas sensor is integrated in the board which notifies the board about leakage. Microcontroller
board notifies the user by sending pre-programmed “THERE IS GAS LEAKAGE” to pre-
defined mobile number and also buzzes the alarm if there is leakage.

For this purpose we have used MQ-2 gas sensor. Its conductivity is low in normal air .In
presence of combustible gas or if LPG gas concentration rises its conductivity also rises steeply.
Due to this phenomenon, its output becomes LOW and this analog data is detected by
microcontroller.

25
Figure 2.7(a): Gas Sensor

Figure 2.7(b): The sensitive characteristics of MQ-2 to various gases

26
2.8 Temperature sensor

A temperature sensor is an electrical device which collects temperature data of the surrounding
and converts the collected data in form understood by microcontroller.

For our designed system we have used LM35 as temperature sensor. It is calibrated in Celsius.

Figure.2.8: LM35 sensor

2.9 Laser light security


Security is vital to house, office and industries. To ensure the security of establishment we build
a security system based on Laser and its light detector circuit. It gets triggered when someone
walks pass through it as light gets blocked.

In detector circuit we used LDR. It is a light dependent resistor. Its value in resistance is
indirectly proportional to lux. In presence of light (light given out by laser in our case), its
resistance decreases but when the light is blocked (light emitted by laser in our case) its
resistance increases. LDR has onboard potentiometer to calibrate light sensitivity. If light is
blocked, it changes the threshold coded at microcontroller. Due to this, it buzzes alarm and
notifies user.

27
Figure 2.9: Laser security

2.10 Crystal Oscillator

We used it in our circuit to achieve stable frequency between GSM module attached to
microcontroller and mobile phones. It is also used to synchronize the operation as it provides
clock pulse signals.

28
Figure 2.10 Crystal Oscillator

CHAPTER 3

SOFTWARE COMPONENTS

Software is essential to the project as it provides interface between hardware components and
establish automation. It also simplifies all the part of project and increases the visibility of the
project to great length. It created stability as well as user control over the project. Hardware

29
alone cannot function properly in our system. It should be guided and interface should be
provided to it so that it could function as per requirement and smoothly. By software we could
command every hardware to perform specified functions. Software could be the nervous system
of the designed control system. Smooth flow of project depends on the software.
In our project we have followed these stairs:
1. Identification and selection of project.
2. Commencement and planning of project.
3. Analysis of project.
4. Design
5. Maintenance and proper implementation of project

3.1 Eagle

EAGLE is electronic design automation which could be used to assist in printed circuit board
(PCB) and layout the editor. It is an application. Its schematic editor is used to design the circuit
diagrams. The designed parts could be landed at any portion and connected using ports.

3.2 Proteus 7 professional IDE


Proteus is software that is used for simulation of microprocessor along with all the sensors,
resistors, buzzers, transistors, cables and buzzers. It could also be used to design the matrix board
and schematic capture of circuit. It is used to design, analyze the electric circuit and to test it. It
allows us to design the placement of components in PCB board.

3.3 C language
C programming language is utilized to program the microcontroller. It efficiently provides
instructions to machine and provides low level access of machine to user while having the syntax
of high level language and run-time support is minimal. Hence is it useful and widely used. It has
bitwise operator and pointer capabilities.

30
We have selected C language to write software for AVR platform since it provides easy
scalability and lots of resources for easy development.

3.4 AT Command

AT (Attention) commands are commands that provide instruction to control a GSM modem
which will be executed at desired time in future. Its every command initialize with “AT” or “at”.

Commands like ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return to online
data state), AT+CMGS (Send SMS message), AT+CMSS (Send SMS message from storage),
AT+CMGL (List SMS messages) and AT+CMGR (Read SMS messages). With it we can
establish connection between GSM module and designated mobile phone.

CHAPTER 4

WORKING MECHANISM

Working Mechanism Block diagrams of all components used in making this control system is
presented in diagram below.

31
LCD
(GSM network)

(For home automation)


MOBILE GSM ULN 2003 RELAYS
PHONE MODULE

ARDUINO
(For safety) UNO To the device
to be
(For security) controlled
TEMPERAUTURE GAS
SENSOR LASER
SENSOR
LIGHT
SECURITY

POWER
SUPPLY

Figure 4.1 Designed control system based on GSM for wireless control of Electrical
appliances

Above presented illustrates the diagram of our project. Here we have been trying to show how all
components are connected with each other.

For transmitting and receiving of message mobile station is utilized. From it user will be able to
send message which in fact is code which commands and instructs the specific portions or
components of our control system. To implement it we added GSM module having SMS mode
which works via GSM network.

32
The block of our designed system is divided into three pronounced parts. They are namely home
safety, home automation and security system of home.

Home appliances, which we will remotely control by sending commands to operate falls under
home automation. It uses SMS method. User sends command via SMS to control system. It is
captured by GSM module and sends it to microcontroller for decoding and to understand the
command. The microcontroller will extract the message, decode it and according to it manipulate
relay module. The job of relay is to turn on or off the selected appliances by its owner.

In the home safety system category we have utilized temperature sensor which will detect the
rise or fall in temperature in home and LPG gas detector which detects combustible gas or smoke
and continuously send notification or feedback to the microcontroller. Here microcontroller also
continuously checks whether the received value from sensors are above the designated threshold
value. If the obtained data is above the threshold value, it will immediately send notification to
user regarding the situation via GSM module and network and also buzz the alarm.

In the home security system category we have installed laser security system which operates
using LDR and laser light. We keep laser light and LDR facing each other. When anybody walks
through it blocks the light and hence gets activated. It immediately sends this data to
microcontroller and microcontroller immediately notifies user about intrusion by sending SMS.
We have also added alarm in it.

Chapter 5

5.1 Hardware fabrication

After assembling all required components we fabricated all those electronic components to the
board. Both port of GSM modems was connected transmission and receiving port of arduino.
The relay which acts as a safe switch was placed between the appliance and board. MQ-2, gas
sensor, as it gives out analog output, was itched in A1 pin of arduino..LM-35, temperature

33
sensor, as it gives out analog output was itched in A0 pin of arduino. For on spot display LCD
was connected to pin 5 to pin 10 of arduino. LDR which is used for safety and intrusion
monitoring was also connected in microcontroller.

5.2 Testing and Debugging

In order to successfully implement our designed system we have used multiple but required
electronics components. They are described below:

For our system to function we connected all components in arduino board. I connected GSM
modem was connected in port RX and Rx was connected to arduino for transmission and
receiving of all accumulated data in arduino to user. This method is used to transmitting of
message to and from the GSM modem. The microcontroller board would decode the message
send by GSM and change the control of the relay module as specified. The relay would then
switch the appliances on or off as ordered by the owner.MQ-2 which is gas sensor provides
analog data so it is connected it to the analog pin, A1 of arduino board. Microcontroller would
evaluate and check the values to process them and to know if those values are higher than
registered values. It would send a notification SMS to me and also buzz the buzzer.LM-35 which
is a temperature sensor also provides data in analog form it is also connected it to the A0 pin of
arduino board. If the temperature is higher than normal; microcontroller automatically sends
feedback data to owner and also rings an alarm. To view the data in home, LCD was added and
connected it in pin 5 to 10 of arduino board. LDR is also connected in the board. It was
supplemented by laser light. When the amount of light it gets changed microcontroller would
send a notification SMS to me and buzz the buzzer. In this way, system completely use the
sensors added to microcontroller to secure the home and used GSM to send and receive
notification between me and the microcontroller. This designed system successfully functioned
to notify about changes in any sensors value with the help of GSM modem. The design was
successfully completed.

Further additional description is described below.

34
 GSM modem SIM900 is interfaced with the arduino board.
 GSM modems works in TTL logic level, in a built in serial port.
 In order to make our system to operate, we have to run algorithm which is burn in
ATmega328P microcontroller.
 For the purpose of microcontroller to function, we have used 16 MHZ crystal.
 In order to drive the relay we designed the hardware with relay driver i.e. ULN2003.
 For the purpose of security to function, we have interfaced LDR with microcontroller,
arduino board.
 For scanning the temperature of environment, we have used interfaced LM35 with the
microcontroller of arduino board.
 For the purpose of gas sensor to function, we have used interfaced MQ-2 with the
microcontroller of arduino board.
 We have used 16*2 LCD to display obtained data from sensors.
 The all the above discussed part need maximum 5 volt to operate.

This is all about our implementation in our design.

5.3 Software Simulation

It was vital to complete design on software first before physically designing the circuit. It allows
selecting correct sensors at correct ports in the circuit in simulation. It also made possible to set
upper limit value in sensors to notify the user. Proteus was used to present the electronic board
design on picture with all components used. In it visualization was possible for where to place
all components around arduino board. It is also to debug and for virtual simulation of designed
circuit. After successfully visualizing, testing and physically itch the board. EAGLE was utilized
to program the layout of circuit board. Arduino board was without the program and so coded in
C language so that all the connected components could function as desired. It was necessary to
provide notification when the value exceeded threshold value. In addition, AT commands was
used to provide instructions that will control used modem.

35
Figure 5.3 PCB Simulation

5.4 Algorithm

Below we have written the detail algorithm of the working of our designed control system.

Step1:- START

36
Step2:- Read SMS received from GSM module to SIM

Step3:- Obtain the information from the SMS

Step4:- Control and manipulate Relay according to this message

Step5:- Send notification SMS to owner.

Step6:- If the data of MQ-2 sensor is higher than 400 proceed to Step7 or else go to step 9

Step7:- Instantly send notification SMS to the owner regarding gas leakage

Step8:- Ring buzzer

Step9:- If the data of LM35 sensor is higher than normal temperature then proceed to Step 10 or
else go to Step 12

Step10:- Send notification SMS to owner about the temperature increment

Step11:- Ring buzzer

Step12:- If someone crosses the laser light then proceed to Step 13 or else go to Step15

Step13:- Send notification SMS to the owner notifying him/her about the theft

Step14:- Ring buzzer

Step15:- Go back to step 2

5.5 Flowchart

Start

Modem
Initialization

37
Read the SMS

(FOR HOME AUTOMATION)


Send feedback
Extract the command Execute them as message to
from SMS per request owner

(FOR SAFETY)
True
Send feedback Check if
Ring Alarm value send
message to
FOR owner by
GAS MQ2>400
SENSOR False

True
Check if value
Send feedback
send by Ring Alarm
LM35>normal message to FOR
temp. owner TEMPERATURE
SENSOR
False

(FOR SECURITY) True


Check if
Ring Alarm Send feedback
someone
message to
crosses the
FOR BURGLER owner
laser light
DETECTION False

Figure 5.5 Flowchart

38
Figure 5.6 Circuit Diagram of our designed system

39
Chapter 6

6.1 Results

We were able to successfully obtain the desired result. All sensors worked according to coded
data and value in the micro controller. If the value in surrounding crosses the coded value then it
sends analog data to micro controller. It continuously sends data to it as seen in LCD. Whenever
environment value crosses the upper limit, micro controller deploys GSM module to send pre-
coded message to user mobile phone. In which mobile phone message is to be sent is already
coded in program of micro controller. Microcontroller is the focal part of the overall system
which supervises all other components of the system. The status of the electrical appliances can
be known easily and the control of the appliances is precise unlike the prior approaches, where
control of the appliances is done by manually by the owner. In this approach the status is known
by transmitting the notification message via GSM modem to the particular owner from
microcontroller.

.6.2 Conclusion
The project is estimated to fulfill the prime objective of “HOME SECURITY AND
APPLIANCE CONTROL USING ARDUINO AND WIRELESS SUPERVISION USING
GSM”. A system having two sections i.e. Receiver (Mobile) and Transmitter along with
microcontroller for the processing of information about any unusual activities at home and
transmitting the status message to receiver Mobile and simultaneously sending notification
message to specified number or owner in order to control the appliances. The primary objective
of this project was to effectuate control of appliance and achieve home security based on GSM.
After conducting multiple tests, utilizing many program codes, debugging the designed circuit
we were able to achieve the desired result. We can conclude that it is super-efficient and instant
system to control the devices.

40
6.3 Limitations

How much we intricately design and tune the design, a designed system can never be a complete
system. It could always be enhanced. Every system had limitation and cannot pass the vicinity of
operation due to unavailability of technology or other reasons. Therefore our system has also
some limitations.

The limitations in our system are listed below:

 Difficult to detect human casualties.

 The designed system only function properly in the areas having good signal reception
but in remote and far away areas where it is hard to find strong GSM signal, the electrical
equipment may not respond as commanded by user.

 Power should be perpetually supplied to the electrical equipment to be controlled and


microcontroller so that they could function.

 Does not support automatic SIM configuration setting.

 No self-test system to detect system malfunction.

6.4 Future Enhancement

As the project has time constraint and unavailability of efficient devices we were unable to
implement some important features in our designed system. Hence, further enhancement could
be done. They are listed below as follows:

 We can dial make an emergency call if something went wrong with the appliances.
 We can monitor and automatically control parameters of appliances like overheating,
LPG gas leakage without using SMS.
 We can make this system more advanced with the attachment of security system.

41
 This system could be made more secure and efficient by deploying the camera and
connecting it to the microcontroller module that will be able to takes the photograph of
the accidents such as thefts.

42
REFERENCE

1. Mazidi, Muhammad Ali, “The 8051 Microcontroller And Embedded Systems Using
Assembly And C”, Pearson Education, September 2007, Second edition.
2. C. K. Das, M. Sanaullah, H. M. G. Sarower and M. M. Hassan,“Development of a Cell
Phone based Remote Control System: an Effective Switching System for Controlling
Home and Office Appliances”,International Journal of Electrical & Computer
Sciences IJECS-IJENS Vol.: 09 No: 10.
3. Ahmed M, Farooqui H, J K Pathan,“3G based automation using GSM
communication”,International Journal of Research in Environment Science and
Technology.
4. Sheikh Izzal Azid, Sushil Kumar,“Analysis and Performance of a low cost SMS Based
Home Security System”,International Journal of Smart Home. Published on July 2011.
5. Adamu MurtalaZungeru, Ufarna Victoria Edu,“Design and implementation of a short
message service based remote Controller”,Computer Engineering and Intelligent systems,
published in 2012
6. Main concept and idea of project retrieved on July 10, 2015 from
http://seminarproject.com/Thread-home-automation-using-mobile-communication
7. Working principle of different electronics devices retrieved on July 11, 2015 from
http://www.scribd.com/doc/45629715/8/fig-2-2-Block-diagram-of-GSM-BASED-
HOME-AUTOMATION
8. Datasheet: LCD, Retrieved on September 10, 2015 from
http://www.engineersgarage.com/electronic-components/16x2-lcd- module-datasheet
9. Datasheet: LCD, Retrieved on September 10, 2015 from
http://pdf.alldatasheet.com/datasheet-
pdf/view/25566/STMICROELECTRONICS/ULN2003A.html
10. Datasheet: ATMEGA328P , Retrieved on September 11, 2015 from
http://www.alldatasheet.com/datasheet-pdf/pdf/241077/ATMEL/ATMEGA328P.html
11. Datasheet: MQ-2 , Retrieved on September 11, 2015 from
https://www.seeedstudio.com/depot/datasheet/MQ-2.pdf
12. Datasheet: LM35 , Retrieved on September 11, 2015 from

43
http://www.engineersgarage.com/electronic-components/lm35-sensor-datasheet
13. Datasheet: ULN2003 , Retrieved on September 11, 2015 from
http://cdselectronics.com/kits/uln2003.PDF

44

You might also like