Next Article in Journal
Power–Packet Conversion Methods and Analysis of Scheduling Schemes for Wireless Power Transfer
Previous Article in Journal
From Machine Learning-Based to LLM-Enhanced: An Application-Focused Analysis of How Social IoT Benefits from LLMs
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Development of a Low-Cost Internet of Things Platform for Three-Phase Energy Monitoring in a University Campus

1
STRS Laboratory, National Institute of Posts and Telecommunications (INPT), Rabat 10112, Morocco
2
Moroccan foundation for Advanced Science, Innovation and Research (MAScIR), Ben Guerir 43150, Morocco
*
Authors to whom correspondence should be addressed.
Submission received: 7 March 2025 / Revised: 12 April 2025 / Accepted: 21 April 2025 / Published: 4 May 2025

Abstract

:
This article highlights the development of a platform for monitoring three-phase energy consumption within a university campus. The core of this platform is low-cost IoT energy sensors, which are designed to transmit real-time data to the data center’s server through different IoT communication technologies, enhancing the preexisting electrical measurement network. The newly recommended measurement structure enables the electrical consumption data collection required for analyzing patterns and proposing forecast models to optimize electricity usage. The major contribution of this work is the design and implementation of smart three-phase energy meters based on the selection of various energy sensors and wireless communication technologies, and then the set up of a global IoT architecture that offers real-time data acquisition, storage, download, and visualization, capitalizing on the campus’s diverse energy profiles for detailed characterization. The proposed platform is considered the cornerstone toward the implementation of a collaborative smart microgrid, allowing forecasting and electrical consumption optimization, enabling research into potential opportunities for energy efficiency in our campus, and enhancing the performance of existing electrical infrastructure.

1. Introduction

In the context of the fourth industrial revolution and sustainable development, the energy management system is evolving due to the development of smart grids and microgrids. Smart grids are modernized electrical networks that leverage advanced information and communications technology to ensure bidirectional flows of electricity and data, thereby improving efficiency, reliability, and the integration of renewable energy sources while reducing operating costs. Complementing this large-scale infrastructure, microgrids offer localized, autonomous energy systems capable of operating independently or with the main grid. This decentralized approach improves energy reliability and adaptability to local needs. The main distinction between smart grids and microgrids lies in their size: smart grids focus on large-scale optimization, while microgrids provide targeted and flexible solutions for specific, small-scale energy needs.
Moreover, as a result of its substantial capacity for creative solutions and its importance for the population, IoT technology is now commonly claimed to be one of the main cornerstones of the fourth industrial revolution [1], making it among the most crucial technological trends of the 21st century [2]. In fact, IoT has established a ubiquitous presence in our daily life [3], this technology can be defined as a network of connected computing devices or objects that can autonomously transfer data [4]. According to a Cisco report, it is estimated that 500 billion sensors integrated devices will be linked to the internet by 2030 [5]. By 2029, the IoT market is estimated to be worth USD 2465.26 billion [6].
Obviously, among the crucial sectors where the IoT can be applied are smart grids and microgrids. With the emergence of new challenges for more efficient management of the electricity supply–demand balance and communication cooperation for an improved monitoring and control network [7], the latest innovations in IoT technologies can contribute to building fully functional and modernized smart grids [8]. The integration of robust IoT architectures into the contemporary grid enables real-time monitoring and large data collection, which is beneficial for the development of real-time data analysis algorithms, useful for studying consumption patterns and building forecast control programs to improve energy consumption performance [9]. IoT monitoring structures are implemented by the use of sensors and networking architectures that allow the detection and transmission of information in real time [10], affording the collection of the needed energetic data.
In response to the growing need for efficient energy management, our goal is to propose a novel approach based on the development of a low-cost IoT platform leveraging strategically placed smart power meters within a university campus. This strategic placement is guided by the specific needs for targeted energy consumption patterns, facilitating the acquisition of granular energy consumption profiles and real-world data collection crucial for optimization and efficient energy management, with the long-term goal of installing a suitable smart microgrid.
Several studies have proposed low-cost IoT-based architectures for energy monitoring. In [11], a system was implemented based on the PZEM-004T sensor, utilizing Wi-Fi for communication and employing the MQTT protocol for data transmission. InfluxDB was used for data storage, and Grafana was integrated for data visualization. Also, in [12], the PZEM-004T is used, implementing ThingSpeak for visualization.
In [13], authors suggest a LoRa network-based architecture for energy monitoring, using SCT016S split core current transformer and Atmel M90E32AS power energy measurement chip, with data visualization through their custom web application. Ref. [14] also employed LoRa, adopting the ZMPT101B voltage sensor and the ACS712 current sensor, and implementing ThingSpeak and an Android dashboard application for data display. To provide a broader perspective, the authors of [15] surveyed wireless communication technologies for the smart grid, highlighting widely adopted technologies in smart grid monitoring, addressing various wireless communication protocols such as ZigBee, Bluetooth, and Wi-Fi. In [16], the authors investigated security vulnerabilities affecting smart grid environments, which raises awareness. Identified flaws, like the injection of false information, risk our gathered data being corrupted, compromising the reliability of the analytics results.
Building upon the valuable insights offered by approaches similar to [11,12,13,14] that highlight the importance of flexible and cost-effective energy monitoring solutions. Our work distinguishes itself by the strategic and effective utilization of the developed sensor network within the university campus, leveraging its unique variety of energy usage patterns. Our platform will allow us to collect data that closely reflect real-world consumption patterns, and these data can be a foundation for subsequent studies that can focus on load forecasting, anomaly detection, and other AI-driven analytics once a sufficient volume of data has been accumulated.
The goal of our project consists of setting up a green university campus in Morocco with high energy autonomy. This green campus at the INPT university will be based on a smart microgrid, an intelligent electrical network that should operate independently or be connected to the main electrical network. The microgrid not only transmits energy, but also data on consumption, production, and even storage if necessary [17].
In fact, a university campus can be considered an ideal facility where those types of solutions can be applied, as it contains a rare diversity of electrical consumption profiles such as residences, offices, classrooms, laboratories, libraries, cafeterias, public lighting, sports centers, etc. By combining this large variety of profiles in one location, it can be modulated as a mini-city offering overall community-pertinent results. The first step toward reaching the effectiveness of energy consumption is collecting electrical parameters information, which can be established by applying IoT technologies to replace the default old-fashioned electrical measurement platforms on a university campus. IoT monitoring and data collecting architectures are rooted in three elements: firstly, hardware consisting of communicating sensor nodes; secondly, middleware consisting of data storage; and thirdly, an interface with a convenient visualization tool [18].
The development and implementation of smart grid networks bring added value to the existing electricity system [17,19]. They can, first of all, enable energy consumption to be optimized thanks to precise knowledge of loads by means of communicating and intelligent sensors that detect and correct existing anomalies. They can also facilitate the integration and massive injection of renewable energy into electricity networks and ensure better management of the supply–demand balance.
In this paper, we will describe the foundation phase of this project, which focuses on the development and implementation of an IoT platform dedicated to energy efficiency monitoring and data acquisition. This platform enables the measurement of the energy consumed by the various INPT buildings and is structured into three main stages:
  • Sensors and data acquisition: We designed and implemented low-cost three-phase electrical energy meters adapted to the three-phase nature of the electrical network in our university campus; then, we strategically installed them across the INPT university campus buildings in order to track and gather electrical consumption data of different usage profiles, establishing the core of our IoT platform. This distribution of sensors will provide us with detailed energy profile usage data allowing us to understand and analyze their consumption patterns.
  • Protocols and communication: We integrated proper communication protocols and technologies in order to implement a transmission network infrastructure to ensure the data transfer from the sensors to the data center’s server. We implemented two communication technologies, Wi-Fi and LoRa, leading to the development of two main types of electrical meters in the previous sensors stage: Wi-Fi and LoRa-based ones.
  • Cloud, data storage and visualization: We propose a complete IoT architecture making us able to store the measured data in our cloud data center’s server database; also, we integrate user-friendly dashboard platforms to monitor electrical parameters through customized dashboards. Eventually, the database will be used for the detailed characterization and development of forecast models.
