0% found this document useful (0 votes)
56 views11 pages

Design and Construction of A Smart-Home Automation System (SHAS) Using Nodemcu and Google Assistant

Uploaded by

tochukwuoa98
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views11 pages

Design and Construction of A Smart-Home Automation System (SHAS) Using Nodemcu and Google Assistant

Uploaded by

tochukwuoa98
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/361017475

Design and Construction of a Smart-home Automation System (SHAS) using


Nodemcu and Google Assistant

Article in Asian Journal of Research and Reviews in Physics · December 2021


DOI: 10.9734/AJR2P/2021/v5i430168

CITATIONS READS

3 216

5 authors, including:

Jangfa Timothy Zhimwang John Mkohol Uzer


Federal University Lokoja University of Abuja
35 PUBLICATIONS 102 CITATIONS 1 PUBLICATION 3 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Jangfa Timothy Zhimwang on 01 June 2022.

The user has requested enhancement of the downloaded file.


Asian Journal of Research and Reviews in Physics

5(4): 1-10, 2021; Article no.AJR2P.83372


ISSN: 2582-5992

Design and Construction of a Smart-home


Automation System (SHAS) using Nodemcu and
Google Assistant
G. I. Efenji a*, J. T. Zhimwang a, M. M. Gwani a, J. M. Uzer a
and S. A. Kazeem a
a
Department of Physics, Federal University Lokoja, Kogi State, Nigeria.

Authors’ contributions

This work was carried out in collaboration among all authors. All authors read and approved the final
manuscript.

Article Information
DOI: 10.9734/AJR2P/2021/v5i430168

Open Peer Review History:


This journal follows the Advanced Open Peer Review policy. Identity of the Reviewers, Editor(s) and additional Reviewers,
peer review comments, different versions of the manuscript, comments of the editors, etc are available here:
https://www.sdiarticle5.com/review-history/83372

Received 20 October 2021


Original Research Article Accepted 25 December 2021
Published 28 December 2021

ABSTRACT

This paper presents the design and construction of a smart-home automation system using
nodeMCU and Google assistant. The device consist of Enhanced Universal Synchronous
Asynchronous Receiver Transmitter (EUSART) module that contains all clock generators, shift
registers and data buffers necessary to perform an input or output serial data transfer independently
of the device program execution. The NodeMCU (ESP8266) Wi-fi Shield connected the
microcontroller to the provided Wi-fi network. The Arduino and MPLAB Programming Interface with
the help of PICKit3 were used to run the code on PIC16F877A. Home appliances were controlled
via a web page created using IFTTT for the voice command and the Blynk app for controlling
hardware remotely and also display sensor data. IFTTT is a simple to use internet service that
easily enables IoT devices to GET and POST data. The device was constructed based on low cost
and reliable home controlled monitoring system for accessing and controlling electronics appliances
remotely using any Smart phone with access to Google assistance or Computer web application.
The device was test under different electronics appliances with different voltage capacities and was
found efficient. Therefore, this device when used is capable of improving the living standard at
home, reduces human effort, save energy and time thus make homes have sufficient automation.

Keywords: Smart-home automation system; node MCU; google assistant.


_____________________________________________________________________________________________________

*Corresponding author: E-mail: [email protected];


Efenji et al.; AJR2P, 5(4): 1-10, 2021; Article no.AJR2P.83372

1. INTRODUCTION convenience, energy efficiency, and security. It


will indirectly reduce the cost of this system [4].
The rapid growth in technological advancement
has set a new conceptual model and pattern on Home automation has been a feature of science
the standard of living in our modern societies. fiction for many years and began to be put into
Homes now have access to electric power, practice in the early 20th century. However,
televisions, radio, and telephones. Domestic despite the great interest, problems have limited
chores which used to be laborious are now made the venture of home automation into the homes
easy by specialized machines to carry out some of the rich or hobbyists, among them including
specific tasks such as, washing and drying which complexity, high costs, and multiple incompatible
is made easy with the assistance of washing standards: However, in this project, it is intended
machines which reduces the labor of washing to construct a low cost simple web-based home
and drying of clothes. Heating, Ventilation and automation system [5]
Air Conditioning (HVAC) appliances provide
further improved convenience and comfort [1]. 2. METHODOLOGY

Seeing the various numbers of electronic devices 2.1 Design


