Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

ABSTRACT

The paper presents implementation of cost effective Home Automation System with and
Remote control. The home automation is intended to help and give help to satisfy the needs of
the Elderly and the handicapped at houses. Additionally, the idea of home automation system
will improve the normal living status at houses. The fundamental control system uses a wireless
Bluetooth device gives a wireless access to smart phones. The system design will remove the
existing electrical switches and gives a safer control over the switches with low voltage usage
technique. The system is designed to control electrical appliances and devices throughout the
house with relatively low cost design, user-friendly interface and ease of installation.

ii
TABLE OF CONTENTS
ACKNOWLEDGEMENT ............................................................................................................... i

ABSTRACT.................................................................................................................................... ii

CHAPTER ONE ............................................................................................................................. 1

THE PROBLEM AND ITS BACKGROUND ............................................................................... 1

1.1 Introduction and Its Background...................................................................................... 1

1.2 Statement of the problem ................................................................................................. 2

1.3 Statement of objective........................................................................................................... 2

1.3.1 General Objective .......................................................................................................... 2

1.3.2 Specific Objective.......................................................................................................... 3

1.4 Significance of the study....................................................................................................... 3

1.5 Scope and Limitation of the Study........................................................................................ 4

CHAPTER TWO ............................................................................................................................ 5

LITERATURE REVIEW ............................................................................................................... 5

2.1 Review of Related Literature ................................................................................................ 5

2.1 Foreign .............................................................................................................................. 5

2.2 Review of related Studies ..................................................................................................... 6

2.2a Foreign ............................................................................................................................ 6

2.2.b Local .............................................................................................................................. 7

2.3 Synthesis ............................................................................................................................... 7

2.4 Research paradigm................................................................................................................ 9

2.5 Definition of terms.............................................................................................................. 10

CHAPTER THREE ...................................................................................................................... 12

methodology ................................................................................................................................. 12

Introduction............................................................................................................................... 12

iii
3.1 Project Design ..................................................................................................................... 12

3.2 System Architecture............................................................................................................ 12

3.3 Hardware Requirement ....................................................................................................... 15

3.3.1 Microcontroller ............................................................................................................ 15

3.3.2 BC548 NPN transistor ................................................................................................. 18

3.3.3 Relay ............................................................................................................................ 19

3.3.4 LCD Display (16X2 LCD)........................................................................................... 20

3.3.5 GSM Modem ............................................................................................................... 22

3.3.6 Bluetooth...................................................................................................................... 24

3.3.7 Power Supply............................................................................................................... 26

3.3.8 System Clock Options.................................................................................................. 27

3.3.9 Servo motor.................................................................................................................. 29

3.3.10 Ceiling fan.................................................................................................................. 29

3.3.11 Voltage regulator ....................................................................................................... 30

3.3.12 Keypad ....................................................................................................................... 30

3.4 Software design................................................................................................................... 32

3.4.1 C PROGRAM GENERATION ................................................................................... 32

3.4.2 Android ........................................................................................................................ 36

3.4.3 Android Application description.................................................................................. 37

3.4.4 Development of the ANDROID application................................................................ 38

3.5 Time Schedule .................................................................................................................... 39

3.6 SYSTEM TESTING ........................................................................................................... 39

3.7 Cost analysis ....................................................................................................................... 41

Chapter four .................................................................................................................................. 42

Conclusion and recommendation’s............................................................................................... 42

iv
4.1 Summaries of findings ........................................................................................................ 42

4.2 Conclusions......................................................................................................................... 42

4.3 Recommendation’s ............................................................................................................. 42

Reference materials....................................................................................................................... 43

Bibliography ............................................................................................................................. 43

User manual .................................................................................................................................. 44

Appendices.................................................................................................................................... 53

v
List of Figures

Figure 1 IPO diagram of the system ............................................................................................. 10


Figure 2 System flow of the project.............................................................................................. 12
Figure 3 Block diagram of smart appliance system...................................................................... 13
Figure 4 flow chart for android application .................................................................................. 14
Figure 5 Flow code of the system program with GSM include.................................................... 15
Figure 6 Atmel AVR blocks Diagram. ......................................................................................... 17
Figure 7 Atmega328p pin mapping .............................................................................................. 17
Figure 8 BC548 Pin Diagram ....................................................................................................... 19
Figure 9 DC Relay........................................................................................................................ 20
Figure 10 Internal Structure of Relay ........................................................................................... 20
Figure 11 Liquid Crystal Display ................................................................................................. 22
Figure 12 GSM module ................................................................................................................ 23
Figure 13 Bluetooth module structure .......................................................................................... 25
Figure 14 System power supply.................................................................................................... 26
Figure 15 System power supply.................................................................................................. 28
Figure 16 Servo motor .................................................................................................................. 29
Figure 17 Ceiling fan .................................................................................................................... 30
Figure 18 4x4 Keypad................................................................................................................... 31
Figure 20 program creation steps.................................................................................................. 33
Figure 21 generating hex file ........................................................................................................ 34
Figure 22 Arduino sketch simple function.................................................................................... 35
Figure 23 Interfacing ARDUINO Programmer with PC .............................................................. 35
Figure 24 Upload Boot loader to ARDUINO Programmer .......................................................... 36
Figure 25 designed app ................................................................................................................. 37
Figure 26 User interface development for the application............................................................ 38
Figure 27 sample source code for the designed app. .................................................................... 38
Figure 28 GSM- Bluetooth key pad Proteus simulation............................................................... 40
Figure 29 Overall system design................................................................................................... 40

List of Tables

vi
Table 1 Time Schedule. ................................................................................................................ 39
Table 2 Cost analysis table ........................................................................................................... 41

vii
CHAPTER ONE
THE PROBLEM AND ITS BACKGROUND

1.1 Introduction and Its Background

