Design and Implementation of an IoT-Based Home Energy Monitoring System
Design and Implementation of an IoT-Based Home Energy Monitoring System
net/publication/368965970
CITATIONS READS
7 345
7 authors, including:
All content following this page was uploaded by Henry Amhenrior on 05 March 2023.
features of tracking excessive use of appliance and circuitry (TP4056). Two 3.7v rechargeable lithium-ion battery
regulating the cost of energy consumption in the home. The is connected to the TP4056 module. The module's output is
development of IoT version by [10] provided a full distributed to the control circuits: the relays, liquid crystal
automation, which automatically monitored supply, display, the ESP8266EX Microcontroller, and the DS18B2
consumption and other parameters between energy consumers temperature sensor. The power supply circuit is shown in Fig.
and supplier without intermediary. 2.
According to available literature under review, the interface N
of IoT-based smart meters with the cloud and big data L
analytics integrated feature for predicting usage of energy by
appliances was observed in [11] is the current direction of FU2 TR1
SW1
research. The present research intends to implement an IoT- 1A
TO GND
TO VOUT
TP4056 OF TP4056
RL2
VDD
SCL
SDA I2C LCD INTERFACE
47k 47k D1
VSS
TO POWER
14
13
12
10
11
SUPPLY CCT
9
8
7
6
5
4
3
2
1
10uF
D7
D6
D5
D4
D3
D2
D1
D0
VDD
E
RS
VEE
VSS
RW
47k
TO
TO LOAD 47k
LCD1 CONTACTOR1
CONTACTOR
Q4
BC547
27.0
47k
TO LIGHT
GND
VCC
DQ
A0 D0 RELAY
Gnd D1 47k
D2
1
2
3
VU D3 FU1 Q3
1A BC547
ESP8266ES
D4 47k
S3 3V
S2 Gnd
S1 D5 47k TO AC
SC RELAY
S0
RESET SK Q2
Gnd D6 BC547
SWITCH 3V D7 47k
EN D8 VIN N
RST Rx TX L
Gnd Tx RX PZEM004T CT1 47k TO SOCKET
VIN Gnd Gnd CT2 RELAY
3V
Q1
BC547
47k
L2
12V
CONTACTOR (4 POLE)
POWER OUTPUT
L INDICATOR 220/240 COIL
PZEM-OO4T
L
FROM
LIGHT
SOCKET
100A CT
AC
LOAD
SYSTEM
COOLING FAN
+5V
CONTACTOR
RL2 +88.8
SWITCH 1 CONTACTOR
kRPM
D2
SWITCH 2
D5 D1 RL4 RL6
D3
goes to the base of the BC547 transistor, the collector of the readable programming language. The sketch (Arduino code
BC547 is then connected to the ground. In contrast, the emitter file) is processed and compiled into machine language.The
is connected to one channel relay module, and the relay project employs SPIFFS to store files on the ESP8266 and
module gets its power from the TP45056 module. The upload them to the ESP8266.SPIFFS is an abbreviation for
common side of the relay connects to the neutral terminal Serial Peripheral Interface Flash File System. It is a system
block, while the normally open side connects to one of the that stores files on the ESP8266 and ESP32's extra flash
relays in the four-channel relay module being used. memory. It is so named because the user uses the serial
A four-channel relay is connected to a ESP8266EX interface to read, write, or delete files from memory.
microcontroller (GPIO 1, 2, 3 & 4). The common of the first
relay is connected to a one-channel relay for the contactor.
The normally open side of the relay is connected to the A02
coil terminal of the contactor. The second, third and fourth
relays common are all connected to the neutral of the breaker's
output and the switching relays are as shown in Fig. 4.
In the output indicator light (Blue), the positive
terminal is connected to the live output terminal of the
contactor, while the neutral terminal is connected to the
neutral terminal block.
B. Software Implementation for monitoring
The software implementation of this system is mainly
in three sections: the HMI interface for offline visualization.
This microcontroller programming ensures meter correct
operations and the telegram Platform bot command
development.
1) Offline Mode interfacing and Authorization
The programing of the microcontroller was done
using the Arduino IDE. The Arduino code is written in C++, Fig. 5. The offline mode API interface.
adding special methods and functions. C++ is a human-
After flashing, connect to "WALI SMART METER|Offline" Table 3. Load Test (150W bulb).
pass is "wali12345" then go to any browser and input the I.P.
SN Time Volt App. I(A) Pf Power
address 192.168.4.1 (Wi-Fi manager) and connect to your Wi- Power Consumed
Fi router while for power server interface “192.168.x.x:8089” 1 21:31:52 UTC 246.0 101.4 0.41 1 100.86
(port is 8089). The visual presentation is represented in Fig. 5. 2 21:32:11 UTC 245.9 101.4 0.41 1 100.82
When accessing the offline mode API and the system 3 21:32:32 UTC 245.4 101.1 0.41 1 100.61
4 21:32:52 UTC 245.1 101.9 0.41 1 100.49
prompts the user with the message "The file exists, but you are 5 21:33:16 UTC 245.6 101.2 0.41 1 100.70
not authorized!" - this is a simple safety measure feature 6 21:33:33 UTC 245.5 101.1 0.41 1 100.66
implemented, so to access files, you must first go to a secret 7 21:33:54 UTC 245.6 101.2 0.41 1 100.70
8 21:34:15 UTC 245.2 101.0 0.41 1 100.53
URL http://192.168.x.x:8089/wali. Once the user navigates to
9 21:34:35 UTC 245.4 101.1 0.41 1 100.61
http://192.168.x.x:8089/wali, it stores a cookie in the browser 10 21:34:56 UTC 245.5 101.2 0.41 1 100.66
and authorizes the user.
Table 4. Load Test (100W bulb)
IV. TEST
Testing and measurement were carried out to SN Time Volt App. I(A) Pf Power
determine the accuracy level of the developed monitoring Power Consumed
1 13:58:54 UTC 232.4 221.8 1.5 0.6 220.45
system. The three tests carried out were the load test, alert 2 13:59:15 UTC 232.4 221.6 1.5 0.6 220.45
system test, and remote switching test. 3 13:59:35 UTC 233.9 223.1 1.5 0.6 223.33
With a 230V input, the present energy consumption 4 13:59:56 UTC 234.0 222.8 1.5 0.6 223.42
5 14:00:17 UTC 234.1 223.5 1.5 0.6 223.52
of 16.86kw/h was automatically recorded by the system. It
6 14:00:37 UTC 235.1 224.5 1.5 0.6 225.93
was done repeatedly for several times, and the meantime on 7 14:00:57 UTC 234.9 223.9 1.5 0.6 225.74
each load category was obtained and recorded. The load test 8 14:01:18 UTC 234.9 223.7 1.5 0.6 222.10
for 200w using a refrigerator is as shown in Table 1. These 9 14:01:38 UTC 235.8 229.8 1.5 0.6 229.53
10 14:01:59 UTC 235.6 232.6 1.5 0.6 2343.03
measurements were relayed in real-time to Things Speak.com
where it can be viewed. This test aimed to show the measuring
ability of the developed energy monitoring system. This test Table 5. Load Test (200W Fridge)
was carried out using a stopwatch, variable load, and the home SN Time Volt App. I(A) Pf Power
Power Consumed
energy monitoring system. 1 19:51:50 UTC 240.2 74.9 0.31 1 99.4
The load tests were carried out at 60W, 100W, 2 19:52:11 UTC 240.4 75.0 0.31 1 99.4
200W, 1000W and 2500W respectively. Tables 1 to 5 show 3 19:52:31 UTC 240.4 75.0 0.31 1 99.4
the readings from various loads as measured using the 4 19:52:51 UTC 240.7 75.2 0.31 1 99.2
5 19:53:12 UTC 240.3 74.9 0.31 1 99.5
prototype, while Figures 6 to 10 show plot of the power 6 19:53:32 UTC 240.4 75.0 0.31 1 99.4
consumed by the various appliances tested. 7 19:53:52 UTC 239.8 74.7 0.31 1 99.5
Table 1. Load Test (1000W Pressing Iron). 8 19:54:14 UTC 240.3 74.9 0.31 1 99.5
9 19:54:35 UTC 239.8 74.7 0.31 1 99.5
SN Time Volt App. I(A) Pf Power 10 19:54:55 UTC 240.1 74.9 0.31 1 99.4
Power Consumed
1 19:54:16 UTC 245.8 0.5 0 1 0.00
2 19:54:37 UTC 245.7 0.5 0 1 0.00
3 19:55:03 UTC 243.7 1191.6 4.89 1 1191.69
4 19:55:21 UTC 245.7 0.4 0 1 0.00
5 19:55:42 UTC 245.1 0.5 0 1 0.00
6 19:56:02 UTC 244.2 878.1 3.74 0.96 876.78
7 19:56:23 UTC 245.0 0.5 0 1 0.00
8 19:56:47 UTC 245.3 0.4 0 1 0.00
9 19:57:15 UTC 245.3 0.5 0 1 0.00
10 19:57:36 UTC 245.0 0.4 0 1 0.00
V. DISCUSSION
After the Successful design and development of the
home energy monitoring system, it was subjected to load tests
to ensure optimal system performance.
From tables 1, 3 and 5, the power factors of the loads
is 1 as these are resistive load. The other loads showed power
factors that varied from 1 because they are not resistive loads.
These have shown that the prototype is capable of measuring
power and power factor needed for power calculation and it is
therefore performing as expected. In figure 6, the plot shwed
some spike of power consumption and then drops to zero level
for the pressing iron. This is so because of the characteristic
power consumption pattern of an electric iron as the control
Fig. 7. Plot of power consumed by 60w bulb element cuts off the supply of current once the set value of
heat (temperature) is achieve. The period of current cut-off
from the heater is seen in the graph to be zero. The graphs of
figures 7 to 10 showed unique varied consumption pattern of
the various appliance. These graphs are continuous with no
zero power recorded at any instant as the appliances where
continuously on supply. This again shows that the prototype is
capable of monitoring the load consumption of home
appliances as designed.
This IoT-based home energy monitoring system has
two modes of operation: offline and online, which increases
the system's redundancy. There are several human-designed
smart monitoring systems, but the majorities only have one
Fig. 8. Plot of power consumed by 150w fan mode of operation. A backup power supply and a quick alert
system are advantages in this design.
The user can communicate with the system via
Telegram, checking the status of those currently connected to
the system. The text alert duration test shows a mean time of
1sec to 2.51 secs and about 2 to 5secs for switching
appliances, depending on the network mode. The results show
that the system is a good base for monitoring energy meters.
The system data can be visualized through the LCD
screen and the Thing Speak website. The obtained results are
divided into two parts: without IoT and with IoT factors.
When compared to existing energy monitoring systems, this
system provides faster and more reliable communication
Fig. 9. Plot of power consumed by 100w bulb between the metering and consumer end. As a result, the cloud
computing protocol transmits data to the server without delay
and this enables the online report to appear instantaneously.
This system will be useful in the future for better and smarter
communication in energy management system.
VI. CONCLUSION
This work has successfully achieved its set objective
of development of an IoT based home monitoring system with
a great level of safety and security built on it. It is IoT based,
such that users will be alerted via the telegram application
when a fault occurs such as short circuit, voltage fluctuations,
overload, or high-power consumption. The user can act
accordingly to prevent heavy financial losses due to high
Fig. 10. Plot of power consumed by 200w fridge power consumption.
REFERENCES
[1] Siregar, R. R. A., Sikumbang, H., & Sangadji, I. B.
(2018). kWh Meter Smart Card Model Token for [7] Shankar, M., Kumar, K. R., Goud, G. S., & Rani, D.
Electrical Energy Monitoring. MATEC Web of N. (n.d.). AMR and GSM-based Energy smart meter
Conferences, 218, 03002. reading for billing purposes.
[2] Nithya, K. P., Jason, J., Srikanth, D., Ranjan, I., & [8] Pujari, L. (2018). IoT-based smart energy meter
Praveen, R. (2019). Smart Meter Reading and Theft monitoring and controlling system. International
Control System by Using GSM. Journal of Advanced Research, Ideas and Innovations
[3] Taktak, E., & Rodriguez, I. B. (2017). Energy in Technology, 4, 2126–2128.
consumption adaptation approach for smart [9] Chooruang, K., & Meekul, K. (2018). Design of an
buildings. 2017 IEEE/ACS 14th International IoT energy monitoring system. 2018 16th
Conference on Computer Systems and Applications International Conference on ICT and Knowledge
(AICCSA), 1370–1377. Engineering (ICT&KE), 1–4.
[4] Ahmed, M. S., Mohamed, A., Homod, R. Z., Shareef, [10] Kotwal, A., Joshte, N., Karwade, B., Wagh, R., &
H., Sabry, A. H., & Khalid, K. B. (2015). Smart plug Yadav, N. (2022). IoT Based Smart Energy Meter:
prototype for monitoring electrical appliances in Energy Theft System. International Research Journal
Home Energy of Innovations in Engineering and Technology, 6(3),
[5] Bhagwatkar, N. D., Maskar, S. G., & Lewarkar, P. S. 157.
(n.d.). Energy Monitoring and Conservation using [11 Pansare, D., Mule, T., Markad, N., Shiralkar, A., &
Smart Plug. Bakre, S. (2021). Artificial Neural Network-based
[6] Amhenrior, H. E. (2017). Analysis and Development Virtual Energy Meter. 2021 International Conference
of a GSM-Based Recharging and Monitoring of on Emerging Smart Computing and Informatics
Energy Metering System. PhD Thesis, University of (ESCI), 186–189.
Benin, Benin City, Edo State, Nigeria.