0% found this document useful (0 votes)
23 views28 pages

Final Report

The document describes a project to develop a home automation system using an Arduino Nano board connected to a Bluetooth module. The system allows users to control electrical loads like bulbs and fans in their home remotely using an Android smartphone app. The Arduino board receives on/off commands from the phone via Bluetooth and operates the loads. This provides a low-cost smart home solution for remote control without needing to be physically near switches. The project aims to make homes more convenient and accessible for elderly and disabled people.

Uploaded by

kc7013883
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)
23 views28 pages

Final Report

The document describes a project to develop a home automation system using an Arduino Nano board connected to a Bluetooth module. The system allows users to control electrical loads like bulbs and fans in their home remotely using an Android smartphone app. The Arduino board receives on/off commands from the phone via Bluetooth and operates the loads. This provides a low-cost smart home solution for remote control without needing to be physically near switches. The project aims to make homes more convenient and accessible for elderly and disabled people.

Uploaded by

kc7013883
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/ 28

NARAYANI POLYTECHNIC INSTITUTE

Bharatpur -10 , Chitwan

DEPARTMENT OF ELECTRICAL ENGINEERING

PROJECT REPORT ON

HOME AUTOMATION USING BLUETOOTH, ARDUINO NANO WITH CONTROL


MOBILE

In partial fulfilment of diploma in electrical engineering

EGE-207

SUBMITTED BY:- SUBMITTED TO:-

Rabin Chaudhary [DEE-00409-019] Department of electrical engineering

Rajan Chaudhary [DEE-00413-019]

Raj Kumar Sah [DEE-00412-019]

Radheshyam Ray [DEE-00411-019]

1
ACKNOWLEDGMENT

The success of this project is not the lone effort of only one member but combine Effort all the
team members and other helping hands ,we owe our deep gratitude to Narayani Bahupravidhik
Shikchalaya Bharatpur -10 chitwan and department of Diploma in electrical engineering for
providing this platform to do the project then with all due respect, special thanks to our
supervisor Er. tek Nath lamichhane. Who Continuous assisted, guide and encouragded us.this
helped us to complete all the task regarding. the project from start to end .we should also to
thanks to our project coordinator HOD Er. shiva Shrestha For giving us all support and
guidance, which made us come complete the project on time .we would also like to express our
gratitude towards Er.Samir Raj Bhandhari for his technical advice and Er. devendra Yadav for
assisting us during, the fabrication Of this system. Final, we want to express our heartily thanks
to all those who directly or indirectly provided us their cooperation in this project.

TEAM MEMBERS

Rabin Chaudhary

Rajan Chaudhary

Raj kumar Sah

Radheshyam Ray

2
ABSTRACT
The main objective of this project is to develop a home automation system using an Arduino
board with Bluetooth being remotely controlled by any Android OS smart phone. As technology
is advancing so houses are also getting smarter. Modern houses are gradually shifting from
conventional switches to centralized control system, involving remote controlled switches.

Presently, conventional wall switches located in different parts of the house makes it difficult
for the user to go near them to operate. Even more it becomes more difficult for the elderly or
physically handicapped people to do so. Remote controlled home automation system provides
a most modern solution with smart phones.

In order to achieve this, a Bluetooth module is interfaced to the Arduino board at the receiver
end while on the transmitter end, a GUI application on the cell phone sends ON/OFF commands
to the receiver where loads are connected. By touching the specified location on the GUI, the
loads can be turned ON/OFF remotely through this technology. The loads are operated by
Arduino board through opto-isolators and thyristors using triacs.

TABLE OF CONTENTS

3
ACKNOWLEDGMENT...................................................................................................................
ABSTRACT................................................................................................................................................3

CHAPTER-1..................................................................................................................................
INTRODUCTION.......................................................................................................................................6

