0% found this document useful (0 votes)
129 views42 pages

Home Automation System Using Android Application

android based home automation project report
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views42 pages

Home Automation System Using Android Application

android based home automation project report
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 42

Home Automation System Using Android Application

ABSTRACT
Today we are living in 21st century where automation is playing important role in human life.
Home automation allows us to control household appliances like light, door, fan, AC etc. Home
automation not only refers to reduce human efforts but also energy efficiency and time saving.
The main objective of home automation is to help handicapped and old aged people which will
enable them to control home appliances.
This project presents the overall design of Home Automation with low cost and wireless remote
control. This system is designed to assist and provide support in order to fulfil the needs of
elderly and disabled in home. Also, the smart home concept in the system improves the standard
living at home. The main control system implements wireless Bluetooth technology to provide
remote access from smart phone. The design remains the existing electrical switches and
provides more safety control on the switches with low voltage activating method. The switches
status is synchronized in all the control system whereby every user interface indicates the real
time existing switches status. The system intended to control electrical appliances and devices in
house with relatively low cost design, user-friendly interface and ease of installation.

Page 1

Home Automation System Using Android Application

Chapter 1
Introduction

Page 2

Home Automation System Using Android Application

Automation is todays fact, where more things are beingCompletedevery day automatically,
usually the basictasks of turning on or off certain devices and beyond, eitherremotely or in close
proximity. The control of the deviceswhen completely taken over by the machines, the processof
monitoring and reporting becomes more important.Depending on the location of its usage,
automation differsin its name as industrial automation, home automation etc.With the
development of low cost electronic componentshome automation migrated from being an
industrialapplication to home automation. The home automation, ourpoint of concern deals with
the control of home appliancesfrom a central location. Market researches claim that mostof the
homes will be equipped with home automationsystems in the very near future. The whole
process ofsupervising, controlling and monitoring electrical devicesand equipments from electric
power stations and thedistribution grids is based on automation, protection,dataacquisition and
equipment control. A popularapplication in this field, which is in highly demand,involves
controlling the power equipment in the building,such as the motor, heater, lamp and air
conditioner. Theproblem of power management is the remote controladjustment, which is a result
from consumers carelessness.Microcontrollers are suitable in low-cost control application.
Due to the advancement of wireless technology, there are several different of connections are
introduced such as GSM, WIFI, ZIGBEE, and Bluetooth. Each of the connection has their own
unique specifications and applications. Among the four popular wireless connections that often
implemented in HAS project, Bluetooth is being chosen with its suitable capability. Bluetooth
with globally available frequencies of 2400Hz is able to provide connectivity up to 100 meters at
speed of up to 3Mbps depending on the Bluetooth device class . In addition, a Bluetooth master
device is able to connect up to 7 devices in a Piconet.
The capabilities of Bluetooth are more than enough to be implemented in the design. Also, most
of the current laptop/notebook or cell phones are come with built-in Bluetooth adapter. It will
indirectly reduce the cost of this system.

Page 3

Home Automation System Using Android Application

Chapter 2
Project Description

Page 4

Home Automation System Using Android Application

2.1 Technology used


2.1.1 Bluetooth
Bluetooth technology is a wireless communications technology that is simple, secure, and
everywhere. You can find it in billions of devices ranging from mobile phones and computers to
medical devices and home entertainment products. It is intended to replace the cables
connecting devices, while maintaining high levels of security.
The key features of Bluetooth technology are iniquitousness, low power, and low cost. The
Bluetooth Specification defines a uniform structure for a wide range of devices to connect and
communicate with each other.
When two Bluetooth enabled devices connect to each other, this is called pairing. The structure
and the global acceptance of Bluetooth technology means any Bluetooth enabled device, almost
everywhere in the world, can connect to other Bluetooth enabled devices located in proximity to
one another.
Connections between Bluetooth enabled electronic devices allow these devices to communicate
wirelessly through short-range, ad hoc networks known as piconets. Piconets are established
dynamically and automatically as Bluetooth enabled devices enter and leave radio proximity
meaning that you can easily connect whenever and wherever it's convenient for you.
Each device in a piconet can also simultaneously communicate with up to seven other devices
within that single piconet and each device can also belong to several piconets simultaneously.
This means the ways in which you can connect your Bluetooth devices is almost limitless.
A fundamental strength of Bluetooth wireless technology is the ability to simultaneously handle
data and voice transmissions. which provides users with a variety of innovative solutions such
as hands-free headsets for voice calls, printing and fax capabilities, and synchronization for PCs
and mobile phones, just to name a few.
The range of Bluetooth technology is application specific. The Core Specification mandates a
minimum range of 10 meters or 30 feet, but there is no set limit and manufacturers can tune
their implementations to provide the range needed to support the use cases for their solutions.