being made available in a household, a remote
centralized automated home control system has The design of this project is done based on Fig.1.
become an increasingly useful and desired
feature. Also, due to the advancement of 2.2 Power Supply Unit
wireless technology, there are several
connections that are introduced such as Global This unit converts mains AC to regulated DC
System for Mobile Communication (GSM), voltage for the internal components of the
Wireless Fidelity (WIFI), and Bluetooth. Each of project. This unit consist of
the connections has its unique specifications and
applications. Among the four popular wireless i. Rectifier Circuit: A rectifier is an electrical
connections that are often implemented in a device that converts alternating current
Smart-Home project [2,3]. The capabilities of (AC) to direct current (DC), a process
Wireless Fidelity (WIFI) are more than enough to known as rectification [6]. Diode is the
be implemented in the design. Also, most of the major component of a rectifier. A diode is a
current laptops/notebooks or Smartphones come two-terminal electronic component with an
with in-built Wireless Fidelity (WIFI) adapter asymmetric transfer characteristic, with low
which allows electrical appliances to interconnect (ideally zero) resistance to current flow in
with one another through the help of electronic one direction, and high (ideally infinite)
components/devices allowing better resistance in the other.

Fig. 1. Block diagram of a web-based home automation system

2
Efenji et al.; AJR2P, 5(4): 1-10, 2021; Article no.AJR2P.83372

A diode's most common function is to allow output after rectification. The rectifiers' pulsating
current to flow in one direction (the diode's output has an average DC value and an AC
forward direction) while preventing current flow in portion known as ripple voltage. Filter capacitors
the opposite direction (the reverse direction). As bring the amount of ripple voltage down to a safe
a result, the diode can be thought of as an level. During the positive portion of the input, the
electronic version of a check valve. capacitor in a filter circuit is charged to the peak
of the rectified input voltage. The capacitor
The output voltage of a center-tapped full wave begins to discharge into the load when the input
rectifier is one-half of total secondary voltage becomes negative. The rate of discharge is
expressed as [6, 7], determined by the RC time constant formed by
the capacitor and the load's resistance [9].
(1)
The voltage across the capacitor was determined
by [10]
Where VB is the biased voltage of the diode. The
peak inverse voltage (PIV) for a full wave center
tapped rectifier is 2VP(out) [6]. (5)

Ripple factor: the ripple factor was used to And the voltage across the resistor was
measure the amount of ripples present in the determined by [10]
output DC voltage. Ripple factor is defined as the
ratio of ripple voltage to the pure DC voltage (6)
expressed as [8]:
Transfer function from the input voltage to the
= 0.48 (2) voltage across the capacitor is expressed
as [10]
A high ripple factor indicates a high pulsating DC
(7)
signal.

DC output current IDC = (3) Transfer function from the input to the voltage
across the resistor is expressed as [10]
where Imax is the maximum DC load current.
(8)
(4)
Since a full wave rectifier was connected to a
capacitor input filter, the peak-to-peak ripple was
where Vmax is the maximum secondary voltage.
cut in half and when the full wave voltage was
applied to the RC circuit, the capacitor
Because of the full wave rectification, the period
discharges for only half as long [10]
of the full wave signal was half the input period
which was obtained as
(9)

Where f is the ripple frequency, Idc is the dc


current and C is the capacitor used.

For LPF,
The output frequency =
(10)
Therefore, the frequency of the full wave signal is
double the input frequency. (11)

ii. Filter Circuit 2.3 Eusart Module

In power supply, capacitors or inductors (choke) The Enhanced Universal Synchronous


are used to smooth (filter) the pulsating DC Asynchronous Receiver Transmitter (EUSART)

3
Efenji et al.; AJR2P, 5(4): 1-10, 2021; Article no.AJR2P.83372

