Developmentof Prepaid Electricity Payment Systemfora University Community Usingthe LUHNAlgorithm
Developmentof Prepaid Electricity Payment Systemfora University Community Usingthe LUHNAlgorithm
net/publication/322679183
CITATIONS READS
5 2,623
3 authors:
Sanjay Misra
Covenant University Ota Ogun State, Nigeria
673 PUBLICATIONS 4,790 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
A model for securing Educational Data using Agent Based Blockchain Technology View project
All content following this page was uploaded by Oluranti Jonathan on 08 June 2018.
1. Introduction
There have been several efforts in Nigeria and other parts of the world to build
similar systems for various reasons and needs of people. In 2006, [4] designed and
implemented a SMS -based control for monitoring systems. The SMS component
was used for status reporting such as power failure. However, the work did not
consider issues that concern billing for electricity usage.
The work of [5] proposed a method for using telecommunication systems to
automate transmission of data to facilitate bill generation at the server end and also to
the customer via SMS, Email. [6] also developed a card reader-based prepaid
electricity metering system but for a multiphase system. The work of [7] focused on
the controlling of home appliances remotely and providing security when the user is
away from the place using an SMS- based wireless Home Appliance Control.
[8] developed an energy efficient and low cost solution for street lighting system
using Global System for Mobile communication [GSM] and General Packet Radio
Service [GPRS]. The whole set-up provides the remote operator to turn off the lights
when not required, regulate the voltage supplied to the streetlights and prepare daily
reports on glowing hours
[9] proposed in their paper, a prepaid energy meter behaving like a prepaid mobile
phone. The meter contains a prepaid card analogous to mobile SIM card. The prepaid
card communicates with the power utility using mobile communication infrastructure.
Once the prepaid card is out of balance, the consumer load is disconnected from the
utility supply by the contactor. The power utility can recharge the prepaid card
remotely through mobile communication based on customer requests. The work of
[12] focused on the design and implementation of an intelligent sms-based remote
metering system. [10] and [11] are both online and web-based platforms respectively
for bill payments but not for prepaid purposes.
The LUHN formula was created by IBM scientist Hans Peter Luhn and described in
U.S. Patent No. 2,950,048, filed on January 6, 1954, and granted on August 23,
1960[10]. Because the algorithm is in the public domain, it can be used by anyone.
We used an algorithm based on the luhn algorithm for the generation and verification
of the pin created by the system. The LUHN formula is widely used to generate the
check digits of many different primary account numbers. Almost all institutions that
create and require unique account or identification numbers use the Mod 10
algorithm. The algorithm is in the public domain and is in wide use today. It is
specified in ISO/IEC 7812-1. It is not intended to be a cryptographically secure hash
function; it was designed to protect against accidental errors, not malicious attacks.
Most credit cards and many government identification numbers use the algorithm as a
simple method of distinguishing valid numbers from mistyped or otherwise incorrect
numbers.
Based on ANSI X4.13, the LUHN formula (also known as the modulus 10 -- or mod
10 -- algorithm) is used to generate and/or validate and verify the accuracy of credit
card numbers.
Most credit cards contain a check digit, which is the digit at the end of the credit card
number. The first part of the credit-card number identifies the type of credit card
(Visa, MasterCard, American Express, etc.), and the middle digits identify the bank
and customer.
To generate the check digit, the LUHN formula is applied to the number. To validate
the credit-card number, the check digit is figured into the formula.
Here's how the algorithm works for verifying credit cards; the math is quite simple:
i. Starting with the second to last digit and moving left, double the value of all
the alternating digits.
ii. Starting from the left, take all the unaffected digits and add them to the results
of all the individual digits from step 1. If the results from any of the numbers
from step 1 are double digits, make sure to add the two numbers first (i.e. 18
would yield 1+8). Basically, your equation will look like a regular addition
problem that adds every single digit.
iii. The total from step 2 must end in zero for the credit-card number to be valid.
2 System Requirements
A requirement states what a product or service is intended to perform. It takes into
consideration the attributes and characteristics that a system is expected to possess so
as to meet the need of a user.
i. Users and Administrators must login to access the services.
ii. Users must be able to provide required information when required to.
iii. The system should provide a notification to customers showing success or
failure of their transaction which could serve as a receipt.
iv. The system should be able send an email containing the pin to a user’s email
address.
v. The system should be able to display available amount of electricity energy
credit units for purchase and the price.
vi. The system should be able to provide a payment method.
vii. The system should keep transaction history.
viii. The system should be able to generate electricity energy credit units pins for
STS Meters
ix. The system should be able to verify legit pin and give notification of wrong or
already used pin.
System design is the process of defining the components, interfaces, modules, data
and architecture for a system to satisfy the specified requirements. This could also be
seen as the applications of systems theory to product development. Modeling helps
the system analyst understand the functionalities of the system. It is also used to
validate the software requirement by examining from a different point of view.
Modeling is used to design a software application before coding begins. The Unified
Modeling Language (UML) is used in this paper to describe the system from various
perspectives.
Admin Login
no
Is login
valid?
yes
Select user
management
View transaction
history
4 System Implementation
SQL Server Management Studio (SSMS) was used as the relational database due to
its flexibility easy to use GUI and the easy integration it allows for with Visual Studio
as they are both products of Microsoft. Bootstrap was used to style the web interface
of the system to ensure easy and user friendly GUI. Visual studio 2012 was used as
the Integrated Development Environment (IDE) and ASP.Net and C# as backend for
design of this project. Visual studio was used because of its adaptability. The
implementation consists of three major modules which are user interface, energy
meter interface and administrator interface. Figures 3 and 4 below are sample
snapshots of the system implementation.
Figure 3 below represents the user-friendly login screen. To gain access into the
system, a user is required to supply a valid email and password for authentication.
The use of email for login purpose was adopted because it easy for users to remember
emails. Emails are also unique worldwide and this eliminates issues of collisions in
usernames. The use of email also makes it easy to contact a user in case of
emergency. Figure 4 shows a pin (4012331580375712) that was generated using the
Luhn algorithm and loaded on the application. The new balance (00781.11) also
shows on the virtual meter.
7. Malik, S.H., Aihab, K. and Erum, S.: SMS-Based Wireless Home Appliance
Control System (HACS) for Automating Appliances and Security. Issue in
Informing Science and IT. 6:887-894 (2009).