This study presents improvements over our previous works. In [20], we developed mono-phase electrical meters, and in [21], we proposed a hardware solution to handle transmission data loss of our Wi-Fi nodes due to the occasional sensitivity of Wi-Fi coverage within some locations in the campus.
The rest of the paper is structured as follows: Section 2 describes the university campus’s microgrid architecture. Section 3 presents the proposed IoT architecture containing the sensor node details, the communication network, and the outcome of our application. Section 4 depicts platform exploitation as a proof of concept in the form of results from some example data characterization. The conclusion and future work are presented in Section 5.

2. University Campus’s Microgrid Architecture

As this section is quoted from our previous research [20], in our architecture, illustrated in Figure 1, the data relating to the measurements of the various metrics of each PM1200 interrogated by the PLC are transmitted to the latter via an RS-485 serial link according to the ModBus RTU protocol. Using an Ethernet link, the information required at the PLC level is then escalated to the SCADA application server. The following three tasks are integral components of the SCADA:
  • Data storage within a database.
  • Visualization of pertinent information regarding component measurements and statuses via graphical representations.
  • Management of feedback from peripheral-triggered alarms (such as threshold crossings or failure detection).
The operation of the SCADA system essentially depends on two important parameters. The first one is the refresh period associated with the periodic transmission of requests allowing information to be collected from the PM1200 measurement units and, on the other hand, a request scheduler that groups the requests to emit.
The identification of the values of the two parameters allows us to understand the sequencing of the request–response messages between PLC and PM1200, to identify the messages circulating back and forth in the bus, and to extract the measurements from the various registers contained in the payloads of the type messages answer.
The methods of designing and implementing a management, supervision, and data acquisition (SCADA) system surely affect the operation of microgrid networks. Indeed, more flexible management of these networks will make it possible to make the growing share of renewable energy compatible with the conventional infrastructures of power stations.
The electrical energy consumption management system currently employed at the university campus serves as a concrete example of conventional SCADA software, which is initially isolated, self-contained, and proprietary. Consequently, it presents a variety of operational constraints and limitations, including the following:
  • Limited mobility.
  • Difficulties in remotely accessing the status of industrial installations.
  • Wired-only exchanges between the SCADA software and industrial devices (such as measuring units and PLCs).
  • Local SCADA supervision and information access (including data, status, and alerts).
  • Local data storage (resulting in a risk of data loss), the need for multiple locally based SCADA software systems at remote sites rather than a single.
  • Centralized system that can manage all aspects.
  • Permanent restrictions on the maintenance team’s ability to intervene remotely.
  • High installation costs.
  • Obsolescence of diverse and non-interoperable industrial information systems.
  • Lack of predictive analysis capabilities.
