SlideShare a Scribd company logo
1 of 65
REMOTE OPERATED DOMESTIC APPLIANCES CONTROL
BY ANDROID APPLICATION
BY
IBIANG NTONGHA ENO
2010/170282
DEPARTMENT OF ELECTRICAL ENGINEERING
FACULTY OF ENGINEERING
UNIVERSITY OF NIGERIA, NSUKKA
AUGUST, 2015
UNIVERSITY OF NIGERIA, NSUKKA
FACULTY OF ENGINEERING
DEPARTMENT OF ELECTRICAL ENGINEERING
A PROJECT SUBMITTED TO THE DEPARTMENT OF
ELECTRICAL ENGINEERING, UNIVERSITY OF NIGERIA,
NSUKKA IN PARTIAL FULFILLLMENT OF THE
REQUIREMENT FOR THE AWARD OF THE BACHELOR OF
ENGINEERING (B.ENG) DEGREE IN ELECTRICAL
ENGINEERING
TOPIC:
REMOTE OPERATED DOMESTIC APPLIANCES CONTROL
BY ANDROID APPLICATION
PRESENTED BY:
IBIANG NTONGHA ENO ------------------------------------2010/170282
SUPERVISOR: ENGR. DR C.A NWOSU
AUGUST, 2015
REMOTE OPERATED DOMESTIC APPLIANCES
CONTROL BY ANDROID APPLICATION
DEDICATION
My dedication goes to the almighty God who gave me the inspiration to
successfully carry out this research work.
ACKNOWLEDGEMENTS
I wish to acknowledge the kind cooperation of my family members and my supervisor
ENGR Dr C.A. Nwosu for the good time, money and effort they assisted me with to
ensure that this project work went well. I wish to say thank you very much and pray that
God will replenish the energy you all spent in giving me all the support I needed.
ABSTRACT
This project presents the overall design of remote control of household appliance using
Android application with low cost and wireless system. Remote system is designed to
assist and provide support in order to fulfill the needs of elderly and disabled in homes
.The main control system implements wireless technology through the Bluetooth module
and Infrared LED to provide remote access from smart phone to household equipment.
An ATmega 328 is used as microcontroller in place of an Arduino to further exploit the
project. Relays are used to control switching of equipment along with the transistors, a
user-friendly application was coded in JAVA and run with Android studio
APPROVAL PAGE
REMOTE OPERATED DOMESTIC APPLIANCES CONTROL BY ANDROID
APPLICATION
This project has been supervised and certified as satisfying in part, the requirement for award of
a Bachelor of Engineering(B.Engr) in Electrical Engineering, Department of Electrical
Engineering, University of Nigeria, Nsukka.
AUTHOR SIGNATURE ……………………………............ DATE…………………………
IBIANG, NTONGHA ENO
(STUDENT)
CERTIFIED BY: SIGNATURE …………………………… DATE…………………………
ENGR. DR C . A NWOSU
(PROJECT SUPERVISOR)
CERTIFIED BY: SIGNATURE …………………………… DATE…………………………
ENGR. PROF E.C. EJIOGU
(HEAD OF DEPARTMENT)
CERTIFIED BY: SIGNATURE …………………………… DATE……………
(EXTERNAL EXAMINER)
LIST OF TABLES
TABLE TITLE PAGE
Table 2.1 Platform Requirements for Android Systems 10
Table 2.2 Bill of Engineering Measurements and Evaluation 33
LIST OF FIGURES
FIGURE TITLE PAGE
Fig 2.1 Bluetooth Module 12
Fig 3.1 Block Diagram of Remote Control of Household Appliance 13
Fig 3.2 Simulation of Power Supply 17
Fig 3.3 The Waveform Of The 7812 Regulator On Oscilloscope 18
Fig 3.4 Simulation of Micro Controller Stage 20
Fig 3.5 Voltage Waveform of the Input Voltage on Oscilloscope 18
Fig 3.6 Simulation of Power Switch 24
Fig 3.7 Circuit Diagram Of Overall System 25
Fig 4.3 ATmega 328 Pin Mapping 28
Fig 4.4 Microcontroller Circuit after Pin Mapping 30
Fig 4.5 Smart Home User Interface 32
Fig 4.6 Control of Lamp and Switch 32
LIST OF ABBREVIATIONS
ACRONYMS DEFINITIONS
HVAC Heating, Ventilation and air conditioning
RF Radio Frequency
iOS iPhone Operating System
SCADA Supervisory Control and Data Acquisition
GUI Graphical User Interface
EHS European Home Systems
IEEE Institute Of Electrical and Electronics Engineering
LAN Local Area Network
PLC Power Line Communication
DIY'ers Do- It-Yourself'ers
Wi-Fi Wireless- Fidelity
GPS Global Positioning System
OS Operating System
USB Universal Serial Bus
IP Internet Protocol
HAS Home Automation System
FM Frequency Modulation
BT Bluetooth
Rx Receiver
Tx Transmitter
PWM Pulse Width Modulation
vi
TABLE OF CONTENTS
Title Page ……………………………………………………………………………………… i
Approval Page ………………………………………………………………………………… ii
Dedication ……………………………………………………………………………………... iii
Acknowledgement …………………………………………………………………………….. iv
Abstract ………………………………………………………………………………………... v
List Of Symbols ………………………………………………………………………………. vi
List Of Figures ……………………………………………………………………………….. vii
List Of Tables ………………………………………………………………………………… viii
Table Of Contents …………………………………………………………………………….. ix
CHAPTER ONE: INTRODUCTION
1.1 Background of study……………………………………………………………… 1
1.1.2 Power automation............................................................................................ 2
1.1.3 Home Automation........................................................................................... 2
1.2 Project Aim............................................................................................................... 2
1.3 Project Objective...................................................................................................... 2
1.4 Project Scope And Limitation................................................................................... 3
1.5 Project Justification................................................................................................... 3
1.6 Chapter Layout.......................................................................................................... 3
CHAPTER TWO: LITERATURE REVIEW
2.1 Home Automation standard...................................................................................... 5
2.1.2 Insteon Standard............................................................................................. 5
2.1.3 Zigbee Standard.............................................................................................. 5
2.1.4 Z-wave standard............................................................................................. 5
2.2 Home Automation Implementation Platforms............................................................ 7
2.2.1 Ethernet............................................................................................................ 7
2.3 Arduino Controller....................................................................................................... 7
2.4 Android System........................................................................................................... 8
2.4.1 Google Android ................................................................................................ 8
vii
2.4.2 Blackberry OS.................................................................................................. 9
2.4.3 Apple iOS......................................................................................................... 9
2.4.4 Symbian............................................................................................................ 10
2.4.5 Windows phone................................................................................................ 10
2.5 Bluetooth module....................................................................................................... 11
2.6 Low Cost Home Automation..................................................................................... 12
2.7 Mobile And Web Based Control of Automatic Systems.................................... 13
CHAPTER THREE
Design of remote control for domestic appliances
3.1 Hardware Unit........................................................................................................... 15
3.2 The power supply unit................................................................................................ 15
3.3 Design Analysis Of the power supply unit………………………………………. … 16
3.4 The remote control unit............................................................................................... 19
3.5 The transmitter unit..................................................................................................... 19
3.6 The micro control unit................................................................................................. 19
3.7 Component Used On Vero board................................................................................ 20
3.7.1Step down transformer......................................................................................... 20
3.7.2 Capacitor ............................................................................................................ 20
3.7.3 Diode Bridge Rectifier........................................................................................ 20
3.7.4 Voltage Regulator............................................................................................... 21
3.7.5 Infrared sensor.................................................................................................... 22
3.7.6 Crystal Oscillator................................................................................................ 22
3.7.7 Resistor............................................................................................................... 22
3.7.8 Relay................................................................................................................... 23
3.7.9 Bluetooth Module............................................................................................... 23
3.8 Power switches……………………………………………………………………… 24
3.9 Software unit............................................................................................................... 25
3.9.1 Android Studio.................................................................................................. 25
3.9.2 Arduino Software............................................................................................. 26
3.9.3Java/ Android................................................................................................... 26
viii
CHAPTER FOUR:
Construction, testing and results
4.1 Construction ………………………………………………………………………. 27
4.2 Testing ....................................................................................................................... 30
4.3 Bill of Engineering Measurements And Evaluation………………………………. 33
CHAPTER FIVE: CONCLUSION, CHALLENGES AND RECOMMENDATION
5.1 Conclusion................................................................................................................ 34
5.2 Challenges ……………………………………………………………………….. 34
5.3 Precautions Taken Throughout The Project ……………………………………… 35
5.4 Recommendations................................................................................................... 36
REFERENCE
APPENDIX
1
CHAPTER ONE
INTRODUCTION
1.1 BACKGROUND OF STUDY
A "smart home" typically is a domestic environment that has been partially automated.
Home automation includes centralized control for lighting, HVAC, appliance
management, and others. Home automation aims to enhance the comfort, energy
consumption efficiency and security in domestic scenarios [1]. Generally, houses are
equipped with independent control panels to control all of the systems and appliances
present in the house.
The main purpose of a smart home is to centralize the control of all the devices
into a single control unit which can be programmed to do specific tasks suitable for the
owner and the home in question. The goal of a smart home is not only convenience but
also to reduce the consumption of resources such as power, gas, etc[2]. Due to the current
pricing on energy, resource conservation has become a part of a person's day-to-day life.
If a person has the possibility to control his home automation remotely he can reduce the
consumption of energy and thus cutting down on expenses. For example, If a person is
away from home there is no need for the air conditioner or ventilation to operate. The
same principle applies to illuminations, heating and other appliances.
Some smart home systems pause the operation of appliances until they are needed
again. Furthermore, there are several different technologies for implementing such smart
homes. Some standards utilize complex communication protocols and control wiring,
others rely on embedded signals in the existing power circuit of the house. A portion rely
on RF signals, and others become hybrids by combining several methods. All of the
controlling tasks are done through a microprocessor, for example Arduino [3], which
enables the communication and upon receiving some commands controls the different
systems in the house. Finally, the commands to control the appliances in the house are
sent by a central control unit such as a computer, remote control or smartphone (iOS,
Android).
2
1.1.2 POWER AUTOMATION
Power automation is the automated control and monitoring of power plants,
substations and transformers for effectiveness, efficiency and fault detection. It has made
it possible to have a reliable municipal or national electricity system which often
comprises remote and hard-to-reach transformers and power sub-system units. It makes it
possible to monitor different power units, relay their status and health information, and
even carry out fault detection and correction without human interference [4]. Example of
power automation system is the SCADA system.
1.1.3 HOME AUTOMATION
Home automation may designate an emerging practice of increased automation of
household appliances and features in residential dwellings, particularly through electronic
means that allow for things impracticable, overly expensive or simply not possible in
recent decades. Home automation includes all that a building automation provides like
climatic controls, door and window controls, and in addition control of multimedia home
theatres, pet feeding, plant watering and so on. But there exists a difference in that home
automation emphasizes more on comforts through ease of operation [5].
1.2 PROJECT AIM
The aim of this project is to design and construct a home automation system that
will control about four household appliances connected to it, using an android phone.
1.3 PROJECT OBJECTIVE
The objective of this project is to implement a low cost, reliable and scalable home
automation system that can be used to remotely switch on or off any household
appliance, using a prototype of Arduino Uno to achieve hardware simplicity, a Bluetooth
module for feedback from an android device to toggle the switch state.
3
1.4 PROJECT SCOPE AND LIMITATION
This project work is complete on its own by remotely and automatically
controlling household appliances. It does not implement control of automatic detection of
faults in the controlled appliance. This project focuses on developing of a main control
board prototype and a GUI on a smartphone. The microcontroller used is an ATmega 328
mapped from an Arduino Uno. The microcontroller interacts with the android phone
through a set of commands sketched using Amarino language in order to control and
monitor the function of target home appliances by using relays and transistor. The main
board is designed so that it complies with the household electrical standards. The user
interface is designed as simple and powerful as possible, and operates in a self- organized
way.
1.5 PROJECT JUSTIFICATION
This project is of contributory knowledge to the development and implementation
of home automation systems in Nigeria using low cost, available components like
microcontroller (ATmega 328), and an android phone.
1.6 CHAPTER LAYOUT
The entire project consists of five chapters which are Introduction, Literature
Review, Methodology, Result and Discussion and Conclusion and Recommendation.
Each covering a section of the work as summarized below:
Chapter 1 gives an introduction to automation as a whole and the different types of
automation.
Chapter 2 covers an extensive literature review of previous works on home automation
systems, the platforms over which home automation can be implemented. This chapter
will summarize the strength and weakness of the literature reviewed and come out with
the suitable methodology to be implemented to this project.
4
Chapter 3 highlights the project methodology, giving reasons for choice of specific
platforms and components, and also, comprehensive details on both hardware
components and communication services used.
Chapter 4 is on the project design and implementation with clear practical details of the
project design, construction and testing
Chapter 5 is on the conclusion and recommendations based on the project work with
emphasis on the reliability, maintainability and flexibility of the design . Also,
recommendations based on the challenges encountered and further possible development
of the project work are enumerated.
5
CHAPTER TWO
LITERATURE REVIEW
2.1 HOME AUTOMATION STANDARDS
There are many established industry standards for home automation systems and are
implemented over the various carrier modes ranging from powerline to wireless. The
popular and major standards are INSTEON,Zigbee,Z-wave,X10 and EHS
2.1.2 INSTEON STANDARD
Insteon is a home automation technology developed by SmartLabs. A distinctive feature
of Insteon is that it uses both radio frequency(RF) and already existing power lines(PLC).
Insteon is one of the few home automation systems that works in a dual-mesh network. It
is possible to use only RF or PLC but it is also possible to use them both at the same
time. The systems RF band operates at the 904 MHz frequency. The data rate is for
instantaneous 13,165 bits/sec and for sustained 2,880 bits/sec (6) .
All Insteon devices act like repeaters. This means that they can play the role of
sender, relay or receiver. If the devices that are trying to communicate are not within the
coverage area transmit messages using a multi-hop strategy. All messages are received by
the Insteon devices in the network, and if the message is not intended for the device that
receives the message it forwards the message to other Insteon devices. The maximum
number of hops for a message is three so avoiding to flood the network. Due to the fact
that all Insteon devices use two-way communication, when a message arrives to the
intended recipient, it sends out a message of a successful transmission (7).
2.1.3 ZIGBEE STANDARD
ZigBee is a wireless technology developed by the ZigBee Alliance. Its architecture
is composed by four main layers:
 Physical layer - responsible for sending and receiving commands and data.
 Medium access control layer - responsible for networking.
6
 Network layer - Controls the correct usage of the medium access control
layer. ZigBee uses RF communication type. The frequency bands in which ZigBee works
are 868MHz, 915MHz and 2400MHz. The range varies from 10 to 100 meters and the
transmission data rate is 250kbit/s. There are two types of devices in a ZigBee network
being Full and Reduce function. A Full function device usually acts as networks
coordinator.
A ZigBee network requires at least one network coordinator. A network
coordinator keeps a network tree of the other devices that can be contacted. In addition,
the network coordinator is the center node. The system uses hand-shaked protocol. In
other words if an end device gets a command it responds to the coordinator that it has
received and executed [8]. ZigBee is capable of connecting more than 64000 devices. It is
possible due to the fact that ZigBee networks are extendable with each other so
in theory the number of devices can be infinite.
2.1.4 Z-WAVE STANDARD
The Z-Wave technology was developed by a company named Zensys. Z-wave
consists of four layers and RF media that is controlled by the MAC layer.
 Application layer - Controls the decoding and execution of commands within a Z-
Wave network
 Routing Layer - Controls the routing of packets within a Z-Wave network
 Transfer Layer - Controls the transfer of data between devices - this includes
retransmission, acknowledgements and checksum check
 Mac Layer - Controls the usage of the radio frequency medium.
