Sie sind auf Seite 1von 28

1

2
HOME AUTOMATION USING ARDUINO

A Project Report

in partial fulfillment of the degree

Bachelor of Technology
in
Computer Science & Engineering
By

15K41A0541 P.PAVANI REDDY


15K41A0558 V.VINEETH
15K41A05D4 B.ASHRITHA

Under the Guidance of

G.SUNIL REDDY Asst. Professor

Submitted to

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING


S.R.ENGINEERING COLLEGE(A),ANANTHASAGAR,WARANGAL
(Affiliated to JNTUH, Accredited by NBA)

Oct 2018.

3
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

CERTIFICATE

This is to certify that the Project Report entitled “HOME AUTOMATION


USING ARDUINO” is a record of bonafide work carried out by the student
VEMULA VINEETH bearing Roll No 15K41A0558 during the academic year
2018-19 in partial fulfillment of the award of the degree of Bachelor of
Technology in Computer Science & Engineering by the Jawaharlal Nehru
Technological University, Hyderabad.

Supervisor Head of the


Department

4
External Examiner

5
ACKNOWLEDGEMENT

Applying theoretical knowledge to bring out the desired practical output is just climbing a
peak, step by step, sorting out all the potential and crafting them into the requirement. In
fact, it was our team work that has got us all through. Though it will not be enough to
express our gratitude in words to all those people who helped us, we still like to give thanks
to many of them. First of all we take immense pleasure in thanking our head of the
department Asst. Prof. Srinivas Aluvala for valuing our work all through the semester in
regards with our project work. We are always thankful for his generosity in helping his
students through their task with success.

Great deals appreciated go to our faculty in concern, Asst. Prof. G.Sunil Reddy for his
contribution in motivating us all through the semester, sharing his knowledge and his
valuable advices towards the completion of our project. His Attitude towards us in crafting
the project was enthusiastic and drove us in conceptual Orientation.

At last, we owe our true friendship to our fellow students, who had helped us since the
inception of our project and also to those who had helped us in finding resources.

Thanking you,
Pavani Reddy Puli
Vineeth Vemula
Ashritha Bura

6
ABSTRACT

This project presents the overall design of Home Automation System (HAS) with low cost and
wireless system. This system is designed to assist and provide support in order to fulfill the needs of
elderly and disabled in home. Also, the smart home concept in the system improves the standard
living at home. . The switch mode and voice mode are used to control the home appliances. The
video feedback is received in the android application which streams the video of IP- Camera. The
main control system implements wireless 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.

7
TABLE OF CONTENTS

1. INTRODUCTION

1.1 Existing System

1.1.1 ZIgbee based home automation system

1.1.2 SMS based home automation system

1.2 Proposed System

1.2.1 Bluetooth based home automation system using arduino

2. LITERATURE SURVEY

2.1 Related Work

3. DESIGN

3.1 Circuit Diagram

3.2 Requirement Specificationns

3.2.1 Hardware Requirement Specifications

3.2.2 Software Requirements

4. IMPLEMENTATION

5. RESULT

6. CONCLUSION

7. FUTURE SCOPE

8. BIBLIOGRAPHY

8
9
1.INTRODUCTION

Technology is a never ending process. To be able to design a product using the current technology
that will be beneficial to the lives of others is a huge contribution to the community. Our aim is to
design a kit that can be used for controlling AC loads from android phone by using arduino as
microcontroller. This paper presents the design and the implementation of a low cost but yet flexible
home control and environmental monitoring system. It employs an embedded Arduino UNO
microcontroller, with bluetooth connectivity for accessing and controlling devices and appliances
remotely. In this device the android phone based home appliances are connected to the input/
output ports of the arduino board via relays. The communication between the android phone and
Arduino UNO is wireless. This system is designed to be low cost and scalable allowing variety of
devices to be controlled with minimum changes to its core. The proposed system does not require a
dedicated server PC with respect to similar systems and offers a novel communication protocol to
monitor and control the home appliances with more than just the switching functionality. This home
automation is adopted for reasons of ease, security and energy efficiency and being used to only
allow authorized users from accessing the appliances at home.

