Report Phase 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

VISVESVARAYA TECHONOLOGICAL UNIVERSITY

JNANA SANGAMA, BELAGAVI – 590014

A
PROJECT PHASE -2 REPORT
ON
“SMART HOME
LIGHTS CONTROL BY
IOT SYSTEMS”
A Dissertation submitted in the partial fulfillment of the requirement for the award of the Degree
of

BACHELOR OF ENGINEERING
IN
MECHANICAL ENGINEERING
Submitted By
PRATHAMESH (3BK20ME006)
OMKAR (3BK18ME019)
RAHUL (3BK21ME400)

Under the guidance of


Prof. SYED MAHEBOOB PATEL
Department of Mechanical Engineering

BASAVAKALYAN ENGINEERING COLLEGE, BASAVAKALYAN


(Affiliated to visvesvaraya Technological University Approved by AICTE NEW DELHI)
ISO 9001:2015 Certified
Pin-585327 Dist : Bidar , Karnataka
Phone : 08481-254143, 254264 Fax : 08481-254143
Web : www.betbkec. com
BET’s BASAVAKALYAN ENGINEERING COLLEGE

BASAVAKALYAN – 585327
ISO 9001:2015 CERTIFIED

DEPARTMENT OF MECHANICAL ENGINEERING


Certificate
This is to Certify that the Project work entitled “SMART HOME LIGHTS CONTROL BY
IOT SYSTEM” is bonafide work carried out by PRATHAMESH (3BK20ME006), OMKAR
(3BK18ME019), RAHUL (3BK21ME400)of VII semester in partial fulfillment for the award
of Bachelor of Engineering in Department of Mechanical Engineering of Visvesvaraya
Technological University, Belagavi during the year 2023- 2024. It is certified that
corrections/suggestions indicated for internal assessments have been incorporated in the report
deposited in departmental library. The project work has been approved as it satisfies the
academic requirements in respect of project work prescribed for the Bachelor of Engineering
Degree.

Signature of Guide Signature of Coordinator


Prof.SYED MAHEBOOB Prof. PRAVEEN BELKIRE
PATEL

Signature of HOD Signature of Principal

Prof. RAMESH BHOSLE DR. ASHOK KUMAR VANGERI

Name of the examiners Signature


1…………………………………..

2…………………………………..
ACKNOWLEDGMENT

It gives us immense pleasure to write an acknowledgement to this project, contribution of all people
who helped me realize it.

We would like to sincerely thank our Project Guide Prof.Syed Maheboob patel, and Project
Coordinator Prof.Praveen Belkire for their valuable guidance, constant assistance, support,
endurance and constructive suggestions for the betterment of the project, without which this
project would not have been possible.

We would like to convey heart full thanks to our Head of Department Prof.Ramesh Bhosle for
giving us the opportunity to embark upon this topic and for her continue encouragement
throughout the preparation of this presentation.

We acknowledge and expressour sincere thanks to our beloved Principal Dr. Ashok kumar Vangeri
for supporting our in the academic endeavors.

We also indebted to our friends for their continued moral and material support throughout the course
of the project report and in helping us finalize the presentation.

Our heartfelt thanks to all the staff members of mechanical department, who have contributed bits,
bytesand words to accomplish this project.

PRATHAMESH (3BK20ME006)

OMKAR (3BK18ME019)

RAHUL (3BK21ME400)
DECLARATION

We here by declare that the Project report entitled “SMART HOME LIGHTS CONTRL BY IOT
SYSTEM” submitted by us to Institution/Visvesvaraya Technological University, Belagavi in Partial
fulfillment of the requirement for the award of the degree of BE in MECH is a record of bonafide Project
work carried out by us under the guidance of Prof.Syed Maheboob patel and Project coordinator Prof.
Praveen Belkire.
We further declare that the work reported in this project followed the guidelines provided by the VTU
/Institute in preparing the project report.

Name : USN: Signature of the Student