module is a serial I/O communication peripheral. equipment, as well as tanks, aircraft, and ships,
It includes all of the clock generators, shift all include it [12].
registers, and data buffers needed to accomplish
an input or output serial data transfer 2.9 Potentiometer
independently of the device programme.
A potentiometer, often described as a pot, is a
2.4 Regulator three-terminal resistor with a sliding contact that
acts as a voltage divider that can be adjusted. It
Voltage levels are controlled by a voltage operates as a variable resistor or rheostat when
regulator. The voltage regulator is the preferred only two terminals, one end and the wiper, are
device when a constant, stable voltage is employed. A potentiometer is a voltage divider
required. It produces a constant output voltage used to measure electric potential (voltage); the
regardless of changes in the input voltage or load component is an embodiment of the same idea,
conditions [11]. hence its name. Potentiometers are often used to
operate electrical devices, such as audio
2.5 Node MCU (ESP8266) Wi-fi Shield equipment volume controls. Position transducers
can be made from potentiometers that are
This is the Wi-fi shield that connects the controlled by a mechanism [13]. A resistive
microcontroller to the available Wi-fi network. A element, a sliding contact (wiper) that moves
microcontroller is a compact integrated circuit along the element, making good electrical
designed to govern a specific operation in the contact with one part of it, electrical terminals at
coding section. The main features of each end of the element, a mechanism that
microcontrollers are RAM, flash memory, moves the wiper from one end to the other, and a
Timers/Counters, EEPROM, I/O Ports, USART, housing that contains the element and wiper are
CCP (Capture/Compare/PWM module), SSP, all included in a potentiometer. Potentiometers
Comparator, ADC (analog to digital converter), are rarely used to control large quantities of
PSP (parallel slave port), LCD and ICSP (in- power directly (more than a watt or so).
circuit serial programming) The 8-bit PIC
microcontroller is classified into four types based 2.10 Procedures for Setting up Ifttt for Iot
on internal architecture such as Base Line PIC,
Home Automation
Mid Range PIC, Enhanced Mid Range PIC and
PIC18.
In this Study, Home appliances were controlled
2.6 Relay via a web page created using IFTTT as shown in
figure 2 for the voice command and the Blynk
A relay is a device with contacts that responds to app for controlling hardware remotely and also
an input signal (voltage or current) applied to a display sensor data. IFTTT is a simple to use
coil by opening and closing a switch. In today's internet service that easily enables IoT devices to
technical systems, the electric relay is one of the GET and POST data. Additionally, it can be used
most commonly utilised devices. Cars, washing to create GUI interfaces for viewing data,
machines, microwave ovens, and medical controlling devices, and triggers alerts/warnings.

Step 1: IFTTT account was created with a Google mail Account.

Fig. 2. Google user profile

4
Efenji et al.; AJR2P, 5(4): 1-10, 2021; Article no.AJR2P.83372

Step 2: Creating an IFTTT (If This, Then That) command was controlled via Google voice command
and response was received from Google Assistance.

Fig. 3. Users Command Dashboard

Step 3: We also created a Blynk Account using Google mail account

Fig. 4. Blynk Account Interface

5
Efenji et al.; AJR2P, 5(4): 1-10, 2021; Article no.AJR2P.83372

Step 4: Now, we created a new project on the Blynk App

Fig. 5. Final load interface with the created ON/OFF Button

6
Efenji et al.; AJR2P, 5(4): 1-10, 2021; Article no.AJR2P.83372

Step 5: Running the control code on Arduino Interface, connecting Gmail Account with our NodeMCU
Module

Fig. 6. Arduino Programming Interface

Fig. 7. MPLAB Programming Interface

7
Efenji et al.; AJR2P, 5(4): 1-10, 2021; Article no.AJR2P.83372

Fig. 8. Complete circuit of the smart-home automation system

Fig. 9. Inside view of the smart-home automation system

2.11 Implementation of Smart-home the used of one separate microcontroller along


Automation System (SHAS) with the NodeMCU module. The Android device
connected to this module sends command offline
The Blynk Application was used to control home through the Blynk app and online through Google
appliances from a webpage using NodeMCU command and then displayed of the LCD screen.
ESP8266 and PIC microcontroller. We The digital logic input pin P0.5 was toggled from
connected three appliances such as electric bulb, logic 1 or High to logic 0 or Low using the switch
fan and generator and they were controlled SW1. The R1 resistor acted as a pull-up resistor.
remotely using phone. It was connected with the logic voltage from the
supply source of 5V. So, when the switch was
The circuit consists of microcontroller-the not being pressed, the logical input pin as always
Pic16f877A and The NodeMCU ESP8266 a default voltage of 5V or the pin is always high
Microcontroller integrate all the essential until the switch is pressed and the pin is shorted
components of the circuit making it the heart of to the ground making its logic Low. Transistor
the circuit, and were dedicated to perform one Q1, Q2, Q3, works as a switch and are
task and execute one specific application. They responsible for powering up the relay by
contain memory, programmable input/output supplying a 12V to one terminal of the relay
peripherals they were responsible for storing the when it is closed. RL1, RL2, and RL3 relay are
data and control the operation of the entire electromagnetic switches responsible for
system. Each microcontroller has only one controlling the desired load connected to the
Eusart input. Using ESP8266 module requires a system once it is energized by Q1, Q2,
Eusart input from the microcontroller, this prompt and Q3.

