SlideShare a Scribd company logo
i
An-Najah National University ‫الوطنية‬ ‫النجاح‬ ‫جامعة‬
Faculty of engineering ‫الهندسة‬ ‫كلية‬
Electrical Engineering Department
Smart Home
Prepared By:
1.Saed Dwikat
2. Sharer Alawneh
Supervisor:
Dr.Falah Hassan
Graduation Project Submitted in Partial Fulfillment of The
Requirements for The Degree of Bachelor of Electrical Engineering
2014, 2015
ii
To myconstantgiving,precious father, who implantsambitionand
perseverancein me,
iii
To mydearmotherwho grantsinexhaustibletenderness,
To mysiblingswho bearmemoriesofmy childhood andmy youthin their
eyes,
To myfriends who can'tbenarrowedin words, especially Ibrahim Asadand
Abd ElrahmanHazem
To theprisoners anddetaineeswho sacrificed theirfreedom forthefreedom
ofothers,
To themartyrsofPalestinewho aremorenoblethanus , To all thelovers of
educationandknowledge ,
To myrespected Dr.FalahHassan,
To mybelovedPalestinethatembracedme allthese years,
To all thosewho contributedin thesuccess ofthis work.
iv
ACKNOWLEDGMENTS
We would like to express our gratitude for everyone who helped us during the graduation project starting
with endless thanks for our supervisor Dr. Falah Hassan who didn’t keep any effort in encouraging us to do a
great job, providing our group with valuable information and advices to be better each time. Thanks for the
continuous support and kind communication which had a great effect regarding to feel interesting about
what we are working on
I would like to express my gratitude towards my parents for their encouragement which help me in
completion of this project.
I would like to express my special gratitude and thanks to industry persons for giving me such attention and
time.
My thanks and appreciations also go to my colleagues in developing the project and people who have
willingly helped me out with their abilities.
v
TABLE OF CONTENTS
ACKNOWLEDGMENTS.............................................................................Error! Bookmark not defined.
LIST OF APPREVIATIONS..........................................................................Error! Bookmark not defined.
TABLE OF CONTENTS ..........................................................................................................................v
INTRODUCTION......................................................................................Error! Bookmark not defined.
1.1 - Introduction................................................................................Error! Bookmark not defined.
1.2 - Objectives...............................................................................................................................2
1.3 - Project scope ..............................................................................Error! Bookmark not defined.
1.4 –Plan of actions.........................................................................................................................3
1.5 – Home control system..............................................................................................................3
SYSTEMANALYSIS...............................................................................................................................4
2.1 - Introduction............................................................................................................................5
2.2 – Case study..............................................................................................................................6
2.3 – System actors.........................................................................................................................6
2.4 – Systemelement......................................................................................................................8
2.5 – System benefits......................................................................................................................8
APPLICATIONSANA CONNECTIONS....................................................................................................10
3.1 - Applications..........................................................................................................................11
3.2 – Connections .........................................................................................................................20
DESIGN AND OPERATION..................................................................................................................23
4.1 – System algorithm and microcontroller tasks...........................................................................24
4.2 – Flow chart............................................................................................................................25
4.3 – Final design .........................................................................................................................27
PROJECT COMPONENTS....................................................................................................................28
5.1 Mechanical devices .................................................................................................................29
Program Code……………………………………………………………………………………………………………………………………………… 43
Conclusions and project future..........................................................................................................48
References.......................................................................................................................................48
6
INTRODUCTION
1.1 – Introduction
As the amount of controllable fittings and domestic appliances in the home rises, the ability of these devices to
interconnect and communicate with each other digitally becomes a usefuland desirable feature. The
consolidation of control or monitoring signals from appliances, fittings or basic services is an aim of Home
automation.
In simple installations this may be as straightforward as turning on the lights when a person enters the room. In
advanced installations, rooms can sense not only the presence of a person inside but know who that person is
and perhaps set appropriate lighting, temperature, music levels or television channels, taking into account the
day of the week, the time of day, and other factors.
Other automated tasks may include setting the air conditioning to an energy saving setting when the house is
unoccupied, and restoring the normal setting when an occupant is about to return. More sophisticated systems
can maintain an inventory of products, recording their usage through an RFID tag, and prepare a shopping list
or even automatically order replacements.
An example of a remote monitoring implementation of home automation could be when a smoke
detector detects a fire or smoke condition, and then all lights in the house will blink to alert any occupants of
the house to the possible fire. If the house is equipped with a home theatre, a home automation system can shut
down all audio and video components to display the alert or make an audible announcement. The system could
also call the home owner on their mobile phone to alert them, or call the fire brigade or alarm monitoring
company to bring it to their attention
1.2 – Objectives
the main objective of our project is to make it easy to every one to contact with his/her home and
controlling there HWs; without being at home saving there time in an efficiency way.
1.3 - project scope:
These days everyone is connected with the world using electrical devices and amazingly sensor aremost
commonly used electrical device. Today most of the electricaldevices can get connected to the sensors
access the pc. So now a days programmers and designers become to develop a device application which is an
application that use a set of technologies and specifications developed for small devices like pc, etc..
7
our idea came from developing an old project that was about controlling the hardware by the remote control
that was made in our University, so we thought that it will be a good idea to implement it as a new idea in
our graduation projects because the smart home become an important part in every one’s life and it can
make it easy for everybody to accomplish many things by using it.
We implement it by simulating the house hardware using special materials also we aredeveloping a device
application.
1.4 - Plan of actions:
. Then we decide what we need to start developing our idea, we started with determining the hardware that
we will need then starting to build the hard warepart and testing it. The second step is programming.
1.5- Home Control System:
SH is application developed using electrical device. its aim is to control home devices by sensor , the user
request our application using his/her device then he/she has to login (enter his/her user name and password)
after that he can select an item of the menu to control either the home devices .
8
CHAPTER TWO
System Analysis
9
System Analysis
2.1 – Introduction
Smart home is the residential extension of building automation. It is automation of the home,
housework or household activity. Home automation may include centralized control of
lighting, HVAC (heating, ventilation and air conditioning), appliances, security locks of gates and
doors and other systems, to provide improved convenience, comfort, energy efficiency and
security. Home automation for the elderly and disabled can provide increased quality of life for
persons who might otherwise require caregivers or institutional care.
The popularity of home automation has been increasing greatly in recent years due to much higher
affordability and simplicity through smart phone and tablet connectivity. The concept of the
"Internet of Things" has tied in closely with the popularization of home automation.
A home automation system integrates electrical devices in a house with each other. The techniques
employed in home automation include those in building automation as well as the control of
domestic activities, such as home entertainment systems, houseplant and yard watering, pet
feeding, changing the ambiance "scenes" for different events (such as dinners or parties), and the
use of domestic robots. Devices may be connected through pc .
Automated homes of the future have been staple exhibits for World's Fairs and popular backgrounds
in science fiction. However, problems with complexity, competition between vendors, multiple
incompatible standards, and the resulting expense have limited the penetration of home automation
to homes of the wealthy or ambitious hobbyists. Possibly the first "home computer" was an
experimental home automation.
10
2.2 - Case Study (Legacy System) :
The idea of our system came from an old system which is controlling the house devices using the remote
control so the user can be able to control the devices only from inside the house .Because of this, we
create our system which is controlling the house devices by using the sensor and electrical device
application which we can browse it on the pc that provide the ability of controlling the house devices
from inside and outside the house
2.3 – SystemActors:-
1. Microcontroller
2. Electrical device
3. Sensors.
4. Arduino
2.4 – System Use Cases
1. We create a password system
2. If valid password, the system works and if wrong does not work
3. after that information reach to Adriano
4. Adriano sends orders to sensors to work
2.4 - Systemelements
Elements of a home automation system include sensors (such as temperature, daylight, or motion
detection), controllers (such as a general-purpose personal computer or a dedicated automation
controller) and actuators, such as motorized valves, light switches, motors, and others.
One or more human-machine interface devices are required, so that the residents of the home can
interact with the system for monitoring and control; this may be a specialized terminal or,
increasingly.
11
Building automation networks developed for institutional or commercial buildings may be adapted to
control in individual residences. A centralized controller can be used, or multiple intelligent devices
can be distributed around the home
2.5-Systembenefits:
Home automation refers to the use of electrical device and information technology to control home
appliances and features (such as windows or lighting). Systems can range from simple remote control
of lighting through to complex computer/micro-controller based networks with varying degrees of
intelligence and automation. Home automation is adopted for reasons of ease, security and energy
efficiency.
As the number of controllable devices in the home rises, interconnection and communication becomes a
useful and desirable feature. For example, a furnace can send an alert message when it needs
cleaning or a refrigerator when it needs service. If no one is supposed to be home and the alarm
system is set, the home automation system could call the owner, or the neighbors, or an emergency
number if an intruder is detected.
In simple installations, automation may be as straightforward as turning on the lights when a person
enters the room. In advanced installations, rooms can sense not only the presence of a person inside
but know who that person is and perhaps set appropriate lighting, temperature, music levels or
television channels, taking into account the day of the week, the time of day, and other factors.
Other automated tasks may include reduced setting of the heating or air conditioning when the house is
unoccupied, and restoring the normal setting when an occupant is about to return. More
sophisticated systems can maintain an inventory of products, recording their usage through bar
codes, or an RFID tag, and prepare a shopping list or even automatically order replacements.
12
CHAPTER Three
Application
&
Connection
13
Applications and Connections
3.1 Applications
1. Lighting system:
Not it is nice to have a room lighting his conception of the igniting and turn on the lights in your room when
you go out or enter the room! In this project we will turn this idea into reality through the use of Adriano
In this project we will use Motion Sensor (PIR Sensor) to detect any movement that occurs in a specific orbit
diameter feet, which can be made of the movement at a distance. We will be using the relay also reached
the room lamps, for example, the role of the relay electricity to control the lights. And, of course Adriano
which is the heart of the project we will program it simple orders to be his mission successfully. This projects
a great way to learn how to receive information from Adriano and build on them to give other orders.
Components of lighting system:
 Microcontroller(Adriano)
 Motion sensor (PIR sensor)
 LDR Sensor
 Relay
 lamp
14
2. Cooling and heating system
Heat and cooling system works categorize the principle that the temperature sensor, the temperature sensor is
to send a message to the Adriano there it send to fan to work to operate where the temperature sensor
programmed categorize certain temperature, for example 25 in the temperature rose about it, the fan is
working.
Components of cooling and heating system
 Temperature sensor
 Adriano
 Fan
 Buzzer
 MQ_6 sensor (gas sensor)
3. Water system
Let’s start with ultrasonic sensor accurately between him and objects in front of him he is sending
ultrasonic signals and in the case of these signals moved from the center to the center of another
reflected some of these signals to the delicate job by calculating the time required to return signal
and because the speed of these signals in a vacuum constant we can ultrasonic we can the of the
calculate the distance traveled wave.
Components of cooling and heating system
 Ultrasonic sensor
 Dc pump
 Tube