Home automation system is use of information technologies and control system to reduce the human
labor. The rapid growth of technologies influences us to use smart phones to remotely control the
home appliances. An automated devices has ability to work with versatility, diligence and with
lowest error rate The idea of home automation system is a significant issue for researchers and home
appliances companies. Automation system not only helps to decrease the human labor but it also
saves time and energy . Early home automation systems were used in labor saving machines but
nowadays its main objective is provide facilities to elderly and handicapped people to perform their
daily routine tasks and control the home appliances remotely. The Allied Business Intelligence
(ABI) research reports that almost l.5 million automatic home appliances were installed in United
States of America (USA) during 2012 and their increasing rate is 45.2%. In wireless based home
automation system different type of technologies such as ZigBee , Z-Wave, Global System for
Mobile (GSM) , General Packet Radio Service (GPRS) , Infrared , wireless fidelity (Wi-Fi) and
Bluetooth are used, each technology has their own pros and cons. A Bluetooth based wireless home
automation system can be implement with a low cost and it is easy to install in an existing home . A
research work proved that Bluetooth system are faster than wireless and GSM systems. Bluetooth
technology has ability to transmit data serially up to 3 Mbps within a physical range of 10m to 100m
depending on the type of Blue tooth device.

10
1.1 EXISTING SYSTEM

There are two different types of existing home automation they are

1.1.1 Zigbee based home automation system using cell phones


1.1.2 SMS Based Home Automation System

1.1.1 Zigbee based home automation system using cell phones:

ZigBee is a low-power digital radio having applications like home automation, medical device data
collection, and other low-power low-bandwidth needs, designed for small scale projects which need
wireless connection. To monitor and control the home appliances the system is designed and
implemented using Zigbee. The device performance is record and store by network coordinators.
The message for security purpose first process by the virtual home algorithm and when it is declared
safe it is re-encrypted and forward to the real network device of the home. Over Zigbee network,
Zigbee controller sent messages to the end. The safety and security of all messages that are received
by the virtual home algorithm. To reduce the expense of the system and the intrusiveness
ofrespective installation of the system Zigbee communication is helpful. The microcontroller
analysis all signal and convert them into command to understand by GSM module.

1.1.2 SMS Based Home Automation System:

This system presents style and model implementation of a basic home automation system based on
SMS technology. The automation system consists of 2 main components; the GSM electronic
equipment, which is that the communication interface between the house automation system and
therefore the user. GSM electronic equipment uses SMS technology to exchange information, and
signaling between users and residential automation system. The second module is the
microcontroller, that is that the core of the house automation system, and acts because the bridge
between the GSM network (the user) and sensors and actuators of home automation system. Sensors
and actuators are directly connected to hardware small controller through appropriate interface.
System supports a good vary of home automation devices; power management components,
security, transmission applications, and telecommunication devices.

11
1.2 PROPOSED SYSTEM

1.2.1 Bluetooth based home automation system using android:

The proposed method presents the design and implementation of a robust, low cost and user friendly
home automation system using Bluetooth technology. The design of proposed method is based on
Arduino board, Bluetooth module, sensors and smartphone application . Bluetooth module HC-06 is
interfaced with Arduino board and home appliances are connected with Arduino board via relay.
Smartphone application is used for serial communication between smartphone and Bluetooth
module which is further connected with Arduino board. Proposed method has ability to not only
remotely control the appliances but it also monitors the sensors. Nowadays most of conventional
home automation systems are designed for elderly, handicapped people or for any special purpose.
The proposed method is not only suitable for elderly and handicapped people but it also provides a
general purpose home automation system , which can easily implement in existing home.

The smart home concept in the system increases the standard of living .In Bluetooth based
home automation system the home appliances are connected to the Arduino BT board at input
output ports using relay. The program of Arduino BT board is based on high level interactive C
language of microcontrollers; the connection is made via Bluetooth. The password protection is
provided so only authorized user is allowed to access the appliances. The Bluetooth connection is
established between Arduino BT board and phone for wireless communication. The main control
system use wireless Bluetooth technology to give remote access from PC/laptop or smart phone

12
2.LITERATURE SURVEY

The idea of automation can be dated back to 1800s, when Nikola Tesla developed the idea of having
a remote control for vessels and vehicles in 1898.[6] Later with the advent of electrical appliances,
the idea of home automation became more important. A.R.Al-Ali and M.Al-Rousan developed a
Java based Home Automation System. It used Wi-Fi as a medium for communication between the
hardware and software component. Its main disadvantage was that Wi-Fi range is limited and hence
the user has to be in a certain range for operating the system. An android based home automation
system was developed it would use internet as a medium for connectivity. Its disadvantage was that
the unavailability of internet would fail the entire system. Embedded smart home management
scheme was presented it was based on use of Ethernet network. The system also had GSM support
for the issue of unavailability of network. It was thus costly and hence was the only disadvantage.

