Sunteți pe pagina 1din 26

Page |1

PROJECT OUT LINE


Page |2

TITLE OF THE PROJECT

The title of m project is “Home Automation Using Arduino Uno”;

ABSTRACT
This project is based on the construction of a model simulating a home automation with
different operation modes which can be controlled also by a mobile application.

To achieve this objective, a scale house that captures different signals, both digital and
analog, has been developed. To approach the house to a real home automation application
the variables under study and control are interior temperature and lighting, movement
around the house and water level of the pool.

The house has three main operating modes. In automatic mode, it performs the
measurement and executes the control of the variables, regulating itself according to the
conditions to which it is exposed. In contrast, the remote mode is achieved using the mobile
application that allows user to modify the variables. Finally, in alarm mode it controls the
parameters that assure the security of the house when proprietor is away from home.

The core of the project is an Arduino Uno board that allows the application operation and
receives, from an Android mobile application, operating modes commands and, if it is
operating remotely, orders to individually controls the different actuators. For the data
transmission from the mobile to the board, is used communication via Bluetooth.
Page |3

INTRODUCTION
Home automation system is use of information technologies and control system to
reduce the human labour. 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 labour but it also saves time and energy. Early home
automation systems were used in labour 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.
Page |4

WHAT IS AUTOMATION

This project is based in automation technology and more specifically in home automation
systems.
Automation is the transfer of tasks normally performed by humans to a set of technological
elements.

An automated system consists of two parts:


-Operation: Part formed by elements that act directly on the machine and make it
performs desired operations. These elements are called actuators and some examples are
engines, cylinders or photodiodes.

-Control: Brain of system, normally constituted by a programmable automaton, able


to communicate with all constituents of the operation part.

The inclusion of control in the automation system, allows to decide on the development of a
process, manipulating certain variables to get these or other variables to act in the desired
way.

Although it seems a recent technology and currently is in full development, automation


dates back to ancient times.
Page |5

OBJECTIVE
The objective of the project to implement a low cost, reliable and scalable home automation
system that that can be remotely switches ON/OFF any household appliance, using a
microcontroller to achieve hardware simplicity, and a android application to switch between
on or off state.

STEPS TO REACH OBJECTIVE


The steps that should be taken to achieve the expected result are the following:

1) Select the components and software.


2) Electronic design
3). Connect the component according to electronic design.
4) Program the board.
5) design the application.
6) Code the applicatin
6) Connect the mobile application with the board via Bluetooth.
7) Test and debug the program.
Page |6

REQUIREMENTS OF THE SYSTEM


HARDWARE:-

• Arduino Uno Board(with ATmega328p microprocessor)

• Relay module(5 volt)

• HC-05 wireless Bluetooth module

• Light bulb (lamp)

• Breadboard

• Jumper wire(male to female)

• 5v power supply

• Wire(2 meter)

• 2 pin plug

• Bulb holder

SOFTWARE REQUIREMENT:-

 Arduino IDE or Compiler


 Android application
 Proteus 7
Page |7

COMPONENTS DESCRIPTION
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. It contains everything needed to support the microcontroller; simply
connect it to a computer with a USB cable or power it with a AC -to-DC adapter or
battery to get started.. You can tinker with your UNO without worrying too much
about doing something wrong, worst case scenario you can replace the chip for a
few dollars and start over again.

"Uno" means one in Italian and was chosen to mark the release of Ar duino
Software (IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were
the reference versions of Arduino, now evolved to newer releases. The Uno board
is the first in a series of USB Arduino boards, and the reference model for the
Arduino platform; for an extensive list of current, past or outdated boards see the
Arduino index of boards.

TECHNICAL SPECIFICATION

Microcontroller ATmega328P

Operating Voltage 5V

Input Voltage (recommended) 7-12V


Input Voltage (limit) 6-20V

Digital I/O Pins 14 (of which 6 provide PWM output)


PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20
DC Current for 3.3V Pin 50mh
Flash Memory 32 KB (ATmega328P) of which 0.5 KB
used by boot loader
SRAM 2 KB (ATmega328P)
EPROM 1 KB (ATmega328P)
Clock Speed 16 MHz
Page |8

COMPONENTS OF ARDUINO UNO


Page |9

PIN CONFIGURATION
POWER

The Arduino Uno can be powered via the USB connection or with an external power supply.
The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery.
The adapter can be connected by plugging a 2.1mm center-positive plug into the board's
power jack. Leads from a battery can be inserted in the GND and Vin pin headers of the
POWER connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using
more than 12V, the voltage regulator may overheat and damage the board. The
recommended range is 7 to 12 volts.
The power pins are as follows:

VIN- The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can
supply voltage through this pin, or, if supplying voltage via the power jack, access it through
this pin.

5V- This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the
VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the
regulator, and can damage your board. We don't advise it.

3V3- A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.

GND- Ground pins.

Memory
The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of SRAM
and 1 KB of EEPROM (which can be read and written with the EEPROM library).

INPUT AND OUTPUT


Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),
digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or
receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default)
of 20-50 kOhms. In addition, some pins have specialized functions:
P a g e | 10

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 attachInterrupt() function for
details.