15
4. Security system
Exploit the connection keypad seven exits from an each of us knows rose Adriano and
here lies.The problem in the large number of party's user
With keypad but I wantthat these parties be available to me for use with motors,
valves and send data.To the screen
Components of security system
1. Keypad
2. Buzzer
3.2 Sensor Connection
1- Lm35 with Adriano
Figure 3.3: lm35 with Arduino
16
Using the lm35 is easy; simply connect the left pin to power (2.7-5.5V) and the right pin to ground. Then the
middle pin will have an analog voltage that is directly proportional (linear) to the temperature. The analog
voltage is independent of the power supply.
To convert the voltage to temperature, simply use the basic formula:
Temp in °C = (Vout in mV) / 10
2- Relay with Adriano
Figure 3.5: Relay with Arduino
To connect the Relay board to an Arduino is very easy and allows you to turn on and off an wide range of
devices, both AC and DC. The first to connections are the ground and power pins, you need to connect the
Arduino +5 v to the Relay board VCC pin and the Arduino ground to the Relay board GND pin. Then it's a only a
matter of just connecting the communication pins, labeled IN1, two 4 data pins on
the Arduino
17
3- LDR with Adriano
Figure 3.4: LDR sensor with Arduino
Below is the Arduino Sketch. In this sketch we are simply turning on the built-in LED if the ADC value drops
below a specific value. To make a nightlight, a brighter led (with limiting resistor ~220 ohms) can be
connected to the pin 13 output.
In the code you will notice that there are some serial output statements that are commented out. If you
uncomment these you will see on the serial monitor the current value of the voltage being read by the Arduino
ADC input. This value is between 0 and 1024. Cover the LDR with your hand and shine a light on it to see the
effect.
18
4- Ultrasonic sensor with Adriano
Figure 3.4: Ultrasonic sensor with Arduino
When I first received an ultrasonic sensor I was not happy with how poorly it performed. I soon realized
the problem wasn't the sensor; it was the available ping and ultrasonic libraries causing the problem. The
New Ping library totally fixes these problems, adds many new features, and breathes new life into these
very affordable distance sensors.
19
5- Motion sensor with Arduino
Figure 3.4: PIR with Adriano
Connectionsare as follows
 PIR Pin “+” connectsto Arduino +5
 PIR Pin “-” connectsto Arduino GND
 PIR Pin “out” connectsto Arduino Digital 2
20
6- Keypad with Arduino
Figure 3.4: Keypad with Arduino
21
Keypads are everywhere; on your cell phone, on your TV remotes, on your stereo and now on your Arduino.
Wait…. Why do you want a keypad on your Arduino? Well it’s a pretty useful device to input numbers and
letters (example: telephones), it can also be used for security measures like a keypad door lock, and it’s prefect
when you need a low-cost and accessible interface for your next idea. After all, It wouldn’t be practical to use
a single button or a potentiometer to input your Pin on an ATM. So for this tutorial, we will be going over
Spark fun’s 12 buttons keypad (0-9, #, *), and get you all set up with some code and schematic too.
The buttons on this particular keypad are setup in a 3X4 matrix format so we only need 7 pins to detect the
pressing of 12 keys. For example, when you hit the number 3 pins 5&2 are connected, 6 connects pins 5&7
and 9 connects 5&6. So in code we just look for the combination and we know what button is being pressed.
So in simple terms, if pins 5 and 2 (of the keypad) are signaling the arduino, it means that button 3 has been
pressed – It is setup like this to minimize the number of pins needed to controlthe keypad.
7- Smoke (MQ-6) with Adriano
This is a simple-to-use liquefied petroleum gas (LPG) sensor, suitable for sensing LPG (composed
of mostly propane and butane) concentrations in the air. The MQ-6 can detect gas concentrations
anywhere from 200 to 10000ppm.
This sensor has a high sensitivity and fast response time. The sensor’s output is an analog
resistance. The drive circuit is very simple; all you need to do is power the heater coil with 5V, add a
load resistance, and connect the output to an ADC.
This sensor comes in a package similar to our MQ-3 alcohol sensor, and can be used with the
breakout board below.
Features It has good sensitivity to flammable gas (especially propane) in wide range, and has advantages such
as long lifespan, low cost and simple drive circuit &etc.
22
Figure 3.5: Gas sensor with Adriano
23
CHAPTER FOUR
DESIGN
&
OPERATION
24
DESIGN AND OPERATION
4.1 – System algorithm and microcontroller tasks
Figure 4.1: Microcontroller tasks
Put the password
The electrical device and
sensor is active
The system is active
Control the device
25
4.2 – Flow Chart
26
4.3 – Final project
27
CHAPTER FIVE
PROJECT
COMPONENTS
28
PROJECT COMPONENTS
5.1 Mechanical devices:
1. fan
Brushless DC fan be driven by brushless DC motor and change direction electrically depending on holl
unit: its material is PBT-UL94Vo; has long life and low noise; and is mainly used in heat dispersion of
induction cooker, computer and home electric appliance. There are many types, YHWF-120, YHWF-
12025, YHWF-8025, and YHWF-4010.ect
The specification for this fan is as following:
 Model Number: YHWF-9025
 Size: 90*90*25mm
 Voltage: 5 ~ 24V DC
 Material : Plastic
 Rated speed: 1500 ~ 6000RPM
 Bearing: Sleeve or Ball Bearing
 Noise: Less than 30 dB
With the Hall sensor and over current protection.
We can make this DC fan if the user requires the non-standard specification
Figure 5.1: DC van.
29
2. Adriano Uno
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet) It has 14 digital
input/output pins (of which 6 can be used as PWM outputs),6 analog inputs, a 16 MHz ceramic
resonator, 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 Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip.
Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial
converter.
Revision 2 of the Uno board has a resistor pulling the 8U2 HWB line to ground, making it easier to
put into DFU mode.
Revision 3 of the board has the following new features:
1.0 Pin out: added SDA and SCL pins that are near to the AREF pin and two other new pins placed
near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided from
the board. In future, shields will be compatible with both the board that uses the AVR, which
operates with 5V and with the Arduino Due that operates with 3.3V. The second one is a not
connected pin that is reserved for future purposes.
Stronger RESET circuit.
At mega 16U2 replace the 8U2.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno and
version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest in a
series of USB Arduino boards, and the reference model for the Arduino platform; for a comparison
with previous versions, see the index of Arduino boards.
30
Summary
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
DigitalI/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328) of which 0.5 KB used by bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MHz
Power
The Arduino Uno can be powered via the USB connection or with an external power supply. The power source
is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can
be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can
be inserted in the GND and Vin pin headers of the POWER connector.
31
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V
pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage
regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
The power pins are as follows:
 VIN. The input voltage to the Arduino board when it's using an external power source (as opposed to 5 volts
from the USB connection or other regulated power source). You can supply voltage through this pin, or, if
supplying voltage via the power jack, access it through this pin.
 5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power
either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V).
Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't
advise it.
 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
 GND. Ground pins.
IOREF. This pin on the Arduino board provides the voltage reference with which the microcontroller
operates. A properly configured shield can read the IOREF pin voltage and select the appropriate power
source or enable voltage translators on the outputs for working with the 5V or 3.3V
Memory
The ATmega328 has 32 KB (with 0.5 KB used for the boot loader). It also has 2 KB of SRAM and 1 KB of
EEPROM (which can be read and written with the EEPROM library).
Input and Output
Each of the 14 digital pins on the Uno can be used as an input or output, using pin Mode (), digital Write (),
and digital Read () functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA
and has an internal pull-up resistor (disconnected by default) of (20-50) kΩ. In addition, some pins have
specialized functions:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to
the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising or
falling edge, or a change in value. See the attach Interrupt () function for details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog Write () function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using the SPI library.
32
LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when
the pin is LOW, it's off.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e. 1024
different values). By default they measure from ground to 5 volts, though is it possible to change the upper
end of their range using the AREF pin and the analog Reference () function. Additionally, some pins have
specialized functionality:
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.
There are a couple of other pins on the board:
AREF. Reference voltage for the analog inputs. Used with analog Reference ().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which
block the one on the board.
See also the mapping between Arduino pins and ATmega328 ports. The mapping for the Atmega8, 168, and
328 is identical.
Communication
The Arduino Uno has a number of facilities for communicating with a computer, another Arduino, or other
microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which is available on digital
pins 0 (RX) and 1 (TX).
An ATmega16U2on the board channels this serial communication over USB and appears as a virtual com port
to software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no external driver
is needed. However, on Windows, and if file is required. The Arduino software includes a serial monitor
which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board
will flash when data is being transmitted via the USB-to-serial chip and USB connection to the computer (but
not for serial communication on pins 0 and 1).
A Software Serial library allows for serial communication on any of the Uno's digital pins.
33
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire
library to simplify use of the I2C bus; see the documentation for details. For SPI communication, use the SPI
library.
Programming
The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino Uno from
the Tools > Board menu (according to the microcontroller on your board). For details, see
the reference and tutorials.
The ATmega328 on the Arduino Uno comes pre-burned with a boot loader that allows you to upload new
code to it without the use of an external hardware programmer. It communicates using the
original STK500 protocol (reference, C header files).
You can also bypass the boot loader and program the microcontroller through the ICSP (In-Circuit Serial
Programming) header; see these instructions for details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available.
The ATmega16U2/8U2 is loaded with a DFU boot loader, which can be activated by:
On Rev1 boards: connecting the solder jumper on the back of the board (near the map of Italy) and then
resetting the 8U2.
On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground, making it easier to
put into DFU mode.
You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and Linux) to load a
new firmware. Or you can use the ISP header with an external programmer (overwriting the DFU boot
loader). See this user-contributed tutorial for more information.
Automatic (Software) Reset
Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is designed in a
way that allows it to be reset by software running on a connected computer. One of the hardware flow
control lines (DTR) of theATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100 Nano-
farad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The
Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the
34
Arduino environment. This means that the boot loader can have a shorter timeout, as the lowering of DTR
can be well-coordinated with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer running Mac OS X or
Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or
so, the boot loader is running on the Uno.
While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will
intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the
board receives one-time configuration or other data when it first starts, make sure that the software with
which it communicates waits a second after opening the connection and before sending this data.
The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can be
soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by
connecting a 110 ohm resistor from 5V to the reset line; see this forum thread for details.
USB Overcurrent Protection
The Arduino Uno has a resettable poly fuse that protects your computer's USB ports from shortsand
overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer
of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break the
connection until the short or overload is removed.
Physical Characteristics
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the USB connector
and power jack extending beyond the former dimension. Four screw holes allow the board to be attached to
a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"), not an even multiple
of the 100 mil spacing of the other pins.
35
Figure 5.2: arduino Uno
3. Relay
A relay is automatic device which senses an abnormal condition of electrical circuit and closes its
contacts. Thesecontacts in turns closeand complete thecircuit breaker trip coil circuit hence make
the circuit breaker tripped for disconnecting the faulty portion of the electrical circuit from rest of
the healthy circuit.
Now let’s have a discussion on some terms related to protective relay
Pickup level of actuating signal: The value of actuating quantity (voltage or current) which is on
threshold above which the relay initiates to be operated.
If the value of actuating quantity is increased, the electromagnetic effect of the relay coil is
increased and above a certain level of actuating quantity the moving mechanism of the relay just
starts to move.
Reset level: The value of current or voltage below which a relay opens its contacts and comes in
original position.
36
Operating Time of Relay - Just after exceeding pickup level of actuating quantity the moving
mechanism (for example rotating disc) of relay starts moving and it ultimately close the relay
contacts at the end of its journey. The time which elapses between the instant when actuating
quantity exceeds the pickup value to the instant when the relay contacts close.
 Reset time of Relay – The time which elapses between the instant when the actuating