CHAPTER -2.................................................................................................................................
LITERATURE REVIEW...................................................................................................................
2.1 COMPONENT REQUIRED.......................................................................................................
2.1.1 ARDUINO NANO.................................................................................................................
2.1.2 4 CHANNEL RELAY MODULE..............................................................................................
2.1.3 BLUETOOTH HC05 Module.................................................................................................
2.1.4 MALE TO FEMALE JUMPER WIRE.......................................................................................
2.1.5 POWER ADAPTER (5v,2A)...................................................................................................
2.1.6 MATRIX PCB BOARD...........................................................................................................
2.1.7 POWER SOCKET..................................................................................................................
2.1.8 BULB...................................................................................................................................
2.1.9 FAN.....................................................................................................................................
2.2 PAST,PRESENT AND FUTURE OF HOME AUTOMATION........................................................
METHODLOGOY..........................................................................................................................
BLOCK DIAGRAM OF HOME AUTOMATION USING MOBILE OR VOICE.......................................
COST ANALYSIS............................................................................................................................
RESULT........................................................................................................................................
CONCLUSION...............................................................................................................................
REFERENCE..................................................................................................................................
APPNDEX A: CODE.......................................................................................................................
ARDUINO NANO CODE......................................................................................................................20
APPNDEX B: DATA SHEET.......................................................................................................................23

CONTENT OF FIGUERS

4
figure1 : Arduino Nano.................................................................................................................. 7
Figure 3: 4 channel relay module...................................................................................................8
Figure 4: HC 05 Bluetooth module.................................................................................................8
Figure 5:point of Bluetooth hc05 module......................................................................................8
Figure 6:Male to female jumper wire............................................................................................9
Figure 7: Power Adapter( 5V,2A).................................................................................................10
Figure 8: Matrix PCB board..........................................................................................................10
Figure 9:POWER SOCKET............................................................................................................. 11
Figure 10: BULB............................................................................................................................12
Figure 11:Ceiling Fan....................................................................................................................12
Figure 12:Flow chart of home automation..................................................................................15
Figure 13:Block diagram of home automation............................................................................16
figure 14: home automation voice or mobile..............................................................................17

CHAPTER-1

5
INTRODUCTION
Nowadays, we have remote or mobile controls for our bulb, power socket and other electronic
systems, which have made our lives real easy. Have you ever wondered about home
automation which would give the facility of controlling tube lights, fans and other electrical
appliances at home using a remote or mobile or voice control? Off-course, Yes! But, are the
available options cost-effective? If the answer is No, we have found a solution to it. We have
come up with a new system called Arduino nano based home automation using Bluetooth. This
system is super-cost effective and can give the user, the ability to control any electronic device
without even spending for a remote control. This project helps the user to control all the
electronic devices using his/her smartphone. Time is a very valuable thing. Everybody wants to
save time as much as they can. New technologies are being introduced to save our time. To
save people’s time we are introducing Home Automation system using Bluetooth. With the help
of this system you can control your home appliances from your mobile phone. You can turn
on/off your home appliances within the range of Bluetooth.

6
CHAPTER -2

LITERATURE REVIEW

2.1 COMPONENT REQUIRED

2.1.1 ARDUINO NANO


This board has many functions and features like an Arduino Duemilanove board. However, this
nano board is different in packaging. It doesn't have any DC jack so that the power supply can
be given using a small USB port otherwise straightly connected to the pins like VCC & GND. This
board can be supplied with 5 to 20volts using a mini USB port on the board.

The Arduino Nano is a small, complete, and breadboard-friendly board based on the
ATmega328P released in 2008. It offers the same connectivity and specs of the Arduino Uno
board in a smaller form factor.

The Arduino Nano is equipped with 30 male I/O headers, in a DIP-30-like configuration, which
can be programmed using the Arduino Software integrated development environment (IDE),
which is common to all Arduino boards and running both online and offline. The board can be
powered through a type-B mini-USB cable or from a 9 V battery.

figure1 : Arduino Nano

2.1.2 4 CHANNEL RELAY MODULE


The four-channel relay module contains four 5V relays and the associated switching and
isolating components, which makes interfacing with a microcontroller or arduino nano easy
with minimum components and connections. The contacts on each relay are specified for
250VAC and 30VDC and 10A in each case, as marked on the body of the relays.

The 4 Channel Relay Module is a convenient board which can be used to control high voltage,
high current load such as motor, solenoid valves, lamps and AC load. It is designed to interface
with microcontroller such as Arduino, PIC and etc. The relays terminal (COM, NO and NC) is
being brought out with screw terminal. It also comes with a LED to indicate the status of relay.

7
This is a 5V 4-channel relay interface board, and each channel needs a 15-20mA driver current.
It can be used to control various appliances and equipment with large current. It is equiped
with high-current relays that work under AC250V 10A or DC30V 10A. It has a standard interface
that can be controlled directly by microcontroller.

Figure 2: 4 channel relay module

2.1.3 BLUETOOTH HC05 Module


