You are on page 1of 10

American Journal of Embedded Systems and Applications

2018; 6(1): 46-55


http://www.sciencepublishinggroup.com/j/ajesa
doi: 10.11648/j.ajesa.20180601.17
ISSN: 2376-6069 (Print); ISSN: 2376-6085 (Online)

Design and Implementation of a GSM-Based Single Phase


Prepayment Energy Meter with Hybrid Recharge Mode
Henry Erialuode Amhenrior1, Fredrick Edeko2
1
Ugbow Business Unit, Benin Electricity Distribution Company/Global Utilities Mgt Coy, Benin City, Nigeria
2
Department of Electrical/Electronic Engineering, Faculty of Engineering, University of Benin, Benin City, Nigeria

Email address:

To cite this article:


Henry Erialuode Amhenrior, Fredrick Edeko. Design and Implementation of a GSM-Based Single Phase Prepayment Energy Meter with
Hybrid Recharge Mode. American Journal of Embedded Systems and Applicationsy. Vol. 6, No. 1, 2018, pp. 46-55.
doi: 10.11648/j.ajesa.20180601.17

Received: June 20, 2018; Accepted: July 9, 2018; Published: August 6, 2018

Abstract: This paper presents a GSM-based Prepayment Electric Energy Meter implemented with hybrid recharging mode:
Mobile Station (MS), Supply Authority Platform and the Keypad. The system was designed around two modules; the hardware
and software. The hardware module consists of ADE7755 used to generate the consumption pulses that are measured and
recorded by Atmega328P. Atmega2560 was used to manage the unit consumption; control and monitor the activities of the
meter. SIM900 was used to achieve the SMS recharging and communication capability. The server consists of Atmega328P
and SIM900 for communication. It is interfaced serially with the PC used for the Application Platform. The software module
consists of the Application Platform especially for token generation and Database. The SMS Command format for recharging
of the meter was also developed. The developed meter has a mean time of 133.46s, 233.3s and 311.1s to consume 0.01KWh on
a load of 320W, 200W and 160W respectively with the highest standard deviation of 1.14 at a load of 160W. The results also
show a mean time of 28.99sec in the SMS round-trip delay test for SMS recharging and 100% success rate in wireless and
keypad recharging. The GSM-based Energy Metering System developed worked satisfactorily. It is reliable and efficient for
use by the supply authority and the consumers.

Keywords: GSM-Based Energy Meter, Hybrid Recharging, SMS Command and Application Platform

There are different ways of recharging the Prepayment


1. Introduction Meter namely, the use of smart card; the use of infrared and
Over the years, the measurement of electricity has evolved the use of token through keypads [5-6]. The most prevalent
through the use of various energy meters ranging from meter type of recharge system especially in the Benin Electricity
operated on liquid movement which is analogous to sand Distribution Company of the unbundled Power Holding
watch through various electromechanical energy meters and Company of Nigeria (PHCN) is the token recharge system. In
then the Prepaid Meters [1-3]. The Prepayment meter is this system, the consumer will purchase the recharge token
electronic in nature and therefore has some level of either from the vending station at the supply authority’s
intelligence. A Prepayment Energy Meter enables the utility offices, the banks or any other authorized sales outlet.
company to collect electricity bill from consumer prior to A number of researchers including Berhanu et al. and
energy consumption. The Prepayment meter is not limited to Christopher have agreed that various forms of wireless
Automated Meter Reading (AMR), but it is also attributed communication technologies can be used to achieve wireless
with prepaid recharging ability and information exchange recharging and monitoring of energy meter [1, 7]. Some of
with the utility company pertaining to customer’s these technologies include Power Line Carrier (PLC)
consumption details [4]. In Nigeria, as at the time of this communication, Supervisionary Control And Data
research, recharge tokens were only loaded or key-in into the Acquisition (SCADA), Internet, Ethernet, Embedded RF
meters through physical contact by the use of keypad. module, Wi Fi, Bluetooth and ZigBee. These methods are
American Journal of Embedded Systems and Applications 2018; 6(1): 46-55 47

