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
Figure 5 Circuit Diagram of the proposed system
5.1. Hardware
prototype
Figure 6 Hardware prototype of the
proposed system
5.2. System workflow
Figure 7 Overall system flowchart
This
section discusses the progress made into three main results and findings:
firstly, hardware results and findings; secondly, server results and findings;
and lastly, web application results and findings.
6.1. Hardware
results and findings
Figure 8 Hardware activity from
the serial monitor
6.2. Server
results and findings
Figure 9 Firebase server real-time database results
6.3. Web
Application results and findings
Figure 10 Web app authentication page in IOS and Android
Figure 11 Web app UI on IOS and
Android device
Figure 12 Daily and monthly costs displayed on the app
This application dashboard mainly displays sensor data retrieved from
the NodeMCU ESP8266. The dashboard displays the real-time motion, temperature,
and light intensity. The appliance's real-time voltage, current, power, and
frequency data are also presented here. The energy data is cumulative and is
displayed on a daily basis, with a daily cost representation. For cost
computation, the per unit rate is assumed to be RM 0.22. The total monthly power
use cost is presented on the dashboard towards the end of the month. The cost
saving is calculated by subtracting the current monthly cost from the previous.
This app only keeps track of the last and current months. When the current
month’s days increase, so does the current monthly cost. Hence, the cost
savings vary depending on the variable cost of the current month. Therefore,
the final cost saving can be seen at the end of the current month.
In
summary, this project aims to design and build an energy-saving home automation
system. The study began with an accurate literature review and an initial
investigation into the energy-efficient home automation system. In the second
phase, a fully functional home automation system was built to reduce energy
consumption with the assistance of IoT technology and intelligent sensors such
as a PIR motion sensor, LDR sensor, temperature sensor, and energy sensor.
Based on the readings of the sensors, the relays take action for switching on
or off the appliances. For instance, if the motion value is high and the LDR
value is low, then the room light will switch on automatically. In the third
phase, All the captured data has been stored in the Firebase real-time database
and Firestore. Using the ‘netlify’ cloud provider, a web application was
developed which fetches the data from Firebase and shows it to the user via the
app dashboard. Finally, the system was integrated with a web application that
allows users to monitor their home appliances' daily and monthly energy
consumption, human presence, room temperature, ambient light as well as control
them manually or automatically as shown in the results.
The authors would like to
acknowledge the support of the Multimedia University IR Fund 2020/16310,
Project "Reliable and Resilient Internet-of-Things (IoT) Networks.”
Filename | Description |
---|---|
EECE-5930-20220826133616.pdf | My review response. Kindly review my comments and let me know what is needful. |
Components101, 2020. 5V
Single-Channel Relay Module. Components101. Available
online at https://components101.com/switches/5v-single-channel-relay-module-pinout-features-applications-working-datasheet, Accessed on July 30, 2022
Alimi, O.A., Ouahada, K., 2018. Smart Home Appliances Scheduling to Manage
Energy Usage. In: 2018 IEEE 7th International
Conference on Adaptive Science & Technology (ICAST)
Arshad, A., 2020.
DS18B20 Temperature Sensor. Circuits DIY. Available
online at https://www.circuits-diy.com/ds18b20-temperature-sensor-2/, Accessed on July 30, 2022
Chandramoha, J., Nagarajan, R., Satheeshkumar, K., Ajithkumar,
N., Gopinath, P.A., Ranjithkumar, S., 2017. Intelligent Smart Home Automation and
Security System Using Arduino and Wi-fi. International Journal of
Engineering and Computer Science, Volume 6 Issue 3, pp.
20694-20698
Manuals+, 2021. AC Communication Module PZEM-004T V3.0 User Manual. Available online at
https://manuals.plus/innovatorsguru/ac-communication-module-pzem-004t-v3-0-manual, Accessed on July 30, 2022
Espressif, n.d. ESP8266 Wi-Fi Modules
I Espressif. Espressif. Available online at https://www.espressif.com/en/products/modules/esp8266, Accessed on July 30, 2022
Components101, 2021. HC-SR501
PIR Sensor. Components101. Available online at https://components101.com/sensors/hc-sr501-pir-sensor,
Accessed on July 30, 2022
Kodali, R.K., Yerroju, S., 2018. Energy Efficient Home Automation Using IoT. In: International Conference on Communication,
Computing, and Internet of Things
Pieters, S., n.d. ESP8266 – NodeMCU PinOut.
Available online at https://www.studiopieters.nl/esp8266-nodemcu-pinout/,
Accessed on July 30, 2022
Priya, M.B., Kannammal, K., 2021. Intelligent Home Energy Management System
with Load Scheduling and Remote Monitoring Using IoT. In: International Conference on Computer Communication and Informatics
Rajarajeswari, S., Rani, S.U., Kataria, A., Dutta, S., 2021. Home Automation through Smart Lighting, Smart Security, and other
Appliances. In: International Conference on
Innovative Technology for Sustainable Development
Raju, K.L., Chandrani, V.,
Begum, S.S., Devi, M.P., 2019. Home Automation and
Security System with Node MCU using Internet of Things. In: International Conference on Vision Towards
Emerging Trends in Communication and Networking
Simeon, M., Elizabeth, A.,
Wara, S.T., Adoghe, A., Hope, O., 2018.
Efficient Energy Management System Using Pir Sensor. In: IEEE PES/IAS PowerAfrica
Sindhanaiselvi, D.,
Keerthikaa, S., Shanmuganantham, T., 2018.
Energy Efficient Modern Home Using Smart Boards for IoT Energy Automation. In: International Conference on Circuits and
Systems in Digital Enterprise Technology
Storr, W., 2018. Light Sensor including Photocell and LDR Sensor. Basic Electronics
Tutorials. Available online at https://www.electronics-tutorials.ws/io/io_4.html, Accessed
on July 30, 2022
Twumasi, C., Dotche, K.A.,
Banuenumah, W., Sekyere, F., 2017.
Energy saving system using a PIR sensor for classroom monitoring. In: IEEE PES PowerAfrica
Umair, M., Shah, G.A., 2020. Energy Management of Smart Homes. In: IEEE International Conference on Smart Computing
(SMARTCOMP)
Vasicek, D., Jalowiczor, J.,
Sevcik, L., Voznak, M., 2018. IoT Smart Home Concept. In: 26th Telecommunications Forum (TELFOR)
Vishwakarma, S.K., Upadhyaya,
P., Kumari, B., Mishra, A.K.,2019).
Smart Energy Efficient Home Automation System Using IoT. In: 4th International Conference on
Internet of Things: Smart Innovation and Usages (IoT-SIU)
Wasoontarajaroen, S., Pawasan,
K., Chamnanphrai, V., 2017. Development of an IoT
device for monitoring electrical energy consumption. In: 9th International Conference on Information Technology and
Electrical Engineering