PRATHAMESH 3BK20ME006 ……………………………..

OMKAR 3BK18ME019 .…………………………….

RAHUL 3BK21ME400 .…………………………….


ABSTRACT

This project explores the implementation of a smart home lighting control system using Internet of Things
(IoT) technology. The system integrates sensors and actuators to enable automated and remote management
of lighting conditions. Through a user-friendly interface, residents can customize settings, schedule lighting
events, and monitor energy consumption. The IoT-based architecture enhances efficiency, convenience, and
energy conservation, contributing to a more sustainable and intelligent home environment.
SL.NO CONTENTS Page No

01 CHAPTER 1

Working principle of Arduino-Bluetooth Module


02 CHAPTER 2
INTRODUCTION OF AUTOMATION

03 CHAPTER 3

COMPONENT USE THIS APPLICATION

04 CHAPTER 4
ABOUT ARDUINO NANO

05 CHAPTER 5
ABOUT HC-05 BLUETOOTHMODULE

06 CHAPTER 6
ABOUT RELAY MODULE

07 CHAPTER 7
ABOUT RELAY POWER SUPPLY

08 CHAPTER 8
ABOUT IOT BASE HOME LIGHT CONTROLLING

09 CHAPTER 9
PROGRAMMING ARDUINO NANO

10 CHAPTER 10
MIT APP INVENTOR

11 CHAPTER 11

HOW TO OPERATE THE APP


12 CHAPTER 12

ADVANTAGES AND DISADVANTAGES OF HOME AUTOMATION


CHAPTER 1
Working principle of Arduino-Bluetooth Module

• The Working principle of Arduino-Bluetooth Module


• In this project, there are three main components used; an
Android Smartphone, Bluetooth transceiver, and an
Arduino.

• IoT project using Arduino and Bluetooth Module to


control LED through Android App
• The Android app is built to send serial data to the Bluetooth Module
HC-05 by pressing ON button. As Bluetooth Module HC-05 works on
serial communication. It receives the data from the app and sends it
through TX pin of Bluetooth module to RX pin of Arduino. The
uploaded code inside Arduino checks the data received. If the receive
data is 1, the LED turns ON, and if the received data is 0 the LED turns
OFF.
CHAPTER 2
INTRODUCTION OF AUTOMATION

 What is Automation ?
 Automatic with operation it’s called as automation

 Histroy of automation ?
 Manual Process
 Pneumatic Process
 Relay Control Process
 Micrologic control base Process

 Manual Process :- Manually controlling the any process for


Ex : ON/OFF switch

 Pneumatic process :- By using compressure air controlling the


any Process for Ex : open/close door

 Relay control process :- Relay is electromagnatic switch


Ex : NO(Normally open) type operation
NC(Normally close) type operation

 Micrologic controlling base process :- Using micro-controller


with logically control the input and output.
Ex : 8051 micro-controller
CHAPTER 3
COMPONENT USE THIS APPLICATION

 Arduino Nano

 HC-05 Bluetooth Module

 4-Channel 5V Relay Module


 Jumper Wires

 Bulb Holder

 5V 2Amp Power Adapter


CHAPTER 4
ABOUT ARDUINO NANO

• Arduino is Microcontroller base compact controlling


device its haveing Number of Inputs and outputs.
• Mini USB data transfer port RXD & TXD communication
serial port.
• Digital (ON/OFF) or Analog (0-5V) variable
Inputs/outputs we can connect and by using C++
programming we can right the Logic as per our
Application.
CHAPTER 5
ABOUT HC-05 BLUETOOTH MODULE

• Ever wanted to control your Mechanical Bots with an