either expensive to implement and operate or require reading to an AMR [12-13]. Similarly, Jubi and Mareena
complement set up of infrastructure or short operating distant used GSM technology to keep track of the real-time
and still require field intervention of human operators or they consumption of power by sending messages to consumers
are prone to errors [8]. The GSM network is used to achieve about the consumption of power and also alerting them at the
wireless recharging of energy meter in this research because, minimum level of units [14]. This was only an alert system as
there is an already existing GSM infrastructure with a wide it never attempted recharging the meter wirelessly.
coverage in Nigeria and it supports Short Message Service Concerned with the low level of energy billed compared to
(SMS) platform that is used to load the token on the meter. energy delivered and the low level of consumers’ response to
bill payment, Anthony et al. designed an energy meter that
uses Atmega32 and a GSM modem to communicate in SMS
2. Research Survey on Recharging with the consumer in sending low level credit alert, and
Prepayment Energy Meter sending consumption information to the supply authority.
This was to ensure that the supply authority has maximum
The Electric Energy Prepayment meter is an important response in bill payment from the consumers [15]. Though,
component of the Utility Company as well as electricity they stated that the device is a prepaid meter, they however
consumer’s equipment for energy consumption measurement. did not state the means of recharging this meter.
Again, it is a new technology in electricity metering With the new trend in web technology, instead of using
therefore, it is subject to improvement in several areas. As a SMS as a means of sending meter reading to server in the
result, several researches have over the years been carried out Electricity Board in AMR, some researchers have proposed a
on different aspects of the meter gear towards its system were power consumptions measured by wattmeter are
improvement. One of such researches carried out in this area constantly transmitted to clouds using Wi-Fi module where
of prepayment meter was on measurement and billing the data can be view by all concerned [16-17]. This is an
efficiency, which was modeled and simulated based on Internet of Things (IoT) method of transmitting, storing and
artificial intelligence and cognitive approach using Matlab accessing meter readings, therefore it is not a prepaid meter.
[9]. Similarly, others focused on designing a suitable Mayur et al. proposed the interfacing of an electronic
interface circuit that makes the traditional meter functions circuitry called Eliot with a unique identification to an
exactly the same as Automatic Meter. In this approach electric meter, and a web application also designed where the
ZigBee network was used to send meter reading to Electricity device can be recharged and the consumer can view the
Board [1]. information about their real time consumption as well
Also, Tariq developed an economical prototype of through a user account created, which the consumer can log
Wireless Automatic Meter Reading System (WAMRS) in the into using a password [18]. This is a web based energy
Sultanate of Oman, in which wireless communication is consumption monitoring system and not a prepaid meter.
based on IEEE 802.15.4 ZigBee standard [3]. Chunjuan and However, Omijeh and Ighalo presented a robust and a
Junjie proposed the combination of Power Line more efficient prepaid energy metering which used the
Communication (PLC) and General Packet Radio Service existing Global System for Mobile communication (GSM)
(GPRS) to achieve meter reading transmission from the networks [19]. This proposed SMS recharge was through a
various meters to the master station for effective real-time server and not directly to the meter and the validation of the
overview of consumption by the utility company and the token was outside the meter.
user, thus promoting improvement in energy management
and budget planning [10]. This was to ensure backup of
transmission link in AMR system through redundancy 3. Materials and Method
arrangement. Boyina et al. in their research interfaced a GSM The implementation of this work was done in two stages.
module addressed with AT Command to a PIC16F877A These include the hardware and the software stages of
microcontroller to take meter readings continuously and send implementation in this order. These enabled the objectives of
the readings to the Electricity Board by SMS [11]. This was this work to be realised.
an aid to accurate meter reading in AMR which reduces the
labour and man hour required by personnel in manual meter 3.1. Hardware Implementation
reading in a post-paid metering system. Rachitha et al., and
Diya with Alpha while working in their separate projects The hardware component of the design is as shown in
proposed a wireless method to replace the manual means of Figure 1. It consists of the energy meter section and the
taking meter readings for billing purpose. They interfaced the supply authority section linked by GSM network coverage.
existing meter to a microcontroller which in turn is interfaced The power supply of the system is not represented here. The
to a GSM modem used for SMS communications with power supply of the meter is transformerless. The power
mobile phones and electricity provider. This enables data to supply of the server/supply authority circuit is sourced from
be transmitted from the meter to the supply authority, the computer used through the USB port of the system. This
processed and then the generated bill sent through SMS to provides the 5Vdc required for the operations of its
the consumer. This is an improvement of the postpaid meter microcontroller and other circuitry in the system. The stages
of the hardware implementation are discussed in the
48 Henry Erialuode Amhenrior and Fredrick Edeko: Design and Implementation of a GSM-Based Single Phase
Prepayment Energy Meter with Hybrid Recharge Mode

following subsections.

Figure 1. System Hardware Block Diagram.

divider rule with C9 as a filtering (decoupling) capacitor for


