SlideShare a Scribd company logo
NATIONAL UNIVERSITY OF COMPUTER AND EMERGING SCIENCES, CHINIOT-
FAISALABAD
DIGITAL LOGIC DESIGN
(EL-1005)
DLD PROJECT REPORT
HOME AUTOMATION SYSTEM
Group Members
ABD-UR-RAFAY 22F - 3827 A1
ABDUL MANNAN 22F - 3618 A1
Lab Engineer Signature: ____________
Page 2 of 13
Table of Contents
PROBLEM STATMENT:......................................................................................................................................... 3
INTRODUCTION AND BACKGROUND:.................................................................................................................. 3
BLOCK DIAGRAMS OF MAIN MODULES: ............................................................................................................. 3
FLOWCHART FOR HOME AUTOMATION SYSTEM: .............................................................................................. 5
PROJECT DILEVERABLES AND SPECIFICATIONS:.................................................................................................. 6
RESULTS AND DISCUSSION:................................................................................................................................. 6
1. Security............................................................................................................................................................ 6
2. Energy Efficiency.............................................................................................................................................. 6
3. Saving............................................................................................................................................................... 7
COMPONENTS AND BUDGET: ............................................................................................................................. 7
Arduino UNO ....................................................................................................................................................... 7
Bluetooth............................................................................................................................................................. 8
4 Channel Relay................................................................................................................................................... 9
WORKING ............................................................................................................................................................ 9
Budget ................................................................................................................................................................. 9
Code................................................................................................................................................................... 10
CIRCUIT DIAGRAM............................................................................................................................................. 13
REFERENCES: ..................................................................................................................................................... 13
Page 3 of 13
PROBLEM STATMENT:
The Problem Statement for Home Automation System is that it grants access to
appliances through Bluetooth and makes works and getting access to them easy for the
disabled and Special people.
INTRODUCTION AND BACKGROUND:
This is an Arduino based Bluetooth controlled Home Automation Project. It is
controlled by a smart phone application.
Bluetooth controlled lights is controlled by using Android mobile phone instead of any
other method like buttons, gesture etc. Here we only need to touch the button in
android phone to control the lights and fans that can be turned ON and OFF. So here
android phone is used as transmitting device and Bluetooth is used as receiver.
Android phone will transmit command using its in-built Bluetooth to car so that it can
control in the required action like to control the home appliances.
BLOCK DIAGRAMS OF MAIN MODULES:
The following are the block diagrams:
Page 4 of 13
Page 5 of 13
FLOWCHART FOR HOME AUTOMATION SYSTEM:
Page 6 of 13
PROJECT DILEVERABLES AND SPECIFICATIONS:
Home Automation System has become important in today’s world as it helps to
complete a task with lesser human assistance and in a smarter way. It is used not only
in Residential but in Industrial fields as well.
Houses are becoming smarter and developed these days with the help of automation
devices. Home electrical appliances are using remote-controlled switches rather than
conventional switches. In today’s world, most of the people have access to
smartphones and its use have become very popular and essential in our lives. We can
use smartphones to control the household appliances with just one click or one
message. With the help of controllers and communication devices home appliances
can be remotely controlled.
RESULTS AND DISCUSSION:
The Home automation system has been experimentally proven to work satisfied by
connecting sample appliances to it and the application were successfully controlled
from a wireless mobile device. The Bluetooth client was successfully tested on a
multitude of different mobile phones from different manufacturers, thus proving its
portability and wide compatibly. Thus, a low- cost home automation system was
successfully designed. Implement and tested.
1. Security
Tap your finger to turn on the lights when get home so you worried about What’s
hiding in the shadows. Or in your pathways. Or automate to turn on when You are not
home to look like you are to ward off potential robbers. Door lacks are another
automated home product that increase your home security.
2. Energy Efficiency
Increase your home energy efficiency by remotely powering off systems and
appliances when they aren’t in use. In addition to the standard home automation
Products that give you active control. Some products actively monitor systems and
arm the home owner with knowledge. Insight and guidance to achieve greater control
and energy efficiency.
Page 7 of 13
3. Saving
Home automation literally pays off. When you are using home systems and appliances
only when needed. The saving will apparent in the first Utility bill. No more wasting
money on lights left on when you are not home.
COMPONENTS AND BUDGET:
Arduino UNO
The Arduino Uno is an open-source microcontroller board based on the Microchip
ATmega328P microcontroller and developed by Arduino.cc 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 1 digital I/O pins
(six capable of PWM output), 6 Analog I/O pins, and is programmable with the
Arduino IDE (Integrated Development Environment), via a type B USB cable. It can
be powered by the USB cable or by an external 9-volt battery, though it accepts
voltages between 7 and 20 volts. The Uno board is the first in a series of USB-based
Arduino boards; it and version 1.0 of the Arduino IDE were the reference versions of
Arduino, which have now evolved to newer releases. The ATmega328 on the board
comes pre-programmed with a bootloader that allows uploading new code to it
without the use of an external hardware programmer. There are many versions of
Arduino boards introduced in the market like Arduino Uno, Arduino Due, Arduino
Leonardo, Arduino Mega, however, most common versions are Arduino Uno and
Arduino Mega.
Figure 1 Arduino UNO
Page 8 of 13
Bluetooth
The HC-06 is a popular module which can add two-way (full-duplex) wireless
functionality to your projects. You can use this module to communicate between two
microcontrollers like Arduino or communicate with any device with Bluetooth
functionality like a Phone or Laptop. There are many android applications that are
already available which makes this process a lot easier. The module communicates
with the help of USART at 9600 baud rates hence it is easy to interface with any
microcontroller that supports USART. We can also configure the default values of the
module by using the command mode. So, if you are looking for a Wireless module
that could transfer data from your computer or mobile phone to microcontroller or vice
versa then this module might be the right choice for you. However, do not expect this
module to transfer multimedia like photos or songs; you might have to investigate the
CSR8645 module for that.
Figure 2 Bluetooth
Page 9 of 13
4 Channel Relay
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 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.
Figure 2 Relay
Figure 3 4 Channel Relay
WORKING
As we have used a Bluetooth module (Hc-06), 4 channel relay and Arduino (UNO).
First of all, we connected the Bluetooth module with a device. As we provide signal
from the Device the Bluetooth module triggers and send signal to the Arduino.
Arduino is a micro controller decision making device, it decides what action will be
done to the connected device according to the code entered in it, the signal is
forwarded to the relay and the relay switches the device.
Budget
5000 RS
Page 10 of 13
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); //Swtich relay2 off
digitalWrite(relay3, LOW); //Switch relay1 off
digitalWrite(relay4, LOW); //Swtich relay2 off
digitalWrite(relay5, LOW); //Switch relay1 off
digitalWrite(relay6, LOW); //Swtich relay2 off
digitalWrite(relay7, LOW); //Switch relay1 off
digitalWrite(relay8, LOW); //Swtich relay2 off
dht.begin();
}
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
Page 11 of 13
}
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")
Page 12 of 13
{
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="";
}
delay(1000);
}
Page 13 of 13
CIRCUIT DIAGRAM
REFERENCES:
https://create.arduino.cc/projecthub/aman_a_shastry/home-automation-
with-arduino-78cc8c
https://circuitdigest.com/arduino-home-automation-projects
https://www.academia.edu/44109901/Home_Automation_Project_Report
https://www.electricaltechnology.org/2019/07/smart-home-automation-
system.html