quantity becomes less than the reset valueto the instant when the relay contacts returns
to its normal position.
 Reach of relay – A distancerelay operates whenever the distance seen by the relay is less
than the pre-specified impedance. The actuating impedance in the relay is the function of
distancein a distanceprotection relay. This impedanceor corresponding distanceis called
reach of the relay.
Power system protection relays can be categorized into different Types of relays.
Types of protection relays are mainly based on their characteristic, logic, on actuating parameter and
operation mechanism.
Figure 5.3: relay
37
4. LM35
is a precision IC temperature sensor with its output proportional to the temperature (in OC). The
sensor circuitry is sealed and therefore it is not subjected to oxidation and other processes. With
LM35, temperature can be measured more accurately than with a thermistor. It also possess low
self heating and does not cause more than 0.1 OC temperature rise in still air.
The operating temperature range is from -55°C to 150°C. The output voltage varies by 10mV in
response to every OC rise/fall in ambient temperature, i.e., its scale factor is 0.01V/ OC.
Pin Diagram:
Figure 5.4: lm35
38
5. Lamp
A lamp is a replaceable component such as an incandescent light bulb, which is designed to
produce light from electricity. These components usually have a base of ceramic, metal, glass or
plastic, which makes an electrical connection in the socket of a light fixture. This connection may be
made with a screw-thread base, two metal pins, two metal caps or a bayonet cap.
Types
There are several types of lamp:
 Incandescent lamp, a heated filament inside a glass envelope
 Halogen lamps use a fused quartz envelope, filled with halogen gas
 LED lamp, a solid-state lamp that uses light-emitting diodes (LEDs) as the source of light
 Laser diode lamp
 Arc lamp
 Xenon arc lamp
 Mercury-xenon arc lamp
 Ultra-high-performance lamp, an ultra-high-pressure mercury-vapor arc lamp for use
in projectors
 Metal-halide lamp
 Gas-discharge lamp, a light source that generates light by sending an electrical
discharge through an ionized gas
 Fluorescent lamp
 Compact fluorescent lamp, a fluorescent lamp designed to replace an incandescent lamp
 Neon lamp
 Mercury-vapor lamp
 Sodium-vapor lamp
 Sulfur lamp
 Electrode less lamp, a gas discharge lamp in which the power is transferred from outside
the bulb to inside via electromagnetic fields
39
Lamp circuit symbol
6. LDR
Photocells are sensors that allow you to detect light. They are small, inexpensive, low-power, easy to use and
don't wear out. For that reason they often appear in toys, gadgets and appliances. They are often referred to
a CDS cells (they are made of Cadmium-Sulfide), light-dependent resistor (LDR), and photo-resistors.
A Photocell is basically a resistor that changes its resistive value (in ohms) depending on how much light is
shining onto the squiggly face. They are very low cost, easy to get in many sizes and specifications, but are
very inaccurate. Each photocell sensor will act a little differently than the other, even if they are from the
same batch. The variations can be really large, 50% or higher! For this reason, they shouldn't be used to try to
determine precise light levels in Lux or mill candela. Instead, you can expect to only be able to determine
basic light changes
For most light-sensitive applications like "is it light or dark out", "is there something in front of the sensor
(that would block light)", "is there something interrupting a laser beam" (break-beam sensors), or "which of
multiple sensors has the most light hitting it", photocells can be a good choice! As its name implies, the Light
Dependent Resistor (LDR)is made from a piece of exposed semiconductor material such as cadmium
sulphide that changes its electrical resistance from several thousand Ohms in the dark to only a few hundred
Ohms when light falls upon it by creating hole-electron pairs in the material.
The net effect is an improvement in its conductivity with a decrease in resistance for an increase in
illumination. Also, photo-resistive cells have a long intensity.
Materials used as the semiconductor substrate include, lead sulphide (PbS), lead selenide (PbSe), indium
antimonite (In SB) which detect light in the infra-red
Range with the most commonly used of all photo resistive light sensors being Cadmium Sulphide (Cds).
40
Cadmium supplied is used in the manufacture of photoconductive cells because its spectral response curve
closely matches that of the human eye and can even be controlled using a simple torch as a light source.
Typically then, it has a peak sensitivity wavelength (λp) of about 560nm to 600nm in the visible spectral
range.
Figure 5.5 LDR
7. Motion Sensor
PIR sensors allow you to sense motion, almost always used to detect whether a human has moved in or out of
the sensors range. They are small, inexpensive, low-power, easy to use and don't wear out. For that reason they
are commonly found in appliances and gadgets used in homes or businesses. They are often referred to as PIR,
"Passive Infrared", "Piezoelectric", or "IR motion" sensors.
PIRs are basically made of a piezoelectric sensor (which you can see above as the round metal can with a
rectangular crystal in the center), which can detect levels of infrared radiation. Everything emits some low
level radiation, and the hotter something is, the more radiation is emitted. The sensor in a motion detector is
actually split in two halves. The reason for that is that we are looking to detect motion (change) not average IR
levels. The two halves are wired up so that they cancel each other out. If one half sees more or less IR radiation
than the other, the output will swing high or low.
Along with the pyroelectic sensor is a bunch of supporting circuitry, resistors and capacitors. It seems that
most small hobbyist sensors use the BISS0001 ("Micro Power PIR Motion Detector IC"), undoubtedly a very
41
inexpensive chip. This chip takes the output of the sensor and does some minor processing on it to emit a
digital output pulse from the analog sensor
 Output: Digital pulse high (3V) when triggered (motion detected) digital low when idle (no motion
detected). Pulse lengths are determined by resistors and capacitors on the PCB and differ from sensor
to sensor.
 Sensitivity range: up to 20 feet (6 meters) 110° x 70° detection range
 Power supply: 3V-9V input voltage, but 5V is ideal.
Figure 5.6: PIR sensor
8. Ultrasonic sensor
Ultrasonic sensor provides an easy method of distance measurement. This sensor is perfect for any number of
applications that require you to perform measurements between moving or stationary objects. Interfacing to a
microcontroller is a snap. A single I/O pin is used to trigger an ultrasonic burst (well above human hearing)
and then "listen" for the echo return pulse. The sensor measures the time required for the echo return, and
returns this value to the microcontroller as a variable-width pulse via the same I/O pin.
Key Features:
 Provides precise, non-contact distance measurements within a 2 cm to 3 m range
 Ultrasonic measurements work in any lighting condition, making this a good choice to supplement infrared
object detectors
 Simple pulse in/pulse out communication requires just one I/O pin
 Burst indicator LED shows measurement in progress
 3-pin header makes it easy to connect to a development board, directly or with an extension cable, no soldering
required
42
 Application Ideas:
 Security systems
 Interactive animated exhibits
 Parking assistant systems
 Robotic navigation
Figure 5.7: ultrasonic sensor
9. Gas Sensor (MQ-6)
Description: This is a simple-to-use liquefied petroleum gas (LPG)sensor, suitable for sensing LPG
(composed of mostly propane and butane) concentrations in the air. The MQ-6 can detect gas
concentrations anywhere from 200 to 10000ppm.
This sensor has a high sensitivity and fast response time. The sensor’s output is an analog resistance.
The drive circuit is very simple; all you need to do is power the heater coil with 5V, add a load
resistance, and connect the output to an ADC.
43
FEATURES:
* High sensitivity to LPG, iso-butane, propane
* Small sensitivity to alcohol, smoke.
* Fast response.
* Stable and long life
* Simple drive circuit
APPLICATION:
They are used in gas leakage detecting equipments in family and industry, are suitable for detecting of LPG,
so-butane, propane, LNG, avoid the noise of alcohol and cooking fumes and cigarette smoke.
Figure 5.8: gas MQ-6 sensor
44
10. Dc pump
It is operated by an electric motor and related panel board the same way as it relates to other engines.
Water enters the pump through the bottom hole and come out of the tube that protrudes from the side of the
pump. Related to this plastic tube pipe to transport water to where you want.
Figure 5.9: dc pump
45
CONCLUSIONS AND PROJECT
FUTURE
In This project the user use our application. The user computer must be a server and the user has to have an
account in a company , then he/she can browse our electrical application from his/her pc device.After
browsing our device, the first page will appear is login page.
everything we implement and use in this project we have not a previous idea about it so this is took from us
some time to learn about everything we want to do before do it, and we don't consider this as a problem at all
instead we are thankful for having this opportunity of learning.
we developed our application under limited time in addition there is a several problems faced us as mentioned
before, so it has not all features and capabilities that can be obtained, so we do a future development plan in
order to develop our application.
46
References
[1] http://en.wikipedia.org/wiki/Home_automation
[2] http://arduino.cc/en/Main/arduinoBoardUno
[3] http://forum.arduino.cc/index.php?topic=120666.0
[4] http://en.wikipedia.org/wiki/Relay
[5] http://electronics.howstuffworks.com/relay.htm
47
Program Code
#include <Keypad.h>
#include <Password.h>
#include <NewPing.h>
#define LIGHT1 A4
#define LIGHT2 A5
#define ECHO_PIN 11 // Arduino pin tied to echo pin on the ultrasonic
sensor.
#define TRIGGER_PIN 10 // Arduino pin tied to trigger pin on the
ultrasonic sensor.
#define MAX_DISTANCE 200 // Maximum distance we want to ping for (in
centimeters). Maximum sensor distance is rated at 400-500cm.
#define FAN 13
#define TEMP A0
#define LDR A1
#define SMOKE A2
#define PUMP A3
#define BUZZER 12
#define PIR 9
String newPasswordString; //hold the new password
char newPassword[6]; //charater string of newPasswordString
Password password = Password( "0599" );
char key;
byte maxPasswordLength = 6;
byte currentPasswordLength = 0;
const byte ROWS = 4; // Four rows
const byte COLS = 3; // Four columns
//Define the keymap
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}
};
//// Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.
byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to column pinouts
// Connect keypad COL0, COL1, COL2 and COL3 to these Arduino pins.
byte colPins[COLS] = {8, 7, 6}; //connect to row pinouts
48
// Create the Keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of
pins and maximum distance.
boolean AlarmStatus=true;
void setup() {
pinMode(LIGHT1, OUTPUT);
pinMode(LIGHT2, OUTPUT);
pinMode(FAN, OUTPUT);
pinMode(PUMP, OUTPUT);
pinMode(PIR, INPUT);
pinMode(BUZZER, OUTPUT);
Serial.begin(9600);
Serial.print("Enter PassWord:");
}
void loop() {
// Serial.print("Alarm Status: ");
//Serial.println(AlarmStatus);
Serial.print("Enter PassWord:");
while (AlarmStatus==false){
key = keypad.getKey();
if (key != NO_KEY)break;
TempSensor();
SmokeSensor();
DistanceSensor();
LightSensor();
digitalWrite(LIGHT2,HIGH);
}
while (AlarmStatus==true){
key = keypad.getKey();
if (key != NO_KEY)break;
MotionSensor();
SmokeSensor();
}
if (key != NO_KEY){
delay(60);
switch (key){
case 'A': break;
case 'B': break;
case 'C': break;
case 'D': changePassword(); break;
case '#': checkPassword(); break;
case '*': resetPassword(); break;
default: processNumberKey(key);
}
49
}
}
void processNumberKey(char key) {
Serial.print(key);
Serial.print("*");
currentPasswordLength++;
password.append(key);
if (currentPasswordLength == maxPasswordLength) {
checkPassword();
}
}
void checkPassword() {
if (password.evaluate()){
Serial.println(" OK.");
if (AlarmStatus==false){
AlarmStatus=true;
}
else if (AlarmStatus==true){
AlarmStatus=false;
}
Serial.print("Enter PassWord:");
} else {
Serial.println(" Wrong passwowrd!");
Serial.print("Enter PassWord:");
}
resetPassword();
}
void resetPassword() {
password.reset();
currentPasswordLength = 0;
}
void changePassword() {
newPasswordString = "0599";
newPasswordString.toCharArray(newPassword,
newPasswordString.length()+1); //convert string to char array
password.set(newPassword);
resetPassword();
Serial.print("Password changed to ");
Serial.println(newPasswordString);
}
void TempSensor( )
{
// read the sensor:
float Temp = analogRead(TEMP);
50
float TempValue =(Temp*5.0)/1024;
float cel = (TempValue)*100;
Serial.print("Temp Value: ");
Serial.println(cel);
if(cel >35){
digitalWrite(FAN,HIGH); //fan ON
}
else{
digitalWrite(FAN,LOW); // fan OFF
}
}
void SmokeSensor( )
{
int SmokeValue = analogRead(SMOKE);
Serial.print("Smoke Value: ");
Serial.println(SmokeValue);
if(SmokeValue >800){
digitalWrite(BUZZER,HIGH); //fan ON
}
else{
digitalWrite(BUZZER,LOW); // fan OFF
}
}
void DistanceSensor() {
delay(50); // Wait 50ms between pings (about 20
pings/sec). 29ms should be the shortest delay between pings.
unsigned int uS = sonar.ping(); // Send ping, get ping time in
microseconds (uS).
Serial.print("Ping: ");
int DistanceValue =(uS / US_ROUNDTRIP_CM);
Serial.print(DistanceValue); // Convert ping time to distance in cm and
print result (0 = outside set distance range)
Serial.println("cm");
if( DistanceValue>0 && DistanceValue <=8){
digitalWrite(PUMP,LOW); //fan ON
}
else{
digitalWrite(PUMP,HIGH); // fan OFF
}
}
void MotionSensor(){
int PirValue=digitalRead(PIR);
Serial.print("PIR Value: ");
Serial.println(PirValue);
if (PirValue==1){
digitalWrite(BUZZER, HIGH);
}
else {
digitalWrite(BUZZER, LOW );
51
}
}
void LightSensor( )
{
int LdrValue = analogRead(LDR);
Serial.print("LDRValue: ");
Serial.println(LdrValue);
if (LdrValue < 400){
int PirValue=digitalRead(PIR);
if (PirValue==1){
Serial.print("PIR Value: ");
Serial.println(PirValue);
digitalWrite(LIGHT1,HIGH);
}
else{
digitalWrite(LIGHT1,LOW);
}
}
else {
digitalWrite(LIGHT1,LOW );
}
}
52