3.1.1. Interfacing Between the Microcontrollers this voltage signal channel which is also fully differential.
The two microcontrollers in this design are the The ADE7755 output frequency (CF) in PIN 22 is connected
Atmega2560 and Atmega328P. Atmega328P is dedicated to to the optocoupler for noise isolation before connecting to the
monitoring pulses generated from the ADE7755 for interrupt 0 (PIN 4) of the microcontroller (Atmega328P).
measuring the energy consumption through the meter. These
pulses are received in the controller pin 4 (INT 0). This 3.1.3. DE7755 Design and Calibration
controller keeps count of these pulses and updates the Hardware configuration Parameter:
Atmega2560 controller every second at its request. Gain = 1, G1 = G0 = 0 and SCF = 0, S1= S0 = 1, f1-4 = 13.6
Atmega2560 pin 6 (INT 4) is connected to pin 15 (PCINT1) and Vref = 2.5V
of Atmega328P and this is used to request for update from it. Line Input Voltage = 220V (Nominal)
Pin 14 (PCINT0) of Atmega328P is connected to pin 63 Counter (on F1, F2) = 100imp/kWh; Meter constant =
(RXD3) of Atmega2560 and this is used to obtain the pulse 2048imp/kWh
readings for records and other operations. Figure 2 shows the Design Specification: Imax = 80A (with Ib = 5A) [20] Shunt
interface connection between the microcontrollers. size used = 80Ω//10kΩ = 12.6mΩ
Therefore, Voltage across shunt (V1) at Ib = 5A x 12.6mΩ
3.1.2. The Energy Measurement IC (ADE7755) = 63mV
Connections
The ADE7755 IC is one of the most important components Frequency
.
[20] (1)
in this work as the energy measurement is carried out in this
chip. Figure 3 shows the connections. Therefore, V2 = 27mV (rms)
The important inputs of ADE7755 used in this work are During calibration, 0.1Unit = 0.1kWh drops in 2mins13sec
the transducer inputs. PINs 5 and 6 are the analog current with a load of 320Watts with 132673 pulses.
input Pins of the IC and they are fully differential inputs. The Pulse/KWh = 1326730 (by extrapolation)
signal from the current transducer are fed into the IC through Therefore, Frequency = 132673/133 = 997.54Hz
a current limiting resistor of 10k each with C6 and C8 as For any frequency F, F/997.54 =0.001F [21]
filtering (decoupling) capacitors for the current signal Hence, Power (P) at frequency F = 320 x 0.001F = 0.32F
channel. Similarly, the voltage ratio is fed into the IC PIN 8 (watts).
through a simple voltage divider network of R12 and R13
which measures the voltage across R13 based on voltage
American Journal of Embedded Systems and Applications 2018; 6(1): 46-55 49

U1
100
AVCC
42 98
PL7 AREF D5
41
PL6
40 9
PL5/OC5C PE7/ICP3/CLKO/INT7
39 8
PL4/OC5B PE6/T3/INT6
38
PL3/OC5A PE5/OC3C/INT5
7 R14
37 6 220k From ADE7755
PL2/T5 PE4/OC3B/INT4
36 5
PL1/ICP5 PE3/OC3A/AIN1
35 4
PL0/ICP4 PE2/XCK0/AIN0
3
PE1/TXD0/PDO
82 2
PK7/ADC15/PCINT23 PE0/RXD0/PCINT8/PDI
83
PK6/ADC14/PCINT22
84 50
PK5/ADC13/PCINT21 PD7/T0 U7
85 49
PK4/ADC12/PCINT20 PD6/T1
86 48 2 14
PK3/ADC11/PCINT19 PD5/XCK1 PD0/RXD/PCINT16 PB0/ICP1/CLKO/PCINT0
Atmega2560

87 47 3 15
PK2/ADC10/PCINT18 PD4/ICP1 PD1/TXD/PCINT17 PB1/OC1A/PCINT1
88 46 4 16
PK1/ADC9/PCINT17 PD3/TXD1/INT3 PD2/INT0/PCINT18 PB2/SS/OC1B/PCINT2
89 45 5 17
PK0/ADC8/PCINT16 PD2/RXD1/INT2 PD3/INT1/OC2B/PCINT19 PB3/MOSI/OC2A/PCINT3
44 6 18
PD1/SDA/INT1 PD4/T0/XCK/PCINT20 PB4/MISO/PCINT4
79 43 11 19
PJ7 PD0/SCL/INT0 PD5/T1/OC0B/PCINT21 PB5/SCK/PCINT5
69 12 9
PJ6/PCINT15 PD6/AIN0/OC0A/PCINT22 PB6/TOSC1/XTAL1/PCINT6
68 60 13 10
PJ5/PCINT14 PC7/A15 PD7/AIN1/PCINT23 PB7/TOSC2/XTAL2/PCINT7

Atmega328P
67 59
PJ4/PCINT13 PC6/A14
66 58 AREF 21 23
65
PJ3/PCINT12 PC5/A13
57
+5V 20
AREF PC0/ADC0/PCINT8
24
PJ2/XCK3/PCINT11 PC4/A12 AVCC PC1/ADC1/PCINT9
64 56 25
PJ1/TXD3/PCINT10 PC3/A11 PC2/ADC2/PCINT10
63 55 26
PJ0/RXD3/PCINT9 PC2/A10 PC3/ADC3/PCINT11
54 27
PC1/A9 PC4/ADC4/SDA/PCINT12
27 53 28
PH7/T4 PC0/A8 PC5/ADC5/SCL/PCINT13
18 1
PH6/OC2B PC6/RESET/PCINT14
17
PH5/OC4C PB7/OC0A/OC1C/PCINT7
26 C32
16 25 100n ATMEGA328P A
PH4/OC4B PB6/OC1B/PCINT6
15 24
PH3/OC4A PB5/OC1A/PCINT5
14 23
PH2/XCK2 PB4/OC2A/PCINT4
13 22
PH1/TXD2 PB3/MISO/PCINT3
12 21
Figure 2. Interfacing between the Microcontrollers.

+5 volts supply
From main supply

Voltage Divider C13 C14


10uF 100nF
C15

To PIN 4 (INT0) of ATMEGA328P A


