Pre-SEMMS: A Design of Prepaid Smart Energy Meter Monitoring System for Household Uses Based on Internet of Things

The use of prepaid smart electricity services from the State Electricity Company (SEC) for the general public in Indonesia has increased. It is because prepaid electricity has several advantages compared to postpaid electricity. One of them is that it is becoming easier for customers to manage and control their daily electricity usage. Customers can also estimate their total electricity consumption each month. However, customers still have to manually view the information on the electricity meter to find data and information on prepaid electricity. It can make it difficult for customers if the electricity meter is placed outside the house, which is quite far away. Customers must also constantly monitor the use of electricity. This article discusses a Prepaid Smart Energy Meter Monitoring System (Pre-SEMMS) design using Internet of Things technology. The design is carried out without changing the SEC's standard prepaid electricity meter system. However, a KWH meter tool that combines the Internet of Things technology and calculates and monitors electricity usage has been developed. During the experiment running for 48 hours, the credit balance of electricity decreased by over 75%. The results also show that with this system, customers can more easily find out and monitor their daily electricity consumption.


I. INTRODUCTION
Electricity has become one of the primary needs of human beings [1].It is because almost all technology and electronic devices require electricity to operate [2].Electricity consumption in Indonesia has risen year after year.Based on data released by the State Electricity Company (SEC) of Indonesia, the number of electricity customers at the end of 2021 was around 82.5 million.It has an increase of 4.49% compared to the end of 2020.In addition, the data also shows that there is a trend toward increasing the number of electricity customers each year by around 4-5%.In fact, of the total 82.5 million electricity customers, 91% are for household uses, which total about 75.5 million [3].Therefore, it shows that the demand for electricity for households in Indonesia is very high.
Postpaid and prepaid electricity users both exist in Indonesia [4].The mode of payment is the primary distinction between prepaid and postpaid services.Postpaid, as the term suggests, refers to payment after use.Prepaid refers to payment made in advance of use.People are thought to be able to reduce their expenses by using pre-paid electricity [5].There is a credit system in place for this service.Customers can purchase a credit amount to use electricity based on their unique needs.A token number is typically used as the credit and entered into the electricity meter.With each additional watt of electricity used, the credit balance will decrease [4].Customers are thought to be able to control their electricity usage by doing this [5].Customers can view the amount of credit they still owe before beginning to save.Thus, the SEC recommends that customers use prepaid electricity rather than postpaid [6].
There have been numerous studies on prepaid electricity.Among them is a study to design prepaid electricity in order to prevent electricity theft [7]- [10].Some researchers have also utilized microcontroller technology and GSM modules to design prepaid electricity systems to make them easier to monitor [11]- [16].Besides, there is also a prepaid electricity study that uses RFID technology [17], [18].With the development of IoT, various research projects have combined IoT, microcontroller, and cloud technologies to make prepaid electricity more intelligent and efficient [19]- [22].
Prepaid electricity, on the other hand, presents numerous challenges and it is a part from home automation systems [23]- [25].A monitoring system for credit balances is one of them.The users must still manually check the balance on the electricity meter.The electricity meter is typically located outside the house.It is highly inconvenient for the users to have to leave the house in order to check their electrical credit balances.Another issue is that consumers cannot check their electricity balance if they are out of town for an extended period of time.Users occasionally fail to top up the cred-it balance due to difficulty accessing the electricity meter, resulting in the amount running out without their realizing it.If this happens, then the power will go out.
This paper aims to discuss the design of a prepaid smart electricity meter monitoring system for household use with Internet of Things technology.Our contributions in this study are: 1) we designed a simple system without changing the standard prepaid electricity meter from the SEC; and 2) we made a prototype of energy meter using the PZEM-004T sensor and combined it with the Blynk IoT platform.It can calculate and monitor the electricity usage without checking the electricity meter manually.
The rest of the paper is presented as follows: related work on prepaid energy meter studies is introduced in Section 2. In Section 3, the proposed system of Pre-SEMMS is provided.Results and discussion are described in Section 4. Finally, the paper concludes in Section 5.