Page 5

Home Automation System Using Android Application

Bluetooth Core Specification


Unlike other wireless standards, the Bluetooth Core Specification provides product developers
both link layer and application layer definitions, which support data and voice applications. For
more information about the Bluetooth Core Specification, visit our Bluetooth.org member site
(member sign-in required for some sections of the site).
Spectrum
Bluetooth technology operates in the unlicensed industrial, scientific and medical (ISM) band at
2.4 to 2.485 GHz, using a spread spectrum, frequency hopping, full-duplex signal at a nominal
rate of 1600 hops/sec. The 2.4 GHz ISM band is available and unlicensed in most countries.
Interference
Bluetooth technology's adaptive frequency hopping (AFH) capability was designed to reduce
interference between wireless technologies sharing the 2.4 GHz spectrum. AFH works within
the spectrum to take advantage of the available frequency. This is done by the technology
detecting other devices in the spectrum and avoiding the frequencies they are using. This
adaptive hopping among 79 frequencies at 1 MHz intervals gives a high degree of interference
immunity and also allows for more efficient transmission within the spectrum. For users of
Bluetooth technology this hopping provides greater performance even when other technologies
are being used along with Bluetooth technology.
Range
Range is application specific and although a minimum range is mandated by the Core
Specification, there is not a limit and manufacturers can tune their implementation to support
the use case they are enabling.
Range may vary depending on class of radio used in an implementation:

Class 3 radios have a range of up to 1 meter or 3 feet


Class 2 radios most commonly found in mobile devices have a range of 10 meters or

33 feet
Class 1 radios used primarily in industrial use cases have a range of 100 meters or
300 feet

Page 6

Home Automation System Using Android Application

Power
The most commonly used radio is Class 2 and uses 2.5 mW of power. Bluetooth technology is
designed to have very low power consumption. This is reinforced in the specification by
allowing radios to be powered down when inactive.
The Generic Alternate MAC/PHY in Version 3.0 HS enables the discovery of remote AMPs for
high speed devices and turns on the radio only when needed for data transfer giving a power
optimization benefit as well as aiding in the security of the radios.
Bluetooth low energy technology, optimized for devices requiring maximum battery life instead
of a high data transfer rate, consumes between 1/2 and 1/100 the power of classic Bluetooth
technology.

2.1.2ANDROID
Android is a mobile operating system (OS) based on the Linux kernel and currently developed
by Google. With a user interface based on direct manipulation, Android is designed primarily for
touchscreen mobile devices such as smartphones and tablet computers, with specialized user
interfaces for televisions (Android TV), cars (Android Auto), and wrist watches (Android Wear).
The OS uses touch inputs that loosely correspond to real-world actions, like swiping, tapping,
pinching, and reverse pinching to manipulate on-screen objects, and a virtual keyboard. Despite
being primarily designed for touchscreen input, it also has been used in game consoles, digital
cameras, regular PCs (e.g. the HP Slate 21) and other electronics.

Page 7

Home Automation System Using Android Application

2.2. Block Diagram:-

Fig 2.1:block diagram

Page 8

Home Automation System Using Android Application

2.3 Circuit Diagram:-

Fig 2.2:circuit diagram

Page 9

Home Automation System Using Android Application

2.4. Working: Algorithm


The device controller consists of two sections of software and hardware. As software ANDROID
APPLICATION is used. First of all, the data is sent from mobile device using Bluetooth. These
data are generally ASCII of some alphabets and only one ASCII is send at a time. The data
transmitted through mobile Bluetooth is received by Bluetooth module and then send to
microcontroller.
What the system does is it simply receives the instructions in ASCII format from the bluetooth
enabled Android smartphone using the bluetooth module and pass it on to the micro-controller.
What happens when the controller receives a particular ASCII value it switches ON or OFF a
relay. And the relay acts as a switch for AC appliances. I have used some flag variables which
check whether a particular relay is ON or OFF.
The microcontroller reads the data from the Bluetooth module therefore turning on/off the
devices accordingly. ULN2003 IC is used to activate the relays to turn on/off the home
appliances. A pair of Darlington transistor is required by every relay to operate in order to
provide the high current.
Working steps:
Power up the Circuit and scan the Bluetooth devices on our mobile devices. If everythings done
correctly we will be able to find a Bluetooth device named vidushi (name of Bluetooth
module). We will asked for a pairing code in case of our model it is 1234 but it might be different
for module from another vendor.
Steps for operating devices listed in program:

Start Bluetooth connection of mobile phone.


Open the HAS application on mobile phone.
Select connect device from option menu using scan for new devices.
Bluetooth Serial Module will be available under select a device to connect list.
Pair Bluetooth Serial Module by providing pair code 1234.
Start selecting particular device for making ON/OFF from List Menu as ON and
OFF according to choice.

