Professional Documents
Culture Documents
Email address:
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
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.
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
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
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
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
+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
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
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
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
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.
[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),