Development and Application of an Open Power Meter Suitable for NILM

: In the context of the global energy sector’s increasing reliance on fossil fuels and escalating environmental concerns, there is an urgent need for advancements in energy monitoring and optimization. Addressing this challenge, the present study introduces the Open Multi Power Meter, a novel open hardware solution designed for efficient and precise electrical measurements. This device is engineered around a single microcontroller architecture, featuring a comprehensive suite of measurement modules interconnected via an RS485 bus, which ensures high accuracy and scalability. A significant aspect of this development is the integration with the Non-Intrusive Load Monitoring Toolkit, which utilizes advanced algorithms for energy disaggregation, including Combinatorial Optimization and the Finite Hidden Markov Model. Comparative analyses were performed using public datasets alongside commercial and open hardware monitors to validate the design and capabilities of this device. These studies demonstrate the device’s notable effectiveness, characterized by its simplicity, flexibility, and adaptability in various energy monitoring scenarios. The introduction of this cost-effective and scalable tool marks a contribution to the field of energy research, enhancing energy efficiency practices. This research provides a practical solution for energy management and opens advancements in the field, highlighting its potential impact on academic research and real-world applications.


Introduction and Literature Review
Efficient and accurate electrical consumption monitoring has never been more critical in the evolving energy management and sustainability landscape [1].As the world grapples with the challenges posed by its dependence on fossil fuels and the pressing need to transition towards more sustainable energy sources, innovations in energy monitoring technologies have emerged as a critical area of focus [2].Energy monitoring is also considered a crucial component of the upcoming smart power grid infrastructure [3] since integrating widely fluctuating distributed generation sources presents a challenge to the stability of power generation and distribution networks [4].
A simple approach to gauging the power usage of separate devices in a home is by employing smart appliances that track their energy consumption.Nevertheless, this strategy is complicated and expensive [5].Alternatively, Non-intrusive Load Monitoring (NILM) [6] offers a more practical and cost-effective means to estimate the energy consumption of individual devices.NILM has emerged as a crucial approach in this domain, leveraging advanced computational capabilities to estimate individual electrical device consumption using a single smart meter sensor [7].In the literature, there are various categories of methods used in NILM.These categories can be grouped into four main categories:

•
Methods of optimization: these methods use optimization techniques to conduct load disaggregation.Examples of these methods are Vector Support Machines (SVMs) [8], Bird Swarm Algorithms (BSAs) [9], Genetic Algorithms [10], and Particle Swarm Optimization (PSO) [11], among others; • Supervised methods: these methods use tagged training datasets where individual exposures are known.Some examples of supervised methods are Bayesian [12], Vector Support Machines (SVM) [13], the algorithm of Discriminative Disaggregation Sparse Coding (DDSC) [14], and Artificial Neural Networks (ANN) [15], as well as their extensions; • Unsupervised methods: use clustering techniques and statistical models for pattern recognition and load segmentation.Examples of unsupervised methods include Combinatorial Optimization (CO) [16], Hidden Markov Models (HMM) and their extensions, such as the FHMM (Factorial Hidden Markov Model) [17]; Other approaches: in addition to the above categories, other approaches and techniques are used in NILM.Especially interesting is the processing of transient active power responses, measured when powered on and sampled at 100 Hz [18], so that using three stages (adaptive threshold event detection, convolutional neural network, and k-nearest neighbors' classifier), new devices can be automatically identified without the need for additional retraining or modeling for future expansions.Other ways can include semi-supervised learning methods, methods based on signal decomposition, approaches based on change detection, and different approaches proposed in the literature.
In terms of datasets available for energy disaggregation, some of the most commonly used are the following: • AMPds16 (Anomaly detection in the network traffic dataset of 2016, Canada) [19]: provides detailed readings, such as voltage, current, frequency, and power for an overall meter and 19 individual circuits with 20 Hz of sampling; • BERDS (Berkeley Energy Disaggregation Dataset, USA) [20]: provides active, reactive, and apparent power measurements at 20" increments; • BLOND (Technical University of Munich, Germany) [21]: contains voltage and current readings in two versions (BLOND-50 and BLOND-250) with different sample rates (50 kHz for aggregated circuits and 6.4 kHz for individual appliances); • BLUED (Building-Level Fully Labeled Electricity Disaggregation Dataset, USA) [22]: includes high-frequency data (with 12 kHz of sampling) at the household level for approximately eight days, with events recorded whenever an appliance changes state; • COOLL (Controlled On/Off Loads Library-University of Orleans, USA) [23]: Provides current and voltage data at a sampling rate of 100 kHz for 12 distinct types of appliances; • DEPS (Higher Polytechnic School of the University of Seville, Spain) [24]: power, voltage, and current readings at the frequency of 1 Hz on six devices present in a classroom taken during a month; • iAWE (Indian Ambient Water and Energy, India) [25]: it provides comprehensive realtime electricity and gas consumption data from 33 household sensors in an apartment in Delhi, covering both aggregate and individual appliance consumption patterns.
Various commercial and research meters exist in the current energy management and monitoring field, offering capabilities for measuring electricity consumption and power quality [26].These include sophisticated power quality analyzers that professionals use for diagnostic purposes, identifying energy waste, and preventing energy-related issues [27].However, such devices are often expensive and complex, making them less accessible to non-expert users [28].They are primarily utilized for advanced energy audits and network analysis tasks.The software accompanying these devices is typically proprietary, but a trend toward open-source solutions is emerging, as seen in various domains [29].Open-source software, already transformative in sectors like telecommunications and cloud computing [30], is now making significant inroads into the energy sector [31].It offers benefits like accelerated development, reduced costs, and enhanced stability and interoperability [32].
Among open-source developments based on Arduino, several projects stand out: • OpenEnergyMonitor [33]: this system was designed for home energy monitoring, providing real-time analysis of energy usage.It supports active power, root mean square (RMS) voltage, and RMS current measurements at a high sampling rate and features an HTML5 interface, Wi-Fi and ethernet support, and an API.However, it lacks capabilities for measuring reactive power and power factor.

•
Smappee [36] is a commercial energy monitor that offers a variety of devices to measure and monitor electrical energy consumption.It provides a user-friendly interface and provides detailed information about real-time energy consumption.It also offers logging and analysis capabilities through its online platform.
Furthermore, platforms based on other boards like Raspberry Pi [37] have led to the development of devices like Wattson, which uses a non-invasive current sensor and an LED screen; emonPi, a device for energy monitoring and data logging, providing real-time consumption information and online access for analysis; and RPICT, a hardware project for energy monitoring that uses current transformers to measure and monitor electrical energy consumption, offering a cost-effective and customizable solution for real-time energy monitoring and analysis.
Another energy meter, the Open Z Meter (oZm) [38], developed by the Universities of Granada and Almeria, stands out as an energy quality analyzer and an open-source, open-hardware device with IoT capabilities.It can record and process extensive data, measuring various electrical variables such as voltage, intensity, active power, reactive power, Total Harmonic Distortion (THD), power factor, and harmonics of intensity and voltage up to 50 at a high sampling frequency [39].The latest version allows the analysis of three-phase systems [40].
Despite the plethora of available options, there is a significant disparity in the performance and accuracy of energy monitors on the market, with some offering essential functions and others, like the one above, providing high accuracy but needing more scalability and expandability.
In this context, this research introduces the Open Multi Power Meter (OMPM), a solution to address these gaps, particularly in the NILM field, offering a balance of accuracy, scalability, and user-friendliness.The OMPM is an open-hardware solution with firmware developed in open source [41].The device's open hardware nature not only makes it accessible to a broader range of users but also encourages innovation and customization, allowing it to be tailored to specific research or operational needs.
Central to the OMPM's utility is its compatibility with the Non-Intrusive Load Monitoring Toolkit (NILMTK) [42], which employs advanced algorithms for energy disaggregation, a method that uses computational techniques to estimate the power usage of individual appliances from a single meter reading that records the total power demand [43].The NILMTK's Combinatorial Optimization (CO) and Finite Hidden Markov Model (FHMM) algorithms [44] are particularly adept at dissecting complex energy usage patterns, making them ideal for assessing the OMPM's performance.By leveraging these tools, the OMPM can provide detailed insights into electricity consumption, leading to more informed energy management decisions and efficiency optimization [45], since without direct feedback, expecting consumers to actively participate in a sustainable and efficient energy system is unrealistic [46].
The article is organized into several sections, each focusing on distinct aspects of OMPM development and its application.The sections cover the materials and methods used in creating the OMPM, the measurement module, the sequencer module, and the metrics and process of disaggregation.Results and discussion are presented, highlighting the performance and effectiveness of the OMPM in various scenarios.The article concludes with a summary of the key findings, implications of the research, and suggestions for future research.

Materials and Methods
The OMPM stands out for integrating a single microcontroller architecture with a suite of measurement modules interconnected through an RS485 bus system, enabling the integration of multiple low-cost measurement modules as needed.This design ensures a balance between high accuracy in electrical measurements and the required flexibility for wide-scale implementation.
The core components of this new hardware, aimed at the acquisition and recording of electrical measurements, are as follows:

•
ESP32 nodeMCU: the central processing unit that manages the hardware's operations and data processing; • PZEM-004 modules (one for measure module): these modules are crucial for measuring various electrical parameters since, in a single device, we obtain the voltage, current, power, and power factor, • SD card reader: for reading data stored on SD cards; • SD card: used for data storage and retrieval,

•
Schottky diodes BAT54SW (one for measure module): essential for preventing reverse current flow, • I2C screen (16 × 2, optional): this screen displays system information and measurements, • Power supply (5 V/800 mA): provides the necessary power to the system, • Additional components: including a simple switch, a resistor, an enclosure box, etc., for the complete hardware setup.
Furthermore, a primary sequencer circuit has been selected to automate the measurement process.This circuit is designed to manage various combinations of application activations and deactivations.The components for this optional hardware include: • Arduino One: serves as the primary controller for the sequencer circuit; • Optoisolated relay module (8×, compatible with Arduino): these relays enable controlled switching operations,

•
Power Supply (12 V, 1 A): powers the sequencer system.• Adding the price of all the components, the budget of the control unit with the display, the SD card reader, one 8 GB memory card, and the power supply to power the entire assembly is around EUR 22, to which EUR 5 would have to be added for each measurement channel, which would mean a total of EUR 52 at most for a 6-channel acquisition unit (5 measurement channels for applications plus one for the aggregate).
It should be noted that each additional measurement channel, thanks to the expandable design using an RS485 bus, only needed a measurement module and a Schottky diode, removing about EUR 5 from the budget.In summary, the cost of this simple optional unit would be around EUR 13.
The following subsections will detail the measurement system based on the PZEM-004 modules, data acquisition, and sequencer systems.The explanation will provide insights into the functionality and capabilities of each component within the system, illustrating how they collectively contribute to an efficient and scalable energy measurement solution.

PZEM-004 Module
The PZEM-004 module, developed by Peacefair [47], is a highly popular and costeffective real-time power consumption monitoring tool.It stands as the cornerstone of the proposed solution, given its ability to measure five essential electrical characteristics of a circuit: RMS voltage, RMS current, active power, frequency, and power factor.This module's versatility and affordability make it a key component in energy monitoring applications.Key features of the PZEM-004 module include self-powering capability, optocoupled outputs for TTL level serial communication, and the use of Rogowski coils for current measurement, enhancing the accuracy and reliability of the readings.
The heart of the PZEM-004 module is the Vango Tec 9881 microcontroller.This ARM Cortex-M0-based controller boasts a 32-bit architecture and is equipped with 32 kb of flash memory and 8 kb of RAM.It is specifically designed for control and monitoring applications in the electrical energy sector, with built-in protection against over-current, over-voltage, and short-circuit scenarios.Additionally, the module features communication interfaces such as UART, SPI, and I2C, facilitating seamless integration with other electronic devices.Figure 1 presents the block diagram of the PZEM-004, showcasing its internal configuration and connectivity.Regarding the precision of the PZEM-004, each module is equipped with a calibration function.This feature allows for offset and gain adjustments, ensuring accurate and reliable readings.The electrical specifications for measurements with the PZEM-004 T-100A are as follows: The PZEM module is a versatile tool that can be used in a variety of industrial automation projects.However, in most cases, it is used in isolation.A solution has been developed using multiple PZEM modules connected to an RS485 bus.The RS485 bus is a physical layer standard widely used in industrial automation.It is known for its Regarding the precision of the PZEM-004, each module is equipped with a calibration function.This feature allows for offset and gain adjustments, ensuring accurate and reliable readings.The electrical specifications for measurements with the PZEM-004 T-100A are as follows: • Voltage: 80-260 V; Resolution: 0.1 V; Accuracy: 0.5%.
• The PZEM module is a versatile tool that can be used in a variety of industrial automation projects.However, in most cases, it is used in isolation.A solution has been developed using multiple PZEM modules connected to an RS485 bus.The RS485 bus is a physical layer standard widely used in industrial automation.It is known for its noise resistance, extended data transmission range, and ability to support up to 127 devices on a single network.OMPM's solution takes advantage of the RS485 bus to enable communication between multiple PZEM modules.This allows users to collect data from a variety of sources and perform more complex analyses.

Measurement Module
The OMPM employs an ESP32 NodeMCU microcontroller central to the operation, managing the data collection from the measurement modules.Connectivity with the SD card adapter and the optional I2C display is achieved through the MISO/MOSI, CS, SCK, SCL, and SDA/SCL lines of the ESP32.The SD card serves as the primary storage medium for measurement data, formatted in CSV for each meter and connected to the SPI bus as follows: The system incorporates six PZEM-004 modules, each with Rogowski coils for current measurement.Voltage measurements are conducted through parallel wiring, which powers the measurement modules.This setup allows for recording intensity measurements for six different electrical devices.
The implementation of an RS485 bus enhances the scalability of the system.This setup enables the transmission of voltage, current, power, frequency, and power factor measurements from each module to the central controller via the RX (GPIO 16) and TX lines (GPIO 17).The measurement acquisition frequency is above 10 Hz.
Additionally, the design includes a 2 × 16 LCD connected to the microcontroller via I2C, with the following wiring: The entire assembly is powered by a 5 V DC supply from the controller's USB bus.This is feasible due to the low power consumption of the RX/TX part of each PZEM-004 module, which is primarily required to power the optocouplers in each module's transmission part.A small switch connected to GPIO15 is incorporated to activate the recording of measurements on the SD card.
Figure 2 illustrates the wiring diagram of the OMPM solution, highlighting the optional but convenient 16 × 2 LCD screen.
The RS485 bus implementation is non-standard, utilizing Schottky diodes to block reverse current and prevent interference and a standard 10 K resistor connected between the positive and line to limit current through the diodes.This setup also helps maintain the RX line voltage, facilitating signal detection on the TX line.
Regarding the firmware of the ESP32, it is essential to program a unique address for each PZEM-004 module to ensure univocal identification.The addresses used in OMPM are as follows: This is feasible due to the low power consumption of the RX/TX part of each PZEM-004 module, which is primarily required to power the optocouplers in each module's transmission part.A small switch connected to GPIO15 is incorporated to activate the recording of measurements on the SD card.Figure 2 illustrates the wiring diagram of the OMPM solution, highlighting the optional but convenient 16 × 2 LCD screen.The acquisition firmware developed for the microcontroller involves initializing the SD card, capturing the current date and time via STP using a network connection, and creating six files for each application, differentiated by the counter number concatenated with the first capture date.The files' headers are formatted in NILMTK style: "timestamp, VLN, A, W, F, PF", corresponding to various measurement parameters like date and time stamp (timestamp), nominal voltage (VLN), current (A), power (W), frequency (F), and power factor (PF).
The main program periodically records all readings from each meter, ensuring each is active and accessible.Each set of measurements is logged in its corresponding file, along with the timestamp value, as shown in the flowchart in Figure 3.
Figure 4 shows a photograph of the final circuit in operation, displaying measurements on the LCD, the ESP32 nodeMCU capturing data on an SD card, and the PZEM-004 modules in operation.
The experiment involves connecting target devices to each PZEM-004 module for measurement and analysis using NILMTK [42].The devices include a meter for total consumption, a fan, a laptop computer, a light bulb, an LED light, and an electric welder.
The main program periodically records all readings from each meter, ensuring each is active and accessible.Each set of measurements is logged in its corresponding file, along with the timestamp value, as shown in the flowchart in Figure 3.The experiment involves connecting target devices to each PZEM-004 module for measurement and analysis using NILMTK [42].The devices include a meter for total consumption, a fan, a laptop computer, a light bulb, an LED light, and an electric welder.

Sequencer Module
A streamlined approach has been adopted to accurately simulate the real-world behavior of an installation using the measurement module described.This involves using an Arduino Uno board, which is interfaced through six digital bits with a relay board equipped with opto-coupled inputs.A 12 V DC voltage source powers the setup.
In this configuration, the normally open contacts of each relay on the board are wired in parallel to the manual switches of the five different applications used in this setup.These manual switches are kept in the open position.This arrangement allows for the automated control of each application, replicating the operational conditions typically found in electrical installations.

Metrics Used in This Work Available in NILMTK
To evaluate the quality of the results obtained in the disaggregation using NILMTK,

Sequencer Module
A streamlined approach has been adopted to accurately simulate the real-world behavior of an installation using the measurement module described.This involves using an Arduino Uno board, which is interfaced through six digital bits with a relay board equipped with opto-coupled inputs.A 12 V DC voltage source powers the setup.
In this configuration, the normally open contacts of each relay on the board are wired in parallel to the manual switches of the five different applications used in this setup.These manual switches are kept in the open position.This arrangement allows for the automated control of each application, replicating the operational conditions typically found in electrical installations.

Metrics Used in This Work Available in NILMTK
To evaluate the quality of the results obtained in the disaggregation using NILMTK, four essential metrics will be used in this work:

•
Error in total Allocated Energy (EAE) [48] quantifies the mean absolute error in energy estimation, calculated by Equation (1) as follows: where ŷ(n) t is the assigned power of appliance n at each time interval t, and y (n) t is the real power of the same appliance.This metric effectively quantifies the discrepancies between estimated and actual energy usage, indicating algorithm precision.A lower EAE means greater accuracy of the algorithm; • Mean Normalized Error in Assigned Power (MNEAP) [48] is a metric that evaluates the average absolute error in a normalized form, expressed as a percentage.It is articulated as follows in Equation ( 2): where y (n) t is the assigned power of appliance n at each time interval t, and y ŷ(n) t is the real power of the same appliance.A lower MNEAP value signifies enhanced accuracy of the algorithm; • Root Mean Square Error (RMSE) [49] is a standard metric that quantifies the magnitude of deviation in energy estimations, providing insight into the variance between energy consumption values predicted by the model and the real figures, as depicted in Equation (3).
where ŷ(n) t is the assigned power of appliance n at each time interval t, y t is the real power of the same appliance, and T represents the total number of observations or time intervals over which the energy consumption is recorded; • F-score.Known as the F1-score [50], this critical metric in machine learning evaluates the balance between model precision and recall.Derived from the confusion matrix within NILMTK, it embodies an amalgamation of precision and recall.Precision (positive predictive values), given in Equation ( 4), is concerned with the accurate prediction of 'ON' states.At the same time, Recall (Sensitivity), calculated as per Equation ( 5), focuses on correctly identifying actual appliance activations.
TP represents true positives, FP false positives, and FN false negatives.
The F1-score synthesizes these aspects, offering a composite measure that signals robust accuracy in identifying and predicting appliance states, as expressed in Equation ( 6).This metric, expressed as one, is desirable to be as close as possible to unity.

Disaggregation with NILMTK
For the disaggregation process utilizing the OMPM, the NILMTK [42] is employed.This toolkit facilitates analyzing and processing energy consumption data, as illustrated in Figure 5.
The F1-score synthesizes these aspects, offering a composite measure that signals robust accuracy in identifying and predicting appliance states, as expressed in Equation ( 6).This metric, expressed as one, is desirable to be as close as possible to unity.

Disaggregation with NILMTK
For the disaggregation process utilizing the OMPM, the NILMTK [42] is employed.This toolkit facilitates analyzing and processing energy consumption data, as illustrated in Figure 5.A new converter, UALM2, has been developed specifically for use with the OMPM and adapted from the DSUAL [51,52] converter (based on the iAWE [53] converter).This adaptation is necessary because the PZEM modules do not measure apparent or reactive power, resulting in only five available measurements.The UALM2 converter is designed to generate a dataset consistent with the measurements from the OMPM, which is compiled into six files.Each file contains a timestamp and five key electrical measurements: RMS voltage, RMS current, real power, frequency, and power factor.
Upon the generation of this new dataset, it becomes possible to graphically display various parameters such as active power, power factor, voltage, and current for all applications, including the aggregate meter, as shown in Figure 6a.Moreover, the recording of all measurements is visually represented in Figure 6b.A new converter, UALM2, has been developed specifically for use with the OMPM and adapted from the DSUAL [51,52] converter (based on the iAWE [53] converter).This adaptation is necessary because the PZEM modules do not measure apparent or reactive power, resulting in only five available measurements.The UALM2 converter is designed to generate a dataset consistent with the measurements from the OMPM, which is compiled into six files.Each file contains a timestamp and five key electrical measurements: RMS voltage, RMS current, real power, frequency, and power factor.
Upon the generation of this new dataset, it becomes possible to graphically display various parameters such as active power, power factor, voltage, and current for all applications, including the aggregate meter, as shown in Figure 6a.Moreover, the recording of all measurements is visually represented in Figure 6b.The dataset is divided into training, validation, and testing.The NILMTK's two implemented algorithms, CO and FHMM, are executed with various methods of filling (mean, median, and first) and different sampling periods (ranging from 1 s to 30 min).This process aims to identify the optimal combination for generating the disaggregation model and calculating all available metrics in NILMTK, such as F1-score, EAE, and The dataset is divided into training, validation, and testing.The NILMTK's two implemented algorithms, CO and FHMM, are executed with various methods of filling (mean, median, and first) and different sampling periods (ranging from 1 s to 30 min).This process aims to identify the optimal combination for generating the disaggregation model and calculating all available metrics in NILMTK, such as F1-score, EAE, and MNEAP.

Results and Discussion
Following the execution of the two algorithms under consideration, CO and FHMM, an initial assessment reveals insights into the optimal combination of sampling times and filling methods.Table 1 below presents the first estimations, comparing the performance of the CO and FHMM algorithms with various filling methods (mean and median) across different sampling periods.This preliminary analysis suggests that a 60-s sampling interval may be the most effective choice.A more comprehensive set of experiments was conducted based on this initial understanding.The CO and FHMM algorithms were run using all three filling methods (mean, median, and first) over an expanded range of sampling periods.The results of this extensive testing are summarized in Table 2. Table 2 shows that a 60-s sampling interval consistently yields the most favorable results across all combinations.Notably, combining the CO algorithm with the mean filling method emerges as the most effective, underscoring the potential of this system in the context of NILM.
A notable difference emerges in the optimal sampling times when comparing the results achieved using NILMTK on the OMPM with those obtained from the iAWE dataset [54].The best results for the iAWE dataset were obtained with a significantly more extended sampling period, exceeding 10 min, as seen in Table 3, which presents the results obtained for the iAWE dataset, showing the performance of the CO and FHMM algorithms with different filling methods across various sampling intervals.The analysis reveals that the most efficient algorithm for the iAWE dataset is the CO using the mean method as the filling method and a sampling period of 10 min.This contrasts with the 60-s sampling requirement for the OMPM.
DEPS [24] is a three-phase consumption dataset with active power, reactive power, voltage, and current measurements.It comprises ten industrial meters whose characteristics are described in Table 4.

Meter
Registered Measures Sampling Period The main meter (Main_RST) measures the aggregate active (P) and reactive (Q) power of the system.It also functions as a phase-based meter, allowing P, Q, voltage (V), and current (I) to be recorded for each phase.The devices are divided into two lighting groups (Lights_1 and Lights_2), three air conditioners (HVAC_1, HVAC_2, and HVAC_4), and a computer rack (Rack).Lighting data include only active power.Air conditioning equipment data have active power, reactive power, voltage, and current.Rack data include active power, reactive power, voltage, and current.
NILMTK also enables the calculation of evaluation metrics using the MeterGroup to validate results via the validation set.The performance of the models can be assessed using different metrics such as FEAC, F1-score, EAE, MNEAP, and RMSE, which provide insights into the accuracy and reliability of the disaggregation process.To illustrate the effectiveness of the approach, the primary metrics obtained for various applications on OMPM are presented in Tables 5 and 6, which display the results of the same metrics in the DEPS dataset [24].The F1-score metric shows satisfactory accuracy in the OMPM setup, with values close to or exceeding 50% even in the worst-case scenarios (laptop, fryer).Compared to results from the DEPS dataset, except for excellent values for HVAC_1 and HVAC_2, the OMPM yields better results overall.
The EAE metric shows excellent results for the OMPM, with almost negligible discrepancies for all appliances.The results for DEPS in terms of EAE are equally excellent.
The MNEAP metric yields good values, especially for the LED lamp, followed by the halogen lamp and fan.The laptop and fryer also exhibit impressive results, with the arithmetic mean for MNEAP being 0.724.The results for MNEAP with DEPS are remarkably like those obtained with OMPM, with an arithmetic mean of 0.73.
The RMSE metric shows exceptionally favorable results for all applications with the OMPM, particularly when compared to the DEPS dataset.For DEPS, significantly higher RMSE values are observed, except for the rack, indicating a substantial difference in performance.
Figure 7 presents the index correspondence for the OMPM dataset, illustrating the performance of the combinatorial algorithm across various sampling methods for different appliances.The analysis shows varied yields across different metrics and sampling times.For the F1-score metric, the results are similar for less than one-minute sampling times with both algorithms and other fill methods.As for the SEA metric, zero error is observed in almost all cases, which means a very accurate energy estimate in both datasets.As for the MNEAP metric, a noticeable increase in error is observed when the sampling time exceeds one The analysis shows varied yields across different metrics and sampling times.For the F1-score metric, the results are similar for less than one-minute sampling times with both algorithms and other fill methods.As for the SEA metric, zero error is observed in almost all cases, which means a very accurate energy estimate in both datasets.As for the MNEAP metric, a noticeable increase in error is observed when the sampling time exceeds one minute.This increase is more pronounced for the combinatorial model, while it decreases for the FHMM.For the RMSE metric, even with sampling times extended to 10 min, the values are still very good (low), so no algorithm, sampling time, or filling method stands out as significantly superior.
Since the best behavior offered is with the CO algorithm, Figure 8a showcases the OMPM results, while Figure 8b shows the results of the DEPS dataset, whose best performance was with the FHMM algorithm.The comparison reveals that while the F1-score metric excels for some devices with DEPS, it performs poorly for others (notably HVAC_4), indicating that the OMPM results are more consistent across different devices.The EAE metric results for DEPS are equally excellent, mirroring those obtained with OMPM.The MNEAP metric for DEPS notably excels for the rack application but is otherwise like OMPM.Finally, regarding the RMSE metric, OMPM's results are notably worse when compared to DEPS, highlighting a significant disparity in performance between the two datasets in this metric.
In the final stage of analysis, the median method of the CO algorithm is applied to assess its efficacy on the OMPM dataset.The results are presented in Figure 9a, providing a comprehensive view of the algorithm's performance across various metrics.For a comparative perspective, the outcomes of employing the same model on the DEPS dataset are also examined (Figure 9b).The comparison reveals that while the F1-score metric excels for some devices with DEPS, it performs poorly for others (notably HVAC_4), indicating that the OMPM results are more consistent across different devices.The EAE metric results for DEPS are equally excellent, mirroring those obtained with OMPM.The MNEAP metric for DEPS notably excels for the rack application but is otherwise like OMPM.Finally, regarding the RMSE metric, OMPM's results are notably worse when compared to DEPS, highlighting a significant disparity in performance between the two datasets in this metric.
In the final stage of analysis, the median method of the CO algorithm is applied to assess its efficacy on the OMPM dataset.The results are presented in Figure 9a, providing a comprehensive view of the algorithm's performance across various metrics.For a comparative perspective, the outcomes of employing the same model on the DEPS dataset are also examined (Figure 9b).
The analysis indicates a notable variability in the F1-score metric within the DEPS dataset across different devices.While specific devices exhibit high performance, others, such as HVAC_4 and Lights_2, display comparatively lower scores.This variability contrasts with the more uniform results observed across the OMPM dataset, suggesting a higher degree of consistency and homogeneity in its performance.
nificant disparity in performance between the two datasets in this metric.
In the final stage of analysis, the median method of the CO algorithm is applied to assess its efficacy on the OMPM dataset.The results are presented in Figure 9a, providing a comprehensive view of the algorithm's performance across various metrics.For a comparative perspective, the outcomes of employing the same model on the DEPS dataset are also examined (Figure 9b).Regarding the EAE metric, the DEPS and OMPM datasets yield exceptional results, indicating high accuracy in energy consumption estimations.
In the context of the MNEAP metric for the DEPS dataset, standout performance is noted for the rack application.At the same time, the results for other appliances align closely with those obtained from the OMPM dataset.
Lastly, the RMSE metric reveals significant disparities, with the OMPM dataset demonstrating markedly superior accuracy in energy consumption estimations compared to the DEPS dataset, which exhibits less favorable outcomes.This distinction highlights the robustness of the OMPM dataset in providing reliable and precise energy consumption data.
In summary, comparing the results of the metrics obtained with OMPM concerning DEPS, for the F1-score, quite similar results are obtained (giving a specific slight advantage to DEPS).However, for EAE and MNEAP, similar results are obtained (now giving a specific slight advantage to OMPM).Notably, the RMSE metric stands out very clearly, where much better results are undoubtedly obtained for OMPM.Given the proposed solution's low cost and the metrics obtained, especially for RMSE, OMPM is an extremely interesting solution in the field of NILM.

Conclusions
This research has presented an open hardware-based solution that stands out for its scalability, affordability, and replicability while upholding the exceptional precision synonymous with professional-grade solutions.With a modest budget of approximately EUR 52 or less, this open-source solution delivers measurements of six simultaneous channels, encompassing voltage, current, power, and power factor.These channels can be effortlessly expanded up to a maximum of 127 by adding as many measurement modules to the bus as needed, each costing around EUR 5.
In addition to its remarkable scalability, this open system can be used as a self-scaling multi-system for acquiring electrical measurements and implementing the NILM task.
The system utilizes open-source software, encompassing the microcontroller's firmware responsible for capturing measurements and storing them in files and the post-processing phase for NILM, which relies on the NILMTK toolkit specifically tailored to incorporate the dataset generated by this innovative hardware.
A noteworthy aspect of this work is the development of a new converter tailored to the OMPM measurement files.This converter creates a new dataset supporting a 13-digit timestamp, facilitating the application of NILMTK's various phases, including validation, training, and metrics evaluation.
Significant differences have emerged when comparing the results obtained from applying NILMTK metrics to the OMPM dataset with those derived from the DEPS dataset (generated using professional hardware).Notably, the OMPM dataset requires shorter sampling times and exhibits a remarkable 200% difference in the RMSE metric compared to the DEPS dataset.The comparative analysis of the OMPM and other public datasets, including measurements from commercial and open hardware monitors, underlines the device's accuracy and scalability.The results from these comparisons validate the OMPM's effectiveness and highlight its simplicity and adaptability, making it a valuable tool for a wide range of applications, from academic research to practical energy management solutions.
The promising results achieved with the OMPM dataset using NILMTK metrics open new possibilities for researchers to generate their datasets and further enhance NILM research.The scalability of the proposed solution, facilitated by the implementation of an RS485 bus, allows for the use of multiple channels with a single microcontroller.This scalability ensures the capture of all fundamental electrical measurements with commendable accuracy.Having been successfully assessed with six modules and the number of circuits in a typical household, the system holds the potential for future expansion to accommodate even more modules.
To evaluate this new hardware, applications with low power consumption were chosen to increase the complexity of disaggregation tasks.The hardware yielded highly satisfactory results across various metrics, suggesting its potential utility in ongoing NILM research.
As an improvement, it is worth mentioning that currently, each module is fed directly from the mains voltage using a simple RC circuit, a rectifier diode, and a Zener diode, with a U3 regulator (7133) at the output.An improvement could be achieved by feeding the regulator from an isolated, independent source, such as an R05P125, which offers a promising direction for further research and development.
Future work could focus on enhancing the accuracy of the measurement modules to create a system for disaggregating energy consumption in real-time, for example, by sending the measurement files to a Raspberry Pi running NILMTK every few seconds.
This research has demonstrated the potential of a low-cost, open-source hardware solution for NILM tasks.The proposed system's scalability, affordability, replicability, and remarkable accuracy make it a valuable tool for researchers and practitioners.Future work should focus on refining the hardware design and exploring its potential applications in various domains, including energy management, smart homes, and grid monitoring.

Figure 4
Figure4shows a photograph of the final circuit in operation, displaying measurements on the LCD, the ESP32 nodeMCU capturing data on an SD card, and the PZEM-004 modules in operation.

Figure 4 .
Figure 4. Photograph of the final assembly.

Figure 4 .
Figure 4. Photograph of the final assembly.

Figure 5 .
Figure 5. Implementation of NILMTK in the OMPM setup.Figure 5. Implementation of NILMTK in the OMPM setup.

Figure 5 .
Figure 5. Implementation of NILMTK in the OMPM setup.Figure 5. Implementation of NILMTK in the OMPM setup.

Figure 6 .
Figure 6.(a) Critical measurements for the aggregate meter; (b) consumption of individual applications.

Figure 6 .
Figure 6.(a) Critical measurements for the aggregate meter; (b) consumption of individual applications.

Figure 9 .
Figure 9. (a) Evaluation results of the optimal model using the OMPM dataset; (b) evaluation results of the optimal model using the DEPS dataset.Figure 9. (a) Evaluation results of the optimal model using the OMPM dataset; (b) evaluation results of the optimal model using the DEPS dataset.

Figure 9 .
Figure 9. (a) Evaluation results of the optimal model using the OMPM dataset; (b) evaluation results of the optimal model using the DEPS dataset.Figure 9. (a) Evaluation results of the optimal model using the OMPM dataset; (b) evaluation results of the optimal model using the DEPS dataset.
• Arduino Energy Monitor: this open-source project leverages an Arduino board and a non-invasive current sensor, displaying measurements on an LCD screen or a web interface.It offers real-time consumption data, storage, and communication capabilities, making it suitable for home monitoring and energy efficiency projects.•EmonTx:aimed at energy efficiency, renewable energy, and building monitoring projects, EmonTx is an open-source system that measures and records electricity consumption in real time.It includes hardware that connects to electrical circuits and uses sensors to measure energy consumption.The data are transmitted via radio frequency or wires to a receiver that sends it to a computer or cloud platform for visualization and analysis.The software associated with EmonTx v4 allows the system to be configured, calibrated, and visualize the collected data.It also offers logging and long-term data storage functions, allowing detailed energy consumption monitoring and usage pattern detection.
• There are also commercial Arduino-based projects that are not open-source: • IoTaWatt [34] is an IoT device based on an ESP32 microcontroller [35] that monitors energy consumption in real-time, recording data and transmitting it to the cloud for analysis.It also measures energy generated by renewable sources and adapts to different monitoring needs.

Table 3 .
Results for the iAWE dataset.

Table 4 .
Summary of measurements recorded in the DEPS dataset.

Table 5 .
Main metrics obtained for applications.

Table 6 .
Results of the main metrics for DEPS.