More Related Content

What's hot

Home Automation System
Home Automation SystemHome Automation System
Application of ai in home automation
Application of ai in home automationApplication of ai in home automation
Application of ai in home automation
Bharadwaj Sharma
 
IoT Home Automation System
IoT Home Automation SystemIoT Home Automation System
IoT Home Automation System
Pratibha Chaudhary
 
Home Automation System
Home Automation SystemHome Automation System
Home Automation System
Sweha Rajora
 
Home automation in client server using NodeMcu approach along with user notif...
Home automation in client server using NodeMcu approach along with user notif...Home automation in client server using NodeMcu approach along with user notif...
Home automation in client server using NodeMcu approach along with user notif...
Brundha Sholaganga
 
Home automation
Home automationHome automation
Home automation
engfaz
 
android app based home automation
android app based home automationandroid app based home automation
android app based home automationAshikur Rahman
 
Home automation
Home  automationHome  automation
Home automation
AYANMONDALDEC
 
IOT PPT
IOT PPTIOT PPT
IOT PPT
sushiljain54
 
Smart home automation system
Smart home automation systemSmart home automation system
Smart home automation system
Pawan Kumar Ganjhu
 
Home automation using_pc
Home automation using_pcHome automation using_pc
Home automation using_pc
Sumit Sonawane
 
Home automation
Home automationHome automation
Home automation
Mahendra Yadav
 
Home automation
Home    automationHome    automation
Home automation
Waseeullah Khan
 
Home System automation using android application
Home System automation using android applicationHome System automation using android application
Home System automation using android application
doaamarzook
 
home automation using esp8266
home automation using esp8266home automation using esp8266
home automation using esp8266
smit bakori
 
Smartify Home Automation - Client Presentation
Smartify Home Automation - Client PresentationSmartify Home Automation - Client Presentation
Smartify Home Automation - Client Presentation
Abhi Bavishi
 
Smart Homes: becoming a reality
Smart Homes: becoming a realitySmart Homes: becoming a reality
Smart Homes: becoming a reality
Jeffrey Funk
 
Home Automation
Home AutomationHome Automation
Home Automation
ashikul akash
 
Iot based home automation
Iot based home automationIot based home automation
Iot based home automation
geetha chandrathi
 

What's hot (20)

Home Automation System
Home Automation SystemHome Automation System
Home Automation System
 
Application of ai in home automation
Application of ai in home automationApplication of ai in home automation
Application of ai in home automation
 
IoT Home Automation System
IoT Home Automation SystemIoT Home Automation System
IoT Home Automation System
 
Smart home
Smart homeSmart home
Smart home
 
Home Automation System
Home Automation SystemHome Automation System
Home Automation System
 
Home automation in client server using NodeMcu approach along with user notif...
Home automation in client server using NodeMcu approach along with user notif...Home automation in client server using NodeMcu approach along with user notif...
Home automation in client server using NodeMcu approach along with user notif...
 
Home automation
Home automationHome automation
Home automation
 
android app based home automation
android app based home automationandroid app based home automation
android app based home automation
 
Home automation
Home  automationHome  automation
Home automation
 
IOT PPT
IOT PPTIOT PPT
IOT PPT
 
Smart home automation system
Smart home automation systemSmart home automation system
Smart home automation system
 
Home automation using_pc
Home automation using_pcHome automation using_pc
Home automation using_pc
 
Home automation
Home automationHome automation
Home automation
 
Home automation
Home    automationHome    automation
Home automation
 
Home System automation using android application
Home System automation using android applicationHome System automation using android application
Home System automation using android application
 
home automation using esp8266
home automation using esp8266home automation using esp8266
home automation using esp8266
 
Smartify Home Automation - Client Presentation
Smartify Home Automation - Client PresentationSmartify Home Automation - Client Presentation
Smartify Home Automation - Client Presentation
 
Smart Homes: becoming a reality
Smart Homes: becoming a realitySmart Homes: becoming a reality
Smart Homes: becoming a reality
 
Home Automation
Home AutomationHome Automation
Home Automation
 
Iot based home automation
Iot based home automationIot based home automation
Iot based home automation
 

Viewers also liked

Analysis optimization and monitoring system
Analysis optimization and monitoring system Analysis optimization and monitoring system
Analysis optimization and monitoring system
slmnsvn
 
Quad pod transformable vehicle
Quad pod transformable vehicleQuad pod transformable vehicle
Quad pod transformable vehicle
slmnsvn
 
Quad pod transformable vehicle
Quad pod transformable vehicleQuad pod transformable vehicle
Quad pod transformable vehicle
slmnsvn
 
Smart fuel theft detector
Smart fuel theft detectorSmart fuel theft detector
Smart fuel theft detector
slmnsvn
 
Quad pod transformable vehicle
Quad pod transformable vehicleQuad pod transformable vehicle
Quad pod transformable vehicle
slmnsvn
 
Rfid attendace system
Rfid attendace systemRfid attendace system
Rfid attendace system
slmnsvn
 
Analysis optimization and monitoring system
Analysis optimization and monitoring system Analysis optimization and monitoring system
Analysis optimization and monitoring system
slmnsvn
 
Smart fuel theft detector
Smart fuel theft detectorSmart fuel theft detector
Smart fuel theft detector
slmnsvn
 
My Final Year Project - Individual Control Home Automation System
My Final Year Project - Individual Control Home Automation SystemMy Final Year Project - Individual Control Home Automation System
My Final Year Project - Individual Control Home Automation System
Michael Olafusi
 

Viewers also liked (9)

Analysis optimization and monitoring system
Analysis optimization and monitoring system Analysis optimization and monitoring system
Analysis optimization and monitoring system
 
Quad pod transformable vehicle
Quad pod transformable vehicleQuad pod transformable vehicle
Quad pod transformable vehicle
 
Quad pod transformable vehicle
Quad pod transformable vehicleQuad pod transformable vehicle
Quad pod transformable vehicle
 
Smart fuel theft detector
Smart fuel theft detectorSmart fuel theft detector
Smart fuel theft detector
 
Quad pod transformable vehicle
Quad pod transformable vehicleQuad pod transformable vehicle
Quad pod transformable vehicle
 
Rfid attendace system
Rfid attendace systemRfid attendace system
Rfid attendace system
 
Analysis optimization and monitoring system
Analysis optimization and monitoring system Analysis optimization and monitoring system
Analysis optimization and monitoring system
 
Smart fuel theft detector
Smart fuel theft detectorSmart fuel theft detector
Smart fuel theft detector
 
My Final Year Project - Individual Control Home Automation System
My Final Year Project - Individual Control Home Automation SystemMy Final Year Project - Individual Control Home Automation System
My Final Year Project - Individual Control Home Automation System
 

Similar to Smart home

Project Report Webcasa Final(1)
Project Report Webcasa Final(1)Project Report Webcasa Final(1)
Project Report Webcasa Final(1)Abhijeet Rawat
 
Automation home(eee499.blogspot.com)
Automation home(eee499.blogspot.com)Automation home(eee499.blogspot.com)
Automation home(eee499.blogspot.com)
slmnsvn
 
Table of contents
Table of contentsTable of contents
Table of contents
MUHAMMAD KHURSHID AHMAD
 
Home automation using blynk app with fan direction control and displaying sta...
Home automation using blynk app with fan direction control and displaying sta...Home automation using blynk app with fan direction control and displaying sta...
Home automation using blynk app with fan direction control and displaying sta...
Diwash Kapil Chettri
 
WEB BASED REAL TIME CONTROL AND HOME AUTOMATION SYSTEM
WEB BASED REAL TIME CONTROL AND HOME AUTOMATION SYSTEMWEB BASED REAL TIME CONTROL AND HOME AUTOMATION SYSTEM
WEB BASED REAL TIME CONTROL AND HOME AUTOMATION SYSTEM
ATHUL RAJ.R
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasad
aditya806802
 
PROJECT REPORT ON Home automation using by Bluetooth
 PROJECT REPORT ON Home automation using by Bluetooth PROJECT REPORT ON Home automation using by Bluetooth
PROJECT REPORT ON Home automation using by Bluetooth
Aakashkumar276
 