Z-wave uses the RF communication type. It works on the 868 MHZ, 908 MHZ or
2400 MHZ frequency band. The range of RF signals is 30-100 meters and the data rate is
20 kbit/s. Z-wave has two types of devices - they are Controlling devices and Slave
nodes. Controlling devices initiate the
7
communication by sending commands to other nodes; further slave nodes forward
messages to other nodes or if they are the intended recipients reply on and execute the
commands received.
Controlling devices have the full routing table of the Z-Wave network and is able
to communicate with all the devices in the network. Slave nodes cannot independently
send direct messages to other nodes unless they are ordered by the controlling devices. If
a slave node receives a command it executes it and after it sends a reply to the controlling
device notifying about the successful command execution. If the controlling device does
not receive an acknowledge message, the frame is retransmitted with a random delay to
avoid a potential collision. Maximum number of devices supported is 232 [9].
2.2 HOME AUTOMATION IMPLEMENTATION PLATFORMS
Home automation can be implemented over a number of platforms
namely,Bluetooth,infrared and Ethernet.
2.2.1 ETHERNET
Ethernet defines a number of wiring and signalling standards for the physical
connection of two or more devices together. Ethernet was originally based on the idea of
computers communicating over a shared coaxial cable acting as a broadcast transmission
medium. The methods used show some similarities to radio systems, although there are
fundamental differences,such as the fact that it is much easier to detect collisions in a
cable broadcast.
From this early and comparitively simple concept, Ethernet evolved into the
complex networking technology that today underlies most local area networks. The
coaxial cable was replaced with point-point links connected by Ethernet hubs and/or
switches to reduce installation costs, increase reliability, and enable point-to-point
management and troubleshooting [10].
2.3 ARDUINO CONTROLLER
8
This project is again a fully developed and published Android application. The main
functionality of this applications is that it allows users to connect to an Arduino device
and control it remotely. This requires the Arduino to be set up as a server (as above) and
for the user to know the specific IP address and port of the Arduino.
As previously discussed, this can be cumbersome and difficult for new users. In
usage, the application sends unencrypted plain text to the Arduino to perform its
functions [11]. This tool was designed to allow home automation and DIY users to
quickly and easily control devices within their own home network. The application
allows twelve functions to be set by the user, but does not include any security at all.
Furthermore, the system can only connect to devices within its own network (so this does
reduce security risks dramatically). Similarly to the Eight Control (above), the system can
interface with a single Arduino device at any given time which may prove costly,
difficult or impractical to expand outwards without incurring significant cost. The
application itself is very simplistic in its design, and does not include any smart"
features, timing, or even helpful descriptions. For this reason many users may avoid this
application, simply because they cannot understand how to use the application. As a good
design feature however, the application does not overcrowd the screen at any time, but
this does raise questions as to whether its screen usage is as efficient as it could be.
2.4 ANDROID SYSTEM
For the mobile application, there is a number of different systems that we could
have possibly chosen. The operating systems, as well as the justifications for their
usage/non usage, are shown below
2.4.1 Google Android
This operating system and platform is an incredibly powerful one, with a huge range of
customization available to it. Developed and maintained by Google, the operating system
is open source allowing code modifications by many other individuals and companies.
Furthermore, application development on the platform is free using the supplied SDK and
the android studio reducing development costs. The applications which are developed
then do not have to be uploaded to Google, but can be “side-loaded” onto a device to
9
install the full application.
The Android platform is a fully developed and mature platform and so there are
very few bugs and/or problems present. This platform has very innovative features and
very powerful hardware. The operating system is available on a huge number of devices
and is now the most used smartphone operating system in the world[12].The operating
system is also capable of being run on devices such as TV set-top boxes, computers,
tablets etc. making it a hugely influential piece of software. For all of the reasons stated
above, we have chosen Android as our primary development operating system.
2.4.2 Blackberry OS: The Blackberry OS is a well performing, highly used operating
system used throughout the world in many business applications. The OS itself is used by
home users and businesses for its ease of use in terms of messaging & communications,
as well as its strong data encryption capabilities.
However, there are several limiting features of this operating system. Firstly, the
Blackberry hardware that accompanies these devices are not always that powerful and as
such may be incapable of performing complex tasks. Secondly, not all Blackberry phones
have sensors or communications hardware such as WiFi, GPS, etc. Lastly, the global
usage of Blackberry smartphones has been decreasing within the last few months/years,
and as such we cannot target a diminishing platform.. These limiting factors have led us
to discard the Blackberry OS from use within our project.
2.4.3 Apple iOS: The Apple iOS operating system is an incredibly powerful platform
which is very widely used throughout the world with businesses, home users, and many
other groups. In terms of hardware, the devices are very well equipped coming with GPS,
WiFi, accelerometers, compass etc. This makes the devices extremely capable.
Furthermore, the iOS operating is highly used being the second most used operating
system globally. However, even with all of its advantages Apple impose heavy
restrictions on the use of its hardware and software. This means that in order to develop
for an Apple device, the developer must own an apple computer and run Xcode (Apple’s
development software). Without this, it is near impossible to develop for the platform.
Furthermore, in order to test the software the developer must purchase a
10
license from Apple to be recognized as a developer which is a yearly subscription
service. All of these will further increase the cost of development, up to a level where the
project cannot meet its aim of being cost effective. Unfortunately, this does mean that we
have to sacrifice a possibly lucrative opportunity for sheer number of users but our aim of
being cost effective is of higher priority. For the sole reason of cost and limited
capabilities without sufficient hardware, the iOS operating system has been withdrawn
from our development plan.
2.4.4 Symbian: The Symbian operating system was a bit of a wild card in terms of
development prospects. The reason for this is that it is not technically a smartphone
operating system. Symbian is often (and is still) used in many low cost/budget phone
handsets around the world. This means that a large amount of users in poorer countries
still frequently use these devices. However, these devices are very rarely fitted with
sensors such as GPS, accelerometers or even basic features like internet access. Although
this would vastly increase the user base, we must discard this system through lack of
features.
2.4.5 Windows Phone: Another strong contender for usage was the Windows Phone
operating system (either 7.8 or 8). This operating system is well established and runs on
the popular windows operating system. The phones themselves are powerful devices and
well featured, containing all the sensors necessary for the application to run. Although
this does present a fantastic opportunity for development, the newest versions of the
operating systems (and so far, the most popular) are still very new and therefore may
contain many bugs or problems which may hamper development. In future, this platform
would be very good to develop for, however due to time constraints this project will be
limited to one operating system.
Table 2.1 Platform Requirements for Android Systems[12]
Requirements
Platforms
Bluetooth
support
Background
processes
Openness Accessibility Low
complexity
11
Android
Blackberry OS
iPhone OS
Symbian
Windows Mobile
Windows Mobile is basically not open. Running background processes on iPhone
is only possible when the device has gone through a “Jail Break” procedure, but since we
want Amarino to run on off-the-shelf devices this is not what I was looking for. Sadly,
even the latest version of Apple's iPhone OS (Apple iOS 4) only allows very restricted
background processing not suitable for the kind of background service Amarino is
heading for. The iPhone OS is also not open and applications developed on iPhone OS
can only be redistributed via Apple’s proprietary Apple store.
At the end Android was selected as the preferred development platform. I agree
with [12] that Android has the lowest entry level for developers enabling even beginners
to start with. Each developer can download the Android SDK4 for free, without
registration and install applications on Android driven devices. Furthermore, since
Android 2.0, the Android SDK fulfills all mentioned requirements for Amarino.
2.5 BLUETOOTH MODULE
Bluetooth is a type of wireless communication protocol used to send and receive data
between two devices. It is free to use wireless communication protocol although its range
is lower than other wireless communication protocols like WiFi and ZigBee. But it is still
suitable for many low range applications. Bluetooth wireless protocol lies in the same
range of frequency of WiFi and ZigBee. It operates on the 2.41GHz frequency. The
Bluetooth modules are majorly applied in mobile phones, wireless audio controllers,
wireless head phones and microphones [13].
Bluetooth module works as a master or slave. There are many Bluetooth modules
available in the markets which are either master/slave or both. Master Bluetooth module
can send or receive data from other Bluetooth modules. But slave Bluetooth can only
12
listen to master Bluetooth module, since application of Bluetooth module in this project
doesn't need receiving signals from devices, it is therefore a slave [14].
Certain factors should be considered when selecting Bluetooth module; factors
such as maximum power output of Bluetooth module(here there are three classes of
Bluetooth modules and their power output range is from 1mW up to 100mW),the
distance between the two Bluetooth receiver and transmitter is a valid factor as this is
dependent on distance to function properly. Bluetooth modules need communication
protocols to interface with other devices, for example in this project our main focus is
Bluetooth module interfacing with microcontroller, and since microcontroller can
communicate with Bluetooth device through following wired communications to receive
data from other Bluetooth device(UART,SPI,USB). It depends on which wired
communication from the three one intends using for interfacing the microcontroller with
Bluetooth module. There are many Bluetooth modules available in the market which
support above three communications but the name of some famous serial Bluetooth
modules includes the HC-04, HC-05, RN41 and RN42.
All above Bluetooth modules have different range, power output and quality.
Before we went ahead to make any selection from the above listed Bluetooth modules,
we made sure there was need of master or slave Bluetooth module and the UART
communication met our needs as it is easy to write program using UART. While
selecting any Bluetooth module it is always advisable to check that it has built in
Bluetooth host controller, otherwise you will have to write your own software for this
purpose and it needs a lot of time and expertise in software programming [15].
13
Fig 2.1 Bluetooth Module
2.6 LOW COST HOME AUTOMATION SYSTEMS
An effort to bring home automation into the realm of home users, a large amount
of research has gone into making these systems more affordable. One of these methods is
shown in [16] where they propose a new micro-controller for home automation. The
researchers managed to identify and construct a new micro controller module which
allows ten PCI's to be connected. This means that using this single board, the user is
capable on controlling ten devices. Furthermore, the researchers also detail how the
devices could be controlled over Ethernet (note; not wireless of WiFi) to further increase
operability. Using this board, they can program in certain conditions to be checked and
actions to be performed when those conditions are satisfied.
2.7 MOBILE AND WEB BASED CONTROL OF AUTOMATION SYSTEMS
This research focuses mainly on the methods of controlling home automation systems.
Currently, these systems are cumbersome to use, and this has contributed to the many
reasons of slow adoption of home automation. Using today's systems, this technology is
kept to the realms of the more tech-savvy" families and businesses. User interface is an
extremely important topic in all areas of computing, including that of home automation.
The research shown in [17] demonstrates some of this work into implementing an easy to
use interface. In this research we can see that they have developed a system which can
control a home automation system from a desktop PC (or web browser) or a TV/Set-top
box with interface hardware.
They further demonstrate the usage can be performed on any computer which has
an internet connection (and thus is adding some functionality which we would like in our
system). The aim of this research was to create a generic user interface suitable for a 21st
century home. Furthermore, it details many of the reasons for slow adoption of home
automation throughout the general public. Finally, it states that an automation system
controller must be user friendly, self configuring and self installing. All of these
conditions must be met otherwise users will not use the system.
14
CHAPTER THREE
DESIGN OF REMOTE CONTROL FOR DOMESTIC APPLIANCES
Commands sent from the android phone to power house-hold appliances, are
received by the Bluetooth module, the module is a viable component that receives and
transmits signal to the microcontroller (we will only be concerned with transmission of
signal (Tx) since we are dealing with remote control of the appliance and not error
measurement). Our major task involves control of switchable devices like lighting bulbs
and sockets, therefore we require an NPN transistor that is being driven by high voltage.
The driving of the transistor makes the Normally open relay close, thereby powering the
electrical socket and lighting bulb.
Meanwhile the TV and Home theatre require the use of an IR LED on the control
box to transmit signal from the Android phone to the device.
15
Fig 3.1 Block Diagram Of Remote Control Of Household Appliances Using
Android Application
3.1 HARDWARE UNIT
This unit consist of components we can see and feel. The unit operates on
electrical/electronic components, analyzing the hardware into four sub-units makes our
job tidy, and they consist;
I. A power supply unit,
II. A micro-controller unit,
III. A power switch unit
IV. A remote control unit
The four units work together to control household appliance remotely by the use
of an android device. The (Android phone) sends a code through its infrared emitting
LED, the receiver (television, home theatre) receives the code through its infrared
receiver, and the microcontroller control unit decodes the code and the device powered
16
must have a rating commiserate with that of the Vero board in order to avoid electrical
damage of the electronic components used.
3.2 The power supply unit
This unit is made up of a step down transformer, a diode bridge rectifier,
capacitors for smoothing the waveform of current, and 3 voltage regulators used to make
sure voltage is adequately regulated for the microcontroller and Bluetooth module to
function properly without getting burnt due to over-voltage. When 240V AC mains
voltage is stepped down by the step down transformer to 15 V AC, the voltage is rectified
by a full bridge rectifier and the same voltage is smoothened by a capacitor and regulated
by the voltage regulators. This unit supplies power to the relay unit, the microcontroller
unit and the Bluetooth module unit, with each having different input voltage level for
smooth operation and good performance. For the circuit we require a 7812 voltage
regulator which gives the required output of +12V. The voltage regulator regulates above
its required output voltage, if the voltage is below, its required output voltage would be
passed out without being regulated. For example for a 7812, if the unregulated input
voltage is greater than 12V, it will be regulated to 12V, but if it’s less than 12V, for
example 9V, the 9V unregulated will be the output.
3.3 Design Analysis of the power supply unit.
From the datasheet of 7812 regulator, it requires an input voltage of 14.5V to 30V DC and from
the datasheet of the diode bridge, it has a voltage drop of 1.1V. For a peak voltage of
14.5+1.1=15.6V peak.
For the r.m.s voltage
Vrms = Vp/ -------------------------------------------------------------------(3.1)
Vrms = = 11.03V
17
Hence a transformer of preferred value of 15V, i.e. 220V/15V transformer rather than a 12V
transformer was employed considering that at times the voltage supply may be lower than
220V.
Therefore the peak voltage now becomes
Peak Voltage Vp= Vrms* ---------------------------------------------------(3.2)
Vp=
Output Voltage of diode bridge = Vp – Diode bridge voltage drop
Output Voltage of diode bridge = - 1.1
Output Voltage of diode bridge = 20.11V
20.11V is within range of the input voltage of the 7812 voltage regulator.
Assuming a ripple voltage of 15%
dv =
dt = s
Using I = --------------------------------------------------------(3.3)
C1 = ---------------------------------------------------------------(3.4)
I = 1.5A.
Therefore;
C1 =
A preferred value of 3000μF and 2200μF connected in parallel was however employed
giving a total capacitance of 3000μF + 2200μF = 5200μF.
18
To reduce the ripple left, compensating capacitors of 0.33μF and 0.1μF were
employed. These values are recommended in the datasheet of the voltage regulators.
Fig 3.1: Simulation of Power supply
Below are waveforms of voltages at different levels, starting with the AC
input
Fig 3.2 Voltage Waveform Of The AC Input Voltage On An Oscilloscope
19
Fig 3.3 The waveform of the 7812 regulator from an oscilloscope
3.4 The remote control unit
This unit sends codes through its infrared LED in form of infrared pulses at
a frequency of 38 KHz this code which is preprogrammed in this unit have
different pulse sequences. This unit is powered by an android phone, where
command sent to an appliance from the phone is managed by the microcontroller
and the microcontroller receives such commands from an infrared led.
3.5 The transmitter unit
This unit is powered with 5V and transmits the infrared code through the
transmitter (Tx) of the microcontroller and only allows code at the frequency of 38
KHz. This helps the transmitter to differentiate between the infrared code sent by
the remote and infrared from other sources.
3.6 The microcontroller control unit
20
This unit is the brain of the system. It consists of a microcontroller Atmega328p
which is clocked at 16 MHz by an external oscillator clock. This unit decodes the
received code from the receiver unit and instructs the driver unit by sending pulse width
modulated signals to the driver stage to perform desired operations of the appliance.
The ATmega 328 has 14 digital input/output pins(of which 6 can be used as PWM
outputs), 6 analog inputs, a reset button and a power jack. The ATmega 328
microcontroller has an operating voltage of 5V with input voltage within the range of 7-
12 volts, it has a DC rating for 3.3V (which was used in this project)of 50mA.
Fig 3.4 Simulation Of Microcontroller Stage
3.7 COMPONENTS USED ON VERO BOARD
3.7.1 Step-down transformer
A transformer is an electrical device that transfers electrical energy between two
or more circuits through electromagnetic induction. The step-down transformer is used to
reduce A.C voltage levels. In this case a 220V to 15V step-down transformer is applied in
the power supply unit of this project.
21
3.7.2 Capacitor: A capacitor is a passive two terminal electrical component used to store
energy electrostatically in an electric field. This is used in smoothing ripples after
rectification in the power supply unit of this project.
3.7.3 Diode bridge: A diode full bridge is used to rectify the 15V AC voltage from the
step-down transformer into DC voltage,
Fig 3.5 How Bridge Rectifier Works
22
3.7.4 Voltage regulator: Voltage regulators are designed to automatically maintain a
constant voltage level. Throughout the project, we used 3 voltage regulators since we had
need for different voltage levels to power our electronic components. The 7812 which
gives an output of 12V is connected to 7805 that gives an output of 5V used to power the
microcontroller meanwhile the LM117, a series of adjustable 3-terminal positive voltage
regulator capable of supplying in excess of 1.5A over a 1.2v to 37v output range.
Requiring two external resistors to set the output voltage to 3.3v needed by the Bluetooth
module, we tried using the voltage divider but realized the current did not meet up with
the rated current of the Bluetooth module.
Fig 3.5 The waveform of the 7812 regulator from an oscilloscope
3.7.5 Infrared sensor The sensor senses whether receiver of it is receiving light from
transmitter or not and feeds the result to the comparator. If any obstacle comes in
between receiver or transmitter then the path of infrared between receiver and transmitter
breaks off. This result of receiver receiving the light or not is sent to the comparator.
23
3.7.6 Crystal Oscillator: This is an electronic oscillator circuit that uses mechanical
resonance of a vibrating crystal of piezoelectric material to create an electrical signal at a
very precise frequency. In this project a 16MHz oscillator was used as an external clock
to the microcontroller.
3.7.7 Resistor: This is a passive two terminal electrical component that implements
electrical resistance as a circuit element. Resistors act to reduce current flow and at the
same time act to lower voltage levels within the circuits.
3.7.8 Relay: A relay is a switch which is made to operate by an electromagnet. With all
relays the voltage which causes the relay to switch on is higher than the voltage at which
the relay switches off. In choosing a relay, one has to consider; the size, the resistance,
the voltage it is expected to work on, the number of arrangement of the switch contacts
and the maximum current the contacts can carry safely (without sparking or overheating).
When relays are used in electronic circuits, there is one precaution that must always be
taken. A diode should be connected in parallel with the relay so that the high voltage is
shorted out. Since when the current in the coil is switched off, the magnetic field
produced by the coil disappears very quickly hence a large voltage is produced for a
fraction of seconds, which may burn lots of transistors or ICs or other components if not
protected by a diode.
By adding a fly-back diode the current has a path to continue flowing through coil
until the stored energy is used up. The diode also clamps the voltage across the coil to
about 0.7V protecting the electronics. The stored energy dissipates quickly in the diode
( ), where E is the stored energy, V is the voltage across the coil, I is the
inductor current, t is time in seconds. The current stops flowing and the relay turns off.
The diode should be able to handle the coil current for a short time and switch relatively
fast. Note: A resistor or zener diode can be placed in series with the diode to use up the
stored energy quicker.
24
This increases the amplitude of the voltage spike above 0.7V but the energy is
used up quicker (i.e. the voltage spike won't last as long). Usually it doesn't matter if the
relay takes 1ms or 100ms to turn off.
3.7.9 Bluetooth Module: the Bluetooth module is a power electronic chip designed to
transmit signal (Tx) to the receiving end of the microcontroller and receive signal (Rx)
from the transmitting pin of the microcontroller. This chip has an input voltage of 3.3V;
the input voltage is fed by the 117 voltage regulator. The receiving signal is not needed in
this project, as the microcontroller deals solely on transmitting commands sent by the
Android device to house-hold appliance without waiting for a feedback signal, thereby
making the communication pattern open system.
3.8 Power switches
This is another essential part of the design, as it checks the flow of current at different
point in time. From the NPN transistors whose functions are to act as a switch and a
control valve for current. If no electric current flows between the base and emitter
terminals of an NPN transistor, no current can flow between the collector and emitter
wires; in this state, the transistor is “off.” When you apply a small current to the base and
emitter, the transistor “turns on” nearly instantly, allowing a current flow between
collector and emitter. A transistor can be switched on and off this way many millions of
times per second. The relay performs the role of switching the light bulb and socket by
either changing from its normally closed position to normally open for OFF.
25
Fig 3.6: Simulation of Power Switch
26
Fig 3.7: Circuit Diagram of Overall System
3.9 SOFTWARE UNIT
Commands are coded with some good, free easy to use software programs that will all
work together to operate the domestic appliances, below are the listed software programs
used;
3.9.1 ANDROID STUDIO
This kit will allow us to develop the code for the Android mobile device. Although the
code could be written manually, the Android studio and plug-in allow a much more
refined and improved development experience including a full graphical interface editor
and a wide range of debugging tools.
3.9.2 ARDUINO SOFTWARE
In order to test the Arduino code (as well as write most of the code for the
27
Arduino), the Arduino official software will be installed. This allows us to build, compile
and run the Arduino code from the computer to the boards themselves
3.9.3 JAVA/ANDROID
This programming language is what we will be using to develop our Android
application. Although C/C++ could also be used, Java has several advantages for Android
development including being able to run the code on any device platform (due to the Java
Virtual Machine).
CHAPTER FOUR
CONSTRUCTION, TESTING AND RESULTS
28
4.1 CONSTRUCTION
The construction of this project was carried out in stages. The first stage was to
build the power supply that will power the electronic components of different voltage
rating. The transformer used in construction was centre-tapped to get a voltage of 15V
AC that was rectified by the bridge rectifier (soldered on the Vero board) to a Direct
Voltage of 15V,the 15v DC will then be smoothened by the soldered capacitor earlier
calculated. Since In this project, we require 5 volts for the microcontroller and 3.3 volts
for the module(from data sheet of each of the component) 3 voltage regulators were used
to achieve different voltage levels. An LM 7812 regulator was soldered to regulate the
15V to 12 volts which will be used by the relays to switch ON/OFF light bulbs and
socket. LM 7805 was as well soldered in series to the 7812 to output 5volts that will be
used by the microcontroller. The 3.3V Input voltage for the Bluetooth module is achieved
by soldering LM 117 [18].
The second stage of our construction involves the use of an ATmega 328 since we
mapped the Arduino to it, we had to use the map below:
29
Figure 4.3: ATmega 328 Pin Mapping(32)
As shown in Figure 4.3 above, 20 of the pins function as I/O ports. This means they
can function as an input to the circuit or as output.14 of the pins are digital pins, of which
6 can function to give PWM output. 6 of the pins are for analog input/output. 2 of the
pins are for the crystal oscillator. This is to provide a clock pulse for the ATmega chip. A
clock pulse is needed for synchronization so that communication can occur in synchrony
between the ATmega chip and a device that it is connected to.
The chip needs power so 2 of the pins, Vcc and GND, provide it power so that it
can operate. The Atmega328 is a low-power chip, so it only needs between 1.8-5.5V of
power to operate. The Atmega328 chip has an analog-to-digital converter (ADC) inside
of it. This must be or else the Atmega328 wouldn't be capable of interpreting analog
signals. Because there is an ADC, the chip can interpret analog input, which is why the
chip has 6 pins for analog input. The ADC has 3 pins set aside for it to function- AVCC,
AREF, and GND. AVCC is the power supply, positive voltage, that for the ADC. The
ADC needs its own power supply in order to work. GND is the power supply ground.
30
AREF is the reference voltage that the ADC uses to convert an analog signal to its
corresponding digital value. Analog voltages higher than the reference voltage will be
assigned to a digital value of 1, while analog voltages below the reference voltage will be
assigned the digital value of 0. Since the ADC for the Atmega328 is a 10-bit ADC,
meaning it produces a 10-bit digital value, it converts an analog signal to its digital value,
with the AREF value being a reference for which digital values are high or low. Thus, a
portrait of an analog signal is shown by this digital value; thus, it is its digital
correspondent value. The last pin is the RESET pin. This allows a program to be rerun
and start over. And this sums up the pin out of an Atmega328 chip.
We had to solder the pin socket to the vero board, solder the crystal oscillator at
pin 9 and 10,the chips for burning the microcontroller are fixed at pins 15 to 19,LED bulb
indicator was soldered at pin13 with a resistor 220 ohm resistor, the bulb indicates when
the micro controller is power on.
31
Fig 4.4: Microcontroller Circuit after Pin Mapping
The third stage of our construction was the power switch that will eventually
switch some devices. An NPN transistor was used to drive the 2 relays, we soldered the
NPN with a collector voltage of 12V that will close the normally open relays, which were
soldered with some resistors to drop the voltage to a switchable level.
And the last stage of construction requires soldering wires of the socket and lamp
holder to the relays and as well fixing and soldering of the AC input jack
4.2 TESTING
After the necessary system design, done in the previous chapter, each section is tested to
ensure that it actually functions in the required manner. The order that was observed
during the testing and implementation process is as follows
32
I. Testing of component before implementing each unit of the design , a confirmatory
test was carried out on each hardware and software unit to ensure their reliability.
Also the state of their terminals was also ascertained using a multimeter.
The different voltages of the power supply was tested using a multimeter and the
waveform of different voltages seen on an oscilloscope
II. Test implementation: Each unit was given a preliminary implementation on a
breadboard, to ascertain component positions and the various interconnections to
be made. This stage allows the opportunity for making any component removal or
replacement and interconnection adjustments until the desired result was achieved,
after which, it is implemented on a Vero board.
III. The code was tested to confirm functionalities were properly working by test
running the commands with a real android phone.
4.2.1 TEST OF THE ANDRIOD APPLICATION
The user friendly application called "Smart House", was sketched in JAVA using
Android studio. A safe connection notification between the Android phone and the
Bluetooth module is always shown on the interface of application, when a device having
the smart home application is paired with the module a notification of 1 device connected
is displayed. After the safe pairing we were able to test run the lamp and socket control
33
Fig 4.5 Smart Home User Interface
4.8 Test Of Lamp And Socket Switch
The control for the lamp switch and socket is very easy to use and we were able to switch
the lamp and the socket on the control board by swiping the on/off function on the
android device
Fig 4.6 Control of Lamp and Switch
34
4.3 BILL OF ENGINEERING MEASUREMENTS AND EVALUATION
The aim of any engineering project is to produce a reliable and cost effective product in
market. Hence, it is of prime importance that the cost analysis of any project be carried
out in order to ascertain its market position with respect to price. The cost analysis of the
project as carried out is presented in the table 4.1 below:
S/N Component Type Quantity Price
1 Bluetooth Module HC-05 1 8000
2 Microcontroller AT Mega 328 1 1600
3 Relays 12v 2 160
4 Transformer 220v-15-0-
15volts
1 250
5 Bridge rectifier LT 1240 1 50
6 Capacitors 100uF,10pF 2 40,20
7 Regulators 7812,7805,117 3 40,40,50
8 Resistors 15k,10k,10ohms 3 40, 20,20
9 AT Mega 32 pin socket 32 pins 1 40
10 Oscillator 16Mhz Crystal 1 70
11 Transistor NPN (TIP 41) 2 200
12 Socket 1 150
13 Lamp Holder 1 50
14 IR LED 1 10
15 Total 10850
35
CHAPTER FIVE
CONCLUSION, CHALLENGES AND RECOMMENDATION
5.1 Conclusion
Our motivation for this project was that a cost effective, extensible home
automation solution is made essentially existent in the current commercial world.
Today’s home automation systems are incredibly expensive and are not very extensible,
meaning that they are out of reach of many businesses and home users.
Furthermore, elderly or disadvantaged users do not have any way to control these
devices apart from a costly centralized device, or using existing hardware to enable
automations.
We were able to develop a system with most of the functionalities of existing
home automation products, whilst maintaining ease of use throughout. We made use of
an ATmega 328 microcontroller hardware device, and the Android mobile operating
system to send event and to control them as well, while not forgetting that the android
phone requires an application that was written using JAVA script.
5.2 CHALLENGES
The following are challenges encountered during the course of these project,
i. The project require some electronic components that are not easily found in the
country, means of acquiring the components is time dependent and this affected
our time schedule for the work.
ii. The Android application poised serious challenge, as it requires programming
language (a viable tool) yet difficult to learn within the time frame.
iii. In the power supply, there was difficulty getting a 3.3V voltage regulator for the
Bluetooth module. We initially attempted doing using a voltage divider rule but
realized the current of the rule was low and could not support the input of the
Bluetooth module.
36
iv. During soldering of the microcontroller unit, we accidentally dropped LED on the
separation from the power supply unit and this caused a voltage short circuit to the
microcontroller which later got burnt from the high voltage input.
5.3 PRECAUTIONS TAKEN THROUGHOUT THE PROJECT
From the software part to the hardware organization of components there is a need to
apply precautionary steps while implementing the project, the precautions observed for
the hardware include:
i. When building power supply, a lot of attention must be given to the voltage
waveforms, desired voltage from rated voltage components.
ii. The regular use of resistors must be applied on the Vero board as it is from the data
sheet to avoid over current, since each component has a maximum rating for current
and voltage.
iii. During the implementation of microcontroller, sufficient attention must be paid to the
separation of voltage pin holes on the Vero board to avoid short circuiting of the
microcontroller which may cause a possible over voltage.
iv. All soldering of electronic components done on the Vero board must be properly and
carefully done to avoid possible loss of electronic component.
v. Attention must be paid to mapping of the functions of the Arduino on the
microcontroller to enable it function properly.
vi. Avoid using voltage divider rule during regulation of voltage, as the rule does not
have a good current retain ability.
vii. The sketch of the application must be debugged and made brief to avoid errors.
37
5.4 Recommendation
In consonance with the project work and in view of the researched methods and
undertakings in the project design, the following are recommended:
This topic is a massive project that requires enough time to execute, as most of the
electronic components had to be shipped into the country, thereby requiring slightly more
money. I will recommend that the department should help the students in getting
components that are not locally available.
For the purpose of effective and flexible communication between house-hold appliance
and the controller, I recommend that the project should be done web based as an
individual does not compulsorily need to be within range to operate the appliances rather
can stay anywhere in world to probably switch off his conditioning set.
38
REFERENCES
1. Wikipedia, Home automation.URL
http://en.wikipedia.org/wiki/Home_automation 1
2. What is Home Automation?, 2012. URL http://www.smarthome.com/ homeautomation.html.
3. Arduino, Arduino.URL http://www.arduino.cc
4. Leonov V, Fiorini P, Sedky S, Torfs T, van Hoof C. Thermoelectric MEMS
generators as a power supply for a body area network. Proceedings of the 13th
International Conference on Solid-State Sensors, Actuators and Microsystems;
Seoul, Korea. 5–9 June 2005; pp. 291–294.
5. Noury N, Herve T, Rialle V, Virone G, Mercier E, Morey G, Moro A, Porcheron
T. Monitoring behavior in home using a smart fall sensor. Proceedings of IEEE-
EMBS Special Topic Conference on Microtechnologies in Medicine and Biology;
Lyon, France. 12–14 October 2000; pp. 607–610.
6. P. Darbee, Insteon (8 2005).URL http://www.insteon.net/pdf/insteondetails.pdf
7. P. Kinney, Zigbee technology: Wireless control that simply works (10 2003).URL
http://search.mouser.com/pdfdocs/ZigBeeTechnology.pdf
8. p. kinney, zigbee technology: wireless control that simply works (10 2003). url
http://search.mouser.com/pdfdocs/zigbeetechnology.
9. JFR, Z-wave protocol overview.URL
http://www.eilhk.com/en/product/Datasheet/Zensys/
10. Spurgeon, Charles E. (2000). Ethernet; The Definitive Guide. Nutshell Handbook.
O'Reilly. p. 29. ISBN 1-56592-660-9.
11. Android Developers. Android Design Guidelines, 2012. URL
https://developer.android.com/guide/practices/ui_guidelines/index.html.
12. Oliver E., "A survey of platforms for mobile networks research.," SIGMOBILE
Mob. Comput. Commun., vol. 12, no. 4, pp. 56-63, Feb. 2009.
13. D. Chomienne, M. Eftimakis (20 October 2010). "Bluetooth Tutorial" (PDF).URL
http://www.newlogic.com/products/Bluetooth-Tutorial-2001.pdf
39
14. ElShafee, Ahmed; Alaa Hamed, Karim " Design and Implementation of a WiFi
Based Home Automation System"( August 2012). World Academy of Science,
Engineering & Technology;2012, Issue 68, p2177
15. Juing-huei Su, Chyi-shyong Lee, and Wei-chen Wu. The design and
implementation of a low-cost and programmable home automation module. IEEE
Transactions on Consumer Electronics, 52(4):1239{1244, November 2006. ISSN
0098-3063.
doi:10.1109/TCE.2006.273139.URLhttp://ieeexplore.ieee.org/lpdocs/epic03/wrap
per.htm?arnumber=4050050.
16. Marquesoft. Arduino Controller android app - Arduino Forum, 2012. URL
http://arduino.cc/forum/index.php/topic,127770.0.html
17. P.M. Peter M Corcoran and Joe Desbonnet. Browser-style interfaces to a home
automation network. IEEE Transactions on Consumer Electronics, 43
(4):1063{1069, 1997. ISSN 00983063. doi: 10.1109/30.642372. URL
http://dl.acm.org/citation.cfm?id=2275611.2276059.JPG
18. http://www.ti.com/product/lm117
40
APPENDIX
JAVA CODE FOR OTHER APPLIANCES(LAMP AND SOCKET)
public class OtherRemote extends ActionBarActivity implements
CompoundButton.OnCheckedChangeListener {
Switch lampSwitch;
Switch socketSwitch;
static boolean lampSwitchState = false;
static boolean socketSwitchState = false;
private static String DEVICE_ADDRESS = MainActivity.DEVICE_ADDRESS;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_other_remote);
lampSwitch =(Switch) findViewById(R.id.lampSwitch);
lampSwitch.setOnCheckedChangeListener(this);
socketSwitch =(Switch) findViewById(R.id.socketSwitch);
socketSwitch.setOnCheckedChangeListener(this);
}
41
@Override
protected void onStart(){
super.onStart();
lampSwitch.setChecked(lampSwitchState);
socketSwitch.setChecked(socketSwitchState);
}
@Override
protected void onStop(){
super.onStop();
lampSwitchState = lampSwitch.isChecked();
socketSwitchState = socketSwitch.isChecked();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_other_remote, menu);
return true;
}
42
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if(buttonView.equals(findViewById(R.id.lampSwitch))){
if(lampSwitch.isChecked()){
Amarino.sendDataToArduino(this,DEVICE_ADDRESS,'l',1);
43
Toast.makeText(OtherRemote.this, "LAMP ON", Toast.LENGTH_LONG).show();
}
else{
Amarino.sendDataToArduino(this,DEVICE_ADDRESS,'l',0);
Toast.makeText(OtherRemote.this, "LAMP OFF", Toast.LENGTH_LONG).show();
}
}
else if(buttonView.equals(findViewById(R.id.socketSwitch))){
if(socketSwitch.isChecked()){
Amarino.sendDataToArduino(this,DEVICE_ADDRESS,'s',1);
Toast.makeText(OtherRemote.this, "SOCKET ON", Toast.LENGTH_LONG).show();
}
else{
Amarino.sendDataToArduino(this,DEVICE_ADDRESS,'s',0);
Toast.makeText(OtherRemote.this, "SOCKET OFF",
Toast.LENGTH_LONG).show();
}
}
else{
Toast.makeText(OtherRemote.this, "ERROR", Toast.LENGTH_LONG).show();
}
44
}
}
CODE FOR UI
package com.mycompany.smarthouse;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.content.Intent;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.Toast;
import android.widget.ToggleButton;
import at.abraxas.amarino.Amarino;
public class MainActivity extends ActionBarActivity implements
CompoundButton.OnCheckedChangeListener {
public static String DEVICE_ADDRESS = "20:15:02:05:62:69";
45
ToggleButton connectButton;
static Boolean connectButtonState = false;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
connectButton =(ToggleButton) findViewById(R.id.connectButton);
connectButton.setOnCheckedChangeListener(this);
}
@Override
protected void onStart() {
super.onStart();
connectButton.setChecked(connectButtonState);
}
@Override
protected void onStop(){
super.onStop();
connectButtonState = connectButton.isChecked();
46
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
47
return super.onOptionsItemSelected(item);
}
public void openTelevisionRemote(View view) {
//Do something in response to button
Intent startTelevisionRemote = new Intent(this, TelevisionRemote.class );
startActivity(startTelevisionRemote);
}
public void openHomeTheaterRemote(View view) {
//Do something in response to button
Intent startHomeTheaterRemote = new Intent(this, HomeTheaterRemote.class );
startActivity(startHomeTheaterRemote);
}
public void openOtherRemote(View view) {
//Do something in response to button
Intent startOtherRemote = new Intent(this, OtherRemote.class);
startActivity(startOtherRemote);
}
@Override
48
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if(isChecked){
Amarino.connect(this, DEVICE_ADDRESS);
Toast.makeText(MainActivity.this, "CONNECTED",Toast.LENGTH_LONG).show();
}
else {
Amarino.disconnect(this, DEVICE_ADDRESS);
Toast.makeText(MainActivity.this,"DISCONNECTED",Toast.LENGTH_LONG).show();
}
}
}
AMARINO CODE FOR MICROCONTROLLER
/*
Controls your sound system and TV
for nt's project
An IR LED must be connected to Arduino PWM pin 3.
Pin 8 & 9 are connected to control of fridge and lamp
*/
#include <MeetAndroid.h>
#include <IRremote.h>
49
// MeetAndroid meetAndroid();
// you can define your own error function to catch messages
// where no fuction has been attached for
// These are the raw code for the home theater remote
unsigned int PWR[67] = {
4350, 4500, 500, 600, 500, 600, 500, 1700, 500, 1700, 500, 600, 500, 1750, 450, 650, 450, 650,
450, 650, 450, 650, 450, 1750, 450, 1800, 400, 700, 400, 1800, 450, 650, 450, 650, 450, 650,
450, 1750, 450, 1750, 450, 1750, 450, 1800, 400, 700, 400, 700, 400, 700, 450, 1750, 450, 650,
450, 650, 450, 650, 450, 650, 450, 1750, 450, 1750, 450, 1800, 400};
unsigned int HT_INPUT[67] = {
4350, 4500, 500, 600, 500, 600, 500, 1700, 500, 1700, 500, 600, 500, 1750, 450, 650, 450, 650,
450, 650, 450, 650, 450, 1750, 450, 1800, 400, 700, 400, 1800, 450, 650, 450, 650, 450, 650,
450, 1750, 450, 650, 450, 1750, 450, 650, 450, 650, 450, 700, 400, 1800, 400, 1800, 450, 650,
450, 1750, 450, 650, 450, 1750, 450, 1750, 450, 1750, 450, 700, 400};
unsigned int EJECT[67] = {
4350, 4500, 450, 650, 450, 650, 450, 1750, 450, 1750, 450, 700, 450, 1750, 450, 650, 450, 650,
450, 650, 450, 650, 450, 1750, 450, 1750, 450, 700, 400, 1800, 400, 700, 450, 650, 450, 650,
450, 1750, 450, 650, 450, 1750, 450, 1750, 450, 650, 450, 650, 450, 1800, 400, 1800, 450, 650,
450, 1750, 450, 650, 450, 650, 450, 1750, 450, 1750, 450, 650, 450};
unsigned int STOP[67] = {
4450, 4400, 550, 550, 550, 550, 550, 1700, 550, 1650, 550, 550, 550, 1650, 550, 550, 550, 550,
550, 550, 550, 550, 550, 1650, 550, 1700, 500, 600, 500, 1700, 550, 550, 550, 550, 550, 1650,
50
550, 550, 550, 1650, 550, 550, 550, 550, 550, 550, 550, 600, 500, 600, 500, 600, 500, 1700, 550,
550, 550, 1650, 550, 1650, 550, 1650, 550, 1650, 550, 1700, 500};
unsigned int PLAY[67] = {
4450, 4400, 550, 550, 550, 550, 550, 1650, 550, 1700, 500, 600, 500, 1700, 550, 550, 550, 550,
550, 550, 550, 550, 550, 1650, 550, 1650, 550, 550, 550, 1700, 500, 600, 500, 600, 500, 600,
550, 550, 550, 1650, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 1650, 550, 1700,
500, 600, 500, 1700, 550, 1650, 550, 1650, 550, 1650, 550, 1650, 550};
unsigned int PAUSE[67] = {
4450, 4400, 550, 550, 550, 550, 550, 1650, 550, 1700, 550, 550, 550, 1650, 550, 550, 550, 550,
550, 550, 550, 550, 550, 1650, 550, 1650, 550, 600, 500, 1700, 500, 600, 550, 550, 550, 1650,
550, 1650, 550, 1650, 550, 1650, 550, 550, 550, 600, 500, 1700, 500, 600, 500, 600, 550, 550,
550, 550, 550, 550, 550, 1650, 550, 1650, 550, 550, 550, 1650, 550};
unsigned int INFO[67] = {
4450, 4400, 550, 550, 550, 550, 550, 1650, 550, 1700, 550, 550, 550, 1650, 550, 550, 550, 550,
550, 550, 550, 600, 500, 1700, 500, 1700, 500, 600, 500, 1700, 500, 600, 550, 550, 550, 1650,
550, 1700, 500, 600, 500, 600, 500, 600, 500, 1700, 500, 600, 500, 1700, 500, 600, 550, 550,
550, 1650, 550, 1700, 500, 1700, 500, 600, 500, 1700, 500, 600, 500};
unsigned int SKIP_BACKWARD[67] = {
4500, 4350, 600, 500, 600, 500, 600, 1650, 550, 1650, 550, 550, 550, 1650, 550, 600, 500, 600,
500, 600, 550, 550, 550, 1650, 550, 1650, 550, 550, 550, 1650, 550, 550, 550, 550, 550, 550,
550, 1700, 500, 1700, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 1650, 550, 550,
550, 550, 550, 1650, 550, 1700, 500, 1700, 550, 1650, 550, 1650, 550};
unsigned int RW[67] = {
4500, 4350, 600, 500, 600, 550, 550, 1650, 550, 1650, 550, 550, 550, 1700, 500, 600, 500, 600,
500, 600, 550, 550, 550, 1650, 550, 1650, 550, 550, 550, 1650, 550, 550, 550, 550, 550, 1700,
500, 1700, 500, 600, 550, 550, 550, 1650, 550, 550, 550, 1650, 550, 550, 550, 550, 550, 550,
550, 1700, 500, 1700, 500, 600, 550, 1650, 550, 550, 550, 1650, 550};
51
52
The above code that should automate the appliances is not the complete version,anyone
interested in getting the full sketch should consult me on ntongha1@yahoo.com. A little token
will definitely be required…..lol