The HC-05 is a class 2 Bluetooth module designed for transparent wireless serial
communication. It is pre-configured as a slave Bluetooth device. Once it is paired to a master
Bluetooth device such as PC, smart phones and tablet, its operation becomes transparent to
the user. All data received through the serial input is immediately transmitted over the air.
When the module receives wireless data, it is sent out through the serial interface exactly at it
is received. No user code specific to the Bluetooth module is needed at all in the user
microcontroller program.

Figure 3: HC 05 Bluetooth module

Figure 4:point of Bluetooth hc05 module

8
2.1.4 MALE TO FEMALE JUMPER WIRE
These are male to female jumper wires used in connecting the female header pin of any
development board to other development boards having a male connector. They are simple
wires that have connector pins at each end allowing them to be used to connect two points to
each other. Jumper wires are typically used with breadboards and other prototyping tools in
order to make it easy to change a circuit as needed.40 strip Male to female jumper wire each
cable length about 20cm or 8-inch

Wires are the connecting parts of a circuit. Jumper wires are small wire ducts that can be used
to connect components to each other on breadboards or elsewhere. The male and female
header of this wire provides easier connections without the need to solder.

Figure 5:Male to female jumper wire

2.1.5 POWER ADAPTER (5v,2A)


A power supply for electronic devices. Also called an "AC adapter" or "charger," power adapters
plug into a wall outlet and convert AC to a single DC voltage. Computers use multiple DC
voltages, and the power adapter is the external part of the power supply for a laptop. The
additional DC voltages are created by internal circuits. Desktop computer power supplies are in
one internal unit, which converts AC to all DC voltages. Power adapters also exist for other
purposes; for example, to output a different AC voltage, rather than DC. See transformer,
power supply, power distribution unit, wall wart, wall tap, power strip and USB charger.

An AC adapter or AC/DC adapter is a type of external power supply, often enclosed in a case
similar to an AC plug. Other common names include wall wart, power brick, wall charger, and
power adapter. Adapters for battery-powered equipment may be described as chargers or
rechargers (see also battery charger). AC adapters are used with electrical devices that require
power but do not contain internal components to derive the required voltage and power from
mains power. The internal circuitry of an external power supply is very similar to the design that
You can use these wires to make quick and easy prototyping connections on most of the
boards available in market. Multiple jumpers can be connected next to one another on a
0.1"(100mil or 2.54mm) header.

An adapter or adaptor is a device that converts attributes of one electrical device or system to
those of an otherwise incompatible device or system. Some modify power or signal attributes,
while others merely adapt the physical form of one connector to another.

9
Figure 6: Power Adapter( 5V,2A)

2.1.6 MATRIX PCB BOARD


Matrix boards are prototype circuit boards used for laying out electrical components securely,
and can be used for both high frequency and analogue circuit building. When using a matrix
board, electrical parts are soldered together and joined with tinned copper wire.Base materials
typically include glass epoxy or synthetic resin-bonded paper. Matrix boards may be single,
double or multi-layered, referring to the copper lining used. Multi-layering has the benefit of
being both compact and lightweight.

A printed circuit board (PCB; also printed wiring board or PWB) is a medium used in electrical
and electronic engineering to connect electronic components to one another in a controlled
manner. It takes the form of a laminated sandwich structure of conductive and insulating
layers: each of the conductive layers is designed with an artwork pattern of traces, planes and
other features (similar to wires on a flat surface) etched from one or more sheet layers of
copper laminated onto and/or between sheet layers of a non-conductive substrate.[1] Electrical
components may be fixed to conductive pads on the outer layers in the shape designed to
accept the component's terminals, generally by means of soldering, to both electrically connect
and mechanically fasten them to it. Another manufacturing process adds vias: plated-through
holes that allow interconnections between layers.

Figure 7: Matrix PCB board

2.1.7 POWER SOCKET


A power socket is a device to which electrical devices can be connected to receive the electric
current required for their operation. Connected by a system of cables to a power source,
usually an electricity generation facility operated by an energy production company, it generally

10
has no moving parts. Instead, it contains metal strips which make contact with the prongs of an
electric plug inserted into the socket. It’s through these contacts that the electric current is
transmitted.