R12 1 24
10uF DVDD F1
10k
R13 C9 C16 2 23
AC/DC F2 U2
10k 1nF 100nF
3 22 TO INTERRUPT 1 6 +5VDC
AVDD CF
4 21 5
NC DGND 2
From Current transducer

5 20
R1110k V1P REVP
ADE7755

4
6 19
V1N NC C17 OPTOCOUPLER-NPN
C8 7 18 R18
V2N CLKOUT
100nF Voltage Tranducer input 8 17 100nF
10k
R5 10k V2P CLKIN
X2
C6 9 16 CRYSTAL
RESET G0
100nF 3.58MHz
10 15
REF IN/OUT G1
C10 11 14 C18 100nF
AGND S0
C11 C19
10uF 100nF 12 13 10uF C20
SCF S1
10nF
C12
10nF

Figure 3. ADE7755 connections.

The 192X64 Dots matrix LCD has its eight data lines
3.1.4. The Keypad and LCD Connections interfaced to the port A PINs 71 to 78 which are address data
The Keypad and the LCD are the meter user input input/output ports. The LCD is a three page display with
interface unit (UIU) and output display unit (ODU) three column select (CS1, CS2 and CS3), Reset (RS),
respectively apart from the interaction from the mobile Read/Write (R/W) and chip enable (EN) interfaced to
devices and the supply authority server. The interfacing of microcontroller PINs 35, 37, 15, 41, 40 and 39 respectively
these units to the microcontroller are shown in Figure 4. in that order.
The keypad rows are interfaced to the microcontroller port
K PINs 85, 86, 87 and 89 which are pin change interrupt 3.1.5. Other Microcontroller Interfaces
(PCINT) pins, the columns are interfaced to port D PINs 45, Among these interfaces are the SIM900, the Real Time
46 and port E PIN 7 which are interrupt pins 2, 3 and 5 Clock (RTC), the Buzzer, the SD Memory Card, the Tamper
respectively. Switch and the Output Power Control interface. Figure 5
50 Henry Erialuode Amhenrior and Fredrick Edeko: Design and Implementation of a GSM-Based Single Phase
Prepayment Energy Meter with Hybrid Recharge Mode

shows these interface connections. 3.2. Software Implementation for Recharging


The SIM900 is interfaced to the port H 0 (PIN 12) and 1
(PIN13) of the microcontroller which are the Received Data The software implementation of this work is mainly in
(RXD2) and Transmit Data (TXD2) pins. The receive data of three areas namely the recharge command development; the
the controller is connected to the transmit data of SIM900 microcontrollers programming that ensures meter correct
while the transmit data of the controller is connected to the operations and the Application Platform development.
receive data of SIM900. The DS1307 real time clock (RTC) 3.2.1. SMS Recharging
is connected to the controller through the I2C protocol. The This involves the development of commands in C++
integration of the crystal resonator enhances the long-term Language which can be used to send SMS in SMS capable
accuracy of the device. The Serial Clock (SCL) and serial devices to recharge the meter. “*02#TOKEN” is the
data (SDA) terminals of the RTC are interfaced into the port command. This command is used to recharge token
D 0 (PIN 43) and 1 (PIN 44) of the controller which are the remotely/wirelessly to the meter. The *02# command is
controller’s SCL and SDA pins. The SD card communicates followed by the 20 digit recharge token. When the token is
with the microcontroller through an SPI interface. The SPI is recharged with this command, it uses the decryption
a synchronous serial data link made up of four wires: one for algorithm to check the validity of the token and then accepts
the clock signal, one for the data in one direction, one for the it and increment the unit value by an amount that is
data in the opposite direction and one to select the chip. It is decrypted and writes the new unit balance in Kilowatt hour to
interfaced to the controller port B 0 to 3 (PINs 19 to 22). The a location in the EEPROM or rejects the token if it fails the
buzzer is interfaced to the controller port F5 (PIN 92) decryption test. After successful decryption and the token is
through a 555-timer, while the tamper switch is connected to discovered to have been used previously by the meter, it will
the controller port B5 (PIN 24) and pulled up to +5V through reject the token and sends the message “this recharge card
a 10k resistor R1. Figure 6 shows picture of the developed has been used!” to the customer [22]. Figure 7 shows a
metering system. snapshot of the use of *02# command and the feedback from
the meter.

LCD1
192X64 DOTS

U1
30 97
RESET PF0/ADC0
96
PF1/ADC1
34 95
XTAL1 PF2/ADC2
33 94
XTAL2 PF3/ADC3
93
PF4/ADC4/TCK
Atmega2560

78 92
PA0/AD0 PF5/ADC5/TMS
77 91
PA1/AD1 PF6/ADC6/TDO
76 90
PA2/AD2 PF7/ADC7/TDI
75
PA3/AD3
74 51
-Vout

PA4/AD4 PG0/WR
GND
VCC
RST
DB7
DB6
DB5
DB4
DB3
DB2
DB1
DB0

CS2
CS1
R/W

73 52
CS3
RS
V0

PA5/AD5 PG1/RD
A

72 70 COL 1 COL 2 COL 3


