GR12
GR12
Bachelor of Technology
in
UTTARAKHAND- 246174
2
ABSTRACT
The aim of this project is to develop a home automation system that can be controlled
remotely using mobile phone. The home automation is one of the most emerging
trends in modernization of home appliance control. Presently, conventional wall
switches are located in different parts of the house and one has to physically go near
them and press them to turn the loads on/off. It becomes very difficult for the elderly
or physically handicapped people to do so. The another advantage of this project is
that, some time we forget to switch off the home appliances and by this DTMF based
home automation system we can switch on or off from any part of the world.
This system is designed to provide control of home appliances through mobile phone
by dialing the designated number. Dialing can be done from the home phone or a call
made to the number from outside. This system is designed by ARDUINO UNO but is
based on digital logic using DTMF technology (Dual Tone multiple frequency) which
receives the command from the phone to develop digital output. This digital signal is
further processed to actuate switching mechanism through relay driver to turn on/off
the loads/appliances. It can be used to switch appliances from anywhere, overcoming
the limited range of other infrared and radio frequency type controls. This proposed
system gives a new direction to the development of home automation.
3
CONTENTS
CERTIFICATE - PG 2
DECLARATION--> PG 3
CERTIFICATE of ACCEPTANCEPG 4
ABSTRACT -->PG 5
LIST OF FIGURES-->7
LIST OF TABLES-->8
Introduction-->PG 9
41 REFERENCE PG 42
4
LIST OF FIGURES
5
LIST OF TABLES
6
Introduction
7
PROJECT SETUP:
Figure. 1: SETUP
8
Project Description
Imagine how helpful it will be to be able to switch on your air conditioning system ten
minutes before you get home on a hot afternoon in June. How about having a security system
that will detect smoke, excessive electrical power usage, burglar attempts and unauthorized
movements in your house and alert you? This is what home automation is about and there
is no end to its application. In fact, sophisticated home automation systems are now being
developed that can maintain an inventory of household items and prepare a shopping list
or automatically order replacements.
Home automation has made it possible to have what is often referred to as a 'smart home', a
home that can detect and identify you, automatically adjust the lighting to your predefined taste,
open doors automatically, play your favourite music, water your flowers in the morning, switch
on the security lights at night and switch them off in the morning, heat water for bathe and tea,
stream to you anywhere in the world via the internet a live video of what is happening in and
around your house. It makes it possible to link lighting, entertainment, security,
telecommunications, heating, and air conditioning into one centrally controlled system. This
allows you to make your house an active partner in managing your busy life. Nowadays in
foreign land, you can hardly find a house without a home automation system which can range
from the remote for the television, burglar alarm and hi-tech security gates, to an automated
air conditioning system that maintains the temperature at a predefined value.
AUTOMATION
Automation is the use of control systems and information technology to control equipment,
industrial machinery and processes, reducing the need for human intervention. In the scope of
industrialization, automation is a step beyond mechanization. Mechanization provided
human operators with machinery to assist them with the physical requirements of work while
automation greatly reduces the need for human sensory and mental requirements as well.
Automation plays an increasingly important role in the global economy and in daily
experience. Engineers strive to combine automated devices with mathematical and
organizational tools to create complex systems for a rapidly expanding range of applications
and human activities. Many roles for humans in industrial processes
presently lie beyond the scope of automation. Human- level pattern recognition, 11
language recognition, and language production ability are well beyond the
capabilities of modern mechanical and computer systems. Tasks requiring
subjective assessment or synthesis of complex sensory data, such as scents and sounds,
as well as high-level tasks such as strategic planning, currently require human
expertise. Automation has had a notable impact in a wide range of highly
visible industries beyond manufacturing. Once ubiquitous telephone operators have
been replaced largely by automated telephone switchboards and answering machines.
Medical processes such as primary screening in electrocardiograph or radiography
and laboratory analysis of human genes, blood plasmas, cells, and tissues are carried out
at much greater speed and accuracy by automated systems. Automated teller machines
have reduced the need for bank visits to obtain cash and carry out transactions.
In general, automation has been responsible for the shift in the world economy
from agrarian to industrial in the 19th century and from industrial to services in the
20th century.
Home Automation
Arduino Home Automation lets you operate your home appliances like lights and
water pump from your office or any other remote place. So if you forgot to switch off
the lights or other appliances while going out, it helps you to turn off the appliance
with your cell phone. Your cell phone works as remote control to your home
appliances. You can control the desired appliance by presenting the corresponding
key.
12
PROJECT OBJECTIVE:
The objective of this project is to implement a low cost, reliable and scalable home
automation system that can be used to remotely switch on or off any
household appliance, using a microcontroller to achieve hardware simplicity,
low cost short message service (SMS) for feedback and voice dial from any
phone to toggle the switch state.
13
Components used:
1. MICROCONTROLLER
14
Arduino is an open source electronics prototyping platform that is flexible, easy-to-use
hardware and software. It is designed for artists, designers, hobbyists and anyone
interested in creating interactive objects or environments. Arduino Uno is basically
based on ATmega328 microcontroller (MCU). It consists of 14 digital input/output
pins, six analogue inputs, a USB connection used for programming the onboard MCU,
a power jack, an ICSP header and a reset button. It is operated with the help of a
16MHz crystal oscillator and contains everything needed to support the MCU. It is
very easy to use as we simply need to connect it to a computer using a USB cable, or
power it with an AC-to-DC adaptor or battery to get started. The MCU onboard is
programmed in Arduino programming language using Arduino IDE.
15
Differences with other boards
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.
Power
The Arduino/Genuino Uno board 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. The board can operate on an external supply from 6 to 20 volts.
If supplied with less than 7V, however, the 5V pin may supply less than five volts and
the board may become 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/Genuino 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. 18 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/Genuino 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 to work with the 5V or 3.3V.
Memory
The ATmega328 has 32 KB (with 0.5 KB occupied by the bootloader). It also has 2 KB
of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM
library).
16
Input and Output
See the mapping between Arduino pins and ATmega328P ports. The mapping for the
Atmega8, 168, and 328 is identical.
• LED: 13. There is a built-in LED driven by digital pin 13. When the pin is HIGH value, the
LED is on, when the pin is LOW, it's off.
• TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.
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 analo
Reference () function. 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.
A Software Serial library allows serial communication on any of the Uno's digital pins.
Arduino/Genuino Uno has a number of facilities for communicating with a computer,
another Arduino/Genuino board, or other microcontrollers. The ATmega328 provides UART
TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An
ATmega16U2 on 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, an .inf file is
required. The Arduino Software (IDE) includes a serial monitor which allows simple textual
data to be sent to and from the 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
23
4
3. RELAYS
In order to enable a circuit to be isolated from the system only under faulty
conditions, protective relays are used. In normal cases, it is open circuit relay. The
relay is usually provided with 4 terminals, two of which are connected to relay
winding and other two are connected to the circuit to be controlled. It has following
characteristics:
• Sensitivity
• Speed
• Selectivity
iron core & its surrounding coil of wire. An iron yoke provides a low reluctance path
for magnetic flux, the yoke being shaped so that the magnetic circuit can be closed by a
movable piece of iron called the armature, and a set of contacts. The armature is
hinged to the yoke and is held by a string in such a way that there is an air gap in the
magnetic circuit. Figure shows the principle of operation of this relay. When an electric
current flows in the coil, the armature is attracted to the iron core. Electrical switching
contacts are mounted on the armature. When the armature coil is energized, these
movable contacts break their connections with one set of fixed contacts and close a
connection to a previously open contact. When electric power is removed from the
DIODE: A relay coil is not only an electromagnet but it's also an inductor. When power
is applied to the coil the current in the coil builds up and levels off at its rated current
(depends on the DC resistance of the coil, I = V/R). Some energy is now stored in the
coil's magnetic field (E = 05LI2). When the current in the coil is turned off this stored
energy has to go somewhere. The voltage across the coil quickly increase trying to
keep the current in the coil flowing in the same direction (V = Ldi/dt). This voltage
spike can reach hundreds or thousands of volts and can damage electronic parts.
By adding a flyback diode the current has a path to continue flowing through coil until
26
the stored energy is used up. The diode also clamps the voltage across the coil to about
0.7V protecting the electronics. The stored energy dissipates quickly in the diode
(E = V*I*t). The current stops flowing and the relay turns off. The diode should be
able to handle the coil current for a short time and switch relatively fast. Note: A
resistor or zener diode can be placed in series with the diode to use up the stored
energy quicker. This increases the amplitude of the voltage spike above 0.7V but the
energy is used up quicker (i.e. the voltage spike won't last as long).
ULN2003
The ULx200xA devices are high-voltage, high-current. Darlington transistor arrays.
Each consists of seven NPN Darlington pairs that feature high-voltage outputs with
loads. The collector-current rating of a single Darlington pair is 500 mA. The
include relay drivers, hammer drivers, lamp drivers, display drivers (LED and gas
discharge), line drivers, and logic buffers. For 100-V (otherwise interchangeable)
versions of the ULx2003A devices, see the SLRS023 data sheet for the SN75468
andSN75469devices.
27
Fig 7:Pin Diagram of ULN2003
28
Fig 8: Connection of Relay and Uno
29
RELAY USED: Four-Channel Relay Module
A relay is a device which allows us to turn on or turn off a circuit with voltage and
which is much higher than what Arduino could handle. Relay provides complete
isolation between the low-voltage circuit placed on the Arduino side and the high-
voltage side which is connected to the load. For this project we have used a 4 channel,
5V relay. This 5V 4-channel relay interface board and each channel needs a 15-20mA
driver current. It can be used to control various home appliances and equipment with
large current. It has a standard interface that can be controlled directly by
microcontroller.
Project Analysis
KEYPAD:
A keypad (generator or encoder) generates a sinusoidal tone which is mixture of the
row and column frequencies. The DTMF Keypad is laid out in a 4×4 matrix of push
buttons. The row frequencies are low group frequencies. The column frequencies
31
belong to high group frequencies. This prevents misinterpretation of the harmonics.
Also the frequencies for DTMF are so chosen that none have a harmonic relationship
with the others and that mixing the frequencies would not produce sum or product
frequencies that could mimic another valid tone. The high-group frequencies (the
column tones) are slightly louder than the low-group to compensate for the high
frequency roll off of voice audio systems.
Pressing a key sends a combination of the row and column frequencies. For example,
the key 1 produces a superimposition of tones of 697 and 1209 (Hz). Initial
pushbutton designs employed levers, so that each button activated two contacts. The
tones are decoded by the switching centre to determine the keys pressed by the user.
32
column tones) are slightly louder than the low-group to compensate for the high-
frequency roll off of voice audio systems.
Pressing a key sends a combination of the row and column frequencies. For example,
the key 1 produces a superimposition of tones of 697 and 1209 (Hz). Initial
pushbutton designs employed levers, so that each button activated two contacts. The
tones are decoded by the switching centre to determine the keys pressed by the user.
33
CONNECTIONS:
The above figure (5) depicts the connection of the entire system. When the user dials
the home mobile number the phone at home rings and if nobody picks the call, then
the system picks up the call automatically. When we press any number on the phone
keypad it generates a particular frequency, which is received by the other phone and
then the code/number is decoded by the DTMF decoder /receiver. Here the decoder
decodes the frequency of the tone generated by the particular code/number. The
34
DTMF decoder generates a binary output which is given to the microcontroller. Here
a program code is fed to the microcontroller which activates the relay module
according to the key pressed by the user. At the output of the microcontroller the
devices are connected to a 4-channel relay module. It is a driver which drives the
appliances based on the microcontroller output. Thus, when the relay drive is
activated by the microcontroller, the device either gets ON or is switched OFF as per
the requirement
The Decoder, Arduino UNO and the relay module gets the DC supply
from the power supply unit. The DTMF decoder (MT8870) is connected to the
Arduino UNO which in turn is connected to the relay module. The output of the
relay module is connected to various loads. In our project we have used four loads
(bulbs) for demonstration. The entire connection is made through jumper wires.
CODE:
35
36
37
38
Project Outcome
39
In our testing we found that our system is operating successfully. When the call is
initiated and the keys are pressed upon the cell-phone, the DTMF decoder decodes
the signal into binary form. This is further processed by the microcontroller to
generate the specific signal to drive the relay module for driving the output devices
connected to it. The key pressed by the user, the binary code output by the decoder
and the resulting action performed by the driving circuit is shown in TABLE.2.
TABLE.1: Observation
40
Advantages
• It is a robust and easy to use system.
• There is no need for extra training of that person who is using it.
• All the control would be in your hands by using this home automation system
• One can control home appliances from anywhere.
• It reduces wastage of electricity if someone forgets to switch off any
appliance connected to the system if we were away.
• It is very low cost compared to other technologies like GSM.
Disadvantages
• Lack of security. Anyone can control the appliances by connecting to the mobile
connected to DTMF module.
• Number of appliances is limited as our mobile can generate only 16 tones.
• One mobile phone should always be connected to the system
41
Future Work
• Memory can be used to store the appliance status during power failure.
Conclusion:
It has been possible to control all home appliances automatically using our
own mobile phones.
42
REFERENCES:
43