Electrical devices which connect to a power source through a power socket are considered to
be portable because they can easily be connected and disconnected from the power source.
Portable electric devices have a length of cable terminating in a two-, three- or four-prong plug.
The prongs are shaped like blades or cylinders, and may be a combination of the two. When a
plug is inserted into a power socket, a circuit is completed. Every power socket thus needs at
least two slots — one with a live or “hot” contact strip to transmit current to the device being
plugged in, and one to return the current.

Most modern plug and socket combinations are configured so that the plug will fit into the
socket only one way. This ensures that the current is transmitted to the device only through a
single hot wire. Standard power sockets for most electrical devices worldwide contain two or
three slots — the third slot is for grounding, a safety feature that diverts current in the event of
a short-circuit in the device. Some contain a fourth slot; this slot is for an additional hot wire for
devices requiring double the standard voltage.

Figure 8:POWER SOCKET

2.1.8 BULB
An LED lamp or LED light bulb is an electric light that produces light using light-emitting diodes
(LEDs). LED lamps are significantly more energy-efficient than equivalent incandescent lamps
and can be significantly more than most fluorescent lamps. The most efficient commercially
available LED lamps have efficiencies of 200 lumen per watt (Lm/W). Commercial LED lamps
have a lifespan many times longer than incandescent lamps.

LED lamps require an electronic LED circuit to operate from mains power lines, and losses from
this circuit means that the efficiency of the lamp is lower than the efficiency of the LED chips it
uses. The driver circuit may require special features to be compatible with lamp dimmers
intended for use on incandescent lamps. Generally the current waveform contains some
amount of distortion, depending on the luminaires’ technology. LEDs come to full brightness
immediately with no warm-up delay. Frequent switching on and off does not reduce life
expectancy as with fluorescent lighting. Light output decreases gradually over the lifetime of
the LED.

11
Some LED lamps are drop-in replacements for incandescent or fluorescent lamps. LED lamps
may use multiple LED packages for improved light dispersal, heat dissipation, and overall cost.
The text on retail LED lamp packaging may show the light output in lumen, the power
consumption in watts, the color temperature in Kelvin or a color description such as "warm
white", "cool white" or "daylight", the operating temperature range, and sometimes the
equivalent wattage of an incandescent lamp delivering the same output in lumen.

Figure 9: BULB

2.1.9 FAN

A ceiling fan is a fan mounted on the ceiling of a room or space, usually electrically
powered, that uses hub-mounted rotating blades to circulate air.They cool people
effectively by increasing air speed. Fans do not reduce air temperature or relative
humidity, unlike air-conditioning equipment but create a cooling effect by helping to
evaporate sweat and increase heat exchange via convection. Fans may add a small amount
of heat to the room mainly due to waste heat from the motor, though partially due to
friction. Fans use significantly less power than air conditioning as cooling air is
thermodynamically expensive. In the winter a ceiling fan can also be used to bring warm
air, which naturally rises, back down to occupants. This can affect both thermostat
readings and occupants' comfort, thereby improving climate control energy efficiency.
Many ceiling fan units also double as light fixtures, eliminating the need for separate
overhead lights in a room.
It is is a device suspended from the ceiling of a room, with hub-mounted rotating blades
that circulate the air, thereby producing a cooling or destratification effect. Most ceiling
fans have an electrical switch that allows one to reverse the direction of rotation of the
blades.

In the summer, the direction of rotation of the blades is set to blow air downward, so that
the breeze created evaporates sweat on a person's skin and the person experiences a
cooling effect. In the winter, the direction of rotation of the blades is reversed, so that
cooler air (which normally sinks to the floor) is drawn upward, and warmer air that is near
the ceiling is made to circulate downward. In this manner, a ceiling fan can be useful
during both hot and cold seasons.

12
Figure 10:Ceiling Fan

2.2 PAST, PRESENT AND FUTURE OF HOME AUTOMATION


2.2.1 HOME AUTOMATION IN PAST
Home automation really started in a physical sense with the formation of mechanization items,
starting with home apparatuses. The centralization and automation of private exercises has its
underlying foundations in the principal electrically-wired private structures toward the finish of
the nineteenth century. The capacity to enlighten the room from a solitary switch radically
changed the way we lived by making it simple and moderately safe to light vast regions for
broadened periods around evening time.

The following awesome progress accompanied the presentation of the home TV in the 1950s
and the later presentation of the infrared remote control. The two innovations were helpful for
point-to-control correspondence between gadgets however did not have a two-route trade of
data. X10 was discharged in the 1970's as a standard convention for wiring houses for home
automation.