8
Efenji et al.; AJR2P, 5(4): 1-10, 2021; Article no.AJR2P.83372

Fig. 10. Complete Framework of the smart-home automation system

3. RESULTS

Table 1. Measurement at various terminals of the smart-home automation system

Circuit Test Test Data Expected Value Measured value


Dc input voltage Voltage 12.0V 12.0V
Regulated DC voltage Voltage 5.0V 4.7V
Transistor 1 base voltage Voltage 0.7V 0.7V
Transistor 2 base voltage Voltage 0.7V 0.65V
Transistor 2 base voltage Voltage 0.7V 0.62V
Max. PIC power Rating Current 700mA 698mA
Maximum power Rating Current 10Amps 10Amps

4. DISCUSSION indicated by the necessity. The device has been


effectively outlined and tried.
Table 1 presents the measurement at various
terminals of the smart-home automation system. COMPETING INTERESTS
The result shows that the expected value and
measured value of DC input voltage is the same Authors have declared that no competing
either 12V. Differences of 0.3V was recorded interests exist.
between the expected and measured values of
regulated DC voltage. Maximum PIC power REFERENCES
rating for expected value is 700mA and 698Ma
for measured value. 1. Khatu M, Kaimal N, Jadhav P, Rizvi SA.
Implementation of Internet of Things for
5. CONCLUSION Home Automation, Int. J. Emerg. Eng.
Res. Technol. 2015;3(2):7–11,
The home automation utilizing the Internet has 2. Smitha TA, Rumana M. Hand Gesture
been designed, constructed and demonstrated to Based Home Automation for Visually
work attractively by interfacing basic appliances Challenged. Int. J. Innov. Eng. Rresearch
to it and the apparatuses were effectively Technol. 2015;2(4):1–7.
controlled remotely through the web. The 3. Erol-Kantarci M, Mouftah HT. Wireless
outlined framework screens the sensor Sensor Networks for Cost-Efficient
information, as well as impels a procedure as Residential Energy Management in the

9
Efenji et al.; AJR2P, 5(4): 1-10, 2021; Article no.AJR2P.83372

Smart Grid. IEEE Transactions on Smart S.Chand and company LTD. Pg.
Grid. 2011;2(2):314-325. 2002:442-467.
4. Malik N, Bodwade Y. Literature Review on 9. Zhimwang JT, Yunisa Yahaya,
Home Automation System, Ijarcce. Ibrahim Aminu, Esther M. Fomson,
2017;6(3):733–737. Dachomo DB. Design and construction of
DOI: 10.17148/ijarcce.2017.63173. a dual regulated ±0-35volts dc
5. Lamine H, Abid H. Remote control of a power supply using LM317 and
domestic equipment from an Android LM337 voltage regulator. African
application based on Raspberry pi card. Journal of Natural Sciences. 2017;20:
STA 2014 - 15th Int. Conf. Sci. Tech. 107-118.
Autom. Control Comput. Eng. 2014:903– 10. Malvino A, Bates JD. Electronics
th
908. Principles. 7 edition, McGraw-Hill
DOI: 10.1109/STA.2014.7086757. Science. 2006:946-1223
6. Akande SFA, Kwaha BJ, Alao SO. 11. Neil storeg. Electronics A systems
Fundamentals in Electronics. Jos approach. 4th Edition. Pearson Education
University Press Ltd, Jos, Nigeria; 2007. Limited. 2009:821.
7. Theraja AK, Theraja BL. Electrical 12. Mehta VK, Rohit M. Principles of
Technology. Multicolor Edition. S Chand electronics.11th edition, S.Chand and
And Company Ltd, Ram Magar, New campany LTD. Pg. 2000:442-467.
Delhi. 2005:1116 -1123 13. Mehta VK. Principle of Power Systems. 5th
8. Theraja BL, Theraja AK. A textbook of edition, S.Chand and company LTD. Pg.
th
Electrical Technology. 24 edition, 2005:41-111.
_________________________________________________________________________________
© 2021 Efenji et al.; This is an Open Access article distributed under the terms of the Creative Commons Attribution License
(http://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium,
provided the original work is properly cited.

Peer-review history:
The peer review history for this paper can be accessed here:
https://www.sdiarticle5.com/review-history/83372

10

View publication stats

You might also like