0% found this document useful (0 votes)
151 views

Iot Project - Part2

The document discusses the growing field of Internet of Things (IoT) based home appliance control. It describes how IoT allows household devices like lighting, HVAC, security systems and more to be monitored and controlled remotely. This brings benefits like convenience, energy efficiency and increased security. The document also outlines some key requirements of an IoT home automation system like savings through smart energy and water use, remote control of devices, and added convenience and security.

Uploaded by

NXTEN sports
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
151 views

Iot Project - Part2

The document discusses the growing field of Internet of Things (IoT) based home appliance control. It describes how IoT allows household devices like lighting, HVAC, security systems and more to be monitored and controlled remotely. This brings benefits like convenience, energy efficiency and increased security. The document also outlines some key requirements of an IoT home automation system like savings through smart energy and water use, remote control of devices, and added convenience and security.

Uploaded by

NXTEN sports
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

CHAPTER 1

INTRODUCTION
IOT based home appliance control frameworks have gotten inescapability beginning late,
paralleling the advances in the likelihood of the Internet of Things. Notwithstanding how that
robotization for business structures is a make improvement, computerization applications for
habitations are a decently new upgrade, which is being gotten a handle on by customers.
Home robotization joins the checking and control of exercises, for example, lighting,
warming, ventilation, cooling (HVAC), electrical mechanical gatherings, sound frameworks,
perception cameras, passage shocks, and cautions. Home robotization has various focal
points, for instance, comfort, extended security, and essentialness viability.
The wide usage of home computerization can be found in cold urban networks, for instance,
Milwaukee, where people set warming of go outside the house and they leave and switch on
the more sultry 15 minutes before returning. The framework is called HVAC and is the best
choice for home mechanization.
In a period of remote development, for instance, Bluetooth, WiFi, Zigbee, and GSM,
customers need home mechanical assemblies to be related remotely. All of these remote
developments have their very own giganticness and subtleties. This endeavour adequately
uses Bluetooth with an open repeat of 2400 Hz, and extent of 100 meters, and a speed of
around 3 Mbps.

There are two or three stresses to be kept an eye on while organizing a home computerization
structure. The system should be arranged such that facilitates new devices, with the objective
that these devices shouldn't be an issue at a later stage. On the host side, the framework
should be straightforward, with the objective that the devices can be checked and controlled
viably. On the occasion of any issues, later on, the interface of the structure should give
definite organizations. Finally, the structure should be smart with the objective that it might
be commonly used by anyone in the market.

1.1 The Internet of Things:


In this age the gadgets that we're the utilization of are getting to be more brilliant and littler.
they're connecting relatively without issue, and they might demonstrate to us that in almost
every and everything of our regular daily existences. This new reality this is there inside the
period—is alluded to as the net of things—it's miles about adapting to and gathering the
enormous amount of certainties that we are capable picking up from these developing
network of these hardware and sensors, which strategy such measurements, and furthermore
share it with all the distinctive entomb related issues. it's miles a modern period, anyway we
are plausible of having it with these now—found in keen sensors from our product
associations, inside the security structures and inside nature we can control structures in our
homes, and furthermore in our vehicle's capacities for self observing.

1
At any rate, this is 2019. For once imagine all of the open entryways that may exist all
together creating new devices and moreover besides for managerial in coming future. Gartner
has watched the blend of regard comprising of (accounts in nature) from net of things which
across over firms may accomplish up to ₹137.91 trillion around the world in 2020. For
instance, practically different years from nowadays, our morning calendars might be really
surprising and very well on account of the net of components advancement. Our alert may
blast off sooner than its standard time because of the way that our local clever centre point
may have analysed side interest conditions which could advocate an unmistakably moderate
power for that day. The sensor for climate alerts nation high residue incorporate continually,
so really case of your and world's sensitivity, you would safe house picked whether to put on
a suit with sensors that would sing the character of air and after that prepared you to
reasonable record of that may likewise trigger an ambush.

This will likewise make space for the time table-keen to check every one in everything about
notification on the kitchen e-show and the majority of your check comes roughly because of
past due of the mending check-up's that you getting with in, and there might be in addition a
message from the master that reiterates each absolutely one of his recommendations for you
about an additional fine weight reduction plan. You send this realities onto the home overly
centre purpose of your home. it'd normally demonstrate a diagram differentiating every one
in the entirety of your results with the ones which can be of the populace while all is said in
accomplished which deceives your age run, and would demand which you change to
proportionately additional helpful decisions on all your on line fundamental need orders. The
e-screen to your fridge passage would advocate fresh nourishments developed from the floor
yogurt for breakfast and lunch.

The basic reason for the passage is left open, and—with a couple of addon and basic
extremely touchy response tranquilizes that is in charge of all the envelope cases—you pick
to slip into your auto (that has progressed toward becoming on by your sharp centre by
utilizing crushing the catch this is there on the key 12 dandy). The radio has been betting of
your most extreme and least cherished morning appears, the well being structure for your
house is outfitted, and moreover your GPS included gadgets has went with the fine course to
have the option to work. every last one of the unobtrusive components for the morning will
point of fact go beginning with one individual then onto the following, anyway this kind of
situation couldn't be especially some separation away. awesome advances in sensors, devices
and (M2M) or machine to contraption network have made the basic web of things that are
especially encouraging and furthermore have the limit epitomizing a phenomenal open
entryway for big business that could make it go. Supervisor progresses in device to-gadget
exchanges show implausible exchange. The customary resilience of these things may
dispense with away at the web lies as an excruciating instances of : how individuals assistant
eventually of a program to amass the certainties or play out the exhibit they want for to
complete on the web. In web of things, gear speak with equipment and methodology
demonstrate a - path interconnectivity to verify they may interoperate further both
provincially and all round. picks can be made as in venture with prearranged controls, and the
ensuing exercises emerge without the necessity for human intervention. those new exchanges

2
have dependably been lashing out all stunning open entryways for some wipe out of the
changing with the time organizations.

FIGURE 1
An international, accepting, imperceptible, ambient with all the networks computing placing
constructed in the course of the sustained advent of clever sensors, smart cameras, database,
gentle wares, and enormous statistics centres of the global-spanning which are on the basis of
records that is called “net of factors”.
Essential designs of net of things is like that, nearly all good sized object in this entire global
also can be converted right into a laptop that's related to net.