II. RELATED WORK
In the last decade, there have been over twenty studies about prepaid energy meters.For instance, Mohammad et al. in [8] conducted research on how to control and prevent electricity theft with a smart prepaid energy metering system.They equipped it with a GSM module.Users can easily top up their credit balance for electricity using the Short Message Service (SMS).Moreover, the system could prevent users from using the electricity illegally.A similar study has also been done by Preethi et al. in [7].The authors implemented Zigbee technology for communication between the energy meter at the household and the substation.Other related studies on preventing power theft can be found in [9] and [10].In [9], the research was only simulated with MATLAB, with no hardware or implementation.Meanwhile, [10] implemented the proposed system in real-time.The motivation for these projects was because electricity or power theft is more common in developing countries than in developed countries.
Microcontrollers and GSM modules were used by some researchers to create prepaid energy meters [11][12][13][14][15][16].[11] wanted to design a system that works similar to the mobile phone for paying the bill.The users will only pay for the amount of electricity they use, and the credit balance of electricity will be deducted.[12] designed and implemented an affordable prepaid energy meter for domestic users in Sri Lanka.The authors created a single phase 230V/40A energy meter and a prepaid module that connected to the server through GSM technology.In order to ensure that the users will pay the bills on time, [13] made a prepaid electricity meter with Arduino and GSM communications.Its designed system was an improvement over the traditional energy meter.Meanwhile, [15] created a web-based portal for displaying energy consumption data from the meter.They used Arduino UNO and GSM for communications.In addition, [16] and [14] also used Arduino UNO and GMS networks in their design of a prepaid energy meter.
Some projects utilized RFID technology in the design of prepaid energy meters.For instance, [17] studied how to design a home automation system with a prepaid energy meter.The meter was embedded with an RFID reader and a GSM module.Therefore, it is possible for the meter to communicate with a mobile phone and a RFID card.Moreover, it is similar with the research that conducted in [18].The proposed system was using Arduino UNO and GSM.The meter can inform the energy consumption to the users via GSM networks.
Furthermore, a lot of research on prepaid energy meters combined the internet of things with cloud storage.Research in [19], for instance, proposed a prepaid energy meter using the ATMega328p and ESP8266.The system can generate energy measurements and billing automatically.A web-based GUI and mobile interactive interface were made based on HTML5 features.This allowed the users to monitor and control their energy usage.Another study [20] assumed that the physical energy meter was outdated.They designed a smart energy meter so that users can access the meters' readings via customized web pages and smartphones.The necessary information can be sent to users using SMS.They built the system using Raspberry Pi devices.ThingSpeak, an IoT cloud platform, received the data.Other researchers [21] proposed a smart IoT-based energy management system.This system allowed users to control their home appliances remotely.It also offered transparency and credibility to the data.Energy consumption and its cost were calculated automatically, and then the data was sent to a server in a periodic manner.[22] developed a prepaid energy meter that can detect used energy, record it, and store it in cloud networks.Billing information and statistics on energy usage can be provided in real time.