Since its acquisition in 2017, INPT’s SCADA system has demonstrated good functioning, reliability, and efficiency; however, new needs have been expressed by system managers in order to improve its functionalities, integrate new options, and reduce some of its limitations.
Today, IoT platforms, wireless and IP communications protocols, and artificial intelligence are emerging and trying to integrate with industrial systems. For that, the following would be beneficial:
  • Introducing IoT technology and wireless communication in the microgrid architecture within the university campus.
  • Consolidating the largest number of communication modes/protocols (Ethernet, LoRa, Wi-Fi, MQTT, etc.) on the same platform in order to guarantee compatibility between the different equipment (measurement units, PLCs, servers, etc.) in the network.
  • Connecting the SCADA system of an industrial nature to the Internet to enable it to benefit from its services; in this case, cloud computing, artificial intelligence, terminal mobility, and the concept of remote installation control.
  • Supervising the various university campus microgrid metrics online, analyzing the results, and receiving online alerts and notifications.
  • Collecting data from the measurement centers and extraction of load and electricity consumption curves in order to describe the energy behavior of different university campus buildings.
  • Developing energy consumption prediction algorithms specific to the existing installations.
  • Producing profiling analyses using machine learning techniques.

3. Proposed IoT Platform

As the concept of the IoT monitoring platform, the suggested architecture consists of four blocks illustrated in Figure 2. We will further detail our solutions in these blocks along this section.
Hardware: Creation of sensor nodes through the selection of micro-controllers and sensing devices as also designing PCB boards and their 3D shells.
Network and Cloud: implementing a transmission architecture allows us to successfully transmit the data measured by the sensors to the server’s database and then monitor them.

3.1. Hardware

Since the main foundation of our IoT monitoring structure is the sensor nodes, we were driven to select low-cost sensors and develop the node designs as in our previous works [20,21]. As the electrical network of our university campus is three-phase, we will introduce new sensor nodes with new proposed three-phase energy meters, unlike in our previous studies, where we implemented only one-phase ones. In addition to that, we will integrate new features on the sensor nodes in order to make them more visually interactive during their electrical installation and configuration. In this section, we will detail the Hardware structure of these newly suggested node models and their setup within the university campus.
However, there are also university campus locations missing Wi-Fi coverage yet offering some valuable energy data (such as underground areas, e.g., a laundry room). For that reason and validated by our own field tests, we implemented the LoRa network. LoRa selection was motivated by its less demanding infrastructure (no repeaters required) and robust capabilities in challenging environments. The adaptive data rate technique, particularly the spreading factor, ensures reliable transmission and offers high robustness. The long range of this type of network along with a LoRaWAN gateway that circulates the data to the data center’s server via an internet protocol allows us to monitor successfully in these locations. This new protocol integration is giving us additional knowledge with more IoT protocols, making us able to enhance our capabilities above our initial work with Wi-Fi [20,21].

3.1.1. Wi-Fi Nodes

Depending on the state of the electrical tables where we intend to install our electrical meters, we came up with the following two types of Wi-Fi sensor nodes.

ADL Wi-Fi Sensor Node

In our first type of node, we decided to work with the Acrel ADL400N-CT three-phase rail energy meter with the RS485 interface due to its cost-effectiveness and its clearly designed pleasing compact form, we also integrated the use of the BME680 environmental sensor in case we wanted to track the ambient conditions in the selected spots. The energy meter communicates with the chosen micro-controller the Wemos D1 mini Pro through an RS485/UART converter; on the other hand, the BME680 communicates with the Wemos directly via the I2C protocol.
In order to facilitate the configuration and the electrical installation of the node, we decided to make it more visually interactive by adding two indicative LEDs to the recommended design; the first one signals the Wi-Fi connection of the device and the other one signals its connection with the server. Also, we added a reset push button if we wanted to reconfigure the system so we do not need to cut the power from the source if we desired to do so.
In our previous work [21], we proposed a solution to limit data loss due to the occasional sensibility of Wi-Fi coverage in some locations within the university campus. This solution is based on adding a storage system to the node design so it can store the data whenever the communication with the server is failing and then send them after when it is successful. This storage system is composed of an SD card inserted in an adapter that communicates with the Wemos through SPI protocol making us able to store data in text files; in addition to that, it is also composed of the DS1307 RTC module that communicates with the main chip via I2C protocol, so we can store data with the suitable timing whatever the state of the internet connection.
By leveraging the long distance that the RS485 protocol can support, the ADL400N will be installed at the main entrance in the electric board of the chosen charges, and the rest of the wireless communication sensor node will be fixed outside so that the insulator electric box cannot disturb its connection with the Wi-Fi routers.
The design of the node and its method of installation are depicted in Figure 3 and its unit price is presented in Table 1. Thanks to EasyEDA [23], the free and user-friendly design software tool, we created the PCB of our node as well as its 3D holding case, as shown in Figure 4.

Triple PZEM Sensor Node

Given that some electric tables are already full, we cannot install the above-mentioned electrical meters since there is no rail space. For that, we created this second type of Wi-Fi node based on the flat PZEM-004T energy meters from our previous works [20,21] so we can fix the energy meters on the side of the electrical box. Considering that the PZEM-004T is a mono-phase electrical meter, we had to apply three of it at each sensor node. Thanks to the UART interface supported by this energy meter, it can communicate with the Wemos chip, and the rest of this node stays the same as the first one. Also, in this case, we benefited from the long distance that the UART protocol can support by fixing the triple PZEM-004T system inside the electrical box and the rest of the wireless communication sensor node outside.
The scheme of this node and its method of installation are shown in Figure 5 and its unit price is presented in Table 2. Besides the PCB of the node, in this case, we created another PCB to gather three PZEM-004T sensors with one UART output interface; we can see the assembled boards, as well as the shell of the node, in Figure 6.