Page 10

Home Automation System Using Android Application

Chapter 3
PCB Designing

3.1 PCB Designing:


Page 11

Home Automation System Using Android Application

PCB
The success of any creation is often dependent on the foundations it is built upon, be it the
strength of a character, depth of a buildings foundations or the extent of a trees roots. Much in
the same way, the success of any electronic device depends on what it is built on. The
motherboard of any electronics device serves as a playground and a host to every form of
electrical signal that performs some function for the equipment. Be it the communication signal
between the North Bridge and processor on a computer, or a simple on-off signal in a routine
school project, the effectiveness of the design is a function of the capabilities offered by the base
board itself.
A Printed Circuit Board doesnt just connect electrical components using etched copper
pathways, but also provides mechanical strength to it. Printed Circuit Boards, or more
appropriately, Printed Wiring Boards are found in almost all of the commercial products as a
packaging medium as building blocks.
PCBs are a composite of organic and/or inorganic dielectric materials with many layers with
wiring interconnects and also house components like inductors and capacitors. There isnt any
standard printing board as such and each board is unique, often a function of the product itself.
There are industry standards for almost every aspect of PCB design, controlled by IPC, for
example the IPC-2221, Generic Standard on Printed Board Design.
A printed circuit board has pre-designed copper tracks on a conducting sheet. The pre-defined
tracks reduce the wiring thereby reducing the faults arising due to lose connections. One needs to
simply place the components on the PCB and solder them.
Materials required in PCB Designing:
Over Head Projector sheet (known as OHP sheets) or a wax paper.
Laser Printer.
Electric Iron.
Steel wool.
Two plastic trays.
Copper board/ PCB (eg: paper phenolic, glass epoxy, FR4, FR10, etc.)
Black permanent marker.
Etching solution (Ferric chloride).
Drill machine.
Page 12

Home Automation System Using Android Application

Steps :
Step1:
Prepare a layout of the circuit on any commonly used PCB designing software. A
layout is a design which interconnects the components according to the schematic
diagram (circuit diagram). Take a mirror image print of the layout on the OHP
sheet using a laser printer. Make sure that the design is correct with proper

placement of the components.


Step2:
Cut the copper board according to the size of layout. A copper board is the base of
a PCB, it can be single layer, double layer or multi layer board. Single layer
copper board has copper on one side of the PCB, they are used to make single
layer PCBs, it is widely used by hobbyist or in the small circuits. A double layer
copper board consists of copper on both the sides of the PCB. These boards are
generally used by the industries. A multilayer board has multiple layers of copper;
they are quite costly and mainly used for complex circuitries like mother board of

PC.
Step3:Rub the copper side of PCB using steel wool. This removes the top oxide

layer of copper as well as the photo resists layer if any.


Step4:Place the OHP sheet (wax paper) which has the printed layout on the PCB
sheet. Make sure that the printed/mirror side should be placed on the copper side

of PCB.
Step5:Put a white paper on the OHP sheet and start ironing. The heat applied by
the electric iron causes the ink of the traces on the OHP sheet to stick on the
copper plate exactly in the same way it is printed on the OHP sheet. This means
that the copper sheet will now have the layout of the PCB printed on it. Allow the
PCB plate to cool down and slowly remove the OHP sheet. Since it is manual
process it may happen that the layout doesnt comes properly on PCB or some of
the tracks are broken in between. Use the permanent marker and complete the

tracks properly.
Step6:Now the layout is printed on PCB. The area covered by ink is known as the
masked area and the unwanted copper, not covered by the ink is known as
unmasked area. Now make a solution of ferric chloride. Take a plastic box and fill

Page 13

Home Automation System Using Android Application

it up with some water. Dissolve 2-3 tea spoon of ferric chloride power in the
water. Dip the PCB into the Etching solution (Ferric chloride solution, Fecl3) for
approximately 30 mins. The Fecl3 reacts with the unmasked copper and removes
the unwanted copper from the PCB. This process is called as Etching. Use pliers
to take out the PCB and check if the entire unmasked area has been etched or not.

In case it is not etched leave it for some more time in the solution.
Step7:Take out the PCB wash it in cold water and remove the ink by rubbing it
with steel wool. The remaining area which has not been etched is the conductive

copper tracks which connect the components as per the circuit diagram.
Step8:Now carefully drill the PCB using a drilling machine on the pads.
Step9: Put the components in the correct holes and solder them.This completes
your PCB fabrication now put the components on mounting side and solder them.
Make sure that you properly dispose of the FeCl3 solution, clean your tools and
wash your hands after this exercise. You can also store the solution in a plastic
box for future use but not for too long.