1901-1920: The invention of home appliances- like refrigerators, washing machine,


dishwashers, irons, toaster and garments dryers1966-1967: The invention of ECHO IV and
Kitchen Computer- the ECHO IV was the first brilliant device. In spite of the fact that it was not
industrially sold, the device could register shopping records, control the home's
temperature,and turn apparatuses on and off. the "Kitchen Computer" was made for the
current year. The apparatus was equipped for putting away formulas, yet didn't offer many
models because of poor advertising. The cutting edge came as the Internet, which made an
overall system of PCs in the 1990s.Before long, remote Internet as Wi-Fi turned into a typical
apparatus in American homes.

2000's: The early 2,000's saw a further ascent in brilliant home innovation, including local tech,
home systems administration, and different devices showing up available. A combination of
short-range technologies created by Zen-Sys in 2005, this wireless technology creates a mesh
network at the user’s home and sends signals at the 900 MHz spectrum. The Z-Wave
technology is capable of connecting a variety of devices to control appliances, door locks and
even flood monitors.

2.2.2 HOME AUTOMATION IN PRESENT

13
In recent years the Internet of Things (IOT) have enabled shrewd innovation to end up plainly a
vital piece of our day by day lives. Everything from refrigerators, to apparatuses, to home
security can be controlled with smart home innovation. Home devices, when remotely
observed and controlled through the Internet, are an essential constituent of the Internet of
Things. The present smart homes are more about security and living greener. Current patterns
in home mechanization incorporate remote versatile control, computerized lights, robotized
indoor regulator modification, booking machines, portable/email/content warnings, and
remote video observation Sensors are the eyes and ears of the home system. There are sensors
for an extensive variety of uses, for example, measuring temperature, dampness, light, fluid,
and gas and recognizing development or commotion.

The various technologies used in home automation-

2.2.2.1 Bluetooth
Bluetooth is a remote standard that has a place with the PAN convention family. It works in the
2.4 GHz band partitioned into 79 sub channels with 1MHz separating, utilizing FHSS.GFSK and
additionally PSK regulations are utilized, contingent upon the Bluetooth variant utilized. Full
duplex exchanges are acknowledged by means of TDD.

2.2.2.2 Wi-Fi
Wi‐Fi is probably the most exploited wireless technology nowadays. It belongs to the family of
(W) LAN networks, but with latest amendments it could also be belonging to the (WMAN
family).In distinction to Bluetooth, the Wi‐Fi range is partitioned into just 13 halfway overlaying
sub channels(fourteenth accessible in Japan just), each involving the band of 22MHz.

2.2.3 FUTURE SCOPE


Future homes will be able to offer almost all required services, e.g., communication, medical,
energy, utility, entertainment, and security. As we move into the next generation, more and
more devices will begin to connect to one another. The dream is a future in which data is
communicated between devices and humans without relying on manual input of individual
bytes. Computers that can automatically mine data and then use that data to change aspects of
the home environment is the future. For example, a smart thermostat that is able to
automatically gauge the temperature of a room and then adjust the central heating and cooling
units as necessary or a washing machine that automatically detects its contents and programs
itself to be finished washing at a specified time. These are all goals that engineers are working
toward and depend not only on advances in data-mining technologies but also in big data
computing. Pert is the next generation home automation innovation, that lets you control,
monitor and secure your home with your smartphone. The future healthcare service provider
will consider the smart home an effective way of providing remote healthcare services,
especially to the elderly and disabled who do not require intensive health care support. As

14
technologies continue to advance, you can expect the house of tomorrow to be even more
automated than that of today.

METHODLOGOY
START

OPEN APPLICATION ON

ANDRIOD PHONE

Select Bluetooth module


HC05)

If Bluetooth module is
connected

Tap on the button or give


voice command to switch
device on/off

Voice and button converted


to text by app

Text transmitted to Arduino


nano

Text input received at serial


input of Arduino nano

If text matches

15
Execute command

END

Figure 11:Flow chart of home automation

BLOCK DIAGRAM OF HOME AUTOMATION USING MOBILE


OR VOICE

DC POWER AC POWER

Device1

4 Channel Device2
Bluetooth Arduino
Relay Device3
HC05 Nano
module

Device4

Figure 12:Block diagram of home automation

COST ANALYSIS

S.N Component Name Quantity Price Price.quntity


1 Arduino Nano 1 940 940
2 Bluetooth Hc05 1 615 615
3 Solderless bread board 1 250 250