PA6/AD6 PG2/ALE
71 28
PA7/AD7 PG3/TOSC2
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
20

+5VDC
19

29
1

3
PG4/TOSC1
19 1
PB0/SS/PCINT0 PG5/OC0B
20
R3 21
PB1/SCK/PCINT1
PB2/MOSI/PCINT2 PH0/RXD2
12
A 1 2 3
22 13
1k PB3/MISO/PCINT3 PH1/TXD2
23 14
PB4/OC2A/PCINT4 PH2/XCK2 CS3
24 15
R4 25
PB5/OC1A/PCINT5
PB6/OC1B/PCINT6
PH3/OC4A
PH4/OC4B
16
B 4 5 6
330k 26 17
PB7/OC0A/OC1C/PCINT7 PH5/OC4C
VCC (+5VDC)

18
PH6/OC2B
53 27
54
PC0/A8
PC1/A9
PH7/T4 C 7 8 9
55 63
PC2/A10 PJ0/RXD3/PCINT9
56 64
PC3/A11 PJ1/TXD3/PCINT10
57 65
58
PC4/A12
PC5/A13
PJ2/XCK3/PCINT11
PJ3/PCINT12
66
D 0 #
59 67 MENU
PC6/A14 PJ4/PCINT13 ENTER
D2 60 68 EXIT
PC7/A15 PJ5/PCINT14
STATUS 69
CS1
CS2
CS3

PJ6/PCINT15
RW
RS
EN

43 79
PD0/SCL/INT0 PJ7
44
PD1/SDA/INT1
COL 1 45 89 ROW 1
PD2/RXD1/INT2 PK0/ADC8/PCINT16
COL 2 46 88
PD3/TXD1/INT3 PK1/ADC9/PCINT17
47 87 ROW 2
PD4/ICP1 PK2/ADC10/PCINT18
48 86 ROW 3
PD5/XCK1 PK3/ADC11/PCINT19
49 85 ROW 4
PD6/T1 PK4/ADC12/PCINT20
50 84
PD7/T0 PK5/ADC13/PCINT21
83
PK6/ADC14/PCINT22
2 82
PE0/RXD0/PCINT8/PDI PK7/ADC15/PCINT23
3
PE1/TXD0/PDO CS1
4 35
PE2/XCK0/AIN0 PL0/ICP4
5 36
PE3/OC3A/AIN1 PL1/ICP5 CS2
6 37
PE4/OC3B/INT4 PL2/T5
COL 3 7 38
PE5/OC3C/INT5 PL3/OC5A EN
8 39
PE6/T3/INT6 PL4/OC5B RW
9 40
PE7/ICP3/CLKO/INT7 PL5/OC5C RS
41
PL6
98 42
AREF PL7
100
AVCC
ATMEGA2560

Figure 4. Keypad and LCD Connection.


American Journal of Embedded Systems and Applications 2018; 6(1): 46-55 51

U1
30 97
RESET PF0/ADC0
96
Tamper Switch PF1/ADC1
+5VDC R1 34
XTAL1 PF2/ADC2
95
33 94 RL1
XTAL2 PF3/ADC3 Relay
10k 93
PF4/ADC4/TCK
78 92
PA0/AD0 PF5/ADC5/TMS
77 91

Atmega2560
PA1/AD1 PF6/ADC6/TDO
76
PA2/AD2 PF7/ADC7/TDI
90 Q1
75 BC547
PA3/AD3
74 51
PA4/AD4 PG0/WR
73 52
PA5/AD5 PG1/RD
72 70
PA6/AD6 PG2/ALE
+5VDC R8 71
PA7/AD7 PG3/TOSC2
28
PG4/TOSC1
29 R2 D1
22k 19 1 47k
PB0/SS/PCINT0 PG5/OC0B
20
PB1/SCK/PCINT1
21 12
PB2/MOSI/PCINT2 PH0/RXD2
22 13 DIODE
PB3/MISO/PCINT3 PH1/TXD2
23 14
PB4/OC2A/PCINT4 PH2/XCK2
24 15
PB5/OC1A/PCINT5 PH3/OC4A
25 16
PB6/OC1B/PCINT6 PH4/OC4B
26 17
1 2 3 4 5 6 7 8 PB7/OC0A/OC1C/PCINT7 PH5/OC4C U2
18 R6

8
9 PH6/OC2B
53 27 670k
PC0/A8 PH7/T4
54 4 3

VCC
PC1/A9 R Q
55 63
PC2/A10 PJ0/RXD3/PCINT9
56 64 7
PC3/A11 PJ1/TXD3/PCINT10 DC
57 65 BUZ1
SD Memory 58
PC4/A12 PJ2/XCK3/PCINT11
66 5
Card 59
PC5/A13 PJ3/PCINT12
67
CV
R7
PC6/A14 PJ4/PCINT13
60 68 670k
PC7/A15 PJ5/PCINT14
69
PJ6/PCINT15

GND
BUZZER
43 79 2 6
PD0/SCL/INT0 PJ7 TR TH
44
PD1/SDA/INT1
45 89 NE555
PD2/RXD1/INT2 PK0/ADC8/PCINT16