3.1.2. ADL LoRa Sensor Node

In this node, we will work with the Heltec Wi-Fi LoRa 32 micro-controller, which communicates with the Acrel ADL400N-CT three-phase energy meter via an RS485/UART converter and with the BME680 directly through I2C protocol; also, in this case, the energy meter will be installed inside of the electric table and the rest of the wireless communication node will be fixed outside so that the insulator box does not disturb its communication with the LoRaWAN gateway.
The design of this node and its installation are illustrated in Figure 7 and its unit price is presented in Table 3. The created circuit board and its case are shown in Figure 8.

3.1.3. Sensor Nodes Placement

Figure 9 shows the architecture of the smart power meters installed on the INPT university campus, covering residences, various main buildings, and the administration. Nodes numbered 1 to 7 are placed at strategic locations to capture a variety of energy consumption profiles. For example, Node 1 is located in the laboratory rooms of the D Building. Noting that the residential locations within the campus are gender-separated, with distinct male and female residences, Node 3 is placed in the boys’ residence, and Node 4 in the girls’ residence, each one targeting different gender consumption habits. Each gender’s typical daily activities and appliance usage are reflected in the energy consumption patterns. Node 6 in the B building is placed in a section of classrooms to monitor consumption in teaching spaces; on the other hand, Node 7 is located in a school room and Node 2 is in the administration building to monitor consumption in office spaces. Node 5 is located in the underground laundry room of the boys’ residence, capturing consumption data from laundry equipment.
The two communication technologies LoRa and Wi-Fi are used to ensure the transmission of data collected by the sensors. Wi-Fi is used for the majority of nodes, those located in easily accessible and less distant areas, ensuring rapid and efficient communication. LoRa is used for some remote or difficult-to-access areas, such as the underground laundry room, due to its ability to cover long distances with minimal energy consumption. A LoRaWAN gateway is installed in the C Building to centralize LoRa communications, ensuring seamless data integration.
This technical configuration makes it possible to measure various energy consumption profiles, providing complete coverage and detailed data collection. By monitoring different aspects of energy consumption, this architecture helps to identify the possible areas of optimization, leading to more efficient and sustainable management of energy within the establishment. The combined use of Wi-Fi and LoRa technologies makes it possible to take advantage of each technology, thus ensuring the accumulated reliability and accuracy of the studied data.

3.2. Cloud and Network

After creating the sensor nodes, our new mission was to provide a successful tunnel of communication from the sensors to the server and the monitoring tool. For that reason, in [20], we worked on creating an IoT communication architecture; then, we made improvements to it as we will see in this section.

3.2.1. Transmission

To transmit data from Wi-Fi nodes to the data center’s server, an IoT message protocol was required. For that, we decided to choose between MQTT, CoAP, and HTTP, which are frequently used in similar IoT applications.
Being the foundation of the web, HTTP is based on a request–response model. CoAP is a more lightweight alternative and optimized for constrained environments. Unlike those two protocols that require point-to-point communication, thanks to its data-centric design that prioritizes data, MQTT with its publish–subscribe model provides significant advantages in our energy monitoring use case. Our energy sensor nodes can publish data on determined topics and the distant client can receive it by subscribing to those topics through a broker. This data decoupling enables flexible distribution and scalable growth of the sensor nodes. Thanks to its data-centric nature, MQTT is a well-suited choice for our IoT energy monitoring system, allowing for efficient data acquisition. Accordingly, we anticipated this protocol to be implemented in our network structure by implementing the popular open source Mosquitto broker [24], and we also developed a Python script-based subscriber that receives the data and can store it in the database afterward.
For our LoRa devices, we needed a network server to manage the gateway and the devices. In our LoRa infrastructure, self-hosting was a critical requirement, for that we chose the open source ChirpStack [25] LoRaWAN server. ChirpStack’s self-hosting capability provides greater data privacy, which was a key factor in our decision. Furthermore, its reach feature set handles device and gateway management, data integration, and network security. LoRa devices send data to the gateway, which is connected to ChirpStack via the UDP packet forwarder protocol.

3.2.2. Data Storage

After establishing a transmission strategy to obtain the measured data from the sensors up to the server, this time, we need to choose and set up a database in the server to store our data and process it flexibly.
Since our IoT sensor network transmits continuous data, a time series database with its capacity to handle high-volume writes meets our needs for real-time visualization, durable data storage, and real-time analytics. In addition to that, time series databases are optimized for efficient aggregation enabling anomaly identification; also, they offer specialized query languages for temporal analytics. For those reasons and considering alternatives time series databases are an optimal choice. Table 4 illustrates the most popular time series database management systems sourced from the DB-engines [26] website.
In the range of choices, InfluxDB [27] is efficient through its high ingestion rate and relevant flux query language facilitating real-time analytics, as well as the built-in retention policies for long-term data storage. According to these features, we decided to implement InfluxDB as the core database of our communication architecture.

3.2.3. Monitoring