FIGURE 2

3
FIGURE 3

1.2 Requirement of IOT based home appliance control


• Savings- With all the connected electrical devices that are inclusive of getting to
know coolers, sprinklers which might be clever, lights which might be wireless
enabled, tracking the electricity retailers in addition to water heating and cooling
modules that will also reduce energy and water use.

• Control- Many of the today's apparatuses in a household, from broilers and fridge to
deadbolts and cooling gadgets, might be controlled naturally by means of projects in
PCs, phones and pills. In many occurrences, the control of every one of these gadgets
works when you are out of the house as well and can transform them, which implies
you could close the entry via the air terminal, check at the pooch from any of the
nation, or affirm that you turned off your stove from the commercial center or some
other store.

4
FIGURE 4

• Convenience- Having the majority of your lounge and room lightings interchanged as
you achieve your property remotely, the home theatre and TV machine consequently
betting your favoured melody and the front entry opens naturally when you approach
it with hands total of acquiring stuff, is maybe the end rich highlights of the astute and
home. in any case, solace and harmony isn't about sumptuous and simple life, shrewd
locks can likewise give you a chance to allow with the privilege of section of the
particular people at exact examples and not generally, so you don't must remain at
home as well as supply out a key. so also, a sensor lets you know while your fridge
vacant or out of stock encourages you to "arrangement" your entrance or leave
entryway from wherever inside this world.

• Security- They are so clear, connected responses for wellbeing for the sharp home
that are sensibly estimated choices for each checking security verified frameworks.
remote empowered CCTV cameras, associated development sensors notwithstanding
astute smoke cautions might be observed from interior or outside a local utilizing a
video live, electronic mail and ready writings.

5
• Safety- Sensors that are verified that can discover spillage of water, phase of
stickiness, carbon dioxide, development, warmness and each ecological issue that
could be envisioned assistance keep occurrence from transforming into catastrophes
as they could speak with proprietor legitimately, on each event you're, wherever you
need. Senior autonomy Automate sound update notwithstanding voice actuated ready
frameworks are just a group of the elements of local mechanization that help seniors'
have free existence for a greater drawn out timespan. moreover, cameras connected to
the WiFi with - way report may furthermore help friends and family hold a watch on
the senior inhabitants when they can't go and real beware of them.

1.3 PROBLEM STATEMENT


In these present days home computerization is persuading the chance to be vital to improve
our life conditions. Comfort and straightforwardness of utilizing home machines is the thing
that home robotization is progressing. Home robotization offers a bleeding edge lifestyle in
which an individual finds the opportunity to control his whole house utilizing a pushed
wireless, from turning on a TV to locking/opening sections; it in like way offers a competent
utilization of centrality. By the by, to get or verify such framework exhibited will cost a great
extent of cash and that is the authentic reason of why home computerization has not gotten
much premium and thought, adding to that in like way the multifaceted thought of displaying
it and engineering it. Therefore it is essential to bode well and simple to organize, in the event
that this is allowed to individuals, they will gain it in their homes, workplaces and schools. In
a way, a framework alteration for the home computerization is required with the genuine goal
to chop down the cost of applying it to houses. In addition home computerization offers ease
of cerebrum and body to injured or potentially progressively settled individuals in their
homes by only a single tick to do what they require as imparted as of now.

1.4 OBJECTIVES
1. To assembling a remote home robotization structure constrained by gadget associated with
the web.
2. Integrate the contraption to the controller: The overwhelming need that must be recollected
when developing a Smart Home is that it must be savvy. The contraption controller must be
humbly organized with the machines in the house with a basic foundation.

3. Test the set up and analyse the data: After the system is set-up, with the help of a mobile
phone and a controller, tests are driven while data is recorded and inspected.

4. To arrangement and execute monetarily adroit home robotization structure yet a capable
one.

5. To plan an easy to use and a guaranteed structure to control home machines particularly
planned to support the more prepared individuals and weakened.

6
1.5 METHODOLOGY

1.5.1 Proposed System Feature


As we enter the twenty first century, the transaction among individuals and pc is breaking
vintage confinements and coming into another domain. inside the massively innovation
driven worldwide of these days' phones have develop as a piece of our ways of life. cell
phones are not simply discussion device. Our endeavour attempts to infer arrangement
furnishing better oversee on local machine with assistance of cell phone. the current
contraption incorporates substantially machines in our home which can be been controlled
through switches. those gadgets can be turned ON and OFF physically at whatever point
needed. This contraption is substantially less verified and subject to electric threats. likewise,
the wastage of vitality tends to a central point of subject. The proposed task is considered
systems administration our cell mobile to all machines through a smart trustworthiness
circuit. The proposed gadget incorporates astute practical insight Circuit associated with the
home hardware. notoriety of every single home apparatus may be made do with the guide of
buyer from distant with help of individual's cell phone.

1.5.2 Proposed Home Automation System


The end individual can utilize their mobile phone or PC to sign into the machine. A
fundamental test is accomplished for whether the equipment instrument is ON or not.
handiest on the off chance that the equipment is approved and ON, at that point the individual
is verified. when the confirmation is done accurately, individual is then equipped for send the
control alarms to the equipment machine. at the equipment device the SL intention power
program will always follow for the change inside the distinction and will thusly transport the
markers to the Circuit. while a client chooses an exchange inside the notoriety for any of the
instrument [ I. e .. ON or Off], the records from the hand-held is sent to the web Server in a
string design, wherein the web – site is the host. at the server the status is spared in the
database of their non-open device field. at the equipment end, the circuit power program a
web website page is utilized to rescue the notoriety of the contraptions in a reasonable
example [for each 10sec]. those changes come quite close to treats [which are transitory web
files] from the web server and are spared at the PC inside the name of the net site on the web.
thusly every 10 sec on the grounds that the site page is revived and the new treat esteems are
modernized.

7
1.5.3 Proposed Home Automation System Functions

The foreseen home motorization structure can control the going with activities in customers
home and watch the going with alerts:

• Control lights
It can likewise control following machines:

• Lights on/off/diminish
• Fan on/off
• On/off various apparatus