Home automation or domestic robotics (domotics) is a combination of automation technologies and


computer science . High affordability and connectivity through smartphones and tablets has
increased the popularity of home automation in recent years . The life quality of the elderly and
disabled can be improved by using home automation. Radio frequency (RF) is one of the techniques
used in the home automation network to control and monitor home appliances. Home automation
consists of electronic programmable controls for home appliances using wired or wireless
communication. A smart home controller connects the entire house in a home automation system .
This acts like a centralized control of household systems, such as sprinkler units and inside
temperature monitors. With this centralized control unit, a person does not need to leave the couch
to turn on/off home appliances, which is convenient for users. Home automation is designed to
introduce convenience and efficiency to a home. People living with physical handicaps may rely on
the features of a home automation system to accomplish mundane tasks that might otherwise be
difficult or impossible.

13
2.1 RELATED WORK

Several remote controlled home automation systems have been studied. R.Piyare and M.Tazil
research work provided full functionality to remotely control home appliances via wireless
communication between the Arduino BT and cell phone using Bluetooth technology. Arduino BT
board was connected with home appliance and it was controlled by a Symbian OS cell phone
application. Symbian OS cell phone can only support the python language scripts and this system
failed to support Java based application, nowadays mostly smart phone applications are developed
in Java.

In another research work [16], XBee based home automation system introduced for handicapped
and elderly people. XBee transceivers was used for wireless communication between the master
control panel board and the remote control device.

A home monitoring and automation system was also studied, it was implemented by using Arduino
Uno and Diligent chip KIT. Although this system mentioned as low cost system but it is much
expensive than Bluetooth base home automation system . A low cost and wireless controlled
automation system was designed by researchers. Bluetooth technology was used to provide
remote controlled wireless access to user. Although this system achieved high accuracy but it only
aimed to provide facilities and assistance to disabled and elderly .

In , a petrol level indicator was designed and implemented on hardware using two ultrasonic sensors
(HC SR-04), liquid crystal display (LCD), micro SD card and Atmel ARV controller. The system
has ability to measure the petrol level 0.03-3 meters inside the fuel tank. Moreover system indicate
the users if the petrol level drop below the fixed level. In , an overview of different home
automation systems in presents. Authors highlight the advantages and disadvantages of different
technologies such as Bluetooth, ZigBee, GSM and EnOcean. The Bluetooth based automation
system are low cost and enables the user to control appliances within the range of Bluetooth
network

14
3. DESIGN

3.1 CIRCUIT DIAGRAM

3.2 REQUIREMENT SPECIFICATION(S/W & H/W)

In this proposed system has two main parts hardware and software.Hardware mainly consists of
three main components.Software consists of two main tools.

3.2.1 Hardware requirements :


• Arduino UNO
• Bluetooth Module - HC-05
• 12V Relay
• Relay driver - ULN2003

15
Arduino UNO :
The Arduino Uno is a microcontroller board based on the ATmega328P. It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz
crystal, a USB connection, a power jack, an ICSP header and a reset button. Simply connect it to a
computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.
The Arduino UNO is an open-source microcontroller board based on the Microchip
ATmega328p microcontroller and developed by Arduino. The board is equipped with sets
of digital and analog input/output (I/O) pins that may be interfaced to various expansion
boards (shields) and other circuits. The board has 14 Digital pins, 6 Analog pins, and
programmable with the Arduino IDE (Integrated Development Environment) via a type B
USB cable. It can be powered by a USB cable or by an external 9 volt battery, though it
accepts voltages between 7 and 20 volts. It is also similar to the Arduino Nano and
Leonardo. The hardware reference design is distributed under a Creative
Commons Attribution Share-Alike 2.5 license and is available on the Arduino website.
Layout and production files for some versions of the hardware are also available. "Uno"
means one in Italian and was chosen to mark the release of Arduino Software (IDE).

TECHNICAL SPECIFICATIONS:

● Operating Voltage: 5 Volt


● Input Voltage: 7 to 20 Volts
● Digital I/O Pins: 14 (of which 6 provide PWM output)
● Analog Input Pins: 6
● DC Current per I/O Pin: 20 mA
● DC Current for 3.3V Pin: 50 mA

16
PIN FUNCTIONS :