More Related Content

What's hot

IRJET- Home Surveillance Without using CCTV Camera
IRJET-  	  Home Surveillance Without using CCTV CameraIRJET-  	  Home Surveillance Without using CCTV Camera
IRJET- Home Surveillance Without using CCTV CameraIRJET Journal
 
IRJET- IOT and RFID based shopping mall
IRJET- IOT and RFID based shopping mallIRJET- IOT and RFID based shopping mall
IRJET- IOT and RFID based shopping mallIRJET Journal
 
Ijeee 33-36-surveillance system for coal mines based on wireless sensor network
Ijeee 33-36-surveillance system for coal mines based on wireless sensor networkIjeee 33-36-surveillance system for coal mines based on wireless sensor network
Ijeee 33-36-surveillance system for coal mines based on wireless sensor networkKumar Goud
 
Motorola ap 8232 access point installation guide mn000032 a01
Motorola ap 8232 access point installation guide mn000032 a01Motorola ap 8232 access point installation guide mn000032 a01
Motorola ap 8232 access point installation guide mn000032 a01Advantec Distribution
 

What's hot (7)

IRJET- Home Surveillance Without using CCTV Camera
IRJET-  	  Home Surveillance Without using CCTV CameraIRJET-  	  Home Surveillance Without using CCTV Camera
IRJET- Home Surveillance Without using CCTV Camera
 