A. SYSTEM DESIGN
The general system of the prepaid smart energy meter monitoring system (Pre-SEMMS) is shown in FIGURE 1. Pre-SEMMS is constructed using an ESP32 microcontroller for controlling the system and a PZEM-004T sensor for measuring the energy consumed by home appliances and electronic devices in households.The PZEM-004T is able to measure electric current up to 100 amperes, meaning that it can, ideally, measure a maximum power of 22000 watts with a voltage of 220 volts.The Pre-SEMMS can be used for household purposes with these specifications.The ESP32 includes a Wi-Fi module for communication.Energy measurement data from Pre-SEMMS will be sent to Blynk cloud server through a gateway with Wi-Fi.As long as there is an internet connection, users can access and monitor the data in Blynk server using a smartphone.The prototype design of Pre-SEMMS with IoT is illustrated in FIGURE 2. It consists of two main components, such as the ESP32 microcontroller and the PZEM-004T sensor.The PZEM-004T sensor has four pins that can connect to the ESP32.In addition, the sensor will be connected to a terminal socket to measure the energy consumption in the household.It enables the system to measure a maximum of 22000 watts of electricity energy at a standard voltage of 220 volts.
The flowchart of the Pre-SEMMS system is shown in FIGURE 3. At the beginning, the system is started, and ESP32 will read the credit balance of electricity on the standard prepaid energy meter.Home appliances (e.g., fridge, air conditioner, washing machine, microwave oven, rice cooker, etc.) and electronic devices (e.g., TV, personal computer, laptop, printer, fan, lamp, etc.) will be turned on as part of the daily routine.It will consume electricity.PZEM-004T is going to measure the energy consumption in households.Then, ESP32 will deduce the credit balance based on the used energy and update the current balance of electricity.The ESP32 will then either send the energy consumption and current balance data to the Blynk cloud server or return to measure the energy consumption.The data on the Blynk server will be forwarded to the Blynk client apps on the users' smartphones for monitoring the system.

B. EXPERIMENTAL SETUP
For the experimental purpose, several home appliances (e.g., fan, TV, air conditioner, and fridge) will be used.In addition, Pre-SEMMS will measure their power consumption.The scenario of experimental setup is shown in FIGURE 4. The experiment is carried out for 48 hours.The home appliances will be on and running for two days, and Pre-SEMMS will monitor and measure the energy consumption during the experiment.The fridge uses 70 watts, the AC uses 756 watts, the TV uses 50 watts, and the fan uses 50 watts.In addition, the household voltage is 220 VAC.Furthermore, Pre-SEMMS will check the credit balance of electricity and deduce it based on the energy used by home appliances.The initial credit balance is set to 100 kWh.In the scenario, some home appliances will not always be on during the experiment.The AC is on at night and off during the day.The TV and fan are set to be on during the day and off during the night.Meanwhile, the fridge is always on during the experiment.The result of Pre-SEMMS measurement is compared to a commercial power or energy meter device for the benchmark.

IV. RESULTS AND DISCUSSION
In this section, we present the results of an experiment on Pre-SEMMS.The experiment was implemented at the author's household.The house is powered by 2,200 volts.Table 4 shows the measurement of Pre-SEMMS for an air conditioner (AC) home appliance.Also, it presents the measurement of the commercial power meter (PM) device.The table provides the values of current, power, voltage, and energy of an AC home appliance.From the table, it can be seen that the results of Pre-SEMMS and PM have a different value.In addition, the difference is very small and not significant, ranging approximately from 1 to 2 points.That means that the Pre-SEMMS is working and can do its jobs successfully.Its performance is similar to that of a commercial power meter.From the data in TABLE 1, the AC has a maximum of 756 watts of electric power.However, from the measured results, the AC normally uses less than that, which is around 700 watts.For 24 hours of measurement time, AC consumes around 16.891 kWh.TABLE 2 presents the energy measurement for the TV home appliance.The TV has, ideally, an electrical power of 50 watts.However, based on Pre-SEMMS measurements, the table shows that the power of the TV ranges from 47 to 48 watts.The values are slightly different from PM measurements, which range from 46 to 47 watts.Furthermore, the TV consumed 0.2 A. For 10-and 24-hour measurements, the total energy consumed by TV is 0.485 kWh and 1.154 kWh, respectively.The energy consumption of the fridge, measured by Pre-SEMMS and PM, is shown in Table 2.The refrigerator uses 66 watts for pre-SEMMS and 64 watts for PM.The fridge was always on during the experiment, which lasted 48 hours.It consumes 0.2 or 0.3 A to operate.The total amount of energy consumed over the course of 48 hours is 3.194 kWh (TABLE 3).    5 depicts the credit balance of electricity in the Pre-SEMMS.The initial balance was set to 100 kWh.The balance decreases over time based on the energy used by home appliances (i.e., the fan, fridge, AC, and TV).After running for 48 hours, the latest balance is 25.40 kWh.Furthermore, the graphic shows that for the first 24 hours, the balance goes down rapidly compared to after 24 hours.The reason is that in the first 24 hours, all home appliances are working, and they consume a lot of energy.Meanwhile, after 24 hours, only the fridge is running.As a result, the balance decreases slowly.FIGURE 6 illustrates the energy consumption among the home appliances.It can be seen that the AC has the highest trend line for the energy consumption, even though it operates only for 24 hours during the experiment, followed by the fridge.The AC consumes 703 watts of electrical power and 16.891 kWh of energy, so it is obvious.Meanwhile, the fridge has the second highest energy consumption because it is operated full time (i.e., for 48 hours) and has an electrical power of 70 watts.Finally, the fan has the least of energy consumption which is 0.987 kWh.
Pre-SEMMS allows the user to monitor the system via Blynk client apps that can be installed on the smartphone.Pre-SEMMS sends all the information about the measurement to the Blynk cloud server.Then, Blynk client apps can access the data on the Blynk server.FIGURE 7 shows the monitoring of Pre-SEMMS from Blynk client apps on the smartphone.It presents the data for the current voltage, current, power, and energy used, as well as the current credit balance of electricity.With this, the users can have the latest information on the balance and other information easily without checking the energy meter manually.