After receiving the data and storing them in our database, our next mission is to monitor this data by including a dashboard interface in our structure. For that, we decided to choose the Grafana [28] dashboarding tool because it is integrated with the InfluxDB database which simplifies data accessibility for visualization. Furthermore, Grafana provides modern customizable dashboards and various graph styles enabling informative and effective monitoring. Along with the self-host capacity, which is one of our key requirements, it also contains a built-in management structure that allows us to create and manage accounts for team members and project guests, giving us the ability to control and administrate our visualization platform. Therefore, the high flexibility of Grafana as an open source tool makes it a preferred choice as our monitoring tool.
To further improve the utility of the gathered data, we developed a custom user-friendly desktop application with Tkinter Python library specifically for the analytics team members. This application allows them to download data in various formats adapted to their described needs. The highlight of this application is offering the ability to load data with customized column separators (delimiters), choosing between tabs, semicolons, or other selections ensuring an oriented integration for their preferred analytical methods, so that the shape of the downloaded data can be reliable for their analysis, saving valuable time and manual effort. Taking note that Grafana also offers data download service, we developed this application as mentioned assorting to the analytics team’s description need. The main interface of the application is shown in Figure 10. As InfluxDB is optimized for time series data from IoT devices, we decided to work with the MySQL [29] database to handle this application’s tasks like user account management.

3.2.4. Cloud and Network Set Up

To simplify deployment and ensure consistency across environments, all the selected tools are installed in Docker [30] containers within our data center’s server. Thanks to this recommended architecture, as depicted in Figure 11, we achieved an effective and active flow from our sensor nodes up to the server and the dashboarding tool, as we can see in Figure 12, as well as to our latest feature in this platform, the data downloader application.

4. Use Case: Energy Profiling

After setting up the new energy monitoring platform, our next objective is to exploit the extracted data from this platform for processing and analysis. In this section, we focus on the results provided by the new IoT platform to demonstrate the level of detail that can be obtained through data processing based on the raw measurements collected by our smart metering platform. These data profiles are essential for understanding consumption behaviors and identifying patterns that can be leveraged in future work—particularly for energy forecasting and optimization strategies.
To achieve this, we followed these steps:
  • Data acquisition: This involves collecting data from the data storage center by logging into the data downloader application.
  • Data classification: This analysis involved isolating data based on keeping the electrical power parameter. This approach mirrors one of the functionalities of our existing data downloader application, which provides the option to download power parameter data, alongside the option to download the dataset with all the available parameters, as we can see in Figure 10. By the way, the application can be easily designed to be modifiable to support the exclusive selection of any parameter as can be dictated by the analytics team.
  • Data analysis and validation: This involves analyzing the data by considering the following key points:
    • Analyzing the average electrical distributions.
    • Performing statistical analysis.
    • Detecting electrical correlations.
    • Grouping data with similar patterns.
    • Establishing inputs for the prediction models.
    • Analyzing user habits to justify the distribution of consumption.
The rest of this section is intended for the characterization of the data captured from Node 5 energy sensor (laundry room) by presenting in detail the power distributions, and statistical measurements, followed by an analysis of the energy profile to justify the power demand of the laundry room.

4.1. Data Characterization

This segment provides a detailed characterization of the time series data by examining the trends in average power per hour of the day and per day of the week, derived from measured power data, as illustrated in Figure 13.
The electrical power analysis of the staff-operated INPT laundry room, containing three to four industrial large machines (washing machines and dryers), reveals the average power per day of the week showing that the consumption is highest on Tuesday, closely followed by Monday. Wednesday shows a notable drop in consumption, then it rises slightly on Thursday before steadily decreasing from Friday to Sunday, when consumption is almost zero.
The analysis of the average power by hour of the INPT laundry room reveals that there is no consumption from midnight to 8 a.m. and from 4 p.m. to midnight. Consumption begins to increase from 8 a.m. and reaches a maximum peak at 11 a.m. Following that, the consumption begins to decrease gradually, suggesting a reduction in machine use, until it reaches zero again at 4 p.m. This pattern indicates that the use of machines is concentrated mainly between 8 a.m. and 4 p.m., with maximum intensity around the end of the morning.

4.2. Position Settings

The electrical power statistics of the campus laundry reveal a notably varied distribution of power use. With a mean of 0.51 kW and a median of 0.005 kW, extreme values such as the maximum of 15.79 kW indicate peaks in usage or periods of intensive demand. The high standard deviation of 2.15 kW indicates significant variability in power demand. Power statistics are summarized in Table 5, while their evolution by time of the day and by day of the week is illustrated in Figure 14.

4.3. Energy Profile

The electrical analysis of the the staff-operated INPT laundry room shows that the consumption is highest at the beginning of the week; then, it exhibits a declining trend toward the end of the week approaching zero consumption. With staff unavailable on Sundays and likely limited on Saturday evenings, these patterns indicate more intensive machine usage at the beginning of the week probably to process the substantial laundry accumulated during the weekend, followed by a decrease in use as the week continues. On an hourly basis, consumption starts to increase from 8 a.m., which probably corresponds to the start of the daily activities, and peaks at 11 a.m.; this peak indicates that this is the time when the machines are most in demand, possibly due to the concentration of washing and drying cycles at this time. After that, the consumption gradually decreases, reaching zero at 4 p.m., which can correspond to the end of the day’s activities. This pattern suggests the intensive use of machines during working hours, in accordance with staff presence times and the maximum needs of the establishment in terms of washing and drying the laundry. The statistics analysis reveals a mean of 0.51 kW, a median of 0.005 kW, and a standard deviation of 2.15 kW, with a maximum of 15.79 kW. These numbers indicate consumptions with peaks of intense use, reflecting the periods of high activity alternating with the periods of non-use of the machines confirming the previous power demand justifications.
These analyses are part of a broader research direction and serve as a foundation for predictive modeling and intelligent energy management in upcoming studies, with a particular focus on the importance of profiling for more accurate forecasting.

5. Conclusions and Future Work