8
CHAPTER 2
LITERATUTE SURVEY
Home robotization was first brought into the world market amid the 1970s, anyway it fail to
meet the wants for people and was fruitless. There were various reasons related with the
mistake of the home robotization system. The system was neither straightforward nor cost
capable. At present, the main point to be recalled when arranging a home computerization
system is that it should be cost-capable and easy to present.

2.1 “The Framework of Home Remote Automation System Based on Smartphone: Akbar
Satria and Widodo Budiharto”

The fundamental thought behind this paper become to make a versatile application on a phone
framework so the buyer can be in expense of computerized approach; see the amount of float
that has been used in the amount of dollars, so the issue is the multifaceted nature in sparing
power which might be resolved. advancement and format transformed into brought out through
gathering measurements the utilization of poll to the respondents. format strategy utilizing
explanations to convey polls and to dissect writing, and after that thereafter doing the
structuring in equipment (that is the microcontroller) made United rendition Language (UML),
database planning, code usage and presentation of UIs on an IOS and on the Android. The
consequence of this view is the usage of a remote household robotization cause in cell that
could help the clients in rate to controlling the home and making sense of the charges of
solidarity that has been used in each advanced device all together that the enhancement is done.

2.1.1 Framework of the System


By techniques for and huge this diagram is remoted into two number one responsibilities to be
explicit controlling contraptions and giving gift data. The controlling and for the reason that
the records errand is driven by strategies for joining the Arduino little scale controller which
mates with the switch inside the house and may be gotten to by bleeding edge cell phones
utilizing the web. The given records errand will assist the customer with looking the dimension
of electrical case utilized as a bit of a stay with a jumbled cell in well ordered, as a matter of
course, and month to month premise inside the extent of Indonesian Rupiah. meanwhile as the
procedure that help the records supply to be sent and got are: Modem for exchange sort of
administrations and make enormous amount of records and realities.

9
FIGURE 5

2.2.2 Conclusion and work in future

This net has modified independently in the way we are living, shifting communication among
human beings in this digital degree in several contexts on both sides of from the professional
existence to social relationships. The net of things has the potential to feature a brand-new
dimension to this method through allowing interactions with clever items, accordingly leading
to a better vision of anywhere, anytime, any electronic media, anything communication. Due
to this reason, we have to look at this good feature of internet of things should be measured as
a part of the overall net of the future, that is probably to be amazingly extraordinary because
of the internet we are using nowadays.

10
2.2.3 Future enhancements

Within the coming days the net and wi-fi technology will join exceptional sources of records
consisting of sensors, cellular telephones and vehicles in a tighter way. The quantity of gadgets
which also connects to the internet is : apparently exponentially – growing. those billions of
components create, devour and system facts in exceptional environments including programs
that are logistic, airports, factories and in the work and ordinary lives of humans. This world
needs new and companionable, scalable and at ease solutions for both the management of the
ever more extensive, complexly networked internet of things, and additionally in order of
supporting diverse models of business.

2.2 “Automation of Home through IOT”: Vinay Sagar, KN. Kusuma, SM. (2013)
In this generation, there are 4 most important demanding situations confronted by the home
automation gadget these days; those demanding situations encompass: excessive price of
ownership, inflexibility, terrible manageability, in addition to issue in reaching security. the
principle objectives of this mission is to layout and implementation of a home automation
system the usage of internet of things technology, that is able to automating and controlling
maximum of the daily appliances within the residence thru an clean and manageable net
interface. The machine recommend on this paper, has a notable adaptability of using wi-fi
technology for interconnecting of the allotted sensors to home automation machine server, on
the way to in the long run is to reduce the cost of deployment at the side of growing the
upgrading capacity and device reconfiguration.

2.3 Ramani, R. Olatunbosun , A. (2010) “Internet of Things (IoT)”

Certainties period is web of things (IOT) which has won immense notoriety and notoriety
during these current years. What's to come is web of things, that will also have the
transformation ability of genuine latent gadgets into virtual worldwide hubs. The IoT
endeavours to achieve unification of the entire thing in our worldwide underneath a typical
framework, this may never again help us to profit control anyway likewise actualize records
symmetry. The high objective of this paper is to give a recognition into web of 23 things,
designs, and basic innovation and their product in our day by day life. With the entry of IT and
ITeS innovation has caused an unrest in presence at character arrange notwithstanding
authoritative running stage. IOT has in shop something for everyone extending from numerous
longitudinal and vertical markets incorporating a not uncommon man's regular ways of life in
the general public. necessities of tremendous organizations have driven the exponential blast
in IoT foundation as those organizations tend to advantage massively by the advanced
consistency and control provided over its value chain gadget. This expanded ability to follow
things has showed itself in gatherings transforming into more prominent proficient, dashing up

11
of procedures, minimize mistakes, anticipate pilferage, through IoT. The IoT is a mechanical
upset that will unfurl out to every one of the fields individuals have ever made and reform the
fate of registering and correspondences.

2.4 K. Y. Lee and J. W. Choi in their studies and examination on the House Learning and
Improvement of Networking in 2003, portrayed a Smart and Automated Home as a "unit where
all of the machines of the house are related together and controlled and checked remotely." The
going with sections will give a structure of the past research and practical works in the field of
Smart Homes.

2.5 T. Tamura , in their investigation, constructed the welfare techno houses in Japan in 2003.
The perspective behind the endeavour was to screen the quality of the crippled and
progressively settled people living in the home, along these lines upgrading their own
fulfilment.

2.6 D. J. Cook adequately coordinated the MavHome adventure at the University of Texas,
Arlington. The endeavour used sensors to recognize the state of the earth, and with the help of
controllers, made the significant move to take care of concordance. These sensors outline an
off the cuff framework to settle on the decisions.
2.7 H. Kanma guided a restorative research to screen people who require remedial assistance
and present a remote plan at the University of McGill in Canada. The endeavour made usage
of telephones and efficient sensors. It worked by making usage of remote shows, for instance,
Bluetooth, ZIGBEE, and what's more GSM and separating data through an adaptable plan. The
examination had a structure that involved three 24 essential parts. At first, sensors assembled
the remedial data and transmitted it by methods for sensors to mobile phones. Second, an
application called J2ME on phones took care of the accumulated data. Finally, all of the data
that was accumulated was joined to address the necessities of the older. The genuine favourable
position of this undertaking is that it could be realized at an affordable expense in a restricted
ability to canter time.
2.8 N. Liang, University of Erlangen, Germany,