More Related Content

DIGITAL LOGIC DESIGN (1) PROJECT REPORT.docx

  • 1. NATIONAL UNIVERSITY OF COMPUTER AND EMERGING SCIENCES, CHINIOT- FAISALABAD DIGITAL LOGIC DESIGN (EL-1005) DLD PROJECT REPORT HOME AUTOMATION SYSTEM Group Members ABD-UR-RAFAY 22F - 3827 A1 ABDUL MANNAN 22F - 3618 A1 Lab Engineer Signature: ____________
  • 2. Page 2 of 13 Table of Contents PROBLEM STATMENT:......................................................................................................................................... 3 INTRODUCTION AND BACKGROUND:.................................................................................................................. 3 BLOCK DIAGRAMS OF MAIN MODULES: ............................................................................................................. 3 FLOWCHART FOR HOME AUTOMATION SYSTEM: .............................................................................................. 5 PROJECT DILEVERABLES AND SPECIFICATIONS:.................................................................................................. 6 RESULTS AND DISCUSSION:................................................................................................................................. 6 1. Security............................................................................................................................................................ 6 2. Energy Efficiency.............................................................................................................................................. 6 3. Saving............................................................................................................................................................... 7 COMPONENTS AND BUDGET: ............................................................................................................................. 7 Arduino UNO ....................................................................................................................................................... 7 Bluetooth............................................................................................................................................................. 8 4 Channel Relay................................................................................................................................................... 9 WORKING ............................................................................................................................................................ 9 Budget ................................................................................................................................................................. 9 Code................................................................................................................................................................... 10 CIRCUIT DIAGRAM............................................................................................................................................. 13 REFERENCES: ..................................................................................................................................................... 13
  • 3. Page 3 of 13 PROBLEM STATMENT: The Problem Statement for Home Automation System is that it grants access to appliances through Bluetooth and makes works and getting access to them easy for the disabled and Special people. INTRODUCTION AND BACKGROUND: This is an Arduino based Bluetooth controlled Home Automation Project. It is controlled by a smart phone application. Bluetooth controlled lights is controlled by using Android mobile phone instead of any other method like buttons, gesture etc. Here we only need to touch the button in android phone to control the lights and fans that can be turned ON and OFF. So here android phone is used as transmitting device and Bluetooth is used as receiver. Android phone will transmit command using its in-built Bluetooth to car so that it can control in the required action like to control the home appliances. BLOCK DIAGRAMS OF MAIN MODULES: The following are the block diagrams:
  • 5. Page 5 of 13 FLOWCHART FOR HOME AUTOMATION SYSTEM:
  • 6. Page 6 of 13 PROJECT DILEVERABLES AND SPECIFICATIONS: Home Automation System has become important in today’s world as it helps to complete a task with lesser human assistance and in a smarter way. It is used not only in Residential but in Industrial fields as well. Houses are becoming smarter and developed these days with the help of automation devices. Home electrical appliances are using remote-controlled switches rather than conventional switches. In today’s world, most of the people have access to smartphones and its use have become very popular and essential in our lives. We can use smartphones to control the household appliances with just one click or one message. With the help of controllers and communication devices home appliances can be remotely controlled. RESULTS AND DISCUSSION: The Home automation system has been experimentally proven to work satisfied by connecting sample appliances to it and the application were successfully controlled from a wireless mobile device. The Bluetooth client was successfully tested on a multitude of different mobile phones from different manufacturers, thus proving its portability and wide compatibly. Thus, a low- cost home automation system was successfully designed. Implement and tested. 1. Security Tap your finger to turn on the lights when get home so you worried about What’s hiding in the shadows. Or in your pathways. Or automate to turn on when You are not home to look like you are to ward off potential robbers. Door lacks are another automated home product that increase your home security. 2. Energy Efficiency Increase your home energy efficiency by remotely powering off systems and appliances when they aren’t in use. In addition to the standard home automation Products that give you active control. Some products actively monitor systems and arm the home owner with knowledge. Insight and guidance to achieve greater control and energy efficiency.
  • 7. Page 7 of 13 3. Saving Home automation literally pays off. When you are using home systems and appliances only when needed. The saving will apparent in the first Utility bill. No more wasting money on lights left on when you are not home. COMPONENTS AND BUDGET: Arduino UNO The Arduino Uno is an open-source microcontroller board based on the Microchip ATmega328P microcontroller and developed by Arduino.cc 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 1 digital I/O pins (six capable of PWM output), 6 Analog I/O pins, and is programmable with the Arduino IDE (Integrated Development Environment), via a type B USB cable. It can be powered by the USB cable or by an external 9-volt battery, though it accepts voltages between 7 and 20 volts. The Uno board is the first in a series of USB-based Arduino boards; it and version 1.0 of the Arduino IDE were the reference versions of Arduino, which have now evolved to newer releases. The ATmega328 on the board comes pre-programmed with a bootloader that allows uploading new code to it without the use of an external hardware programmer. There are many versions of Arduino boards introduced in the market like Arduino Uno, Arduino Due, Arduino Leonardo, Arduino Mega, however, most common versions are Arduino Uno and Arduino Mega. Figure 1 Arduino UNO
  • 8. Page 8 of 13 Bluetooth The HC-06 is a popular module which can add two-way (full-duplex) wireless functionality to your projects. You can use this module to communicate between two microcontrollers like Arduino or communicate with any device with Bluetooth functionality like a Phone or Laptop. There are many android applications that are already available which makes this process a lot easier. The module communicates with the help of USART at 9600 baud rates hence it is easy to interface with any microcontroller that supports USART. We can also configure the default values of the module by using the command mode. So, if you are looking for a Wireless module that could transfer data from your computer or mobile phone to microcontroller or vice versa then this module might be the right choice for you. However, do not expect this module to transfer multimedia like photos or songs; you might have to investigate the CSR8645 module for that. Figure 2 Bluetooth
  • 9. Page 9 of 13 4 Channel Relay 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 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. Figure 2 Relay Figure 3 4 Channel Relay WORKING As we have used a Bluetooth module (Hc-06), 4 channel relay and Arduino (UNO). First of all, we connected the Bluetooth module with a device. As we provide signal from the Device the Bluetooth module triggers and send signal to the Arduino. Arduino is a micro controller decision making device, it decides what action will be done to the connected device according to the code entered in it, the signal is forwarded to the relay and the relay switches the device. Budget 5000 RS
  • 10. Page 10 of 13 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); //Swtich relay2 off digitalWrite(relay3, LOW); //Switch relay1 off digitalWrite(relay4, LOW); //Swtich relay2 off digitalWrite(relay5, LOW); //Switch relay1 off digitalWrite(relay6, LOW); //Swtich relay2 off digitalWrite(relay7, LOW); //Switch relay1 off digitalWrite(relay8, LOW); //Swtich relay2 off dht.begin(); } 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
  • 11. Page 11 of 13 } 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")
  • 12. Page 12 of 13 { 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=""; } delay(1000); }
  • 13. Page 13 of 13 CIRCUIT DIAGRAM REFERENCES: https://create.arduino.cc/projecthub/aman_a_shastry/home-automation- with-arduino-78cc8c https://circuitdigest.com/arduino-home-automation-projects https://www.academia.edu/44109901/Home_Automation_Project_Report https://www.electricaltechnology.org/2019/07/smart-home-automation- system.html