In this paper, we have designed and developed an IoT platform to monitor three-phase electrical consumption within a university campus, in response to the growing need for efficient energy management. Firstly, we have developed and implemented low-cost three-phase energy meters adapted to the nature of the electrical network on our university campus. Secondly, we have deployed distributed smart meter nodes using different wireless technologies, especially Wi-Fi and LoRa. Finally, we have set up a complete IoT architecture that enables data storage in a private data center and real-time monitoring through a customized dashboard. The primary accomplishment of this work was the efficient use of the deployed sensor nodes, making use of the distinct range of energy usage patterns to collect targeted energy consumption data for analysis. The collected data were also used to propose and calibrate suitable prediction models [31,32].
In this work, we have considered the case of a university campus as an ideal microgrid environment because it contains a rare diversity of electrical consumption profiles, including residences, offices, classrooms, laboratories, libraries, cafeterias, public lighting, and more. By combining this wide variety of profiles in a single location, it can be modeled as a mini-city. We have successfully deployed the foundation for this microgrid network, but we still have several points to address in further studies, particularly the characterization of the optimal renewable energy supply to deploy and also the aspect of cybersecurity, which remains fundamental in acknowledging the importance of secure data communication in energy management systems for safeguarding the confidentiality and the integrity of sensitive data including energy usage patterns.

Author Contributions

Methodology, A.R. and F.A.; Project administration, A.T. and H.D.; Software, A.R. and F.A.; Supervision, R.B., Y.B.M. and H.D.; Writing—original draft, A.R. and F.A.; Writing—review & editing, A.R. All authors have read and agreed to the published version of the manuscript.

Funding

This work is a part of the “IoTUCM” University project (DAAP/Green INNO-PROJET 2018/IoTUCM) that is financed by the Research Institute for Solar Energy and New Energies (IRESEN).

Data Availability Statement

The dataset presented in this article is not readily available because the data are part of an ongoing study. Requests to access the dataset should be directed to H.D.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
IoTInternet of Things
LoRaLong range
LoRaWANLong range wireless area network
CTCurrent transformer
RS485Recommended standard 485
UARTUniversal asynchronous receiver/transmitter
I2CInter-integrated circuit
LEDLight emitting diode
SDSecure digital
SPISerial peripheral interface
RTCReal-time clock
3DThree-dimensional
PCBPrinted circuit board
ACAlternating current
DCDirect current
MQTTMessage queuing telemetry transport
CoAPConstrained application protocol
HTTPHypertext transfer protocol
kWKilowatt
IoTUCMIoT-based university campus microgrid in an African context

