Development of an SMS-Based Prepayment Energy Meter Monitoring System for Consumers and Utility Companies

: In this paper, a Short Message Service (SMS) Based Prepayment Energy Meter Monitoring System for Consumers and Utility Companies is developed. This is borne out of the desire of consumers to be able to monitor their meters especially their consumption. Also, the utility companies need to be able to monitor energy meters wirelessly especially for energy auditing and other control as may be needed. The Energy Meter consists of ADE7755 for consumption pulse measurement which is recorded by arduino Atmega328P. The recorded pulses are sent to Atmega2560, the main controller of the system on its request for update every second. This controller also manages unit according to consumption and other activities of the meter. It is made SMS capable by interfacing Atmega2560 with SIM900 Global System for Mobile Communications (GSM) module. The system also has a server consisting of Atmega328P and SIM900 GSM module that enables the utility company to access the meter. The server is interfaced to a PC which is used for management and administrative Platform. The SMS communication command is developed in C++ to achieve the monitoring functionality of the metering system. The SMS duration test shows a mean time of 32.7s with a standard deviation of 13.71. The SMS Command Reliability Test carried out shows a success rate as high as 100% and the highest failure rate of 5.88%. The results obtained show that GSM-Based SMS is a good platform for energy meter monitoring.


Introduction
Prepayment Energy Meter is a veritable tool for electrical energy consumption measurement for both the electricity distribution companies and the consumers. Also, the awareness on the need for more prudent management of energy, especially electricity, demands an improvement on this tool of measurement. The prepayment meter as an electronic equipment is intelligent and therefore is able to keep record of events of its operations in databases. In most traditional prepayment meters, some of these records can only be accessed through the keypad and the display on the screen. This is so because the meters are not made to be accessible wirelessly and therefore they cannot be monitored remotely through wireless means. For example, the unit balance as well as unit consumption cannot be obtained by sending Short Message Service (SMS) to the meters. Again, meters are not able to report last token recharge; time of power failure and restore on demand through SMS from mobile devices.

Literature Review
Sounak and Kiran noted in their work that the SMS standard is supported by various communication networks namely, the Global System for Mobile communications (GSM), Code-Division Multiple Access (CDMA2000) and Digital Advanced Mobile Phone Service (D-AMPS) [1]. The GSM-Based SMS can be a veritable platform for wireless monitoring of Prepayment meters. In line with the above, Rohit et al. proposed an Energy Meter that will communicate using GSM network and in a like manner, some researchers used GSM technology to keep track of the real-time consumption of power by sending messages to consumers about the consumption of power and also alerting them at the minimum level of units [2], [3]. Again, Subhasis et al. Monitoring System for Consumers and Utility Companies proposed a Prepaid Energy Meter based on SMS technology. The GSM modem sends notification and warning SMS to consumer for further recharge of energy units when the balance energy unit is 50 and zero respectively [4]. Turkur et al. design a metering system of postpaid bill alert and a prepaid meter that can be recharged by using smart card. The Prepaid component used ARM Cortex M3 controller interfaced with both RFID reader and GSM module. The RFID reader was used to recharge the meter and the GSM module was used to send unit balance and low unit warning to the consumer [5]. This is also an alert system. Recently, Sheelasobanarani et al. presented a prepaid energy meter that facilitates energy consumption measurement and to know consumer's maximum demand [6]. The GSM was used to send messages to the consumers when the credit is zero. Similarly, Sukhumar et al. presented the development of automatic trip control system for energy management using GSM [7]. Some researchers in their work design a system that interfaced a circuit made up of microcontroller and a GSM modem to an existing energy meter. They used an LED to obtain the consumption pulses which are recorded and used to manage the unit. According to then this system can be recharge through SMS and consumers are notified of consumption and low unit alert with SMS. This is a means of converting traditional postpaid meter into prepaid meter and SMS is used as an alert system [8], [9]. Keshinro et al. simulated a prepaid meter for determining maximum consumption in a household using Proteus software. It used GSM SMS to receive recharge message and sends notification to the consumer. It was just a simulated work with an algorithm showing the supposed operation [10]. Most of these proposals were warning and notification systems.
Lately, with the advances in web technology, some researchers have proposed a system were power consumption measured by wattmeter is constantly transmitted to clouds and servers in the utility office using Wi-Fi module where the data can be view by all concerned; instead of using SMS as a means of sending meter readings to server in the Electricity Board as it is in AMR meter reading method [11], [12] and [13]. This is an Internet of Things (IoT) method of transmitting, storing and accessing meter reading, therefore it is not a prepaid meter.
The SMS is a means of delivery of short information through the mobile networks. SMS are sent between SMS capable devices or to and from SMS capable applications and this offers additional flexibility to service evolution that encourages creativity. Some of the rules set down in the GSM standard includes [14]: 1. It uses a store and forward method of sending and receiving messages to and from SMS capable terminals. 2. An SMS message can have up to 160 characters including alphabet, numbers and some non-text-based formats, such as binary. 3. There is always a delivery status confirmation of message sent. 4. Concatenation and compressing of messages are supported in SMS by capable devices.
5. National and international roaming is provided for by SMS. The short message service network architecture is as shown in Figure 1. The Short Message Service Center (SMSC) is the storing place of messages and also responsible for forwarding same with the help of Home Location Register (HLR) for address resolution to the destination. Whenever the receiver is not accessible, the message is kept and then resent at a later time. The SMS makes use of Signaling System Number 7 (SS7) signaling channel transmission mechanism. The SS7 signaling channel is independent of the voice channel of any call and as a result, SMS can be transmitted and delivered simultaneously with voice, data as well as fax calls. This is why a busy signal is usually not received by SMS users [15] and [14]. Even though SMS can be sent and delivered at the same time of call, data and fax services, the process might be aborted when the transmission or reception of an SMS coincides with a shift in the state of Mobile Station (MS) such as from busy to idle or vice versa and during handover [16].