In the past couple of years, basic research has been driven in the field of Smart Homes to
improve the advancement for disabled and old people. N. Liang have depicted troubles related
to Smart Homes and drove ask about at the University of Erlangen, Germany, for the
improvement of these masses and perceived the preferences with the true objective to empower
them to lead all the more free lives. For the execution of these endeavours, there are distinctive
sub-frameworks used, for instance, “Wireless LAN, RFIDs, TCP/IP, and Bluetooth module”.
This Bluetooth composes of transportation of the sensor information and after that
interconnects the system. According to the region of the inhabitance recorded, the RFID
12
framework transmits information from the RFID marks. The messages are then transmitted by
techniques for Bluetooth utilizing Bluetooth modules. This decreases the expense, as no further
equipment is required for the utilization. The idea displayed in this endeavor is the one like the
errand presented by the understudies at the University of Nigeria

concerning the arrangement of a home computerization system using Arduino. The endeavor
bases on the arrangement of a home robotization structure using the Atmega 328
microcontroller.
The endeavor does, regardless, stress the upsides of using a remote standards. To connect with
a broad assortment of contraptions, Bluetooth is an overall standard and is easily available in
all devices, for it is definitely not hard to set up and use. It in like manner scrambles data using
a 128 piece since quite a while back shared key, making it a moored affiliation moreover. With
movements in RF Technology, for instance, Zigbee and Bluetooth, these systems have
furthermore ended up being outstanding in the market. Past infrared structures had different
security issues and there additionally were impedances between signs, making it unbound and
less notable in the worldwide market. Research is up 'til now occurring around there; various
systems have been proposed, yet not a lot of them have been realized in the worldwide market.

2.9 IEEE discharged many research papers on home-computerization. A portion of these


exploration had intriguing application with regards to home computerization.

2.9.1 “ Wise Smart Home Automation and Security System Using Arduino and Wi-fi”.
This paper gives an insignificant exertion fruitful and versatile home control and checking
structure with the guide of an organized littler scale web server with web show (IP) accessibility
for access and to control of equipment and contraptions remotely using Android-based
2.9.2 “IoT Based Home Automation Using Raspberry PI”. This paper proposes the
arrangement of Inter of Things (IoT) based home automation structure using Raspberry pi.
Starting at now in day todays life we can scarcely find a house without a home automation
structure. This endeavor is wanted to build up a home motorization structure.
2.9.3 “Raspberry Pi Home Automation Using Android Application”. The endeavor
introduces a negligible exertion and versatile home control and watching structure using a
Raspberry PI module and a Static Relay, with web accessibility for getting to and controlling
devices and mechanical assemblies remotely using Smartphone android application.
2.9.4 “Shrewd home computerization: Gsm security system structure use”. Sharp home
automation has pulled in light of a real worry for the investigation arrange in the midst of the
latest decade, at a mind boggling way. Home security structures involve a continually making
investigation field. In this paper, a security system for smart home robotization is proposed.

13
CHAPTER 3
SYSTEM DEVELOPMENT

Home mechanization depicts a course of action of sorted out, controllable devices that
participate to make your home increasingly pleasant, revamp, capable, and secure. You "talk"
with your home appliances through a remote control or astute contraption. In the accompanying
area we will examine the advancement of our home appliance robotization framework.

3.1 Hardware Requirement


3.1.1 Node MCU (ESP8266):
The ESP8266 is a low-cost Wi-Fi microchip, with a full TCP/IP stack and microcontroller
capability, produced by Espressif Systems in Shanghai, China.

ESP8266 can be used as an external Wifi module, using the standard AT Command set
Firmware by connecting it to any microcontroller using the serial UART, or directly serve as a
Wifi-enabled micro controller, by programming a new firmware using the provided SDK.

The GPIO pins allow Analog and Digital IO, plus PWM, SPI, I2C, etc.

This board has been around for almost a year now, and has been used mostly in IoT contexts,
where we want to add connectivity for example to an Arduino project. A wide adoption has
been facilitated by the very modest price, ranging from 190 to 700 INR depending on the
features offered by the manufacturers.

Technical Features

• 802.11 b / g / n
• Wi-Fi Direct (P2P), soft-AP
• Built-in TCP / IP protocol stack
• Built-in TR switch, balun, LNA, power amplifier and matching network
• Built-in PLL, voltage regulator and power management components
• 802.11b mode + 19.5dBm output power

14
• Built-in temperature sensor
• Support antenna diversity
• off leakage current is less than 10uA
• Built-in low-power 32-bit CPU: can double as an application processor
• SDIO 2.0, SPI, UART
• STBC, 1×1 MIMO, 2×1 MIMO
• A-MPDU, A-MSDU aggregation and the 0.4 Within wake
• 2ms, connect and transfer data packets
• standby power consumption of less than 1.0mW (DTIM3)

NodeMCU ESP8266 Specifications

● Microcontroller: Tensilica 32-bit RISC CPU Xtensa LX106


● Operating Voltage: 3.3V
● Input Voltage: 7-12V
● Digital I/O Pins (DIO): 16
● Analog Input Pins (ADC): 1
● UARTs: 1
● SPIs: 1
● I2Cs: 1
● Flash Memory: 4 MB
● SRAM: 64 KB
● Clock Speed: 80 MHz
● USB-TTL based on CP2102 is included onboard, Enabling Plug n Play
● PCB Antenna
● Small Sized module to fit smartly inside your IoT projects

15
FIGURE 6

FIGURE 7

16
FIGURE 8

Programming NodeMCU ESP8266 with Arduino IDE:


The NodeMCU Development Board can be easily programmed with Arduino IDE since it is
easy to use. Programming NodeMCU with the Arduino IDE will hardly take 5-10 minutes. All
you need is the Arduino IDE, a USB cable and the NodeMCU board itself.
Applications of NodeMCU(8266):
● Prototyping of IoT devices
● Low power battery operated applications
● Network projects
● Projects requiring multiple I/O interfaces with Wi-Fi and Bluetooth functionalities

3.1.2 Relay Module:


A relay can be defined as a switch. Switches are generally used to close or open the circuit
manually .Relay is also a switch that connects or disconnects two circuits. But instead of
manual operation a relay is applied with electrical signal, which in turn connects or disconnects
another circuit.

17
FIGURE 9

Relays can be of different types like electromechanical, solid state . Electromechanical relays
are frequently used. Let us see the internal parts of this relay before knowing about it working.
Although many different types of relay were present, their working is same.
Every electromechanical relay consists of an consists of an
1. Electromagnet
2. Mechanically movable contact
3. Switching points and
4. Spring
Electromagnet is constructed by wounding a copper coil on a metal core. The two ends of the
coil are connected to two pins of the relay as shown. These two are used as DC supply pins.

FIGURE 10

18
Generally two more contacts will be present, called as switching points to connect high ampere
load. Another contact called common contact is present in order to connect the switching
points.
These contacts are named as normally open (NO),normally closed(NC) and common(COM)
contacts.

Relay can be operated using either AC or DC.


In case of AC relays, for every current zero position, the relay coil gets demagnetized and hence
there would be a chance of continued breaking of the circuit.
So, AC relays are constructed with special mechanisms such that continuous magnetism is
provided in order to avoid the above problem. Such mechanisms include electronic circuit
arrangement or shaded coil mechanism.

Working:
Relay works on the principle of electromagnetic induction.

● When the electromagnet is applied with some current it induces a magnetic field around it.
● Above image shows working of the relay. A switch is used to apply DC current to the load.
● In the relay Copper coil and the iron core acts as electromagnet.
● When the coil is applied with DC current it starts attracting the contact as shown. This is
called the energizing of the relay.
● When the supply is removed it retrieves back to the original position. This is called De
energizing of the relay.

There are also such relays, whose contacts are initially closed and opened when there is supply
i.e. exactly opposite to the above shown relay. Solid state relays will have a sensing element to
sense the input voltage and switch the output using opto-coupling.

19
FIGURE 11

Relay Contact Types:


As we have seen that relay is a switch. The terminology “Poles and throws” is also applicable
for relay. Depending on the number of contacts and number of circuits it switches relays can
be classified.
Before we know about this classification of contacts we have to know the poles and throws of
a relay switch.
Poles and Throws :

Relays can switch one or more circuits. Each switch in relay is referred as pole. Number of
circuits a relay connects is indicated by throws.

Depending on the poles and throws, relays are classified into

● Single pole single throw


● Single pole double throw

● Double pole single throw


● Double pole double throw

20
Single Pole Single Throw:

A single pole single throw relay can control one circuit and can be connected to one output. It
is used for the applications which require only ON or OFF state.

Single Pole Double Throw:


A single pole double throw relay connects one input circuit to one of the two outputs. This
relay is also called a changeover relay.
Though the SPDT has two output positions, it may consist of more than two throws depending
on the configuration and requirement of the application.
Double pole single throw:

A double pole single throw relay has two poles and single throw and it can be used to connect
two terminals of a single circuit at a time. For example, this relay is used for connecting both
phase and neutral terminals to the load at a time.
Double pole double throw:

A DPDT (double pole double throw) relay has two poles and two throws for each pole. In
motor direction control, these are used for phase or polarity reversal.

The switching action between contacts for all these relays is performed when the coil get
energized as shown in figure below.

Relays can be classified into different types depending on their functionality, structure,
application etc.
Relay Applications:

Relays are used to protect the electrical system and to minimize the damage to the equipment
connected in the system due to over currents/voltages. The relay is used for the purpose of
protection of the equipment connected with it.
These are used to control the high voltage circuit with low voltage signal in applications audio
amplifiers and some types of modems.
These are used to control a high current circuit by a low current signal in the applications like
starter solenoid in automobile. These can detect and isolate the faults that occurred in power
transmission and distribution system. Typical application areas of the relays include

● Lighting control systems


● Telecommunication

● Industrial process controllers


● Traffic control

● Motor drives control


21
● Protection systems of electrical power system

● Computer interfaces
● Automotive

● Home appliances

3.1.3 Bread Board:


A breadboard is a solderless device for temporary prototypes with electronics and test circuit
designs. Most electronic components in electronic circuits can be interconnected by inserting
their leads or terminals into the holes and then making connections through wires where
appropriate. The breadboard has strips of metal underneath the board and connects the holes
on the top of the board. The metal strips are laid out as shown below. Note that the top and
bottom rows of holes are connected horizontally and split in the middle while the remaining
holes are connected vertically.

FIGURE 12

Note how all holes in the selected row are connected together, so the holes in the selected
column. The set of connected holes can be called a node:
To interconnect the selected row (node A) and column (node B) a cable going from any hole
in the row to any hole in the column is needed:

22
FIGURE 13

23
3.1.4 CONNECTING WIRES:
the basics of electronics wire for electronics wiring including the equivalents between the
American AWG wires and metric wires as well as the insulation including PVC wire, PTFE
wire and enamelled copper wire.

FIGURE 14

3.1.5 ELECTRIC SOCKET:


AC power plugs and sockets connect electric equipment to the alternating current power supply
in buildings and at other sites. Electrical plugs and sockets differ from one another in voltage
and current rating, shape, size, and connector type. Different standard systems of plugs and
sockets are used around the world.

24
FIGURE 15

3.1.6 Power Supply:


A power supply is an electrical device that supplies electric power to an electrical load. The
primary function of a power supply is to convert electric current from a source to the correct
voltage, current, and frequency to power the load.

3.2 Programming Language Requirement:


Programming Language is required to create a website for our project and for ESP8266
programming also.

Here, I listed some of programming language, which I used:

3.2.1 PHP:
PHP is a server scripting language, and a powerful tool for making dynamic and interactive
Web pages.
PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.

PHP is a general-purpose scripting language especially suited to web development. It was


originally created by Danish-Canadian programmer Rasmus Lerdorf in 1994. The PHP
reference implementation is now produced by The PHP Group. PHP originally stood for
Personal Home Page, but it now stands for the recursive initialism PHP: Hypertext
Preprocessor.
PHP code is usually processed on a web server by a PHP interpreter implemented as a module,
a daemon or as a Common Gateway Interface (CGI) executable. On a web server, the result of
the interpreted and executed PHP code – which may be any type of data, such as generated