Home automation system is getting popular and widely used in a lot of houses
Worldwide. It has tons of advantages to users even more to the handicapped and/or elderly users
in which it will make it easier for them to control their home appliances. Home
automation Systems (HASs) represents a great research opportunity in creating new fields
in engineering, and Computing. HASs includes centralized control of lighting, appliances,
security locks of gates and doors and other systems, to provide improved comfort, energy
efficiency and security system.

Home automation systems can be labeled to two medium in which how it is connected
and they are either wired or wirelessly connected. The main difference between these two kinds
is that home appliances are linked wirelessly a central controller if it a wireless home automation
system. On the other hand, the appliances are connected to a central controller if the
medium use wired communication method. Wireless system had been introduced in order
to dispose of wired communication among home appliances.

Due to the advancement of wireless technology, there are several different of


connections are introduced such as GSM, WIFI, and Bluetooth. Each of the connection has
their own unique specifications and applications. Among the four popular wireless connections
that often implemented in HAS project, Bluetooth is being chosen with its suitable capability.
The capabilities of Bluetooth are more than enough to be implemented in the design. Also, most
of the current laptop/notebook or Smartphone come with built-in Bluetooth adapter. It will
indirectly reduce the cost of the system. The project forwards the design of home automation
and security system using ARDUINO UNO R3. ARDUINO UNO R3 provides 6 Analog input
/ output pins and 14 digital input/output pins where other components and devices can be
connected. The android running OS in any phone connected to a network can access the status of

1
the home appliances via an application. It presents the design and implementation of automation
system that can monitor and control home appliances via android phone or tablet.
Nowadays, everyone cannot be separated from their smartphones. A number of five Thousands
individuals from USA, UK, South Korea, India, China, South Africa, Indonesia and Brazil took a
survey regarding which was done by Time magazine. The result proved most of them is
inseparable from their smartphones, eighty four percent allegedly claimed that survive without
their smartphones.

Another study shows that seventy five percent of the market share is Android and a total of
one hundred and six million android smartphone were shipped in the second half of
2012. Android smartphone became the top operating system in the market in the present
time worldwide and it became the most popular operating system known to man. Our Home
Automation system uses the advantage.

1.2 Statement of the problem

Today people are looking at ways and means to better their life-style using the latest
technologies that area available. Any new facility or hope appliance that promises to enhance
their life-style is grabbed by the consumers. The more such facilities and appliances are added, it
becomes inevitable to have easy and convenient methods and means to control and operate these
appliances. Conventional wall switches are located in different parts of a house and thus
necessitates manual operations like to switch on or off these switches to control various
appliances. It gets virtually impossible to keep track of appliances that are running and also to
monitor their performances.

1.3 Statement of objective


1.3.1 General Objective

The general objective of the project is to design and implement ANDROID based Home
Automation and security system that can be produced at a low cost with effective and

2
competitive usage. The System is designed to be more users friendly and easy to operate at any
level.

1.3.2 Specific Objective

The project is also been designed to be further working vision using minimum hardware
at the lower level of processing. These systems are directed at specific applications.
Our objective is to design ANDROID based Home Automation and security System that would
fulfill the following:

 Controlling Home Appliances via Application (Switch).


 To avoid manual controlling of home appliances.
 Secure Connection Channels between Application and ARDUINO.
 Controlled by any device capable of Bluetooth and Android OS.
 Extensible platform for future enhancement.

1.4 Significance of the study

The study will be undertaken to create a home automation system at low cost and easy to
create, the will benefit both the manufacturer and the client. It will help the manufacturer by
making it easy and cheaper to apply it, and it will also benefit the clients by making it
cost effective and the most important advantage is that it will make the house a much
more convenient place for the clients especially for the elders and the handicapped.
There are three actors in the study;-
 The one that studies the study(Researcher)
 The one who is manufacturing home automation system(Manufacturer)
 The one who use the new system(home owner)
The one that studies the study (Researcher)

In the case of the first i.e. the one who study the system, they are solving a problem of
controlling the system for the benefit of clients especially the elders and handicapped person’s

3
puts a way of living a simple way of life and plays a great role in minimizing the cost of home
automation system enabling them to acquire it easily.
The one who is manufacturing home automation system (Manufacturer)

On the other hand in the case of the manufacturer, it can easily have the opportunity for
providing such systems to the client side or market by easy manufacturing cost and by simple
way of assembling.

The one who use the new system (home owner)

Beside those actors the one who will benefits the most is the client or home owner. It is obvious
that the owners can acquire the system by easy cost and will have much more benefit while using
it.

1.5 Scope and Limitation of the Study


In order to achieve above objectives, the project need to be implemented as below:
 The ARDUINO UNO is used as the heart of the home automation system that controls
the entire operations involved.
 The home automation system can also incorporate both the door security and automating
home appliances in parallel.
 The home automation system is capable to detect unauthorized access and sending SMS
to authorized person.
 The home automation system is capable of displaying the status of main door.
 The system does not allow wide distance controlling only 10 – 20 meters.
 The system uses only 4 characters for password.
 The password only includes numbers not characters.
 The system is power dependent once the power is off the passcode will be a default
password

4
CHAPTER TWO

LITERATURE REVIEW

2.1 Review of Related Literature

As per our survey, there exist many systems that can control home appliances using
android based phones/tablets. Each system has its unique features. Currently certain companies
are officially registered and are working to provide better home automation system features.
Following models describes the work being performed by others.

2.1 Foreign
The idea of automation can be dated back to 1800s, when Nikola Tesla developed the
idea of having a remote control for vessels and vehicles in 1898. [1] Later with the advent of
electrical appliances, the idea of home automation became more important. A.R.Al-Ali and
M.Al-Rousan developed a Java based Home Automation System. [2] It used Wi-Fi as a medium
for communication between the hardware and software component. Its main disadvantage was
that Wi-Fi range is limited and hence the user has to be in a certain range for operating the
system. An android based HAS been developed in [3]. It would use internet as a medium for
connectivity. Its disadvantage was that the unavailability of internet would fail the entire system.
Embedded smart home management scheme was presented in [4]. It was based on use of
Ethernet network. The system also had GSM support for the issue of unavailability of network. It
was thus costly and hence was the only disadvantage. D.Naresh, B.Chakradhar & S.Krishnaveni
presented the idea of Bluetooth based has in [5]. It used arm processor (ARM9 and ARM7), and
so the system has a complex architecture.