PWM: 3, 5, 6, 9, 10, and 11:- Provide 8-bit PWM output with the analogWrite() 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 connected to digital pin 13. When the pin is HIGH value,
the LED is on, when the pin is LOW, it's off.

The Uno has 6 analog inputs, labelled 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
analogReference () function. Additionally, some pins have specialized functionality:

TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.

There are a couple of other pins on the board:


AREF - Reference voltage for the analog inputs. Used with analogReference().

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.
P a g e | 11

BLUETOOTH COMMUNICATION

After a global communication overview, it is decided to use Bluetooth for the


communication between Arduino and mobile application, more specifically HC-05 module.
This module is finally chosen to meet all application requirements. It is a wireless
technology, the sender and the receiver are not physically connected, but trough
electromagnetic waves. It has a range of 10 meters, enough to be able to control the
variables using mobile phone, since this type of control make sense when the user is inside
the house. Finally, the only additional requirement to make the communication between
both devices is that the mobile phone has Bluetooth connectivity, which nowadays is a
standard characteristic of mobiles.

TECHNICAL SPECIFICATION AND CHARECTERISTIC OF HC-O5 :


- Configurable as Slave and as Master.
- Radio chip: CSR BC417143.
- Frequency: 2.4 GHz ISM band.
- Modulation: GFSK (Gaussian Frequency Shift Keying).
- Built-in PCB antenna.
- Emission Power: ≤ 4 dBm (Class 2).
- Range: 10 m.
- Speed: Asynchronous: 2.1 Mbps/160 kbps; Synchronous: 1 Mbps/1 Mbps.
- Security: Authentication and encryption.
- Profiles: Serial port Bluetooth.
- Current consumption: 50 mA.
- Supply voltage: 3.6 V – 6 V.
- Operation temperature: -20 ºC – 75 ºC.
P a g e | 12

HC-05 BLUETOOTH MODULE


P a g e | 13

RELAY MODULE

A relay is an electrically operated switch of mains voltage. It means that it can be turned on
or off, letting the current go through or not. Controlling a relay with the Arduino is as simple
as controlling an output such as an LED.

My relay has two channels. There are other varieties with one, four and eight and 12
channels.

In relation to mains voltage, relays have 3 possible connections:

 COM: common pin

 NO (Normally Open): there is no contact between the common pin and the normally
open pin. So, when you trigger the relay, it connects to the COM pin and supply is
provided to a load

 NC (Normally Closed): there is contact between the common pin and the normally
closed pin. There is always connection between the COM and NC pins, even when
the relay is turned off. When you trigger the relay, the circuit is opened and there is
no supply provided to a load.

Pin wiring

The connections between the relay module and the Arduino are really simple:

 GND: goes to ground


 IN1: controls the first relay (it will be connected to an Arduino digital pin)
 IN2: controls the second relay (it should be connected to an Arduino digital pin if you
are using this second relay. Otherwise, you don’t need to connect it)
 VCC: goes to 5V
P a g e | 14

RELAY MODULE
P a g e | 15

FLOW CHART
P a g e | 16

Electronic deigns
P a g e | 17

BLOCK DIAGRAM
P a g e | 18

INTERFACING OF BLUETOOTH MODULE WITH ARDUINO


HC-05 is a Bluetooth device used for wireless communication with Bluetooth enabled
devices (like Smartphone). It communicates with microcontrollers using serial
communication (USART).

Default settings of HC-05 Bluetooth module can be changed using certain AT commands.

As HC-05 Bluetooth module has 3.3 V level for RX/TX and microcontroller can detect 3.3
V level, so, there is no need to shift TX voltage level of HC-05 module. But we need to
shift the transmit voltage level from microcontroller to RX of HC-05 module.

For more information about HC-05 Bluetooth module and how to use it, refer the
topic HC-05 Bluetooth module in the sensors and modules section.