16
4 Matrix pcb board 1 50 50
5 Male and female header 3pcs 350 350
6 Male to female jumper wire 40pcs 310 310
7 Adapter (charge)5v,2A 1 250 250
8 4 channel relay module 1 660 660
9 Male to male jumper wire 40pcs 314 314

Total=3425

RESULT
Prior to the construction of the project the circuit was first design using proteus design suite.
The program was written in c++ and then uploaded on the Arduino. The program was compiled
using Hitech software. This was done in order to see how the circuit would work under real
condition.The GSM modem was also connected to Arduino and command is given from the
computer so as to send commands to the working circuit and see real time simulatoion for the
GSM based home automation .with the whole the set of all simliation established and the
circuit was seen to performed required task and then real construction of the project began.

figure 13: home automation voice or mobile

17
CONCLUSION
The system as the name indicates, ‘Home automation’ makes the system more flexible and
provides attractive user interface compared to other home automation systems. In this system
we integrate mobile devices into home automation systems. A novel architecture for a home
automation system is proposed using the relatively new communication technologies. The
system consists of mainly three components is a BLUETOOTH module, Arduino microcontroller
and relay circuits. WIFI is used as the communication channel between android phone and the
Arduino microcontroller. We hide the complexity of the notions involved in the home
automation system by including them into a simple, but comprehensive set of related concepts.
This simplification is needed to fit as much of the functionality on the limited space offered by a
mobile device’s display. This paper proposes a low cost, secure, ubiquitously accessible, auto-
configurable, remotely controlled solution. The approach discussed in the paper is novel and
has achieved the target to control home appliances remotely using the WiFi technology to
connects system parts, satisfying user needs and requirements. WiFi technology capable
solution has proved to be controlled remotely, provide home security and is cost-effective as
compared to the previously existing systems. Hence we can conclude that the required goals
and objectives of home automation system have been achieved. The system design and
architecture were discussed, and prototype presents the basic level of home appliance control
and remote monitoring has been implemented. Finally, the proposed system is better from the
scalability and flexibility point of view than the commercially available home automation
systems.

18
REFERENCE
1.Wikipedia

2. Wireless Sensor Networks: Concepts, Applications, Experimentation and Analysis. 2016. p.


108. ISBN 9811004129. The use of standardized, with open standards over proprietary
protocols provides the industry with the freedom to choose between suppliers with guaranteed
interoperability. Standardized solutions usually have a much longer lifespan than proprietary
solutions.

3.Jump up^ "Research and Markets: Global Home Automation and Control Market 2014-2020 -
Lighting Control, Security & Access Control, HVAC Control Analysis of the $5.77 Billion Industry".
Reuters. 2015-01-19. Archived from the original on 2016-05-05.

4. Home Automation & Wiring (1 ed.). New York: McGraw-Hill/TAB Electronics. 1999-03-31.
ISBN 9780070246744

5. http://www.maximumpc.com/article/the high cost of home automation

6. http://homes.yahoo.com/news/5-high-tech-smart-homes-for-the-supe

7. http://www.cnet.com/1990-10839 1-6224211-1.htmlr-rich.html

8. http://www.homeauto.com/Products/Price/What DoesThisCost.asp

9. http://expert-corner.com/2010/05/disadvantages-of-home-automation/

10. http://www.scoop.it/t/home-automation http://www.automatedhome.co.uk/New-


Products/Loxone-Miniserver-Home- Automation-Controller.html

11. http://www.loxone.com/pages/de/default.aspx

12. http://home-automation-systems-review.toptenreviews.com/

19
13. http://fireflyintegrations.com/products/crestron-electronics/

14. http://www.smarthome.com/INSTEON comparison.html

15. http://www.liveautomatic.com/reviews/insteon-vs-x10-zigbee-and-zwave

16. http://en.wikipedia.org/wiki/Ladder logic

17. http://en.wikipedia.org/wiki/Home automation

APPNDEX A: CODE
ARDUINO NANO CODE
#include <EEPROM.h>

#include <SoftwareSerial.h>

SoftwareSerial BT_Serial(2, 3); // RX, TX

#define Relay1 4 // Load1 Pin Out

#define Relay2 5 // Load2 Pin Out

#define Relay3 6 // Load3 Pin Out

#define Relay4 7 // Load4 Pin Out

char bt_data; // variable to receive data from the serial port

