Professional Documents
Culture Documents
Home automation is still evolving, and getting it to work requires knowledge of both
household electrical wiring and computer networking. But once everything is hooked up
correctly, it can change the way you interact with your home. We show you how you can
use your smart phone as a remote control for your lights, heat and security in your home.
Objectives:
Today’s lifestyle is all about the ease and convenience technology brings to our daily lives. And
now we have big changes in lighting control with the introduction of digital dimmers and
switches controlled remotely by a Smartphone or tablet.
Introduction:
A lighting control system is an intelligent network based lighting control solution that
incorporates communication between various system inputs and outputs related to lighting
control with the use of one or more central computing devices. The major advantage of a lighting
control system over stand-alone lighting controls or conventional manual switching is the ability
to control individual lights or groups of lights from a single user interface device. A smart light
switch not only lets you turn the light on and off using the switch itself, but also works remotely
via Bluetooth LE wireless networking, so you can control your lights using your Smartphone or
other mobile device
Components list:
1. Arduino uno
7. Android phone
8. laptop/pc
Arduino:
What is Arduino?
Why Arduino?
Inexpensive
Cross-platform
Simple, clear programming environment
Open source and extensible software
Open source and extensible hardware
Product details:
The arduino uno rev3 is a micro controller board based on the ATmega 328 (datasheet)
It has 14 digital input and output pins (of which 6 can be used as PWM outputs) and 6 analog
inputs
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
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial
driver chip, instead it features the ATmega 8u2 programmed as a USB-to-serial converter and
Uno means one in Italian and is named to mark the upcoming release of arduino 1.0
Relay:
A relay is a type of switch that provides connection between a low power circuit and a high
power circuit. Electromechanical relays are the most commonly used relays and consists of a coil
that acts as an electromagnet and moving contacts.
Product details:
It is an 8-channel relay interface board, which can be controlled directly by a wide range of
microcontrollers such as AVR, PIC, ARM, PLC, etc
It is also able to control various appliances and other equipments with large current
Relay output maximum contact is AC250V 10A and DC30V 10A
This relay module is 5V active low
Bluetooth modules:
Is a wireless technology standard for exchanging data over short distances (using short-
wavelength UHF radio waves in the ISM band from 2.4 to 2.485 GHz) from fixed and mobile
devices and building personal area networks (PANs). Range is approximately 10 Meters (30
feet).
Product details:
ASIN: B00R95Y0AK
Product details:
ASIN: B01LZ0AGCC
10 Piece Male-Male
10 Piece Female-Female
10 Piece Male-Female
9 volt battery:
Working:
Connect the Bluetooth module with arduino board using jumping wires.
Connect one end of the jumping wires with the Bluetooth module and one end with the
arduino board.
Then connect the relay board with the arduino board using 8 jumping wires, inserting one
end of the wire in the relay board and the other end of the wires in the arduino board.
By now, the arduino board, relay board, and Bluetooth module all three have been connected
together.
The relay board will be given power through the arduino board that itself will be provided
with power by the use of a 9v battery that would be connected with the arduino board.
Connect the arduino board with your pc so you can inert the program in the board according
the relay that you’re going to use.
Connect you’re ac source with the relay board.
Use a wire to connect the relay board with the input source.
Now you’re circuit is complete.
Download arduino app on your phone to control the light.
When power starts flowing through the circuit you can now use your phone to turn the light
on and off.
Applications:
Using this project, we can turn on or off appliances remotely i.e. using a phone or tablet.
The project can be further expanded to a smart home automation system by including
some sensors like light sensors, temperature sensors, safety sensors etc. and automatically
adjust different parameters like room lighting, air conditioning (room temperature), door
locks etc. and transmit the information to our phone.
Additionally, we can connect to internet and control the home from remote location over
internet and also monitor the safety.
Limitations:
The system needs a continuous power supply to be practical or else we might not be able
to control the appliances.
Hence, best way to design the system efficiently would be to implement both the
automated control and manual control through switches at a time.
Advantages:
The main advantage of home automation through android mobile Is that the
physically challenged and disable people
Controlled through one common device
Fast enough to realize the true power of wireless technology
Replace television, air conditioner etc remotes for sleep mode
Smart home
Disadvantages:
It can be used in a limited area(30ft=9.14m)
It is expensive too
It cannot repair easily
Block diagram:
Circuit diagram:
Code:
String inputs;
#define relay1 2 //Connect relay1 to pin 9
#define relay2 3 //Connect relay2 to pin 8
#define relay3 4 //Connect relay3 to pin 7
#define relay4 5 //Connect relay4 to pin 6
#define relay5 6 //Connect relay5 to pin 5
#define relay6 7 //Connect relay6 to pin 4
#define relay7 8 //Connect relay7 to pin 3
#define relay8 9 //Connect relay8 to pin 2
void setup()
{
Serial.begin(9600); //Set rate for communicating with phone
pinMode(relay1, OUTPUT); //Set relay1 as an output
pinMode(relay2, OUTPUT); //Set relay2 as an output
pinMode(relay3, OUTPUT); //Set relay1 as an output
pinMode(relay4, OUTPUT); //Set relay2 as an output
pinMode(relay5, OUTPUT); //Set relay1 as an output
pinMode(relay6, OUTPUT); //Set relay2 as an output
pinMode(relay7, OUTPUT); //Set relay1 as an output
pinMode(relay8, OUTPUT); //Set relay2 as an output
digitalWrite(relay1, LOW); //Switch relay1 off
digitalWrite(relay2, LOW); //Switch relay2 off
digitalWrite(relay3, LOW); //Switch relay1 off
digitalWrite(relay4, LOW); //Switch relay2 off
digitalWrite(relay5, LOW); //Switch relay1 off
digitalWrite(relay6, LOW); //Switch relay2 off
digitalWrite(relay7, LOW); //Switch relay1 off
digitalWrite(relay8, LOW); //Switch relay2 off
}
void loop()
{
while(Serial.available()) //Check if there are available bytes to read
{
delay(10); //Delay to make it stable
char c = Serial.read(); //Conduct a serial read
if (c == '#'){
break; //Stop the loop once # is detected after a word
}
inputs += c; //Means inputs = 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);
}
else if(inputs == "C")
{
digitalWrite(relay3, LOW);
}
else if(inputs == "c")
{
digitalWrite(relay3, HIGH);
}
else if(inputs == "D")
{
digitalWrite(relay4, LOW);
}
else if(inputs == "d")
{
digitalWrite(relay4, HIGH);
}
else if(inputs == "E")
{
digitalWrite(relay5, LOW);
}
else if(inputs == "e")
{
digitalWrite(relay5, HIGH);
}
else if(inputs == "F")
{
digitalWrite(relay6, LOW);
}
else if(inputs == "f")
{
digitalWrite(relay6, HIGH);
}
else if(inputs == "G")
{
digitalWrite(relay7, LOW);
}
else if(inputs == "g")
{
digitalWrite(relay7, HIGH);
}
else if(inputs == "H")
{
digitalWrite(relay8, LOW);
}
else if(inputs == "h")
{
digitalWrite(relay8, HIGH);
}
inputs="";
}
}
References:
1. https://www.popularmechanics.com/home/how-to/a12248/4301977/
2. https://www.electronicshub.org/arduino-based-home-automation/
3. https://www.arduino.cc/en/Guide/Introduction
4. https://arduino-info.wikispaces.com/BlueTooth-HC05-HC06-Modules-How-To
5. www.youtube.com
6. https://www.google.com.pk/search?biw=1366&bih=588&tbm=isch&sa=1&ei=SJR-
WqLuMYq4gQa5s6ygCQ&q=advantages+and+disadvantages+of+home+automation&o
q=advantages+and+disadvantages+of+home+automation&gs_l=psy-
ab.3..0i24k1.97014938.97027555.0.97027999.23.16.0.5.5.0.903.2019.2-1j6-
2.3.0....0...1c.1.64.psy-ab..15.8.2067...0j0i67k1j0i10i24k1.0.8vYVKpjPIIo