References

  1. Nižetić, S.; Šolić, P.; Gonzalez-De, D.L.D.I.; Patrono, L. Internet of Things (IoT): Opportunities, issues and challenges towards a smart and sustainable future. J. Clean. Prod. 2020, 274, 122877. [Google Scholar] [CrossRef] [PubMed]
  2. Mazhar, T.; Irfan, H.M.; Haq, I.; Ullah, I.; Ashraf, M.; Shloul, T.A.; Ghadi, Y.Y.; Imran; Elkamchouchi, D.H. Analysis of challenges and solutions of IoT in smart grids using AI and machine learning techniques: A review. Electronics 2023, 12, 242. [Google Scholar] [CrossRef]
  3. De Santis, A.; Ferrara, A.L.; Flores, M.; Masucci, B. Continuous Entity Authentication in the Internet of Things Scenario. Appl. Sci. 2023, 13, 5945. [Google Scholar] [CrossRef]
  4. Ashton, K. That ‘internet of things’ thing. RFID J. 2009, 22, 97–114. [Google Scholar]
  5. Aman, A.H.M.; Yadegaridehkordi, E.; Attarbashi, Z.S.; Hassan, R.; Park, Y.J. A survey on trend and classification of internet of things reviews. IEEE Access 2020, 8, 111763–111782. [Google Scholar] [CrossRef]
  6. Moreira, F.T.; Vairinhos, M.; Ramos, F. Teachers’ perceptions about IoT technologies in school activities. Educ. Media Int. 2024, 61, 184–197. [Google Scholar] [CrossRef]
  7. Abir, S.A.A.; Anwar, A.; Choi, J.; Kayes, A.S.M. Iot-enabled smart energy grid: Applications and challenges. IEEE Access 2021, 9, 50961–50981. [Google Scholar] [CrossRef]
  8. Pau, M.; Patti, E.; Barbierato, L.; Estebsari, A.; Pons, E.; Ponci, F.; Monti, A. A cloud-based smart metering infrastructure for distribution grid services and automation. Sustain. Energy Grids Netw. 2018, 15, 14–25. [Google Scholar] [CrossRef]
  9. Hossein Motlagh, N.; Mohammad-Rezaei, M.; Hunt, J.; Zakeri, B. Internet of Things (IoT) and the energy sector. Energies 2020, 13, 494. [Google Scholar] [CrossRef]
  10. Sadeeq, M.A.; Zeebaree, S. Energy management for internet of things via distributed systems. Energies 2021, 2, 80–92. [Google Scholar] [CrossRef]
  11. Chooruang, K.; Meekul, K. Design of an IoT energy monitoring system. In Proceedings of the International Conference on ICT and Knowledge Engineering (ICT&KE), Bangkok, Thailand, 21–23 November 2018; pp. 1–4. [Google Scholar]
  12. Sonasang, S. Applications of energy monitoring using the IoT. Creat. Sci. 2022, 14, 245041. [Google Scholar]
  13. Guevara, N.E.; Bolaños, Y.H.; Diago, J.P.; Segura, J.M. Development of a low-cost IoT system based on LoRaWAN for monitoring variables related to electrical energy consumption in low voltage networks. HardwareX 2022, 12, e00330. [Google Scholar] [CrossRef] [PubMed]
  14. Ramelan, A.; Adriyanto, F.; Hermanu, B.A.C.; Ibrahim, M.H.; Saputro, J.S.; Setiawan, O. IoT based building energy monitoring and controlling system using LoRa modulation and MQTT protocol. IOP Conf. Ser. Mater. Sci. Eng. 2021, 1096, 012069. [Google Scholar] [CrossRef]
  15. Rodriguez, J.C.; Grijalva, F.; García, M.; Chérrez Barragán, D.E.; Acuña Acurio, B.A.; Carvajal, H. Wireless communication technologies for smart grid distribution networks. Eng. Proc. 2023, 47, 7. [Google Scholar] [CrossRef]
  16. Aloul, F.; Al-Ali, A.R.; Al-Dalky, R.; Al-Mardini, M.; El-Hajj, W. Smart grid security: Threats, vulnerabilities and solutions. Int. J. Smart Grid Clean Energy 2012, 1, 1–6. [Google Scholar] [CrossRef]
  17. Abdo-Allah, A.; Iqbal, M.T.; Pope, K. Energy consumption analysis of a large building at memorial university. J. Energy 2019, 2019, 5243737. [Google Scholar] [CrossRef]
  18. Shafique, K.; Khawaja, B.A.; Sabir, F.; Qazi, S.; Mustaqim, M. Internet of things (IoT) for next-generation smart systems: A review of current challenges, future trends and prospects for emerging 5G-IoT scenarios. IEEE Access 2020, 8, 23022–23040. [Google Scholar] [CrossRef]
  19. Dar-Mousa, R.N.; Makhamreh, Z. Analysis of the pattern of energy consumptions and its impact on urban environmental sustainability in Jordan: Amman City as a case study. Energy Sustain. Soc. 2019, 9, 15. [Google Scholar] [CrossRef]
  20. Rhesri, A.; Bennani, R.; Ben Maissa, Y.; Hajjaji, I.; Tamtaoui, A.; Dahmouni, H. Development of a low-cost Internet of Things architecture for energy and environment monitoring in a University Campus. In Proceedings of the International Conference on Future Internet of Things and Cloud (FiCloud), Marrakesh, Morocco, 14–16 August 2023; pp. 181–185. [Google Scholar]
  21. Rhesri, A.; Bennani, R.; Hajjaji, I.; Ben Maissa, Y.; Tamtaoui, A.; Dahmouni, H. Hardwarely Handling Transmission Data Loss in a Low-Cost WiFi IoT Architecture for Energy and Environment Monitoring in a University Campus. In Proceedings of the International Conference on Innovative Research in Applied Science, Engineering and Technology (IRASET), Fez, Morocco, 16–17 May 2024; pp. 1–5. [Google Scholar]
  22. Hajjaji, I.; El Alami, H.; El-Fenni, M.R.; Dahmouni, H. Evaluation of artificial intelligence algorithms for predicting power consumption in university campus microgrid. In Proceedings of the International Wireless Communications and Mobile Computing (IWCMC), Harbin, China, 28 June–2 July 2021; pp. 2121–2126. [Google Scholar]
  23. Easyeda PCB Design Software. Available online: https://easyeda.com (accessed on 24 February 2025).
  24. Eclipse Mosquitto MQTT Broker. Available online: https://mosquitto.org (accessed on 24 February 2025).
  25. ChirpStack, Open-Source LoRaWAN Network Server. Available online: https://www.chirpstack.io (accessed on 2 March 2025).
  26. DB-Engines: Knowledge Base of Relational and NoSQL Database Management Systems. Available online: https://db-engines.com (accessed on 24 February 2025).
  27. InfluxDB Times Series Data Platform. Available online: https://docs.influxdata.com (accessed on 24 February 2025).
  28. Grafana Open Observably Platform. Available online: https://grafana.com (accessed on 24 February 2025).
  29. MySQL Relational Database Management System. Available online: https://dev.mysql.com (accessed on 24 February 2025).
  30. Docker: Accelerated, Containerized Application Development. Available online: https://docs.docker.com (accessed on 24 February 2025).
  31. Aabadi, F.; Ben Maissa, Y.; Dahmouni, H.; Tamtaoui, A.; El Aroussi, M. Forecasting electrical power consumption based on a hybrid PSO-XGBoost Model. In Proceedings of the International Conference on Advances in Data-Driven Analytics And Intelligent Systems (ADACIS), Marrakesh, Morocco, 23–25 November 2023; pp. 1–6. [Google Scholar]
  32. Aabadi, F.; Ben Maissa, Y.; Dahmouni, H.; Tamtaoui, A.; El Aroussi, M. Machine Learning algotithms for Electric Load Forecasting in a Moroccan Academic Campus. In Proceedings of the International Conference on Advanced Technologies for Humanity (ICATH), Rabat, Morocco, 24 December 2023–25 July 2024. [Google Scholar]