IRJET- IOT and RFID based shopping mall
IRJET- IOT and RFID based shopping mallIRJET- IOT and RFID based shopping mall
IRJET- IOT and RFID based shopping mall
 
186 193
186 193186 193
186 193
 
Ijeee 33-36-surveillance system for coal mines based on wireless sensor network
Ijeee 33-36-surveillance system for coal mines based on wireless sensor networkIjeee 33-36-surveillance system for coal mines based on wireless sensor network
Ijeee 33-36-surveillance system for coal mines based on wireless sensor network
 
Smart safety jacket
Smart safety jacketSmart safety jacket
Smart safety jacket
 
Motorola ap 8232 access point installation guide mn000032 a01
Motorola ap 8232 access point installation guide mn000032 a01Motorola ap 8232 access point installation guide mn000032 a01
Motorola ap 8232 access point installation guide mn000032 a01
 
Beetle i8A operating manual (english)
Beetle i8A operating manual (english)Beetle i8A operating manual (english)
Beetle i8A operating manual (english)
 

Viewers also liked

Ece 120L final project Christopher Hays
Ece 120L final project Christopher HaysEce 120L final project Christopher Hays
Ece 120L final project Christopher HayschristopherhaysCSUF
 
CCC Future Energy Needs/Capability report-22-04-2014
CCC Future Energy Needs/Capability report-22-04-2014CCC Future Energy Needs/Capability report-22-04-2014
CCC Future Energy Needs/Capability report-22-04-2014Roger Atkins
 
Combined report on NCES
Combined report on NCESCombined report on NCES
Combined report on NCESbneo
 
Citrix XenServer Design: Designing XenServer Network Configurations
Citrix XenServer Design:  Designing XenServer Network  ConfigurationsCitrix XenServer Design:  Designing XenServer Network  Configurations
Citrix XenServer Design: Designing XenServer Network ConfigurationsNuno Alves
 
List of microcontroller 8051 projects
List of microcontroller 8051 projectsList of microcontroller 8051 projects
List of microcontroller 8051 projectsSushil Mishra
 
Renewable energy for bts (2)
Renewable energy for bts (2)Renewable energy for bts (2)
Renewable energy for bts (2)nasir12345678900
 
Bio mass ppt
Bio mass pptBio mass ppt
Bio mass pptsrgirlsdk
 
A project report on national hydroelectric power corporation ltd.
A project report on national hydroelectric power corporation ltd.A project report on national hydroelectric power corporation ltd.
A project report on national hydroelectric power corporation ltd.Projects Kart
 
AdoptingSolarWindMN_ConsumerResearch_DanThiede_Aug2014
AdoptingSolarWindMN_ConsumerResearch_DanThiede_Aug2014AdoptingSolarWindMN_ConsumerResearch_DanThiede_Aug2014
AdoptingSolarWindMN_ConsumerResearch_DanThiede_Aug2014University of Minnesota
 
Fm transmitter and future radio technology
Fm transmitter and future radio technologyFm transmitter and future radio technology
Fm transmitter and future radio technologyChima Chukwu
 
Home appliance controlling using zigbee on atmega128 hardware platform.
Home appliance controlling using zigbee on atmega128 hardware platform.Home appliance controlling using zigbee on atmega128 hardware platform.
Home appliance controlling using zigbee on atmega128 hardware platform.eSAT Publishing House
 
Thermal Power Plant - Manual
Thermal Power Plant - ManualThermal Power Plant - Manual
Thermal Power Plant - ManualSheel Shah
 
A minor project report HOME AUTOMATION USING MOBILE PHONES
A minor project report HOME AUTOMATION  USING  MOBILE PHONESA minor project report HOME AUTOMATION  USING  MOBILE PHONES
A minor project report HOME AUTOMATION USING MOBILE PHONESashokkok
 
VERTICAL AXIS WIND TURBINE
VERTICAL AXIS WIND TURBINEVERTICAL AXIS WIND TURBINE
VERTICAL AXIS WIND TURBINESuchit Moon
 
2015.Sep.29.Legislators.Ltr.Attachment
2015.Sep.29.Legislators.Ltr.Attachment2015.Sep.29.Legislators.Ltr.Attachment
2015.Sep.29.Legislators.Ltr.AttachmentMolly Hesness
 

Viewers also liked (20)

Ece 120L final project Christopher Hays
Ece 120L final project Christopher HaysEce 120L final project Christopher Hays
Ece 120L final project Christopher Hays
 
CCC Future Energy Needs/Capability report-22-04-2014
CCC Future Energy Needs/Capability report-22-04-2014CCC Future Energy Needs/Capability report-22-04-2014
CCC Future Energy Needs/Capability report-22-04-2014
 
Combined report on NCES
Combined report on NCESCombined report on NCES
Combined report on NCES
 
Citrix XenServer Design: Designing XenServer Network Configurations
Citrix XenServer Design:  Designing XenServer Network  ConfigurationsCitrix XenServer Design:  Designing XenServer Network  Configurations
Citrix XenServer Design: Designing XenServer Network Configurations
 
List of microcontroller 8051 projects
List of microcontroller 8051 projectsList of microcontroller 8051 projects
List of microcontroller 8051 projects
 
Hydro Power Plant
Hydro Power PlantHydro Power Plant
Hydro Power Plant
 
Renewable energy for bts (2)
Renewable energy for bts (2)Renewable energy for bts (2)
Renewable energy for bts (2)
 
