1. Introduction
The growth of energy consumption in the world is constant, which demands continuous investment in expanding the energy matrix, improving production and distribution processes.
In 1965, global energy consumption was 43TWh, but in 2022 it exceeded 165TWh, an increase of almost 400% over the last five decades. Two significant categories exist for the energy sources comprising the world’s energy matrix: renewable and non-renewable. Fossil fuels, such as oil, natural gas, and coal, are widely used worldwide due to their availability, reliability, and relatively low prices. However, they are non-renewable energy sources and the primary sources of greenhouse gas emissions and air pollution.
The development of Smart Meters for Smart Grids represents a solution to improve energy transmission between power plants and end consumers. It is possible to improve the transmission in various ways, such as real-time monitoring, quick detection and restoration of failures, as well as providing users with access to information about their consumption, identifying opportunities for savings. This approach aims to maximize energy efficiency, reduce waste, and sustainably meet the growing energy demand.
Constructing low-cost smart meters is crucial in making this technology accessible to a broader audience. By reducing production costs, it becomes possible to expand the adoption of smart meters across different sectors and regions, promoting greater awareness of energy consumption and contributing to large-scale energy efficiency.
Furthermore, the popularization of smart meters drives the transformation of electrical grids into smart grids, integrating renewable energy resources and energy storage systems. The integration of renewable energy resources is achieved through real-time monitoring and generation forecasting, demand management, as well as communication and real-time control, enabling greater efficiency in the management and control of renewable energies. This transition results in greater flexibility and resilience of the grid, enabling the incorporation of clean energy sources and promoting the shift towards a more sustainable energy matrix.
Smart Grids are defined as an electrical network that can intelligently integrate the actions of all connected users, such as generators and consumers, in order to provide energy efficiently, economically, and safely [
1]. According to [
2], Smart Grid can be defined as the next-generation, intelligent electrical network capable of addressing the main deficiencies of the existing grid. It is a network that intelligently integrates new technologies to enhance the monitoring and control of the operation of electrical systems, specifically in generation and distribution, while also incorporating user actions connected to it. These networks are characterized by implementing innovative equipment and services, as well as new communication, control, monitoring, and self-diagnostic technologies within the system [
3].
The operation of Smart Grids includes the use of software, hardware, and technologies that help electricity companies instantly identify and correct imbalances between generation and demand in order to improve service quality, increase energy reliability, and reduce costs [
4]. It is precisely through these readings and the integration of Smart Grids that we find Smart meters. The Smart meter is an essential component of the Smart Grid. It is an electronic energy measurement device that replaces traditional meters, providing significant benefits for the implementation and operation of an intelligent electrical network.
A smart meter is an advanced electronic device used to measure and monitor real-time electricity consumption. It differs from traditional meters by having additional features, such as the ability to communicate remotely and provide detailed information about energy consumption [
5]. Smart meters have gained prominence worldwide due to the benefits they offer to both energy providers and consumers. These meters allow for more accurate and reliable measurement of energy consumption, eliminating the need for manual readings and reducing reading errors [
6]. Another important factor for smart meters is the ability to read power quality parameters.
Power quality is a crucial factor to be considered in energy measurement, as it directly impacts the efficiency and safety of electrical systems. It relates to the presence of various issues, such as distortions, interruptions, fluctuations, and others that affect the distribution of electrical energy. One of the most relevant aspects of power quality is the occurrence of harmonics [
7]. These harmonics refer to electrical currents or voltages with multiple frequencies compared to the fundamental frequency of the electrical grid, usually 60 Hz. They arise due to nonlinear electrical equipment, such as motors, electronic lamps, frequency converters, and computers. The presence of harmonics can cause waveform distortions in voltage and current, resulting in energy losses, equipment overheating, and possible system failures [
8].
Another critical aspect of power quality is the presence of voltage surges. Voltage surges are short peaks in voltage that can damage sensitive electronic equipment. Lightning strikes, high-power equipment operations, or switching operations in the electrical network can cause them. Monitoring and controlling the presence of voltage surges is essential for safeguarding electronic equipment. Voltage fluctuation is also a factor that affects power quality. Voltage fluctuation occurs when the voltage in the electrical network varies due to changes in electrical load. Such occurrences can result in operational issues for electrical equipment, including motor failures and flickering lights. Maintaining stable and controlled voltage is crucial to ensure power quality [
7].
Assessing the quality of electrical energy is essential to ensure the proper operation of electrical equipment and systems and protect consumers from potential safety issues and equipment damage [
9,
10]. Additionally, continuous monitoring of the quality of electrical energy can help energy companies identify issues in the electrical grid and implement corrective measures to improve the efficiency and reliability of energy distribution [
11]. This continuous monitoring is carried out with the integration of Internet of Things (IoT) devices, such as smart meters and sensors.
The Internet of Things (IoT) is a new paradigm rapidly gaining popularity in today’s wireless landscape. The basic idea behind this concept is the widespread presence of various "things" or objects around us, such as Radio Frequency Identification (RFID) tags, sensors, actuators, cell phones, and more. - that can interact with each other and cooperate with their neighbors to achieve common goals through exclusive addressing schemes [
12]. We can realize the Internet of Things is gaining more applications and making cities safe and sustainable, impacting more and more people’s lives [
13].
Smart meters are intelligent electrical energy measurement systems that measure this consumption and transmit the collected data to a central server in real-time [
14]. By utilizing this data, stakeholders can make informed decisions regarding electrical energy supply, enabling them to adjust the energy supply according to demand, prevent consumption peaks, and minimize energy waste.
Due to these benefits, intelligent electricity metering is one of the most critical applications of the IoT, especially in the energy sector, as in addition to monitoring energy consumption in real-time, it can also identify opportunities to save and reduce energy costs [
15].
To measure, these devices acquire data from the electrical network, such as voltage, current, and power factor, to a central system through bidirectional communication [
16]. Consumers can use the information acquired by the smart meter to improve consumption behavior [
11], while energy suppliers can monitor and bill the system [
10].
In addition, smart meters facilitate the integration of variable renewable energy sources, such as solar and wind, and new loads, such as energy storage and electric vehicle charging, ensuring the stability and efficiency of the [
17] system. These devices also allow consumers who produce their energy to respond to market prices and sell the surplus to the grid. Feedback for consumption is essential, as smart meters can provide consumers with real-time feedback on energy consumption through devices such as intelligent home displays. This feedback may include comparisons with other consumers (normative feedback), which can potentially encourage long-term energy conservation [
17,
18]. Studies show that normative feedback can motivate consumers to reduce consumption if they perceive themselves as above average or above their peers [
19].
Therefore, we can understand the use of traditional meters, such as the CW500, despite still being useful mainly for specialized users. However, its applicability in an electrical system that is increasingly interconnected and volatile becomes limited. This limitation stems from its high cost, usability, and risks associated with handling.
The smart meters are designed to verify that the quality of energy supplied is adequate for the intended use by end consumers or even the utilities that distribute electricity [
10]. Power quality can be affected by a number of factors such as voltage fluctuations, frequency variations, harmonic disturbances and interruptions in the power supply.
The quality of electrical energy is currently a crucial factor for the competitiveness of virtually all industrial and service sectors. Thus, to keep the voltage level within certain acceptable operating limits, both at the transmission and distribution levels, control and monitoring measures are necessary from the inspection bodies and the energy-supplying concessionaires [
20]. Some aspects need to be observed, as in the voltage: the waveform, which must be as close as possible to a sinusoid; the symmetry of phases of the electrical system and the magnitudes of voltages within acceptable limits [
20].
In addition to assessing whether the system is operating correctly, phenomena, random or intrinsic, occur in the electrical system causing changes in the data reading. Among these phenomena, we can have: sags and/or voltage swells, interruptions, harmonic distortions, voltage fluctuations, oscillatory or impulsive transients, noise, overvoltages, and undervoltages [
20].
Therefore, a low-cost smart meter was developed targeting the interests of the current energy sector, capable of storing and sending data from the electrical system to a central in real time. After being tested, the equipment presented results very similar to products currently on the market.
3. Prototyping
In the current market, a massive range of integrated specialized circuits in measuring electrical quantities. These integrated circuits offer several advantages over conventional circuits, such as greater accuracy, smaller size, and lower power consumption.
However, specialized circuits tend to be more expensive due to their complexity and precision, which may make using these circuits unfeasible in low-cost projects. Furthermore, this type of circuit is less flexible than conventional circuits, especially in terms of customization or adaptation to specific project requirements.
Another disadvantage is the integration of these circuits into a system, as they require more advanced technical knowledge and a deep understanding of their performance characteristics, which may increase the difficulty of implementing these circuits in smaller-scale projects or projects that involve less experienced professionals.
Several specialized integrated circuits for electrical energy measurement are on the market, such as the ADE9000 from Analog Devices, the MCP39F511 from Microchip, and the CS5490 from Cirrus Logic.
The ADE90001 is a highly accurate, fully integrated, multiphase energy and power quality monitoring device. Superior analog performance and a digital signal processing (DSP) core enable accurate energy monitoring over a wide dynamic range. An integrated high end reference ensures low drift over temperature with a combined drift of less than ±25 ppm/°C maximum for the entire channel including a programmable gain amplifier (PGA) and an analog-to-digital converter (ADC). The integrated ADCs and DSP engine calculate various parameters and provide data through user accessible registers or indicate events through interrupt pins. With seven dedicated ADC channels, the ADE9000 can be used on a 3-phase system or up to three single-phase systems [
25].
The MCP39F511 is a highly integrated, complete single-phase power-monitoring IC designed for real-time measurement of input power for AC/DC power supplies, power distribution units, consumer and industrial applications. It includes dual-channel Delta-Sigma ADCs, a 16-bit calculation engine, EEPROM and a flexible 2-wire interface [
26].
The CS5490 is a high-accuracy, two-channel, energy measurement analog front end. The CS5490 incorporates independent 4th order Delta-Sigma analog-to-digital converters for both channels, reference circuitry, and the proven EXL signal processing core to provide active, reactive, and apparent energy measurement. In addition, RMS and power factor calculations are available. Calculations are output via a configurable energy pulse, or direct UART serial access to on-chip registers. Instantaneous current, voltage, and power measurements are also available over the serial port. The two-wire UART minimizes the cost of isolation where required [
27].
These circuits feature multiple high-speed, high-precision ADCs and DSPs and control units to perform the necessary mathematical calculations to obtain key measurement parameters. Integrating all these components on a single chip makes the construction of these circuits complex and expensive.
With the improvement of microcontrollers, the chips offer high processing power, with multiple processing cores, making it possible to implement increasingly complex and advanced systems with more excellent performance and energy efficiency. In addition, they offer a wide variety of built-in features, such as communication peripherals, high-capacity memory, I/O device controllers, and even advanced security and encryption features. Due to the increasing availability of such technologies in the market, it was possible to use these dedicated circuits used in specialized software measurement circuits without loss of precision and quality, giving greater flexibility and reducing the final cost of the meter.
We chose to develop the project using the EasyEDA software, which offers online schematic creation, making it easier to work on the project remotely. The software provides convenient public and private sharing features and standard tools for 2D and 3D visualization. Additionally, it offers the option to directly send the design for manufacturing within the system.
In
Figure 5 we have the 3D visualization of the project generated in EasyEda.
Table 2 contains all the components and their respective prices obtained from the market in small-scale purchases. It is worth noting that these costs may vary depending on the location and quantity.
A survey was made of all the components needed to manufacture a PCB, and
Table 2 was set up with their respective components, quantities, and prices. As shown in the table, the developed hardware has a complete set of resources to measure and monitor critical electrical parameters, such as voltage, current, power, and power factor with a lower investment price, in relation to the products on the market, the that allows consumers to access reliable, high-quality monitoring tools without breaking their budget. This option becomes particularly attractive for companies, industries, and residential users who want to control and optimize energy consumption, ensuring energy efficiency and cost reduction.
The power input stages are a critical part of a meter’s circuit, requiring special care when defining the thickness of their tracks.
Taking into consideration the IPC-2221 [
28] standard, which is the foundation design standard for all IPC-2221 design series which establishes the generic requirements for the design of PCBs and other forms of assembly of components or interconnecting structures, for the correct sizing of the required track width for a maximum current of 5A, present in the power stage of the current conditioning circuit, without overheating the track and possible collapse of the track on the board due to overheating, a track of 54.437 mil was used according to the calculated values following the standard.
For external layers:
For inner layers:
We manufactured the remaining traces on the board with a thickness of 19.685 mil for low-current signals.
In the power stage, we used a parallel combination of resistors for current inputs and a series combination of resistors for voltage inputs. We used resistor combinations instead of a single higher-power resistor to ensure a larger heat dissipation area for these components. Additionally, using standard resistors in the market provides greater availability and significant cost reduction in the power stage.
We used voltage follower operational amplifiers on the reference signal of the voltage dividers to ensure more excellent stability in the ADC readings.
The Hilink model switching power supply created a compact and easy-to-install meter. This power supply is cost-effective, provides sufficient power, has a compact size, and is highly reliable.
4. Calibration and Standardization
When we talk about the use and development of measurement tools, one of the main points to be observed is the reliability of the data obtained; therefore, we must use methods that attest to the quality of the data captured by the smart meter. The method used to perform the calibration was divided into two stages, namely, analysis and generation of adjustment curves based on known loads in a controlled environment, as well as real loads over a long period of time. This need is known and arises because we use the analog-to-digital converter (ADC) input present in the ESP32, which, like any component in the real world, has a certain error curve that can be minimized through the mathematical technique of polynomial regression.
4.1. Calibration Platform
In order to calibrate the ESP32 ADC input, it is necessary to assemble a resistive circuit in the laboratory with the following components:
Three-phase Voltage Regulator;
Cables;
Equivalent resistors of 33.33 Ohms, with a power of 900 Watts per phase;
Three 5 Amp output current transformers;
Multimeter;
CW500 energy analyzer.
In
Figure 6, we then have a basic diagram assembled in the laboratory to obtain the data, which were used to generate the fit equation, and in
Figure 7, the bench test.
4.2. Performance of Calibration Using the Intelligent Meter
Performing the calibration of the Smart Meter, the CW500 was used, a product of Yokogawa T&M (Test & Measurement) which is a company specialized in test and measurement equipment. The CW500 is a portable electrical power quality analyzer used in power quality analysis and analysis in electrical system. This device is capable of monitoring and recording electrical parameters, such as voltage, current, power, power factor, harmonics, transients and other irregularities in power quality [
29], thus being qualified equipment for:
Identifying power quality issues
Evaluating energy efficiency
Diagnosing faults
Analyzing the performance of the electrical system
Based on this information, it is possible to optimize the operation and maintenance of electrical systems, ensure compliance with regulatory standards and improve energy efficiency.
The calibration procedure starts with recording the measurements acquired from the CW500 meters and the Smart Meter, then we adjust the three-phase voltage regulator to gradually vary the voltage and/or current, allowing for the complete exploration of the voltage and/or current scale, resulting in the time series of measurements for both meters. However, since there is no guarantee that both meters will start measurements at the same time and that their clocks are completely synchronized, as well as the interval between measurements being uniform, it is necessary to perform synchronization corrections on the obtained time series.
After the laboratory work is completed, the corrections are made a posteriori with a data processing and analysis software made in the high-level programming language Python, due to its clear and concise syntax, as well as its wide range of data analysis tools.
The data obtained from the SD cards of each meter showed a temporal deviation, that is, a differentiated amount of samples. In the case of the current, there was a distinct scale due to the use of the current transformer in the circuit that connects the CW500 meter, while the smart meter was directly connected to the test bench. This is equivalent to a current transformer with a unitary transformation ratio. Due to its constructive characteristics, the current conditioning circuit in the smart meter is limited to a current of 5 amperes, a fact that does not impact the results obtained from the experiment. The corrected time series, through the identification of the voltage and/or current peak previously inserted to facilitate the detection of the beginning of the tests, had the amount of samples adjusted based on the repetition of samples from the smaller time series, and the scale was adjusted through a simple division.
Based on these data, properly synchronized, the regression equation coefficients were generated for each range and variable, resulting in a precise mathematical representation of the relationship between voltage and current. Returning the following polynomial equations:
Equation for currents (A, B and C):
Equation for voltages (A, B and C):
Through the curves obtained, we can generate graphs with the data already adjusted, so that we can understand visually.
Figure 8.
Comparative Analysis of Curves: Results Before and After Calibration.
Figure 8.
Comparative Analysis of Curves: Results Before and After Calibration.
Through the obtained voltage and current data, we will be able to trace curves to analyze the reliability of the data, through error analysis.
We can observe in
Figure 9 that the bench calibration process was perfectly satisfactory, since, although the measurements presented a relatively low error, we were able to reduce it to something around zero with the polynomial equations, even in the current measurements, which suffer from greater variability than voltage and therefore, in the comparison between the developed smart meter and the CW500, may present a certain degree of divergence, which in reality does not present a design error, but a constructive characteristic of the worked hardware.
5. Analysis on the Experiment Outcomes
After the completion of the bench calibration, the CW500 meter was used. This is an important tool for verifying the reliability of the obtained data. This meter is recognized for its precision and ability to monitor anomalies in the power system, including voltage and current fluctuations, and record up to the 50th order of harmonics, in both single-phase and three-phase systems.
The advanced interface of the CW500, including a graphical display and options for data collection through Bluetooth and SD cards, makes the equipment easy and intuitive to use. In addition, the data analysis software allows for visualization, storage, and analysis of the data acquired by the CW500. As a portable energy meter and analyzer, the CW500 uses current clamp probes and alligator clips to perform its measurements, as described in the user manual provided by the company [
29]; all of these features make the CW500 a versatile tool for the development of low-cost meters.
With this, it was possible to capture this data in a similar way as done in the bench calibration, but this time over a longer period, from December 30th, 2021 to January 12th, 2022, which is approximately fourteen consecutive days. With these cataloged data, we were able to export them into comma-separated value files, which was implemented both with the CW500 and the smart meter. Afterward, these data went through event synchronization using software implemented in Python.
5.1. Results and Field Test Analysis
In order to analyze and evaluate the performance and accuracy of the smart meter, and thus determine its suitability for similar applications, a comparative analysis was conducted between the CW500 devices and the smart meter. This analysis was based on voltage and current measurements taken over different time periods. Therefore, presented below is one of these analyses with data sets collected over a one-day period.
Based on the
Figure 10 we can observe that the voltages show excellent performance, with the data captured by the smart meter being very similar to that of the CW500 meter. In our analyses of the voltages, we observed a relative error of around 0.5%, except for the occurrence of outliers that arise rarely. However, when we analyze the relative errors found in the currents, we see values that exceed 100% with a recurrence of about 50% relative error.
Regarding electric currents, it is necessary to consider that the values collected by the smart meter exhibit discontinuities, which result from the lack of precise synchronization between this device and the CW500 meter. This factor contributes to a high relative error rate, so the error values associated with the currents do not accurately reflect the correspondence between the average value of the time series, but only the RMS value at the moment of measurement.
5.2. Power, PF, Frequency, and Harmonic Results in Field Test
In the measurement of frequencies, we achieved excellent performance. To obtain this data at the implemented hardware level, we used the methods described in
Subsection 2.3 and then subjected it to a field test to assess its reliability.
We observed in
Figure 11 that the frequency remained at 60 Hz, which is the current standard frequency in Brazil, where all field tests were conducted. In our calculations of relative error, we had an error of 0%, except for outliers that may have appeared due to connection problems during data acquisition.
Based on the collected data of frequency, voltage, and current, as presented above, it was possible to determine the total harmonic distortion rates, as illustrated in
Figure 14. In addition, we performed measurements of the active power, represented in
Figure 12. From these measurements, it was also possible to determine the power factor, and the results were presented in
Figure 13, thus demonstrating the variety of possible applications with the smart meter, especially considering its low-cost proposition.
We can observe a similarity between the values read by the CW500 meter and the developed smart meter. However, some values deviate from the expected, which is due to the accumulated error of the base samples, in the specific case, the relative error presented in the current. But as explained earlier, it is not possible to determine that this compromises the reliability of the constructed equipment.
The fact that the smart meter provides measurement of harmonics up to the 50th order, at a low cost, is a major differential. The presence of harmonics at lower frequencies can affect the proper operation of electrical and electronic equipment, such as motors, transformers, power supplies, and lighting devices. In addition, it is important to ensure the quality of the electrical energy supplied to consumers and to ensure that the electricity meters are measuring the amount of electricity consumed correctly. It is important to note that higher frequency harmonics, above the 50th harmonic, can be more easily filtered and therefore are not as critical in the measurement of electrical energy.
The smart meter also has the ability to measure the angle between phases from the electrical grid. This is due to the zero-crossing detection circuit described in
Section 2.3. The obtained results were promising, as we were able to measure real-time phase angles, further expanding the range of applications for the meter at a low cost. In an increasingly complex electrical system with distributed network systems, constant monitoring of phase angles [
30,
31] is necessary to prevent imbalances and distortions in the grid, which can even affect the protection of the electrical system.
6. Conclusion and Future Work
Analyzing what was presented in this article, despite using low-cost resources, the technology embedded in the smart meter can deliver a certain degree of reliability and accuracy. This makes its implementation possible, offering several advantages to energy suppliers and consumers, such as accurate real-time measurement and remote monitoring of power quality data, including voltage and current parameters, active power, power factor, harmonic distortion, and phase angles. This raises consumer awareness and allows energy providers to upgrade power grids promptly. In addition, replacing commercial meters with smart meters can generate long-term cost savings, even with a higher initial investment.
As seen in
Section 5, the smart meter demonstrates reliability in its data, with a relative error of 0% when it comes to frequency measurement. Despite the synchronization difficulties, we can observe an error of approximately 0.5% in voltage measurement and consistent measurements of current and power factor over time. Therefore, when we consider the parameters required for energy quality measurement, the smart meter presents itself as a low-cost and reliable option.
The approximate final value of the meter is
$82.77, as shown in the
Table 2 of
Section 3. However, by removing the current transformers (CTs), the final price would be reduced to
$34.77, a price much lower than any quality energy meter currently available in the market. This price difference offers a more affordable option for those looking to purchase a high-quality energy meter without compromising performance or necessary features.
Comparing the value of the meter described in this article to a commercial model like the ISSO-DMI P500Rv2, which has an approximate price of $996.00, we can see that the described meter is about 10 times cheaper.
It is also possible to envision future implementations in the field, such as the use of embedded Artificial Intelligence in smart meters aimed at preventing failures, identifying devices, and preventing fraud in the electrical grid. With technological advancement, it is expected that these solutions will become increasingly accessible and widely used, bringing benefits not only to electricity companies but also to consumers.