Page 14

Home Automation System Using Android Application

Chapter 4
Hardware Description

4.1.Microcontroller:The AtmelAVR ATmega8 is a low-power CMOS 8-bit microcontroller based on the AVR
RISC architecture. By executing powerful instructions in a single clock cycle, the

Page 15

Home Automation System Using Android Application

ATmega8chievesthroughputs approaching 1MIPS per MHz, allowing the system designer to


optimize power consumptionversus processing speed.
The Atmel AVR core combines a rich instruction set with 32 general purpose working registers.
All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two
independent registers to be accessed in one single instruction executed in one clock cycle. The
resulting architecture is more code efficient while achieving throughputs up to ten times faster
than conventional CISC microcontrollers.
The ATmega8 provides the following features: 8 Kbytes of In-System Programmable Flash with
Read-While-Write capabilities, 512 bytes of EEPROM, 1 Kbyte of SRAM, 23 general purpose
I/O lines, 32 general purpose working registers, three flexible Timer/Counters with compare
modes, internal and external interrupts, a serial programmable USART, a byte oriented Twowire
Serial Interface, a 6-channel ADC (eight channels in TQFP and QFN/MLF packages) with 10-bit
accuracy, a programmable Watchdog Timer with Internal Oscillator, an SPI serial port, and five
software selectable power saving modes. The Idle mode stops the CPU while allowing the
SRAM, Timer/Counters, SPI port, and interrupt system to continue functioning. The Powerdown
mode saves the register contents but freezes the Oscillator, disabling all other chip functions until
the next Interrupt or Hardware Reset. In Power-save mode, the asynchronous timer continues to
run, allowing the user to maintain a timer base while the rest of the device is sleeping. The ADC
Noise Reduction mode stops the CPU and all I/O modules except asynchronous timer and ADC,
to minimize switching noise during ADC conversions. In Standby mode, the crystal/resonator
Oscillator is running while the rest of the device is sleeping. This allows very fast start-up
combined with low-power consumption.
The device is manufactured using Atmels high density non-volatile memory technology. The
Flash Program memory can be reprogrammed In-System through an SPI serial interface, by a
conventional non-volatile memory programmer, or by an On-chip boot program running on the
AVR core. The boot program can use any interface to download the application program in the
Application Flash memory. Software in the Boot Flash Section will continue to run while the
Application Flash Section is updated, providing true Read-While-Write operation. By combining
an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic chip, the Atmel

Page 16

Home Automation System Using Android Application

ATmega8 is a powerful microcontroller that provides a highly-flexible and cost-effective solution


to many embedded control applications.
The ATmega8 is supported with a full suite of program and system development tools, including
C compilers, macro assemblers, program simulators, and evaluation kits.
Block diagram:

Fig 4.1:block diagram of ATMEGA8

Page 17

Home Automation System Using Android Application

Pin Description:

Fig 4.2: pin description of ATMEGA8

VCC:

Supply voltage.

GND:

Ground.

Port B (PB7..PB0) XTAL1/XTAL2/TOSC1/ TOSC2

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

Home Automation System Using Android Application

inverting Oscillator amplifier. If the Internal Calibrated RC Oscillator is used as chip clock
source, PB7..6 is used as TOSC2..1input for the Asynchronous Timer/Counter2 if the AS2 bit in
ASSR is set.

Port C (PC5..PC0)

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

PC6/RESET:

If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical
characteristics of PC6 differ from those of the other pins of Port C. If the RSTDISBL Fuse is
unprogrammed, PC6 is used as a Reset input. A low level on this pin for longer than the
minimum pulse length will generate a Reset, even if the clock is not running.

Port D (PD7..PD0)

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

RESET:

Reset input. A low level on this pin for longer than the minimum pulse length will generate a
reset, even if the clock is not running.

XTAL1:
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

Page 19

Home Automation System Using Android Application

XTAL2:
Output from the inverting oscillator amplifier.

Oscillator Characteristics:
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be
configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or
ceramic resonator may be used. To drive the device from an external clock source, XTAL2
should be left unconnected while XTAL1 is driven as shown in Figure 6.2. There are no
requirements on the duty cycle of the external clock signal, since the input to the internal

clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage
high and low time specifications must be observed.

FIG 4.3: Oscillator Connections

Page 20

Home Automation System Using Android Application

FIG 4.4: External Clock Drive Configuration