Methodology
The implementation of this work involves the hardware and software stages. The hardware is the development of the energy meter while the software aspect involves the programming and monitoring commands development. The block diagram of the system is as shown in Figure 2.

The Energy Meter
The energy meter consists of two microcontrollers namely the ardiuno Atmega2560 which is used for meter control, communication and monitoring functions and Atmega328P which is use for pulse measurement from ADE775. The Atmega2560 is interfaced with a memory card for storing the information to be monitored and a Real Time Clock (RTC) used to keep track of the time of activities in the meter. It is also made SMS capable by connecting SIM900 to the Atmega2560. SIM900 module houses the Subscriber Identity Module (SIM) card holder through which the SIM Card can be inserted. ADE7755 receives inputs from the current and voltage transducers which are processed and the output are pulses on the Calibration Frequency (CF) PIN of the chip. The interface between the microcontroller and SIM900 is shown in the next section.   Monitoring System for Consumers and Utility Companies Figure 3 shows the interfacing between the two microcontrollers [17]. The pulses from ADE7755 are received in pin 4 (INT 0) of Atmega328P. This controller keeps count of these pulses and updates Atmega2560 controller every seconds at its request. Atmega2560 pin 6 (INT4) is connected to pin 15 (PCINT1) of Atmega328P and this is used to request for update from it. Pin 14 (PCINT0) of Atmega328P is connected to pin 63 (RXD3) of Atmega2560 and this is used to obtain the pulse readings for records and other operations.

Interfacing between the Microcontrollers and the GSM Modem
The SIM900 is interfaced to port H 0 (PIN 12) and 1 (PIN 13) of Atmega2560 microcontroller which are the Receive Data (RXD2) and Transmit Data (TXD2) pins. The receive data of the controller is connected to the transmit data of SIM900 while the transmit data of the controller is connected to the receive data of SIM900.
The Serial Clock (SCL) and Serial Data (SDA) terminals of the RTC are interfaced into the port D 0 (PIN 43) and 1 (PIN 44) of the controller which are the controller's SCL and SDA pins.
The SD card communicates with the microcontroller through a Serial Peripheral Interface (SPI). It is interfaced to the controller port B 0 to 3 (PINs 19-22). Terminals 7 and 2 of the SD Card are the transmit and receive terminals respectively for data. Terminal 4 is the 3.3V power supply which is pulled up through a resistor to the supply. Terminals 1, 5 and 6 are the chip select, clock and the ground respectively.