25
HTML or binary image data – would form the whole or part of an HTTP response. Various
web template systems, web content management systems, and web frameworks exist which
can be employed to orchestrate or facilitate the generation of that response. Additionally, PHP
can be used for many programming tasks outside of the web context, such as standalone
graphical applications and robotic drone control. Arbitrary PHP code can also be interpreted
and executed via command-line interface (CLI).

The standard PHP interpreter, powered by the Zend Engine, is free software released under the
PHP License. PHP has been widely ported and can be deployed on most web servers on almost
every operating system and platform, free of charge.
The PHP language evolved without a written formal specification or standard until 2014, with
the original implementation acting as the de facto standard which other implementations aimed
to follow. Since 2014, work has gone on to create a formal PHP specification.

FIGURE 16

3.2.2 MySQL:
MySQL is the most popular database system used with PHP.

Introduction to MySQL:

• MySQL is a database system used on the web


• MySQL is a database system that runs on a server
• MySQL is ideal for both small and large applications
• MySQL is very fast, reliable, and easy to use
• MySQL uses standard SQL
• MySQL compiles on a number of platforms
• MySQL is free to download and use
• MySQL is developed, distributed, and supported by Oracle Corporation
• MySQL is named after co-founder Monty Widenius's daughter: My

26
The data in a MySQL database are stored in tables. A table is a collection of related data, and
it consists of columns and rows.
Databases are useful for storing information categorically. A company may have a database
with the following tables:
• Employees
• Products
• Customers
• Orders
PHP + MySQL Database System:
• PHP combined with MySQL are cross-platform (you can develop in Windows and
serve on a Unix platform)

FIGURE 17

Facts About MySQL Database:


MySQL is the de-facto standard database system for web sites with HUGE volumes of both
data and end-users (like Facebook, Twitter, and Wikipedia).
Another great thing about MySQL is that it can be scaled down to support embedded database
applications.

3.2.3 Embedded C for Arduino programming:


Embedded C is a generic term given to a programming language written in C, which is
associated with a particular hardware architecture. Embedded C is an extension to the C
language with some additional header files. These header files may change from controller to
controller.

3.2.4 HTML:
HTML is the standard markup language for creating Web pages.

• HTML stands for Hyper Text Markup Language

27
• HTML is the standard markup language for creating Web pages
• HTML describes the structure of a Web page
• HTML consists of a series of elements
• HTML elements tell the browser how to display the content
• HTML elements label pieces of content such as "this is a heading", "this is a paragraph",
"this is a link", etc.

FIGURE 18

3.2.5 CSS:
• CSS stands for Cascading Style Sheets
• CSS describes how HTML elements are to be displayed on screen, paper, or in other
media
• CSS saves a lot of work. It can control the layout of multiple web pages all at once
• External stylesheets are stored in CSS files

FIGURE 19

3.2.6 JavaScript:

28
JavaScript is a lightweight, interpreted programming language. It is designed for creating
network-centric applications. It is complimentary to and integrated with Java. JavaScript is
very easy to implement because it is integrated with HTML. It is open and cross-platform.

Applications of JavaScript Programming:


As mentioned before, JavaScript is one of the most widely used programming languages
(Front-end as well as Back-end). It has it's presence in almost every area of software
development. I'm going to list few of them here:
• Client side validation - This is really important to verify any user input before
submitting it to the server and Javascript plays an important role in validating those
inputs at front-end itself.
• Manipulating HTML Pages - Javascript helps in manipulating HTML page on the fly.
This helps in adding and deleting any HTML tag very easily using JavaScript and
modify your HTML to change its look and feel based on different devices and
requirements.
• User Notifications - You can use Javascript to raise dynamic pop-ups on the webpages
to give different types of notifications to your website visitors.

• Back-end Data Loading - Javascript provides Ajax library which helps in loading
back-end data while you are doing some other processing. This really gives an amazing
experience to your website visitors.
• Presentations - JavaScript also provides the facility of creating presentations which
gives website look and feel. JavaScript provides RevealJS and BespokeJS libraries to
build a web-based slide presentations.
• Server Applications - Node JS is built on Chrome's Javascript runtime for building
fast and scalable network applications. This is an event based library which helps in
developing very sophisticated server applications including Web Servers.

This list goes on, there are various areas where millions of software developers are happily
using Javascript to develop great websites and others software.

3.3 Software Requirement:


3.3.1 Notepad++:
Notepad++ is a text and source code editor for use with Microsoft Windows. It supports
tabbed editing, which allows working with multiple open files in a single window. The
project's name comes from the C increment operator.

29
Notepad++ is distributed as free software. At first the project was hosted on SourceForge.net,
from where it has been downloaded over 28 million times, and twice won the SourceForge
Community Choice Award for Best Developer Tool. The project was hosted on TuxFamily
[fr] from 2010 to 2015; since 2015 Notepad++ has been hosted on GitHub. Notepad++ uses
the Scintilla editor component.

3.3.2 Arduino IDE:


The Arduino Integrated Development Environment (IDE) is a cross-platform application (for
Windows, macOS, Linux) that is written in functions from C and C++. It is used to write and
upload programs to Arduino compatible boards, but also, with the help of third-party cores,
other vendor development boards.

3.3.3 MAMP:
MAMP is a free, local server environment that can be installed under macOS and Windows
with just a few clicks. MAMP provides them with all the tools they need to run WordPress on
their desktop PC for testing or development purposes, for example. You can even easily test
your projects on mobile devices. It does not matter whether you prefer the web server Apache
or Nginx in addition to MySQL as database server, or whether you want to work with PHP,
Python, Perl or Ruby.

3.4 System Design:


In our home automation system we have shown how we can control one device using internet
of things (IOT). The ESP8266 is the microcontroller. There are two sorts of correspondence
engaged with this venture: wired and remote correspondence. We have used remote
communication to operate the device using internet of things. Figure 20 depicts the picture of
our model.

30
FIGURE 20

3.5 Programming ESP8266:


ESP8266 board should be modified using a code so it can interface with the application. WiFi
module gives an adaptable stage, which composes a code so as for any capacity to be executed
by the ESP8266 and transfer to board. Addendum A demonstrates the full source code for the
Arduino. The code is written in Embedded C utilizing Atmel studio 6.0. The code is then
arranged and changed over to HEX code. A short time later, the HEX code is then scorched to
the Tensilica microcontroller.

