0% found this document useful (0 votes)
26 views35 pages

GR12

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views35 pages

GR12

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 35

ARDUINO BASED HOMEAUTOMATION

MINI PROJECT REPORT

Submitted in partial fulfilment of the

requirements for the award of the degree of

Bachelor of Technology

in

ELECTRONICS & COMMUNICATION ENGINEERING


By

PRIYANSHU 21134502017 2021-2025


VISHWAKARMA
ANAMIKA SINGH 21134502029 2021-2025
SANJEEV KUMAR 21134502032 2021-2025
SINGH

DEPARTMENT OF ELECRONICS AND COMMUNICATION ENGINEERING

HEMVATI NANDAN BAHUGUNA GARHWAL UNIVERSITY

SRINAGAR GARHWAL (PAURI GARHWAL)

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 ACCEPTANCEPG 4

ABSTRACT -->PG 5

CONTENTS-->Error! Bookmark not defined. 6

LIST OF FIGURES-->7

LIST OF TABLES-->8

Introduction-->PG 9

1.1 problem description Error! Bookmark not defined. 11

1.2 problem objective Error! Bookmark not defined.

1.3 components used PG 14

1.4 analysis PG 30

1.5 outcome Error! Bookmark not defined.6 conclusions PG

41 REFERENCE PG 42

4
LIST OF FIGURES

Fig 1 PROJECT SETUP 10


Fig 2 ARDUINO UNO 14
Fig 3 DTMF DECODER 19
Fig 4 PIN DIAGRAM OF MT8870IC 22
Fig 5 DTMF LOW AND HIGH FREQUENCY 24
Fig 6 OPERATING PRINCIPAL OF RELAY 26
Fig 7 PIN DIAGRAM OF ULN2003 28
Fig 8 CONNECTION OF RELAY AND UNO 29
Fig 9 FOUR CHANNEL RELAY MODULE 30

Fig 10 DTMF DIALLING 31

Fig 11 DTMF KEYPAD 32

Fig 12 CONNECTION LAYOUT OF HARDWARE 33

Fig 13 PHYSICAL CONNECTION 38

5
LIST OF TABLES

Table 1 ARDUINO SPECIFICATION 15


Table 2 LOW AND HIGH FREQUENCY OUTPUT 24

6
Introduction

Conventionally, electrical appliances in a home were controlled via switches that


regulate the electricity to these devices. Today, we have entered the era of technology.
Gone are the days were manual operation were performed. Home automation is
becoming more popular around the world and is becoming a common practice. Smart
home automation becomes important, because it provides the user the comfort and
easy access to the home appliances. The process of home automation works by making
everything in the house automatically controlled, using technology to control and do
the jobs that we would normally do manually. Home automation takes care of a lot of
different activities in the house. In this project, we propose a unique System for Home
automation utilizing that is paired with a wireless module to provide seamless
wireless control over many devices in a house. We can operate our system from any
distant or remote area. It is a wireless system but instead of using a separate wireless
module (transmitter and receiver) we are using the cell phones for this purpose. Cell-
phone operated system is having a wide range (service provider range), less fear of
interference as every call is having a unique frequency and moreover it has more
control keys.
Arduino UNO and the relay module. With the inter-connection of these components
and with use of a cell phone as a remote we were successful in controlling various
home appliances. For this the system we have used lamps to demonstrate AC loads
and a 12V transformer to power the system. The advantages of using this technology
are many. One can control home appliances from anywhere in the world. It helps in
reducing the wastage of electricity. The cost for this system is also less as compared to
other technologies like GSM.

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

Home automation may designate an emerging practice of increased automation


of household appliances and features in residential dwellings, particularly through
electronic means that allow for things impracticable, overly expensive or simply
not possible in recent decades. Home automation includes all that a building
automation provides like climate controls, door and window controls, and in addition
control of multimedia home theatres, pet feeding, plant watering and so on. But there
exists a difference in that home automation emphasizes more on comforts through
ergonomics and ease of operation.

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