Idle Mode:
In idle mode, the CPU puts itself to sleep while all the on chip peripherals remain active. The
mode is invoked by software. The content of the on-chip RAM and all the special functions
registers remain unchanged during this mode. The idle mode can be terminated by any enabled
interrupt or by a hardware reset.
Power down Mode:
In the power down mode the oscillator is stopped, and the instruction that invokes power down is
the last instruction executed. The on-chip RAM and Special Function Registers retain their
values until the power down mode is terminated. The only exit from power down is a hardware
reset. Reset redefines the SFRs but does not change the on-chip RAM. The reset should not be
activated before VCC is restored to its normal operating level and must be held active long
enough to allow the oscillator to restart and stabilize.

3.2 Relay:
A relay is an electrically operated switch. Many relays use an electromagnet to operate a
switching mechanism mechanically, but other operating principles are also used. Relays are used
where it is necessary to control a circuit by a low-power signal (with complete electrical isolation
between control and controlled circuits), or where several circuits must be controlled by one
signal.

Page 21

Home Automation System Using Android Application

Fig4.5: various relay


A relay is an electrically operated switch. Current flowing through the coil of the relay creates a
magnetic field which attracts a lever and changes the switchcontacts. The coil current can be on
or off so relays have two switch positions and most have double throw (changeover) switch
contacts as shown in the diagram.

Fig 4.6: Relay showing coil and switch contacts

Relays allow one circuit to switch a second circuit which can be completely separate from the
first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains
circuit. There is no electrical connection inside the relay between the two circuits; the link is
magnetic and mechanical.
The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but it can be
as much as 100mA for relays designed to operate from lower voltages. Most ICs (chips) cannot
provide this current and a transistor is usually used to amplify the small IC current to the larger
value required for the relay coil. The maximum output current for the popular 555 timer IC is
200mA so these devices can supply relay coils directly without amplification.

Page 22

Home Automation System Using Android Application

Relays are usually SPDT or DPDT but they can have many more sets of switch contacts, for
example relays with 4 sets of changeover contacts are readily available. For further information
about switch contacts and the terms used to describe them please see the page on switches
Most relays are designed for PCB mounting but you can solder wires directly to the pins
providing you take care to avoid melting the plastic case of the relay.
The suppliers catalogue should show you the relays connections. The coil will be obvious and it
may be connected either way round. Relay coils produce brief high voltage spikes when they
are switched off and this can destroy transistors and Ics in the circuit. To prevent damage you
must connect a protection diodeacross the relay coil.
The figure shows a relay with its coil and switch contacts. You can see a lever on the left being
attracted by magnetism when the coil is switched on. This lever moves the switch contacts.

Fig4.7: internal circuit of relay

There is one set of contacts (SPDT) in the foreground and another behind them, making the relay
DPDT.
The relay's switch connections are usually labelled COM, NC and NO:

COM = Common, always connect to this; it is the moving part of the switch.

NC = Normally Closed, COM is connected to this when the relay coil is off.

NO = Normally Open, COM is connected to this when the relay coil is on.

Page 23

Home Automation System Using Android Application

Applications of relays:
Relays are used for:

Control a high-voltage circuit with a low-voltage signal, as in some types of


modems or audio amplifiers.

Control a high-current circuit with a low-current signal, as in the starter solenoid of


an automobile.

Detect and isolate faults on transmission and distribution lines by opening and
closing circuit breakers.

Time delay functions. Relays can be modified to delay opening or delay closing a
set of contacts. A very short (a fraction of a second) delay would use a copper disk
between the armature and moving blade assembly. Current flowing in the disk
maintains magnetic field for a short time, lengthening release time. For a slightly
longer (up to a minute) delay, a dashpot is used. A dashpot is a piston filled with
fluid that is allowed to escape slowly. The time period can be varied by increasing
or decreasing the flow rate. For longer time periods, a mechanical clockwork timer
is installed.

4.3: Voltage Regulator (7805) :


The LM78XX/LM78XXA series of three-terminal positive regulators are available in the TO220/D-PAK package and with several fixed output voltages, making them useful in a Wide range
of applications. Each type employs internal current limiting, thermal shutdown and safe
operating area protection, making it essentially indestructible. If adequate heat sinking is
provided, they can deliver over 1A output Current. Although designed primarily as fixed voltage
regulators, these devices can be used with external components to obtain adjustable voltages and
currents.

Page 24

Home Automation System Using Android Application

Fig 4.8: connection of 7805

Features:

Output Current up to 1A.

Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V.

Thermal Overload Protection.

Short Circuit Protection.

Output Transistor Safe Operating Area Protection.

Internal Block Diagram:

Fig4.9. Block Diagram of voltage Regulator

Absolute Maximum Ratings

Page 25

Home Automation System Using Android Application

Table 1: Ratings of the Voltage Regulator

4.4 Relay driver IC (ULN2003):

Fig 4.10: pin configuration of ULN2003

FEATURES
500-mA-Rated Collector Current (Single Output)
High-Voltage Outputs: 50 V
Output Clamp Diodes