FIGURE 21

31
3.6 Working:
This project will consist of both hardware and software. In this project we will make a device
which control switching action of our appliances via internet. Let’s see how it work?
1.First of all we will see hardware side, hardware consist of a microcontroller which is wifi
enable (ESP8266 NodeMCU) connected to power supply.
2.For communication through world wide web it will also connected through wifi router.
3.A series of relay which will connected through GPIO pin of NodeMCU and also connected
to power supply.
4.The output of relay will connect the electric socket, where we can plug in our appliance.
5.For giving command to our device we will use our webpage, which will hosted on remote
server.
6.For user end, we will make a website. This website will show status of our device. We can
give command also through it.
7.NodeMCU will fetch the command from website act according to it.
8.For making a website we will use PHP, HTML, CSS, Javascript programming language and
MySQL for database.
9. Let’s say we want to off the fan of our room from office, then open browser enter web
address of our IOT website. Then a page will be open where status of all devices will be
displayed. A virtual switch board will be also displayed, then select fan button and click to off.
10.After clicking the button, the content of database will be change then NodeMCU will detect
the change in database and act according to it. And set respective port to “0”. “0” means no
voltage at output, means switch will electrically OFF. The fan will become OFF.

32
CHAPTER 4
ALGORITHMS
Programming the ESP8266 isn't extremely troublesome errand. When the circuit has been
made on the breadboard, you'll have to transfer the program (known as a draw) to the ESP8266.
The draw is an arrangement of guidelines that tells the board what capacities it needs to
perform. An Arduino load up can just hold and perform one outline at any given moment. The
product used to make Arduino portrays is known as the IDE which represents Integrated
Development Environment. For, this particular project we have developed a simple code. The
code has been illustrated here:

#include <ESP8266WiFi.h>

const char* ssid = "Galaxy J2";


const char* password = "xxxxxx00";
const char* host = "api.thingspeak.com";
int value = 1;
String gatheredStr2;
String gatheredStr4;
String gatheredStr6;
String gatheredStr8;
String gatheredStr10;

void setup() {
pinMode(5, OUTPUT);
pinMode(16, OUTPUT);
pinMode(4, OUTPUT);
pinMode(0, OUTPUT);
pinMode(14, OUTPUT);

digitalWrite(5, LOW);
digitalWrite(16, LOW);
digitalWrite(4, LOW);
digitalWrite(0, LOW);
digitalWrite(14, LOW);

Serial.begin(2000000);
// We start by connecting to a WiFi network
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}//end setup