Bio mass ppt
Bio mass pptBio mass ppt
Bio mass ppt
 
Bio Mass Gasifier
Bio Mass GasifierBio Mass Gasifier
Bio Mass Gasifier
 
A project report on national hydroelectric power corporation ltd.
A project report on national hydroelectric power corporation ltd.A project report on national hydroelectric power corporation ltd.
A project report on national hydroelectric power corporation ltd.
 
Lcd
LcdLcd
Lcd
 
AdoptingSolarWindMN_ConsumerResearch_DanThiede_Aug2014
AdoptingSolarWindMN_ConsumerResearch_DanThiede_Aug2014AdoptingSolarWindMN_ConsumerResearch_DanThiede_Aug2014
AdoptingSolarWindMN_ConsumerResearch_DanThiede_Aug2014
 
Fm transmitter and future radio technology
Fm transmitter and future radio technologyFm transmitter and future radio technology
Fm transmitter and future radio technology
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
 
Home appliance controlling using zigbee on atmega128 hardware platform.
Home appliance controlling using zigbee on atmega128 hardware platform.Home appliance controlling using zigbee on atmega128 hardware platform.
Home appliance controlling using zigbee on atmega128 hardware platform.
 
Writing a Literature Review- handout
Writing a Literature Review- handout Writing a Literature Review- handout
Writing a Literature Review- handout
 
Thermal Power Plant - Manual
Thermal Power Plant - ManualThermal Power Plant - Manual
Thermal Power Plant - Manual
 
A minor project report HOME AUTOMATION USING MOBILE PHONES
A minor project report HOME AUTOMATION  USING  MOBILE PHONESA minor project report HOME AUTOMATION  USING  MOBILE PHONES
A minor project report HOME AUTOMATION USING MOBILE PHONES
 
VERTICAL AXIS WIND TURBINE
VERTICAL AXIS WIND TURBINEVERTICAL AXIS WIND TURBINE
VERTICAL AXIS WIND TURBINE
 
2015.Sep.29.Legislators.Ltr.Attachment
2015.Sep.29.Legislators.Ltr.Attachment2015.Sep.29.Legislators.Ltr.Attachment
2015.Sep.29.Legislators.Ltr.Attachment
 

Similar to Ibiang project

DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM
DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM
DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM Ayuba Kwasako Danburam
 
Wireless charger for_low_power_devices_ excellent one same
Wireless charger for_low_power_devices_ excellent one sameWireless charger for_low_power_devices_ excellent one same
Wireless charger for_low_power_devices_ excellent one sameIbrahim Khleifat
 
Industrial training report
Industrial training reportIndustrial training report
Industrial training reportReshmi R
 
Maneuvering Robotic Vehicle based on Motion Sensor Feedback
Maneuvering Robotic Vehicle based on Motion Sensor FeedbackManeuvering Robotic Vehicle based on Motion Sensor Feedback
Maneuvering Robotic Vehicle based on Motion Sensor FeedbackIshanMalpotra
 
final report (parking project).pdf
final report (parking project).pdffinal report (parking project).pdf
final report (parking project).pdfgamefacegamer
 
PROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdf
PROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdfPROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdf
PROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdfRomeo INKOOM
 
arduino based automatic material sorting machine (1).pdf
arduino based automatic material sorting machine  (1).pdfarduino based automatic material sorting machine  (1).pdf
arduino based automatic material sorting machine (1).pdfAKHILESHYADAV311436
 
final-year-project-latest
final-year-project-latestfinal-year-project-latest
final-year-project-latestLasitha Konara
 
Bidirectional Visitor Counter for efficient electricity usage.
Bidirectional Visitor Counter for efficient electricity usage.Bidirectional Visitor Counter for efficient electricity usage.
Bidirectional Visitor Counter for efficient electricity usage.NandaVardhanThupalli
 
GSM BASED e-NOTICE BOARD final year project report
GSM BASED e-NOTICE BOARD final year project reportGSM BASED e-NOTICE BOARD final year project report
GSM BASED e-NOTICE BOARD final year project reportVenkatesh Agnihotri
 
Speed and direction control of dc motor using android mobile application grv ...
Speed and direction control of dc motor using android mobile application grv ...Speed and direction control of dc motor using android mobile application grv ...
Speed and direction control of dc motor using android mobile application grv ...chandan kumar
 
Gsm based home security system
Gsm based home security systemGsm based home security system
Gsm based home security systemNarayan Gour
 
PLC based home automation (undergrad thesis)
PLC based home automation (undergrad thesis)PLC based home automation (undergrad thesis)
PLC based home automation (undergrad thesis)Sameer Patel
 
driverless Robot car controlled using GSM
driverless Robot car controlled using GSMdriverless Robot car controlled using GSM
driverless Robot car controlled using GSMAfnan Khan
 

Similar to Ibiang project (20)

Part 1 master
Part 1 masterPart 1 master
Part 1 master
 
Part 1 master
Part 1 masterPart 1 master
Part 1 master
 
DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM
DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM
DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM
 
Wireless charger for_low_power_devices_ excellent one same
Wireless charger for_low_power_devices_ excellent one sameWireless charger for_low_power_devices_ excellent one same
Wireless charger for_low_power_devices_ excellent one same
 
FINAL REPORT
FINAL REPORT FINAL REPORT
FINAL REPORT
 
VENDING_MACHINE_2023-2024
VENDING_MACHINE_2023-2024VENDING_MACHINE_2023-2024
VENDING_MACHINE_2023-2024
 
Thereport
ThereportThereport
Thereport
 
Industrial training report
Industrial training reportIndustrial training report
Industrial training report
 
Maneuvering Robotic Vehicle based on Motion Sensor Feedback
Maneuvering Robotic Vehicle based on Motion Sensor FeedbackManeuvering Robotic Vehicle based on Motion Sensor Feedback
Maneuvering Robotic Vehicle based on Motion Sensor Feedback
 
final report (parking project).pdf
final report (parking project).pdffinal report (parking project).pdf
final report (parking project).pdf
 
for printout
for printoutfor printout
for printout
 
PROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdf
PROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdfPROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdf
PROJECT ON AUTOMATIC TRANSFER SWITCH (ELECTRICAL).pdf
 
arduino based automatic material sorting machine (1).pdf
arduino based automatic material sorting machine  (1).pdfarduino based automatic material sorting machine  (1).pdf
arduino based automatic material sorting machine (1).pdf
 
final-year-project-latest
final-year-project-latestfinal-year-project-latest
final-year-project-latest
 
Bidirectional Visitor Counter for efficient electricity usage.
Bidirectional Visitor Counter for efficient electricity usage.Bidirectional Visitor Counter for efficient electricity usage.
Bidirectional Visitor Counter for efficient electricity usage.
 
GSM BASED e-NOTICE BOARD final year project report
GSM BASED e-NOTICE BOARD final year project reportGSM BASED e-NOTICE BOARD final year project report
GSM BASED e-NOTICE BOARD final year project report
 
Speed and direction control of dc motor using android mobile application grv ...
Speed and direction control of dc motor using android mobile application grv ...Speed and direction control of dc motor using android mobile application grv ...
Speed and direction control of dc motor using android mobile application grv ...
 
Gsm based home security system
Gsm based home security systemGsm based home security system
Gsm based home security system
 
PLC based home automation (undergrad thesis)
PLC based home automation (undergrad thesis)PLC based home automation (undergrad thesis)
PLC based home automation (undergrad thesis)
 
driverless Robot car controlled using GSM
driverless Robot car controlled using GSMdriverless Robot car controlled using GSM
driverless Robot car controlled using GSM
 

Recently uploaded

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 

Recently uploaded (20)

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 