Page 26

Home Automation System Using Android Application

Inputs Compatible With Various Types of Logic


Relay-Driver Applications

4.5 Resistor:

Fig4.11: resistors

Electronic Symbol
(Europe)

(US)
A resistor is a two-terminalelectronic component that produces a voltage across its terminals
thatis proportional to the electric current through it in accordance with Ohm's law:
V = IR
Resistors are elements of electrical networks and electronic circuits and are ubiquitous in most
electronic equipment. Practical resistors can be made of various compounds and films, as well as
resistance wire (wire made of a high-resistivity alloy, such as nickel/chrome).The primary
characteristics of a resistor are the resistance, the tolerance, maximum working voltage and the
power rating. Other characteristics include temperature coefficient,noise, and inductance. Less
well-known is critical resistance, the value below which power dissipation limits the maximum
permitted current flow, and above which the limit is applied voltage. Criticalresistance depends
Page 27

Home Automation System Using Android Application

upon the materials constituting the resistor as well as its physical dimensions; it's determined by
design.Resistors can be integrated into hybrid and printed circuits, as well as integrated circuits.
Size and position of leads (or terminals) are relevant to equipment designers; resistors must be
physically large enough not to overheat when dissipating their power.

4.6 Capacitor:

Fig 4.12:Modern capacitors, by a cm rule

A capacitor or condenser is a passiveelectronic component consisting of a pair of conductors


separated by a dielectric. When a voltagepotential difference exists between the conductors, an
electric field is present in the dielectric. This field stores energy and produces a mechanical force
between the plates. The effect is greatest between wide, flat, parallel, narrowly separated
conductors.
An ideal capacitor is characterized by a single constant value, capacitance, which is measured in
farads. This is the ratio of the electric charge on each conductor to the potential difference
between them. In practice, the dielectric between the plates passes a small amount of leakage
current. The conductors and leads introduce an equivalent series resistance and the dielectric
has an electric field strength limit resulting in a breakdown voltage.
Capacitors are widely used in electronic circuits to block the flow of direct current while
allowing alternating current to pass, to filter out interference, to smooth the output of power
supplies, and for many other purposes. They are used in resonant circuits in radio frequency
equipment to select particular frequencies from a signal with many frequencies.

Page 28

Home Automation System Using Android Application

Ceramic capacitor
In electronics ceramic capacitor is a capacitor constructed of alternating layers of metal and
ceramic, with the ceramic material acting as the dielectric. The temperature coefficient depends
on whether the dielectric is Class 1 or Class 2. A ceramic capacitor (especially the class 2) often
has high dissipation factor, high frequency coefficient of dissipation.

Fig 4.13: Ceramic capacitors


A ceramic capacitor is a two-terminal, non-polar device. The classical ceramic capacitor is the
"disc capacitor". This device pre-dates the transistor and was used extensively in vacuum-tube
equipment (e.g., radio receivers) from about 1930 through the 1950s, and in discrete transistor
equipment from the 1950s through the 1980s. As of 2007, ceramic disc capacitors are in
widespread use in electronic equipment, providing high capacity & small size at low price
compared to other low value capacitor types.

Ceramic capacitors come in various shapes and styles, including:

disc, resin coated, with through-hole leads

multilayer rectangular block, surface mount

bare leadless disc, sits in a slot in the PCB and is soldered in place, used for UHF
applications

Page 29

Home Automation System Using Android Application

tube shape, not popular now

Electrolytic capacitor

Figure 4.14: Axial lead (top) and radial lead (bottom) electrolytic capacitors
An electrolytic capacitor is a type of capacitor that uses an ionic conducting liquid as one of its
plates with a larger capacitance per unit volume than other types. They are valuable in relatively
high-current and low-frequency electrical circuits. This is especially the case in power-supply
filters, where they store charge needed to moderate output voltage and current fluctuations in
rectifier output. They are also widely used as coupling capacitors in circuits where AC should be
conducted but DC should not.
Electrolytic capacitors can have a very high capacitance, allowing filters made with them to have
very low corner frequencies.

4.7 Light-emitting diode:


A light-emitting diode (LED) is an electronic light source. LEDs are used as indicator lamps in
many kinds of electronics and increasingly for lighting. LEDs work by the effect of
electroluminescence, discovered by accident in 1907. The LED was introduced as a practical
electronic component in 1962. All early devices emitted low-intensity red light, but modern
LEDs are available across the visible, ultraviolet and infra red wavelengths, with very high
brightness.
LEDs are based on the semiconductor diode. When the diode is forward biased (switched on),
electrons are able to recombine with holes and energy is released in the form of light. This effect

Page 30