Figure 1. Architecture of INPT’s microgrid system [22].
Figure 1. Architecture of INPT’s microgrid system [22].
Iot 06 00027 g001
Figure 2. IoT platform main blocks.
Figure 2. IoT platform main blocks.
Iot 06 00027 g002
Figure 3. ADL Wi-Fi sensor node.
Figure 3. ADL Wi-Fi sensor node.
Iot 06 00027 g003
Figure 4. (a) Wi-Fi RS485 node circuit. (b) Wi-Fi RS485 node shell.
Figure 4. (a) Wi-Fi RS485 node circuit. (b) Wi-Fi RS485 node shell.
Iot 06 00027 g004
Figure 5. Triple PZEM Wi-Fi node.
Figure 5. Triple PZEM Wi-Fi node.
Iot 06 00027 g005
Figure 6. (a) Wi-Fi UART node circuit. (b) Triple PZEM board. (c) Wi-Fi UART node shell.
Figure 6. (a) Wi-Fi UART node circuit. (b) Triple PZEM board. (c) Wi-Fi UART node shell.
Iot 06 00027 g006
Figure 7. ADL LoRa node.
Figure 7. ADL LoRa node.
Iot 06 00027 g007
Figure 8. (a) LoRa RS485 node circuit. (b) LoRa RS485 node shell.
Figure 8. (a) LoRa RS485 node circuit. (b) LoRa RS485 node shell.
Iot 06 00027 g008
Figure 9. Sensors architecture network.
Figure 9. Sensors architecture network.
Iot 06 00027 g009
Figure 10. Data downloader application’s main interface.
Figure 10. Data downloader application’s main interface.
Iot 06 00027 g010
Figure 11. IoT communication architecture.
Figure 11. IoT communication architecture.
Iot 06 00027 g011
Figure 12. Visualization of a three-phase energy meter in the Grafana dashboard (Triple PZEM Sensor Node example).
Figure 12. Visualization of a three-phase energy meter in the Grafana dashboard (Triple PZEM Sensor Node example).
Iot 06 00027 g012
Figure 13. (a) Power as a function of time—laundry room. (b) Average power per day of the week—laundry room. (c) Average power per hour of the day—laundry room.
Figure 13. (a) Power as a function of time—laundry room. (b) Average power per day of the week—laundry room. (c) Average power per hour of the day—laundry room.
Iot 06 00027 g013
Figure 14. (a) Power statistics by time of the day—laundry room. (b) Power statistics by day of the week—laundry room.
Figure 14. (a) Power statistics by time of the day—laundry room. (b) Power statistics by day of the week—laundry room.
Iot 06 00027 g014
Table 1. ADL Wi-Fi sensor node standard price.
Table 1. ADL Wi-Fi sensor node standard price.
ComponentStandard Price ($)
Wemos D1 mini pro with Wi-Fi antenna3
Acrel ADL400N-CT 3-phase55
BME6805
DS1307 RTC module with battery1
micro SD card adapter with SD card5
AC/DC converter (HiLink)2
LEDs2 * (0.02)
Resistances3 * (0.07)
Capacitor0.3
Push Button0.1
Screw wire terminals2 * (0.14)
PCB0.72
3D shellN/A
Total72.65
Table 2. Triple PZEM Wi-Fi sensor node standard price.
Table 2. Triple PZEM Wi-Fi sensor node standard price.
ComponentStandard Price ($)
Wemos D1 mini pro with Wi-Fi antenna3
PZEM-004T (V3.0)3 * (10)
BME6805
DS1307 RTC module with battery1
micro SD card adapter with SD card5
AC/DC converter (HiLink)2
LEDs2 * (0.02)
Resistances3 * (0.07)
Capacitor0.3
Push Button0.1
Screw wire terminals5 * (0.14)
PCB1 (node board)0.72
PCB2 (Triple PZEM board)1.46
3D shellN/A
Total49.53
Table 3. ADL LoRa sensor node standard price.
Table 3. ADL LoRa sensor node standard price.
ComponentStandard Price ($)
Heltec V319
Acrel ADL400N-CT 3-phase55
BME6805
AC/DC converter (HiLink)2
Resistance0.07
Capacitor0.3
Push Button0.1
Screw wire terminals2 * (0.14)
PCB0.36
3D shellN/A
Total82.11
Table 4. Time series databases popularity ranking sourced from DB-engines.
Table 4. Time series databases popularity ranking sourced from DB-engines.
Rank (February 2025)Database Management System
1InfluxDB
2Kdb
3Prometheus
4Graphite
5TimescaleDB
Table 5. Summary statistics of the data in kW.
Table 5. Summary statistics of the data in kW.
Average power0.51
Median power0.005
Standard deviation of power2.15
Minimum power0.004
Maximum power15.79
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.

Share and Cite

MDPI and ACS Style

Rhesri, A.; Aabadi, F.; Bennani, R.; Ben Maissa, Y.; Tamtaoui, A.; Dahmouni, H. Development of a Low-Cost Internet of Things Platform for Three-Phase Energy Monitoring in a University Campus. IoT 2025, 6, 27. https://doi.org/10.3390/iot6020027

AMA Style

Rhesri A, Aabadi F, Bennani R, Ben Maissa Y, Tamtaoui A, Dahmouni H. Development of a Low-Cost Internet of Things Platform for Three-Phase Energy Monitoring in a University Campus. IoT. 2025; 6(2):27. https://doi.org/10.3390/iot6020027

Chicago/Turabian Style

Rhesri, Abdessamad, Fatima Aabadi, Rachid Bennani, Yann Ben Maissa, Ahmed Tamtaoui, and Hamza Dahmouni. 2025. "Development of a Low-Cost Internet of Things Platform for Three-Phase Energy Monitoring in a University Campus" IoT 6, no. 2: 27. https://doi.org/10.3390/iot6020027

APA Style

Rhesri, A., Aabadi, F., Bennani, R., Ben Maissa, Y., Tamtaoui, A., & Dahmouni, H. (2025). Development of a Low-Cost Internet of Things Platform for Three-Phase Energy Monitoring in a University Campus. IoT, 6(2), 27. https://doi.org/10.3390/iot6020027

Article Metrics

Back to TopTop