5
2.2 Review of related Studies
2.2a Foreign
[6] Sirsath N. S, Dhole P. S, Mohire N. P, Naik S. C & Ratnaparkhi N.S

The paper proposes a Home Automation system that employs the integration of multi-
touch mobile devices, cloud networking, wireless communication, and power-line
communication to provide the user with remote control of various lights and appliances within
their home.

The system uses a consolidation of a mobile phone application, handheld wireless


remote, and PC based program to provide a means of user interface to the consumer.
[7] Basil Hamed.

The main objective of the Paper is to design and implement a control and monitor system
for smart house. Smart house system consists of many systems that controlled by LabVIEW
software as the main controlling system in the paper. Also, the smart house system was
supported by remote control system as a sub controlling system. The system also is connected to
the internet to monitor and control the house equipment’s from anywhere in the world using
LabVIEW.

[8] Deepali Javale, Mohd. Mohsin, Shreerang Nandanwar

The prime objective of the paper is to assist handicapped/old aged people. It gives basic
idea of how to control various home appliances and provide a security using Android phone/tab.
The design consists of Android phone with home automation application, Arduino Mega ADK.
User can interact with the android phone and send control signal to the Arduino ADK which in
turn will control other embedded devices/sensors.

[9] Basma M. Mohammad El-Basioni, Sherine M. Abd El-kader and Mahmoud Abdelmonim
Fakhreldin

6
The paper proposes a new design for the smart home using the wireless sensor network
and the biometric technologies. The proposed system employs the biometric in the authentication
for home entrance which enhances home security as well as easiness of home entering process.
The structure of the system is described and the incorporated communications are analyzed, also
estimation for the whole system cost is given which is something lacking in a lot of other smart
home designs offers. WB-SH is designed to be capable of incorporating in a building automation
system and it can be applied to offices, clinics, and other places.
The paper ends with an imagination for the future of the smart home when employs the
biometric technology in a larger and more comprehensive form. The paper ends with an
imagination for the future of the smart home when employs the biometric technology in a larger
and more comprehensive form.

2.2.b Local
[10] Eyob Mekonen Ashenafi Endeshaw Aynalem Kemal Abraham Argaw

The prime objective of the paper is to design and implement voice recognition home
automation system and hospital equipment’s mainly patient bed and wheelchair. It gives basic idea
of how to control various hospital appliances and provide accessibility using Android phone/tab.
The design consists of Android phone with home automation application, Arduino Uno ADK.
User can interact with the android phone and send voice control signal to the Arduino ADK
which in turn will control other embedded devices/sensors.

2.3 Synthesis

The potential individual with certain desire will enter in to home his/her home for the
satisfaction of his/her needs. In general, home automation won’t stand alone because it is one of
a part of simplification of basic needs.

First the individual must set out his/her desire regarding home automation system and
find out the needs. The need must, therefore, be in clear view. Here the first problem arises. One
is dealing with the selective perception of various target groups. The psychology of perception is
7
already described the phenomenon of selective perception. People tend to match their individual
internal value systems with various visual forms of expression. In the way ,the market supply is
divided into several style groups that are perceived is that which the consumer immediately
notices as good and suitable for his own style group. On the other hand, the consumer will not
recognize what he did not notice as suitable for his/her style.

Here’s an example: a person who changes his car brand, suddenly recognizes that the
streets are almost full of exactly that “new” car brand. Prior to the, cars of that brand were not
recognized because the perception was focused on other models. In a way, the researchers
humans live on the island of our own style group and the other populated islands are “out of
sight”.
If the individual recognizes a product as interesting, he will investigate the products benefits. At
the stage of the decision-making process, a second important design feature becomes crucial.
The consumer will make an opinion as to the quality of the product and will compare them with
Benefits of competing products. So the quality and the design must fit within the smallest
sensory details, the visual and tactile qualities of the product are very important.

If the product convinces the consumer, a price comparison will follow. The would appear
to be simple as the researchers are dealing with clear difference. But it immediately becomes
complex because the price has to be related not only to the products benefits but also to the
aesthetic pleasure it gives.

Finally, the manufacturers brand has to not only clearly communicated its promise as to
the benefits of the product but it also needs to make sure that the product and its brand are
socially acceptable. If the balance of the design aspects, the product benefits, the price plus the
messages of the brand appeals to the consumer, then the producer is on target. Proceed to check
out.

