You are on page 1of 51

Ministry of Higher Education

And Scientific Research


University of Technology
Electrical Engineering Department

Design and Implement of Remote Control System Based on


Bluetooth Smart Mobile Phone
Graduation project submitted to the Electrical Engineering

BY
Samaa Saad Abd_Alwahab
Noor Sarmed Rafia

Supervised BY
Dr.Sinan Majid Abd_Alsatar
2017
Supervisor Certification

I certify that this project entitled " Design and Implement of Remote Control

System Based on Bluetooth Smart Mobile Phone" was prepared under my supervision

at Electrical Engineering Department, University of Technology as partial fulfillment

of the requirements for the degree of Bachelors of Science in Electronic Engineering.

Signature:

Name: Dr.Sinan Majid Abd_Alsatar

Date: 9/5/2017
Acknowledgment

I have taken efforts in this project. However, it would not have been

possible without the kind support and help of many individuals and

organizations. I would like to extend my sincere thanks to all of them.

I am highly indebted to (Dr.Sinan Majid Abd_Alsatar ) for their

guidance and constant supervision as well as for providing necessary

information regarding the project & also for their support in completing the

project.

I would like to express my gratitude towards my parents & member of

(Electrical Engineering Department )for their kind co-operation and

encouragement which help me in completion of this project.

My thanks and appreciations also go to my colleague in developing

the project and people who have willingly helped me out with their ability

Samaa Saad & Noor Sarmed


‫االهداء‬

‫إلهي اليطيب الليل إال بشكرك واليطيب النهار إلى بطاعتك ‪ ..‬والتطيب اللحظات إال‬
‫بذكرك ‪ ..‬وال تطيب اآلخرة إال بعفوك ‪ ..‬وال تطيب الجنة إال برؤيتك‬
‫هللا جل جالله‬

‫إلى من بلغ الرسالة وأدى األمانة ‪ ..‬ونصح األمة ‪ ..‬إلى نبي الرحمة ونور العالمي‬
‫سيدنا محمد صلى هللا عليه وسلم‬

‫إلى من كلله هللا بالهيبة والوقار ‪ ..‬إلى من علمني العطاء بدون انتظار ‪ ..‬إلى من أحمل‬
‫أسمه بكل افتخار ‪ ..‬أرجو من هللا أن يمد في عمرك لترى ثماراً قد حان قطافها بعد طول‬
‫‪ ..‬انتظار وستبقى كلماتك نجوم أهتدي بها اليوم وفي الغد وإلى األبد‬
‫والدي العزيز‬

‫إلى مالكي في الحياة ‪ ..‬إلى معنى الحب وإلى معنى الحنان والتفاني ‪ ..‬إلى بسمة الحياة‬
‫وسر الوجود‬
‫إلى من كان دعائها سر نجاحي وحنانها بلسم جراحي إلى أغلى الحبايب‬
‫أمي الحبيبة‬

‫إلى توأم روحي ورفيقة دربي ‪ ..‬إلى صاحبة القلب الطيب والنوايا الصادقة‬
‫إلى من رافقتني منذ أن حملنا حقائب صغيرة ومعك سرت الدرب خطوة بخطوة وما‬
‫تزال ترافقني حتى اآلن‬
‫أختي‬
ABSTRACT

Technology is a never ending process. To be able to design a


product using the current technology that will be beneficial to the lives of
others is a huge contribution to the community. This project presents the
design and implementation of a low cost but yet flexible and secure cell
phone based home automation system. The design is based on a stand
alone Arduino BT board and the home appliances are connected to the
input/ output ports of this board via relays. The communication between
the cell phone and the Arduino BT board is wireless. This system is
designed to be low cost and scalable allowing variety of devices to be
controlled with minimum changes to its core. Password protection is being
used to only allow authorized users from accessing the appliances at
home.
Contents

Subject Name page


Chapter one Introduction 1

1.1 introduction 1
1.2 Remote Control Types and 3
Technology
1.2.1 Infrared Remote Control 4
1..2.2 Radio Frequency remote Control 5
1.2.3 Wired Remote Control 6
1.2.4 WI-FI Remote Control 7
1.2.5 Combination-IR,RF, Wi-Fi and 7
wired Remote Control
1.2.6 Dedicated Remote Control 8
1.2.7 Universal Remote Control 8
1.2.8 Learning Remote Control 9
1.2.9 Programmable Remote Control 10
1.3 Bluetooth Remote Control 11
Chapter Two Hardware Requirements 12

2.1 Block Design 12


2.2 Hardware requirements 13
2.2.1 Bluetooth hc-06 13
2.2.2 Arduino MEGA 15