Home Automation System using Arduino and Android
Home Automation System using Arduino and AndroidHome Automation System using Arduino and Android
Home Automation System using Arduino and AndroidMuhammad Ayesh
 
IRJET-Smart Home Automation System using Mobile Application
IRJET-Smart Home Automation System using Mobile ApplicationIRJET-Smart Home Automation System using Mobile Application
IRJET-Smart Home Automation System using Mobile Application
IRJET Journal
 
Message based home automation & security system
Message based home automation  & security systemMessage based home automation  & security system
Message based home automation & security system
Jahid Hassan
 
Gsm based home security system
Gsm based home security systemGsm based home security system
Gsm based home security system
Narayan Gour
 
Smart home automation towards the development of smart cities
Smart home automation towards the development  of smart citiesSmart home automation towards the development  of smart cities
Smart home automation towards the development of smart cities
CSITiaesprime
 
A Short Review on the Perspective of Home Automation Technology
A Short Review on the Perspective of Home Automation TechnologyA Short Review on the Perspective of Home Automation Technology
A Short Review on the Perspective of Home Automation Technology
IRJET Journal
 
home automatrion
home automatrionhome automatrion
home automatrion
PerumalRaja12
 
System
SystemSystem
System
AhshanZishan
 
Home automation proposal
Home automation proposalHome automation proposal
Home automation proposal
HazratBilal82
 
Final Year Project Report Device Control using sms
Final Year Project Report Device Control using smsFinal Year Project Report Device Control using sms
Final Year Project Report Device Control using smsMuhammad Shakeel
 
IoT Based Home Automation System_revised_27_06_2021.pptx
IoT Based Home Automation System_revised_27_06_2021.pptxIoT Based Home Automation System_revised_27_06_2021.pptx
IoT Based Home Automation System_revised_27_06_2021.pptx
CUInnovationTeam
 

Similar to Smart home (20)

Project Report Webcasa Final(1)
Project Report Webcasa Final(1)Project Report Webcasa Final(1)
Project Report Webcasa Final(1)
 
Automation home(eee499.blogspot.com)
Automation home(eee499.blogspot.com)Automation home(eee499.blogspot.com)
Automation home(eee499.blogspot.com)
 
Table of contents
Table of contentsTable of contents
Table of contents
 
Home automation using blynk app with fan direction control and displaying sta...
Home automation using blynk app with fan direction control and displaying sta...Home automation using blynk app with fan direction control and displaying sta...
Home automation using blynk app with fan direction control and displaying sta...
 
WEB BASED REAL TIME CONTROL AND HOME AUTOMATION SYSTEM
WEB BASED REAL TIME CONTROL AND HOME AUTOMATION SYSTEMWEB BASED REAL TIME CONTROL AND HOME AUTOMATION SYSTEM
WEB BASED REAL TIME CONTROL AND HOME AUTOMATION SYSTEM
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasad
 
TE_comp_Seminar_format.pdf
TE_comp_Seminar_format.pdfTE_comp_Seminar_format.pdf
TE_comp_Seminar_format.pdf
 
PROJECT REPORT ON Home automation using by Bluetooth
 PROJECT REPORT ON Home automation using by Bluetooth PROJECT REPORT ON Home automation using by Bluetooth
PROJECT REPORT ON Home automation using by Bluetooth
 
Home Automation System using Arduino and Android
Home Automation System using Arduino and AndroidHome Automation System using Arduino and Android
Home Automation System using Arduino and Android
 
Technical Volume 1.7
Technical Volume 1.7Technical Volume 1.7
Technical Volume 1.7
 
IRJET-Smart Home Automation System using Mobile Application
IRJET-Smart Home Automation System using Mobile ApplicationIRJET-Smart Home Automation System using Mobile Application
IRJET-Smart Home Automation System using Mobile Application
 
Message based home automation & security system
Message based home automation  & security systemMessage based home automation  & security system
Message based home automation & security system
 
Gsm based home security system
Gsm based home security systemGsm based home security system
Gsm based home security system
 
Smart home automation towards the development of smart cities
Smart home automation towards the development  of smart citiesSmart home automation towards the development  of smart cities
Smart home automation towards the development of smart cities
 
A Short Review on the Perspective of Home Automation Technology
A Short Review on the Perspective of Home Automation TechnologyA Short Review on the Perspective of Home Automation Technology
A Short Review on the Perspective of Home Automation Technology
 
home automatrion
home automatrionhome automatrion
home automatrion
 
System
SystemSystem
System
 
Home automation proposal
Home automation proposalHome automation proposal
Home automation proposal
 
Final Year Project Report Device Control using sms
Final Year Project Report Device Control using smsFinal Year Project Report Device Control using sms
Final Year Project Report Device Control using sms
 
IoT Based Home Automation System_revised_27_06_2021.pptx
IoT Based Home Automation System_revised_27_06_2021.pptxIoT Based Home Automation System_revised_27_06_2021.pptx
IoT Based Home Automation System_revised_27_06_2021.pptx
 

More from slmnsvn

Power factor correction
Power factor correctionPower factor correction
Power factor correction
slmnsvn
 
Power factor correction
Power factor correctionPower factor correction
Power factor correction
slmnsvn
 
Optimum performances of ramallah
Optimum performances of ramallahOptimum performances of ramallah
Optimum performances of ramallah
slmnsvn
 
Optimum performances of ramallah
Optimum performances of ramallahOptimum performances of ramallah
Optimum performances of ramallah
slmnsvn
 
Optimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate networkOptimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate network
slmnsvn
 
Optimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate networkOptimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate network
slmnsvn
 
Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2
slmnsvn
 
Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2
slmnsvn
 
Optimum performance for aqraba electrical network
Optimum performance for aqraba electrical networkOptimum performance for aqraba electrical network
Optimum performance for aqraba electrical network
slmnsvn
 
Multi tone test
Multi tone testMulti tone test
Multi tone test
slmnsvn
 
Multi tone test
Multi tone testMulti tone test
Multi tone test
slmnsvn
 
Mini scada system for monitoring pv and wind installation in meteorology stat...
Mini scada system for monitoring pv and wind installation in meteorology stat...Mini scada system for monitoring pv and wind installation in meteorology stat...
Mini scada system for monitoring pv and wind installation in meteorology stat...
slmnsvn
 
Mini scada system for monitoring pv and wind installation in meteorology stat...
Mini scada system for monitoring pv and wind installation in meteorology stat...Mini scada system for monitoring pv and wind installation in meteorology stat...
Mini scada system for monitoring pv and wind installation in meteorology stat...
slmnsvn
 
Investigation effects-of-supplying-power-distrubition
Investigation effects-of-supplying-power-distrubitionInvestigation effects-of-supplying-power-distrubition
Investigation effects-of-supplying-power-distrubition
slmnsvn
 
Investigation of-effects-of-supplying-jenins-power
Investigation of-effects-of-supplying-jenins-powerInvestigation of-effects-of-supplying-jenins-power
Investigation of-effects-of-supplying-jenins-power
slmnsvn
 
Enable talk
Enable talkEnable talk
Enable talk
slmnsvn
 
Enable talk
Enable talkEnable talk
Enable talk
slmnsvn
 
Cell phone based dtmf controlled
Cell phone based dtmf controlledCell phone based dtmf controlled
Cell phone based dtmf controlled
slmnsvn
 
Cell phone based dtmf controlled
Cell phone based dtmf controlledCell phone based dtmf controlled
Cell phone based dtmf controlled
slmnsvn
 
Cell phone based dtmf
Cell phone based dtmfCell phone based dtmf
Cell phone based dtmf
slmnsvn
 

More from slmnsvn (20)

Power factor correction
Power factor correctionPower factor correction
Power factor correction
 
Power factor correction
Power factor correctionPower factor correction
Power factor correction
 
Optimum performances of ramallah
Optimum performances of ramallahOptimum performances of ramallah
Optimum performances of ramallah
 
Optimum performances of ramallah
Optimum performances of ramallahOptimum performances of ramallah
Optimum performances of ramallah
 
Optimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate networkOptimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate network
 
Optimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate networkOptimum performance of tulkarim governorate network
Optimum performance of tulkarim governorate network
 
Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2
 
Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2Optimum performance for aqraba electrical network 2
Optimum performance for aqraba electrical network 2
 
Optimum performance for aqraba electrical network
Optimum performance for aqraba electrical networkOptimum performance for aqraba electrical network
Optimum performance for aqraba electrical network
 
Multi tone test
Multi tone testMulti tone test
Multi tone test
 
Multi tone test
Multi tone testMulti tone test
Multi tone test
 
Mini scada system for monitoring pv and wind installation in meteorology stat...
Mini scada system for monitoring pv and wind installation in meteorology stat...Mini scada system for monitoring pv and wind installation in meteorology stat...
Mini scada system for monitoring pv and wind installation in meteorology stat...
 
Mini scada system for monitoring pv and wind installation in meteorology stat...
Mini scada system for monitoring pv and wind installation in meteorology stat...Mini scada system for monitoring pv and wind installation in meteorology stat...
Mini scada system for monitoring pv and wind installation in meteorology stat...
 
Investigation effects-of-supplying-power-distrubition
Investigation effects-of-supplying-power-distrubitionInvestigation effects-of-supplying-power-distrubition
Investigation effects-of-supplying-power-distrubition
 
Investigation of-effects-of-supplying-jenins-power
Investigation of-effects-of-supplying-jenins-powerInvestigation of-effects-of-supplying-jenins-power
Investigation of-effects-of-supplying-jenins-power
 
Enable talk
Enable talkEnable talk
Enable talk
 
Enable talk
Enable talkEnable talk
Enable talk
 
Cell phone based dtmf controlled
Cell phone based dtmf controlledCell phone based dtmf controlled
Cell phone based dtmf controlled
 
Cell phone based dtmf controlled
Cell phone based dtmf controlledCell phone based dtmf controlled
Cell phone based dtmf controlled
 
Cell phone based dtmf
Cell phone based dtmfCell phone based dtmf
Cell phone based dtmf
 

Recently uploaded

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 

Recently uploaded (20)

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 