Android Phone or design the robots with custom
remote, here in this tutorial we will learn about a
Bluetooth Module HC-05 used for the above mentioned
and many other cases. Here we will be understanding
the connection and working of a HC-05 module and also
its interfacing with custom android app.
• Basics
• Wireless communication is swiftly replacing the wired
connection when it comes to electronics and
communication. Designed to replace cable connections
HC-05 uses serial communication to communicate with
the electronics. Usually, it is used to connect small
devices like mobile phones using a short-range wireless
connection to exchange files. It uses the 2.45GHz
frequency band. The transfer rate of the data can vary
up to 1Mbps and is in range of 10 meters.
TX --------------------------------> RX
RX -------------------------------- > TX
VCC --------------------------------> 5v
GND --------------------------------> GND
LED Pin Arduino UNO
Pin 1 - ------------------------------ > GND
Pin 2 - ------------------------------ > Pin 13

• The image is an accurate representation of the connections. The


labels are given on the back of the HC-05 bluetooth module. The RX
pin should be connected to TX on the arduino, while the TX pin
should be connected to RX on the arduino. The rest is as in normal
components: The GND to GND on arduino and VCC to 5 volt power
supply.
• HC-05-->Arduino
• RX-->TX
• TX-->RX
• GND-->GND
• VCC-->5v
CHAPTER 6
ABOUT RELAY MODULE

• Relay modules are simply circuitboardsthat house one or more


relays. They come in a variety of shapes and sizes, but are most
commonly rectangular with 2, 4, or 8 relays mounted on them,
sometimes even up to a 16 relays.

• Relay modules contain other components than the relay unit. These
include indicator LEDs, protection diodes, transistors, resistors, and
other parts. But what is the module relay, which makes the bulk of the
device? You may ask. Here are facts to note about it:

• A relay is an electrical switch that can be used to control devices and


systems that use higher voltages. In the case of module relay, the
mechanism is typically an electromagnet.
• The relay module input voltage is usually DC. However, the electrical
load that a relay will control can be either AC or DC, but essentially
within the limit levels that the relay is designed for.
• A relay module is available in an array of input voltage ratings: It can
be a 3.2V or 5V relay module for low power switching, or it can be a 12
or 24V relay module for heavy-duty systems.
• The relay module information is normally printed on the surface of
the device for ready reference. This includes the input voltage rating,
switch voltage, and current limit.
CHAPTER 7
ABOUT RELAY POWER SUPPLY

• Switched-modepower supplies are classifiedaccording to the type of


input and output voltages. The four major categories are:

• AC to DC
• DC to DC
• DC to AC
• AC to AC
• A basic isolated AC to DC switched-mode power supply consists of:

• Input rectifier and filter


• Inverterconsisting of switching devices such as MOSFETs
• Transformer
• Output rectifier and filter
• Feedback and control circuit
• The input DC supply from a rectifier or battery is fed to the inverter
where it is turned on and off at high frequencies of between 20 KHz and
200 KHz by the switching MOSFET or power transistors. The high-
frequency voltage pulses from the inverter are fed to the transformer
primary winding, and the secondary AC output is rectifiedand smoothed
to produce the required DC voltages. A feedback circuit monitors the
output voltage and instructs the controlcircuit to adjust the duty cycle to
maintain the output at the desired level.
• There are different circuit configurations known as topologies, each
having unique characteristics, advantages and modes of operation, which
determines how the input power is transferred to the output.

• Most of the commonly used topologies such as flyback, push-pull, half


bridge and full bridge, consist of a transformer to provide isolation,
voltage scaling, and multiple output voltages. The non-isolated
configurations do not have a transformer and the power conversionis
provided by the inductive energy transfer.

• Advantagesof switched-mode power supplies:

• Higher efficiencyof 68% to 90%


• Regulated and reliableoutputs regardless of variations in input supply
voltage
• Small size and lighter
• Flexible technology
• High power density
• Disadvantages:

• Generates electromagnetic interference


• Complex circuit design
• Expensive compared to linear supplies
• Switched-mode power supplies are used to power a wide variety of
equipment such as computers, sensitive electronics, battery-operated
devices and other equipment requiring high efficiency.
CHAPTER 8
ABOUT IOT BASE HOME LIGHT CONTROLLING