2.2.3 Relay 16
Contents
Chapter Three Software 17

3.1 Microcontroller 17
3.2 Arduino 18
3.3 Software 20
Chapter Four Implement of proposal 26
system
4.1 OS Android 26
4.1.1 Android Application on Mobile 27
Phones
4.1.2 Android Application Operated 28
Bluetooth
4.2 Application 28
4.3 Implement of remote control 29
Chapter Five Conclusion &Future work 33

5.1 Conclusion 33

5.2 Future work 34

Reference
INTRODUCTION
Chapter One
Introduction
1.1 Introduction

Just a few years ago it was extremely difficult to monitor and


maintain distributed stations. The reason for this was that the remote
systems were either unable to communicate with a control center or
communication involved a great deal of effort and expense.

Today, all installations in supply and disposal technology, such as


water, gas or energy supply, pipelines or even transportation technology
applications, must be connected to a central control system. This allows
smaller installations such as pumping stations, transformer stations or
transformer substations to be monitored and controlled remotely. This
connection presents new challenges for the technology.

Remote control and remote maintenance have since become the


established standard in communication. Remote systems or external
stations can be easily connected to the control center using a wide range
of transmission paths. Standardized transmission is made easier thanks to
defined, standardized protocols. The predictive maintenance that has been
made possible as a result of this enables huge cost savings.

This whit is intended to provide all users with a practical selection


guide to the communication mechanisms and media for remote
maintenance and remote control technology that are relevant to them.

1|ch a p te r one
The aim of the proposed system is to develop a cost effective
solution that will provide controlling of home appliances remotely and
enable home security against intrusion in the absence of homeowner. The
home appliances control system with an affordable cost was thought to be
built that should be providing remote access to the appliances and
allowing home security. Though devices connected as home and office
appliances consume electrical power. These devices should be controlled
as well as turn on/off if required. Most of the times it was done manually.
Now it is a necessity to control devices more effectively and efficiently at
anytime from anywhere.

In this system, we are going to develop a remote control based


home/office appliance. Remote control for home appliances is an absolute
necessity in our fast-paced life. As a result, much important has been
given to this aspect and a range of remote controls are prevalent today.
One of the most common is that which makes use of IR radiations at
particular frequencies. Our product is a Remote Operated Home
Appliance or Remote controlled Home appliance. The circuit is
connected to any of the home appliances (lamp, fan, radio, etc) to make
the appliance turn on/off from remote control. The circuit can be
activated from up to 10 meters. It is very easy to build and can be
assembled on a general-purpose.

Remote controller is a component of an electronic device, usually


a car, record player, air conditioning, fan … and used to control them
from a short distance without wires. The remote control has continually
developed and upgraded in recent years and now includes Bluetooth
connectivity, motion sensing and control functions by voice.

2|ch a p te r one
Remote controls use infrared often help users major equipment
ordered through some buttons to change various settings. In fact, all the
functions of most of today’s electronic devices can be adjusted via best
remote start, while the buttons on the main device only has a handful of
essential primary node.

Most of the remote control to communicate with your device


through infrared signals and a few that use radio waves. Normally the
signal from the remote control are encrypted and require major equipment
must be of a product line or a specific brand. But there are also multi-
functional remote control can work with most devices with popular
brands

1.2 Remote Control Types and Technology

There are many types of remote controls on the market today. Below is a
list and description of the most common types of remote controls and the
remote control technology used. Note that there are subcategories for
some types of remote control technology.

3|ch a p te r one
1.2.1 Infrared Remote Control (IR)

Infrared, or IR technology is a form of light just outside the visible


spectrum of the human eye. When modulated and set to a specific
frequency it can be used to send unique bursts of IR light to a device.
Each unique infrared code is then interpreted as a specific function by the
device being controlled. Technology as shown below Advantages:

 Line of sight -
 Battery life -
 Limited Regulatory Requirements
 No Licensing Fees -
 Common Devices.

Infrared Technology:

Typical infrared frequencies used by infrared remote controls are:


36KHz, 38KHz to 56KHz, and 455KHz. Some devices use custom
infrared IR frequencies.

Figure 1.1 IR Remote Control

4|ch a p te r one
1.2.2 Radio Frequency remote control (RF)

Radio Frequency or RF technology is a modulated wave form in


the radio frequency spectrum. Remote controls using radio frequency
technology can transmit unique RF codes to a host device. The host
device is required to have a RF receiver capable of recognizing the RF
signal from the remote. The device can then decode the signal and
perform a specific action .Advantages:

 No line-of-sight required -
 Greater Distance.
 Common Devices -

