The conventional electricity metering systems are constrained with the scope of remote control of the energy consumption due to the related GSM Sim Card or mobile network coverage. With the competency of digital technologies, WiFi solutions are able to surpass this, making it more efficient in managing energy. The proposal works out a WiFi based prepaid energy meter monitoring system on ESP32 microcontroller technology. The PZEM-004T energy sensor collected data of voltage, current, power and energy consumption. The methodology will be to make the ESP32 microcontroller the core component and add WiFi connection, which will allow remote monitoring and the transmission of data. An I2C LCD with 16x2 characteristics was used to show the local readings, SD card card module was used to record consumption data and relay module was used to control load. It was created with HTML, CSS, and JavaScript, as a web interface that would allow users to remotely monitor usage and control loads. Measurements were taken at the time intervals of 20 seconds each and processed using ESP32 and sent to the local display and online dashboard. Findings indicate that the prepaid energy balance declined in direct relationship to consumption which validates the correct metering. Web interface also facilitated remote monitoring, disconnection of loads as well as the management of energy and data logging ensured that there was continuous storage of consumption history. The work concluded that proper real-time metering, effective WiFi communication and successful incorporation of remote monitoring with prepaid billing were undertaken successfully. It can be used in both residential houses and in multi-tenancy buildings, and even in remote locations where there is access to the internet, and can also be used in smart city projects where it can be used to ensure there is transparency in billing, block energy conservation by providing real time feedback and can be used with home automation systems to ensure comprehensive energy management.
Keywords: Wifi-based prepaid meter; ESP 32; PZEM-004T; Web Interface; Internet of Things
Received: Jun 9, 2025 · Revised: Nov 20, 2025 · Accepted: Jan 11, 2026 · Published: 2026-01-20
Corresponding author: Matthew Olayinka Oyeleye, [email protected]
This is an open access article under the CC BY 4.0 license.
How to cite: Matthew Olayinka Oyeleye, Olamilekan Tofunmi Ogunsimide, Ezekiel Adegoke Fadiji, "Design, Construction and Implementation of a WiFi-Based Electric Prepaid Meter Monitoring System using Espressif 32," International Journal of Engineering and Applied Physics, vol. 6, no. 1, pp. 1285–1291, 2026.
The swift technological development has brought a series of changes to different areas of our routines, including energy consumption and management [1]. Over the last several years, the efforts to focus on the invention of new ways of efficient energy management have increased, especially when it comes to smart grids, smart cities, and the Internet of Things (IoT) [2]. The introduction of WiFi-powered electric energy prepaid meters based on ESP32 microcontrollers is regarded as one of these solutions [3]. In the study of prepaid meters, the researcher seeks to understand the possible advantages and limitations linked to this technology and offer an insight on how this WiFi based technology can be used in actual situations [4].
Electric energy meters can be equipped with WiFi technology enabling the monitoring and control of the use of the electric energy remotely on internet-based systems [5]. A comfortable and affordable solution to real-time energy data acquisition and user notifications can be provided by WiFi which allows wireless communication between devices within a local area network [6]. Through the integration of WiFi on the electric energy meters based on the ESP32 microcontroller, users are able to easily obtain information regarding their energy use through web dashboard, or a mobile application, get real-time data on the energy usage, and control prepaid payments online) [7]. The potential benefits of this technology are the improved management of energy, decreased waste of energy, and the general efficiency of the energy distribution systems [8].
The application of this research in residential energy management is possible [9]. The prepaid energy meter monitoring system enables the residential consumers to effectively control their utilization of electricity and their expenditure by means of user-friendly interfaces [10]. The research can also be useful in the management of energy where there is basic internet access but the area is remote. A WiFi based prepaid energy meter can also be used in such areas to offer cheap management of electricity without the need to have mobile network coverage [11]. The research is also useful in submetering, i.e. in using the multi-tenant buildings (apartment complexes or commercial centers) that have to be properly billed according to the actual consumption and to provide transparency in the usage and cost allocation of electricity between tenants [12].
The main benefit of electric energy prepaid meters based on WiFi is the presence of real-time monitoring and control options without the need to incur communication costs regularly as it is in GSM-based systems [13]. As ESP32 is integrated, which is an inexpensive and low-energy consumption microcontroller with integrated WiFi and Bluetooth, these meters are able to gather and process energy usage data and send it wirelessly to a server/cloud platform where it can be analyzed and made available as a billable [14]. This real-time monitoring option will allow consumers and energy providers to comprehend energy consumption trends better and seek the opportunities of energy-saving and provide demand response actions when it is needed. The additional benefits are the presence of instant notification, better energy management, affordability based on the fact the WiFi is free to communicate with, and easy to scale in its implementation [15].
A WiFi-based electric prepaid meter was developed which integrates sensing, processing, communication, and website functionalities.
The system begins with a 240V AC mains input, which is fed into the input side of the PZEM-004T sensor in order for it to measure the electrical parameters which includes voltage, current, power, and energy consumption. A power conversion stage supplies regulated 12 V DC and 5 V DC outputs, enabling the ESP32 microcontroller and peripheral modules.
The ESP32, serving as the central controller, operates in a continuous loop to acquire real-time data from the PZEM-004T through Modbus RTU over UART communication. The raw data is digitally filtered, processed, and used to compute energy consumption, power factor, and credit deduction based on a predefined tariff rate.
To support prepaid functionality, the energy consumed is converted into monetary units using:

Where: Cd is the Credit Deduction, which is the amount deducted from the available credit, ΔE is the energy consumed and Tr is the Tariff Rate which is the cost per unit of energy.

Where Nb is the New Balance and Cb is the Current Balance.
These measured PZEM-004T values are stored in a non-volatile memory to ensure persistence in the event of power loss. An I2C-enabled LCD provides a local interface for displaying instantaneous values of voltage, current, power, and cumulative consumption.
For remote monitoring, the ESP32’s built-in WiFi module establishes a connection to a cloud-hosted web server. Data is transmitted at 20-second intervals via the HTTP protocol, ensuring near real-time availability. A responsive web interface, developed using HTML, CSS, and JavaScript, provides users with a dashboard view of key metrics, recharge functionality, consumption statistics, and remote load control.
System construction was carried out on a veroboard for reliable interconnection of components, and the final assembly was enclosed in a ventilated plastic casing for safety and environmental protection. Testing procedures included functional verification, measurement accuracy assessment, transmission reliability evaluation, and power regulation analysis. The integrated system demonstrated accurate energy tracking, reliable prepaid credit management, and seamless interaction between local and remote monitoring platforms.

Design Result
The result of the designed circuit is presented in Figure 2.
ESP 32 is the brain of the entire work. It was used to process and send a required signal to the respective component where it was executed.

The 240V AC is supplied to the load, PZEM-004T sensor and the power converter. The power converter converted the AC to 12V DC and then stepped it down to 5V DC through the buck converter to power the ESP32, LCD, SD card module and the relay. The ESP32 is initialized, connected to WiFi, and interfaced with the PZEM-004T sensor and LCD. The sensor reads the data -the voltage, current, power, and energy consumed. These data were processed by the ESP32, displayed on the LCD, stored locally on the SD card, and transmitted to the website interface. The website-interface clearly displays the unit in kilowatt-hours (kWh). As connected load is consumed by the end user, the system continuously tracks and updates the remaining energy units. These updates occurred every 20 seconds. Furthermore, the system included a control feature, relay 1 and 2, to disconnect the load at user’s discretion. This could be done manually or remotely. The user is thus given full control over their energy usage whether they were onsite or not.
The developed system effectively shows the feasibility of integrating prepaid metering with WiFi technology for enhanced energy management. Compared to conventional prepaid meters, the WiFi-based system provides greater convenience, real-time feedback (in terms of energy consumption and energy balance), persistent logging of data, and remote monitoring of voltage, current and electrical energy. Its ability to measure consumption accurately, log data, and allow manual load disconnection from the web dashboard ensures strict adherence to prepaid usage while giving users more control.
Construction Result
The construction of the work is presented in Figure 3.
The case, which is plastic, houses all the components. The housing provides security to the components against mechanical damage and ingression to water.
After the components were soldered and tested to ensure the device was working as expected, it was then placed in the plastic casing.