33
void loop() {

Serial.print("Connecting to ");
Serial.println(host);
// Use WiFiClient class to create TCP connections
WiFiClient Client;
const int httpPort = 80;
if (!Client.connect(host, httpPort)) {
Serial.println("Connection failed");
return;
}
// We now create a URI for the request
String url = "/apps/thinghttp/send_request?api_key=2JE0A644E8PELUWW";
Serial.print("Requesting URL: ");
Serial.println(host + url);
Serial.println(String("TRY: ") + value + ".");
// This will send the request to the server
Client.print(String("GET ") + url + "&headers=false" + " HTTP/1.1\r\n" + "Host: " + host + "\r\n" +
"Connection: close\r\n\r\n");
delay(1000);
// Read all the lines of the reply from server and print them to Serial
int ten=1;
while(Client.available()&& ten==1){
String line = Client.readStringUntil('\r');
String firstDivider = "<tr>";
String secondDivider = "</tr>";
int firstDividerIndex = line.indexOf(firstDivider);
int secondDividerIndex = line.indexOf(secondDivider);
String gatheredStr = line.substring(firstDividerIndex+30, secondDividerIndex);

String firstDivider2 = "<td>";


String secondDivider2 = "</td>";
int firstDividerIndex2 = gatheredStr.indexOf(firstDivider2);
int secondDividerIndex2 = gatheredStr.indexOf(secondDivider2);
gatheredStr2 = gatheredStr.substring(firstDividerIndex2+4, secondDividerIndex2);
Serial.println(gatheredStr2);
//----------------------------------------------------------------------------------------------------------------

String line2 = line.substring(secondDividerIndex+1,secondDividerIndex+300);


String firstDivider3 = "<tr>";
String secondDivider3 = "</tr>";
int firstDividerIndex3 = line2.indexOf(firstDivider3);
int secondDividerIndex3 = line2.indexOf(secondDivider3);
String gatheredStr3 = line2.substring(firstDividerIndex3+30, secondDividerIndex3);
//Serial.println(gatheredStr3);
String firstDivider4 = "<td>";
String secondDivider4 = "</td>";
int firstDividerIndex4 = gatheredStr3.indexOf(firstDivider4);
int secondDividerIndex4 = gatheredStr3.indexOf(secondDivider4);
gatheredStr4 = gatheredStr3.substring(firstDividerIndex4+4, secondDividerIndex4);
Serial.println(gatheredStr4);
//-----------------------------------------------------------------------------------------------------------------

//----------------------------------------------------------------------------------------------------------------

String line3 = line2.substring(secondDividerIndex3+1,secondDividerIndex3+300);


String firstDivider5 = "<tr>";
String secondDivider5 = "</tr>";
int firstDividerIndex5 = line3.indexOf(firstDivider5);
int secondDividerIndex5 = line3.indexOf(secondDivider5);

34
String gatheredStr5 = line3.substring(firstDividerIndex5+30, secondDividerIndex5);
//Serial.println(gatheredStr3);
String firstDivider6 = "<td>";
String secondDivider6 = "</td>";
int firstDividerIndex6 = gatheredStr5.indexOf(firstDivider6);
int secondDividerIndex6 = gatheredStr5.indexOf(secondDivider6);
gatheredStr6 = gatheredStr5.substring(firstDividerIndex6+4, secondDividerIndex6);
Serial.println(gatheredStr6);
//-----------------------------------------------------------------------------------------------------------------

//----------------------------------------------------------------------------------------------------------------

String line4 = line3.substring(secondDividerIndex5+1,secondDividerIndex5+300);


String firstDivider7 = "<tr>";
String secondDivider7 = "</tr>";
int firstDividerIndex7 = line4.indexOf(firstDivider7);
int secondDividerIndex7 = line4.indexOf(secondDivider7);
String gatheredStr7 = line4.substring(firstDividerIndex7+30, secondDividerIndex7);
//Serial.println(gatheredStr3);
String firstDivider8 = "<td>";
String secondDivider8 = "</td>";
int firstDividerIndex8 = gatheredStr7.indexOf(firstDivider8);
int secondDividerIndex8 = gatheredStr7.indexOf(secondDivider8);
gatheredStr8 = gatheredStr7.substring(firstDividerIndex8+4, secondDividerIndex8);
Serial.println(gatheredStr8);
//-----------------------------------------------------------------------------------------------------------------

//----------------------------------------------------------------------------------------------------------------

String line5 = line4.substring(secondDividerIndex7+1,secondDividerIndex7+300);


String firstDivider9 = "<tr>";
String secondDivider9 = "</tr>";
int firstDividerIndex9 = line5.indexOf(firstDivider9);
int secondDividerIndex9 = line5.indexOf(secondDivider9);
String gatheredStr9 = line5.substring(firstDividerIndex9+30, secondDividerIndex9);
//Serial.println(gatheredStr3);
String firstDivider10 = "<td>";
String secondDivider10 = "</td>";
int firstDividerIndex10 = gatheredStr9.indexOf(firstDivider10);
int secondDividerIndex10 = gatheredStr9.indexOf(secondDivider10);
gatheredStr10 = gatheredStr9.substring(firstDividerIndex10+4, secondDividerIndex10);
Serial.println(gatheredStr10);
//-----------------------------------------------------------------------------------------------------------------

if (gatheredStr2=="ON") {
digitalWrite(5, HIGH);
//Serial.println("congrats");

}
if (gatheredStr2=="OFF"){
digitalWrite(5, LOW);
//Serial.println("good");
}
if (gatheredStr4=="ON"){
digitalWrite(16,HIGH);
//Serial.println("good");
}
if (gatheredStr4=="OFF"){
digitalWrite(16, LOW);
//Serial.println("good");

35
}
if (gatheredStr6=="ON"){
digitalWrite(4, HIGH);
//Serial.println("good");
}
if (gatheredStr6=="OFF"){
digitalWrite(4, LOW);
//Serial.println("good");
}
if (gatheredStr8=="ON"){
digitalWrite(0, HIGH);
//Serial.println("good");
}
if (gatheredStr8=="OFF"){
digitalWrite(0, LOW);
//Serial.println("good");
}
if (gatheredStr10=="ON"){
digitalWrite(14, HIGH);
//Serial.println("good");
}
if (gatheredStr10=="OFF"){
digitalWrite(14, LOW);
//Serial.println("good");
}
Client.stop();
}

Serial.println("");
Serial.println(String("Try nr. ") + value + " is finished.");
Serial.println("Waiting for next try...");
Serial.println("");
value = value + 1;

FIGURE 22

To get website code you can visit my github account:


https://github.com/imabmitra/final_project

36
CHAPTER 5
PERFORMANCE ANALYSIS
5.1 SYSTEM TESTING:

The framework going for delicate products is the looking at achieved on an outright, included
machine to assess the machine's congruity with its exact necessities. gadget testing would also
fall inside the range of the dark compartment looking at, and in this way, it must need no data
around the interior structuring of the presence of mind or the code. It's miles a totally
comparable deliberate check case lettering. inside the check case lettering we ought to be
equipped for compose the check case circumstances and moreover the utilization cases.

5.3 UNIT TESTING:


Throughout pc programming and coding, we have this unit testing assisting which of the
product tests approaches with the methods for which specific units of the supply code, or a
fixed of 1 and now and then additional PC programming component together with related
control records, managing procedures, and working methodologies, are experienced and
analysed to see whether they are strong for use. Instinctively, we likewise can locate a unit to
be the littlest checkable component of an apparatuses. For this situation of the procedural
programming, our unit could have been a whole module, but it's miles more usually an man or
woman manner or characteristic. The objective of unit checking out is in order to separate every
detail of this system and to illustrate that the person factors are accurate.

FIGURE 23

37
CHAPTER 6
CONCLUSIONS
6.1 CONCLUSION

While wearing down this endeavour we have grabbed a lot of finding out about various
modules being used in this errand. We are glad we can participate as a gathering in this
endeavour and set up new musings. We believe the assignment completes as needed and the
data grabbed in the midst of this period will be used in our future corporate life. Additionally,
we might want to include that home computerization is the fate of places of new world.

6.2 FUTURE SCOPE

The going with stage for home robotization advertise will happen subject to a couple of key
overhauls in the progression open in Automation, for example, improvement in Wireless
Automation blueprints and moreover bringing down of regard appears as the market starts
perceive Home mechanization use in more noteworthy volumes. A couple of examples that we
foresee for this time of the business are

• Big associations like Philips, Siemens and Schneider will as time goes on bring out truly mass
market mechanization things with interfacing with UI in any case at lower esteem point as
contrast with today, and more people will be able to bear the cost of the things.

• Solution commitments will bit by bit move to an all the more straightforward structure, where
next to two or three key parts, customers will have the ability to buy and use the Automation
things themselves without the guide of any specific ace

• Some remote players will have claim to fame in awesome motorization and focus on the
prevalent market.

38
REFRENCES

• S. Das and D. J. Cook, Smart Home Environments: A Paradigm Based on Learning and
Prediction, Wireless Mobile and Sensor Networks, Wiley, 2004.
• "Best Home Automation System - Consumer Reports". www.consumerreports.org.
Recovered 2016-02-14.
• https://en.m.wikipedia.org/wiki/ESP66.html
• “D. J. Cook and M. Youngblood, Smart Homes, Encyclopedia of Human-Computer
Interaction”, 2004. • S.Praveen,"IOT and its Signifance ", 2015,Online.
• S.Prasad , P. Mahalakshmi "Shrewd Surveillance Monitoring System Using Arduino and PIR
ensor ,International Journal of Computer Science and Information Technologies, pp 45-65
,Vol. 5 ,issue 1,2014.
• Pyarie, R. Tyarize,"Bluetooth based home computerization framework utilizing Iot",
International Journal Of Computer Science and Information Technologies, pp 103-130,Vol 2
,issue1,2013.

39

You might also like