Arduino Based Home Automation Through Internet of Things IoT
Arduino Based Home Automation Through Internet of Things IoT
Department of Mechanical
Engineering
V.R.Siddhartha Engineering College
(Autonomous)
Affiliated to Jawaharlal Nehru Technological University Kakinada,
Approved by AICTE & ISO 9001: 2008 Certified
Vijayawada-520007
CERTIFICATE
This is to certify that the Internship report entitled “Arduino Based Home Automation through
done by him/ her and submitted during 2024– 2025 academic year, in partial fulfillment of the
I hereby declare that the dissertation entitled “Arduino Based Home Automation through Internet of
Things (IoT)”submitted for the B.Tech Degree is my work and the dissertation has not formed the
basis for the award of any degree, associates, fellowship or any other similar titles.
Date: 208W1A03B2
iii
ACCEPTANCE LETTER ISSUED BY COMPANY
OFFER LETTER
We are delighted to present you with an offer for the position of Internet Of Things Internship commencing
from December 15, 2024 to March 15, 2025.
As an intern, you will have the opportunity to gain valuable experience. As a temporary employee, please
be aware that you won't receive the same benefits as our regular staff.
Kindly adhere to our company's policies, including those related to conduct, safety, and confidentiality. We
have every confidence that your internship with us will prove to be fulfilling and we extend our best wishes
for success in this promising opportunity.
We look forward to welcoming you to our team and witnessing your growth and contributions firsthand.
P Abhishek
Human Resources (HR)
Slash Mark IT Solutions (OPC) Pvt Ltd [email protected]
iv
TABLE OF CONTENTS
List of Abbreviations….................................................................(iv)
List of Figures…...........................................................................(iv)
List of Tables…...........................................................................(v)
Abstract…..................................................................................(vii)
Title
CHAPTER 1: Introduction
1.1 Smart Home….............................................................................................................3
1.2 Internet of Things.........................................................................................................5
1.3 Objective.......................................................................................................................6
1.4 Methodology.................................................................................................................6
CHAPTER 2: Literature Review..............................................................................................9
CHAPTER 3: System Development.......................................................................................11
3.1 Tools and Technologies Used…...................................................................................11
3.2 Design…....................................................................................................................23
3.3 Development...............................................................................................................30
3.4 Algorithm....................................................................................................................32
CHAPTER 4: Performance analysis.....................................................................................34
4.1 Graphical and Tabular Analysis..................................................................................35
4.2 Output Screenshots.....................................................................................................38
CHAPTER 5: Conclusion......................................................................................................40
5.1 Future work.................................................................................................................41
REFRENCES......................................................................................................................41
APPENDEX.........................................................................................................................43
v
LIST OF FIGURES
Figure no Description Page no
1 Smart home 4
2 Uses of IoT 6
3 Methodology 7
4 Arduino Uno 12
5 Arduino Uno pinout 14
6 Bluetooth module 14
10 LDR Sensor 17
11 Esp8266 Wi-Fi module 19
12 Potentiometer 20
13 LED Display 21
14 Arduino IDE 22
15 Proteus8 Professional 23
16 Blynk Application 24
18 IFTTT 25
23 Smart car parking 30
25 Wi-Fi Controlled lights 31
26 Light Intensity vs. Resistance graph 36
27 Light intensity vs. Voltage graph 37
vi
LIST OF TABLES
Table no Description Page no
1 Technical Specifications 12
2 LM35 Data 35
3 LDR Data 36
vii
LIST OF ABBREVIATIONS
S No. Abbreviations Description
1 IDE Integrated Development Environment
2 ADT Android Development Tools
3 DDS Data Distribution Service
4 AMQP Advanced Message Queuing Protocol
5 IR Infrared
6 LED Light Emitting Diode
7 LDR Light Dependent Resistor
8 CMOS Complementary metal-oxide semiconductor
9 DTR Data Transmission Rate
10 SPI Serial Peripheral Interface
11 EEPROM Electrically Erasable Programmable Read Only
12 RFID Radio-frequency identification Radio Frequency
vii
i
ABSTRACT
Today, the use of home automation has increased by leaps and bounds. Home automation is one
of the most interesting field information technology. Home automation in simple terms is
dominating several activities of our home through advance technologies. In this project we will
develop a prototype demonstrating various aspects of Home Automation, like controlling
electronic devices, using the devices only when needed thus saving energy, switch on/off
electrical appliances with mobile phone from distinct places. It permits the person to carry out
different acts of home from a distant place. By using various type of sensors we can automate
our homes.
The unique feature of home automation is that all the devise in the home are controlled
automatically by the help of remote sensor that is connected to the central host PC.
The Wi-Fi which is a wireless technology is used to have a connection between the webserver
and the NODEMCU.
The hardware and software components comprise of Arduino IDE, Breadboard, Jumper cables,
Arduino Uno, NodeMCU ESP8266, HCSR04, LED Display, and Potentiometer.
ix
1 INTRODUCTION
Human beings are very lazy creatures, we want to do all of our work by just sitting at a one place
and not bothering to go out and socialize. Emerging technology has on the other hand is trying its
best to fulfil our demand by everyday introducing something new. One of the emerging and
interesting field is Internet of Things.
Under Internet of Things we have a small domain called Home automation in which focus is on
automating almost every device of our homes. We can make our own security system just by
using sensors and doing some code. We can control the devices wirelessly by using Bluetooth or
Wi-Fi module. It is all about connecting out devices with the network so that we can control
almost anything from anywhere. Unlimited amount of sensors are available in the market and our
task is only to deeply understand their functioning and implement them in various areas of
concern. One of the examples is of water level sensor, we can use it in our water tanks to
measure the level of water and automatically the motor will be turned off when the level exceeds
some threshold value.
Need to automate the device can come to any of us but we do not have enough of the knowledge
of how to do the things. So the need to study the basic concepts of Internet of Things are
important. We can get various ideas related to the innovation by constantly surveying the people
by emails or sms etc.
Today Internet of Things is an important part of innovation where constant researches are going
on and in Home automation everyday something new is being generated. In our project we will
be testing some of the basic sensors and then try to control some of the devices using Bluetooth
and Wi-Fi module.
Major issue now a days is the issue of privacy. With recent events like Facebook Cambridge
analytica case, privacy of users is becoming of great concern to the state authorities in position.
1
Data from several websites and the data stored on various clouds also has an issue of privacy
2
due to increasing number of cyber-attacks and increasing cases of data being stolen without
the consent of the user. Data from several servers is being stolen and sold to big corporate so
that they could easily target their audience and make money out of it.
Recently the Supreme Court of India in Justice K S Puttaswamy vs Union of India & Others
stated that privacy is one of the fundamental duties of the citizen of India thus protecting
privacy is also a major issue in Internet of Things and in the internet world.
Major economies of the world like Europe, United States Of America, China and many other
countries have very strict data protection laws like Europe has General Data Protection
Regulation(GDPR) under which user has the choice with whom he/she wants to share its
information and also has the right to be forgotten.
There are several types of devices controlled through home automation which are:
Individual Control devices: In this method, each device is controlled individually thus it is
very user friendly and handy. It was used in early days of evolution of Internet of Things.
Distributed Control Systems: In this method, the best part is emergency shut down which
becomes very useful when it comes to fire detection or any other such danger event.
Centrally Controlled Systems: In these systems, the devices are programmed via computer so
that it could handle all kinds of functionality required by the user such as Air Conditioners,
heaters, doors, windows, security systems, car parking etc.
3
1.1 Smart Homes
“Home Automation”, “Connected Devices” and “Internet of Things” are often interchangeable,
but they are discrete parts of the Smart Home concept:
• Automated home: As earlier discussed this refers to automating most of the devices of you
home for example switching off the lights when nobody needs to use it or turning on and off
other appliances in the home. Or controlling the lights with your own voice or by mobile.
• Internet of Things: Smart homes are made by using Internet of Things. We use various
sensors at different places and make them connected to the network so they can communicate
with each other and there is no need of asking for the inputs and other details from the user.
• Connected devices: These are the intelligent devices which have the ability to connect to
the internet and start communicating with the user by use of programming. For example we can
use it in our water tanks to measure the level of water and automatically the motor will be
turned off when the level exceeds some threshold value.
Savings: Internet of Things promoted devices such as learning thermostats, smart sprinklers,
Wi- Fi enabled lights, and electricity monitoring outlets as well as water heater modules reduces
the energy and water use.
4
Figure 1: Smart home[5]
Control: We can easily control all the network connected devices almost everywhere around
the world, for example we did not turn off the lights but our light system is connected to the
network via some sensors and constantly monitoring the status of the lights and giving us the
report via sms or any other means. By seeing the status of the lights we can turn it off by sending
some command.
Security: This can be achieved by using Wi-Fi enabled cameras, motion sensor which will
sense the motion or any activity of any object and by using this in collaboration of alarm we can
easily monitor what is going on in the house.
5
Safety: It can be achieved by using sensors like water sensor which can detect any leakage in
the water tank, smoke sensors which can detect fire etc. Using these sensors and connecting
them to the network can prevent many tragedies from encountering.
Convenience: This is the most desirable feature or advantage of smart homes. We do not have
to do any kind of hard work rather everything happens automatically just by sitting at a corner
and giving commands to the devices. Example in voice controlled homes we just need to say that
turn off lights and the lights will switch off, or led display on fridge which will display that milk
is in the fridge or we need to buy it or if we are out of it can order itself online.
IoT is the network of devices (that are mainly various types of sensors attached to many devices)
which permits these sensors to collect and communicate with user and transmit over the network.
Due to this we can remotely access or control any of our devices and in interaction between the
computer world and the physical world is merging as the new innovation which is helping in
increasing efficiency economic benefits and accuracy. We can see how it is efficient,
economically beneficial by taking this simple example of turning off the lights automatically or
automated taps from which water comes only when hands or any other object is beneath the tap,
this way our electricity and water which are very crucial resources are not wasted at all. IoT can
be used in the following fields:
6
Figure 2: Uses of Internet of Things [7]
1.3 Objective
1.4 Methodology
In this smart home automation we would have a system which can identify the owner of the house.
When someone is at the door it sends the picture of the person to the owner and door
automatically opens or closes on the command of the owner. When you enter the room the
lightning of the room goes as specified by the user according to his mood.
7
Figure 3: Methodology
To achieve all of the above we will build an html page accessible from every device which will
all the functionalities needed to automate the home. Using esp8266 module we will create a web
server and http requests will be send to perform a particular task. It will look like this:
8
We will use relay here to connect to the appliances working on high voltage. Relay is kind of
switch which will switch from 5v to the high voltage.
9
2 LITERATURE REVIEW
2.1Home Automation through IOT: Vinay Sagar, KN. Kusuma, SM. (2013)
Today the automated home systems face four primarily four challenges; challenges include: elevated
possession worth, inflexibility, poor flexibility, what is more as issue in achieving security. The foremost
aim of this project is to vogue and make an automated home system mistreatment IoT technology that is
apt of dominating and automating the appliances or devices inside the home through a straight forward
and controllable web interface. The kind of the system talked about throughout this paper, encompasses a
pleasant flexibility of mistreatment Wi-Fi technology to interconnect the distributed sensors to home
automation system server.
Another major issue nowadays is the issue of privacy. With recent events like Facebooks Cambridge
analytica case, privacy of users is becoming of great concern to the state authorities in position. Data
from several websites and the data stored on various clouds also have an issue of privacy due to
increasing number of cyber-attacks and increasing cases of data being stolen without the consent of
the user. Data from several servers is being stolen and sold to big corporate so that they could easily
target their audience and make money out of it.
One of the truism within the info Technology is web of Things (IoT). It is the future of
technology which will transform the simple objects into the smart ones. The technology want to
unify everything and not only want us to control the things but also remain informed about the
state of the device. This particular paper tells about the overview of this new technology that is
IoT, architecture and how it is vital in our daily life.
“The most profound technologies area unit those who disappear. They weave themselves into the
material of daily life till they are indistinguishable from it” was Mark Weiser’s central statement
in his seminal paper in scientific Yankee in 1991. After the arrival of this new technology many
new changes are seen in day today’s life. This concept is becoming popular with times as there
are several applications of this. Internet of Things need is increasing everyday due to the large
10
automation demands by the large firms, as everything becomes super easy if the concept of
Internet of things is implemented in industries. The ability to do every task that can be automated
with great precision, high speed and minimum errors has allowed various industries to be more
productive and efficient. So it can be seen that Internet of Things is the technological revolution
which has made everyday life very easy with knowledge of sensors, programming etc.
There are several examples of how an automated machine has made our lives much easier and
comfortable. Some examples of home automation includes:
Switching off the lights or fans even if a person is away from his/her house
Switching on AC so that when a person reaches he/she has the required room
temperature Improving the security of the home by providing real time feed of the house
Helping especially abled people as well as old people since a machine can do a task as many
times as asked since it is programmed to do so while on other hand a person may get frustrated
by same demands
The paper pacts with the automated home systems based on visual authentication. It allows the
owner to grant entry to any of the visitors to his home after viewing his or her image. Arduino
Uno has been used as a system processor. The whole system was the wireless. A webcam would
constantly monitor whose entering the house and would capture the picture of the visitor and
would send to the owner. As the traveller arrives and desires to enter the house, the digital
camera unceasingly keeps on looking for any changes in its read and it takes the image of the
traveller. There will a message sent to the user’s phone asking regarding he needs to look at the
image or not, once the owner gives the confirmation, it will receive the image from IP address of
the digital camera via Bluetooth pairing. After about five millisecond of delay a message is going
to be presented to the owner to ask to open the door or not. If owner desires to open the door a
sign are going to be sent to electronic lock via Arduino. If owner answers negatively the
complete program are going to be terminated there itself. Like this manner our system can work.
11
3 SYSTEM DEVELOPMENT
3.1.1Hardware Used
1. Arduino Uno
12
Table 1: Technical Specifications
Microcontroller ATmega328P
Operating Voltage 5V
Input Voltage 7-12V
Digital pins 14
PWM Digital Pins 6
Analog I/P Pins 6
DC current per pin 20mA
Flash Memory 32KB
SRAM 2KB
EEPROM 2KB
Clock speed 16MHz
Length 68.6mm
Width 53.4mm
Weight 25g
Input/output
Every 14 digital pins of UNO can be used for input as well as output using various modes like-
Pin Mode ()
Digital Write ()
Digital Read ()
All these operate at 5 volts. Every pin can handle 20mA in operating condition which has inside
resistance of 50k ohm. Maximum value is 40mAto avoid damage to the controller.
13
Figure 5: Arduino Pin out[6]
HC-05is a very easy to handle Bluetooth SPP (Serial Port Protocol) module, which is designed for
clear wireless serial connection setup.
14
Hardware Features
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, etc.
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 2 times/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.
Serial port Bluetooth module is completely chartered Bluetooth V2.0+EDR (Enhanced Data
Rate) 3Mbps Modulation with full 2.4GHz radio transceiver and baseband. It uses CSR Blue
core 04- External single chip Bluetooth system with CMOS technology and with Adaptive
Frequency Hopping Feature.
15
3. Wireless Sd Shield
Bluetooth staged on wireless shield The Wireless SD shield permits an Arduino board to share
wirelessly using a wireless module. The module can exchange/communicate up to 30.48 m
indoors or 94.44m outdoors (with line-of-sight). It can be handled-down as a serial/USB
substitution or you can settle it into a command sate and set it for a various type of broadcast and
mesh networking options.
4. Sensors
Water Sensor is a simple to handle, low cost and high level/drop recognition sensor, which is
made by having a series of parallel wires bare traces measured droplets/water volume in order to
see the water level. The sensor is used to check the water level and accordingly can be used in
the project to set the alarm if the water level exceeds the threshold value.
Light Sensor(LDR)
16
A Light Dependent Resistor (LDR) is a light dependent resistor whose resistivity depends on
the amount of photons or we can say the light intensity falls on it. The relation between the light
intensity and the resistance is inverse relation, with increase in light the resistance decreases and
vice-versa. LDR is in various applications, example in street lights to automate on and off of the
lights.
LM35 is a basic temperature sensor that can be used for many important purposes. It gives
the readings in centigrade (degree Celsius) and its output is directly proportional to the
temperature. We will not go into the details of how it works but where we can use it in our
project. We can note down the temperature of our room and send the data to the esp8266
web server through which one can see what the temperature in the room is and can direct to
on or off the AC accordingly.
17
Figure 9: Temperature Sensor, LM35[11]
An infrared sensing element is a device that emits so as to sense some aspects of the
environment. AN IR sensing element will live the warmth of AN object additionally as detects
the motion. These sorts of sensors live solely infrared emission.
IR sensors are important tool in many of the Internet of Things projects. In Home automation this
sensor can be used to provide home security. By placing the sensor at a place with high privacy
like the safes, and setting threshold value after which the user will informed that someone has
crossed the threshold and a check need to be made.
18
Figure11:Esp8266 Wi-Fi Module[13] Pin out of the module
VCC (3.3V)
GND (0V)
RX (Receive data bit x)
TX (Transmit data bit x)
CH_PID
RST
GPIO 0
GPIO 2
5. Potentiometer
Potentiometer is a three terminal resistor with a sliding or rotating contact that forms an
adjustable voltage divider.
19
Figure12: Potentiometer[12]
6. LED Display
It is a flat panel display which uses an array of light emitting diodes as pixels for a video
display. The brightness allows them to be used outdoors where they are clearly visible.
20
Figure13: LED Display[7]
Arduino Integrated Development Environment (IDE) is the software where the code is written
and uploaded to the Arduino board or any other board that is being used in the project. The
software comes with some of the default libraries which can be used while writing the code.
Other than the default libraries we can include other libraries according to our requirement. The
project file is stored with .ino extension. It also provides a serial monitor where the output of the
code can be seen. The code written is first compiled and then uploaded to the board, if any error
occurs than those are notified so that we can look over them and rectify the same.
21
Figure14: Arduino IDE[7]
22
2. Proteus8 Professional
Proteus is a software for doing the simulation of the project. The software comes with some of
the built in sensors and other electronic components and other non-inclusive components are too
included explicitly by downloading certain libraries and including in proteus’s library section. It
is a great tool to simulate various projects before implementing in hardware.
3.2) Design
3. Blynk Application
Blynk is a Platform with IOS and Android apps to control Arduino the
likes over the Internet. It is a digital dashboard where you can build a
graphic interface for your project by simply dragging and dropping
widgets.
23
Figure 16
Figure 17
24
4. IFTTT
If This Then That, also known as IFTTT, is a free web-based service to create chains
of simple conditional statements, called applets.
25
FIGURE 19
26
FIGURE 20
27
FIGURE 21
28
5. LED APPLICATION
29
3.3) Development:
30
2. Wi-Fi controlled lights:
31
3.4) Algorithm:
1. Smart Parking:
32
2. Controlling of lights via Wi-Fi
33
4 PERFORMANCE ANALYSIS
The various factors found responsible for affecting the overall performance of the ESP8266
NODEMCU chip are as follows:
This formula tells us the amount of variation in signal to noise ratio (SNR).
We have used IFTTT for connecting between our Wi-Fi module and our android application
It gives us the facility of measuring different sensors which are used in our project.
34
Composition of various sensors, actuators, chips, automation devices, identifying devices and
other electronic components collectively make up a perfect IOT model or prototype.
Artificial intelligence is one of the vast growing market in the world of Internet of Things since it
makes the devices smart and increases their lifetime by the use of the data.
35
4.1 Tabular and Graphical analysis
Temperature(ºC) Voltage(mV)
16 159mV
24 240mV
28 277mV
29 290mV
36
Fig:Light Intensity vs. Resistance graph
37
Figure 27: Light intensity vs. Voltage graph
Resistance of an LDR showed a declining trend with increasing light intensity as per the
photoconductivity principle.
38
Figure 30: Led Monitor
FIGURE LED ON
39
FIGURE LED OFF
40
5 CONCLUSION
The home automation via Internet of Things is experimentally proven to work satisfactorily
by connecting simple appliances to Arduino and the appliances were successfully
controlled. The designed system along with monitoring the sensor data, like temperature,
light, motion sensors, also actuates a process according to the requirement, for example
switching on the light when it gets dark. This will help the user to analyse the condition of
various parameters in the home anytime and work his things out accordingly.
Smart homes are huge system that includes multiple technologies and applications that can
be used to provide security and control of the home easily.
The project is of great help for each and every age group of society especially for the
especially abled persons and old age people since they are the ones who suffer the most for
day to day things which other people can do easily.
People with special needs can use google assistant for switching on or off several appliances
and people who cannot speak can use Bluetooth enabled application to switch on or off their
home appliances.
By using the current system, in future it will be further developed and modified to include
other home security options like capturing the photo of a person who enters the home and
sending it to the owner through WhatsApp, email or any other platform. This will not only
increase the security but also enable the user to keep a check on his home from anyplace at
any given time. This kind of a system with required changes can be implemented in the
hospitals for disable people or in industries where human invasion is quite impossible or fatal
to life. Thus, resulting in a complete automated and easy to use system.
41