Smart home

  • 1. i An-Najah National University ‫الوطنية‬ ‫النجاح‬ ‫جامعة‬ Faculty of engineering ‫الهندسة‬ ‫كلية‬ Electrical Engineering Department Smart Home Prepared By: 1.Saed Dwikat 2. Sharer Alawneh Supervisor: Dr.Falah Hassan Graduation Project Submitted in Partial Fulfillment of The Requirements for The Degree of Bachelor of Electrical Engineering 2014, 2015
  • 2. ii To myconstantgiving,precious father, who implantsambitionand perseverancein me,
  • 3. iii To mydearmotherwho grantsinexhaustibletenderness, To mysiblingswho bearmemoriesofmy childhood andmy youthin their eyes, To myfriends who can'tbenarrowedin words, especially Ibrahim Asadand Abd ElrahmanHazem To theprisoners anddetaineeswho sacrificed theirfreedom forthefreedom ofothers, To themartyrsofPalestinewho aremorenoblethanus , To all thelovers of educationandknowledge , To myrespected Dr.FalahHassan, To mybelovedPalestinethatembracedme allthese years, To all thosewho contributedin thesuccess ofthis work.
  • 4. iv ACKNOWLEDGMENTS We would like to express our gratitude for everyone who helped us during the graduation project starting with endless thanks for our supervisor Dr. Falah Hassan who didn’t keep any effort in encouraging us to do a great job, providing our group with valuable information and advices to be better each time. Thanks for the continuous support and kind communication which had a great effect regarding to feel interesting about what we are working on I would like to express my gratitude towards my parents for their encouragement which help me in completion of this project. I would like to express my special gratitude and thanks to industry persons for giving me such attention and time. My thanks and appreciations also go to my colleagues in developing the project and people who have willingly helped me out with their abilities.
  • 5. v TABLE OF CONTENTS ACKNOWLEDGMENTS.............................................................................Error! Bookmark not defined. LIST OF APPREVIATIONS..........................................................................Error! Bookmark not defined. TABLE OF CONTENTS ..........................................................................................................................v INTRODUCTION......................................................................................Error! Bookmark not defined. 1.1 - Introduction................................................................................Error! Bookmark not defined. 1.2 - Objectives...............................................................................................................................2 1.3 - Project scope ..............................................................................Error! Bookmark not defined. 1.4 –Plan of actions.........................................................................................................................3 1.5 – Home control system..............................................................................................................3 SYSTEMANALYSIS...............................................................................................................................4 2.1 - Introduction............................................................................................................................5 2.2 – Case study..............................................................................................................................6 2.3 – System actors.........................................................................................................................6 2.4 – Systemelement......................................................................................................................8 2.5 – System benefits......................................................................................................................8 APPLICATIONSANA CONNECTIONS....................................................................................................10 3.1 - Applications..........................................................................................................................11 3.2 – Connections .........................................................................................................................20 DESIGN AND OPERATION..................................................................................................................23 4.1 – System algorithm and microcontroller tasks...........................................................................24 4.2 – Flow chart............................................................................................................................25 4.3 – Final design .........................................................................................................................27 PROJECT COMPONENTS....................................................................................................................28 5.1 Mechanical devices .................................................................................................................29 Program Code……………………………………………………………………………………………………………………………………………… 43 Conclusions and project future..........................................................................................................48 References.......................................................................................................................................48
  • 6. 6 INTRODUCTION 1.1 – Introduction As the amount of controllable fittings and domestic appliances in the home rises, the ability of these devices to interconnect and communicate with each other digitally becomes a usefuland desirable feature. The consolidation of control or monitoring signals from appliances, fittings or basic services is an aim of Home automation. In simple installations this may be as straightforward as turning on the lights when a person enters the room. In advanced installations, rooms can sense not only the presence of a person inside but know who that person is and perhaps set appropriate lighting, temperature, music levels or television channels, taking into account the day of the week, the time of day, and other factors. Other automated tasks may include setting the air conditioning to an energy saving setting when the house is unoccupied, and restoring the normal setting when an occupant is about to return. More sophisticated systems can maintain an inventory of products, recording their usage through an RFID tag, and prepare a shopping list or even automatically order replacements. An example of a remote monitoring implementation of home automation could be when a smoke detector detects a fire or smoke condition, and then all lights in the house will blink to alert any occupants of the house to the possible fire. If the house is equipped with a home theatre, a home automation system can shut down all audio and video components to display the alert or make an audible announcement. The system could also call the home owner on their mobile phone to alert them, or call the fire brigade or alarm monitoring company to bring it to their attention 1.2 – Objectives the main objective of our project is to make it easy to every one to contact with his/her home and controlling there HWs; without being at home saving there time in an efficiency way. 1.3 - project scope: These days everyone is connected with the world using electrical devices and amazingly sensor aremost commonly used electrical device. Today most of the electricaldevices can get connected to the sensors access the pc. So now a days programmers and designers become to develop a device application which is an application that use a set of technologies and specifications developed for small devices like pc, etc..
  • 7. 7 our idea came from developing an old project that was about controlling the hardware by the remote control that was made in our University, so we thought that it will be a good idea to implement it as a new idea in our graduation projects because the smart home become an important part in every one’s life and it can make it easy for everybody to accomplish many things by using it. We implement it by simulating the house hardware using special materials also we aredeveloping a device application. 1.4 - Plan of actions: . Then we decide what we need to start developing our idea, we started with determining the hardware that we will need then starting to build the hard warepart and testing it. The second step is programming. 1.5- Home Control System: SH is application developed using electrical device. its aim is to control home devices by sensor , the user request our application using his/her device then he/she has to login (enter his/her user name and password) after that he can select an item of the menu to control either the home devices .
  • 9. 9 System Analysis 2.1 – Introduction Smart home is the residential extension of building automation. It is automation of the home, housework or household activity. Home automation may include centralized control of lighting, HVAC (heating, ventilation and air conditioning), appliances, security locks of gates and doors and other systems, to provide improved convenience, comfort, energy efficiency and security. Home automation for the elderly and disabled can provide increased quality of life for persons who might otherwise require caregivers or institutional care. The popularity of home automation has been increasing greatly in recent years due to much higher affordability and simplicity through smart phone and tablet connectivity. The concept of the "Internet of Things" has tied in closely with the popularization of home automation. A home automation system integrates electrical devices in a house with each other. The techniques employed in home automation include those in building automation as well as the control of domestic activities, such as home entertainment systems, houseplant and yard watering, pet feeding, changing the ambiance "scenes" for different events (such as dinners or parties), and the use of domestic robots. Devices may be connected through pc . Automated homes of the future have been staple exhibits for World's Fairs and popular backgrounds in science fiction. However, problems with complexity, competition between vendors, multiple incompatible standards, and the resulting expense have limited the penetration of home automation to homes of the wealthy or ambitious hobbyists. Possibly the first "home computer" was an experimental home automation.
  • 10. 10 2.2 - Case Study (Legacy System) : The idea of our system came from an old system which is controlling the house devices using the remote control so the user can be able to control the devices only from inside the house .Because of this, we create our system which is controlling the house devices by using the sensor and electrical device application which we can browse it on the pc that provide the ability of controlling the house devices from inside and outside the house 2.3 – SystemActors:- 1. Microcontroller 2. Electrical device 3. Sensors. 4. Arduino 2.4 – System Use Cases 1. We create a password system 2. If valid password, the system works and if wrong does not work 3. after that information reach to Adriano 4. Adriano sends orders to sensors to work 2.4 - Systemelements Elements of a home automation system include sensors (such as temperature, daylight, or motion detection), controllers (such as a general-purpose personal computer or a dedicated automation controller) and actuators, such as motorized valves, light switches, motors, and others. One or more human-machine interface devices are required, so that the residents of the home can interact with the system for monitoring and control; this may be a specialized terminal or, increasingly.
  • 11. 11 Building automation networks developed for institutional or commercial buildings may be adapted to control in individual residences. A centralized controller can be used, or multiple intelligent devices can be distributed around the home 2.5-Systembenefits: Home automation refers to the use of electrical device and information technology to control home appliances and features (such as windows or lighting). Systems can range from simple remote control of lighting through to complex computer/micro-controller based networks with varying degrees of intelligence and automation. Home automation is adopted for reasons of ease, security and energy efficiency. As the number of controllable devices in the home rises, interconnection and communication becomes a useful and desirable feature. For example, a furnace can send an alert message when it needs cleaning or a refrigerator when it needs service. If no one is supposed to be home and the alarm system is set, the home automation system could call the owner, or the neighbors, or an emergency number if an intruder is detected. In simple installations, automation may be as straightforward as turning on the lights when a person enters the room. In advanced installations, rooms can sense not only the presence of a person inside but know who that person is and perhaps set appropriate lighting, temperature, music levels or television channels, taking into account the day of the week, the time of day, and other factors. Other automated tasks may include reduced setting of the heating or air conditioning when the house is unoccupied, and restoring the normal setting when an occupant is about to return. More sophisticated systems can maintain an inventory of products, recording their usage through bar codes, or an RFID tag, and prepare a shopping list or even automatically order replacements.
  • 13. 13 Applications and Connections 3.1 Applications 1. Lighting system: Not it is nice to have a room lighting his conception of the igniting and turn on the lights in your room when you go out or enter the room! In this project we will turn this idea into reality through the use of Adriano In this project we will use Motion Sensor (PIR Sensor) to detect any movement that occurs in a specific orbit diameter feet, which can be made of the movement at a distance. We will be using the relay also reached the room lamps, for example, the role of the relay electricity to control the lights. And, of course Adriano which is the heart of the project we will program it simple orders to be his mission successfully. This projects a great way to learn how to receive information from Adriano and build on them to give other orders. Components of lighting system:  Microcontroller(Adriano)  Motion sensor (PIR sensor)  LDR Sensor  Relay  lamp
  • 14. 14 2. Cooling and heating system Heat and cooling system works categorize the principle that the temperature sensor, the temperature sensor is to send a message to the Adriano there it send to fan to work to operate where the temperature sensor programmed categorize certain temperature, for example 25 in the temperature rose about it, the fan is working. Components of cooling and heating system  Temperature sensor  Adriano  Fan  Buzzer  MQ_6 sensor (gas sensor) 3. Water system Let’s start with ultrasonic sensor accurately between him and objects in front of him he is sending ultrasonic signals and in the case of these signals moved from the center to the center of another reflected some of these signals to the delicate job by calculating the time required to return signal and because the speed of these signals in a vacuum constant we can ultrasonic we can the of the calculate the distance traveled wave. Components of cooling and heating system  Ultrasonic sensor  Dc pump  Tube
  • 15. 15 4. Security system Exploit the connection keypad seven exits from an each of us knows rose Adriano and here lies.The problem in the large number of party's user With keypad but I wantthat these parties be available to me for use with motors, valves and send data.To the screen Components of security system 1. Keypad 2. Buzzer 3.2 Sensor Connection 1- Lm35 with Adriano Figure 3.3: lm35 with Arduino
  • 16. 16 Using the lm35 is easy; simply connect the left pin to power (2.7-5.5V) and the right pin to ground. Then the middle pin will have an analog voltage that is directly proportional (linear) to the temperature. The analog voltage is independent of the power supply. To convert the voltage to temperature, simply use the basic formula: Temp in °C = (Vout in mV) / 10 2- Relay with Adriano Figure 3.5: Relay with Arduino To connect the Relay board to an Arduino is very easy and allows you to turn on and off an wide range of devices, both AC and DC. The first to connections are the ground and power pins, you need to connect the Arduino +5 v to the Relay board VCC pin and the Arduino ground to the Relay board GND pin. Then it's a only a matter of just connecting the communication pins, labeled IN1, two 4 data pins on the Arduino
  • 17. 17 3- LDR with Adriano Figure 3.4: LDR sensor with Arduino Below is the Arduino Sketch. In this sketch we are simply turning on the built-in LED if the ADC value drops below a specific value. To make a nightlight, a brighter led (with limiting resistor ~220 ohms) can be connected to the pin 13 output. In the code you will notice that there are some serial output statements that are commented out. If you uncomment these you will see on the serial monitor the current value of the voltage being read by the Arduino ADC input. This value is between 0 and 1024. Cover the LDR with your hand and shine a light on it to see the effect.
  • 18. 18 4- Ultrasonic sensor with Adriano Figure 3.4: Ultrasonic sensor with Arduino When I first received an ultrasonic sensor I was not happy with how poorly it performed. I soon realized the problem wasn't the sensor; it was the available ping and ultrasonic libraries causing the problem. The New Ping library totally fixes these problems, adds many new features, and breathes new life into these very affordable distance sensors.
  • 19. 19 5- Motion sensor with Arduino Figure 3.4: PIR with Adriano Connectionsare as follows  PIR Pin “+” connectsto Arduino +5  PIR Pin “-” connectsto Arduino GND  PIR Pin “out” connectsto Arduino Digital 2
  • 20. 20 6- Keypad with Arduino Figure 3.4: Keypad with Arduino
  • 21. 21 Keypads are everywhere; on your cell phone, on your TV remotes, on your stereo and now on your Arduino. Wait…. Why do you want a keypad on your Arduino? Well it’s a pretty useful device to input numbers and letters (example: telephones), it can also be used for security measures like a keypad door lock, and it’s prefect when you need a low-cost and accessible interface for your next idea. After all, It wouldn’t be practical to use a single button or a potentiometer to input your Pin on an ATM. So for this tutorial, we will be going over Spark fun’s 12 buttons keypad (0-9, #, *), and get you all set up with some code and schematic too. The buttons on this particular keypad are setup in a 3X4 matrix format so we only need 7 pins to detect the pressing of 12 keys. For example, when you hit the number 3 pins 5&2 are connected, 6 connects pins 5&7 and 9 connects 5&6. So in code we just look for the combination and we know what button is being pressed. So in simple terms, if pins 5 and 2 (of the keypad) are signaling the arduino, it means that button 3 has been pressed – It is setup like this to minimize the number of pins needed to controlthe keypad. 7- Smoke (MQ-6) with Adriano This is a simple-to-use liquefied petroleum gas (LPG) sensor, suitable for sensing LPG (composed of mostly propane and butane) concentrations in the air. The MQ-6 can detect gas concentrations anywhere from 200 to 10000ppm. This sensor has a high sensitivity and fast response time. The sensor’s output is an analog resistance. The drive circuit is very simple; all you need to do is power the heater coil with 5V, add a load resistance, and connect the output to an ADC. This sensor comes in a package similar to our MQ-3 alcohol sensor, and can be used with the breakout board below. Features It has good sensitivity to flammable gas (especially propane) in wide range, and has advantages such as long lifespan, low cost and simple drive circuit &etc.
  • 22. 22 Figure 3.5: Gas sensor with Adriano
  • 24. 24 DESIGN AND OPERATION 4.1 – System algorithm and microcontroller tasks Figure 4.1: Microcontroller tasks Put the password The electrical device and sensor is active The system is active Control the device
  • 26. 26 4.3 – Final project
  • 28. 28 PROJECT COMPONENTS 5.1 Mechanical devices: 1. fan Brushless DC fan be driven by brushless DC motor and change direction electrically depending on holl unit: its material is PBT-UL94Vo; has long life and low noise; and is mainly used in heat dispersion of induction cooker, computer and home electric appliance. There are many types, YHWF-120, YHWF- 12025, YHWF-8025, and YHWF-4010.ect The specification for this fan is as following:  Model Number: YHWF-9025  Size: 90*90*25mm  Voltage: 5 ~ 24V DC  Material : Plastic  Rated speed: 1500 ~ 6000RPM  Bearing: Sleeve or Ball Bearing  Noise: Less than 30 dB With the Hall sensor and over current protection. We can make this DC fan if the user requires the non-standard specification Figure 5.1: DC van.
  • 29. 29 2. Adriano Uno The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet) It has 14 digital input/output pins (of which 6 can be used as PWM outputs),6 analog inputs, a 16 MHz ceramic resonator, 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 Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial converter. Revision 2 of the Uno board has a resistor pulling the 8U2 HWB line to ground, making it easier to put into DFU mode. Revision 3 of the board has the following new features: 1.0 Pin out: added SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided from the board. In future, shields will be compatible with both the board that uses the AVR, which operates with 5V and with the Arduino Due that operates with 3.3V. The second one is a not connected pin that is reserved for future purposes. Stronger RESET circuit. At mega 16U2 replace the 8U2. "Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest in a series of USB Arduino boards, and the reference model for the Arduino platform; for a comparison with previous versions, see the index of Arduino boards.
  • 30. 30 Summary Microcontroller ATmega328 Operating Voltage 5V Input Voltage (recommended) 7-12V Input Voltage (limits) 6-20V DigitalI/O Pins 14 (of which 6 provide PWM output) Analog Input Pins 6 DC Current per I/O Pin 40 mA DC Current for 3.3V Pin 50 mA Flash Memory 32 KB (ATmega328) of which 0.5 KB used by bootloader SRAM 2 KB (ATmega328) EEPROM 1 KB (ATmega328) Clock Speed 16 MHz Power The Arduino Uno can be powered via the USB connection or with an external power supply. The power source is selected automatically. External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the GND and Vin pin headers of the POWER connector.
  • 31. 31 The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts. The power pins are as follows:  VIN. The input voltage to the Arduino board when it's using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.  5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.  3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.  GND. Ground pins. IOREF. This pin on the Arduino board provides the voltage reference with which the microcontroller operates. A properly configured shield can read the IOREF pin voltage and select the appropriate power source or enable voltage translators on the outputs for working with the 5V or 3.3V Memory The ATmega328 has 32 KB (with 0.5 KB used for the boot loader). It also has 2 KB of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library). Input and Output Each of the 14 digital pins on the Uno can be used as an input or output, using pin Mode (), digital Write (), and digital Read () functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of (20-50) kΩ. In addition, some pins have specialized functions: Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip. External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the attach Interrupt () function for details. PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog Write () function. SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication using the SPI library.
  • 32. 32 LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off. The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and the analog Reference () function. Additionally, some pins have specialized functionality: TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library. There are a couple of other pins on the board: AREF. Reference voltage for the analog inputs. Used with analog Reference (). Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board. See also the mapping between Arduino pins and ATmega328 ports. The mapping for the Atmega8, 168, and 328 is identical. Communication The Arduino Uno has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2on the board channels this serial communication over USB and appears as a virtual com port to software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no external driver is needed. However, on Windows, and if file is required. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB-to-serial chip and USB connection to the computer (but not for serial communication on pins 0 and 1). A Software Serial library allows for serial communication on any of the Uno's digital pins.
  • 33. 33 The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the I2C bus; see the documentation for details. For SPI communication, use the SPI library. Programming The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino Uno from the Tools > Board menu (according to the microcontroller on your board). For details, see the reference and tutorials. The ATmega328 on the Arduino Uno comes pre-burned with a boot loader that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the original STK500 protocol (reference, C header files). You can also bypass the boot loader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header; see these instructions for details. The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available. The ATmega16U2/8U2 is loaded with a DFU boot loader, which can be activated by: On Rev1 boards: connecting the solder jumper on the back of the board (near the map of Italy) and then resetting the 8U2. On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground, making it easier to put into DFU mode. You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and Linux) to load a new firmware. Or you can use the ISP header with an external programmer (overwriting the DFU boot loader). See this user-contributed tutorial for more information. Automatic (Software) Reset Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow control lines (DTR) of theATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100 Nano- farad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the
  • 34. 34 Arduino environment. This means that the boot loader can have a shorter timeout, as the lowering of DTR can be well-coordinated with the start of the upload. This setup has other implications. When the Uno is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the boot loader is running on the Uno. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data. The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see this forum thread for details. USB Overcurrent Protection The Arduino Uno has a resettable poly fuse that protects your computer's USB ports from shortsand overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the short or overload is removed. Physical Characteristics The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the USB connector and power jack extending beyond the former dimension. Four screw holes allow the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.
  • 35. 35 Figure 5.2: arduino Uno 3. Relay A relay is automatic device which senses an abnormal condition of electrical circuit and closes its contacts. Thesecontacts in turns closeand complete thecircuit breaker trip coil circuit hence make the circuit breaker tripped for disconnecting the faulty portion of the electrical circuit from rest of the healthy circuit. Now let’s have a discussion on some terms related to protective relay Pickup level of actuating signal: The value of actuating quantity (voltage or current) which is on threshold above which the relay initiates to be operated. If the value of actuating quantity is increased, the electromagnetic effect of the relay coil is increased and above a certain level of actuating quantity the moving mechanism of the relay just starts to move. Reset level: The value of current or voltage below which a relay opens its contacts and comes in original position.
  • 36. 36 Operating Time of Relay - Just after exceeding pickup level of actuating quantity the moving mechanism (for example rotating disc) of relay starts moving and it ultimately close the relay contacts at the end of its journey. The time which elapses between the instant when actuating quantity exceeds the pickup value to the instant when the relay contacts close.  Reset time of Relay – The time which elapses between the instant when the actuating quantity becomes less than the reset valueto the instant when the relay contacts returns to its normal position.  Reach of relay – A distancerelay operates whenever the distance seen by the relay is less than the pre-specified impedance. The actuating impedance in the relay is the function of distancein a distanceprotection relay. This impedanceor corresponding distanceis called reach of the relay. Power system protection relays can be categorized into different Types of relays. Types of protection relays are mainly based on their characteristic, logic, on actuating parameter and operation mechanism. Figure 5.3: relay
  • 37. 37 4. LM35 is a precision IC temperature sensor with its output proportional to the temperature (in OC). The sensor circuitry is sealed and therefore it is not subjected to oxidation and other processes. With LM35, temperature can be measured more accurately than with a thermistor. It also possess low self heating and does not cause more than 0.1 OC temperature rise in still air. The operating temperature range is from -55°C to 150°C. The output voltage varies by 10mV in response to every OC rise/fall in ambient temperature, i.e., its scale factor is 0.01V/ OC. Pin Diagram: Figure 5.4: lm35
  • 38. 38 5. Lamp A lamp is a replaceable component such as an incandescent light bulb, which is designed to produce light from electricity. These components usually have a base of ceramic, metal, glass or plastic, which makes an electrical connection in the socket of a light fixture. This connection may be made with a screw-thread base, two metal pins, two metal caps or a bayonet cap. Types There are several types of lamp:  Incandescent lamp, a heated filament inside a glass envelope  Halogen lamps use a fused quartz envelope, filled with halogen gas  LED lamp, a solid-state lamp that uses light-emitting diodes (LEDs) as the source of light  Laser diode lamp  Arc lamp  Xenon arc lamp  Mercury-xenon arc lamp  Ultra-high-performance lamp, an ultra-high-pressure mercury-vapor arc lamp for use in projectors  Metal-halide lamp  Gas-discharge lamp, a light source that generates light by sending an electrical discharge through an ionized gas  Fluorescent lamp  Compact fluorescent lamp, a fluorescent lamp designed to replace an incandescent lamp  Neon lamp  Mercury-vapor lamp  Sodium-vapor lamp  Sulfur lamp  Electrode less lamp, a gas discharge lamp in which the power is transferred from outside the bulb to inside via electromagnetic fields
  • 39. 39 Lamp circuit symbol 6. LDR Photocells are sensors that allow you to detect light. They are small, inexpensive, low-power, easy to use and don't wear out. For that reason they often appear in toys, gadgets and appliances. They are often referred to a CDS cells (they are made of Cadmium-Sulfide), light-dependent resistor (LDR), and photo-resistors. A Photocell is basically a resistor that changes its resistive value (in ohms) depending on how much light is shining onto the squiggly face. They are very low cost, easy to get in many sizes and specifications, but are very inaccurate. Each photocell sensor will act a little differently than the other, even if they are from the same batch. The variations can be really large, 50% or higher! For this reason, they shouldn't be used to try to determine precise light levels in Lux or mill candela. Instead, you can expect to only be able to determine basic light changes For most light-sensitive applications like "is it light or dark out", "is there something in front of the sensor (that would block light)", "is there something interrupting a laser beam" (break-beam sensors), or "which of multiple sensors has the most light hitting it", photocells can be a good choice! As its name implies, the Light Dependent Resistor (LDR)is made from a piece of exposed semiconductor material such as cadmium sulphide that changes its electrical resistance from several thousand Ohms in the dark to only a few hundred Ohms when light falls upon it by creating hole-electron pairs in the material. The net effect is an improvement in its conductivity with a decrease in resistance for an increase in illumination. Also, photo-resistive cells have a long intensity. Materials used as the semiconductor substrate include, lead sulphide (PbS), lead selenide (PbSe), indium antimonite (In SB) which detect light in the infra-red Range with the most commonly used of all photo resistive light sensors being Cadmium Sulphide (Cds).
  • 40. 40 Cadmium supplied is used in the manufacture of photoconductive cells because its spectral response curve closely matches that of the human eye and can even be controlled using a simple torch as a light source. Typically then, it has a peak sensitivity wavelength (λp) of about 560nm to 600nm in the visible spectral range. Figure 5.5 LDR 7. Motion Sensor PIR sensors allow you to sense motion, almost always used to detect whether a human has moved in or out of the sensors range. They are small, inexpensive, low-power, easy to use and don't wear out. For that reason they are commonly found in appliances and gadgets used in homes or businesses. They are often referred to as PIR, "Passive Infrared", "Piezoelectric", or "IR motion" sensors. PIRs are basically made of a piezoelectric sensor (which you can see above as the round metal can with a rectangular crystal in the center), which can detect levels of infrared radiation. Everything emits some low level radiation, and the hotter something is, the more radiation is emitted. The sensor in a motion detector is actually split in two halves. The reason for that is that we are looking to detect motion (change) not average IR levels. The two halves are wired up so that they cancel each other out. If one half sees more or less IR radiation than the other, the output will swing high or low. Along with the pyroelectic sensor is a bunch of supporting circuitry, resistors and capacitors. It seems that most small hobbyist sensors use the BISS0001 ("Micro Power PIR Motion Detector IC"), undoubtedly a very
  • 41. 41 inexpensive chip. This chip takes the output of the sensor and does some minor processing on it to emit a digital output pulse from the analog sensor  Output: Digital pulse high (3V) when triggered (motion detected) digital low when idle (no motion detected). Pulse lengths are determined by resistors and capacitors on the PCB and differ from sensor to sensor.  Sensitivity range: up to 20 feet (6 meters) 110° x 70° detection range  Power supply: 3V-9V input voltage, but 5V is ideal. Figure 5.6: PIR sensor 8. Ultrasonic sensor Ultrasonic sensor provides an easy method of distance measurement. This sensor is perfect for any number of applications that require you to perform measurements between moving or stationary objects. Interfacing to a microcontroller is a snap. A single I/O pin is used to trigger an ultrasonic burst (well above human hearing) and then "listen" for the echo return pulse. The sensor measures the time required for the echo return, and returns this value to the microcontroller as a variable-width pulse via the same I/O pin. Key Features:  Provides precise, non-contact distance measurements within a 2 cm to 3 m range  Ultrasonic measurements work in any lighting condition, making this a good choice to supplement infrared object detectors  Simple pulse in/pulse out communication requires just one I/O pin  Burst indicator LED shows measurement in progress  3-pin header makes it easy to connect to a development board, directly or with an extension cable, no soldering required
  • 42. 42  Application Ideas:  Security systems  Interactive animated exhibits  Parking assistant systems  Robotic navigation Figure 5.7: ultrasonic sensor 9. Gas Sensor (MQ-6) Description: This is a simple-to-use liquefied petroleum gas (LPG)sensor, suitable for sensing LPG (composed of mostly propane and butane) concentrations in the air. The MQ-6 can detect gas concentrations anywhere from 200 to 10000ppm. This sensor has a high sensitivity and fast response time. The sensor’s output is an analog resistance. The drive circuit is very simple; all you need to do is power the heater coil with 5V, add a load resistance, and connect the output to an ADC.
  • 43. 43 FEATURES: * High sensitivity to LPG, iso-butane, propane * Small sensitivity to alcohol, smoke. * Fast response. * Stable and long life * Simple drive circuit APPLICATION: They are used in gas leakage detecting equipments in family and industry, are suitable for detecting of LPG, so-butane, propane, LNG, avoid the noise of alcohol and cooking fumes and cigarette smoke. Figure 5.8: gas MQ-6 sensor
  • 44. 44 10. Dc pump It is operated by an electric motor and related panel board the same way as it relates to other engines. Water enters the pump through the bottom hole and come out of the tube that protrudes from the side of the pump. Related to this plastic tube pipe to transport water to where you want. Figure 5.9: dc pump
  • 45. 45 CONCLUSIONS AND PROJECT FUTURE In This project the user use our application. The user computer must be a server and the user has to have an account in a company , then he/she can browse our electrical application from his/her pc device.After browsing our device, the first page will appear is login page. everything we implement and use in this project we have not a previous idea about it so this is took from us some time to learn about everything we want to do before do it, and we don't consider this as a problem at all instead we are thankful for having this opportunity of learning. we developed our application under limited time in addition there is a several problems faced us as mentioned before, so it has not all features and capabilities that can be obtained, so we do a future development plan in order to develop our application.
  • 46. 46 References [1] http://en.wikipedia.org/wiki/Home_automation [2] http://arduino.cc/en/Main/arduinoBoardUno [3] http://forum.arduino.cc/index.php?topic=120666.0 [4] http://en.wikipedia.org/wiki/Relay [5] http://electronics.howstuffworks.com/relay.htm
  • 47. 47 Program Code #include <Keypad.h> #include <Password.h> #include <NewPing.h> #define LIGHT1 A4 #define LIGHT2 A5 #define ECHO_PIN 11 // Arduino pin tied to echo pin on the ultrasonic sensor. #define TRIGGER_PIN 10 // Arduino pin tied to trigger pin on the ultrasonic sensor. #define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm. #define FAN 13 #define TEMP A0 #define LDR A1 #define SMOKE A2 #define PUMP A3 #define BUZZER 12 #define PIR 9 String newPasswordString; //hold the new password char newPassword[6]; //charater string of newPasswordString Password password = Password( "0599" ); char key; byte maxPasswordLength = 6; byte currentPasswordLength = 0; const byte ROWS = 4; // Four rows const byte COLS = 3; // Four columns //Define the keymap char keys[ROWS][COLS] = { {'1','2','3'}, {'4','5','6'}, {'7','8','9'}, {'*','0','#'} }; //// Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins. byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to column pinouts // Connect keypad COL0, COL1, COL2 and COL3 to these Arduino pins. byte colPins[COLS] = {8, 7, 6}; //connect to row pinouts
  • 48. 48 // Create the Keypad Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance. boolean AlarmStatus=true; void setup() { pinMode(LIGHT1, OUTPUT); pinMode(LIGHT2, OUTPUT); pinMode(FAN, OUTPUT); pinMode(PUMP, OUTPUT); pinMode(PIR, INPUT); pinMode(BUZZER, OUTPUT); Serial.begin(9600); Serial.print("Enter PassWord:"); } void loop() { // Serial.print("Alarm Status: "); //Serial.println(AlarmStatus); Serial.print("Enter PassWord:"); while (AlarmStatus==false){ key = keypad.getKey(); if (key != NO_KEY)break; TempSensor(); SmokeSensor(); DistanceSensor(); LightSensor(); digitalWrite(LIGHT2,HIGH); } while (AlarmStatus==true){ key = keypad.getKey(); if (key != NO_KEY)break; MotionSensor(); SmokeSensor(); } if (key != NO_KEY){ delay(60); switch (key){ case 'A': break; case 'B': break; case 'C': break; case 'D': changePassword(); break; case '#': checkPassword(); break; case '*': resetPassword(); break; default: processNumberKey(key); }
  • 49. 49 } } void processNumberKey(char key) { Serial.print(key); Serial.print("*"); currentPasswordLength++; password.append(key); if (currentPasswordLength == maxPasswordLength) { checkPassword(); } } void checkPassword() { if (password.evaluate()){ Serial.println(" OK."); if (AlarmStatus==false){ AlarmStatus=true; } else if (AlarmStatus==true){ AlarmStatus=false; } Serial.print("Enter PassWord:"); } else { Serial.println(" Wrong passwowrd!"); Serial.print("Enter PassWord:"); } resetPassword(); } void resetPassword() { password.reset(); currentPasswordLength = 0; } void changePassword() { newPasswordString = "0599"; newPasswordString.toCharArray(newPassword, newPasswordString.length()+1); //convert string to char array password.set(newPassword); resetPassword(); Serial.print("Password changed to "); Serial.println(newPasswordString); } void TempSensor( ) { // read the sensor: float Temp = analogRead(TEMP);
  • 50. 50 float TempValue =(Temp*5.0)/1024; float cel = (TempValue)*100; Serial.print("Temp Value: "); Serial.println(cel); if(cel >35){ digitalWrite(FAN,HIGH); //fan ON } else{ digitalWrite(FAN,LOW); // fan OFF } } void SmokeSensor( ) { int SmokeValue = analogRead(SMOKE); Serial.print("Smoke Value: "); Serial.println(SmokeValue); if(SmokeValue >800){ digitalWrite(BUZZER,HIGH); //fan ON } else{ digitalWrite(BUZZER,LOW); // fan OFF } } void DistanceSensor() { delay(50); // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings. unsigned int uS = sonar.ping(); // Send ping, get ping time in microseconds (uS). Serial.print("Ping: "); int DistanceValue =(uS / US_ROUNDTRIP_CM); Serial.print(DistanceValue); // Convert ping time to distance in cm and print result (0 = outside set distance range) Serial.println("cm"); if( DistanceValue>0 && DistanceValue <=8){ digitalWrite(PUMP,LOW); //fan ON } else{ digitalWrite(PUMP,HIGH); // fan OFF } } void MotionSensor(){ int PirValue=digitalRead(PIR); Serial.print("PIR Value: "); Serial.println(PirValue); if (PirValue==1){ digitalWrite(BUZZER, HIGH); } else { digitalWrite(BUZZER, LOW );
  • 51. 51 } } void LightSensor( ) { int LdrValue = analogRead(LDR); Serial.print("LDRValue: "); Serial.println(LdrValue); if (LdrValue < 400){ int PirValue=digitalRead(PIR); if (PirValue==1){ Serial.print("PIR Value: "); Serial.println(PirValue); digitalWrite(LIGHT1,HIGH); } else{ digitalWrite(LIGHT1,LOW); } } else { digitalWrite(LIGHT1,LOW ); } }
  • 52. 52