1
+5VDC 46
PD3/TXD1/INT3 PK1/ADC9/PCINT17
88 C4
47 87 10nF
PD4/ICP1 PK2/ADC10/PCINT18
R15 R16 R17 48
PD5/XCK1 PK3/ADC11/PCINT19
86 C3
10k 10k 10k 49 85 1uF
PD6/T1 PK4/ADC12/PCINT20
50 84
U4 PD7/T0 PK5/ADC13/PCINT21
83
PK6/ADC14/PCINT22
6 1 2 82
SCL X1 PE0/RXD0/PCINT8/PDI PK7/ADC15/PCINT23
5 3
SDA PE1/TXD0/PDO
4 35
PE2/XCK0/AIN0 PL0/ICP4
X3 5
PE3/OC3A/AIN1 PL1/ICP5
36
7 CRYSTAL 6 37
SOUT PE4/OC3B/INT4 PL2/T5
32.768KHz 7 38
PE5/OC3C/INT5 PL3/OC5A
3
VBAT X2
2 8
PE6/T3/INT6 PL4/OC5B
39 To Transmit Terminal of SIM900
9 40
PE7/ICP3/CLKO/INT7 PL5/OC5C
B2 DS1307 PL6
41
12V 98
AREF PL7
42 To Receive Terminal of SIM900
100
AVCC
ATMEGA2560

Figure 5. Microcontroller Interfaces.

Figure 6. As-Built Photo.


52 Henry Erialuode Amhenrior and Fredrick Edeko: Design and Implementation of a GSM-Based Single Phase
Prepayment Energy Meter with Hybrid Recharge Mode

Figure 7. *02# Command Snapshot for recharge token.

The “#” key serves as the ENTER key apart from its
3.2.2. Keypad Operations primary function. As enter key, it is used to confirm
The keypad is the manual option of interacting with this operations or a selection on any page that is opened at that
energy meter and it is a menu based system which consists of moment. These two keys retains these function even in the
five (5) main menus with each number (numbers 1 to 5 in the submenus of these main menu.
keypad) corresponding to the associated operations as shown
in table 1. 3.2.3. Application Platform
This is the platform for the administration of the system by
Table 1. Keypad Menu. the utility company and for managing the database of
Menu No Function consumers. It is made up of two parts namely the server part
1 Recharge Meter and the application platform part which is the user interface
2 View usage history (UI) part of the utility company. The application platform
3 Set Date and Time
was developed using visual studio (visual basic). The server
4 Disconnect Load
5 Clear data memory software is embedded in the Atmega328P (Arduino Uno)
microcontroller which enables it to communicate with the
In the keypad, there are numbers 0 to 9 keys, the “*” key meter through the modem (SIM900), while the application
and the “#” key. The “*” in this keypad operation serves two platform software and UI resides in the PC. Figure 8 shows
other functions apart from its primary purposes. It serves as the Application platform.
the MENU key when pressed once and EXIT key otherwise. The application platform is used to generate token and this
As the menu key, it opens up a page that displays the various token can be recharged to the meter from this platform by
operations with their corresponding number input to achieve clicking the recharge button and the token will be transferred
each of those operations. As an exit key, it closes any page to the “Test” editable textbox. Clicking the “Test” button sends
that is currently open on the screen once pressed. the token to the meter through the server hardware for recharge.
American Journal of Embedded Systems and Applications 2018; 6(1): 46-55 53

Figure 8. Application Platform.

respectively at 220V and the time taken for 0.01KWh (0.01


4. Test unit) in each case were recorded. It was done repeatedly for a
Test and measurement were carried out to determine the number of times and the mean time on each load category
compliance level of the developed meter with the objectives was obtained and recorded as shown in Table 2. The purpose
of the work. The two major test carried out were the load test of this test was to show the measuring ability of the
and the token test which are discussed in sections 4.1 and 4.2. developed meter. The smallest unit of 0.01 unit was taken as
a referenced unit of measurement. This test was carried out
4.1. Load Test with the aid of stop watch, variable load, and the energy
meter developed.
The load tests were carried out at 320W, 200W and 160W
Table 2. Load Test.

320W LOAD TEST 200W LOAD TEST 160W LOAD TEST


LAP CUM TIME IN 2 LAP CUM TIME IN 2 LAP CUM TIME IN
LAP (Y-Ῡ) (Y-Ῡ) (Y-Ῡ)2
TIME TIME SEC TIME TIME SEC TIME TIME SEC
1 2:13 2:13 133 0.25 3:54 3:54 234 0.49 5:12 5:12 312 0.81
2 2:14 4:27 134 0.25 3:54 7:48 234 0.49 5:11 10:23 311 0.01
3 2:15 6:43 135 2.25 3:54 11:43 234 0.49 5:11 15:34 311 0.01
4 2:12 8:56 132 2.25 3:54 15:37 234 0.49 5:11 20:45 311 0.01
5 2:13 11:09 133 0.25 3:52 19:30 232 1.69 5:10 25:55 310 1.21
6 2:14 13:24 134 0.25 3:53 23:24 233 0.09 5:10 26:05 310 1.21
7 2:14 15:38 134 0.25 3:53 27:17 233 0.09 5:10 31:15 310 1.21
8 2:14 17:52 134 0.25 3:53 31:11 233 0.09 5:10 36:25 310 1.21
9 2:15 20:07 135 2.25 3:53 35:04 233 0.09 5:13 41:38 313 3.61
10 2:12 22:20 132 2.25 3:53 38:57 233 0.09 5:13 46:51 313 3.61
11 2:13 24:34 133 0.25
12 2:13 26:48 133 0.25
13 2:14 29:09 134 0.25
14 2:13 31:16 133 0.25
15 2:13 33:30 133 0.25
MEAN TIME D 133.5 Σ = 11.75 MEAN TIME 233.3 Σ = 4.1 MEAN TIME 311.1 Σ = 12.9