• The Arduino Nano, which functions as the system’s brain, is at its center.
The HC-05 Bluetooth module is then included, creating a wireless
communication link between the Arduino and the Android application.
The circuit incorporates a 4-channel relay module for controlling
numerous appliances. The load is immediately linked to the neutral
when the power source, which supplies 220 volts, is put into the system.
The usually open output of the relay is connected to the load, and the
line from the power supply is connected to the relay’s common terminal.
A 5-volt, 2-ampere power adapter powers the whole arrangement,
providing a steady source of power for the Arduino Nano, Bluetooth
module, and relay module. The MIT App Inventor website was utilized
to create the Android app, which serves as the linked appliances’ user
interface. After gaining an understanding of the circuit layout, the next
step is to physically connect the hardware parts according to this
schematic in order to activate the system. This thorough integration
creates a unified home automation system by enabling smooth
communication between the Arduino, Bluetooth module, and Android
application.
CHAPTER 9
PROGRAMMINGARDUINO NANO
#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;

voidsetup(){
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);

load1 = EEPROM.read(1);
load2 = EEPROM.read(2);
load3 = EEPROM.read(3);
load4 = EEPROM.read(4);

power = EEPROM.read(5);
delay(500);
}

voidloop() {
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);
}else{
digitalWrite(Relay1, load1);
digitalWrite(Relay2, load2);
digitalWrite(Relay3, load3);
digitalWrite(Relay4, load4);
}
BT_Serial.print(power); //senddistance to MIT App
BT_Serial.print(";");
BT_Serial.print(load1); //senddistance to MIT App
BT_Serial.print(";");
BT_Serial.print(load2); //send distance to MIT App
BT_Serial.print(";");
BT_Serial.print(load3); //senddistance to MIT App
BT_Serial.print(";");
BT_Serial.print(load4); //senddistance to MIT App
BT_Serial.println(";");

delay(500);
}

 Explanation :-
• To maintain the load’s status, the EEPROM library is first incorporated
into the Arduino code that is given. The configuration of the system is
maintained even after a power cycle thanks to the EEPROM, which is
used to save the status of each load. In addition, the Bluetooth module
(HC-05) does not need to be detached during code upload since the
SoftwareSerial library is used to create a custom serial (BT_Serial).
Initialization is done for the Bluetooth data and load status variables, as
well as the pin configurations for the 4-channel relay module. The setup
step sets the relay pin configuration, baud rates for the built-in serial
and Bluetooth serial, and starting states for the loads depending on
EEPROM data.

• In the loop section that follows, the code reads data from the Bluetooth
serial continually. Corresponding actions are performed based on the
received data (A, B, C, D, or E, reflecting various loads and the power).
For example, ‘A’ indicates a request to activate Load 1 (a light, for
example), change its variable to 0 and update the EEPROM
appropriately. On the other hand, ‘a’ denotes a request to set its variable
to 1 and disable Load 1. The power state (E) and the other loads (B, C,
D) follow a similar logic, offering a complete control system.

• With the help of Bluetooth instructions, the code updates load statuses
and power circumstances in a methodical manner, guaranteeing
synchronizationbetweenthe Arduino and the Android application. Real
time updates on the Android app are made possible by the code, which
prints the current power and load status. Furthermore, a 500
millisecond delay is included to ensure that the loop runs smoothly. The
software component for the home appliance control system is then fully
integrated when the code is uploaded to the Arduino Nano using the
Arduino IDE.
CHAPTER 10
MIT APP INVENTOR

• The MIT App Inventor was used to create the companion Android
application for the home appliance control system. This tool offered an
easy-to-use interface for designing graphical user interfaces without
requiring a deep understanding of programming. To start the process, go
to the MIT App Inventor website, sign in using your Gmail account, and
start a new project. After that, the graphical user interface (GUI) for the
app was built, with buttons to regulate different loads, a button to link
Bluetooth, and labels to show the current state of each load and power.

• The application’s auto-connection functionality streamlines the user