Home Automation System Using Android Application

is called electroluminescence and the color of the light is determined by the energy gap of the
semiconductor. The LED is usually small in area (less than 1 mm2) with integrated optical
components to shape its radiation pattern and assist in reflection.

Fig4.15: led intenal circuit


LEDs present many advantages over traditional light sources including lower energy
consumption, longer lifetime, improved robustness, smaller size and faster switching. However,
they are relatively expensive and require more precise current and heat management than
traditional light sources.
Applications of LEDs are diverse. They are used as low-energy indicators but also for
replacements for traditional light sources in general lighting, automotive lighting and traffic
signals. The compact size of LEDs has allowed new text and video displays and sensors to be
developed, while their high switching rates are useful in communications technology.

Page 31

Home Automation System Using Android Application

Fig4.16: various LED

4.8 Push button:


A push-button or simply button is a simple switch mechanism for controlling some aspect of
a machine or a process. Buttons are typically made out of hard material, usually plastic or metal.
The surface is usually flat or shaped to accommodate the human finger or hand, so as to be easily
depressed or pushed. Buttons are most often biased switches, though even many un-biased
buttons (due to their physical nature) require a spring to return to their un-pushed state. Different
people use different terms for the "pushing" of the button, such as press, depress, mash,
and punch.

Fig4.18: push buttton

Page 32

Home Automation System Using Android Application

4.9 Crystal Oscillator:


A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonanceof a
vibrating crystal of piezoelectric

material to

create

an

electrical

signal

with

very