Standard Deviation:
1. 320W Load, σ320W = √(11.75/15) = 0.88
2. 200W Load, σ200W = √(4.1/10) = 0.64
3. 160W Load, σ160W = √(12.9/10) = 1.14
54 Henry Erialuode Amhenrior and Fredrick Edeko: Design and Implementation of a GSM-Based Single Phase
Prepayment Energy Meter with Hybrid Recharge Mode

4.2. Token Test

Table 3 shows the success rate for token generation and validation by the three means of recharging the developed meter
namely SMS, Keypad and Supply Authority Application Platform.

Table 3. Token Test.

SN Description Numbers of Times Numbers of Success Numbers of Failure % of Success % of Failure


1 Token generation 40 40 0 100 0
2 Token validation 40 40 0 100 0

SMS means of recharging will still be available. This


5. Discussion developed hybrid recharge technology is a marked
improvement over the traditional method of energy meter
Having successfully develop the energy metering system recharging.
with hybrid recharging mode, it was subjected to load and The mean time of 47.5s recorded from the SMS round trip
token tests to ensure the performance ommunication show time showed that SMS platform of the GSM communication
that this form of communicatio is optimal. network is very efficient and effective in wireless recharge of
One of the quality that shows the good performance of this token into the energy meter. In order to guaranty this negligible
meter is the increase in time for the consumption of the same SMS recharging, the GSM Network Operators will be the key
unit of energy as the load decreases. This shows that the driver of the communication component to ensure a minimum
developed meter in this research is indeed an effective energy level of service provisioning and availability of network in the
measuring meter. At 320W, 200W and 160W load, the mean areas of coverage at a cost that is relatively moderate. This,
time required for the consumption of 0.01KWh for the therefore calls for a service agreement between the GSM
developed meter were 133.46s, 233.3s and 311.1s Network operators and the distribution companies
respectively with their corresponding standard deviation of Based on the results obtained, the GSM-Based single
0.88, 0.64 and 1.14. Phase Prepayment Energy Meter with hybrid recharge system
The SMS communication here is a two-way developed in this work is reliable and efficient for use by the
communication and this enables the meter to be recharged supply authority and the consumer. With this, the objectives
wirelessly and get the unit balance whenever any of the three of this work are fully realized.
means of recharging is used. A mean time of 47.5s of round
trip time was recorded for SMS recharging. The test results
of this SMS c n is very effective and successful. The results References
also show 100% success rate recharging in the three mode of
recharging the meter namely SMS, Keypad and Supply [1] R. Berhanu, V. M Ana, I. M. Gómez, R. Octavio, A. G. José,
“Upgrading of Traditional Electric Meter into Wireless
Authority Platform. Also, 100% token validation in the meter Electric Meter Using ZigBee Technology”, In: L. R. Matías,
in SMS recharging was achieved as opposed to the validation M. F. A. José, J. G. R. Juan, L. Josef, J. B. O. Francisco, and
in the server as proposed by Omijeh and Ighalo [19] and M. Antonio eds. 2011, IT Revolution- Third International
other researchers. This has shown a considerable advantage ICST Conference. Spain: Springer Berlin Heidelberg. pp 84-
over the traditional way of recharging Prepayment meters in 94, 2012.
Nigeria through one means. Again, it has help to remove [2] J. Ami and B. Mohnish, “A prepaid meter using mobile
distance as a barrier to recharging meters and the risk of odd communication”, International Journal of Engineering,
hour recharging. Science and Technology, Vol. 3, No. 3, pp. 160-166, 2011.

[3] J. Tariq, “Design and Implementation of a Wireless Automatic