SMS Monitoring Command
Atmega2560 is programmed in C++ to read and send SMS as this is the major means of communication between the modem (SIM900) and the controller. The maximum number of SMS in the modem is nine (9) after which read messages are deleted. The following commands are developed in this work to achieve the SMS communication and monitoring of the developed meter.
1. *00# is used to disconnect meter 2. *01# is used to connect meter 3. *03# is used to view the unit balance of the meter 4. *04# is used to view energy consumed 5. *05# is used to view last power restored time 6. *06# is used to view the last recharge token (20 digits) of the meter 7. *07# is used to view the last time of power failure on the meter. 8. It is programmed to send the message "Your electricity units is running low!" whenever the units is less than 10KWh and the buzzer will sound at intervals till any key is pressed [17]. The information sourcing flow chart is as shown in Figure  4. Information sourcing is done by composing an SMS message using the appropriate command format as shown in numbers 1 to 7 above and sending it to the meter mobile phone number. The SMS is received by the GSM modem (SIM900) of the meter and transferred to the Atmega2560 controller. The controller locates the information being requested for in the storage memory; retrieves it and sends it as an SMS reply to the last mobile phone number used in communicating with the meter before the present communication. The wireless communication in this system follows the SMS protocols of the GSM. Hence, simultaneously sent SMS from different users to the same meter will obey every rule of SMS transmission and processing. Since SMS is a store-and-forward transmitting system, the first message that arrived will be processed while the other one follows.

Test
Some tests were carried out to determine the effectiveness of the system and the developed SMS commands in achieving the monitoring functionality of the system. These tests are the SMS duration and the command reliability tests.

SMS Duration Test
In this test, the time for a command sent in SMS to be received by our meter; execute the command and sends a feedback SMS to the sender was measured and the duration in each case recorded. In carrying out this test, the developed meter and a stop watch was used. MTN Nigeria Mobile Communications Network was the communication network operator used at both the developed meter and the mobile phone used in sending monitoring SMS to the meter. Seven commands were sent intermittently, and each command was sent twice and the delay in each case was observed and measured. The mean delay time was measured and recorded. The result is as shown in Table 1.

SMS Command Reliability Test
The purpose of this test is to determine the reliability of SMS as a means of using the commands developed in this work to execute the communication and monitoring functions. In carrying out this test, each command was sent in their format using the SMS platform a number of times but not consecutively to the developed meter and the numbers of successful instruction execution as well as failures were recorded in all. The total numbers of time a command was sent was different in each command. The percentage of success and failure with respect to the total number of times each command was sent was determined and presented as in Table 2.

SMS Results Snapshots
The snapshots of the SMS monitoring commands as used in this study are as presented in Figures 5,6,7,8,9,10 and 11. 42 Henry Erialuode Amhenrior: Development of an SMS-Based Prepayment Energy Meter Monitoring System for Consumers and Utility Companies

Discussions
The results obtained from SMS Duration Test and SMS Command Reliability Test in Tables 1 and 2 show that SMS as used in this research is a very good platform for achieving the communication aspects of this work.
In the SMS duration test, the minimum and maximum mean delay recorded were 19.71s and 45.71s respectively with overall mean of 32.71s. These averages were achieved in the chosen mobile network for the SMS duration test with a standard deviation of 13.71. The highest duration recorded in this test was 81s, while the shortest duration was 15s. The SMS Command Reliability Test on all commands shows success rate as high as 100% for some commands routine and the highest failure rate of 5.88% as shown in Table 2.

Conclusion
The meter developed here uses SMS for communication through the GSM modem. As shown in the Usage Command Development section, several commands are used for communication with the meter for monitoring. Some of the information the communications seek include, unit balance, unit consumed, time of power failure and time of power restore. Other monitoring communications capabilities of the meter are checking the token recharge into the meter, credit warning alert, wireless meter disconnection and connection.
The SMS communication is a two-way communication and this enables the activities of the meter to be monitored wirelessly. The results obtained show that SMS is very efficient, effective and successful in achieving the monitoring aspects of this work as proposed. The success of recording negligible duration in the SMS communication and high success rate in the command reliability test are dependent on the efficiency of the chosen mobile network, though this was not investigated.
The outcome of this work shows that the consumers and the distribution companies can communicate with the meter to obtain information through the GSM SMS platform at will. These information can be used for various purposes for the benefit of both parties especially in energy usage monitoring and auditing. With this, the objective of this work which bothers on communicating and monitoring of Prepayment Meters through SMS has been fully realized.