int load1, load2, load3, load4, power;

void setup(){

Serial.begin(9600);

BT_Serial.begin(9600);

pinMode(Relay1, OUTPUT); digitalWrite(Relay1, 1);

pinMode(Relay2, OUTPUT); digitalWrite(Relay2, 1);

pinMode(Relay3, OUTPUT); digitalWrite(Relay3, 1);

pinMode(Relay4, OUTPUT); digitalWrite(Relay4, 1);

20
load1 = EEPROM.read(1);

load2 = EEPROM.read(2);

load3 = EEPROM.read(3);

load4 = EEPROM.read(4);

power = EEPROM.read(5);

delay(500);

void loop() {

if(BT_Serial.available()>0){bt_data = BT_Serial.read();}

if(bt_data == 'A'){load1=0;EEPROM.write(1, load1);}

if(bt_data == 'a'){load1=1;EEPROM.write(1, load1);}

if(bt_data == 'B'){load2=0;EEPROM.write(2, load2);}

if(bt_data == 'b'){load2=1;EEPROM.write(2, load2);}

if(bt_data == 'C'){load3=0;EEPROM.write(3, load3);}

if(bt_data == 'c'){load3=1;EEPROM.write(3, load3);}

if(bt_data == 'D'){load4=0;EEPROM.write(4, load4);}

if(bt_data == 'd'){load4=1;EEPROM.write(4, load4);}

if(bt_data == 'E'){power=0;EEPROM.write(5, power);}

if(bt_data == 'e'){power=1;EEPROM.write(5, power);}

bt_data = '0';

if(power==1){

digitalWrite(Relay1, 1);

digitalWrite(Relay2, 1);

digitalWrite(Relay3, 1);

digitalWrite(Relay4, 1);

21
}else{

digitalWrite(Relay1, load1);

digitalWrite(Relay2, load2);

digitalWrite(Relay3, load3);

digitalWrite(Relay4, load4);

BT_Serial.print(power); //send distance to MIT App

BT_Serial.print(";");

BT_Serial.print(load1); //send distance to MIT App

BT_Serial.print(";");

BT_Serial.print(load2); //send distance to MIT App

BT_Serial.print(";");

BT_Serial.print(load3); //send distance to MIT App

BT_Serial.print(";");

BT_Serial.print(load4); //send distance to MIT App

BT_Serial.println(";");

delay(500);

22
APPNDEX B: DATA SHEET
ARDUINO NANO
Arduino Nano Features

Microcontroller: ATmega328

Architecture: AVR

Operating Voltage: 5 V

Flash Memory: 32 KB of which 2 KB used by bootloader

SRAM: 2 KB

Clock Speed: 16 MHz

Analog IN Pins: 8

EEPROM: 1 KB

DC Current per I/O Pins: 40 mA (I/O Pins)

Input Voltage: 7-12V

Digital I/O Pins

22 (6 of which are PWM):PWM Output6

Power Consumption: 19 mA

PCB Size: 18 x 45 mm

Weight: 7 g

Product Code: A000005

23
PIN DESCRIPTION
POWER PIN (Vin, 3. 3V, 5V, GND):

These pins are power pins

Vin

Vin is the input voltage of the board, and it is used when an external power source is used from 5v to
7v.5V is the regulated power supply voltage of the nano board and it is used to give the supply to the
board as well as components.3.3V is the minimum voltage which is generated from the voltage
regulator on the board.

GND

Gnd is the ground pin of the bo ard

RST Pin( Reset):

This pin is used to reset the microcontroller

Analog Pins (A0-A7):

These pins are used to calculate the analog voltage of the board within the range of 0V to 5V.

I/O Pins (Digital Pins from D0 – D13):

These pins are used as an i/p otherwise o/p pins. 0V & 5V

Serial Pins (Tx, Rx):

These pins are used to transmit & receive TTL serial data.

External Interrupts (2, 3):

These pins are used to activate an interrupt.

PWM (3, 5, 6, 9, 11):

These pins are used to provide 8-bit of PWM output.

SPI (10, 11, 12, & 13):

These pins are used for supporting SPI communication.

Inbuilt LED (13):

This pin is used to activate the LED.

IIC (A4, A5):

These pins are used for supporting TWI communication.

24
AREF:

This pin is used to give reference voltage to the input voltage

4 CHANNEL RELAY MODULE

Four-Channel Relay Module Pinout

Pin number Pin Name Description


1 GND Ground reference forthe module
2 IN1 Input to active relay 1
3 IN2 Input to active relay 2
4 IN3 Input to active relay 3
5 IN4 Input to active relay 4
6 Vcc Power supply form the relay module

Features:

- Size: 75mm (Length) * 55mm (Width) * 19.3mm (eight)

- Weight: 61g

- PCB Color: Blue

- There are four fixed screw holes at each corner of the board, easy for install and fix. The diameter of
the hole is 3.1mm

- High quality Single relay is used with single pole double throw, a common terminal, a normally open
terminal, and a normally closed terminal

- Optical coupling isolation, good anti-interference.

- Closed at low level with indicator on released at high level with indicator off

25
- VCC is system power source, and JD_VCC is relay power source. Ship 5V relay by default. Plug jumper
cap to use

- The maximum output of the relay: DC 30V/10A, AC 250V/10A

BLUETOOTH HC05
Specifications

Hardware features
 Typical -80dBm sensitivity

 Up to +4dBm RF transmit power

 Low Power 1.8V Operation ,1.8 to 3.6V I/O

 PIO control

 UART interface with programmable baud rate

 With integrated antenna

 With edge connector

Software features
 Default Baud rate: 38400, Data bits:8, Stop bit:1,Parity:No parity, Data control: has.Supported
baud rate: 9600,19200,38400,57600,115200,230400,460800.

 Given a rising pulse in PIO0, device will be disconnected.

 Status instruction port PIO1: low-disconnected, high-connected;

 PIO10 and PIO11 can be connected to red and blue led separately. When master and slave

are paired, red and blue led blinks 1time/2s in interval, while disconnected only blue led blinks
2times/s.

 Auto-connect to the last device on power as default.

 Permit pairing device to connect as default.

 Auto-pairing PINCODE:”0000” as default

 Auto-reconnect in 30 min when disconnected as a result of beyond the range of connection

26
AT command Default:
How to set the mode to server (master):

1. Connect PIO11 to high level.

2. Power on, module into command state.

3. Using baud rate 38400, sent the “AT+ROLE=1\r\n” to module, with “OK\r\n”

means setting successes.

4. Connect the PIO11 to low level, repower the module, the module

HC-05 Default Settings:-


Default Bluetooth Name: ‚HC-05‛

Default Password: 1234 or 0000

Default Communication: Slave

Default Mode: Data Mode

Data Mode Baud Rate: 9600, 8, N, 1

Command Mode Baud Rate: 38400, 8, N,1

Default firmware: LINVO

Pair HC-05 and smartphone:


1. Search for new Bluetooth device from your phone. You will find Bluetooth device
with “HC-05” name.

2. Click on connect/pair device option; default pin for HC-05 is 1234 or 0000.

After pairing two Bluetooth devices, open terminal software (e.g. Teraterm, Realterm etc.) in
PC, and select the port where we have connected USB to serial module. Also select default
baud rate of 9600 bps.

In smart phone, open Bluetooth terminal application and connect to paired device HC-05.

It is simple to communicate, we just have to type in the Bluetooth terminal application of


smartphone. Characters will get sent wirelessly to Bluetooth module HC-05. HC-05 will
automatically transmit it serially to the PC, which will appear on terminal. Same way we can
send data from PC to smartphone.

27
Pin Description:
The HC-05 Bluetooth Module has 6pins. They are as follows:

ENABLE:

When enable is pulled LOW, the module is disabled which means the module will not turn on
and it fails to communicate.When enable is left open or connected to 3.3V, the module is
enabled i.e the module remains onand communication also takes place.

Vcc:

S upply Voltage 3.3V to 5V

GND:

Ground pin

TXD & RXD:

These two pins acts as an UART interface for communication

STATE:

It acts as a status indicator. When the module is not connected to paired with any other
bluetooth device, signal goes Low. At this low state,the led flashes continuously which denotes
that the module is not paired with other device.When this module is connected to/paired with
any other bluetooth device,the signal goes High.At this high state,the led blinks with a constant
delay say for example 2s delay which indicates that the module is paired.

BUTTON SWITCH:

This is used to switch the module into AT command mode.To enable AT command mode,press
the button switch for a second.With the help of AT commands,the user can change the
parameters of this module but only when the module is not paired with any other BT device. If
the module is connected to any other bluetooth device, it starts to communicate with that
device and fails to work in AT command mode.

28

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy