Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

computation

Article
Energy Consumption Monitoring System Based on IoT for
Residential Rooftops
Sarah El Himer 1 , Mariyam Ouaissa 2 , Mariya Ouaissa 2 , Moez Krichen 3,4 , Mohannad Alswailim 5, *
and Mutiq Almutiq 5

1 Department of Electrical Engineering, Sidi Mohamed Ben Abdellah University, Fez P.O. Box 2202, Morocco;
sarah.elhimer@usmba.ac.ma
2 Department of Computer Science, Moulay Ismail University, Marjane 2, BP 298, Meknes 50050, Morocco;
mariyam.ouaissa@edu.umi.ac.ma (M.O.); mariya.ouaissa@edu.umi.ac.ma (M.O.)
3 FCSIT, Al-Baha University, Al-Baha 65528, Saudi Arabia; mkreishan@bu.edu.sa or moez.krichen@redcad.org
4 ReDCAD Laboratory, University of Sfax, Sfax 3038, Tunisia
5 Department of Management Information Systems and Production Management, College of Business and
Economics, Qassim University, P.O. Box 6640, Buraidah 51452, Saudi Arabia; mmatk@qu.edu.sa
* Correspondence: malswailim@qu.edu.sa

Abstract: This work aims to create a web-based real-time monitoring system for electrical energy
consumption inside a specific residence. This electrical energy is generated from a micro-CPV
system lying on the roof of this residence. The micro-CPV is composed of a Fresnel lens as the main
optical element, a spherical lens as the secondary optical element, and a multi-junction solar cell.
A tiny photovoltaic concentrator system with a geometric concentration ratio of 100× is analyzed
in the first part of this study, while the second part is designed to monitor the electricity generated
by the micro-CPV system. An ESP8266 controller chipset is used to build the sensing peripheral
node, which controls a relay and a PZEM-004T current sensor. As a result, the optical element
used has approximately 83% optical efficiency, with an acceptance angle of 1.5◦ . Regarding the
monitoring system, the architecture demonstrates the ability of the system to monitor current and
energy consumption in real time using a computer or smartphone and a web server specially designed
to continuously update the power consumption profile in a specific smart home environment. The
whole electric power consumption monitoring system generally worked well. The monitoring system
Citation: Himer, S.E.; Ouaissa, M.; is configured to provide excellent accuracy for a 0.6% hit.
Ouaissa, M.; Krichen, M.; Alswailim,
M.; Almutiq, M. Energy Consumption Keywords: Internet of Things; smart home; micro-concentrated photovoltaic; optical efficiency;
Monitoring System Based on IoT for ball lens
Residential Rooftops. Computation
2023, 11, 78. https://doi.org/
10.3390/computation11040078
1. Introduction
Academic Editor: Demos T. Tsahalis
The Internet of Things (IoT) is a network of connected computers, mechanical and
Received: 29 January 2023 digital devices, people and things with unique identifiers that enable the potential flow
Revised: 24 March 2023
of data over a network without the need for a computer to computer or man-to-man
Accepted: 6 April 2023
communication. Physical devices can now be controlled remotely via Internet services
Published: 10 April 2023
and are no longer cut off from the virtual world. Smart phones, smart appliances, smart
automobiles, smart homes and smart cities are not the only components of a smart world.
Since in-vehicle communication and information technologies have the potential to revolu-
Copyright: © 2023 by the authors.
tionize it, “smart” objects will play a crucial role in the future of IoT. With the expansion
Licensee MDPI, Basel, Switzerland. of WiFi and 4G-LTE wireless Internet access, it is clear that information and communi-
This article is an open access article cation networks will eventually be everywhere. The fastest growing source of electricity
distributed under the terms and will be renewable energy sources such as wind and solar photovoltaic, as they are both
conditions of the Creative Commons technologically advanced and reasonably priced. However, energy needs continue to rise
Attribution (CC BY) license (https:// globally. One of the most forward-thinking ways to reduce the impact on the environment
creativecommons.org/licenses/by/ is through the use of renewable energy technologies. One of these renewable energies is
4.0/). the concentrated photovoltaic.

Computation 2023, 11, 78. https://doi.org/10.3390/computation11040078 https://www.mdpi.com/journal/computation


Computation 2023, 11, 78 2 of 19

Concentrated photovoltaics with multiple PV junctions have emerged as a viable


alternative for increasing efficiency while maintaining cost effectiveness due to recent
advances in photovoltaic (PV) manufacturing. Solar cells with many junctions and a
sun tracking system as well as an optical focusing device are the main components of
CPV systems. As the concentrating optical element reduces the size of the solar cell to
reduce its cost, the multi-junction solar cell plays a vital role in increasing the efficiency of
power conversion.
Different strategies have been used to increase these systems’ dependability while
lowering their cost. For three junction cells at 925 suns, multi-junction cell research has
certified an efficiency of about 43.5% [1]. A further announcement was made by Azur
Space [2] that their five junction cells, which have a 44% efficiency, are expected to reach
commercial production by 2021. With a 47.3% efficiency at 200×, a six-junction solar
cell developed by NREL also broke the previous record [3]. CPV has a power conversion
efficiency of >35%, as opposed to the usual PV module efficiency of 15–20% [4]. Commercial
CPV systems, on the other hand, are approved for a conversion efficiency that is twice that
of micro-CPV systems. The theory behind micro-CPV systems is the same as that of CPV
modules; the only difference is in the size of the system (cells and optics). The multi-junction
solar cell typically has a thickness of little more than one millimeter; the focusing optics are
of the same order of magnitude as the module’s thinness, which is only a few millimeters
thick, in contrast. This reduction in system size offers a number of advantages and broadens
the range of applications for these systems to rooftops, automobile roofs, and confined
areas [5]. High-efficiency multijunction solar cells, concentrating both optical devices and a
sun-tracking method, are the foundation of micro-concentration photovoltaic technology.
The optical concentrating system’s job is to direct sunlight toward the solar cell, as its
name suggests. The optical capabilities of a desirable concentrating optical system should
also meet a variety of requirements, including excellent irradiance homogeneity, wide
acceptance angles, and high optical efficiency. The number of the optical concentrators can
range from one to three, and they can combine reflecting and refractive elements. According
to Panasonic [6], single-stage concentrators are often utilized for low concentrations (100×),
with the solar cell being directly connected to the refractive optical components. Analogous
to a conventional CPV with a POE and an SOE, double-stage concentrators operate on
the same principle. Although the POE in MCPV can be complete lenses unlike the CPV, it
has excellent optical efficiency, with draft angle losses from Fresnel lens losses excluded.
Given this arrangement, the POE directs sunlight toward the SOE, homogenizing the
distribution of irradiance across the cell surface and extending the system’s acceptance
angle. In the literature, different SOE types—refractive, reflective, or total—are used [7–10].
Price et al. [11] created a different type of concentrator called an RX concentrator, where R
stands for the main refractive and X for the reflecting secondary optical element. In this
design, the cell is positioned in the middle of the bulk of the optical system. Additionally,
the solar cell area in micro-CPV systems is reduced to less than 1 mm2 . Lower temperatures
over the cell as a result of the cell’s size decrease suggest easier thermal management
without the installation of external systems. As a result, substitute inexpensive substrates
such as PCB (printed circuit board) can be employed. Furthermore, because a low overall
current per cell is achieved, more flexibility in series and parallel connections is offered.
Additionally, the electrical performances are less sensitive to the non-uniformity of the
flux distribution [12]. Furthermore, for typical CPV systems, continual DNI monitoring is
required to track the movements of the sun. In general, these trackers are expensive and
heavy, which prevents the residential rooftop market, which could be important for the
CPV business, from adopting them. MCPV offers integrated tracking as a cutting-edge
solution to these issues. Since the modules in this technology are stationary, light can be
focused using specialized optics at various angles of incidence. Therefore, the solar cell or
the optics must be modified in order to retain focus when the sun moves. This technology
makes it possible to access the rooftop market from a fixed, static mount, which would not
otherwise be possible with regular CPV [13].
Computation 2023, 11, 78 3 of 19

What if it was possible to monitor electricity consumption and be notified by a mobile


application when the electricity bill for a given month exceeds a certain threshold? A
household’s electricity bill is measured by calculating the electricity consumed in a month.
Here, a monitoring system is needed, which is a regular procedure that focuses on entry
and exit while collecting data and tracking the progress of the monitored thing. When
monitoring occurs continuously and is usually carried out for a specific reason, for example,
to check the process of an object or to assess certain conditions, it will provide status and
trend information for measurement and evaluation [14,15].
The energy generated can be monitored by a monitoring system which is anticipated
to reduce energy use, resulting in cost savings, increased competitiveness, and improved
environmental quality. An alternate option for improving energy efficiency is energy
monitoring and auditing [16,17]. Because all devices are now connected to the Internet,
monitoring can be carried out at any time and from anywhere, making the Internet of
Things (IoT) a popular supporting technology for monitoring systems [18–25]. Smart
devices, including smart homes, smart cities, and smart laboratories, can be created thanks
to this technology. Sensors are a key element of the Internet of Things. The parameters
that are tracked and analyzed may be seen in real-time because the sensor is connected
to a controller [16]. This indicates that the IoT makes it possible to interact with system
components and use device data for monitoring and controlling [18]. An IoT-based or
IoT-enabled monitoring system that can track electricity use in conjunction with a system
to control the use of electrical equipment is known as an energy-efficient monitoring
system [23]. The appropriate management of power use requires keeping an eye on how
household electrical gadgets are being used [22]. A web-based monitoring system that
integrates power quality (PQ), employs virtual instruments, is open to all users, and makes
use of IoT [25]. Many researchers have conducted studies on IoT-based monitoring. Al-
Ali et al. [14], for example, utilized IoT for their smart home energy management system.
Their findings showed that customers can utilize a mobile device to pay bills online and
remotely monitor and operate the equipment. A digital power meter prototype based
on IoT technology was created by Despa et al. [19]. It was used to calculate the amount
of energy consumed in laboratories. A monitoring system for voltage, current, active
power, and overall power consumption was created by Chooruang and Meekul [21] in the
same year. In order to monitor and report on the quantity of electrical energy consumed
and the cost associated with operating AC equipment, Ramschie et al. [17] developed a
monitoring system for air conditioning (AC) equipment. The system can be accessed via a
smartphone or a web server. Pangestu et al. [18] constructed a monitoring system using
the Arduino NodeMCU ESP8266, which focuses on reading current and power against
inductive loads and resistive loads. The obtained accuracy rate lies between 96% and
99%. Joshi and Kiran’s [22] study on the monitoring system of electric power consumption
focuses on measuring power parameters such as power factors, voltage, current, frequency,
and active, reactive, and perceived power, and can also predict the power of the appliance
and determine the kind of connected device.
In the literature, we cannot find a study that concerns monitoring the energy gener-
ated by a photovoltaic concentration system. Therefore, our study brings together two
technologies; the first is the generation of electricity by an optical system which consists of
a Fresnel lens associated with a plano-convex lens. The aim of the study is to provide a
small module with high mechanical precision and high optical efficiency in order to reduce
the cost of the receiver assembly and increase its long-term reliability. The second is the
monitoring of the consumption of this energy. This study focused on the current use of
IoT-based home appliances with equipment that can be seen, especially the light bulb, rice
cooker, and dispenser. Both web and mobile devices are used for the monitoring procedure.
The PZEM-004T current sensor was chosen as the sensor due to its high reading accuracy.
Additionally, NodeMCU, an open-source Internet of Things platform with Arduino IDE, is
also used. This development kit is based on the ESP8266 module, which combines GPIO
and PWM (pulse width modulation). The data processor of this monitoring system is an
Computation 2023, 11, x FOR PEER REVIEW 4 of 20

Computation 2023, 11, 78 Arduino IDE, is also used. This development kit is based on the ESP8266 module, which 4 of 19
combines GPIO and PWM (pulse width modulation). The data processor of this monitor-
ing system is an ESP8266 NodeMCU. Users can more easily monitor the electrical power
consumption
ESP8266 of homeUsers
NodeMCU. appliances using
can more this monitor
easily monitoring the system.
electrical power consumption of
homeAfter the introduction,
appliances Section 2 describes
using this monitoring system. the created prototypes and the methods
usedAfter
in simulations, and how
the introduction, equations
Section from the
2 describes theliterature are modified.
created prototypes andThe
theproposed
methods
IoT-based
used photovoltaic
in simulations, andmonitoring system
how equations is discussed
from in Section
the literature 3. Section
are modified. 4 covers
The proposedthe
IoT-based
experimentalphotovoltaic
test of themonitoring system is
proposed system, anddiscussed in Sectionand
the conclusions 3. Section 4 covers
discussion the
are pre-
experimental test of
sented in Section 5. the proposed system, and the conclusions and discussion are presented
in Section 5.
2. Theoretical Background, Prototypes and Methods
2. Theoretical Background, Prototypes and Methods
This part begins with a review of the fundamental theoretical equations, before pre-
This
senting part
the begins
created with a review
prototypes of the
and the fundamental
methods used intheoretical
simulationsequations,
and tests before pre-
to identify
senting the created
their key qualities. prototypes and the methods used in simulations and tests to identify
their key qualities.
2.1. Theoretical Background
2.1. Theoretical Background
In Figure 1, an optical system is depicted from a conventional perspective, with Ain
In Figure 1, an optical system is depicted from a conventional perspective, with Ain
and Aout acting as the entrance and exit surfaces, respectively. This device emits a power
and Aout acting as the entrance and exit surfaces, respectively. This device emits a power
pin at the opposite end after accepting an optical power input pin. Light enters the system
pin at the opposite end after accepting an optical power input pin. Light enters the system
at an angle of incidence that is inward and exits at an angle that is outward. The whole
at an angle of incidence that is inward and exits at an angle that is outward. The whole
concentration ratio
concentration ratio is defined as
is defined the difference
as the difference between
between the
the optical
optical power
power density
density at the
at the
system entrance and the optical power density at the system
system entrance and the optical power density at the system exit: exit:
P
Pout A P P A A
C C =Aout
= PP = = P× inA ==ηη× CCg
out (1)
(1)
in
A P in Aout
Ain

with ηη == PPout being


beingthe
thesystem s optical
opticalperformance, andC C=
performance,and =in
A n2 sinthe
θoutratio
with in
system’s g = Aout = n1 sin θin the
of geometric
ratio concentration.
of geometric The geometrical
concentration. concentration
The geometrical ratio can
concentration be rewritten
ratio accord-
can be rewritten
ing to the optical
according étendue
to the optical law [13]:
étendue law [13]:

nn2 sin
sinθθ
Cg C= = n sin θ (2)
out
(2)
n1 sin θin

Figure 1. An optical system’s general view.


Figure 1. An optical system s general view.
This demonstrates a rigid relationship between an optical beam’s entrance and de-
This
parture demonstrates
angles, a rigid
placing some relationship
restrictions on between an optical
how an optical beam
system cans be
entrance andOur
designed. de-
parture angles, placing some restrictions on how an optical system can be designed. Our
optical system is composed of an SOE (ball lens) and a circular Fresnel lens (FL) with a focal
optical system
distance is acomposed
of f and of The
diameter d. an SOE
FL is(ball lens) and by
distinguished a circular Fresnelwhich
its f_number, lens (FL) withtoa
is equal

f
F# = (3)
d
focal distance of f and a diameter d. The FL is distinguished by its f_number, which is
equal to

Computation 2023, 11, 78 f 5 of 19


F# = (3)
d

2.2. Design of a Micro-Concentrator


2.2. Design of a Micro-Concentrator
Computation 2023, 11, x FOR PEER REVIEW
The two lenses that make up the MCPV module under research are the primary op-5 of 20
tical element The two lenses
(POE), that make
which serves as a up the MCPVand
concentrator, module under research
the secondary optical are the primary optical
element
(SOE),element
which is (POE),
directly which
coupledserves as a concentrator,
to a triple-junction and
solar cell andthe secondary
functions optical element (SOE),
as a homoge-
which
nizer focal
and is directly
increases
distance the coupled
of facceptance
and to a triple-junction
angle.
a diameter d.Two
Theunique solar cell
phases make
FL is distinguished and byfunctions
up the
its design as a which
homogenizer
process
f_number, is and
for the increases the acceptance
POEtoand SOE,
equal and they are angle. Two here.
described uniqueBothphases
opticalmake up are
systems theformed
designatprocess
505 for the POE
nm usingandFermat
SOE, ands concept, withdescribed
they are the primary lens Both
here. s focaloptical
point located
systems on are
the top surface
formed at 505 nm using
f
of the ball lens. Aconcept,
Fermat’s polymethyl withFresnel is the POE.
the primary F# = focal point located on the top surface
lens’s (3)of the ball
d
The PNMA
lens. lens is composed
A polymethyl Fresnel of is
methacrylate.
the POE. The material parameters and geomet-
ric concentration
The PNMAfactor are
lensutilized to construct
is composed the 2D and 3D
of methacrylate. Theprofile (Figure
material 2) of the and geometric
parameters
POE. 2.2. Design of a Micro-Concentrator
concentration factor are utilized to construct the 2D and 3D profile (Figure 2) of the POE.
The two lenses that make up the MCPV module under research are the primary op-
tical element (POE), which serves as a concentrator, and the secondary optical element
(SOE), which is directly coupled to a triple-junction solar cell and functions as a homoge-
nizer and increases the acceptance angle. Two unique phases make up the design process
for the POE and SOE, and they are described here. Both optical systems are formed at 505
nm using Fermat s concept, with the primary lens s focal point located on the top surface
of the ball lens. A polymethyl Fresnel is the POE.
The PNMA lens is composed of methacrylate. The material parameters and geomet-
ric concentration factor are utilized to construct the 2D and 3D profile (Figure 2) of the
POE.

Figure Figure Design


2. of
2. Design of thelens.
the Fresnel Fresnel lens.

There
There are are numerous
numerous small, concentric
small, concentric grooves
grooves that make up that
themake uplens.
Fresnel theIn
Fresnel
this lens. In this
section,
section, welook
we will willatlook
the atsituation
the situation of a two-dimensional
of a two-dimensional FresnelFresnel lensinward
lens with with inward grooves.
grooves.
TheThe followingequations
following equations are based
basedon
onFigure 3 [13]:
Figure 3 [13]:

β = r 0 + θi (4)

d
θi = artg (5)
Figure 2. Design of the Fresnel lens. 2f

There are numerous small, concentric dmake up the Fresnel lens. In this
tan r0 = grooves
rthat (6)
section, we will look at the situation of a two-dimensional
 2 Fresnel lens with inward
+ f2 − 1 )
2(nFigured2 3 [13]:
grooves. The following equations are based on

Figure 3. The inward-facing prism of the Fresnel lens.


Computation 2023, 11, 78 6 of 19

The exceedingly precise edge-ray tracing carried out using the SOE is shown in
Figure 2. The square aperture of the plano-convex lens has D side length, f focal length, s
side length, and r radius of the ball lens. The incidence angle is the angle formed by the
edge ray and the optical axis, and its matching refraction angle is given. This angle allows
the parallel light beam to be directed onto the ball lens after striking the lens aperture.
Equations (7)–(10), where n1 and n2 stand for the refractive indices of the air and the ball
lens, respectively. These formulas can be used to calculate the height of the ball lens using
an Equation (10).  
n1 sin(α)
β = sin−1 (7)
n2
 
−1 d
α = tan (8)
2f
a
tan β = (9)
2h
a
h = d ))
(10)
n sin(tan−1 ( 2f
2 tan[sin−1 ( 1 n2 )]

2.3. Simulation Results


An optical system’s design requires some feedback data for performance analysis and
optimization. Therefore, a variety of merit metrics are used: The optical system’s quality is
gauged by its optical efficiency. An optical system’s design requires some feedback data
for performance analysis and optimization. As a result, different metrics are employed,
with optical efficiency serving as the key metric for the quality of optical systems. The
homogeneity of the concentrators is another notable characteristic. A partial zone with
excessive irradiation is introduced by non-uniform illumination, which causes a localized
overload of current densities. The greater series resistance of this results in efficiency losses.
It may also have an impact on cell dependability because of temperature problems or tunnel
junction restrictions. The final measure of merit is the acceptance angle, which describes
the system’s tolerance for the axis misalignment of the incident solar energy and its optical
axis. When measuring optical efficiency at normal incidence, which is 0◦ , the output power
is shown to decrease to 90% of its maximum value. The merit statistics described above
will serve as the basis for evaluating the proposed system. Finding the ideal balance
between greater acceptance angle, uniform flux distribution throughout the cell surface,
and improved optical efficiency is the goal. Given that the majority of concentrators are
made of optical components, it is critical to find the best design for them or change their
characteristics in order to notice a performance gain. We have previously considered the
best layout for the proposed system. Using Tracepro software, Monte-Carlo ray tracing
was carried out to assess the optical capabilities of the concentrator. The following are the
specifications of the suggested concentrator design: (1) A PMMA Fresnel lens with a 6 mm
diameter, a 6 mm focal length, and a 1 mm thickness; (2) A triple-junction solar cell with a
0.6 mm side length; (3) An SOE with a PNMA ball lens of 8.94 mm diameter; (4) The solar
spectrum AM1.5d ASTM G173 has a solar divergence angle of 0.265.
a. Optical Efficiency
When the sun is exactly on-axis, the optical efficiency is calculated as the ratio of
power on the cell to that on the lens aperture. As the number of prisms rises, optical
efficiency does. Table 1 shows that the FL with 30 prisms can achieve an optical efficiency
of more than 83% and a 1.5◦ acceptance angle, while the FL with 3 prisms has the lowest
optical efficiency (35%) and the smallest acceptance angle (1◦ ). It should be noticed that
the receiver’s center intensity is shown in this diagram. The more prisms there are, the
better the optical efficiency. In fact, if the diameter of the lens remains constant, fewer
prisms will result in a prism with a greater angle. As a result, the prism will be larger,
ciency does. Table 1 shows that the FL with 30 prisms can achieve an optical efficiency of
more than 83% and a 1.5° acceptance angle, while the FL with 3 prisms has the lowest
optical efficiency (35%) and the smallest acceptance angle (1°). It should be noticed that
the receiver s center intensity is shown in this diagram. The more prisms there are, the
Computation 2023, 11, 78 better the optical efficiency. In fact, if the diameter of the lens remains constant, fewer 7 of 19
prisms will result in a prism with a greater angle. As a result, the prism will be larger,
which will produce geometrical losses (losses brought on by the divergence of the optical
beam)
whichforwill
rays that correspond
produce with
geometrical the ends
losses of the
(losses prisms
brought onasby
well
theas losses from
divergence ofcomplete
the optical
internal reflection.
beam) for rays that correspond with the ends of the prisms as well as losses from complete
internal reflection.
Table 1. Optical efficiency and acceptance angle vs. prism number.
Table 1. Optical efficiency and acceptance angle vs. prism number.
Prism Number of Fresnel
Optical Efficiency (%) Acceptance Angle (°)
Lens
Prism Number of Fresnel Lens Optical Efficiency (%) Acceptance Angle (◦ )
3 3 35.73 35.73 1 1
6 6 52.24 52.24 1.2 1.2
12 12 67.071 67.071 1.3 1.3
30 83.62 1.5
30 83.62 1.5

b. b. Irradiance
Irradiance Distribution
Distribution Over
Over thethe Cell
Cell Surface
Surface
Current
Currentdensity is is
density notnotuniform
uniform due
duetotothethe uniqueness
uniqueness ofof
and
and lack
lackofof
uniformity
uniformity inin
thethe
lighting
lighting intensity
intensityononthethesurface
surface ofof
the
thecell.
cell.AsAs a result, lateral
a result, lateralcurrents
currents between
between highly
highly
illuminated
illuminated and
anddimly
dimly litlit
areas occur.
areas occur.TheThefillfill
factor FFFF
factor decreases
decreases asasa result ofof
a result these lateral
these lateral
currents
currents’ generation
generationofofohmic
ohmiclosses
lossesininseries
seriesresistances
resistances [26].
[26]. Figure
Figure 4 displays
displays the
the spectral
spec-
irradiance distributions ononthethe
solar cellcell
forfor incidence angles ◦ . The flux is clearly seen
of 0of
tral irradiance distributions solar incidence angles 0°. The flux is clearly
to be
seen to distributed
be distributedevenly
evenly across virtually
across virtuallythethe entire exitexit
entire of the system
of the systemunder typical
under light
typical
distribution,
light distribution,with a bright
with a brightpoint
pointat the receiver’s
at the receivercenter forfor
s center 3030
prisms.
prisms. However,
However, when
whenthe
thenumber
number of of
prisms is reduced,
prisms is reduced,the light power
the light is gathered
power on the on
is gathered solarthecell center.
solar cellTherefore,
center.
by adding
Therefore, bymore prisms,
adding morethe flux distribution
prisms, becomes becomes
the flux distribution more uniform.
more uniform.

(a)

Figure 4. Cont.
Computation
Computation 11,11,
2023,
2023, 78 PEER REVIEW
x FOR 8 of8 of
2019

(b)

(c)

(d)
Figure
Figure4. 4.
Flux distributions
Flux depending
distributions on the
depending on prism number.
the prism (a) Prism
number. number
(a) Prism = 3; (b)=Prism
number 3; (b)num-
Prism
ber = 6; (c) =Prism
number 6; (c) number = 12; (d)
Prism number = Prism
12; (d)number = 30. = 30.
Prism number

For
Forthe rest
the ofof
rest the paper,
the wewe
paper, will continue
will our
continue tests
our using
tests thethe
using Fresnel lens
Fresnel of of
lens 3030
prisms.
prisms.

2.4.
2.4. Micro-CPV
Micro-CPV Systems’
Systems’ Loss
Loss Mechanism
Mechanism
AAmicro-CPV
micro-CPVconcentrator
concentrator’s power
s power generation
generation is is impacted
impacted byby a number
a number of of losses.
losses.
Starting with the optical components and moving through electrical losses caused
Starting with the optical components and moving through electrical losses caused by the by the
mechanical
mechanical assembly
assembly that
that takes
takes place
place inin theCPV
the CPVmodules,
modules, these
these losses
losses canbebefound
can foundatat
every level of the system. More information on these losses will be provided and covered
in this section of the essay.
Computation 2023, 11, 78 9 of 19
Computation 2023, 11, x FOR PEER REVIEW 9 of 20

every level of the system. More information on these losses will be provided and covered
Optical
in this losses
section prevent
of the essay. some of the solar radiation from entering the optical concen-
trator Optical
aperturelosses
at theprevent
receiversome
and from
of thereaching the cell (Figure
solar radiation 5). Losses
from entering thethat depend
optical on
concen-
optical surfaces and
trator aperture losses
at the thatand
receiver depend
fromon material
reaching qualities
the can be
cell (Figure 5). separated
Losses that into two
depend
groups.
on opticalThesurfaces
results and
showlosses
that athat
celldepend
displacement of upqualities
on material to 1mmcan hasbe noseparated
effect on intothe ac-
two
ceptance
groups. angle. Whenshow
The results the shift
that is
a greater than 70 mm,
cell displacement of the
up tooptical
1mmefficiency andon
has no effect acceptance
the accep-
angle,
tance however,
angle. Whendrop.theToshift
accommodate POE 70
is greater than tolerance,
mm, thethe proposed
optical system
efficiency andwill build an
acceptance
area of about 35 mm surrounding the cell s core. The statistics indicate
angle, however, drop. To accommodate POE tolerance, the proposed system will build that when the cellan
isarea
moved up to3570mm
of about mm, the acceptance
surrounding anglecore.
the cell’s remains the same.
The statistics When that
indicate the shift
whenisthe greater
cell is
than
moved70 mm,
up tothe optical
70 mm, theefficiency
acceptance and acceptance
angle remains angle, however,
the same. When the drop. When
shift building
is greater than
the
70 cell,
mm,the theproposed methodand
optical efficiency willacceptance
allow for aangle,
tolerance of roughly
however, drop.35 mm building
When around its thecen-
cell,
ter.
the proposed method will allow for a tolerance of roughly 35 mm around its center.

Figure 5. A micro-concentrator’s main optical power losses.


Figure 5. A micro-concentrator s main optical power losses.
• Fresnel losses
• Fresnel losses
When a medium changes from one with a certain refractive index ni to another with
When aone,
a different medium changes
a small amountfromofone with
light a certain at
is reflected refractive index of
each surface ni to
theanother
lenses.with This
aloss,
different one, a small amount of light is reflected at each surface of the lenses.
which is sometimes referred to as Fresnel reflection loss, increases as a result This of
loss,
the
which is sometimes
mismatch referred
between the toand
indices as Fresnel reflection
the incidence loss,
angle. increases
The asfraction
refracted a resultofofthe
thelight
mis-is
match between the
then calculated indices
using and the
Equation (11).incidence angle. The refracted fraction of the light is
then calculated using Equation (11).
Pout = Pin e−αL (11)
P =P e (11)
wherenni iand
where andnnt tstand
standfor
forthe
the incident
incident and transmission
transmission media’s
media srespective
respectiverefractive
refractiveindices.
indi-
In the proposed system, the reflection losses are computed for each surface
ces. In the proposed system, the reflection losses are computed for each surface between between two
materials. With 3.87% for both the surface air-plano surface and the convex
two materials. With 3.87% for both the surface air-plano surface and the convex surface- surface-air, the
overall loss in the SOE is 3.87%, whereas the total loss in the POE is 7.74%.
air, the overall loss in the SOE is 3.87%, whereas the total loss in the POE is 7.74%. The The overall loss
from reflections
overall loss from in the micro-concentrator
reflections system is 11.61%,
in the micro-concentrator systemhypothetically.
is 11.61%, hypothetically.
•• Losses
Lossesdue
duetotoAbsorption
Absorptionand andReflectivity
Reflectivity
Either
Eitherlenses
lenses(which
(whicharearecompletely
completelytransparent)
transparent)orormirrors
mirrorsmake
makeup upoptical
opticalsystems.
systems.
InInboth
bothsituations,
situations,aaportion
portionofofthe
thelight
lightisisabsorbed
absorbedby
bythethesubstance.
substance.InInthe
thecase
caseofoflenses,
lenses,
the
theBeer–Lambert
Beer–Lambertlaw lawisisused
usedtotocalculate
calculatethe theabsorption
absorptionlosses.
losses.
Theabsorption
The absorptioncoefficient
coefficientand
andthetheray
raypath
pathlength
lengthinside
insidethe
thelens,
lens,or,
or,totoput
putititanother
another
way,the
way, thelens
lens thickness,
thickness, both increase
increaseabsorption.
absorption.TheThemanufacturer
manufacturerprovides
provides the absorption
the absorp-
tion coefficient, which is wavelength dependent. Then, using the PMMA absorption
Computation 2023, 11, x FOR PEER REVIEW 10 of 20
Computation 2023, 11, 78 10 of 19

coefficients (=0.0097 mm−1), Beer–Lambert s law is used to determine the absorption losses.
coefficient, which is wavelength dependent. Then, using the PMMA absorption coefficients
The total of these losses in the 100X micro-concentrator is 1.56%. Therefore, the overall
(=0.0097 mm−1 ), Beer–Lambert’s law is used to determine the absorption losses. The total
loss for the micro-concentrator is 13.17%.
of these losses in the 100× micro-concentrator is 1.56%. Therefore, the overall loss for the
• micro-concentrator
Mechanical losses is 13.17%.
• InMechanical losses losses, managing components precisely with placement in the
addition to optical
micro range also becomes more crucial, especially in micro-contractor modules in which
In addition
the dimensions aretoreduced.
optical losses,
Althoughmanaging components
maintaining precisely accuracy
this positioning with placement
duringin the
op-
micro range also becomes more crucial, especially in micro-contractor modules
eration is necessary because the location can change due to environmental factors such as in which the
dimensions are reduced. Although maintaining this positioning accuracy
thermal expansion, it is also important during assembly [23]. The mechanical construction during operation
is necessary
must put limitsbecause
on thisthe locationincan
variation thechange due tosenvironmental
concentrator parts. This is afactors suchtoasthe
reference thermal
me-
chanical tolerance, which states that even if the module is distorted, the cell must stillmust
expansion, it is also important during assembly [23]. The mechanical construction be
putto
able limits on this
absorb variation
sunlight. Thisinsection
the concentrator’s
will focus onparts. This is athe
calculating reference to thetolerances
mechanical mechanical
tolerance,
that which
this method statesusing
allows, that even if the module
the system componentis distorted, the cell must still be able to
manufacturer.
absorb sunlight. This section will focus on calculating the mechanical tolerances that this
method
2.5. allows,
Simulation using
of Cell the system
to SOE component manufacturer.
Tolerances
2.5.Ray-tracing
Simulation ofsimulations
Cell to SOEwere run to determine how accurate the mechanical assem-
Tolerances
bly of Ray-tracing
the concentrator components
simulations were run was. Through the
to determine howanalysis
accurateofthethemechanical
angular tilts and
assembly
shifts ofconcentrator
of the the POE, thecomponents
mechanical tolerances
was. Through werethecarried outoffor
analysis both
the the cell
angular tiltsand
andSOE. Inof
shifts
this initial simulation, the POE and SOE stayed fixed, while the cell position and
the POE, the mechanical tolerances were carried out for both the cell and SOE. In this initial incidence
angle varied laterally.
simulation, the POE Figure
and SOE 6 shows
stayedthe fluctuation
fixed, of the
while the cellflux received
position andby the cell as
incidence it
angle
shifts in relation to the incident angle. The findings indicate that even when
varied laterally. Figure 6 shows the fluctuation of the flux received by the cell as it shifts the cell is
moved up toto0.8
in relation themm, the acceptance
incident angle. Theangle
findingsstays the same.
indicate thatHowever,
even whenwhen theisshift
the cell movedis
greater
up to than 0.8 mm,
0.8 mm, the optical angle
the acceptance efficiency
staysand theacceptance angle decline.
same. However, when the Whenshiftmanufac-
is greater
turing themm,
than 0.8 system, our technology
the optical efficiencywill
and provide
acceptancearound
angle0.4 mm of
decline. tolerance
When around the
manufacturing the
cell s center.
system, our technology will provide around 0.4 mm of tolerance around the cell’s center.

Figure
Figure 6. 6. Solar
Solar cell
cell shift
shift vs.vs. incidence
incidence angle.
angle.

Using the system component manufacturer, sunlight was simulated at angles from 0 to
Using the system component manufacturer, sunlight was simulated at angles from 0
5 in steps of 0.5. Figure 5 shows the correlation between optical efficiency and sun direction.
to 5 in steps of 0.5. Figure 5 shows the correlation between optical efficiency and sun di-
As the sun rises in a different direction, the optical efficiency somewhat decreases. This is
rection. As the sun rises in a different direction, the optical efficiency somewhat decreases.
due to Fresnel reflection losses, which take place at the points when light crosses across
This is due to Fresnel reflection losses, which take place at the points when light crosses
regions with various refractive indices. As a result, the loss depends on both the difference
across regions with various refractive indices. As a result, the loss depends on both the
in refractive index and the angle at which the light is incident. Fresnel losses occur in
Computation 2023, 11, x FOR PEER REVIEW 11 of 20

Computation 2023, 11, 78 11 of 19

difference in refractive index and the angle at which the light is incident. Fresnel losses
occur in this arrangement on the surface of the solar cells, in the area between the concen-
this arrangement
trator onand
and receiver, the on
surface of the solar
the reception cells,Itinisthe
surface. area between
feasible to lower thethe Fresnel
concentrator
loss at
and
the receiver, andofon
intersection thethe reception surface.
concentrator It is feasible
and receiver to less thanto lower thefilling
0.1% by Fresnel loss at
it with the
index-
intersection of the concentrator and receiver to less than 0.1% by filling
matched gel. The additional system loss caused by shading solar cells and the electrical it with index-
matched gel. between
connections The additional
them issystem lossto
calculated caused by shading
be roughly solar6cells
3%. Figure shows and thethe
how electrical
system
connections between them is calculated to be roughly
was able to achieve an optical efficiency of, on average, 80%. 3%. Figure 6 shows how the system
was able to achieve an optical efficiency of, on average, 80%.
2.6. Discussion
2.6. Discussion
The evaluation of the solar system s performance lasted three days, for 10 h, from 8
The evaluation of the solar system’s performance lasted three days, for 10 h, from
a.m. to 6 p.m. Both current and light intensity may be detected by the sensors. Using data
8 a.m. to 6 p.m. Both current and light intensity may be detected by the sensors. Using data
on voltage and current, the Watt unit s power is calculated using the formula P = VI. The
on voltage and current, the Watt unit’s power is calculated using the formula P = VI. The
temperature of the panel and the amount of light are also measured in order to determine
temperature of the panel and the amount of light are also measured in order to determine
the environment s contribution to the overall amount of electricity produced. Figure 7 dis-
the environment’s contribution to the overall amount of electricity produced. Figure 7
play data for power vs. light intensity. The three-day average power was at its peak be-
display data for power vs. light intensity. The three-day average power was at its peak
tween 11:00 and 14:00, at 830 Watts. A gain in power may be caused by an increase in solar
between 11:00 and 14:00, at 830 Watts. A gain in power may be caused by an increase
inirradiation or the amount
solar irradiation of sunlight
or the amount power density
of sunlight powerattained
density in a givenin
attained place (measured
a given place
in W/m 2). It is possible to access the CPV panel monitoring system and the CPV monitor
2
(measured in W/m ). It is possible to access the CPV panel monitoring system and the CPV
application
monitor described
application in this work.
described in thisBoth methods
work. present present
Both methods the same information.
the same information.

Figure7.7.Micro-CPV
Figure Micro-CPVperformance
performancesystem
systemresult
resultofofpower
powerversus
versuslight
lightintensity.
intensity.

The
Themain
mainobstacle
obstacletotoCPVs
CPVsbeing
beingmore
morewidely
widelyadopted
adoptedisisthe
thelack
lackofofaasystem
systemthat
thatisis
both affordable and effective. A CPV system must be manufactured utilizing
both affordable and effective. A CPV system must be manufactured utilizing a low-cost a low-cost
technique,
technique,as aswas
wasmentioned
mentionedininthe theintroduction,
introduction,ininorder
ordertotobe
becompetitive.
competitive.They Theymust
must
therefore
therefore be produced utilizing plastic materials. The lens array can be molded, sincesince
be produced utilizing plastic materials. The lens array can be molded, plas-
plastic
tic cancan be used,
be used, making
making mass mass production
production affordable.
affordable. Reduced
Reduced production,
production, supplier
supplier man-
management,
agement, and and recycling
recycling expenses
expenses will
will all all result
result from reduced
from reduced materialmaterial use.
use. In the In the
proposed
proposed
system s design, MPPA is the only material used for both the concentrator and thethe
system’s design, MPPA is the only material used for both the concentrator and re-
receiver. Whencompared
ceiver. When compared to to standard
standard Fresnel-based
Fresnel-based CPV
CPV systems,
systems, the
the system
systemhas hasaalower
lower
concentration ratio (Cgeo = 100), which is between 300 and 1000. However, the lower unit
concentration ratio (Cgeo = 100), which is between 300 and 1000. However, the lower unit
cost of solar cell production ensures that the cost of the system remains acceptable despite
cost of solar cell production ensures that the cost of the system remains acceptable despite
this comparative cost increase for additional solar cells. On the other hand, conventional
this comparative cost increase for additional solar cells. On the other hand, conventional
designs call for extremely high-quality optics and sun-tracking systems due to their high
designs call for extremely high-quality optics and sun-tracking systems due to their high
concentration ratio. Additionally, optical components must be very closely aligned with
concentration ratio. Additionally, optical components must be very closely aligned with
one another, and this alignment can be easily lost when operating outdoors [26,27]. In
one another, and this alignment can be easily lost when operating outdoors [26,27]. In
high-concentration systems, heat is another issue that requires additional money to sanitize.
Conventional systems’ extremely condensed and irregular light profile at the focused
Computation 2023, 11, 78 12 of 19

area necessitates a complex and loss-heavy optical system for light redistribution, which
reduces efficiency and raises costs. The proposed design has a lower concentration ratio,
which reduces the severity of the heat issue. Rooftop installations are made simple by the
proposed micro-CPV system’s simplicity in terms of design, weight, operating concept, and
price. Micro-CPV’s adoption for rooftop installation will satisfy the ostensibly enormous
market need [28]. In order to design a micro-CPV system suitable for residential roofs,
the goal of the current research is to make a brief comparison between the system and
widely used solar panels. The majority of photovoltaic panels use multi-junction solar cells,
which have an electrical conversion efficiency of 18–20%. The monocrystalline silicon solar
cells in the proposed system have an efficiency of 34%; after accounting for optical losses
of roughly 11%, the system efficiency is about 32%. The suggested micro-CPV system is
significantly more affordable to create than regular or more traditional flat-panel systems,
since each cell uses significantly less semiconductor material than typical solar cells. This
also makes the system more ecologically friendly. Direct normal illuminance (DNI) and
horizontal diffuse luminance are the two parts of sunlight (DHI). The suggested micro-CPV
system is unable to collect diffuse irradiation, similar to most concentrating systems.
In residential locations, energy is mostly used and consumed for heating water, lights,
air conditioning, refrigerators, and other appliances. In Morocco, it has been predicted that
only a modest amount of energy is used during business hours, which are between 8:00 and
17:00. However, peak demand occurs primarily at night when everyone congregates for
activities such as eating, watching television, and other activities. Yet, their power rating
falls under the category of domestic appliances, with Table 2 displaying the typical power
rating of household items. Then, in our case, the consumption of a house needs a power of
11 KW daily (Table 2). Each unit of the system produces 830 W; thus, we need 14 units. As
a surface, then, the system occupies 5.88 cm2 .

Table 2. Power rating for typical household items.

Item Quantity Power (W)


Television 2 200.00
Air conditioner 2 600
WiFi modem 1 10
Cable TV setup box 1 25
Refrigerator 1 150
Water heater 1 1000
Microwave 1 600
Dispenser 1 600
Dishwasher 1 1200
LED light bulbs 10 10
Washing machine 1 1000
Vacuum cleaner 1 200
Electric iron 1 400
Rice cooker 1 400
Toaster 1 600
Laptop 2 50
Printer 1 20
Scanner 1 20
Desktop computer 1 100
Mobile phone charger 3 3
Water pump 1 400
Electric saver 1 15
Lawn mower 1 1000
Food 1 300
Hair dryer 1 400
Coffee maker 1 600
Electric saver 1 15
Lawn mower 1 1000
Food 1 300
Hair dryer 1 400
Computation 2023, 11, 78 13 of 19
Coffee maker 1 600

The consumption of this obtained electricity needs an effective monitoring system.


The consumption
The Internet of this
of Things opens a obtained electricity
way to solve needs an
this problem by effective monitoring
interconnecting system.
hardware,
The Internet
software of Things
and the opens a way
cloud. Therefore, we to solve this
propose problem
a power by interconnecting
consumption monitoringhardware,
system
insoftware and the
the following cloud. Therefore, we propose a power consumption monitoring system in
part.
the following part.
3. Photovoltaic Monitoring Proposed IoT Based System
3. Photovoltaic Monitoring Proposed IoT Based System
Figure 8 depicts a schematic diagram of the proposed energy consumption monitor-
Figure 8 depicts a schematic diagram of the proposed energy consumption monitoring
ing system created for a typical smart house. The NodeMCU microcontroller portion, the
system created for a typical smart house. The NodeMCU microcontroller portion, the
sensor PZEM-004T device, the web application running on a computer or smartphone,
sensor PZEM-004T device, the web application running on a computer or smartphone,
and many electronic appliances make up the system. The electrical appliances serve as the
and many electronic appliances make up the system. The electrical appliances serve as
electrical loads that will be observed and actually measured to determine how much
the electrical loads that will be observed and actually measured to determine how much
power they use over the course of a specific observation period. The sensor measures the
power they use over the course of a specific observation period. The sensor measures the
load s electrical power consumption, and the microcontroller receives the value it reads.
load’s electrical power consumption, and the microcontroller receives the value it reads.
The data are transmitted to the microcontroller, where they are processed before being
The data are transmitted to the microcontroller, where they are processed before being sent
sent via the internet to the webserver. Following receipt by the webserver, the data are
via the internet to the webserver. Following receipt by the webserver, the data are kept in a
kept in a database that can be accessed or checked by a web application unit.
database that can be accessed or checked by a web application unit.

Figure 8. The proposed electrical power consumption monitoring system for a typical smart house is
Figure 8. The proposed electrical power consumption monitoring system for a typical smart house
is shown
shown in
inthe
thefollowing
followingschematic
schematicpicture.
picture.

The ESP8266 module’s micro USB connector is directly attached to each component,
The ESP8266 module s micro USB connector is directly attached to each component,
which uses a 5V voltage supply produced by the adapter. Figure 9 details the voltage
which uses a 5V voltage supply produced by the adapter. Figure 9 details the voltage
supply circuit. It includes a transformer, a diode, an electrolyte capacitor, and an IC7805
supply circuit. It includes a transformer, a diode, an electrolyte capacitor, and an IC7805
component. While Figure 10 shows the current consumption monitoring system’s circuit
component. While Figure 10 shows the current consumption monitoring system s circuit
connection layout. The NodeMCU microcontroller’s sophisticated capabilities are utilized
connection layout. The NodeMCU microcontroller s sophisticated capabilities are utilized
by the current flow monitoring component to establish a connection with the internet
by the current flow monitoring component to establish a connection with the internet be-
because the controller is WiFi-equipped. It is possible to establish an advanced connection
cause
to thethe controller
selected webisserver
WiFi-equipped.
componentItthrough
is possible to establish
the proper an advanced
programming connection
of the controller,
towhich
the selected
enables the correct setup and configuration. The PZEM-004T sensor iscontroller,
web server component through the proper programming of the the type of
which
sensor enables
used tothe correctcurrent
monitor setup and configuration. The PZEM-004T sensor is the type of
consumption.
sensor used to monitor current consumption.
Computation 2023, 11, x FOR PEER REVIEW 14 of 20

Computation 2023, 11, x FOR PEER REVIEW 14 of 20


Computation 2023, 11, 78 14 of 19

Figure 9. Electrical circuit.

Figure
Figure 9. Electrical circuit.
9. Electrical circuit.

Figure 10. The current consumption monitoring system’s circuit connection layout.

The PZEM-004T module’s features include


Figure 10. The current consumption monitoring system s circuit connection layout.
1. The amount of electricity consumed;
2.The A
Figure serial
10. The interface
PZEM-004T current withs afeatures
consumption
module 9600monitoring
bps UART;
include system s circuit connection layout.
3. The 5 V supply voltage;
1. The amount of electricity consumed;
4. The An LCD or LED module
PZEM-004T screen may be connected.
s features include
2. A serial interface with a 9600 bps UART;
3. 1.TheThe 5 V amount
following
supply of electricity consumed; module parameters specifications taken from
are the PZEM-004T
voltage;
the
2. datasheet:
A serial interface with
4. An LCD or LED screen may be connected. a 9600 bps UART;
3. The
1.The 80–260 5 V
following supply
VAC arefor voltage;
working
the PZEM-004T voltage;module parameters specifications taken from the
4.
2.
datasheet: An LCD
80–260 VACor LED
for screen
testing; may be connected.
3. The Power rating: 100
following A/2PZEM-004T
are the 2000 W; module parameters specifications taken from the
1. 80–260 VAC for working voltage;
4. An
datasheet: operating range of 45 to 65 Hz.;
2. 80–260 VAC for testing;
5. 80–260
An accuracy of measurement of 1.0
3. 1.Power VAC
rating: 100for A/2working
2000 W;voltage;
The
4. 2.An operating software
80–260 VAC comprises
of 45 to 65 Hz.;server utilizing the PHP programming language, the
for testing;
range a web
5. sublime
3.An accuracy
Power editor ofapplication,
rating: 100 A/2 2000
measurement andofW;the
1.0ESP 8266 NodeMCU module using the Arduino IDE
application.
4. An operating Figurerange 11 graphically
of 45 to 65illustrates
Hz.; the computational algorithms of the entire
The software comprises a web server utilizing the PHP programming language, the
electrical
5. An accuracypower consumption
of measurement monitoring
of 8266 system
1.0 NodeMCU (as shown in Figure 9) that are coded at
sublime
both editor application,
the sensor and the
node terminal ESP
and the server part. Themodule using thewill
microcontroller Arduino IDE
next establish
application.The Figure
software 11 comprises
graphically a web serverthe
illustrates utilizing the PHP programming
computational algorithms of language,
the entire the
connections to the web server and Wi-Fi that were configured during the system setup
sublime editor
electrical application,monitoring
and the ESP 8266 NodeMCU inmodule using the ArduinoatIDE
stage. power consumption
The microcontroller system
will keep scanning (as shown
until Figure
it ultimately 9) thatto
connects are
thecoded
web server
application.
bothif the Figure 11 graphically illustrates the computational algorithms of the entire
it is not yet connected to the web server. The microcontroller first establishes establish
sensor node terminal and the server part. The microcontroller will next a connection
electricalto
connections power
the consumption
web server and monitoring
Wi-Fi thatsystem
were (as shown in
configured Figure 9) system
during that are coded at
with the web server, and after that, it sends the data to the web server,the
which thensetup
receives
both
stage. the sensor
The stores
microcontrollernode terminal and
will keepEsp the
scanning server part.
until The microcontroller
it ultimately will
connects to the webnextserver
establish
it and it in the database. separates from the web server.
if itconnections
is not yet to the web server
connected to the and webWi-Fi thatThe
server. were configured during
microcontroller first the system setup
establishes a
stage. The microcontroller will keep scanning until it ultimately connects to the web server
if it is not yet connected to the web server. The microcontroller first establishes a
Computation 2023, 11, x FOR PEER REVIEW 15 of

Computation 2023, 11, 78 15 of 19


connection with the web server, and after that, it sends the data to the web server, whic
then receives it and stores it in the database. Esp separates from the web server.

Figure 11. Flowchart


Figure 11.system.
Flowchart system.
These PHP files are part of the Sublime Text design software: connection.php, in-
These PHP files are part of the Sublime Text design software: connection.php, i
dex.php, reset.php, ACS712.cpp, and get10lastdata.php. The WebServer and NodeMCU
dex.php, reset.php, ACS712.cpp, and get10lastdata.php. The WebServer and NodeMC
ESP8266 hardware are connected through the connection.php layer. Any information
ESP8266 hardware are connected through the connection.php layer. Any information r
retrieved from the PZEM- 004T current sensor will be shown graphically on the website.
This layer trieved from the
in index.php PZEM- 004Tfor
is responsible current sensor
designing thewill be shown
website’s graphically
front and back on the websit
ends.
To calibrate the data displayed on the website, Reset.php serves as a reset button. The ends. T
This layer in index.php is responsible for designing the website s front and back
calibratefunction
get10lastdata.php the data on displayed
the websiteon the website,
displays the mostReset.php serves
recent 10 data fromas the
a reset
currentbutton. Th
get10lastdata.php function
sensor reading in graphical formats. on the website displays the most recent 10 data from the cu
Whilerent sensor reading
a website is being in graphical formats.
developed, the XAMPP application program serves as a
While a website
local server to manage various kinds is beingofdeveloped, the XAMPP
website data. In actualapplication
usage, theprogram serves as a loc
term “offline
website” refers to a website that is not connected to the internet and uses XAMPP to website
server to manage various kinds of website data. In actual usage, the term “offline
refers to a website
test the functionality of featuresthat or
is not
showconnected to theSimilar
information. internettoand
webuses XAMPP
hosting, to test the fun
XAMPP
tionality
operates offline. of features or show information. Similar to web hosting, XAMPP operates offlin

4. Experimental
4. Experimental Tests Tests
Threescenarios
Three different different were
scenarios
usedwere used
in this in this
study’s studytesting,
system s system testing,
which which involve
involved
documenting documenting
the currentthe
andcurrent
powerand power
usage usage
of the of the appropriate
appropriate electronic electronic
items that items
were that we
installed and used atand
installed home.
usedThe light bulb,
at home. The rice
lightcooker, and cooker,
bulb, rice dispenser
andmake up themake
dispenser load of
up the loa
electrical appliances.
of electricalThe following
appliances. steps
The are described
following fordescribed
steps are whole system testing.
for whole system testing.
1. 1. each
Placing Placing each component
component in its proper in its proper place;
place;
2. Connecting the ESP 8266 controller module tomodule
2. Connecting the ESP 8266 controller a 5 V DCtopower
a 5 V DC power source;
source;
3. 3. Attaching
Attaching a voltage
a voltage source source
to the load;to the load;
4. 4. Connecting
Connecting the laptopthe laptop
to the to thenetwork
internet internetand
network and
the ESP themodule;
8266 ESP 8266 module;
5. Launching a browser;a browser;
5. Launching
6. Clicking
6. the buttonthe
Clicking to upload
button to theupload
image the
to the website.
image to the website.
From Figures 12–14, the outcomes of the suggested electric current consumption
monitoring system are displayed. With a reference voltage of 220 volts, the loads being
used include a 40 watt light bulb, a 350 watt rice cooker, and a 395 watt dispenser.
Computation 2023, 11, x FOR PEER REVIEW 16 of 20
Computation 2023, 11, x FOR PEER REVIEW 16 of 20

From
From Figures
Figures 12–14,
12–14, the
the outcomes ofofthe suggested electric current consumption
Fromsystem
monitoring Figuresare
12–14, theoutcomes
displayed.outcomes
With a ofthe
thesuggested
referencesuggested
voltage
electric
electric
of 220
current
current
volts, the
consumption
consumption
loads being
Computation 2023, 11, 78 monitoring
monitoring system
system are
are displayed.
displayed. With
With aareference
referencevoltage
voltage ofof220
220volts,
volts,the
theloads being
loads16
being
of 19
used
usedinclude
includea 40
a watt
40 light
watt bulb,
light a
bulb, 350
a watt
350 watt rice
ricecooker,
cooker,and
anda a395
395watt
wattdispenser.
dispenser.
used include a 40 watt light bulb, a 350 watt rice cooker, and a 395 watt dispenser.

Figure 12. The outcome of measuring the load on light bulbs.


Figure
Figure 12.
Figure 12.The
12. The outcome
The outcomeofofmeasuring
outcome of measuring the
measuring theload
the load on
load onlight
on light bulbs.
bulbs.
light bulbs.

Figure
Figure13.
13.The
Theoutcome
outcomeofof
measuring the
measuring load
the loadon
ona aarice
ricecooker.
cooker.
Figure
Figure13.
13.The
Theoutcome
outcomeofofmeasuring
measuringthe
theload
loadon
on aricericecooker.
cooker.

Figure14.
Figure The
14.The outcome
outcome ofof measuring
measuring dispenserload.
dispenser load.
Figure
Figure14.
14.The
Theoutcome
outcomeofofmeasuring
measuringdispenser
dispenserload.
load.
Figure1212displays
Figure displays thefindings
findingsfrom
froma a6060min
minmeasurement
measurementofofthe theelectric
electriccurrent
current
Figure
Figure1212 displaysthe the findings from
fromameter
a6060min measurement ofofthe
theelectric current
consumption
consumption ofofa displays
alight
lightbulbthe
bulb findings
using
using anampere
an ampere min
meter measurement
and
and sensor.The
sensor. Theaverage
average electric
reading
reading current
from
from
consumption
consumption
the ofofaalight
ampere meter light
is bulb
0.16bulbusing
amps,usingan
anampere
whereasampere meter
meterand
the average andsensor.
sensor.
reading The average
Thethe
from average
sensorreading
reading from
from
is 0.2 amps.
The used light bulb’s theoretical electric current value is 0.18 A. The sensor is 0.5% and the
ampere meter’s measuring inaccuracy is 22%.
Computation 2023, 11, x FOR PEER REVIEW 17 of 20

the ampere meter is 0.16 amps, whereas the average reading from the sensor is 0.2 amps.
Computation 2023, 11, 78 17 of 19
The used light bulb s theoretical electric current value is 0.18 A. The sensor is 0.5% and the
ampere meter s measuring inaccuracy is 22%.
The ampere meter is 1.48 A, while the average reading from the sensor is 1.78 A. The
The bulb
used light amperehasmeter is 1.48 A,
a theoretical while current
electric the average reading
value of 1.79from the sensor
A. The sensor is
is 01.78
andA.the
The
used light bulb has a theoretical electric
measuring inaccuracy of the ampere meter is 16%. current value of 1.79 A. The sensor is 0 and the
measuring inaccuracy of the ampere meter is 16%.
Figure 14 displays the findings of a 60 min measurement of the dispenser s electric
currentFigure
usage14 displays
using the findings
an ampere of a 60
meter and min measurement
sensor. of the dispenser’s
The average reading electric
from the ampere
current usage using an ampere meter and sensor. The average reading from
meter is 1.37 A, while the average reading from the sensor is 1.593 A. The sensor is 0.6% the ampere
meter
and is 1.37 A,
the ampere while
meter the average
measuring reading
error from the sensor is 1.593 A. The sensor is 0.6%
is 13%.
and the ampere meter measuring error is 13%.
Based on these findings, the PZEM-004T sensor s ability to detect electric current con-
Based on these findings, the PZEM-004T sensor’s ability to detect electric current
sumption has an accuracy rate of more than 90%, making the results of monitoring energy
consumption has an accuracy rate of more than 90%, making the results of monitoring
consumption more comparable to those of measurements made using a power meter.
energy consumption more comparable to those of measurements made using a power meter.
Lamps, rice cookers, and dispensers are just a few examples of the electrical equip-
Lamps, rice cookers, and dispensers are just a few examples of the electrical equipment
ment whose power usage is shown in Figure 15. The findings of the test, which was run
whose power usage is shown in Figure 15. The findings of the test, which was run for
for 60 min, indicated that the energy consumption of a light bulb was close to 0.41 kWh.
60 min, indicated that the energy consumption of a light bulb was close to 0.41 kWh. In the
In the meantime, the energy usage of the dispenser is 0.779 kWh, while that of the rice
meantime, the energy usage of the dispenser is 0.779 kWh, while that of the rice cooker is
cooker is 0.389 kWh.
0.389 kWh.

Figure
Figure 15.15. Power
Power consumption
consumption results.
results.

Based
Based onon Figure
Figure 12,12,
thethe PZEM-004T
PZEM-004T sensor’s
sensor reading
s reading ofof the
the load
load represented
represented byby the
the
light bulb yielded an average error percentage of 0.5%. By boiling water that is placed inin
light bulb yielded an average error percentage of 0.5%. By boiling water that is placed
the
the rice
rice cooker’s
cooker container,
s container, the
the load
load ofof the
the rice
rice cooker
cooker is is measured.
measured. The
The rice
rice cooker
cooker load’s
load s
measurement error for current is 0.7%. In contrast, it can be observed in Figure
measurement error for current is 0.7%. In contrast, it can be observed in Figure 14 that the 14 that
the current
current value value
reads reads
0 A from0 A the
from theto10th
10th the to theminute,
30th 30th minute,
and fromandthe
from theto45th
45th to the
the 60th
60th minute. This is because the dispenser stops heating at that precise moment, using no
minute. This is because the dispenser stops heating at that precise moment, using no elec-
electrical load. This measurement has a 0.6% margin of error.
trical load. This measurement has a 0.6% margin of error.
5. Conclusions
5. Conclusions
In order to lower the price of the receiver assembly and increase long-term durability, a
In order to lowersystem
micro-concentrator the price of the
based onreceiver
a ball lensassembly and increase
as a secondary opticallong-term
element isdurability,
introduced
a micro-concentrator system based on a ball lens as a secondary
and examined in this technique. A concentrator with a geometrical concentration optical element is intro-
ratio of
duced and examined in this technique. A concentrator with a geometrical
100, a PMMA Fresnel lens as the primary optical element, and a ball lens as the secondary concentration
ratio of 100,
optical a PMMA
element was Fresnel lens of
the subject as theoretical
the primaryanalysis
optical element, and a ball The
and investigation. lens module
as the
secondary optical element was the subject of theoretical analysis and investigation.
described in this work is small, optically efficient, and has a uniform flux distribution The
module described in this work is small, optically efficient, and has a uniform
across the cell surface. Our device has a simulated acceptance angle of 1.5 and an optical ◦ flux distri-
bution across
efficiency ofthe cell surface.
roughly 83%. TheOur mechanical
device has atolerances
simulated were
acceptance angle of
also carried out1.5°
in and
orderanto
optical
retainefficiency
the ideal of roughly
optical 83%. The
alignment mechanical
between tolerances
the solar were
cells and thealso carried
optics due out in order
to the system
todimensions
retain the ideal optical
and solar cell alignment
being reduced between the solar cellsThe
to sub-millimeters. andproposed
the optics due to
system the
accepts
about 6% of flux losses for a 0.6 degree angle error between the POE, SOE, and optical axis
and a 0.1 mm lateral shift.
Computation 2023, 11, 78 18 of 19

To control and monitor the electricity generated, this study created and presented
an intelligent monitoring and control system for home appliances based on the Internet
of Things. The approach and procedures were devised with the intention of offering an
important and useful answer for a monitoring and control system. The proposed system
was more effective in measuring and keeping track of current, voltage, and power usage.
In fact, the PZEM-004T sensor’s proposed design took into account the hardware choices
for the WiFi module, current sensors, and 5 V relays. Wherever the data are kept in the
cloud database, they are also monitored in real time and over time. Customers may more
easily observe real-time consumption rates thanks to the monitoring system. The control
system for the PZEM-004T sensor can ensure safety, monitor home appliances individually
or collectively, and raise awareness of electricity use.
Future research will monitor voltage and current on a bigger scale in the context of
smart homes.

Author Contributions: Methodology, S.E.H. and M.O. (Mariyam Ouaissa); Software, S.E.H., M.O.
(Mariyam Ouaissa) and M.O. (Mariya Ouaissa); Formal analysis, S.E.H., M.O. (Mariyam Ouaissa) and
M.K.; Writing—original draft, S.E.H., M.A. (Mohannad Alswailim) and M.A. (Mutiq Almutiq); Project
administration, S.E.H., M.O. (Mariyam Ouaissa), M.O. (Mariya Ouaissa), M.K., M.A.
(Mohannad Alswailim) and M.A. (Mutiq Almutiq); Funding acquisition, M.A. (Mohannad Alswailim)
and M.A. (Mutiq Almutiq). All authors have read and agreed to the published version of the manuscript.
Funding: This research received no external funding.
Data Availability Statement: Data available on request.
Acknowledgments: The researchers would like to thank the Deanship of Scientific Research, Qassim
University for funding the publication of this project.
Conflicts of Interest: The authors declare no conflict of interest.

Nomenclature

a Exit radius of the SO MCPV Micro-concentrated photovoltaic


AC Alternating current n1 Index of the entrance medium
Ain Entrance aperture area n2 Index of the exit medium
Aout Exit or receiver area LTE Long term evolution
C Whole concentration ratio Pin Power at the entrance of the system
Cgeo Geometric concentration ratio Pout Power at the exit of the system
Copt Optical concentration ratio PMMA Poly methyl methacrylate
Ain Entrance aperture area r0 Solar angle
CPV Concentrated photovoltaic SO Secondary optic
d Fresnel lens diameter PQ power quality
f Focal length of Fresnel lens θin Entrance angle
FL Fresnel lens η Optical efficiency
h Length of the SO θout Exit angle
iot Internet of things α The incidence and refraction angles
β Function of the angle of the prism

References
1. Sabnis, V.; Yuen, H.; Wiemer, M. High-efficiency multijunction solar cells employing dilute nitrides. AIP Conf. Proc. 2012, 1477,
14–19. [CrossRef]
2. Van Leest, R.H.; Fuhrmann, D.; Frey, A.; Meusel, M.; Siefer, G.; Reichmuth, S.K. Recent progress of multi-junction solar cell
development for CPV applications at AZUR SPACE. AIP Conf. Proc. 2019, 2149, 020007. [CrossRef]
3. Geisz, J.F.; Steiner, M.A.; Schulte, K.L.; Young, M.; France, R.M.; Friedman, D.J. Six-junction concentrator solar cells. AIP Conf.
Proc. 2018, 2012, 040004. [CrossRef]
4. Steiner, M.; Siefer, G.; Schmidt, T.; Wiesenfarth, M.; Dimroth, F.; Bett, A.W. 43% Sunlight to Electricity Conversion Efficiency
Using CPV. IEEE J. Photovolt. 2016, 6, 1020–1024. [CrossRef]
5. Araki, K.; Algora, C.; Siefer, G.; Nishioka, K.; Leutz, R.; Carter, S.; Wang, S.; Askins, S.; Ji, L.; Kelly, G. Standardization of the CPV
technology in 2019—The path to new CPV technologies. AIP Conf. Proc. 2019, 2149, 090001.
Computation 2023, 11, 78 19 of 19

6. Nakagawa, T.; Hayashi, N.; Inoue, D.; Matsumoto, M.; Matsushita, A.; Higuchi, H.; Nagata, T.; Ishino, M.; Inoue, K.; Futakuchi,
R.; et al. High-efficiency Thin and Compact Concentrator Photovoltaics with Micro-solar Cells Directly Attached to Lens Array.
Opt. Sol. Energy 2014, 23, RF4B.5. [CrossRef]
7. EL Ayane, S.; El Himer, S.; El-Yahyaoui, S.; Ahaitouf, A. Performance Analysis of a Two Stage Micro Photovoltaic Concentra-
tor. In Proceedings of the 2019 7th International Renewable and Sustainable Energy Conference (IRSEC), Agadir, Morocco,
27–30 November 2019; pp. 3–8. [CrossRef]
8. El Ayane, S.; El Himer, S.; El Yahayaoui, S.; Ahaitouf, A. Optimal design of a two-stage micro concentrator for photovoltaic.
In Proceedings of the 37th Edition of the European Photovoltaic Solar Energy Conference and Exhibition (EU PVSEC), Online,
7–11 September 2020; pp. 1669–1673.
9. El Himer, S.; El Ayane, S.; El Yahyaoui, S.; Salvestrini, J.P.; Ahaitouf, A. Photovoltaic concentration: Research and development.
Energies 2020, 13, 5721. [CrossRef]
10. Victoria, M.; Domínguez, C.; Antón, I.; Sala, G. Comparative analysis of different secondary optical elements for aspheric primary
lenses. Opt. Express 2009, 17, 6487–6492. [CrossRef] [PubMed]
11. Price, J.S.; Grede, A.J.; Wang, B.; Lipski, M.V.; Fisher, B.; Lee, K.-T.; He, J.; Brulo, G.S.; Ma, X.; Burroughs, S.; et al. High-
concentration planar microtracking photovoltaic system exceeding 30% efficiency. Nat. Energy 2017, 2, 17113. [CrossRef]
12. Fidaner, O.; Suarez, F.A.; Wiemer, M.; Sabnis, V.A.; Asano, T.; Itou, A.; Inoue, D.; Hayashi, N.; Arase, H.; Matsushita, A.; et al.
High efficiency micro solar cells integrated with lens array. Appl. Phys. Lett. 2014, 104, 103902. [CrossRef]
13. Al-Ali, A.; Zualkernan, I.A.; Rashid, M.; Gupta, R.; Alikarar, M. A smart home energy management system using IoT and big
data analytics approach. IEEE Trans. Consum. Electron. 2017, 63, 426–434. [CrossRef]
14. Chacko, S.T.; Deshmukh, V. IoT based Online Power Consumption Monitoring of a Distribution transformer feeding Domes-
tic/Commercial Consumer loads. In Proceedings of the 2019 4th International Conference on Information Systems and Computer
Networks (ISCON), Mathura, India, 21–22 November 2019.
15. Joshi, S.; Kiran, V. Design and Development of Power Monitoring System using IoT Technology. Int. J. Adv. Sci. Technol. 2020, 29,
8128–8138.
16. Ramschie, A.; Makal, J.; Ponggawa, V. Sistem Pengontrolan Kerja Peralatan Penyejuk Udara Berbasis IoT. In Proceedings of the
Prosiding 11th Industrial Research Workshop and National Seminar (IRWNS), Manado, Indonesia, 26–27 August 2020; Volume 11,
No. 1. pp. 14–19. (In English: IoT Based Electrical Power Consumption Monitoring System for Air Conditioner Equipment)
17. Pangestu, A.D.; Ardianto, F.; Alfaresi, B. Sistem Monitoring Beban Listrik Berbasis Arduino NODEMCU ESP8266. J. Ampere 2019,
4, 187–197. [CrossRef]
18. Mudjiono, U.; Subekti, A.; Adianto, A. Pembuatan monitoring dan Audit Energi Untuk Efisiensi Pemakaian Energi Listrik di
UPT.PP Politeknik Perkapalan Negeri Surabaya. Semin. Master 2019, 187–194.
19. Ramschie, A.; Makal, J. Modeling of Energy- Saving Mode Systems on Air Conditioning Equipment. In Proceedings of the 2018
IEEE International Conference on Applied Science and Technology (ICAST), Chiba, Japan, 13–17 April 2018; pp. 492–497.
20. Despa, D.; Nama, G.F.; Muhammad, M.A.; Anwar, K. The Implementation Internet of Things (IoT) Technology in Real Time
Monitoring of Electrical Quantities. In Proceedings of the IOP Conference Series: Materials Science and Engineering, Bangkok,
Thailand, 24–26 February 2018; Volume 335, p. 012063.
21. Chooruang, K.; Meekul, K. Design of an IoT Energy Monitoring System. In Proceedings of the 2018 16th IEEE International
Conference on ICT and Knowledge Engineering (ICT&KE), Bangkok, Thailand, 21–23 November 2018; pp. 1–4.
22. Kiran, S.; Khattak, H.A.; Butt, H.I.; Ahmed, A. Towards Efficient Energy Monitoring Using IoT. In Proceedings of the 21st
International Multi Topic Conference, INMIC 2018, Karachi, Pakistan, 1–2 November 2018.
23. Houdi, S.; Auger, F.; Frétaud, P.; Fourer, D.; Miègeville, L.; Sethom, H.B.A. Design of an electricity consumption measurement
system for Non Intrusive Load Monitoring. In Proceedings of the 2019 10th International Renewable Energy Congress, IREC,
Sousse, Tunisia, 26–28 March 2019; pp. 1–6.
24. Nadhiroh, N.; Aji, A.D. Real-Time Monitoring of Power Quality for Web Based Electrical Power Panel Using LabVIEW. In
Proceedings of the ICECOS 2019-3rd International Conference on Electrical Engineering and Computer Science, Batam Island,
Indonesia, 2–3 October 2019.
25. Apostoleris, H.; Stefancich, M.; Chiesa, M. Tracking-integrated systems for concentrating photovoltaics. Nat. Energy 2016, 1,
16018. [CrossRef]
26. Rand, B.P.; Genoe, J.; Heremans, P.; Poortmans, J. Solar cell efficiency tables (version 37). Prog. Photovolt. Res. Appl. 2010, 15,
659–676. [CrossRef]
27. Vu, N.-H.; Shin, S. Cost-effective optical fiber daylighting system using modified compound parabolic concentrators. Sol. Energy
2016, 136, 145–152. [CrossRef]
28. Vu, N.; Shin, S. A Concentrator Photovoltaic System Based on a Combination of Prism-Compound Parabolic Concentrators.
Energies 2016, 9, 645. [CrossRef]

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual
author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to
people or property resulting from any ideas, methods, instructions or products referred to in the content.

You might also like