6. Conclusion Meter Reading System”, Proceedings of the World Congress
on Engineering. London, July 2 - 4, Vol 1, U. K., 2008.
Prepayment Energy Meter is a veritable tool for electrical
[4] H. Mejbaul, H. Kamal, A. Mortuza, I. Rafiqul,
power consumption measurement for both the electricity “Microcontroller Based Single Phase Digital Prepaid Energy
distribution companies and the consumers. Therefore, Meter for Improved Metering and Billing System”,
improvement in the design and functioning of the meters International Journal of Power Electronics and Drive System
especially in the recharging mode is very imperative. In this (IJPEDS), Vol. 1, No. 2 pp. 139-147, 2011.
research work, a wireless GSM-Based token recharge system [5] C. Ankit, H. Yen-Chia, Pattaramon and Vuttipittayamongkol,
in addition to the keypad system, providing an alternative “Prepaid Electricity Meter”, ECE445 Senior Design.
means of recharge for the energy meter was developed. This University of Illinois at Urbana-Champaign, unpublished,
system has made token recharge more flexible, easy, and 2011.
reduces the risk of going out to key-in recharge token into [6] O. Paschal, “Recharging & Loading Energy Prepayment
meters at odd hours in environments where security is an Meter,” (2016 Available at:
issue at such time for the consumer. Most importantly, meters <https://www.naijatechguide.com/2007/11/recharging-your-
cannot be declared obsolete whenever the keypad is faulty as energy-prepayment-meter.html> [Accessed: 4 July 2016]
American Journal of Embedded Systems and Applications 2018; 6(1): 46-55 55

[7] M. Christopher, “Arduino Based Wireless Power Meter”, M. “Design and Implementation of a Single-Phase Energy Meter
Eng, Cornell University, 2010. with SMS Controlled and Monitored Recharge Capability”,
Journal of Energy and Power Engineering Vol. 10 534-539,
[8] T. H. G. Rodney, C. H. Lee, V. H. Mok, “Automatic power 2016. doi: 10. 17265/1934-8975/2016. 09. 003
meter reading system using GSM network”, The 8 Conference
(IPEC 2007). International Power Engineering. [16] Giri Prasad. S, Akesh. R, BalaPravin. C, Gokila Devi. S,
Gowri Devi. D (2017), “IoT Based Energy Meter”,
[9] B. O. Omijeh and G. I. Ighalo, “Design and Simulation of International Journal of Recent Trends in Engineering &
Single Phase Intelligent Prepaid Energy Meter”, Innovative Research (IJRTER) Conference on Electronics, Information
System Design and Engineering, Volume 4, No 1, Pp 17-29, and Communication Systems (CELICS’17) Special Issue;
2013. March, 2017. DOI: 10. 23883/IJRTER. CONF. 20170331.
013. MQVSD
[10] W. Chunjuan and Y. Junjie, “Implementation of Automatic
Meter Reading System Using PLC and GPRS”, Journal of [17] Nazmat Toyin SURAJUDEEN-Bakinde, Sunday Olufenka
Information & Computational Science, Vol 8, No 16, Pp Ayodele, Timilehin David Oloruntoba, Abdulrahaman Okino
4343–4350, 2011. Otuoze and Nasir Faruk “Development of an Internet Based
Prepaid Energy Meter” IEEE 3rd International Conference on
[11] S. R Boyina, B. Gnanasekaranathan, M. Raguram, S. Electro-Technology for National Development (NIGERCON)
Pravinkumar and P. Kamalesh, “Domestic Prepaid Energy Pp. 1125-1129, 2017.
Distribution System for Saving of Power Consumption”,
International Journal of Advanced Engineering Technology, [18] Mayur Rawte, Shrishti Sharma and Praveen Lalwani (2017),
Vol. 3, Issue 2, pp 26-29, 2012. “Smart Prepaid Energy Meter based on Internet of Things”,
International Journal of Computer Applications, Volume 171 –
[12] Rachitha. G, Raushan Kumar, Srilakshmi. S, Koustubh No. 2, Pp 23-26, August 2017.
Mishra, Suma Umesh, “GSM based Energy Meter and Billing
via SMS”, International Journal of Latest Research in [19] B. O. Omijeh and G. I. Ighalo, “Design of A Robust Prepaid
Engineering and Technology (IJLRET), PP. 209-212, 2016. Energy Metering and Billing System, JORIND, 10 (3), pp
146-153, 2012.
[13] Diya Elizabeth Paul and Alpha Vijayan (2016), “Smart Energy
Meter Using Android Application and GSM Network”, [20] Analog Devices, “Energy Metering IC with Pulse Output:
International Journal Of Engineering And Computer Science, ADE7755”, One Technology Way, Norwood, MA 02062-
Volume – Issue 5, Pp. 16058-16063, 03 March, 2016. 9106, U. S. A., 2002-2009.
[14] K. Jubi and J. Mareena, “Prepaid Energy Meter with GSM [21] I. A. A. Muzafar, “Single Phase Intelligent GSM Based Prepaid
Technology”, American International Journal of Research in Energy Meter”, B. Sc. University of Khartoum, pp 1-63, 2013.
Science, Technology, Engineering and Mathematics, Vol. 3
(2), Pp 195-198, 2013. [22] H. E. Amhenrior, “Analysis and Development of a GSM-
Based Recharging and Monitoring of Energy Metering
[15] Anthony Uwakhonye Adoghe, Victor Olugbenga Matthews, System”, PhD Thesis, University of Benin, Benin City, Edo
Peter Aigboviosa Amaize, Joseph Oluwole Oloweni, State, Nigeria, 2017.
Timilehin Fiyinfoluwa Sanni and Olayinka Ayo (2016),

You might also like