Radio Frequency Technology:

Typical radio frequencies used in consumer and some industrial RF


remote controls are 27MHz, 433MHz, 2.4GHz. There are also custom
proprietary types of RF technology used for controlling consumer and
industrial electronics. Some of these include Bluetooth, Zigbee, Z-Wave,
and other proprietary technologies.as shown in figure1

Figure 1.2 RF remote control

5|ch a p te r one
1.2.3 Wired Remote Controls

Some applications require that the remote control be physically wired to


the device it is controlling. Control commands are sent from the remote
control to the device through the attached wire. Some remote controls can
be designed such that the wire can be disconnected and the remote can
then be used with infrared or radio frequency signals. Advantages:

 No interference
 One-to-one control

Wired Technology:

Methods of connecting to a wired remote control can be USB, RS-232,


TTL using multiple types of standard connectors, or hard wired (not
removable).

Figure 1.3 wired remote control

6|ch a p te r one
1.2.4 Wi-Fi Remote control

Wi-Fi technology has been used as a method of transmitting a


control signal over a Wi-Fi network, or beyond (Internet). While Wi-Fi
uses radio frequency technology, Wi-Fi remotes are more complex than
standard RF remote controls. A Wi-Fi remote needs to be capable of
logging on to a Wi-Fi network and typically communicating using a Wi-
Fi protocol. Advantage

Using a remote control, or remote-control-like device (such as a


smartphone) with Wi-Fi capabilities allows for connecting to a Wi-Fi
network and therefore communicating with any device also connected to
the same network. Control can be inside a home or business, or, over the
Internet. Communication with another device set up on the network will
need to be preprogrammed and the controlled device will also be required
to be connected to the same Wi-Fi network.

1.2.5 Combination - IR, RF, Wi-Fi and wired

Combination Technology remote controls take several of the


typical control technologies and combine them into a single remote
control. This is usually done for very specific applications. For consumer
devices there are 'repeater' systems available that will see an infrared code
from a remote control, and then repeat the same signal through the
repeater device (through a wall or cabinet) and then convert the signal
back into IR to transmit to the device. Some of these repeater devices can
also be used with RF remote so that the receiver is located behind a
cabinet. In these applications it might be advantageous to have a remote
control that will transmit IR signals to line-of-site devices in a room, but

7|ch a p te r one
also transmit RF signals to devices in another room or located behind a
cabinet yet connected to an RF to IR repeater.

1.2.6 Dedicated Remote Control

A dedicated remote control is a remote control that is


programmed to control a single specific device, or several specific
devices. Under normal operations the functionality of the remote does not
change. It is 'dedicated' to the specific devices. When you purchase a
television for example, it may come with a dedicated remote control that
will only control the television you purchased.

1.2.7 Universal Device Remote Control (Universal


Remote Control)

Many people wind up with multiple dedicated remote controls for


multiple devices in their home entertainment room. TV, Cable, SAT,
Tuner, etc. remote controls that come with the electronic and
entertainment equipment they purchase. One method of reducing the
number of remote controls one has to use to control the equipment is to
use a 'library' remote, also called a Universal Remote Control or URC. A
library remote is preprogrammed with most common equipment infrared
codes. Using several different methods various brands and models are
selected on the library remote. So, TV codes are the TV infrared codes
that match your television model and will control the major functions like
volume and channel. Usually only standard functions are included, so less
used functions are only available by using the remote control that came

8|ch a p te r one
with the television. These Universal Library remotes are also good if you
happen to lose, or break the original remote. You can at least control most
major functions. Keep in mind that typical library universal remotes are
one time programmed and not updateable (though some can be updated).
An older library remotes may not contain the infrared codes for a newer
device. Some major brands will reuse infrared codes so a "power on"
command may be the same "power on" command across multiple models
of the same brand. Some Universal Remote Controls also include a
learning function as shown below.

Figure 1.4 Samsung 12-device universal learning remote with LCD


screen

1.2.8 Learning Remote Control

A learning remote control serves a similar purpose as the above


described Universal Remote Control or Library remote but the main
feature is the ability of the remote to 'learn' the infrared codes from an
original remote control. Using the original remote you will teach the
learning remote the infrared codes. These infrared codes are stored in

