IOT based Energy Monitoring for Practical Loads using NodeMCU
LOGANATHAN NACHIMUTHU*, REEM AHMED AL-MAHROUQI,
TAMADHAR SALIM AL-ABRI, MUNA AL-HADRAMI
Electrical Engineering,
University of Technology and Applied Sciences,
Nizwa,
SULTANATE OF OMAN
*Corresponding Author
Abstract: - Electrical energy monitoring is increasingly important nowadays for residential and commercial
usage. The energy meters are installed in consumer’s houses to track their energy usage. There are many
chances of human mistakes for every electricity consumer while recording the manual energy meter reading in
their houses. Also, the consumer does not have updated information about current electricity usage in each
hour, day, and month. To overcome the above problems, the system is developed to remotely monitor from any
world location using the NodeMCU and Arduino IDE. The energy monitoring is carried out by using the Node
MCU, Arduino IDE, and PZEM-004T sensor. The PZEM-004T module is coupled to the Arduino controller.
The sensor module receives a signal from the CT coil which is connected to load. The load parameters such as
voltage current power etc., are measured and transferred to the Arduino. A NodeMCU ESP8266 is utilized as a
Wi-Fi chip system. By using a Wi-Fi connection and the internet, the acquired data is sent to Thing Speak to
save in the cloud to monitor the measured parameters remotely. The power analyzer instrument is also used to
measure the real-time parameters consumed by the load which is used to cross verification and compare with
the sensor measuring parameters. The passive load resistance, inductance, and 100-watt lamp loads are
experimentally connected and tested. The load consumed electrical parameters such as current, voltage, power,
power factor, real power, and frequency are monitored in online. Energy monitoring online may reduce the
consumer's mistakes by recording the parameters and consumers can know each hour, day, and month's energy
consumption up to date according to their usage.
Key-Words: - Arduino, NodeMCU, energy monitoring, PZEM-400T, CT, current, voltage, power analyzer.
Received: April 17, 2022. Revised: August 12, 2023. Accepted: October 9, 2023. Published: November 7, 2023.
1 Introduction
Present days, the electric power supply is needed for
every human’s lifestyle. In comparison to prior
periods, the amount of power consumption is
increasing daily. The electricity energy meters are
installed in each consumer’s house to measure their
energy usage. Many consumers only know the
consumed energy at the end of the month or they
have to frequently check their energy meter to know
the energy consumption. It is difficult to keep track
of how much energy is used each day and hour. To
track and assess how much energy is consumed in
the home and office is developed and implemented
by using the intelligent technique in this paper. In
recent trends, the IOT (Internet of Things) is
extensively used for many applications. The sensors
and software, networks are embedded in electronics
to simplify the devices to measure and store the
electrical parameters. The word “Things” in the
Internet of Things states that the communication
devices and other electrical apparatus like lights,
TVs, and fans for power management in the
building, [1], or checking the photovoltaic panels,
[2]. There are various paths have implemented to
link the Internet of Things, [3].
The IOT application is used to monitor the
electrical power and energy measurement systems,
[4]. Extensive research studies are available about
IOT-based energy monitoring to measure the status
of the appliances in homes. The studies, [5], [6], [7],
did smart meter design to measure the energy. They
designed the GSM (Global System for Mobile
Communication) networks to display the measured
parameters of the electrical appliances using the
PZEM-004T sensor. The Atmega328p
microcontroller and Wi-Fi Module were used to
monitor the electrical parameters, [8]. They
designed the circuit to monitor the power and
money transfer system through the Internet.
WSEAS TRANSACTIONS on ELECTRONICS
DOI: 10.37394/232017.2023.14.6
Loganathan Nachimuthu,
Reem Ahmed Al-Mahrouqi,
Tamadhar Salim Al-Abri, Muna Al-Hadrami
E-ISSN: 2415-1513
49
Volume 14, 2023
NodeMCU with the Blynk app was introduced to
connect Android mobile phones to quickly measure,
record, and compute the electrical bills through the
cloud, [9]. The ESP8266 microcontroller and
PZEM-400T sensor were used to monitor the power,
[10]. Moreover, using the Fiware platform to gather
the electrical power and room temperature data to
send alerts systems under emergency circumstances,
[11]. The remote energy monitoring is also done
based on the browser /server (B/S structure), [12].
The system developed not only monitors the energy
online also the system helps to save energy. The
energy monitoring and controlling in a switchgear
industry based on Raspberry Pi, [13]. This energy
monitoring system is very useful for the industry
day to day energy consumption to conserve energy
consumption. IOT-based monitoring the renewable
energy is done through Raspberry Pi using the Flask
framework, [14]. This system was developed to
display the daily usage of renewable energy smartly.
The energy monitoring system precisely calculates
the power consumed using Arduino and IOT, [15].
This paper explains how to monitor the energy
online and remotely control the electrical
appliances. The IoT-based energy management
system for smart cities is based on the edge
computing infrastructure, [16]. This paper presented
an emerging deep reinforcement learning (DRL)
technique for an energy scheduling scheme for a
long-term goal. IOT-based electrical energy was
displayed on a smartphone and the data was saved
in the cloud system to monitor the energy
consumption online, [17].
The proposed work is to monitor the energy
parameters using the cutting-edge domains of
Arduino and the Internet of Things. The circuit is
based on the Arduino, ESP8266 controller, PZEM-
004T current and voltage sensor. The ESP8266
used only a Wi-Fi chip system and the Arduino was
mainly used as controller. The experimental results
are carried out by using different practical loads
such as resistance, inductance passive loads, and
lamp loads of different watts. The measured energy
parameters of voltage, current, power, power factor,
frequency, and energy are displayed in the LCD.
The same parameters are also measured through the
digital power analyzer instrument to check and
compare between the real-time measured data and
sensor-measured data online. The error calculation
is also carried out to know the % of errors. The
measured electrical parameters are sent to the cloud
through the Thing Speak platform for online
physical monitoring from anywhere in the world.
2 Problem Formulation
Energy meters are installed on consumer’s premises
to track their energy usage. It is not easy to see the
day, week, or month’s energy consumption by the
consumer. Moreover, the power meters are fixed at
difficult locations in the consumer houses which
makes it not easy to regularly monitor their power
meter. The problems that might occur with the
current system are: The chance of human mistake is
very high while recording the manual meter reading,
the consumer is not updated about current electricity
usage, and the consumer has difficulty knowing the
consumed energy in each hour, day, and month.
2.1 Objectives
To design the system for real-time consumption
monitoring by graphical form remote monitoring
energy usages of the house devices. To detect the
electricity theft in the house. To measure more than
5 electrical quantiles such as voltage, current,
power, power factor, energy & frequency
3 Block Diagram and Its Description
Fig. 1: Block diagram for the project
Figure 1 shows the block diagram of the project.
The PZEM-004TV3 module is coupled to the
Arduino controller and, through the PZEM, receives
a signal from the CT coil that is attached to the lamp
load. The PZEM-004TV3 module and CT coil were
powered by an external 230 V AC power source.
Through a USB wire, a separate DC 5V is provided
to the Arduino. According to the programming in
the Arduino, the I2C -LCD adapter is used to
operate the 16 x 2 display, which displays the
WSEAS TRANSACTIONS on ELECTRONICS
DOI: 10.37394/232017.2023.14.6
Loganathan Nachimuthu,
Reem Ahmed Al-Mahrouqi,
Tamadhar Salim Al-Abri, Muna Al-Hadrami
E-ISSN: 2415-1513
50
Volume 14, 2023
voltage, current, and power measurements of the
load. A NodeMCU ESP8266 is utilized as a Wi-Fi
chip system. By using a WiFi connection and the
Internet, the acquired data is sent to Thingspeak to
save in the cloud for visualization and analysis
purposes. The power analyzer is also used to
measure the real-time energy monitor to compare
with the sensor measuring parameters.
3.1 Description of Components
In this project, various components are used. The
components are discussed below in detail, with their
work in this project.
3.1.1 Arduino Uno
Arduino is an open-source prototyping platform
with simple hardware and software. It is formed
from a circuit board that may be programmed
(referred to as a microcontroller). Arduino boards
can receive analog or digital input data from a
variety of sensors and convert them to an output,
such as driving a motor, turning on/off LEDs,
connecting to the cloud, and doing a variety of other
tasks. There are many types of Arduino depending
on the different microcontrollers used, in our project
we use Arduino Uno.
3.1.2 PZEM-004TV3 Module
The PZEM-004T board measures 3.1 by 7.4 cm.
The module's CT coil has a 33mm diameter. The
SD3004 chip from SDIC Microelectronics Co., Ld.
is the module's primary component [9]. The board
has an Atmel 24C02C erasable PROM EEPROM
with a 4.5V to 5.5V voltage range. Two PC817 opt
couplers are used to galvanic ally separate the serial
interface. Electronic modules like the PZEM-004T
are used to measure things like voltage, energy,
power, frequency, current, and power factors. The
PZEM-004T module is ideal for use as a project or
experiment to measure the power on an electrical
power network, such as a household or building,
because it includes all of these capabilities and
functionalities. The PZEM-004TV3 module is used
with a measuring range of 100A. The range to
measure the voltage is 80-260V. The range to
measure the current is 0-10A and 0-100A. The
range to measure the active power is 0-2.3kV and
0-23kV. The range to measure the power factor is
0-1. The range to measure the frequency is
45HZ-65HZThe range to measure the voltage is 80-
260V. The range to measure the current is 0-10A
and 0-100A. The range to measure the active power
is 0-2.3kV and 0-23kV. The range to measure the
power factor is 0-1. The range to measure the
frequency is 45HZ-65HZ.
3.1.3 CT Coil
A sort of "instrument transformer," the Current
Transformer (C.T.), is made to produce an
alternating current proportional to the current
monitored in its primary winding in its secondary
winding. The genuine electrical current flowing in
an AC transmission line can be safely monitored
using a standard ammeter using current
transformers, which reduce high voltage currents to
manageable levels. A basic current transformer
operates on a somewhat different principle than a
standard voltage transformer. CTs can be used to
monitor current or to turn the main current into the
decreased secondary current for meters, relays,
control devices, and other devices. The high voltage
primary is isolated by CTs that convert current. The
current transformer, employed with an air core, a
current transformer contains a main winding, a core,
and a secondary winding. Over a certain range, a
current transformer is designed to maintain an exact
ratio between the currents in its primary and
secondary circuits.
3.1.4 I2C LCD Module
A conventional LCD is simpler to attach than an
I2C LCD. Rather than 12, only connect 4 pins. Start
by attaching the GND pin to the ground and the VIN
pin to the Arduino's 5V output. I2C pins are unique
to each Arduino board and must be linked properly.
On Arduino boards with the R3 configuration, the
AREF pin is close to the headers for the SDA (data
line) and SCL (clock line) pins. There are two more
names for them: A5 (SCL) and A4 (SDA).
An I2C LCD has four pins which interface it to the
outside world:
GND: The ground pin, GND should be linked to the
Arduino's ground.
VCC: The module and the LCD are both powered
by VCC. Connect it to the Arduino's 5V output or a
different power source.
SDA: SDA stands for Serial Data. This line is used
to send and receive data.
SCL: SCL stands for Serial Clock. The Bus Master
provides this signal as a time signal.
3.1.5 Load
The circuit is connected with the 100 W Lamp load
and passive loads 2kW (resistance and inductance).
3.1.6 NodeMCU
The NodeMCU (Node MicroController Unit) is an
open-source hardware and software development.
The ESP8266 NodeMCU is powered using a
MicroB USB port on the device's PCB. The board
WSEAS TRANSACTIONS on ELECTRONICS
DOI: 10.37394/232017.2023.14.6
Loganathan Nachimuthu,
Reem Ahmed Al-Mahrouqi,
Tamadhar Salim Al-Abri, Muna Al-Hadrami
E-ISSN: 2415-1513
51
Volume 14, 2023
contains an integrated LDO (Linear and Low-
Dropout) voltage regulator to maintain a constant
voltage of 3.3V and 600 mA. The ESP8266's
operating voltage range is 3V to 3.6V. The
operational current for RF transmissions is 80 mA.
On one of the board's sides, the regulator's output is
also divided up and designated with the number
3V3. This pin can be used to power external
components.
4 Circuit Diagram
The circuit diagram consists of the following main
components represented in Figure 2.
Arduino UNO
PZEM-004TV3 module
CT coil
16*2 LCD
I2C LCD adapter
Node MCU
Load, AC 230V supply
DC Power supply
The project circuit consists of an Arduino Uno
board, AC 230 V supply mains, Current transformer
load, and PZEM-004t module. The PZEM -004T
module is made by Peacefair Electronics and its
operation is based on the current transformer
measurement (CT). The PZEM 004T module is
responsible for all parameters parameter
measurements such as voltage, current, power
consumption, energy consumption, frequency, and
power factor. The PZEM module is
connected to the Arduino Uno board through the
UART (Universal Asynchronous Receiver and
Transmitter) serial communication port Tx and Rx
on one side of the module and the static load line is
connected on the other side of the module. The
supply line and neutral are directly connected to the
PZEM-004T module to deliver the voltage
measurement. The 100A/ 100mA current
transformer (CT) is looped through the load neutral
to provide the current measurement.
The PZEM-004T module internally measures
and computes the voltage, current, power
consumption, energy consumption, frequency, and
power factor. The output data is sent to the Arduino
Uno board. The Arduino will send this output to
LCD to display the measured parameters. Here the
different types of loads are used to measure the
parameters. The loads such as 100 Watts lamp load,
static resistive load bank, and static inductive load
bank are used with different load levels. The loads
are connected from the supply mains through the CT
and Digital Power Analyzer to monitor and compare
the real-time measured parameters with PZEM-
measured parameters.
Fig. 2: Circuit diagram
The Node MCU is connected to the Arduino
Uno board through the UART (Universal
Asynchronous Receiver and Transmitter) serial
communication port TX and RX on pins 5 and 6
respectively. The NodeMCU will transmit the
measured data via an internet connection. On a
desktop or laptop computer, a browser can be used
to access real-time data.
When the load circuit is switched on, the load
current starts to flow in the load circuit and is sensed
by the current transformer. The sensed current is
read by the power side circuit of PZEM-004T. The
PZEM-004T module sends a command to Arduino
to display the load circuit current. Similarly, voltage
is read by PZEM-004T and commands the Arduino
to display. Based on the current and voltage across
the load, the frequency, power, energy, and power
factor are displayed on the LCD. The PZEM-004T
operates with a 5V DC power supply. The measured
parameter data is sent to the cloud through the Node
MCU with the Thing Speak platform.
4.1 Hardware Connection Description
Figure 3 shows the Hardware connection
The Vin pin of the LCD-I2C is connected to the
pin 5V of the Arduino.
The GND pin of the LCD-I2C is connected to
the GND of the Arduino.
The SDA pin of the LCD-I2C is connected to
the pin A4 of the Arduino.
WSEAS TRANSACTIONS on ELECTRONICS
DOI: 10.37394/232017.2023.14.6
Loganathan Nachimuthu,
Reem Ahmed Al-Mahrouqi,
Tamadhar Salim Al-Abri, Muna Al-Hadrami
E-ISSN: 2415-1513
52
Volume 14, 2023
SCL pin of the LCD-I2C is connected to the A5
of the Arduino
PZEM module Rx is connected to the pin 3 TX
of the Arduino.
PZEM module Tx is connected to the pin 2 RX
of the Arduino.
PZEM module GND connected to the GND of
the Arduino.
PZEM module 5V is connected to the pin 5V of
the Arduino.
PZEM module input pin 1 and 2 is connected to
supply main Phase and Neutral
PZEM module input pin 3 and 4 is connected to
the CT coil terminal Phase and Neutral
Neutral of the supply line is looped through the
CT to the input terminal (Neutral) of the Digital
Power analyzer.
The phase of the supply line is directly
connected to the input terminal (Phase) of the
terminal of the Digital power analyzer.
The Load is connected across the output of the
Digital power analyzer.
The Arduino is connected to the laptop through
a USB wire.
Node MCU GND connected to the GND of the
Arduino.
Node MCU 3.3V is connected to the pin 3.3V
of the Arduino.
Node MCU RX is connected to the pin 6 of the
Arduino.
Node MCU TX is connected to pin 5 of the
Arduino
Fig. 3: Hardware connection
5 Result and Discussion
Figure 4 shows the 100-watt lamp load setup. The
voltage, current, frequency, power, energy, and
power factor parameters are measured by
connecting the different practical loads. All the
loads were tested instantly and no specific time was
fixed to measure the parameters. The PZEM sensor
measures the voltage and current when the load is
connected. The Arduino receives a signal, and the
LCDs measure parameters. The measured electrical
parameters are sent to the cloud server using the
Thing-speak platform. The parameters are accessed
by the laptop and mobile device through the web
browser. The load current, power, energy, and
power factor are observed to vary according to the
load patterns.
Fig. 4: 100 Watts Lamp Load experimental setup
Depending on the time and load power, the
energy varies. According to the input level, the
supply voltage and frequency are both kept constant.
The sample reading of the 100Watts lamp load
measured parameters of the power analyzer, LCD,
and Thingspeak output is shown in Figure 5, Figure
6a and Figure 6b The real-time measured data by
the power analyzer is cross-checked with the PZEM
sensor measured data. The error values of the
voltage and current are calculated by using the error
calculation formula (1).
𝐸𝑟𝑟𝑜𝑟 = Meter reading−PZEM Sensor Reading
Meter reading X 100
(1), [17].
Fig. 5: Power analyzer and LCD readings for the
100watt Lamp load
The calculated % error for the voltage and
current values are tabulated in Table 1. A smaller
WSEAS TRANSACTIONS on ELECTRONICS
DOI: 10.37394/232017.2023.14.6
Loganathan Nachimuthu,
Reem Ahmed Al-Mahrouqi,
Tamadhar Salim Al-Abri, Muna Al-Hadrami
E-ISSN: 2415-1513
53
Volume 14, 2023
percentage of errors is observed as compared with
the real-time measured by using a digital power
analyzer meter against sensor-measured data.
Table 1. 100 Watts Lamp Error calculation
V
I
E
%
Error
V
%
Error
I
Meter
254
0.44
0.00006
-0.27
0
PZEM
Sensor
255
0.44
0.5
Fig. 6a: Thingspeak output
Fig. 6b: Thingspeak output
6 Conclusion
The proposed “IOT Based Energy Monitoring for
Practical Loads Using NodeMcu " project was
successfully created and tested. The experimental
results of the energy monitoring system with
different load parameters are measured and data is
transmitted to the server through the Thing-speak
platform. Through the online browser, the real-time
measured data is viewed by laptop graphically. This
method is a straightforward, low-cost circuit that
allows for the simultaneous measurement of many
WSEAS TRANSACTIONS on ELECTRONICS
DOI: 10.37394/232017.2023.14.6
Loganathan Nachimuthu,
Reem Ahmed Al-Mahrouqi,
Tamadhar Salim Al-Abri, Muna Al-Hadrami
E-ISSN: 2415-1513
54
Volume 14, 2023
electrical characteristics and significantly eliminates
the need for additional meters. It reduces the costs
associated with installing various meters. The error
calculation was also made and compared with the
real-time measured parameters by using the power
analyzer.
In the future, the system can be more compact
and user-friendly and it would allow users to
monitor their homes for theft prevention as a smart
house.
References:
[1] D. Minoli, K. Sohraby, B. Occhiogrosso, IoT
Considerations, Requirements, and
Architectures for Smart Buildings Energy
Optimization and Next-Generation Building
Management Systems, IEEE Internet Things
Journal, Vol. 4, No.1, 217, pp. 269-283.
[2] W. Kasemsin, Development of monitoring
system for solar energy SNRU Journal of
Science and Technology and wind energy to
generate electricity, Vol. 14, No.2014, pp.
8-15.
[3] T. Thongkamwitoon, Internet of Things and
Regulatory Guidelines for Spectrum
Management in Thailand, The National
Broadcasting and Telecommunications
Commission Journal. Vo.1, No.1, 2016,
pp. 167-195.
[4] G. Bedi, G.K. Venayagamoorthy, R. Singh,
R.R. Brooks, K. Wang, Review of Internet of
Things (IoT) in Electric Power and Energy
Systems, IEEE Internet Things Journal.
Vol.5, No.5, 2018, pp. 847-870.
[5] H.G.R. Tan, C.H. Lee, V.H. Mok, Automatic
power meter reading system using GSM
network, International Power Engineering
Conference, 2007, pp. 465-469.
[6] M. Wasi-ur-Rahman, M.T. Rahman, T.H.
Khan, S.M.L. Kabir, Design of an intelligent
SMS based remote metering system, 2009
International Conference on Information and
Automation, 2009, pp.1040-1043.
[7] L. Labib, M. Billah, G.M.S.M. Rana, M.N.
Sadat, M.G. Kibria, M.R. Islam, Design and
implementation of low-cost universal smart
energy meter with demand side load
management, IET Gener. Transm. Distrib.
Vol.11, No.1 2017,pp. 3938-3945.
[8] V.R. Patil, M.D. Patil, A.T. Khude, IoT Based
Prepaid Energy Meter, International
Conference on Devices, Circuits and Systems,
2020, pp.17-20.
[9] R. Mathur, K. Kalbande, Internet of Things
(IoT) based Energy Tracking and Bill
Estimation System, International Conference
on IoT in Social, Mobile, Analytics and Cloud
2020, pp.80-85.
[10] Mulliadi, M.Y. Fahrezi, I.S. Areni, E.
Palantei, A. Achmad, A Smart Home Energy
Consumption Monitoring System Integrated
with Internet Connection, IEEE International
Conference on Communication, Networks and
Satellite,2020, pp.75-80.
[11] W. Velasquez, L. Tobar-Andrade, I. Cedeno-
Campoverde, Monitoring and Data Processing
Architecture using the FIWARE Platform for
a Renewable Energy Systems, IEEE 11th
Annual Computing and Communication
Workshop and Conference (CCWC),2021,
pp.1383-1387.
[12] Hao Luan; Jianwei Leng, "Design of energy
monitoring system based on IOT“,) IEEE.
28th Chinese Control and Decision
Conference , 2016, pp.6785-6788.
[13] Mani DheerajMudaliar, IoT based real time
energy monitoring system using Raspberry
Pi, Elsevier, Internet of things, Vol.12,2020.
pp.350-380.
[14] Suprita M. Patil, M. Vijayalashmi, Rakesh
Tapaskar, IOT based solar energy
monitoring system, International Conference
on Energy, Communication, Data Analytics
and Soft Computing,2017, pp.1574-1579.
[15] Sanket Thakare; Akshay Shriyan; Vikas
Thale; Prakash Yasarp; Keerthi Unni,
Implementation of an energy monitoring and
control device based on IOT, IEEE Annual
India Conference 2016,pp.978-983.
[16] Yi Liu; Chao Yang; Li Jiang; Shengli Xie;
Yan Zhang, Intelligent Edge Computing for
IoT-Based Energy Management in Smart
Cities, IEEE Networks, Vol.33, No.2,2019,
pp.111-117.
[17] Weerathum Chaiyong, Somchat Sonasang,
Applications of energy monitoring using the
IoT, SNRU Jour nal of Science and
Technology, Vol.14, No.2,2022, pp.1-9.
WSEAS TRANSACTIONS on ELECTRONICS
DOI: 10.37394/232017.2023.14.6
Loganathan Nachimuthu,
Reem Ahmed Al-Mahrouqi,
Tamadhar Salim Al-Abri, Muna Al-Hadrami
E-ISSN: 2415-1513
55
Volume 14, 2023
Contribution of Individual Authors to the
Creation of a Scientific Article (Ghostwriting
Policy)
The authors equally contributed in the present
research, at all stages from the formulation of the
problem to the final findings and solution.
Sources of Funding for Research Presented in a
Scientific Article or Scientific Article Itself
No funding was received for conducting this study.
Conflict of Interest
The authors have no conflicts of interest to declare.
Creative Commons Attribution License 4.0
(Attribution 4.0 International, CC BY 4.0)
This article is published under the terms of the
Creative Commons Attribution License 4.0
https://creativecommons.org/licenses/by/4.0/deed.en
_US
WSEAS TRANSACTIONS on ELECTRONICS
DOI: 10.37394/232017.2023.14.6
Loganathan Nachimuthu,
Reem Ahmed Al-Mahrouqi,
Tamadhar Salim Al-Abri, Muna Al-Hadrami
E-ISSN: 2415-1513
56
Volume 14, 2023