USB To PC: It is used to communicate Arduino via Universal Serial Bus to PC for
programming/sending data to Arduino serially.
7V to 12V DC Input: For external supply, the voltage range of 7V to 12V DC is recommended.
The 9V battery can be used to power your Arduino Uno board.
Reset Button: It Resets the Arduino board if pressed.
ICSP: Abbreviated as In Circuit Serial Programming which consists of MOSI, MISO, SCK,
RESET, VCC, GND. It is either used to program USB or Microcontroller (For UNO, ATmega
328P-PU). ICSP allows the user to program the microcontroller when it is in circuits, In Arduino
UNO it allows to program ATmega328P-PU directly with AVR instructions without using Arduino
IDE.
SDA: Serial Data, It is the bidirectional data line that is used by I2C.
SCL: Serial Clock, It is used to indicate that data is ready on bidirectional data line that is used by
I2C.
AREF: Analog Read Reference, It is mainly used for analogReference() function calls, as default it
is not required but to use it you have to add some voltage source between 0V to 5V in AREF Pin
which will be considered as accurate reference voltage.
GND: Ground.
SCK: Serial Clock, which is used by SPI (Serial Peripheral Interface). It is clock generated by
‘Master’ which is used to clock the data to the ‘Slave’.
MOSI: Master Out Slave In, The data is transmitted from Master to Slave. (Master -> Slave)
MISO: Master In Slave Out, The data is transmitted to Master from Slave. (Slave ->
Master)

17
SS: Slave Select, It is used to select the ‘Slave’. Make high to SS pin to deactivate & make
low to activate it.
INT1 & INT0: These are hardware interrupts, it calls the ISR (Interrupt Service Routine) when the
pin change occurs.
TX: Transmit, It is used to transmit TTL serial data. It is also referred as ‘outwards’ since it
‘transmits’ data from Arduino to other connected peripheral device.
RX: Receive, It is used to receive TTL serial data. IT is also referred as ‘inwards’ since it ‘receives’
data from external hardware to Arduino.
Vin: Voltage In, If you’re powering your Arduino board from USB nothing is obtained from Vin
pin. But, if you’re powering the board with external supply then that supply is directly obtained
from Vin pin. However, the supply obtained at Vin pin is usually lesser by 1V than voltage supplied
to Power pin due to reverse polarity protection diode.
5V Pin: It is used to power external components connected to Arduino which needs 5V.
3.3V Pin: It is used to power external components connected to Arduino which needs 3.3V
IORef: Input Output Voltage Reference, It allows shields connected to Arduino board to
check whether the board is running at 3.3V or 5V

Bluetooth Module (HC-05):

For the communication between mobile phone and microcontroller Bluetooth module(HC-05) is
used. The Bluetooth standard is based upon a master/slave operational mode. The term "piconet" is
used to refer to the network formed by one device and all devices found within its range. HC-05 is
low power 1.8V operation and is easy to use with Bluetooth SPP (serial port protocol). Serial port
Bluetooth module have a Bluetooth 2.0+EDR (enhanced data rate), 3Mbps modulation with
complete 2.4GHZ radio transceiver and baseband.Using Bluetooth profile and android platform
architecture different type o Bluetooth applications can be developed

18
PIN DESCRIPTION:

Pin Description Function

STATE State HIGH when module is Connected.

UART_RXD,
Connect with the MCU’s (Microcontroller and
RXD Bluetooth serial
etc) TXD PIN.
signal receiving PIN
UART_TXD,
Connect with the MCU’s (Microcontroller and
TXD Bluetooth serial signal
etc) RXD PIN.
sending PIN

GND Ground Connect to Ground.

VCC +5V Connect to +5V

Unknown pin. It should be connected to pin 34 of


EN Unknown EGBT-045MS Bluetooth module, but it seems it
doesn't work in preferred way;

19
Relay :
Relay is basically an electromagnetic switch which can be turn on and off by an applying the
voltage across its contacts. In this project used a 12V 4-channel relay. A relay is an electrically
operated switch . Many relays use an electromagnet to mechanically operate a switch, but other
operating principles are also used, such as solid-state relays. Relays are used where it is necessary to
control a circuit by a separate low-power signal, or where several circuits must be controlled by one
signal. The first relays were used in long distance telegraph circuits as amplifiers: they repeated the
signal coming in from one circuit and re-transmitted it on another circuit. Relays were used
extensively in telephone exchanges

Relay Driver ULN2003:

The ULN2003A is an array of seven NPN darlington transistor capable of 500 mA, 50 V output. It
features common-cathode flyback diodes for switching inductive loads. It can come
in PDIP, SOIC, SOP or TSSOP packaging. In the same family are ULN2002A, ULN2004A, as well
as ULQ2003A and ULQ2004A, designed for different logic input levels.