9|ch a p te r one
memory on the learning remote for later use. Most learning remotes use a
technology that ensures the memory is saved whenever you change the
batteries. Some learning remote controls also come with a pre-stored
'library' of infrared codes and these are selected using the same methods
used with standard URC or library remote controls. To use the learning
feature one must have the original remote, or, use a URC/library remote
to teach the codes. Most learning remote controls are designed to learn
infrared codes from standard infrared remote controls that are sold with
standard consumer devices. There are technical limits however so the
learning feature may not work with all infrared remotes. Keep in mind the
learning technology needs to ensure it is learning a real infrared code and
not some stray light from a light bulb or the sun. These technical filters
are sometimes set to ignore IR light outside typical infrared signals used
with consumer devices. For the most part however they are designed for
consumers using typical consumer infrared controlled devices.

1.2.9 Programmable Remote Control

Programmable remote controls can be infrared, radio frequency,


Wi-Fi or a combination. Programmable typically means that someone
using the remote can program it either with codes to control devices or
create more elaborate functions such as macros. Macros are multiple
functions linked together and activated with a single press of a button on
the remote. Programmable remotes can be programmed via a computer
using RS-232 or USB communication, or via Bluetooth, Wi-Fi or other
wireless communication protocols. Macros can sometimes be
programmed directly on the remote control, or, programmed on a
computer and then loaded as a file into the remote control.

10 | c h a p t e r o n e
1.3 Bluetooth Remote control

Bluetooth wireless technology is a short range communication system


intended to replace the cables connecting portable or fixed electronic
devices and is an established IEEE standard.

It is preferable to use Bluetooth because now a days people have their


smart phones with them all the time, since the smart phones have
Bluetooth facility in them, thus it's better to use Bluetooth rather than
using RF remotes or IR remotes. It is a robust and easy to use system
.Advantages:

 There is no need for extra training of that person who is using it.
 All the control would be in your hands by using this home
automation system.
 This project can provide the facility of monitoring all the
appliances with in the communication range through Bluetooth.
 The schematic of Arduino is open source, for the future
enhancement of the project board can be extended to add more
hardware features.
 It's cheap
 Easy to use

11 | c h a p t e r o n e
Hardware Requirement
CHAPTER TWO

Hardware Requirement
2.1 Block design
In past few years, home automation & remote control and monitoring
systems have seen a rapid growth in terms of technology This system has
simple features designed with the objective of minimum power
consumption by using bluetooth and arduino.

Figure 2.1 the basic block diagram of the remote control

12 | c h a p t e r T w o
2.2 Hardware requirements
In this project we used this hardware to implelment the remote control by
using bluetooth based in mobile :

 Bluetooth Module -HC-06


 Arduino Mega
 12V Relay 4-Channel
 Power Supply
 Wires

2.2.1 Bluetooth Module (HC-06)


Bluetooth is a wireless technology that enables a Wireless device
to communicate in the 2.4 GHZ Industrial. Scientific and Medical
(ISM) band. It has been specifically designed as a low cost, low power
radio technology. Which is particularly suited for the short Personal
Area Network (PAN) range Application. In this paper we develop an
application for a Bluetooth system that will help create a smart Billboard
that utilizes the individualism of consumer behavior. The essential parts
of the development includes the Graphical User Interface (GUI) based
application that runs on the mobile devices and the application equipped
with advertisement presentation and information exchange capability.
The communication between the two major components of the system is
based on Bluetooth.

Every device will have to be equipped with a microchip


(transceiver) that transmits and receives in the frequency of 2.4 GHz that
is available in the whole world (with some variations of bandwidth in

13 | c h a p t e r T w o
different countries). Besides the information there are three channels of
voice available.

Bluetooth is a standard used in links of radio of short scope, destined


to replace wired connections between electronic devices like cellular
telephones, Personal Digital Assistants (PDA), computers, and many
other devices. Bluetooth technology can be used at home, in the office, in
the car, etc. This technology allows to the users instantaneous
connections of voice and information between several devices in real
time. The way of transmission used assures protection against
interferences and safety in the sending of information.

For the communication between mobile phone and microcontroller


Bluetooth module(HC-06) is used HC-06 is low power 1.8V operation
and is easy to use with Bluetooth SPP serial port protocol Serial port
Bluetooth module have a Bluetooth 2.0+EDR (enhanced data rate),
3Mbps modulation with complete 2.4GHZ radio transceiver and
baseband. Using Bluetooth profile and android platform architecture
different type of Bluetooth applications can be developed.as shown in
figure below .

Figure 2.2 Bluetooth (hc-06)

14 | c h a p t e r T w o
2.2.2 Arduino MEGA

The Arduino Mega is a microcontroller board based on