` A well-designed product, however, not only catches the eye, but also creates the image of
benefit and promise and convinces the consumer that product is worth the price.

8
2.4 Research paradigm
To solve actual problems the researchers incorporate a development strategy that
encompasses the process, methods and tool layers referred to as a process model of a software
engineering paradigm. A process model for software engineering is chosen based on the nature
of the project and application, the methods and tools to be used, and the controls and deliverables
that are required.
For the system the researchers are incorporating all the methods, processes and tools
using prototyping paradigm. It begins with requirements gathering. The researchers met the users
of the system and defined the overall objectives for the software and hardware, identify whatever
requirements are known and outline areas where further definition is mandatory.

A “quick design” is then visible to the user, which further leads to the construction of a
prototype. The individual evaluates the prototype iteratively, which enables the developer to
better understand what needs to be done. The prototype can serve as “the first system” users get a
feel for the actual system and the developers get to build same thing immediately.
In the prototyping process:-
 The developer and the user work together to define the specifications of the critical parts
of the system.
 The developer constructs a working model of the system.
 The resulting prototype is a partial representation of the system.
 The prototype is demonstrated to the user.
 The user identifies problems and redefines the requirements

9
Figure 1 IPO diagram of the system

10
2.5 Definition of terms

VCC- IC supply pin

GND- Ground

RX- Receive

TX- Transmit

APP- Application

BT- Bluetooth

11
CHAPTER THREE
METHODOLOGY
Introduction
In the Chapter the researchers are going to Explain about the system Design construction
through Hardware and development of software. In addition, the chapter elaborates the hardware
and the software stage by stage. All the operations of hardware and software are also included in
the chapter.

3.1 Project Design

Figure 2 System flow of the project

3.2 System Architecture


The system architecture of the automatic home appliance can be divided into five
main Modules they are:
 Microcontroller Module
 Bluetooth Module

12
 GSM module
 Liquid Crystal Display (LCD ) Module
 Appliance Module
 Android APP module

The integration of the modules are producing the system which is more or less can be
divided into two phase where the first phase is the output smart Appliance system and the second
phase the monitoring system. The microcontroller, sensory and Appliance modules are in the
first phase of the system and LCD module is in the second phase monitoring system.

Figure 3 Block diagram of smart appliance system

13
Figure 4 flow chart for android application

The appliance systems will produce the output in three different areas that are the same
level with input is senses. Each level is sensed by the input which will trigger the same level of
output and the status of the output and temperature view on the LCD panel. Microcontroller
module controller is the main part of the system where all the process flow will be controlled by
the hardware accordingly to the embedded programming in it. Micro controller is chosen for the
system as the controller. In other word it is the heart of the device system.

14
Figure 5 Flow code of the system program with GSM include

3.3 Hardware Requirement


3.3.1 Microcontroller
An embedded microcontroller is a microcomputer that contains most of its peripherals
and required memory inside a single integrated circuit along with the CPU. It is in actuality "a
microcomputer on a chip."

A microcontroller can be considered to be a self-contained system comprising a


processor, memory modules and peripherals. Hence, a microcontroller can be used as an

15
embedded system. The majority of microcontrollers in use today are embedded in other
machinery such as automobiles, telephones, appliances and peripherals for computer systems.
The Intel 8051series was one of the first microcontrollers to integrate the memory, I /O, arithmetic
logic unit (ALU), program ROM, as well as some other peripherals, all into one very neat little
package. These processors are still being designed into new products. There are five major 8-bit
microcontrollers. They are: Freescale semiconductor’s 68hc08/68hc11, Intel’s 8051, Atmel’s AVR,
Zilog’s Z8 and PIC from microchip technology. Each of the above microcontrollers has a unique
instruction set and register set; therefore, they are not compatible with each other.
Three criteria in choosing microcontrollers are as follows:
 Meeting the computing needs of the task at hand efficiently and cost effectively;
 Availability of software and hardware development tools such as compilers assemblers,
debuggers, and emulators;
 Wide availability and reliable source of the microcontroller.
 Based on the above criteria the researchers choose the Atmega 328p Microcontroller.

ATmega328P Microcontroller
The microcontroller is a low-pot he researchers CMOS (Complementary Metal Oxide
Semiconductor) 8-bit microcontroller based on the AVR enhanced RISC (Reduced Instruction Set
Computer) architecture. The powerful execution of instructions in a single clock cycle leads to the
achievement of 1 MIPS per MHz throughputs allowing the designer to optimize power
consumption versus processing speed.

16
Figure 6 Atmel AVR blocks Diagram.

Figure 7 Atmega328p pin mapping

Pin Descriptions
VCC:-Digital supply voltage.

17
GND: -Ground.
Port B (PB7:0) XTAL1/XTAL2/TOSC1/TOSC2: Port B is an 8-bit bi-directional I/O
port with internal pull-up resistors (selected for each bit). The Port B output buffers have
symmetrical drive characteristics with both high sink and source capability. As inputs, Port B pins
that are externally pulled low will source current if the pull-up resistors are activated. The Port B
pins are tri state when a reset condition becomes active, even if the clock is not running. Depending
on the clock selection fuse settings, PB6 can be used as input to the inverting Oscillator amplifier
and input to the internal clock operating circuit. Depending on the clock selection fuse settings,
PB7 can be used as output from inverting optical amplifier.

Port C (PC5:0): Port C is a 7-bit bi-directional I/O port with internal pull-up resistors
(selected for each bit). The PC5...0 output buffers have symmetrical drive characteristics with both
high sink and source capability. As inputs, Port C pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port C pins are tri state when a reset condition
becomes active, even if the clock is not running.

PC6/RESET: If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the
electrical characteristics of PC6 differ from those of the other pins of Port C. If the RSTDISBL
Fuse is programmed, PC6 is used as a Reset input. A low level on the pin for longer than the
minimum pulse length will generate a Reset, even if the clock is not running.
Port D (PD7:0) Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected
for each bit). The Port D output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port D pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port D pins are tri state when a reset condition becomes active,
even if the clock is not running.

3.3.2 BC548 NPN transistor


BC548 is general purpose silicon, NPN, bipolar junction transistor. It is used for
amplification and switching purposes. The current gain may vary between 110 and 800. The
maximum DC current gain is 800.

18
Figure 8 BC548 Pin Diagram

The transistor terminals require a fixed DC voltage to operate in the desired region of its
characteristic curve, known as the biasing. For amplification applications, the transistor is biased
such that it is partly on for all input conditions. The input signal at base is amplified and taken at
the emitter. BC548 is used in common emitter configuration for amplifiers. The voltage divider
is the commonly used biasing mode. For switching applications, transistor is biased so that it
remains fully on if there is a signal at its base. In the absence of base signal, it gets completely
off.

3.3.3 DC Relay
Relay is one of the most important electromechanical devices highly used in industrial
applications specifically in automation. A relay is used for electronic to electrical interfacing i.e.
it is used to switch on or off electrical circuits operating at high AC voltage using a low DC
control voltage. A relay generally has two parts, a coil which operates at the rated DC voltage
and a mechanically movable switch. The electronic and electrical circuits are electrically isolated
but magnetically connected to each other, hence any fault on either side does not affects the other
side.

19
Figure 9 DC Relay

Relay switch shown in the image above consists of five terminals. Two terminals are
used to give the input DC voltage also known as the operating voltage of the relay. Relays are
available in different operating voltages like 6V, 12V, 24V etc. The rest of the three terminals
are used to connect the high voltage AC circuit. The terminals are called Common, Normally
Open (NO) and Normally Closed (NC). Relays are available in various types & categories and in
order to identify the correct configuration of the output terminals, it is best to see the data sheet
or manual. You can also identify the terminals using a millimeter and at times it is printed on the
relay itself.

Figure 10 Internal Structure of Relay

The internal structure of the relay is shown in the image above which is embedded
inside the plastic covering.

3.3.4 LCD Display (16X2 LCD)


A Liquid Crystal Display commonly abbreviated as LCD is basically a display unit
built using Liquid Crystal technology. When the researchers build real life/real world electronics
based projects, the researchers need a medium/device to display output values and messages. –
Liquid Crystal Displays comes in different size specifications. Out of all available LCD
20
modules in market, the most commonly used one is16×2 LCD Module which can display 32
ASCII characters in 2 lines (16 characters in 1 line).

LCD displays utilize to sheets of polarizing material with a liquid crystal solution
between them. An electric current passed through the liquid causes the crystals to align so that
light cannot pass through them. The liquid crystals can be manipulated through an applied
electric voltage so that light is allowed to pass or is blocked. By carefully controlling where and
what wavelength (color) of light is allowed to pass, a backlight provides LCD monitor’s
brightness.

The 1602 LCD (liquid crystal display), as show in Figure 18.1, is compatible with the
Atmega 328p microcontroller. The is important because the Liquid Crystal library that comes
with the Arduino IDE emulates the type of controller, and hence is able to drive the 1602 LCD
module via its library functions.

Some of the 1602 LCD functional characteristics are as follows:


 Display capacity: 16x2 characters;
 Chip operating voltage: 4.5V~5.5V;
 Operating current: 2.0mA(5.0V);
 Best operating voltage: 5.0V;
 Character size: 2.95x4.35 (WxH) mm.
The functionality of each pin is described in Table 18.1. As you can see, there are two
sets of power that gets supplied to the LCD. Pins 1 & 2 supply power to the basic functionality of
the module, while pins 15 & 16 are for the LCD’s backlighting. Additionally, using the center
tap of a potentiometer to adjust the voltage level to the LCD’s V0 pin, allows for the contrast of
the LCD display to be adjusted. To be able to interface to the LCD, you will need to solder a 16
pin header, if you have one, or 12 wires (first 6 pins and last 6 pins) to the module. If you are
using wires to solder to the LCD, make sure that they are of thick enough gauge to plug into a
breadboard.

21
Figure 11 Liquid Crystal Display

Basic operation description (from: http://arduino.cc/en/Tutorial/LiquidCrystal) The LCDs have


a parallel interface, meaning that the microcontroller has to manipulate several interface pins at
once to control the display. The interface consists of the following pins: A register selects (RS)
pin that controls where in the LCD's memory you're writing data to. You can select either the
data register, which holds what goes on the screen, or an instruction register, which is where the
LCD's controller looks for instructions on what to do next. A Read/Write (R/W) pin that selects
reading mode or writing mode an Enable pin that enables writing to the registers 8 data pins
(D0 -D7). The states of these pins (high or low) are the bits that you're writing to a register when
you write, or the values you're reading when you read.

3.3.5 GSM Modem


The acronym GSM is presently understood to mean Global System for Mobile
Communications. The researchers chose the sim 900A because that our county Ethiopia support
the sim 900 2G 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.

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.

22
Figure 12 GSM module

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. AT Commands are instructions used to control a modem. AT is the
abbreviation of Attention. Every command line starts with "AT" or "at". That's why modem
commands are called AT commands.

AT is the prefix that informs the modem about the start of a command line. It is not part of the
AT command name. For example, D is the actual AT command name in ATD, and +CMGS is
the actual AT command name in AT+CMGS.

Format of the at command string and result code:

In general, AT commands comprises of three parts, which start with AT, followed by a
command and ended with the line termination character <cr>. The exceptions to this are A/ and +
which are sent without AT and carriage return.

The response from each command varies and is documented within the following text.
In general a successful command will respond with OK, whilst an unrecognized command will
fail with an error. If the command is recognized but fails due to an invalid sub parameter,
equipment error or network error, a more informative result code may be obtained by using the
command AT+CMEE=2, to display extended verbose result codes.

equipment error or network error, a more informative result code may be obtained by using the
command AT+CMEE=2, to display extended verbose result codes.

23
Here are some of the tasks that can be done using AT commands with a GSM/GPRS modem or
mobile phone:
 Get basic information about the mobile phone or GSM/GPRS modem. For example,
name of the manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number
(International Mobile Equipment Identity) (AT+CGSN), and the software version
(AT+CGMR).
 Get basic information about the subscriber. For example, MSISDN (AT+CNUM) and
IMSI number (International Mobile Subscriber Identity) (AT+CIMI).
 Get the current status of the mobile phone or GSM/GPRS modem. For example, mobile
phone activity status (AT+CPAS), mobile network registration status (AT+CREG), radio
signal strength (AT+CSQ), battery charge level, and battery charging status (AT+CBC).
 Establish a data connection or voice connection to a remote modem (ATD, ATA, etc.).
 Send (AT+CMGS, AT+CMSS), read (AT+CMGR, AT+CMGL), write (AT+CMGW), or
delete (AT+CMGD) SMS messages and obtain notifications of newly received SMS
messages (AT+CNMI).

3.3.6 Bluetooth
The Bluetooth module HC-05 is a MASTER/SLAVE module. By default the factory
setting is SLAVE. The Role of the module (Master or Slave) can be configured only by AT
COMMANDS. The slave modules cannot initiate a connection to another Bluetooth device, but
can accept connections. Master module can initiate a connection to other devices. The user can
use it simply for a serial port replacement to establish connection between MCU and GPS, PC to
your embedded project, etc. Just go through the datasheet for more details.
Hardware Features

 Typical ‐80dBm sensitivity.


 Up to +4dBm RF transmits power.
 3.3 to 5 V I/O.
 PIO (Programmable Input/Output) control.
 UART interface with programmable baud rate.
 With integrated antenna.

24
 With edge connector.

Software Features

 Slave default Baud rate: 9600, Data bits: 8, Stop bit: 1, Parity: No parity.
 Auto‐connect to the last device on power as default.
 Permit pairing device to connect as default.
 Auto‐pairing PINCODE:”1234” as default.

Figure 13 Bluetooth module structure

Pin Description
The HC-05 Bluetooth Module has 6pins. They are as follows:
ENABLE:
When enable is pulled LOW, the module is disabled which means the module will not turn on
and it fails to communicate. When enable is left open or connected to 3.3V, the module is
enabled i.e. the module remains on and communication also takes place.
VCC:
Supply Voltage 3.3V to 5V
GND:
Ground pin
TXD & RXD:
These two pins acts as an UART interface for communication
STATE:
It acts as a status indicator. When the module is not connected to / paired with any other
Bluetooth device, signal goes Low. At the low state, the led flashes continuously which denotes

25
that the module is not paired with other device. When the module is connected to/paired with
any other Bluetooth device, the signal goes high. At the high state, the led blinks with a constant
delay say for example 2s delay which indicates that the module is paired.

BUTTON SWITCH:
The is used to switch the module into AT command mode. To enable AT command
mode, press the button switch for a second. With the help of AT commands, the user can change
the parameters of the module but only when the module is not paired with any other BT device.
If the module is connected to any other Bluetooth device, it starts to communicate with that
device and fails to work in AT command mode.

3.3.7 Power Supply


The input to the circuit is applied from the regulated power supply. The A.C. input i.e.,
230V from the mains supply is step down by the transformer to 12V and is fed to a rectifier. The
output obtained from the rectifier is a pulsating D.C voltage. So in order to get a pure D.C
voltage, the output voltage from the rectifier is fed to a filter to remove any A.C components
present even after rectification. Now, the voltage is given to a voltage regulator to obtain a pure
constant dc voltage.

Figure 14 System power supply

In our project the researchers use 12 V dc motor for emergency exit, for flowing water to
the affected area and for reserve water in the Tank.
12V 6,500 RPM DC Electric Motor
 Torque 1300 g.cm
 Voltage (V): 12

26
No Load
 Speed (rpm): 13000
 Current (A): 0.6
At Stall
 Torque (g.cm): 1200
 Current (A): 17.2

At Max Frequency
 Efficiency (%): 55.1
 Power (W): 26.5
 Speed (rpm): 10489
 Torque (g.cm): 246
 Current (A): 4
At Max Power
 Output (W): 31.1
 Speed (rpm): 9304
 Torque (g.cm): 326
 Current (A): 5
Dimensions
 Diameter: 35.8mm
 Total Length: 71mm
 Shaft Length: 9.5mm
 Shaft dim: 3.175mm
 Mounting thread dim: 3m

3.3.8 System Clock Options


Obviously, for a circuit to do anything interesting the levels on the signals have to
change. Some embedded system products do things only when external events cause a change on
one of the inputs, but many circuits need to do things just because time is going by.
For example, a microprocessor-based circuit must go on executing instructions even if nothing
changes in the outside world. To accomplish the, most circuits have a signal called the clock the

27
purpose of the clock signal is to provide rising and falling edges to make other parts of the circuit
do their jobs.

Some microcontrollers, such as the Atmel AT Tiny series, have internal R-C oscillators and do
not need any external clock. However, the R-C oscillators are not as stable or as accurate as a
crystal or ceramic resonator. Some microcontrollers with internal oscillators improve clock
accuracy by providing a means to calibrate the frequency, but the result is still not as stable as a
crystal.

The two types of parts used to generate clock signals are oscillators and crystals. An
oscillator is a part that generates a clock signal by itself.

 Full Swing Crystal Oscillator


Pins XTAL1 and XTAL2 are input and output, respectively, of an inverting amplifier which
can be configured for use as an On-chip Oscillator, as shown in Figure 3-8. Either a quartz crystal
or a ceramic resonator may be used.

The Crystal Oscillator is a full swing oscillator, with rail-to-rail swing on the XTAL2
output, is useful for driving other clock inputs and in noisy environments. The current
consumption is higher than volts. C1 and C2 should always be equal for both crystals and
resonators. The optimal value of the capacitors depends on the crystal or resonator in use, the
amount of stray capacitance, and the electromagnetic noise of the environment.

For a given Frequency Range in (MHz) of 4-20 the recommended value for choosing
capacitors is from 12-22 Pico farads.

Figure 15 System power supply

28
3.3.9 Servo motor
Inside a servo motor, there are a small DC motor, potentiometer, and a control circuit.
The motor is attached by gears to the control wheel. As the motor rotates, the potentiometer's
resistance changes, so the control circuit can precisely regulate how much movement there is and
in which direction. The servo motor in the project operates on 6V. Servo motors are mainly used
for armature movement. The servo serves as a means of moving the supporting structure
vertically with precision. The speed of servo motor can be varied. The speed of the motor can be
controlled by providing consecutive pauses. A pause of hundred milliseconds was chosen after
each degree movement of the motor.

Figure 16 Servo motor

3.3.10 Ceiling fan


A ceiling fan is a mechanical fan, usually electrically powered, suspended from the
ceiling of a room, that uses hub-mounted rotating paddles to circulate air.

Most ceiling fans rotate much more slowly than most electric desk fans. They cool people
effectively by introducing slow movement into the otherwise still, hot air of a room. Fans never
actually cool air, unlike air-conditioning equipment, but use significantly less power (cooling air
is thermodynamically expensive). Conversely, a ceiling fan can also be used to reduce the
stratification of warm air in a room by forcing it down to affect both occupants' sensations and
thermostat readings, thereby improving climate control energy efficiency.

Unlike air conditioners, fans only move air—they do not directly change its temperature.
Therefore, ceiling fans that have a mechanism for reversing the direction in which the blades
push air (most commonly an electrical switch on the unit's switch housing, motor housing, or
lower canopy) can help in both heating and cooling.

29
Some ceiling fans are mechanically reversible (have adjustable blade pitch) instead of an
electrically reversible motor. In the case, the blade should be pitched to the right (or left if the
motor spins clockwise) for downdraft, and left (or right if the motor spins clockwise) for updraft.

Figure 17 Ceiling fan

An additional use of ceiling fans is coupling them with an air conditioning unit. Through-
the-wall/through-the-window air conditioning units typically found in rented properties usually
have both the tasks of cooling the air inside the room and circulating it. Provided the ceiling fan
is properly sized for the room in which it is operating, its efficiency of moving air far exceeds
that of an air conditioning unit, therefore, for peak efficiency, the air conditioner should be set to
a low fan setting and the ceiling fan should be used to circulate the air.

3.3.11 Voltage regulator


In the project, most of the components operates using 5 volt. However, 9 volt battery is
the source for the system. So a voltage regulator is a vital component to regulate the voltage from
the battery. The voltage regulator L7805 is a suitable component for the project because it can
regulate from nine volt to five volt. The last number on voltage regulator model indicates the
output voltage. To avoid the voltage regulator from overheating, a heat sink is used.

3.3.12 Keypad
A keypad is a set of buttons arranged in a block or "pad" which bear digits, symbols or
alphabetical letters. Pads mostly containing numbers are called a numeric keypad. Numeric
keypads are found on alphanumeric keyboards and on other devices which require mainly
numeric input such as calculators, push-button telephones, vending machines, ATMs,

30
Point of Sale devices, combination locks, and digital door locks. Many devices follow the E.161
standard for their arrangement.

A computer keyboard usually has a small numeric keypad on the side, in addition to the
other number keys on the top, but with a calculator-style arrangement of buttons that allow more
efficient entry of numerical data. The number pad (commonly abbreviated to "numpad") is
usually positioned on the right side of the keyboard because most people are right-handed.
Many laptop computers have special function keys which turn part of the alphabetical keyboard
into a numerical keypad as there is insufficient space to allow a separate keypad to be built into
the laptop's chassis. Separate external plug-in keypads can be purchased.

Figure 18 4x4 Keypad

Keypads for the entry of PINs and for product selection appear on many devices
including ATMs, vending machines, Point of Sale payment devices, time clocks, combination
locks and digital door locks.

31
3.4 Software design
3.4.1 C PROGRAM GENERATION
The program creation (development) cycle

To create a C program:

 Do the requisite mental work. The is the most important part.


 Create the C source code. The can be done using a text editor, but is normally done
within the IDE (Integrated Development Environment). C source files are plain text
and saved with a “.c” extension.
 Compile the source code. The creates an assembly output file. Normally, compiling
automatically fires up the assembler, which turns the assembly file into a machine
language output file.
 Link the output file with any required libraries using the linker. The creates an
executable file. For desktop development, the is ready to test.
 For embedded development, download the resulting executable to the target hardware
(in our case, the Arduino development board). For the Arduino, steps 3, 4, and 5 can
be combined by selecting “Build” from the IDE menu.
 Test the executable. If it doesn’t behave properly, go back to step one.

A program is text that you write using a programming language that contains behaviors
that you needs a processor to acquire. It basically creates a way of handling inputs and producing
outputs according to these behaviors.

Designing a program is the fact you have to think about first, before you begin coding it.
It generally involves writing, drawing, and making schematics of all the actions you want your
processor to make for you. Sometimes, it also implies to write what the researchers call pseudo
code. I hope you remember that the is what the researchers created in the previous chapter when
the researchers wanted to define precisely all the steps of our desired LED behavior.

32
Writing a program is typically what converts the pseudo code into real and well-formed
code. It involves having knowledge of programming languages because it is the step when you
really write the program. The is what we'll learn in a moment. Testing is the obvious step when
you run the program after you made some modifications to the code. It is an exciting moment
when you also are a bit afraid of bugs, those annoying things that make running your program
absolutely different from what you expected at first.
Debugging is a very important step when you are trying to find out why that program
doesn't work well as expected. You are tracking typo errors, logic discrepancies, and global
program architecture problems. You'll need to monitor things and often modify your program a
bit in order to precisely trace how it works. Maintaining the source code is the part of the
program's life that helps to avoid obsolescence. The program is working and you improve it
progressively; you make it up-to-date considering hardware evolutions, and sometimes, you
debug it because the user has the still undiscovered bug. The step increases the life duration of
your program.

Programming is the process of designing, writing, testing, debugging and maintaining the
source code of computer programs.

Figure 19 program creation steps

The microcontroller executes the program loaded in its Flash memory. The is the so
called executable code comprised of seemingly meaningless sequence of zeros and ones. It is
organized in 12-, 14- or 16-bit wide words, depending on the microcontroller’s architecture.
Every word is considered by the CPU as a command being executed during the operation of the

33
microcontroller. For practical reasons, as it is much easier for us to deal with hexadecimal
number system, the executable code is often represented as a sequence of hexadecimal numbers
called a Hex code. It used to be written by the programmer. All instructions that the
microcontroller can recognize are together called the Instruction set.

Figure 20 generating hex file

Every sketch needs two void type functions that do not return any value, setup () and
loop (). The setup () method is run once, just after the Arduino board is powered up and the loop
() method is run continuously afterwards. The setup () is where you want to do any initialization
steps, and loop () is for codes you want to run over and over again to program ATMEGA328P at
first the researchers have to burn boot loader of new ATMEGA328P using ARDUINO-UNO R3
Programmer. For burn boot loader connect new ATMEGA328P with programmer. Connection is
shown below.

34
Figure 21 Arduino sketch simple function

Caution: make sure Programmer is not connected to external power source because it get
required power from USB cable connected to computer and circuit with ATMEGA328P have
regulated +5v supply.

Figure 22 Interfacing ARDUINO Programmer with PC

35
Then the System is ready for burn boot loader, to do the action simply open IDE on computer
then upload configuration code which is consists of two different code named “optiLoader.h”
and “optiLoader.pde”.

Then upload both code to microcontroller, process is shown bellow

Figure 23 Upload Boot loader to ARDUINO Programmer

3.4.2 Android
Android is a mobile operating system developed by Google, based on Linux kernel and
designed primarily for touchscreen mobile devices such as smartphones and tablets. Android’s
user interface is mainly based on direct manipulation, using touch gestures that loosely
correspond to real-world actions, such as swiping, tapping and pinching to manipulate on screen
objects, along with a virtual keyboard for text input.in addition to touchscreen devices, Google
has further developed ANDROID TV for televisions, ANDROID auto for cars and android wear
for wrist watches, each with a specialized user interface.it is also available in more than 100
languages.

36
3.4.3 Android Application description
The designed android app has two version which in Amharic language versions or in English
language version.

Figure 24 designed app

37
3.4.4 Development of the ANDROID application
The designed android app is designed using ONLINE MIT APP INVENTER2.

Figure 25 User interface development for the application

Figure 26 sample source code for the designed app.

38
3.5 Time Schedule
MONTH MONTH MONTH
OF APRIL OF MAY OF JUNE
Activities or task
WEEK WEEK WEEK
1 2 3 4 1 2 3 4 1 2 3 4
1 Reading of related literature review
2 Requirement analysis and data gathering
3 Designing of GUI of the project
4 Implementation or program coding
5 Testing the functionality of the project
6 Deployment of the project

Table 1 Time Schedule.

3.6 SYSTEM TESTING


First of all, all the hardware units of the system were tested and it was ensured that they
were in a good working condition. Then, each and every unit were interfaced and implemented
individually with the microcontroller board and drove with the software according to the
necessity of the application. The testing of the application was not done at once after it was
completed. Rather each unit of the application was tested individually. The second unit was not
tested until the first unit gave the expected result and until it was not working according to the
necessity of the application. After all of the units were working correctly, the units were kept
together and then the whole system was developed and tested.

It was easy to figure out the bugs and the problem of the system as the behavior of each
unit was known while testing it.

39
Figure 27 GSM- Bluetooth key pad Proteus simulation

Figure 28 Overall system design

40
CHAPTER FOUR
CONCLUSION AND RECOMMENDATION’S
4.1 Summaries of findings
It is evident from this project work that home automation system can be cheaply made
from low-cost locally available components and can be used to control home appliances ranging
from the security lamps, television to air conditioning system and event house lighting system
was a success.

4.2 Conclusions
As stated in the above, the researchers have successfully control home appliances based on the
design and state of the objective mentioned. So the researchers have met the goal that the
researchers want to achieve in this project.

In the paper, the researchers have shown the design and features of a Home Automation System.
It is Bluetooth based, hence wireless and can be flexible in terms of cost. It has a special feature
for. Authentication details as a medium of security, thus preventing the use of application by
unauthorized users.

In future, the system could use more concepts of Artificial Intelligence so as make it more user
friendly and increase the automation. Another function that may be added is developing the
system for different languages other than English.

4.3 Recommendation’s
The researchers recommend some future works. Some of them are;-

 Find a way to increase the Bluetooth covering distance more than 20 meters.
 Before the researchers use the hardware components the researchers have to test all the
component functionality in order to avoid faults.

42
REFERENCE MATERIALS
Bibliography
[1] Wikipedia link: https://en.wikipedia.org/wiki/Home_automation
[2] A. R. Al-Ali and M. Al-Rousan, "Java-based home automation system", IEEE Transactions
on Consumer Electronics, vol. 50, no. 2, pp. 498-504, 2004.
[3] Alper Gurek, Caner Gur, Cagri Gurakin, Mustafa Akdeniz, Senem Kumova Metin, Ilker
Korkmaz, “An Android Based Home Automation System”, 2013 10th International Conference
on High Capacity Optical Networks and Enabling Technologies(HONET-CNS), December
2013.
[4] Thinagaran Perumal, Md Nasir Sulaiman, Khaironi Yatim Sharif, Abd Rahman Ramli, Chui
Yew Leong, “Development of an Embedded Smart Home Management Scheme”, International
Journal of Smart Home, Vol. 7, No. 2, March, 2013.
[5] D.Naresh, B.Chakradhar, S.Krishnaveni, “Bluetooth Based Home Automation and Security
System Using ARM9”, International Journal of Engineering Trends and Technology (IJETT),
Vol. 4 Issue 9, September 2013.
[6] Jayavardhana Gubbi, ,Rajkumar Buyya, Slaven Marusic,a Marimuthu Palaniswamia,
“Internet of Things (IoT): A Vision, Architectural Elements, and Future Directions”
[7] S.P.Pande, Prof.Pravin Sen, “Review On: Home Automation System For Disabled People
Using BCI” in IOSR Journal of Computer Science (IOSR-JCE) e-ISSN: 2278-0661, p-ISSN:
2278-8727 PP 76-80
[8] Basil Hamed, “Design & Implementation of Smart House Control Using LabVIEW” at
International Journal of Soft Computing and Engineering (IJSCE) ISSN: 2231-2307, Volume-1,
Issue-6, January 2012
[9] Basma M. Mohammad El-Basioni1, Sherine M. Abd El-kader2 and Mahmoud Abdelmonim
Fakhreldin3, “Smart Home Design using Wireless Sensor Network and Biometric Technologies”
at Volume 2, Issue 3, March 2013
[10] Eyob Mekonen Ashenafi Endeshaw Aynalem Kemal Abraham Argaw, ʻʻVoice Controlled
Home automation for disables people” 2015

43

You might also like