experience by emphasizing that it instantly connects to the previously
associated Bluetooth module when it is opened. In addition, the
application’s general functioning depends on the graphic components,
including buttons and labels. The voice control element of the app was
described, showing how speech recognition was used to translate
spoken instructionsinto text, before moving on to the functionalities of
the app. This innovation improved the accessibility and hands-free
operation of the home automation system by enabling users to
regulate the loads and power using voice commands.
LOGIC :-

The MIT App Inventor’s blocks component, which depicts the app’s visual
programming logic, was demonstrated. Each block was well explained,
showing how it worked with the Bluetooth module and converted user
inputs into commands for the Arduino. Users received real-time feedback
on the application’s interface through the explanation of the color-coded
text updates based on the power and load condition. Users were guided
through the steps to download and install the APK file from MIT App
Inventor on an Android device by outlining the process of producing the
APK file. In order to connect the Bluetooth module to the Arduino-based
home appliance controlsystem, the last step was to pair it with the app. All
things considered, the combination of the Arduino hardware with the MIT
App Inventor provided a complete home automation solution, enabling
consumers to simply operate their appliances using both voice and
physical controls.
• Here is the blocks you need on the MIT app inventor. It is fairly
simple. You need a list picker, two buttons and a Bluetooth
client, which can be picked easily from the 'Design' section.

• You can name the components however you like. I just stuck to
simple names like Button1 and Button2, as can be seen. You can
rename your components on the pane which is the furthest to the
right. You can choose components and designs on the pane
furthest to the left.

• The two panes in the middle are for the design and component
listing. I have gone for a very simple design, as can be seen. A list
picker is essential. This is what I have named 'Bluetooth'.
• We will code so that when this button is pressed, it displays all
Bluetooth devices nearby. The Bluetooth client can be seen in one
of the middle panes, listed. It is not on the screen, as the user will
not be able to see it, but it is what will be tracking other
Bluetooth devices. The 'ON' and 'OFF' I have used are the buttons.
• Then, the rest is very simple! All you have to do is download
the MIT app inventor companion app onto your phone, and
then scan a code from the website, and you can have the app on
your phone.

• You just have to open your app which you made on the website,
click on connect, and then select AI companion. Then, you just
just scan the QR code from your phone's MIT app, and then you
will have the app on your phone, but only temporarily. You
have to scan every time you want to use it. It will stay open for
a while, but it will lose connection if you close it, or leave it
inactive for long.

• Next, just click on the list picker, and choose a Bluetooth device.
The password for HC-05 is generally 1234 or 0000. Connect to
the HC-05, and then click on the 'ON' and 'OFF' buttons (or
however you have named them) and it will work, if you have
connected the circuit properly!

• Do not forget to program the Arduino! That is the most


important thing. The code is at the end of the page.

• Once you have learnt this, you can use the same principle to
make other amazing projects using Bluetooth! Just remember
to send text from the module to Arduino via the app, and then
program the Arduino to make something happen! It is as easy
as programming a button-but you just have to be careful to use
'char' with text and not 'int' while programming. I made that
mistake! I plan to make a Bluetooth-controlled robot next,
which you can control from your phone.
CHAPTER 11
HOW TO OPERATE APP

Step 1
Click on Bluetooth button
Select HC05 Module

Step 2
Next Click on Power ON
button

Step 3
Next Click on Any ON
button its ON the OUTPUT

Step 3

After the Checking Turn


OFF the OUTPUT
CHAPTER 12
ADVANTAGES AND DISADVANTAGES OF HOME AUTOMATION

• Advantages of Home Automation:

• Convenience: One of the main advantages of home automation is the


convenience it offers. With home automation, you can control various
aspects of your home with just a few clicks on your smartphone or
voice commands to your virtual assistant. This includes everything
from turning off lights to adjusting the thermostat to unlocking doors.