INTERFACE CIRCUIT DIAGRAM

Default Bluetooth name of the device is “HC-05” and default PIN (password) for
connection is either “0000” or “1234”.
P a g e | 19

Relay Module Pin out and


Input Connections of relay module

Logic GND: This will be connected to GND on your Arduino.


Input 1 (IN 1): This will be connected to digital pin on Arduino.
Input 2 (IN 2): This will be connected to the digital pin on Arduino.
Input 3 (IN 3): This will be connected to the digital pin on Arduino.
Input 4 (IN 4): This will be connected to the digital pin on Arduino
Logic VCC: This will be connected to the 5v pin of the Arduino o power the 4 relay module.

We can also power the 4 relay module using the external power by giving voltage from 5 to
24V DC.

Output Connections of relay module

COM (Common connection): The COM is the center terminal of the relay and it is used in
both (Normally open and normally closed) connections.

NO (Normally open): This act like a switch. In normally open connection, there will be no
contact between COM and NO, since it is normally open. But when we will activate the relay
module, then it will get connected to the COM and will supply power to the load, which will
power up the light. Thus the circuit will initially be in open state until we trigger the state.

NC (Normally closed): its behaviour is opposite to the normally open connection. It always
remains in contact with COM, even when relay module is not powered. When we will trigger
the relay module then it will open the circuit, so the connection is lost.

We will use the normally open connection. When you will use the relays in NO (Normally
Open) connection and you set the corresponding IN pin to LOW, then the power will flow
from the COM connector and out of the normally open connector powering your device.
P a g e | 20

Interfacing of relay with arduino


P a g e | 21

Arduino Program Code


#define le 2

#define le 3

char data = 0;

void setup()

// Set pin as output.

pinMode(led, OUTPUT);

pinMode(le, OUTPUT);

Serial.begin(9600);

digitalWrite(led, LOW);

void loop()

if (Serial.available() > 0)

data = Serial.read(); //Read the incoming data and store it into variable data
P a g e | 22

if(data == '2')

digitalWrite(led, HIGH);

else if(data == '3')

digitalWrite(led, LOW);

if(data == '4')

digitalWrite(led, HIGH);

else if(data == '5')

digitalWrite(led, LOW);

}
P a g e | 23

How it works
When we touch any button in Bluetooth controller app then Android phone sends a value to
Bluetooth module, after receiving this value, Bluetooth module sends the received value to
the microcontroller and then microcontroller reads it and compare it with predefined value.
If any match is occurred then microcontroller performs relative operation. Same operation
will performed each time when button pressed.
when user touch ‘Fan On’ button in Bluetooth controller app then microcontroller receives
‘1’ via Bluetooth module and then controller Switch ‘On’ the Fan by using relay driver
and relay. And when user touch ‘Fan Off’ button in Bluetooth controller app then
microcontroller receives ‘2’ via Bluetooth module and then controller Switch ‘Off’ the Fan by
using relay driver and relay.

Switch Name ON Data OFF Data


Switch 1 2 3
Switch 2 3 4
P a g e | 24

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.
 This project can provide the facility of monitoring all the appliances with in the
communication range through Bluetooth.
 By using this system the users can check the status of the appliances at whatever time
of the day
 Manual control is also given in this project so the unskilled person can easily change the
status.

DISADVANTAGES
 Bluetooth is used in this home automation system, which have a rage 10 to 20 meters
so the control cannot be achieved from outside this range.
 Application is connected after disconnect of the Bluetooth.
 when the new users want to connect the first download application software then the
code and configuration must be done
P a g e | 25

Future development
For the future development we can upgrade the android application which not only have
the on or off option but also have

– Timer – By which an appliance will turn OFF or ON at a specific time or after a


specific time period

– Fan speed control

– Light intensity control

Secondly we can replace the Bluetooth module with the GSM module or a Wi-Fi module by
which we are able to control the system from a very long distance
P a g e | 26

REFFERENCES

• Website
 http://microcontrollerslab.com/bluetooth-home-automation-system-
android/

 https://electronicsforu.com/electronics-projects/hardware-diy/arduino-
home-automation-system-android

 https://circuitdigest.com/microcontroller-projects/smart-phone-
controlled-arduino-home-automation

 https://www.electronicshub.org/arduino-project-ideas/?ref=menu

 https://creately.com/app/?tempID=gc7qvpsj1&login_type=demo#

 https://en.wikipedia.org/wiki/Home_automation

S-ar putea să vă placă și