precise frequency. This frequency is commonly used to keep track of time (as in quartz
wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize
frequencies for radio transmitters and receivers. The most common type of piezoelectric
resonator used is the quartz crystal, so oscillator circuits incorporating them became known as
crystal oscillators, but other piezoelectric materials including polycrystalline ceramics are used in
similar circuits.
Quartz crystals are manufactured for frequencies from a few tens of kilohertz to hundreds of
megahertz. More than two billion crystals are manufactured annually. Most are used for
consumer devices such as wristwatches, clocks, radios, computers, and cell phones. Quartz
crystals are also found inside test and measurement equipment, such as counters, signal
generators, and oscilloscopes.

Fig 4.19: oscillator

4.10 TRIAC:
TRIACs are a subset of thyristors and are closely related to silicon-controlled rectifiers (SCR).
However, unlike SCRs, which are unidirectional devices (that is, they can conduct current only
in one direction), TRIACs are bidirectional and so allow current in either direction. Another
difference from SCRs is that TRIAC current can be enabled by either a positive or negative
current applied to its gate electrode, whereas SCRs can be triggered only by positive current into

Page 33

Home Automation System Using Android Application

the gate. To create a triggering current, a positive or negative voltage has to be applied to the gate
with respect to the MT1 terminal (otherwise known as A1).

Fig 4.20: pin configuration of TRIAC (BT136)


Once triggered, the device continues to conduct until the current drops below a certain threshold
called the holding current.
The bidirectionality makes TRIACs very convenient switches for alternating current circuits,
also allowing them to control very large power flows with milliampere-scale gate currents. In
addition, applying a trigger pulse at a controlled phase angle in an A.C. cycle allows control of
the percentage of current that flows through the TRIAC to the load (phase control), which is
commonly used, for example, in controlling the speed of low-power induction motors, in
dimming lamps, and in controlling A.C. heating resistors.

4.11 Optocoupler:
Optocoupler, also called an opto-isolator, photocoupler, or optical isolator, is a component that
transfers electrical signals between two isolated circuits by using light. Opto-isolators prevent
high voltages from affecting the system receiving the signal. Commercially available optoisolators withstand input-to-output voltages up to 10 and voltage transients with speeds up to 10
kV/s.
A common type of opto-isolator consists of an LED and a phototransistor in the same opaque
package. Other types of source-sensor combinations include LED-photodiode, LED-LASCR,
and lamp-photoresistor pairs. Usually opto-isolators transfer digital (on-off) signals, but some
techniques allow them to be used with analog signals.

Page 34

Home Automation System Using Android Application

Fig 4.21: pin configuration of optocoupler


An opto-isolator contains a source (emitter) of light, almost always a near infrared light-emitting
diode (LED), that converts electrical input signal into light, a closed optical channel (also called
dielectrical channel[7]), and a photosensor, which detects incoming light and either generates
electric energy directly, or modulates electric current flowing from an external power supply. The
sensor can be a photoresistor, a photodiode, a phototransistor, a silicon-controlled rectifier (SCR)
or a triac. Because LEDs can sense light in addition to emitting it, construction of symmetrical,
bidirectional opto-isolators is possible. An optocoupled solid state relay contains a photodiode
opto-isolator which drives a power switch, usually a complementary pair of MOSFETs. A slotted
optical switch contains a source of light and a sensor, but its optical channel is open, allowing
modulation of light by external objects obstructing the path of light or reflecting light into the
sensor.

4.12 Diode:
Diodeis a two-terminal electronic component with asymmetric conductance; it has low (ideally
zero) resistance to current in one direction, and high (ideally infinite) resistance in the other. A
semiconductor diode, the most common type today, is a crystalline piece of semiconductor
material with a pn junction connected to two electrical terminals.[5] A vacuum tube diode has
two electrodes, a plate (anode) and a heated cathode. Semiconductor diodes were the first
semiconductor electronic devices. The discovery of crystals' rectifying abilities was made by
German physicist Ferdinand Braun in 1874.

Page 35

Home Automation System Using Android Application

Fig 4.22: diode pin configuration and symbol

Chapter 5

Conclusion & Future Scope

Page 36

Home Automation System Using Android Application

5.1 CONCLUSION
This is a proto type project. Our prime objective is to assist handicapped/old aged people. This
gives us basic idea of how to control various home appliances and provide a security using
Android phone/tab. This project is based on Android and Arduino platform both of which are
FOSS (Free Open Source Software). So the overall implementation cost is very cheap and it is
affordable by a common person. Looking at the current scenario we have chosen Android
platform so that most of the people can get benefit.
The design consists of Android phone with home automation application, Arduino Mega ADK.
User can interact with the android phone and send control signal to the Arduino ADK which in
turn will control other embedded devices/sensors. We have discussed a simple prototype but in
future it can be expanded to many other areas.

5.2 FUTURE SCOPE


Looking at the current situation we can build cross platform system that can be deployed on
various platforms like iOS, Windows. Limitation to control only several devices can be removed
by extending automation of all other home appliances. Security cameras can be controlled,
allowing the user to observe activity around a house or business. Security systems can include
motion sensors that will detect any kind of unauthorized movement and notify the user. Scope of
this project can be expanded to many areas by not restricting to only home. It will be flexible to
support various wired as well as other wireless technologies like Zigbee, Wi-Fi, World Wide
Web.

Page 37

Home Automation System Using Android Application

APPENDIX 1
COMPONENT LIST:

Microcontroller ATMEGA8
Relay driver IC ULN2003
Relay 12v
Diode 1N4007
Resistor 1k ohm
Ceramic capacitor(104 P F)
Electrolyte capacitor (220micro F)
TRIAC (BT136)
Optocoupler (MOC3021M)
Bluetooth module (hc05)
Voltage regulator (7805)
Oscillator (16.0)

Page 38

Home Automation System Using Android Application

APPENDIX 2
CODE:
#include<reg51.h>
sbit relay1=P2^3;
sbit relay2=P2^4;
sbit relay3=P2^5;
sbit relay4=P2^6;
unsigned char f=0x00;
voidini()
// Initialize Timer 1 for serial communication
{
TMOD=0x20; //Timer1, mode 2, baud rate 9600 bps
TH1=0XFD;
SCON=0x50;
TR1=1;
TI=0;
}
voidrecieve()//Function to receive serial data
{
while(RI==0);
f=SBUF;
RI=0;
}

void main()
{
ini();
relay1=0;
relay2=0;
relay3=0;
relay4=0;

Page 39

Home Automation System Using Android Application

while(1)
{
recieve();
if(f==0X41) ////A
{
relay1=1;
}
else if(f==0X61)
{
relay1=0;

////a

}
else if(f==0X42) ////B
{
relay2=1;
}
else if(f==0X62) ////b
{
relay2=0;
}
else if(f==0X43) ////C
{
relay3=1;
}
else if(f==0X63) ////c
{
relay3=0;
}
else if(f==0X44) ////D
{
relay4=1;
}
else if(f==0X64) ////d
{
relay4=0;

Page 40

Home Automation System Using Android Application

else if(f==0X45) ////E


{
relay1=1;
relay2=1;
relay3=1;
relay4=1;

}
else if(f==0X65) ////e
{
relay1=0;
relay2=0;
relay3=0;
relay4=0;

}
else
{
relay1=0;
relay2=0;
relay3=0;
relay4=0;

}
}
}

REFERENCES

Page 41

Home Automation System Using Android Application

International Journal of Electronics Communication and Computer Technology (IJECCT)


Volume 3 Issue 2 (March 2013) www.ijecct.org
Android official website. http://developer.android.com/
Bluetooth Remote Home Automation System Using

Android

Application.

www.theijes.com
International Journal of Scientific & Engineering Research, Volume 5, Issue 5, May-2014
,ISSN 2229-5518, http://www.ijser.org

Page 42

You might also like