• Energy Efficiency: Home automation can also help you save energy and
reduce your carbon footprint. For example, you can set your smart
thermostat to automatically adjust the temperature based on whether
you’re at home or away, or to turn off the lights in rooms that are not in
use.

• Increased Security: Home automation can also enhance your home


security. With a smart home security system, you can monitor your
home and receivealerts if there is any suspicious activity. You can also
control your security cameras and alarm system from your
smartphone.

• Cost Savings: Finally, home automation can also save you money in the
long run. By reducing your energy consumption and automating your
home security, you can lower your monthly utility bills and potentially
even reduce your insurance premiums.
• Disadvantages of Home Automation:

• Cost: One of the main drawbacks of home automation is the cost. Smart
devices and systems can be expensive, and the cost can add up quickly
if you want to fully automate your home.

• Reliance on Technology: Home automation also means that you are


relying on technology to controlvarious aspectsof your home. If there
is a power outage or internet connectivity issues, you may not be able
to control your smart devices until the issue is resolved.

• Privacy Concerns: With so many connected devices in your home, there


is also the potential for privacy concerns. Hackers could potentially
gain access to your smart devices and collect sensitive information or
even control them remotely.

• Learning Curve: Finally, home automation can also have a learning


curve. Setting up and configuringyour smart devices and systems can
be complex, and it may take some time to learn how to use them
effectively.

• So, is home automation good or bad? Ultimately, it depends on your


perspective. Home automation offers many benefits, including
convenience, energy efficiency, increased security, and cost savings.
However, there are also some potential drawbacks, including the cost,
reliance on technology, privacy concerns, and learning curve. If you are
comfortable with the trade-offs, then home automation can be a great
addition to your home. However, if you have concerns about the
potential drawbacks, then it may not be the best choice for you
CON CLU SION

• The IoT device market has undergone radical changes in only a


few short years. Starting with disparate devices and no
ecosystems to speak of, the market has now grown to encompass
enterprise players working together to create ecosystems,
tailored for mobile technology, which allows IoT devices to
become interconnected.

• Automaton of the home may have once seemed like a peculiar


and unlikely concept, but as our devices become smarter and
more investment is poured into the development of ioT
consumer products, we are likely to see increased competition
spur on further innovation in the field.
FU TU RE SCO PE

• Smart home automation is becoming the most popular


technology adopted by every home today.

• From opening one’s curtain in the morning to adjusting the


lighting of the room, smart homes are becoming an inevitable
part of everyone’s daily lives.

• Smart home automation gives the ability to monitor what goes


on in the house even when you are miles away using your
smartphone or tablet.

• With the advancements in IoT and AI technology, smart


appliances and gadgets are able to mimic daily routines and this
is just the beginning.

• In a few years, the future of home automation will transform the


way humans interact with all the appliances and the way they
will work together with other appliances.
REFERENCE
1.
Guth Jasmine et al., A Detailed Analysis of IOT Platform Architectures:
Concepts Similarities and Differences, Springer-Verlag, 2018.
Show in Context Google Scholar

2.
Majid Al Kuwari, Ramadan Abdulrahman et al., "Smart-Home
Automation using IOT-based Sensing and Monitoring Platform", IEEE
12th International Conference on Compatibility Power Electronics and
Power Engineering, 2018.
Show in Context View Article
Google Scholar
3.
Kishore. P. T. Veeramanikandasamy, K. Sabbath and S. Veerakumar,
"Internet of Things based Low-Cost Real-Time Home Automation and
Smart Security System", International Journal of Advanced Research in
Computer and Communication Engineering, vol. 6, no. 4, 2017.
Google Scholar
4.
International Journal of Advanced Research in Computer and
Communication Engineering, vol. 6, no. 4, April 2017.
Show in Context Google Scholar
5.
Son SeungChul, Kim NakWoo, Lee ByungTak, Cho Chae Ho et al., "A
Time Synchronization Technique for CoAP based Home Automation
Systems", IEEE Transactions on Consumer Electronics, February 2016.
Show in Context Google Scholar

You might also like