Ibiang project

  • 1. REMOTE OPERATED DOMESTIC APPLIANCES CONTROL BY ANDROID APPLICATION BY IBIANG NTONGHA ENO 2010/170282 DEPARTMENT OF ELECTRICAL ENGINEERING FACULTY OF ENGINEERING UNIVERSITY OF NIGERIA, NSUKKA AUGUST, 2015
  • 2. UNIVERSITY OF NIGERIA, NSUKKA FACULTY OF ENGINEERING DEPARTMENT OF ELECTRICAL ENGINEERING A PROJECT SUBMITTED TO THE DEPARTMENT OF ELECTRICAL ENGINEERING, UNIVERSITY OF NIGERIA, NSUKKA IN PARTIAL FULFILLLMENT OF THE REQUIREMENT FOR THE AWARD OF THE BACHELOR OF ENGINEERING (B.ENG) DEGREE IN ELECTRICAL ENGINEERING TOPIC: REMOTE OPERATED DOMESTIC APPLIANCES CONTROL BY ANDROID APPLICATION PRESENTED BY: IBIANG NTONGHA ENO ------------------------------------2010/170282 SUPERVISOR: ENGR. DR C.A NWOSU AUGUST, 2015
  • 3. REMOTE OPERATED DOMESTIC APPLIANCES CONTROL BY ANDROID APPLICATION
  • 4. DEDICATION My dedication goes to the almighty God who gave me the inspiration to successfully carry out this research work.
  • 5. ACKNOWLEDGEMENTS I wish to acknowledge the kind cooperation of my family members and my supervisor ENGR Dr C.A. Nwosu for the good time, money and effort they assisted me with to ensure that this project work went well. I wish to say thank you very much and pray that God will replenish the energy you all spent in giving me all the support I needed.
  • 6. ABSTRACT This project presents the overall design of remote control of household appliance using Android application with low cost and wireless system. Remote system is designed to assist and provide support in order to fulfill the needs of elderly and disabled in homes .The main control system implements wireless technology through the Bluetooth module and Infrared LED to provide remote access from smart phone to household equipment. An ATmega 328 is used as microcontroller in place of an Arduino to further exploit the project. Relays are used to control switching of equipment along with the transistors, a user-friendly application was coded in JAVA and run with Android studio
  • 7. APPROVAL PAGE REMOTE OPERATED DOMESTIC APPLIANCES CONTROL BY ANDROID APPLICATION This project has been supervised and certified as satisfying in part, the requirement for award of a Bachelor of Engineering(B.Engr) in Electrical Engineering, Department of Electrical Engineering, University of Nigeria, Nsukka. AUTHOR SIGNATURE ……………………………............ DATE………………………… IBIANG, NTONGHA ENO (STUDENT) CERTIFIED BY: SIGNATURE …………………………… DATE………………………… ENGR. DR C . A NWOSU (PROJECT SUPERVISOR) CERTIFIED BY: SIGNATURE …………………………… DATE………………………… ENGR. PROF E.C. EJIOGU (HEAD OF DEPARTMENT) CERTIFIED BY: SIGNATURE …………………………… DATE…………… (EXTERNAL EXAMINER)
  • 8. LIST OF TABLES TABLE TITLE PAGE Table 2.1 Platform Requirements for Android Systems 10 Table 2.2 Bill of Engineering Measurements and Evaluation 33 LIST OF FIGURES
  • 9. FIGURE TITLE PAGE Fig 2.1 Bluetooth Module 12 Fig 3.1 Block Diagram of Remote Control of Household Appliance 13 Fig 3.2 Simulation of Power Supply 17 Fig 3.3 The Waveform Of The 7812 Regulator On Oscilloscope 18 Fig 3.4 Simulation of Micro Controller Stage 20 Fig 3.5 Voltage Waveform of the Input Voltage on Oscilloscope 18 Fig 3.6 Simulation of Power Switch 24 Fig 3.7 Circuit Diagram Of Overall System 25 Fig 4.3 ATmega 328 Pin Mapping 28 Fig 4.4 Microcontroller Circuit after Pin Mapping 30 Fig 4.5 Smart Home User Interface 32 Fig 4.6 Control of Lamp and Switch 32 LIST OF ABBREVIATIONS ACRONYMS DEFINITIONS
  • 10. HVAC Heating, Ventilation and air conditioning RF Radio Frequency iOS iPhone Operating System SCADA Supervisory Control and Data Acquisition GUI Graphical User Interface EHS European Home Systems IEEE Institute Of Electrical and Electronics Engineering LAN Local Area Network PLC Power Line Communication DIY'ers Do- It-Yourself'ers Wi-Fi Wireless- Fidelity GPS Global Positioning System OS Operating System USB Universal Serial Bus IP Internet Protocol HAS Home Automation System FM Frequency Modulation BT Bluetooth Rx Receiver Tx Transmitter PWM Pulse Width Modulation
  • 11. vi TABLE OF CONTENTS Title Page ……………………………………………………………………………………… i Approval Page ………………………………………………………………………………… ii Dedication ……………………………………………………………………………………... iii Acknowledgement …………………………………………………………………………….. iv Abstract ………………………………………………………………………………………... v List Of Symbols ………………………………………………………………………………. vi List Of Figures ……………………………………………………………………………….. vii List Of Tables ………………………………………………………………………………… viii Table Of Contents …………………………………………………………………………….. ix CHAPTER ONE: INTRODUCTION 1.1 Background of study……………………………………………………………… 1 1.1.2 Power automation............................................................................................ 2 1.1.3 Home Automation........................................................................................... 2 1.2 Project Aim............................................................................................................... 2 1.3 Project Objective...................................................................................................... 2 1.4 Project Scope And Limitation................................................................................... 3 1.5 Project Justification................................................................................................... 3 1.6 Chapter Layout.......................................................................................................... 3 CHAPTER TWO: LITERATURE REVIEW 2.1 Home Automation standard...................................................................................... 5 2.1.2 Insteon Standard............................................................................................. 5 2.1.3 Zigbee Standard.............................................................................................. 5 2.1.4 Z-wave standard............................................................................................. 5 2.2 Home Automation Implementation Platforms............................................................ 7 2.2.1 Ethernet............................................................................................................ 7 2.3 Arduino Controller....................................................................................................... 7 2.4 Android System........................................................................................................... 8 2.4.1 Google Android ................................................................................................ 8
  • 12. vii 2.4.2 Blackberry OS.................................................................................................. 9 2.4.3 Apple iOS......................................................................................................... 9 2.4.4 Symbian............................................................................................................ 10 2.4.5 Windows phone................................................................................................ 10 2.5 Bluetooth module....................................................................................................... 11 2.6 Low Cost Home Automation..................................................................................... 12 2.7 Mobile And Web Based Control of Automatic Systems.................................... 13 CHAPTER THREE Design of remote control for domestic appliances 3.1 Hardware Unit........................................................................................................... 15 3.2 The power supply unit................................................................................................ 15 3.3 Design Analysis Of the power supply unit………………………………………. … 16 3.4 The remote control unit............................................................................................... 19 3.5 The transmitter unit..................................................................................................... 19 3.6 The micro control unit................................................................................................. 19 3.7 Component Used On Vero board................................................................................ 20 3.7.1Step down transformer......................................................................................... 20 3.7.2 Capacitor ............................................................................................................ 20 3.7.3 Diode Bridge Rectifier........................................................................................ 20 3.7.4 Voltage Regulator............................................................................................... 21 3.7.5 Infrared sensor.................................................................................................... 22 3.7.6 Crystal Oscillator................................................................................................ 22 3.7.7 Resistor............................................................................................................... 22 3.7.8 Relay................................................................................................................... 23 3.7.9 Bluetooth Module............................................................................................... 23 3.8 Power switches……………………………………………………………………… 24 3.9 Software unit............................................................................................................... 25 3.9.1 Android Studio.................................................................................................. 25 3.9.2 Arduino Software............................................................................................. 26 3.9.3Java/ Android................................................................................................... 26
  • 13. viii CHAPTER FOUR: Construction, testing and results 4.1 Construction ………………………………………………………………………. 27 4.2 Testing ....................................................................................................................... 30 4.3 Bill of Engineering Measurements And Evaluation………………………………. 33 CHAPTER FIVE: CONCLUSION, CHALLENGES AND RECOMMENDATION 5.1 Conclusion................................................................................................................ 34 5.2 Challenges ……………………………………………………………………….. 34 5.3 Precautions Taken Throughout The Project ……………………………………… 35 5.4 Recommendations................................................................................................... 36 REFERENCE APPENDIX
  • 14. 1 CHAPTER ONE INTRODUCTION 1.1 BACKGROUND OF STUDY A "smart home" typically is a domestic environment that has been partially automated. Home automation includes centralized control for lighting, HVAC, appliance management, and others. Home automation aims to enhance the comfort, energy consumption efficiency and security in domestic scenarios [1]. Generally, houses are equipped with independent control panels to control all of the systems and appliances present in the house. The main purpose of a smart home is to centralize the control of all the devices into a single control unit which can be programmed to do specific tasks suitable for the owner and the home in question. The goal of a smart home is not only convenience but also to reduce the consumption of resources such as power, gas, etc[2]. Due to the current pricing on energy, resource conservation has become a part of a person's day-to-day life. If a person has the possibility to control his home automation remotely he can reduce the consumption of energy and thus cutting down on expenses. For example, If a person is away from home there is no need for the air conditioner or ventilation to operate. The same principle applies to illuminations, heating and other appliances. Some smart home systems pause the operation of appliances until they are needed again. Furthermore, there are several different technologies for implementing such smart homes. Some standards utilize complex communication protocols and control wiring, others rely on embedded signals in the existing power circuit of the house. A portion rely on RF signals, and others become hybrids by combining several methods. All of the controlling tasks are done through a microprocessor, for example Arduino [3], which enables the communication and upon receiving some commands controls the different systems in the house. Finally, the commands to control the appliances in the house are sent by a central control unit such as a computer, remote control or smartphone (iOS, Android).
  • 15. 2 1.1.2 POWER AUTOMATION Power automation is the automated control and monitoring of power plants, substations and transformers for effectiveness, efficiency and fault detection. It has made it possible to have a reliable municipal or national electricity system which often comprises remote and hard-to-reach transformers and power sub-system units. It makes it possible to monitor different power units, relay their status and health information, and even carry out fault detection and correction without human interference [4]. Example of power automation system is the SCADA system. 1.1.3 HOME AUTOMATION Home automation may designate an emerging practice of increased automation of household appliances and features in residential dwellings, particularly through electronic means that allow for things impracticable, overly expensive or simply not possible in recent decades. Home automation includes all that a building automation provides like climatic controls, door and window controls, and in addition control of multimedia home theatres, pet feeding, plant watering and so on. But there exists a difference in that home automation emphasizes more on comforts through ease of operation [5]. 1.2 PROJECT AIM The aim of this project is to design and construct a home automation system that will control about four household appliances connected to it, using an android phone. 1.3 PROJECT OBJECTIVE The objective of this project is to implement a low cost, reliable and scalable home automation system that can be used to remotely switch on or off any household appliance, using a prototype of Arduino Uno to achieve hardware simplicity, a Bluetooth module for feedback from an android device to toggle the switch state.
  • 16. 3 1.4 PROJECT SCOPE AND LIMITATION This project work is complete on its own by remotely and automatically controlling household appliances. It does not implement control of automatic detection of faults in the controlled appliance. This project focuses on developing of a main control board prototype and a GUI on a smartphone. The microcontroller used is an ATmega 328 mapped from an Arduino Uno. The microcontroller interacts with the android phone through a set of commands sketched using Amarino language in order to control and monitor the function of target home appliances by using relays and transistor. The main board is designed so that it complies with the household electrical standards. The user interface is designed as simple and powerful as possible, and operates in a self- organized way. 1.5 PROJECT JUSTIFICATION This project is of contributory knowledge to the development and implementation of home automation systems in Nigeria using low cost, available components like microcontroller (ATmega 328), and an android phone. 1.6 CHAPTER LAYOUT The entire project consists of five chapters which are Introduction, Literature Review, Methodology, Result and Discussion and Conclusion and Recommendation. Each covering a section of the work as summarized below: Chapter 1 gives an introduction to automation as a whole and the different types of automation. Chapter 2 covers an extensive literature review of previous works on home automation systems, the platforms over which home automation can be implemented. This chapter will summarize the strength and weakness of the literature reviewed and come out with the suitable methodology to be implemented to this project.
  • 17. 4 Chapter 3 highlights the project methodology, giving reasons for choice of specific platforms and components, and also, comprehensive details on both hardware components and communication services used. Chapter 4 is on the project design and implementation with clear practical details of the project design, construction and testing Chapter 5 is on the conclusion and recommendations based on the project work with emphasis on the reliability, maintainability and flexibility of the design . Also, recommendations based on the challenges encountered and further possible development of the project work are enumerated.
  • 18. 5 CHAPTER TWO LITERATURE REVIEW 2.1 HOME AUTOMATION STANDARDS There are many established industry standards for home automation systems and are implemented over the various carrier modes ranging from powerline to wireless. The popular and major standards are INSTEON,Zigbee,Z-wave,X10 and EHS 2.1.2 INSTEON STANDARD Insteon is a home automation technology developed by SmartLabs. A distinctive feature of Insteon is that it uses both radio frequency(RF) and already existing power lines(PLC). Insteon is one of the few home automation systems that works in a dual-mesh network. It is possible to use only RF or PLC but it is also possible to use them both at the same time. The systems RF band operates at the 904 MHz frequency. The data rate is for instantaneous 13,165 bits/sec and for sustained 2,880 bits/sec (6) . All Insteon devices act like repeaters. This means that they can play the role of sender, relay or receiver. If the devices that are trying to communicate are not within the coverage area transmit messages using a multi-hop strategy. All messages are received by the Insteon devices in the network, and if the message is not intended for the device that receives the message it forwards the message to other Insteon devices. The maximum number of hops for a message is three so avoiding to flood the network. Due to the fact that all Insteon devices use two-way communication, when a message arrives to the intended recipient, it sends out a message of a successful transmission (7). 2.1.3 ZIGBEE STANDARD ZigBee is a wireless technology developed by the ZigBee Alliance. Its architecture is composed by four main layers:  Physical layer - responsible for sending and receiving commands and data.  Medium access control layer - responsible for networking.
  • 19. 6  Network layer - Controls the correct usage of the medium access control layer. ZigBee uses RF communication type. The frequency bands in which ZigBee works are 868MHz, 915MHz and 2400MHz. The range varies from 10 to 100 meters and the transmission data rate is 250kbit/s. There are two types of devices in a ZigBee network being Full and Reduce function. A Full function device usually acts as networks coordinator. A ZigBee network requires at least one network coordinator. A network coordinator keeps a network tree of the other devices that can be contacted. In addition, the network coordinator is the center node. The system uses hand-shaked protocol. In other words if an end device gets a command it responds to the coordinator that it has received and executed [8]. ZigBee is capable of connecting more than 64000 devices. It is possible due to the fact that ZigBee networks are extendable with each other so in theory the number of devices can be infinite. 2.1.4 Z-WAVE STANDARD The Z-Wave technology was developed by a company named Zensys. Z-wave consists of four layers and RF media that is controlled by the MAC layer.  Application layer - Controls the decoding and execution of commands within a Z- Wave network  Routing Layer - Controls the routing of packets within a Z-Wave network  Transfer Layer - Controls the transfer of data between devices - this includes retransmission, acknowledgements and checksum check  Mac Layer - Controls the usage of the radio frequency medium. Z-wave uses the RF communication type. It works on the 868 MHZ, 908 MHZ or 2400 MHZ frequency band. The range of RF signals is 30-100 meters and the data rate is 20 kbit/s. Z-wave has two types of devices - they are Controlling devices and Slave nodes. Controlling devices initiate the
  • 20. 7 communication by sending commands to other nodes; further slave nodes forward messages to other nodes or if they are the intended recipients reply on and execute the commands received. Controlling devices have the full routing table of the Z-Wave network and is able to communicate with all the devices in the network. Slave nodes cannot independently send direct messages to other nodes unless they are ordered by the controlling devices. If a slave node receives a command it executes it and after it sends a reply to the controlling device notifying about the successful command execution. If the controlling device does not receive an acknowledge message, the frame is retransmitted with a random delay to avoid a potential collision. Maximum number of devices supported is 232 [9]. 2.2 HOME AUTOMATION IMPLEMENTATION PLATFORMS Home automation can be implemented over a number of platforms namely,Bluetooth,infrared and Ethernet. 2.2.1 ETHERNET Ethernet defines a number of wiring and signalling standards for the physical connection of two or more devices together. Ethernet was originally based on the idea of computers communicating over a shared coaxial cable acting as a broadcast transmission medium. The methods used show some similarities to radio systems, although there are fundamental differences,such as the fact that it is much easier to detect collisions in a cable broadcast. From this early and comparitively simple concept, Ethernet evolved into the complex networking technology that today underlies most local area networks. The coaxial cable was replaced with point-point links connected by Ethernet hubs and/or switches to reduce installation costs, increase reliability, and enable point-to-point management and troubleshooting [10]. 2.3 ARDUINO CONTROLLER
  • 21. 8 This project is again a fully developed and published Android application. The main functionality of this applications is that it allows users to connect to an Arduino device and control it remotely. This requires the Arduino to be set up as a server (as above) and for the user to know the specific IP address and port of the Arduino. As previously discussed, this can be cumbersome and difficult for new users. In usage, the application sends unencrypted plain text to the Arduino to perform its functions [11]. This tool was designed to allow home automation and DIY users to quickly and easily control devices within their own home network. The application allows twelve functions to be set by the user, but does not include any security at all. Furthermore, the system can only connect to devices within its own network (so this does reduce security risks dramatically). Similarly to the Eight Control (above), the system can interface with a single Arduino device at any given time which may prove costly, difficult or impractical to expand outwards without incurring significant cost. The application itself is very simplistic in its design, and does not include any smart" features, timing, or even helpful descriptions. For this reason many users may avoid this application, simply because they cannot understand how to use the application. As a good design feature however, the application does not overcrowd the screen at any time, but this does raise questions as to whether its screen usage is as efficient as it could be. 2.4 ANDROID SYSTEM For the mobile application, there is a number of different systems that we could have possibly chosen. The operating systems, as well as the justifications for their usage/non usage, are shown below 2.4.1 Google Android This operating system and platform is an incredibly powerful one, with a huge range of customization available to it. Developed and maintained by Google, the operating system is open source allowing code modifications by many other individuals and companies. Furthermore, application development on the platform is free using the supplied SDK and the android studio reducing development costs. The applications which are developed then do not have to be uploaded to Google, but can be “side-loaded” onto a device to
  • 22. 9 install the full application. The Android platform is a fully developed and mature platform and so there are very few bugs and/or problems present. This platform has very innovative features and very powerful hardware. The operating system is available on a huge number of devices and is now the most used smartphone operating system in the world[12].The operating system is also capable of being run on devices such as TV set-top boxes, computers, tablets etc. making it a hugely influential piece of software. For all of the reasons stated above, we have chosen Android as our primary development operating system. 2.4.2 Blackberry OS: The Blackberry OS is a well performing, highly used operating system used throughout the world in many business applications. The OS itself is used by home users and businesses for its ease of use in terms of messaging & communications, as well as its strong data encryption capabilities. However, there are several limiting features of this operating system. Firstly, the Blackberry hardware that accompanies these devices are not always that powerful and as such may be incapable of performing complex tasks. Secondly, not all Blackberry phones have sensors or communications hardware such as WiFi, GPS, etc. Lastly, the global usage of Blackberry smartphones has been decreasing within the last few months/years, and as such we cannot target a diminishing platform.. These limiting factors have led us to discard the Blackberry OS from use within our project. 2.4.3 Apple iOS: The Apple iOS operating system is an incredibly powerful platform which is very widely used throughout the world with businesses, home users, and many other groups. In terms of hardware, the devices are very well equipped coming with GPS, WiFi, accelerometers, compass etc. This makes the devices extremely capable. Furthermore, the iOS operating is highly used being the second most used operating system globally. However, even with all of its advantages Apple impose heavy restrictions on the use of its hardware and software. This means that in order to develop for an Apple device, the developer must own an apple computer and run Xcode (Apple’s development software). Without this, it is near impossible to develop for the platform. Furthermore, in order to test the software the developer must purchase a
  • 23. 10 license from Apple to be recognized as a developer which is a yearly subscription service. All of these will further increase the cost of development, up to a level where the project cannot meet its aim of being cost effective. Unfortunately, this does mean that we have to sacrifice a possibly lucrative opportunity for sheer number of users but our aim of being cost effective is of higher priority. For the sole reason of cost and limited capabilities without sufficient hardware, the iOS operating system has been withdrawn from our development plan. 2.4.4 Symbian: The Symbian operating system was a bit of a wild card in terms of development prospects. The reason for this is that it is not technically a smartphone operating system. Symbian is often (and is still) used in many low cost/budget phone handsets around the world. This means that a large amount of users in poorer countries still frequently use these devices. However, these devices are very rarely fitted with sensors such as GPS, accelerometers or even basic features like internet access. Although this would vastly increase the user base, we must discard this system through lack of features. 2.4.5 Windows Phone: Another strong contender for usage was the Windows Phone operating system (either 7.8 or 8). This operating system is well established and runs on the popular windows operating system. The phones themselves are powerful devices and well featured, containing all the sensors necessary for the application to run. Although this does present a fantastic opportunity for development, the newest versions of the operating systems (and so far, the most popular) are still very new and therefore may contain many bugs or problems which may hamper development. In future, this platform would be very good to develop for, however due to time constraints this project will be limited to one operating system. Table 2.1 Platform Requirements for Android Systems[12] Requirements Platforms Bluetooth support Background processes Openness Accessibility Low complexity
  • 24. 11 Android Blackberry OS iPhone OS Symbian Windows Mobile Windows Mobile is basically not open. Running background processes on iPhone is only possible when the device has gone through a “Jail Break” procedure, but since we want Amarino to run on off-the-shelf devices this is not what I was looking for. Sadly, even the latest version of Apple's iPhone OS (Apple iOS 4) only allows very restricted background processing not suitable for the kind of background service Amarino is heading for. The iPhone OS is also not open and applications developed on iPhone OS can only be redistributed via Apple’s proprietary Apple store. At the end Android was selected as the preferred development platform. I agree with [12] that Android has the lowest entry level for developers enabling even beginners to start with. Each developer can download the Android SDK4 for free, without registration and install applications on Android driven devices. Furthermore, since Android 2.0, the Android SDK fulfills all mentioned requirements for Amarino. 2.5 BLUETOOTH MODULE Bluetooth is a type of wireless communication protocol used to send and receive data between two devices. It is free to use wireless communication protocol although its range is lower than other wireless communication protocols like WiFi and ZigBee. But it is still suitable for many low range applications. Bluetooth wireless protocol lies in the same range of frequency of WiFi and ZigBee. It operates on the 2.41GHz frequency. The Bluetooth modules are majorly applied in mobile phones, wireless audio controllers, wireless head phones and microphones [13]. Bluetooth module works as a master or slave. There are many Bluetooth modules available in the markets which are either master/slave or both. Master Bluetooth module can send or receive data from other Bluetooth modules. But slave Bluetooth can only
  • 25. 12 listen to master Bluetooth module, since application of Bluetooth module in this project doesn't need receiving signals from devices, it is therefore a slave [14]. Certain factors should be considered when selecting Bluetooth module; factors such as maximum power output of Bluetooth module(here there are three classes of Bluetooth modules and their power output range is from 1mW up to 100mW),the distance between the two Bluetooth receiver and transmitter is a valid factor as this is dependent on distance to function properly. Bluetooth modules need communication protocols to interface with other devices, for example in this project our main focus is Bluetooth module interfacing with microcontroller, and since microcontroller can communicate with Bluetooth device through following wired communications to receive data from other Bluetooth device(UART,SPI,USB). It depends on which wired communication from the three one intends using for interfacing the microcontroller with Bluetooth module. There are many Bluetooth modules available in the market which support above three communications but the name of some famous serial Bluetooth modules includes the HC-04, HC-05, RN41 and RN42. All above Bluetooth modules have different range, power output and quality. Before we went ahead to make any selection from the above listed Bluetooth modules, we made sure there was need of master or slave Bluetooth module and the UART communication met our needs as it is easy to write program using UART. While selecting any Bluetooth module it is always advisable to check that it has built in Bluetooth host controller, otherwise you will have to write your own software for this purpose and it needs a lot of time and expertise in software programming [15].
  • 26. 13 Fig 2.1 Bluetooth Module 2.6 LOW COST HOME AUTOMATION SYSTEMS An effort to bring home automation into the realm of home users, a large amount of research has gone into making these systems more affordable. One of these methods is shown in [16] where they propose a new micro-controller for home automation. The researchers managed to identify and construct a new micro controller module which allows ten PCI's to be connected. This means that using this single board, the user is capable on controlling ten devices. Furthermore, the researchers also detail how the devices could be controlled over Ethernet (note; not wireless of WiFi) to further increase operability. Using this board, they can program in certain conditions to be checked and actions to be performed when those conditions are satisfied. 2.7 MOBILE AND WEB BASED CONTROL OF AUTOMATION SYSTEMS This research focuses mainly on the methods of controlling home automation systems. Currently, these systems are cumbersome to use, and this has contributed to the many reasons of slow adoption of home automation. Using today's systems, this technology is kept to the realms of the more tech-savvy" families and businesses. User interface is an extremely important topic in all areas of computing, including that of home automation. The research shown in [17] demonstrates some of this work into implementing an easy to use interface. In this research we can see that they have developed a system which can control a home automation system from a desktop PC (or web browser) or a TV/Set-top box with interface hardware. They further demonstrate the usage can be performed on any computer which has an internet connection (and thus is adding some functionality which we would like in our system). The aim of this research was to create a generic user interface suitable for a 21st century home. Furthermore, it details many of the reasons for slow adoption of home automation throughout the general public. Finally, it states that an automation system controller must be user friendly, self configuring and self installing. All of these conditions must be met otherwise users will not use the system.
  • 27. 14 CHAPTER THREE DESIGN OF REMOTE CONTROL FOR DOMESTIC APPLIANCES Commands sent from the android phone to power house-hold appliances, are received by the Bluetooth module, the module is a viable component that receives and transmits signal to the microcontroller (we will only be concerned with transmission of signal (Tx) since we are dealing with remote control of the appliance and not error measurement). Our major task involves control of switchable devices like lighting bulbs and sockets, therefore we require an NPN transistor that is being driven by high voltage. The driving of the transistor makes the Normally open relay close, thereby powering the electrical socket and lighting bulb. Meanwhile the TV and Home theatre require the use of an IR LED on the control box to transmit signal from the Android phone to the device.
  • 28. 15 Fig 3.1 Block Diagram Of Remote Control Of Household Appliances Using Android Application 3.1 HARDWARE UNIT This unit consist of components we can see and feel. The unit operates on electrical/electronic components, analyzing the hardware into four sub-units makes our job tidy, and they consist; I. A power supply unit, II. A micro-controller unit, III. A power switch unit IV. A remote control unit The four units work together to control household appliance remotely by the use of an android device. The (Android phone) sends a code through its infrared emitting LED, the receiver (television, home theatre) receives the code through its infrared receiver, and the microcontroller control unit decodes the code and the device powered
  • 29. 16 must have a rating commiserate with that of the Vero board in order to avoid electrical damage of the electronic components used. 3.2 The power supply unit This unit is made up of a step down transformer, a diode bridge rectifier, capacitors for smoothing the waveform of current, and 3 voltage regulators used to make sure voltage is adequately regulated for the microcontroller and Bluetooth module to function properly without getting burnt due to over-voltage. When 240V AC mains voltage is stepped down by the step down transformer to 15 V AC, the voltage is rectified by a full bridge rectifier and the same voltage is smoothened by a capacitor and regulated by the voltage regulators. This unit supplies power to the relay unit, the microcontroller unit and the Bluetooth module unit, with each having different input voltage level for smooth operation and good performance. For the circuit we require a 7812 voltage regulator which gives the required output of +12V. The voltage regulator regulates above its required output voltage, if the voltage is below, its required output voltage would be passed out without being regulated. For example for a 7812, if the unregulated input voltage is greater than 12V, it will be regulated to 12V, but if it’s less than 12V, for example 9V, the 9V unregulated will be the output. 3.3 Design Analysis of the power supply unit. From the datasheet of 7812 regulator, it requires an input voltage of 14.5V to 30V DC and from the datasheet of the diode bridge, it has a voltage drop of 1.1V. For a peak voltage of 14.5+1.1=15.6V peak. For the r.m.s voltage Vrms = Vp/ -------------------------------------------------------------------(3.1) Vrms = = 11.03V
  • 30. 17 Hence a transformer of preferred value of 15V, i.e. 220V/15V transformer rather than a 12V transformer was employed considering that at times the voltage supply may be lower than 220V. Therefore the peak voltage now becomes Peak Voltage Vp= Vrms* ---------------------------------------------------(3.2) Vp= Output Voltage of diode bridge = Vp – Diode bridge voltage drop Output Voltage of diode bridge = - 1.1 Output Voltage of diode bridge = 20.11V 20.11V is within range of the input voltage of the 7812 voltage regulator. Assuming a ripple voltage of 15% dv = dt = s Using I = --------------------------------------------------------(3.3) C1 = ---------------------------------------------------------------(3.4) I = 1.5A. Therefore; C1 = A preferred value of 3000μF and 2200μF connected in parallel was however employed giving a total capacitance of 3000μF + 2200μF = 5200μF.
  • 31. 18 To reduce the ripple left, compensating capacitors of 0.33μF and 0.1μF were employed. These values are recommended in the datasheet of the voltage regulators. Fig 3.1: Simulation of Power supply Below are waveforms of voltages at different levels, starting with the AC input Fig 3.2 Voltage Waveform Of The AC Input Voltage On An Oscilloscope
  • 32. 19 Fig 3.3 The waveform of the 7812 regulator from an oscilloscope 3.4 The remote control unit This unit sends codes through its infrared LED in form of infrared pulses at a frequency of 38 KHz this code which is preprogrammed in this unit have different pulse sequences. This unit is powered by an android phone, where command sent to an appliance from the phone is managed by the microcontroller and the microcontroller receives such commands from an infrared led. 3.5 The transmitter unit This unit is powered with 5V and transmits the infrared code through the transmitter (Tx) of the microcontroller and only allows code at the frequency of 38 KHz. This helps the transmitter to differentiate between the infrared code sent by the remote and infrared from other sources. 3.6 The microcontroller control unit
  • 33. 20 This unit is the brain of the system. It consists of a microcontroller Atmega328p which is clocked at 16 MHz by an external oscillator clock. This unit decodes the received code from the receiver unit and instructs the driver unit by sending pulse width modulated signals to the driver stage to perform desired operations of the appliance. The ATmega 328 has 14 digital input/output pins(of which 6 can be used as PWM outputs), 6 analog inputs, a reset button and a power jack. The ATmega 328 microcontroller has an operating voltage of 5V with input voltage within the range of 7- 12 volts, it has a DC rating for 3.3V (which was used in this project)of 50mA. Fig 3.4 Simulation Of Microcontroller Stage 3.7 COMPONENTS USED ON VERO BOARD 3.7.1 Step-down transformer A transformer is an electrical device that transfers electrical energy between two or more circuits through electromagnetic induction. The step-down transformer is used to reduce A.C voltage levels. In this case a 220V to 15V step-down transformer is applied in the power supply unit of this project.
  • 34. 21 3.7.2 Capacitor: A capacitor is a passive two terminal electrical component used to store energy electrostatically in an electric field. This is used in smoothing ripples after rectification in the power supply unit of this project. 3.7.3 Diode bridge: A diode full bridge is used to rectify the 15V AC voltage from the step-down transformer into DC voltage, Fig 3.5 How Bridge Rectifier Works
  • 35. 22 3.7.4 Voltage regulator: Voltage regulators are designed to automatically maintain a constant voltage level. Throughout the project, we used 3 voltage regulators since we had need for different voltage levels to power our electronic components. The 7812 which gives an output of 12V is connected to 7805 that gives an output of 5V used to power the microcontroller meanwhile the LM117, a series of adjustable 3-terminal positive voltage regulator capable of supplying in excess of 1.5A over a 1.2v to 37v output range. Requiring two external resistors to set the output voltage to 3.3v needed by the Bluetooth module, we tried using the voltage divider but realized the current did not meet up with the rated current of the Bluetooth module. Fig 3.5 The waveform of the 7812 regulator from an oscilloscope 3.7.5 Infrared sensor The sensor senses whether receiver of it is receiving light from transmitter or not and feeds the result to the comparator. If any obstacle comes in between receiver or transmitter then the path of infrared between receiver and transmitter breaks off. This result of receiver receiving the light or not is sent to the comparator.
  • 36. 23 3.7.6 Crystal Oscillator: This is an electronic oscillator circuit that uses mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal at a very precise frequency. In this project a 16MHz oscillator was used as an external clock to the microcontroller. 3.7.7 Resistor: This is a passive two terminal electrical component that implements electrical resistance as a circuit element. Resistors act to reduce current flow and at the same time act to lower voltage levels within the circuits. 3.7.8 Relay: A relay is a switch which is made to operate by an electromagnet. With all relays the voltage which causes the relay to switch on is higher than the voltage at which the relay switches off. In choosing a relay, one has to consider; the size, the resistance, the voltage it is expected to work on, the number of arrangement of the switch contacts and the maximum current the contacts can carry safely (without sparking or overheating). When relays are used in electronic circuits, there is one precaution that must always be taken. A diode should be connected in parallel with the relay so that the high voltage is shorted out. Since when the current in the coil is switched off, the magnetic field produced by the coil disappears very quickly hence a large voltage is produced for a fraction of seconds, which may burn lots of transistors or ICs or other components if not protected by a diode. By adding a fly-back diode the current has a path to continue flowing through coil until the stored energy is used up. The diode also clamps the voltage across the coil to about 0.7V protecting the electronics. The stored energy dissipates quickly in the diode ( ), where E is the stored energy, V is the voltage across the coil, I is the inductor current, t is time in seconds. The current stops flowing and the relay turns off. The diode should be able to handle the coil current for a short time and switch relatively fast. Note: A resistor or zener diode can be placed in series with the diode to use up the stored energy quicker.
  • 37. 24 This increases the amplitude of the voltage spike above 0.7V but the energy is used up quicker (i.e. the voltage spike won't last as long). Usually it doesn't matter if the relay takes 1ms or 100ms to turn off. 3.7.9 Bluetooth Module: the Bluetooth module is a power electronic chip designed to transmit signal (Tx) to the receiving end of the microcontroller and receive signal (Rx) from the transmitting pin of the microcontroller. This chip has an input voltage of 3.3V; the input voltage is fed by the 117 voltage regulator. The receiving signal is not needed in this project, as the microcontroller deals solely on transmitting commands sent by the Android device to house-hold appliance without waiting for a feedback signal, thereby making the communication pattern open system. 3.8 Power switches This is another essential part of the design, as it checks the flow of current at different point in time. From the NPN transistors whose functions are to act as a switch and a control valve for current. If no electric current flows between the base and emitter terminals of an NPN transistor, no current can flow between the collector and emitter wires; in this state, the transistor is “off.” When you apply a small current to the base and emitter, the transistor “turns on” nearly instantly, allowing a current flow between collector and emitter. A transistor can be switched on and off this way many millions of times per second. The relay performs the role of switching the light bulb and socket by either changing from its normally closed position to normally open for OFF.
  • 38. 25 Fig 3.6: Simulation of Power Switch
  • 39. 26 Fig 3.7: Circuit Diagram of Overall System 3.9 SOFTWARE UNIT Commands are coded with some good, free easy to use software programs that will all work together to operate the domestic appliances, below are the listed software programs used; 3.9.1 ANDROID STUDIO This kit will allow us to develop the code for the Android mobile device. Although the code could be written manually, the Android studio and plug-in allow a much more refined and improved development experience including a full graphical interface editor and a wide range of debugging tools. 3.9.2 ARDUINO SOFTWARE In order to test the Arduino code (as well as write most of the code for the
  • 40. 27 Arduino), the Arduino official software will be installed. This allows us to build, compile and run the Arduino code from the computer to the boards themselves 3.9.3 JAVA/ANDROID This programming language is what we will be using to develop our Android application. Although C/C++ could also be used, Java has several advantages for Android development including being able to run the code on any device platform (due to the Java Virtual Machine). CHAPTER FOUR CONSTRUCTION, TESTING AND RESULTS
  • 41. 28 4.1 CONSTRUCTION The construction of this project was carried out in stages. The first stage was to build the power supply that will power the electronic components of different voltage rating. The transformer used in construction was centre-tapped to get a voltage of 15V AC that was rectified by the bridge rectifier (soldered on the Vero board) to a Direct Voltage of 15V,the 15v DC will then be smoothened by the soldered capacitor earlier calculated. Since In this project, we require 5 volts for the microcontroller and 3.3 volts for the module(from data sheet of each of the component) 3 voltage regulators were used to achieve different voltage levels. An LM 7812 regulator was soldered to regulate the 15V to 12 volts which will be used by the relays to switch ON/OFF light bulbs and socket. LM 7805 was as well soldered in series to the 7812 to output 5volts that will be used by the microcontroller. The 3.3V Input voltage for the Bluetooth module is achieved by soldering LM 117 [18]. The second stage of our construction involves the use of an ATmega 328 since we mapped the Arduino to it, we had to use the map below:
  • 42. 29 Figure 4.3: ATmega 328 Pin Mapping(32) As shown in Figure 4.3 above, 20 of the pins function as I/O ports. This means they can function as an input to the circuit or as output.14 of the pins are digital pins, of which 6 can function to give PWM output. 6 of the pins are for analog input/output. 2 of the pins are for the crystal oscillator. This is to provide a clock pulse for the ATmega chip. A clock pulse is needed for synchronization so that communication can occur in synchrony between the ATmega chip and a device that it is connected to. The chip needs power so 2 of the pins, Vcc and GND, provide it power so that it can operate. The Atmega328 is a low-power chip, so it only needs between 1.8-5.5V of power to operate. The Atmega328 chip has an analog-to-digital converter (ADC) inside of it. This must be or else the Atmega328 wouldn't be capable of interpreting analog signals. Because there is an ADC, the chip can interpret analog input, which is why the chip has 6 pins for analog input. The ADC has 3 pins set aside for it to function- AVCC, AREF, and GND. AVCC is the power supply, positive voltage, that for the ADC. The ADC needs its own power supply in order to work. GND is the power supply ground.
  • 43. 30 AREF is the reference voltage that the ADC uses to convert an analog signal to its corresponding digital value. Analog voltages higher than the reference voltage will be assigned to a digital value of 1, while analog voltages below the reference voltage will be assigned the digital value of 0. Since the ADC for the Atmega328 is a 10-bit ADC, meaning it produces a 10-bit digital value, it converts an analog signal to its digital value, with the AREF value being a reference for which digital values are high or low. Thus, a portrait of an analog signal is shown by this digital value; thus, it is its digital correspondent value. The last pin is the RESET pin. This allows a program to be rerun and start over. And this sums up the pin out of an Atmega328 chip. We had to solder the pin socket to the vero board, solder the crystal oscillator at pin 9 and 10,the chips for burning the microcontroller are fixed at pins 15 to 19,LED bulb indicator was soldered at pin13 with a resistor 220 ohm resistor, the bulb indicates when the micro controller is power on.
  • 44. 31 Fig 4.4: Microcontroller Circuit after Pin Mapping The third stage of our construction was the power switch that will eventually switch some devices. An NPN transistor was used to drive the 2 relays, we soldered the NPN with a collector voltage of 12V that will close the normally open relays, which were soldered with some resistors to drop the voltage to a switchable level. And the last stage of construction requires soldering wires of the socket and lamp holder to the relays and as well fixing and soldering of the AC input jack 4.2 TESTING After the necessary system design, done in the previous chapter, each section is tested to ensure that it actually functions in the required manner. The order that was observed during the testing and implementation process is as follows
  • 45. 32 I. Testing of component before implementing each unit of the design , a confirmatory test was carried out on each hardware and software unit to ensure their reliability. Also the state of their terminals was also ascertained using a multimeter. The different voltages of the power supply was tested using a multimeter and the waveform of different voltages seen on an oscilloscope II. Test implementation: Each unit was given a preliminary implementation on a breadboard, to ascertain component positions and the various interconnections to be made. This stage allows the opportunity for making any component removal or replacement and interconnection adjustments until the desired result was achieved, after which, it is implemented on a Vero board. III. The code was tested to confirm functionalities were properly working by test running the commands with a real android phone. 4.2.1 TEST OF THE ANDRIOD APPLICATION The user friendly application called "Smart House", was sketched in JAVA using Android studio. A safe connection notification between the Android phone and the Bluetooth module is always shown on the interface of application, when a device having the smart home application is paired with the module a notification of 1 device connected is displayed. After the safe pairing we were able to test run the lamp and socket control
  • 46. 33 Fig 4.5 Smart Home User Interface 4.8 Test Of Lamp And Socket Switch The control for the lamp switch and socket is very easy to use and we were able to switch the lamp and the socket on the control board by swiping the on/off function on the android device Fig 4.6 Control of Lamp and Switch
  • 47. 34 4.3 BILL OF ENGINEERING MEASUREMENTS AND EVALUATION The aim of any engineering project is to produce a reliable and cost effective product in market. Hence, it is of prime importance that the cost analysis of any project be carried out in order to ascertain its market position with respect to price. The cost analysis of the project as carried out is presented in the table 4.1 below: S/N Component Type Quantity Price 1 Bluetooth Module HC-05 1 8000 2 Microcontroller AT Mega 328 1 1600 3 Relays 12v 2 160 4 Transformer 220v-15-0- 15volts 1 250 5 Bridge rectifier LT 1240 1 50 6 Capacitors 100uF,10pF 2 40,20 7 Regulators 7812,7805,117 3 40,40,50 8 Resistors 15k,10k,10ohms 3 40, 20,20 9 AT Mega 32 pin socket 32 pins 1 40 10 Oscillator 16Mhz Crystal 1 70 11 Transistor NPN (TIP 41) 2 200 12 Socket 1 150 13 Lamp Holder 1 50 14 IR LED 1 10 15 Total 10850
  • 48. 35 CHAPTER FIVE CONCLUSION, CHALLENGES AND RECOMMENDATION 5.1 Conclusion Our motivation for this project was that a cost effective, extensible home automation solution is made essentially existent in the current commercial world. Today’s home automation systems are incredibly expensive and are not very extensible, meaning that they are out of reach of many businesses and home users. Furthermore, elderly or disadvantaged users do not have any way to control these devices apart from a costly centralized device, or using existing hardware to enable automations. We were able to develop a system with most of the functionalities of existing home automation products, whilst maintaining ease of use throughout. We made use of an ATmega 328 microcontroller hardware device, and the Android mobile operating system to send event and to control them as well, while not forgetting that the android phone requires an application that was written using JAVA script. 5.2 CHALLENGES The following are challenges encountered during the course of these project, i. The project require some electronic components that are not easily found in the country, means of acquiring the components is time dependent and this affected our time schedule for the work. ii. The Android application poised serious challenge, as it requires programming language (a viable tool) yet difficult to learn within the time frame. iii. In the power supply, there was difficulty getting a 3.3V voltage regulator for the Bluetooth module. We initially attempted doing using a voltage divider rule but realized the current of the rule was low and could not support the input of the Bluetooth module.
  • 49. 36 iv. During soldering of the microcontroller unit, we accidentally dropped LED on the separation from the power supply unit and this caused a voltage short circuit to the microcontroller which later got burnt from the high voltage input. 5.3 PRECAUTIONS TAKEN THROUGHOUT THE PROJECT From the software part to the hardware organization of components there is a need to apply precautionary steps while implementing the project, the precautions observed for the hardware include: i. When building power supply, a lot of attention must be given to the voltage waveforms, desired voltage from rated voltage components. ii. The regular use of resistors must be applied on the Vero board as it is from the data sheet to avoid over current, since each component has a maximum rating for current and voltage. iii. During the implementation of microcontroller, sufficient attention must be paid to the separation of voltage pin holes on the Vero board to avoid short circuiting of the microcontroller which may cause a possible over voltage. iv. All soldering of electronic components done on the Vero board must be properly and carefully done to avoid possible loss of electronic component. v. Attention must be paid to mapping of the functions of the Arduino on the microcontroller to enable it function properly. vi. Avoid using voltage divider rule during regulation of voltage, as the rule does not have a good current retain ability. vii. The sketch of the application must be debugged and made brief to avoid errors.
  • 50. 37 5.4 Recommendation In consonance with the project work and in view of the researched methods and undertakings in the project design, the following are recommended: This topic is a massive project that requires enough time to execute, as most of the electronic components had to be shipped into the country, thereby requiring slightly more money. I will recommend that the department should help the students in getting components that are not locally available. For the purpose of effective and flexible communication between house-hold appliance and the controller, I recommend that the project should be done web based as an individual does not compulsorily need to be within range to operate the appliances rather can stay anywhere in world to probably switch off his conditioning set.
  • 51. 38 REFERENCES 1. Wikipedia, Home automation.URL http://en.wikipedia.org/wiki/Home_automation 1 2. What is Home Automation?, 2012. URL http://www.smarthome.com/ homeautomation.html. 3. Arduino, Arduino.URL http://www.arduino.cc 4. Leonov V, Fiorini P, Sedky S, Torfs T, van Hoof C. Thermoelectric MEMS generators as a power supply for a body area network. Proceedings of the 13th International Conference on Solid-State Sensors, Actuators and Microsystems; Seoul, Korea. 5–9 June 2005; pp. 291–294. 5. Noury N, Herve T, Rialle V, Virone G, Mercier E, Morey G, Moro A, Porcheron T. Monitoring behavior in home using a smart fall sensor. Proceedings of IEEE- EMBS Special Topic Conference on Microtechnologies in Medicine and Biology; Lyon, France. 12–14 October 2000; pp. 607–610. 6. P. Darbee, Insteon (8 2005).URL http://www.insteon.net/pdf/insteondetails.pdf 7. P. Kinney, Zigbee technology: Wireless control that simply works (10 2003).URL http://search.mouser.com/pdfdocs/ZigBeeTechnology.pdf 8. p. kinney, zigbee technology: wireless control that simply works (10 2003). url http://search.mouser.com/pdfdocs/zigbeetechnology. 9. JFR, Z-wave protocol overview.URL http://www.eilhk.com/en/product/Datasheet/Zensys/ 10. Spurgeon, Charles E. (2000). Ethernet; The Definitive Guide. Nutshell Handbook. O'Reilly. p. 29. ISBN 1-56592-660-9. 11. Android Developers. Android Design Guidelines, 2012. URL https://developer.android.com/guide/practices/ui_guidelines/index.html. 12. Oliver E., "A survey of platforms for mobile networks research.," SIGMOBILE Mob. Comput. Commun., vol. 12, no. 4, pp. 56-63, Feb. 2009. 13. D. Chomienne, M. Eftimakis (20 October 2010). "Bluetooth Tutorial" (PDF).URL http://www.newlogic.com/products/Bluetooth-Tutorial-2001.pdf
  • 52. 39 14. ElShafee, Ahmed; Alaa Hamed, Karim " Design and Implementation of a WiFi Based Home Automation System"( August 2012). World Academy of Science, Engineering & Technology;2012, Issue 68, p2177 15. Juing-huei Su, Chyi-shyong Lee, and Wei-chen Wu. The design and implementation of a low-cost and programmable home automation module. IEEE Transactions on Consumer Electronics, 52(4):1239{1244, November 2006. ISSN 0098-3063. doi:10.1109/TCE.2006.273139.URLhttp://ieeexplore.ieee.org/lpdocs/epic03/wrap per.htm?arnumber=4050050. 16. Marquesoft. Arduino Controller android app - Arduino Forum, 2012. URL http://arduino.cc/forum/index.php/topic,127770.0.html 17. P.M. Peter M Corcoran and Joe Desbonnet. Browser-style interfaces to a home automation network. IEEE Transactions on Consumer Electronics, 43 (4):1063{1069, 1997. ISSN 00983063. doi: 10.1109/30.642372. URL http://dl.acm.org/citation.cfm?id=2275611.2276059.JPG 18. http://www.ti.com/product/lm117
  • 53. 40 APPENDIX JAVA CODE FOR OTHER APPLIANCES(LAMP AND SOCKET) public class OtherRemote extends ActionBarActivity implements CompoundButton.OnCheckedChangeListener { Switch lampSwitch; Switch socketSwitch; static boolean lampSwitchState = false; static boolean socketSwitchState = false; private static String DEVICE_ADDRESS = MainActivity.DEVICE_ADDRESS; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_other_remote); lampSwitch =(Switch) findViewById(R.id.lampSwitch); lampSwitch.setOnCheckedChangeListener(this); socketSwitch =(Switch) findViewById(R.id.socketSwitch); socketSwitch.setOnCheckedChangeListener(this); }
  • 54. 41 @Override protected void onStart(){ super.onStart(); lampSwitch.setChecked(lampSwitchState); socketSwitch.setChecked(socketSwitchState); } @Override protected void onStop(){ super.onStop(); lampSwitchState = lampSwitch.isChecked(); socketSwitchState = socketSwitch.isChecked(); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_other_remote, menu); return true; }
  • 55. 42 @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if(buttonView.equals(findViewById(R.id.lampSwitch))){ if(lampSwitch.isChecked()){ Amarino.sendDataToArduino(this,DEVICE_ADDRESS,'l',1);
  • 56. 43 Toast.makeText(OtherRemote.this, "LAMP ON", Toast.LENGTH_LONG).show(); } else{ Amarino.sendDataToArduino(this,DEVICE_ADDRESS,'l',0); Toast.makeText(OtherRemote.this, "LAMP OFF", Toast.LENGTH_LONG).show(); } } else if(buttonView.equals(findViewById(R.id.socketSwitch))){ if(socketSwitch.isChecked()){ Amarino.sendDataToArduino(this,DEVICE_ADDRESS,'s',1); Toast.makeText(OtherRemote.this, "SOCKET ON", Toast.LENGTH_LONG).show(); } else{ Amarino.sendDataToArduino(this,DEVICE_ADDRESS,'s',0); Toast.makeText(OtherRemote.this, "SOCKET OFF", Toast.LENGTH_LONG).show(); } } else{ Toast.makeText(OtherRemote.this, "ERROR", Toast.LENGTH_LONG).show(); }
  • 57. 44 } } CODE FOR UI package com.mycompany.smarthouse; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.content.Intent; import android.view.View; import android.widget.CompoundButton; import android.widget.Toast; import android.widget.ToggleButton; import at.abraxas.amarino.Amarino; public class MainActivity extends ActionBarActivity implements CompoundButton.OnCheckedChangeListener { public static String DEVICE_ADDRESS = "20:15:02:05:62:69";
  • 58. 45 ToggleButton connectButton; static Boolean connectButtonState = false; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); connectButton =(ToggleButton) findViewById(R.id.connectButton); connectButton.setOnCheckedChangeListener(this); } @Override protected void onStart() { super.onStart(); connectButton.setChecked(connectButtonState); } @Override protected void onStop(){ super.onStop(); connectButtonState = connectButton.isChecked();
  • 59. 46 } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; }
  • 60. 47 return super.onOptionsItemSelected(item); } public void openTelevisionRemote(View view) { //Do something in response to button Intent startTelevisionRemote = new Intent(this, TelevisionRemote.class ); startActivity(startTelevisionRemote); } public void openHomeTheaterRemote(View view) { //Do something in response to button Intent startHomeTheaterRemote = new Intent(this, HomeTheaterRemote.class ); startActivity(startHomeTheaterRemote); } public void openOtherRemote(View view) { //Do something in response to button Intent startOtherRemote = new Intent(this, OtherRemote.class); startActivity(startOtherRemote); } @Override
  • 61. 48 public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if(isChecked){ Amarino.connect(this, DEVICE_ADDRESS); Toast.makeText(MainActivity.this, "CONNECTED",Toast.LENGTH_LONG).show(); } else { Amarino.disconnect(this, DEVICE_ADDRESS); Toast.makeText(MainActivity.this,"DISCONNECTED",Toast.LENGTH_LONG).show(); } } } AMARINO CODE FOR MICROCONTROLLER /* Controls your sound system and TV for nt's project An IR LED must be connected to Arduino PWM pin 3. Pin 8 & 9 are connected to control of fridge and lamp */ #include <MeetAndroid.h> #include <IRremote.h>
  • 62. 49 // MeetAndroid meetAndroid(); // you can define your own error function to catch messages // where no fuction has been attached for // These are the raw code for the home theater remote unsigned int PWR[67] = { 4350, 4500, 500, 600, 500, 600, 500, 1700, 500, 1700, 500, 600, 500, 1750, 450, 650, 450, 650, 450, 650, 450, 650, 450, 1750, 450, 1800, 400, 700, 400, 1800, 450, 650, 450, 650, 450, 650, 450, 1750, 450, 1750, 450, 1750, 450, 1800, 400, 700, 400, 700, 400, 700, 450, 1750, 450, 650, 450, 650, 450, 650, 450, 650, 450, 1750, 450, 1750, 450, 1800, 400}; unsigned int HT_INPUT[67] = { 4350, 4500, 500, 600, 500, 600, 500, 1700, 500, 1700, 500, 600, 500, 1750, 450, 650, 450, 650, 450, 650, 450, 650, 450, 1750, 450, 1800, 400, 700, 400, 1800, 450, 650, 450, 650, 450, 650, 450, 1750, 450, 650, 450, 1750, 450, 650, 450, 650, 450, 700, 400, 1800, 400, 1800, 450, 650, 450, 1750, 450, 650, 450, 1750, 450, 1750, 450, 1750, 450, 700, 400}; unsigned int EJECT[67] = { 4350, 4500, 450, 650, 450, 650, 450, 1750, 450, 1750, 450, 700, 450, 1750, 450, 650, 450, 650, 450, 650, 450, 650, 450, 1750, 450, 1750, 450, 700, 400, 1800, 400, 700, 450, 650, 450, 650, 450, 1750, 450, 650, 450, 1750, 450, 1750, 450, 650, 450, 650, 450, 1800, 400, 1800, 450, 650, 450, 1750, 450, 650, 450, 650, 450, 1750, 450, 1750, 450, 650, 450}; unsigned int STOP[67] = { 4450, 4400, 550, 550, 550, 550, 550, 1700, 550, 1650, 550, 550, 550, 1650, 550, 550, 550, 550, 550, 550, 550, 550, 550, 1650, 550, 1700, 500, 600, 500, 1700, 550, 550, 550, 550, 550, 1650,
  • 63. 50 550, 550, 550, 1650, 550, 550, 550, 550, 550, 550, 550, 600, 500, 600, 500, 600, 500, 1700, 550, 550, 550, 1650, 550, 1650, 550, 1650, 550, 1650, 550, 1700, 500}; unsigned int PLAY[67] = { 4450, 4400, 550, 550, 550, 550, 550, 1650, 550, 1700, 500, 600, 500, 1700, 550, 550, 550, 550, 550, 550, 550, 550, 550, 1650, 550, 1650, 550, 550, 550, 1700, 500, 600, 500, 600, 500, 600, 550, 550, 550, 1650, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 1650, 550, 1700, 500, 600, 500, 1700, 550, 1650, 550, 1650, 550, 1650, 550, 1650, 550}; unsigned int PAUSE[67] = { 4450, 4400, 550, 550, 550, 550, 550, 1650, 550, 1700, 550, 550, 550, 1650, 550, 550, 550, 550, 550, 550, 550, 550, 550, 1650, 550, 1650, 550, 600, 500, 1700, 500, 600, 550, 550, 550, 1650, 550, 1650, 550, 1650, 550, 1650, 550, 550, 550, 600, 500, 1700, 500, 600, 500, 600, 550, 550, 550, 550, 550, 550, 550, 1650, 550, 1650, 550, 550, 550, 1650, 550}; unsigned int INFO[67] = { 4450, 4400, 550, 550, 550, 550, 550, 1650, 550, 1700, 550, 550, 550, 1650, 550, 550, 550, 550, 550, 550, 550, 600, 500, 1700, 500, 1700, 500, 600, 500, 1700, 500, 600, 550, 550, 550, 1650, 550, 1700, 500, 600, 500, 600, 500, 600, 500, 1700, 500, 600, 500, 1700, 500, 600, 550, 550, 550, 1650, 550, 1700, 500, 1700, 500, 600, 500, 1700, 500, 600, 500}; unsigned int SKIP_BACKWARD[67] = { 4500, 4350, 600, 500, 600, 500, 600, 1650, 550, 1650, 550, 550, 550, 1650, 550, 600, 500, 600, 500, 600, 550, 550, 550, 1650, 550, 1650, 550, 550, 550, 1650, 550, 550, 550, 550, 550, 550, 550, 1700, 500, 1700, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 550, 1650, 550, 550, 550, 550, 550, 1650, 550, 1700, 500, 1700, 550, 1650, 550, 1650, 550}; unsigned int RW[67] = { 4500, 4350, 600, 500, 600, 550, 550, 1650, 550, 1650, 550, 550, 550, 1700, 500, 600, 500, 600, 500, 600, 550, 550, 550, 1650, 550, 1650, 550, 550, 550, 1650, 550, 550, 550, 550, 550, 1700, 500, 1700, 500, 600, 550, 550, 550, 1650, 550, 550, 550, 1650, 550, 550, 550, 550, 550, 550, 550, 1700, 500, 1700, 500, 600, 550, 1650, 550, 550, 550, 1650, 550};
  • 64. 51
  • 65. 52 The above code that should automate the appliances is not the complete version,anyone interested in getting the full sketch should consult me on ntongha1@yahoo.com. A little token will definitely be required…..lol