the ATmega1280 . It has 54 digital input/output pins (of which 14 can be
used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial
ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an
ICSP header, and a reset button. It contains everything needed to support
the microcontroller; simply connect it to a computer with a USB cable or
power it with a AC-to-DC adapter or battery to get started. The Mega is
compatible with most shields designed for the Arduino Duemilanove or
Diecimila.

Table 2 The Specifications of Arduino Mega

Microcontroller ATmega1280
Operating Voltage 5V
Input Voltage 7-12V
(recommended)
Input Voltage (limits) 6-20V
Digital I/O Pins 54 (of which 15 provide PWM
output)
Analog Input Pins 16
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 128 KB of which 4 KB used by
bootloader
SRAM 8 KB
EEPROM 4 KB
Clock Speed 16 MHz

15 | c h a p t e r T w o
2.2.3 Relay
A relay is a simple electromechanical switch made up of
an electromagnet and a set of contacts. Relays are found hidden in all
sorts of devices. In fact, some of the first computers ever built used relays
to implement Boolean gates which can be turn on and off by an applying
the voltage across its contacts as shown in figure . In this project used a
12V 4-channel relay.

Figure 2-3 the operation of relay

16 | c h a p t e r T w o
Software
CHAPTER THREE

Software

3.1 Microcontroller

Arduino is an open-source electronics platform based on easy-to-


use hardware and software. Arduino boards are able to read inputs -
light on a sensor, a finger on a button, or a Twitter message - and turn
it into an output - activating a motor, turning on an LED, publishing
something online. You can tell your board what to do by sending a set
of instructions to the microcontroller on the board. To do so you use
the Arduino programming language (based on Wiring), and the
Arduino Software , based on Processing.

Figure 3-1 the Arduino Mega

17 | C h a p t e r T h r e e
3.2 Arduino

Over the years Arduino has been the brain of thousands of


projects, from everyday objects to complex scientific instruments. A
worldwide community of makers - students, hobbyists, artists,
programmers, and professionals - has gathered around this open-
source platform, their contributions have added up to an incredible
amount of accessible knowledge that can be of great help to novices
and experts alike.

Use Arduino because it's simple and accessible user experience,


Arduino has been used in thousands of different projects and
applications. The Arduino software is easy-to-use for beginners, yet
flexible enough for advanced users. It runs on Mac, Windows, and
Linux. Teachers and students use it to build low cost scientific
instruments, to prove chemistry and physics principles, or to get
started with programming and robotics. Designers and architects build
interactive prototypes, musicians and artists use it for installations and
to experiment with new musical instruments. Makers, of course, use it
to build many of the projects exhibited at the Maker Faire, for
example. Arduino is a key tool to learn new things. Anyone - children,
hobbyists, artists, programmers - can start tinkering just following the
step by step instructions of a kit, or sharing ideas online with other
members of the Arduino community.
There are many other microcontrollers and microcontroller
platforms available for physical computing. Parallax Basic Stamp,
Netmedia's BX-24, Phidgets, MIT's Handyboard, and many others
offer similar functionality. All of these tools take the messy details of
microcontroller programming and wrap it up in an easy-to-use
package. Arduino also simplifies the process of working with
18 | C h a p t e r T h r e e
microcontrollers, but it offers some advantage for teachers, students,
and interested amateurs over other systems:

 Inexpensive - Arduino boards are relatively inexpensive


compared to other microcontroller platforms. The least expensive
version of the Arduino module can be assembled by hand, and even
the pre-assembled Arduino modules cost less than $50
 Cross-platform - The Arduino Software (IDE) runs on
Windows, Macintosh OSX, and Linux operating systems. Most
microcontroller systems are limited to Windows.
 Simple, clear programming environment - The Arduino
Software (IDE) is easy-to-use for beginners, yet flexible enough for
advanced users to take advantage of as well. For teachers, it's
conveniently based on the Processing programming environment, so
students learning to program in that environment will be familiar with
how the Arduino IDE works.
 Open source and extensible software - The Arduino software
is published as open source tools, available for extension by
experienced programmers. The language can be expanded through
C++ libraries, and people wanting to understand the technical details
can make the leap from Arduino to the AVR C programming language
on which it's based. Similarly, you can add AVR-C code directly into
your Arduino programs if you want to.
 Open source and extensible hardware - The plans of the
Arduino boards are published under a Creative Commons license, so
experienced circuit designers can make their own version of the
module, extending it and improving it. Even relatively inexperienced
users can build the breadboard version of the module in order to
understand how it works and save money.

19 | C h a p t e r T h r e e
3.3 Software

The software used by the arduino is Arduino IDE .Arduino IDE is


a cross-platform application written in Java, and is derived from the
IDE for the Processing programming language and the Wiringproject.
It is designed to introduce programming to artists and other
newcomers unfamiliar with software development. It includes a code
editor with features such as syntax highlighting, brace matching, and
automatic indentation, and is also capable of compiling and uploading
programs to the board with a single click. There is typically no need to
edit make files or run programs on a command-line interface.
Although building on command-line is possible if required with some
third-party tools such as Ino.

The Arduino IDE comes with a C/C++ library called "Wiring"


(from the project of the same name), which makes many common
input/output operations much easier. Arduino programs are written in
C/C++, although users only need define two functions to make a
runnable program:

 setup() – a function run once at the start of a program that can


initialize settings
 loop() – a function called repeatedly until the board powers off

20 | C h a p t e r T h r e e
Figure 3-2 A screenshot of the Arduino IDE showing the "Blink"
program, a simple beginner program

A typical first program for a microcontroller simply blinks


a LED on and off. In the Arduino environment, the user might write a
program like this:
#define LED_PIN 13
void setup () {
pinMode (LED_PIN, OUTPUT); // enable pin 13 for digital
output
}
void loop () {
digitalWrite (LED_PIN, HIGH); // turn on the LED
delay (1000); // wait one second (1000 milliseconds)

21 | C h a p t e r T h r e e
digitalWrite (LED_PIN, LOW); // turn off the LED
delay (1000); // wait one second
}

For the above code to work correctly, the positive side of the
LED must be connected to pin 13 and the negative side of the LED
must be connected to ground. The above code would not be seen by a
standard C++ compiler as a valid program, so when the user clicks the
"Upload to I/O board" button in the IDE, a copy of the code is written
to a temporary file with an extra include header at the top and a very
simple main() function at the bottom, to make it a valid C++ program.

Figure 3.3 the flowchart of the sequent of program

22 | C h a p t e r T h r e e
Here the Arduino software of remote control of Bluetooth and
based on android mobile phone :

#include <SoftwareSerial.h>
#define relay1 2
#define relay2 3
#define relay3 4
#define relay4 5
char val;
void setup() {
pinMode(relay1,OUTPUT);
pinMode(relay2,OUTPUT);
pinMode(relay3,OUTPUT);
pinMode(relay4,OUTPUT);
digitalWrite(relay1,HIGH);
digitalWrite(relay2,HIGH);
digitalWrite(relay3,HIGH);
digitalWrite(relay4,HIGH);
mySerial.begin(9600);
Serial.begin(9600);
}
void loop() {
//cek data serial from bluetooth android App
if( mySerial.available() >0 ) {
val = mySerial.read();
Serial.println(val);
}
//Relay is on

23 | C h a p t e r T h r e e
if( val == '1' ) {
digitalWrite(relay1,LOW);
}
else if( val == '2' ) {
digitalWrite(relay2,LOW);
}
else if( val == '3' ) {
digitalWrite(relay3,LOW);
}
else if( val == '4' ) {

digitalWrite(relay4,LOW);
}
//relay all on
else if( val == '9' ) {
digitalWrite(relay1,LOW);
digitalWrite(relay2,LOW);
digitalWrite(relay3,LOW);
digitalWrite(relay4,LOW);
}
//relay is off
else if( Val == 'A' ) {
digitalWrite(relay1,HIGH);
}
else if( Val == 'B' ) {
digitalWrite(relay2,HIGH); }
else if( Val == 'C' ) {

24 | C h a p t e r T h r e e
digitalWrite(relay3,HIGH); }
else if( Val == 'D' ) {
digitalWrite(relay4,HIGH); }
//relay all off
else if( Val == 'I' ) {
digitalWrite(relay1,HIGH);
digitalWrite(relay2,HIGH);
digitalWrite(relay3,HIGH);
digitalWrite(relay4,HIGH);
}
}

25 | C h a p t e r T h r e e
Implement of proposal system
Chapter Four

Implement of proposal system


4-1 Operation System Android
Android is an open-source operating system which means that
any manufacturer can use it in their phones free of charge It was built
to be truly open Android is built on the open Linux Kernel
Furthermore, it utilizes a custom JAVA virtual machine that was
designed to optimize memory and hardware resources in a mobile
environment.

The Android Home Automation project comes with a free application


called “ Smart Home”. This application controls the various appliances
connected to your Arduino and relays. When the toggle buttons on the
application are pressed, corresponding Bluetooth signals are sent from
your Android phone to the Bluetooth module you have hooked up to
your Arduino. The Arduino finds out which signal was sent and
compares it to the predefined signals assigned for each appliance.
When it identifies that signal, the Arduino activates the relay hooked
up to its digital pin by passing 5V through it. Thus the relay is
switched ON and the corresponding appliance connected to the relay is
turned ON as well. To switch it OFF, Arduino passes a 0V or logic
low to its digital pin.

26 | C h a p t e r F o u r
The connection diagram for Arduino is as shown below. For setting up
this system, wiring connections have to be made between the Arduino
and Bluetooth module and also with the relays. Here, the Bluetooth
Module’s Tx is connected to Arduino Rx (digital pin 0) and the
module’s Rx to Arduino Tx (digital pin 1). 5V and GND of the module
are connected to the Arduino’s 5V and GND.

Figure 4-1 the platform of the connection diagram

4.1.1 Android Application on Mobile Phones

An android app is meant for phones with an android based operating


systems. They can be downloaded from the android app Market which
is pre-loaded on every android phone Blue control APP and Bluetooth
Spp APP are some examples.

27 | C h a p t e r F o u r
4.1.2 Android Application Operated Bluetooth

The Android platform includes support for the Bluetooth network


stack, which allows a device to wirelessly exchange data with other
Bluetooth devices The application framework provides access to the
Bluetooth functionality through the Android Bluetooth APIs

4-2 Application of Bluetooth

Build the application by using MITAPPINVENTOR2 by login into


the web and created a new app that implement the remote control by
using Bluetooth.

Figure 4-2 the blocks of application by mit app inventor2


28 | C h a p t e r F o u r
4.3 Implement of remote control

This wireless technology is especially useful in home


environment, where there exists hardly any infrastructure to
interconnect intelligent appliances.

By the application that installed in the Android Smart phone now can
turn on the devices and turn off

Figure 4-3 the screenshot of application and the connecting of


project

29 | C h a p t e r F o u r
When Device1 is turned on by the application the figure is shown
below the blue light will turn on because of the relay1 will turn on .

Figure 4-4 the device1 is on

And when Device2 is turned on by the application the figure is shown


below the weight light will turn on because of the relay2 will turn on .

Figure 4-5 the device2 is on

30 | C h a p t e r F o u r
And when Device3 is turned on by the application the figure is shown
below the yellow light will turn on because of the relay3 will turn on.

Figure 4-6 the device3 is on

And when Device4 is turned on by the application the figure is shown


below the green light will turn on because of the relay4 will turn on .

Figure 4-7 the device4 is on

31 | C h a p t e r F o u r
And when All Devices is turned on and turned off by using the
application in the figures is shown below

Figure 4-8 the all devices is on

Figure 4-9 the all devices is off

32 | C h a p t e r F o u r
Conclusion &Future Work
Chapter Five

Conclusion and future work

5.1 Conclusion

With a remote control, it is compact to bring along with people. On the


other hand, it is useful for the sick or disabled. It helps people move
freely slide and interacts with the audience easily

It is preferable to use Bluetooth because now a days people have their


smart phones with them all the time, since the smart phones have
Bluetooth facility in them, thus it's better to use Bluetooth rather than
using RF remotes or IR remotes.

Bluetooth wireless technology encompasses several key points that


facilitate its widespread adoption:

 it is an open specification that is publicly available and royalty


free;

 its short-range wireless capability allows peripheral devices to


communicate over a single air-interface, replacing cables that use
connectors with a multitude of shapes, sizes and numbers of pins;
 Bluetooth supports both voice and data, making it an ideal
technology to enable many types of devices to communicate; and
 Bluetooth uses an unregulated frequency band available anywhere
in the world.

33 | C h a p t e r F i v e
5.2 Future Work

Home Automation is undeniably a resource which can make a home


environment automated. People can control their electrical devices via
these Home Automation devices and set up controlling actions through
Mobile.

In future this product may have high potential for marketing can added
more relay and connect the arduino with gsm that use when the Bluetooth
turned off

 Memory can be used to store the appliance status during power


failure.
 Appliance scheduler/timer can be implemented using RTC
(Real Time Clock(
 Can be changes to an IoT device using Wi-Fi connectivity

34 | C h a p t e r F i v e
Reference
[1] The official Bluetooth website from Bluetooth SIG: http://www.bluetooth.com

[2] Neng- Shiang Liang; Li-Chen Fu; Chao-Lin Wu. “An integrated, flexible, and Internet-based
control architecture for home automation system in the internet era”. Proceedings ICRA `02. IEEE
International Conference on Robotics and Automation, Vol. 2, pp.1101-1106, 2002.

[3] E. Yavuz, B. Hasan, I. Serkan and K. Duygu. “Safe and Secure PIC Based Remote Control
Application for Intelligent Home”. International Journal of Computer Science and Network Security,
Vol. 7, No. 5, May 2007.

[4] B. Koyuncu. “PC remote control of appliances by using telephone lines”. IEEE Transaction on
Consumer Electronics, Vol. 41, Issue 1, pp.201-209, 1995.

[5] S. Schneider, J. Swanson and Peng-Yung Woo. “Remote telephone control system”. IEEE
Transaction on Consumer Electronics, Vol.43, Issue 2, pp.103-111, 1997.

[6] K.Tan, T.Lee and C.Yee Soh. “Internet-Based Monitoring of Distributed Control Systems-An
Undergraduate Experiment”. IEEE Transaction on Education, Vol. 45, No. 2, May 2002.

[7] N. Swamy, O. Kuljaca and F. Lewis. “Internet-Based Educational Control Systems Lab Using
Net-meeting”. IEEE Transaction on Education, Vol. 45, No. 2, pp.145- 151, May 2002.

[8] P. Lin and H. Broberg. “HVAC Applications”. IEEE Industry Applications Magazine,
pp.49-54, January 2002.

[9] A.R.Al-Ali and M. AL-Rousan. “Java-Based Home


Automation System”. IEEE Transaction on Consumer Electronics, Vol.50, No. 2, May 2004.

[10] N. Sriskanthan and Tan Karand. “Bluetooth Based Home Automation System”. Journal of
Microprocessors and Microsystems, Vol. 26, pp.281-289, 2002.

[11] Official Arduino BT website: http://www.arduino.cc/en/Guide/ArduinoBT

[12] http://en.wikipedia.org/wiki/Bluetooth_Special_Interest_Group

[13] "Glossary of Remote Control Terms." Remote Central.


http://www.remotecentral.com/features/glossary1.htm
[14] "How It Works: Remote Controls." Radio Design Group.
http://www.radiodesign.com/remwrks.htm
[15] "Infra Red Remote Controls - How They Work." UW Electrical Engineering.
http://www.ee.washington.edu/conselec/A95/projects/pierreg/works/works.htm
[16]"Inside a TV Remote Control." HowStuffWorks.
http://electronics.howstuffworks.com/inside-rc.htm
[17]"Invention of the Remote Control." The Great Idea Finder.
http://www.ideafinder.com/history/inventions/story061.htm
[18]"RF Extender." Remote Central. http://www.remotecentral.com/urcseries/index15.htm
[19]"A TV Remote Control Decoder." ARRLWeb.http://www.arrl.org/news/features/2004/03/30/1/
Reference
‫اخلالصة‬

‫التكنولوجيا هي عملية ال تنتهي أبدا‪ .‬لتكون قادرة على تصميم املنتج‬

‫ابستخدام التكنولوجيا احلالية اليت سوف تكون مفيدة حلياة اآلخرين هو مسامهة كبرية‬

‫للمجتمع‪ .‬يعرض هذا املشروع تصميم وتنفيذ منخفضة التكلفة ولكن بعد مرنة وآمنة اهلاتف‬

‫اخلليوي نظام التشغيل اآليل للمنزل‪ .‬ويستند التصميم على قائمة بذاهتا اردوينو بت اجمللس‬

‫وترتبط األجهزة املنزلية ملنافذ اإلدخال ‪ /‬اإلخراج من هذا اجمللس عرب التبديالت‪ .‬التواصل‬

‫بني اهلاتف اخلليوي وجملس اردوينو بت الالسلكية‪ .‬مت تصميم هذا النظام لتكون منخفضة‬

‫التكل فة وقابلة للتطوير السماح جمموعة متنوعة من األجهزة اليت ميكن السيطرة عليها مع احلد‬

‫األدىن من التغيريات على جوهرها‪ .‬يتم استخدام محاية كلمة املرور للسماح فقط‬

‫للمستخدمني املصرح هلم من الوصول إىل األجهزة يف املنزل‪.‬‬


‫وزارة التعليم العايل والبحث العلمي‬
‫اجلامعة التكنلوجية‬
‫قسم اهلندسة الكهرابئية‬

‫تصميم وتنفيذ نظام التحكم عن بعد على أساس بلوتوث اهلوات الذيية‬
‫احملمولة‬
‫يف اجلامعة التكنلوجية كجزء من متطلبات نيل درجة البكلوريوس يف انهنسةة‬
‫االلكرتونية‬

‫من قبل‬
‫مساء سعد عبد الوهاب‬
‫نور سرمد رافع‬

‫باشراف‬

‫الدكتور سنان ماجد عبد الستار‬

You might also like