A microcontroller is a compact microcomputer designed to govern the operation of


embedded systems in motor vehicles, robots, office machines, complex medical
devices, and various other devices. A typical microcontroller includes a processor,
memory, and peripherals. The simplest microcontrollers facilitate the operation of the
electromechanical systems found in everyday convenience items. Originally, such use
was confined to large machines such as furnaces and automobile engines to optimize
efficiency. In recent years, microcontrollers have found their way into common items
such as ovens, refrigerators, toasters, Microcomputers are also common in office
machines such as photocopiers, scanners, and printers. The most sophisticated
microcontrollers perform critical functions in aircraft, spacecraft, oceangoing vessels,
life-support systems, and robots of all kinds. Medical technology offers especially
promising future roles. For example, a microcontroller might regulate the operation of
an artificial heart, artificial kidney, or other artificial body organ. Microcomputers can
also function with prosthetic devices (artificial limbs). A few medical-science futurists
have suggested that mute patients might someday be able, in effect, to speak out loud
by thinking of the words they want to utter, while a microcontroller governs the
production of audio signals to drive an amplifier and loudspeaker.

MICROCONTROLLER USED: ARDUINO UNO

Figure 2: Arduino UNO

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.

ARDUINO UNO SPECIFICATION:

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.

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 20 mA as recommended operating condition and has
an internal pull-up resistor (disconnected by default) of 20-50k ohm. A maximum of 40mA is
the value that must not be exceeded on any I/O pin to avoid permanent damage to the
microcontroller.
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.

• 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.

communication on pins 0 and 1). 17


COMMUNICATION

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

3.2.1 TYPES OF RELAYS:

• Electromagnetic Attraction Type: These relays are actuated by DC or AC quantities.


• Electromagnetic Induction Type: its operation depends upon EMI phenomena.
• Thermal Relays: its operation depends upon the heating effect of electric Current.
• Distance Relays: its operation depends upon the ratio of voltage to current.

3.2.2 ELECTROMAGNETIC RELAY:


These relays are electromagnetically operated. The parts of these relays are an

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

relay coil, spring returns the armature to its original position.


25
Standard voltages for D.C. relay are 6,12,24,48 & 110 volts and for A.C. relays
are
6,12,24,48,120 & 240 volts.

Fig 6:Basic Diagram Showing the Operating


Principle of a Relay

3.2.4 RELAY CIRCUIT

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

common-cathode clamp diodes for Simplified Block Diagram switching inductive

loads. The collector-current rating of a single Darlington pair is 500 mA. The

Darlington pairs can be paralleled for higher current capability. Applications

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

Fig. 9: 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.

Figure. 11: Keypad

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.

Figure. 11: Keypad

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.

Number Binary Output of Action


DTMF Decoder

1 0001 Device 1 will


be ON

2 0010 Device 1 will


be OFF

3 0011 Device 2 will


be ON

4 0100 Device 1 will


be OFF

5 0101 Device 3 will


be ON

6 0110 Device 1 will


be OFF

7 0111 Device 4 will


be ON

8 1000 Device 1 will


be OFF

9 1001 All devices


will be ON

0 1100 All devices will


be OFF

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.

• Appliance scheduler/timer can be implemented using RTC (Real Time Clock).

• Can be converted to an IoT device using Wi-Fi connectivity.

Conclusion:

Arduino Based Home Automation has been designed and setup.

It has been possible to control all home appliances automatically using our
own mobile phones.

The control of all appliances is possible even from a wide range.

42
REFERENCES:

 ITU's recommendations for implementing DTMF services.


 Frank Durda, Dual Tone Multi- Frequency .
 Griffiths, Melanie (June 2016). "Smart Home Secrityu". Homebuilding & Renovating.
Retrieved 27 February 2012.
 Williams, Elliot (28 March 2015). "Arduino SRL to Distributors: "We're the Real
Arduino""
 Edvard (2013-03-09). "Working Principle of Thermal Motor Protection Relay".

43

You might also like