The UNL2003A is also similar to the ULN2001A (4 inputs) and the ULN2801A, ULN2802A,
ULN2803A, ULN2804A and ULN2805A, only differing in logic input levels
(TTL, CMOS, PMOS) and number of in/outputs (4/7/8).

The ULN2003 is known for its high-current, high-voltage capacity. The drivers can be paralleled for
even higher current output. Even further, stacking one chip on top of another, both electrically and
physically, has been done. Generally it can also be used for interfacing with a stepper motor, where
the motor requires high ratings which cannot be provided by other interfacing devices.

20
Main specifications:

● 50 V output (there is a version that supports 100 V output)


● 500 mA rated collector current (single output)
● Includes output flyback diodes
● Inputs compatible with TTL and 5-V CMOS logic

3.2.2 SOFTWARE:

● Arduino IDE
● Arduino Bluetooth control device app

Arduino IDE :

TheArdunio Integrated development environment (IDE) is a cross-platform application


(for Windwos, macOS, liux) that is written in the programming language java. It is used to write and
upload programs to Arduino board.

The source code for the IDE is released under the version 2. The Arduino IDE supports the
languages C and C++ using special rules of code structuring. The Arduino IDE supplies a library
from the Wiring project, which provides many common input and output procedures. User-written
code only requires two basic functions, for starting the sketch and the main program loop, that are
compiled and linked with a program stub main() into an executable executive program with
the GNU tool chain, also included with the IDE distribution. The Arduino IDE employs the
program avrdude to convert the executable code into a text file in hexadecimal encoding that is
loaded into the Arduino board by a loader program in the board's firmware.

21
3.2.3 FLOAT CHART

22
4. IMPLEMENTION
A low cost and efficient smart home system is presented in our design. This system has two main
modules: the hardware interface module and the software communication module. At the heart of
this system is the Arduino UNO as microcontroller which is also capable of functioning as a micro
web server and the interface for all the hardware modules. All communication and controls in this
system pass through the microcontroller

CODE

#define relay1 10

#define relay2 8

String inputs;

void setup()

Serial.begin(9600);

pinMode(relay1,OUTPUT);

pinMode(relay2,OUTPUT);

digitalWrite(relay1,1);

digitalWrite(relay2,1);

void loop()

while(Serial.available())

delay(10);

char c=Serial.read();

if(c=='#')

23
break;

inputs +=c;

if(inputs.length()>0)

Serial.println(inputs);

if(inputs=="A")

digitalWrite(relay1,LOW);

else if(inputs=="a")

digitalWrite(relay1,HIGH);

else if(inputs=="B")

digitalWrite(relay2,LOW);

else if(inputs=="b")

digitalWrite(relay2,HIGH);

inputs="";

24
5. RESULT

When the ON/OFF commands are sent from the Arduino Bluetooth Control device application from
android mobile then those commands are transmitted to the connected Bluetooth module and by
receiving those commands that following light are blub based o the user command we can turn
ON/OFF as shown below images.

25
6. CONCLUSION
In this project work a low cost and user friendly design for home automation system is presented. It
has better performance than existing Bluetooth based conventional home automation systems, it
provides a general approach for home automation which is not only suitable for elderly and
handicapped people but it is also beneficial to reduce human labor and save energy with the help of
sensors. For the knowledge of readers, this is the first paper on home automation system in which
ultrasonic sensor and floating plate are used for water level detection. In addition proposed system
has ability to transmit the measurement report of sensors on user smartphone application. Moreover
Smartphone application used in proposed system.

26
7. FUTURE SCOPE
The future would be of advanced sensors and artificial intelligence. Till date home automation has
been looked upon as something to only on/off your devices from mobile phone, but the scenario is
changing rapidly, regular automation combined with smart wireless network of sensors started to
understand the human environment. Sensors like motions sensor, temperature sensors, light intensity
sensors, smoke detectors, humidity sensors etc. are being accommodated with home automation and
the data from these sensors would further be used to analyzed to understand use patterns and in-turn
with deep learning used for the intelligence of the device itself. It will start understanding its user
and keep making sure the user is at his most ease and security, Smoke detector, air quality sensor,
LPG detector

27
8. BIBLIOGRAPHY

The web sites that provide the information’s:


www.autogates.com.my
www.usautomatic.com
www.amazinggates.com
www.microchip.co.uk
www.quora.com
www.engineeringproject.com
www.efy.com
www.electronicsworldforyou.com

28

Das könnte Ihnen auch gefallen