V. CONCLUSION
Based on the results presented in this paper, it can be concluded that Pre-SEMMS is an effective and reliable system for monitoring and managing home electricity usage.The experiments conducted on various home appliances show that Pre-SEMMS can provide accurate measurements of current, voltage, power, and energy consumption.The system performs well and is comparable to commercial power meters.Furthermore, the graphical representations of energy consumption and credit balance provide a clear picture of the energy usage patterns in the household.The Blynk client apps also allow for easy monitoring of the system on a smartphone, providing real-time information about the energy consumption and credit balance.In conclusion, Pre-SEMMS can be a useful tool for households to manage their electricity usage and reduce their energy bills.It can also contribute to a more sustainable future by promoting energy efficiency and conservation.
Future research should focus on expanding the capabilities of Pre-SEMMS to include more home appliances and electrical devices.Additionally, the integration of machine learning algorithms could provide users with personalized recommendations on how to optimize energy usage and reduce costs.Another potential avenue of research could be exploring the implementation of Pre-SEMMS in larger buildings and complexes to better manage energy usage on a larger scale.Lastly, the development of more advanced and user-friendly interfaces for the Blynk client apps could improve the user experience and further promote energy conservation.

FIGURE 1 .
FIGURE 1. Design of Pre-SEMMS with IoT for household uses.The Blynk protocol allows any raw or processed data from any sensor or actuator connected to the ESP32 to be delivered to the Blynk cloud database using a data stream.Blynk is informed what kind of data is flowing across a channel by a data stream.The Blynk library firmware API and the HTTPS API are the two ways that data can be sent with Blynk.For devices that can be continuously linked to the internet, the Blynk library firmware API is used.Ethernet or Wi-Fi are two examples.The HTTPS API, on the other hand, is for mobile devices or any other circumstance that necessitates the use of the conventional HTTP protocol.

FIGURE 6 .
FIGURE 6.Energy consumption of fan, AC, fridge, and TV.

TABLE 4 displays
the Pre-SEMMS and PM measurement results for a fan home appliance.In the experiment, the fan was on for a total of 24 hours.It only operated during the day, which was 12 hours.It has an electrical power of 50 watts.However, in the measurement results in the table, it operates at 36-38 watts and consumes around 0.19 A. The energy consumption of the fan for 24 hours is 0.987 kWh.