Published at : 03 Nov 2022
Volume : IJtech
Vol 13, No 6 (2022)
DOI : https://doi.org/10.14716/ijtech.v13i6.5930
Nahin Ar Rabbani | Faculty of Engineering, Multimedia University, Persiaran Multimedia, 63100 Cyberjaya, Selangor, Malaysia |
Yee-Loo Foo | Faculty of Engineering, Multimedia University, Persiaran Multimedia, 63100 Cyberjaya, Selangor, Malaysia |
This paper aims to provide a solution
where home automation systems can reduce electricity consumption by using
Internet of Things technology based on HC-SR501 PIR motion sensor, DS18B20
temperature sensor, and LDR analog sensor in conjunction with NodeMCU ESP8266
microcontroller and relays so that the home appliances can be automatically
controlled based on human presence, temperature, and ambient light. The
proposed solution includes a web application for users to give an idea of the
amount of electricity consumed with daily and monthly unit cost, as well as to
provide automatic and manual control functions of the appliances. PZEM-004T
electrical energy sensor used with the NodeMCU ESP8266 to determine energy
consumption. The hardware prototype was tested rigorously for an ample amount
of time. The test results confirmed that the prototype functioned well and
could control electrical appliances automatically and manually via the web app.
Firebase is used as the cloud-hosted database to provide cloud infrastructure
through which the web app and ESP8266 communicate with each other. The web app
successfully collected electrical energy data and displayed the daily and
monthly costs on the app's dashboard, as well as real-time motion, temperature,
and light intensity.
Energy savings; Home automation; NodeMCU ESP8266; Smartphone; Web application
After doing several
researches on existing home automation systems and various designs that have
been implemented in the past, it was discovered that most home automation
systems lack an energy consumption detection module (Raju
et al., 2019; Vishwakarma et al., 2019; Rajarajeswari
et al., 2021; Chandramoha et al., 2017; Kodali & Yerroju, 2018;
Sindhanaiselvi et al., 2018; Priya & Kannammal, 2021; Simeon et al., 2018;
Twumasi et al., 2017; Alimi & Ouahada, 2018; Umair & Shah, 2020). Most systems are made of expensive Arduino and Raspberry pi modules (Rajarajeswari et al., 2021; Chandramoha et al., 2017; Sindhanaiselvi
et al., 2018; Priya & Kannammal, 2021).
Very few of them used inexpensive NodeMCU ESP8266 (Raju
et al., 2019; Wasoontarajaroen et al., 2017; Vishwakarma et al., 2019; Kodali
& Yerroju, 2018).
PZEM-004T electrical energy sensors were
used in some experiments because they were considered the most feasible sensor for detecting energy consumption. (Wasoontarajaroen et al., 2017). It has also been
found that the smartphone app only works on Android devices (Raju et al., 2019; Wasoontarajaroen et al., 2017;
Vishwakarma et al., 2019; Rajarajeswari et al., 2021; Chandramoha et al., 2017;
Kodali & Yerroju, 2018). Some work was also done for research
purposes without a functional prototype.
Sensor-based home
automation is a cutting-edge technology that allows you to control appliances
systematically. Wireless technology allows the devices to be controlled from
other locations. Basically, the project is a concept for reducing energy
consumption in the home by integrating automation. By using a web app, the user
will be able to control all of their household appliances either automatically
or manually.
Figure 1 Block diagram of the proposed system
When the user presses the button, Wi-Fi
sends data to the server, which then sends a signal to the microcontroller. The
appliances will then be turned on or off using the relays linked to the
microcontroller.
Hardware Design
The following is a list of the components used to build the
hardware for the proposed system:
• NodeMCU ESP8266 V3 CH340G (Espressif, n.d.).
• DS18B20 – Waterproof
Temperature Sensor (Arshad, 2020).
• PIR Sensor Module (HC-SR501) (Components101, 2021).
• Analog LDR (Storr, 2018).
• PZEM-004T V3.0 100A AC
Electrical Energy sensor (Manuals+, 2021).
• 5V DC Single Channel Relay
Module x 2 (Components101, 2020).
The NoeMCU ESP8266 was chosen as the
microcontroller for this system because of its compact size, compatibility, and
ease of interfacing compared to other microcontrollers. The ESP8266 firmware is
open source and is based on the chip manufacturer's proprietary SDK. The
firmware has a simple programming environment that includes a simple and fast
scripting language.
Figure 2 Diagram of NodeMCU ESP8266
The sensors chosen for this project are: Passive Infrared
(PIR) sensor, Light Dependent Resistor (LDR), DS18B20 waterproof temperature
sensor, and PZEM-004T electrical energy sensor. A PIR sensor is an electronic
sensor that detects infrared (IR) light radiating by objects in its field of
view. A LDR is also called a photo-resistor or a cadmium sulphide (CdS) that
measures the light intensity of the surroundings. The DS18B20 is one type of
temperature sensor that provides 9-bit to 12-bit temperature measurements
through a 1-Wire interface, requiring only one wire (and ground) to be
connected with a microcontroller. The PZEM-004T is an electronic module that
measures Voltage, Current, Power, Frequency, Energy, and Power Factors. The
PZEM-0004T module is bundled with 100A current transformer coil. This module
was found to be the most suitable for the scope of this proposed system. The
sensors used in this project are shown in Figure 3.
Since this
project aims to automatically control AC appliances in a house, then using
relays is the only way to control them automatically through a microcontroller.
Two 5V single-channel relay modules were used for this project. A 5V relay is
an automated switch used in an automatic control circuit to control a
high-current signal with a low-current signal. The relay signal's input voltage
varies from 0 to 5V. Figure 4 illustrates the pin layout of a 5V DC relay
module.
Figure
4 5V
DC single channel relay module
5. Circuit Connection