The project functioned as expected. At system startup, the LCD displayed the current, voltage, and energy values which are shown in figure 4.

The users could access detailed information on energy consumption, both as numerical values and graphical representations, through the website. When a phone was connected to the system, the LCD display updated values; voltage = 222.9 V, current = 0.08 A, power = 13 W and energy = 0.038 kWh. The details are shown in figure 5.

When a phone and a laptop were connected to the system, the LCD display updated values; voltage = 222.2 V, current = 0.1 A, power = 21.8 W and energy = 0.541 kWh. The details are shown in figure 6.

The number of available units then began to decrease over time, reflecting real consumption, and this could also be monitored remotely via the website. Finally, after some time, the load was disconnected remotely through the action of the relay, successfully demonstrating the system’s ability to control appliances. From
Figure 4. , 5 and 6, Table 1 was computed for clarity.
Table 1 contains the measured values obtained from the device while it was tested after construction.
| S/N | Load | Voltage (V) | Current (A) | Power (W) | Energy (kWh) |
|---|---|---|---|---|---|
| 1 | No Load | 222.7 | 0.0 | 0.0 | 0.000 |
| 2 | Phone | 222.9 | 0.08 | 13 | 0.038 |
| 3 | Phone + Laptop | 222.2 | 0.1 | 21.8 | 0.541 |
The Bill of Engineering and Measurement Evaluation is presented in Table 2.
| ITEM NO | DESCRIPTION OF MATERIAL | QTY | UNIT RATE (₦) | TOTAL COST (₦) |
|---|---|---|---|---|
| 1 | ESP 32 | 1 | 15,000 | 15,000 |
| 2 | PZEM Module | 1 | 20,000 | 20,000 |
| 3 | Current Sensor | 1 | 3,000 | 3,000 |
| 4 | SD Card Module | 1 | 2,000 | 2,000 |
| 5 | SD Card | 1 | 4,000 | 4,000 |
| 6 | 13 Amp Socket | 1 | 500 | 500 |
| 7 | Buck Converter | 1 | 2,500 | 2,500 |
| 8 | Vero Board | 1 | 1,000 | 1000 |
| 9 | LCD | 1 | 3,500 | 3,500 |
| 10 | Soldering Led | 1 | 1,500 | 1,500 |
| 11 | Connecting Wires | 1 | 1,500 | 1,500 |
| 12 | Switch | 2 | 500 | 1,000 |
| 13 | Power Cable | 1 | 1,500 | 1,500 |
| 14 | Power Converter | 1 | 8,000 | 8,000 |
| 15 | Casing | 1 | 4,000 | 4,000 |
| 16 | Tape | 2 | 1,000 | 2,000 |
| 17 | Hot Glue Gum | 5 | 400 | 2,000 |
| 18 | Shipping Fee | 1 | 5,000 | 5,000 |
| 19 | Transportation | 1 | 3,000 | 3,000 |
| 20 | Miscellaneous | 9,000 | 9,000 |

The design and implementation of a Wi-Fi–based prepaid energy meter monitoring system was developed. It successfully measured voltage, current, power and energy consumption when load is connected without the use of a Sim Card or mobile network but WiFi.
The Wi-Fi–based prepaid meter is a reliable solution for energy management. It eliminates the need for manual meter checks, increases transparency for users, and provides electricity providers with a more efficient way of monitoring consumption remotely other than mobile networks. The overall benefit of this work surpasses the cost of production.
The design is well-suited for households, businesses, and institutions where internet connectivity is available, making it a viable step toward smarter energy distribution systems.