0% found this document useful (0 votes)
116 views10 pages

Contactless Smart Card Based Prepaid Gas Metering System

The document summarizes a contactless smart card based prepaid gas metering system presented at the 2014 International Conference on Industrial Engineering and Operations Management in Bali, Indonesia. The system aims to overcome limitations of an earlier prepaid gas meter by using contactless smart cards for a more secure, lower power, and user-friendly prepaid gas meter. A prototype of the new system has been developed and tested. It allows customers to purchase gas credit from various vending stations connected to a central server and pay only for the gas they consume.

Uploaded by

Mohammad Saif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views10 pages

Contactless Smart Card Based Prepaid Gas Metering System

The document summarizes a contactless smart card based prepaid gas metering system presented at the 2014 International Conference on Industrial Engineering and Operations Management in Bali, Indonesia. The system aims to overcome limitations of an earlier prepaid gas meter by using contactless smart cards for a more secure, lower power, and user-friendly prepaid gas meter. A prototype of the new system has been developed and tested. It allows customers to purchase gas credit from various vending stations connected to a central server and pay only for the gas they consume.

Uploaded by

Mohammad Saif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Proceedings of the 2014 International Conference on Industrial Engineering and Operations Management

Bali, Indonesia, January 7 – 9, 2014

Contactless Smart Card Based Prepaid Gas Metering System


Md. Liakot Ali
Institute of Information and Communication Technology
Bangladesh University of Engineering and Technology
Dhaka, Bangladesh

Mohammad Imam Hasan Bin Asad


Institute of Information and Communication Technology
Bangladesh University of Engineering and Technology
Dhaka, Bangladesh

Md. Saiful Islam


Institute of Information and Communication Technology
Bangladesh University of Engineering and Technology
Dhaka, Bangladesh

Abstract
Natural gas is one of the most important resources of energy in the whole world. It is used for domestic, commercial
and industrial purpose. As the resource is limited a precaution should be taken to minimize misuses and wastage of
gas. Earlier a prepaid gas meter was designed, developed and 4500 meters were installed in the customer’s premises.
However there were some limitations of the meters. In this paper a contactless smart card based prepaid gas meter
system is presented for the domestic customers to overcome the limitations. A prototype of the system has been
developed and tested. It provides higher security consumes lower power and more user friendly than the earlier
version of prepaid gas meter.

Keywords
Prepaid gas meter, contactless smart card, NFC, Mifare

1. Introduction
Gas is a prominent resource of energy which is used for domestic, commercial and industrial purpose. To provide
gas for non-metered domestic customers no meter is installed at the customer end. In this case customer has to pay a
fixed monthly bill depending upon the number of burner he uses. As the customers pay a fixed amount independent
of the uses, they pay very little attention to the misuses of gas. In some cases customers use valuable gas wastefully
by drying clothes, keeping room warm or by using inefficient gas appliances. Sometimes even customers turn on
their burner whole day long just to save a stick of match. Again there are some dishonest customers who indulge in
gas pilferage. Prepaid gas system opens the eyes of the non-metered customers that they have to pay only for the
volume of the gas they will consume and thereby an awareness not to misuse gas. It will also encourage them to
save money and use the gas for useful purpose. As this system includes 2-way dataflow system, utility companies
can check the vending profile along with the consumption pattern to identify any problem at the meter end take
necessary actions. Now in Bangladesh no-metered customers have to pay 450 Tk. per month per double burner for
whatsoever gas they use. According to the present rate of domestic gas (5.165 Tk. per cubic meter) a customer
should not use gas more than 87.12 cubic meter gas. But in a survey it is found that there are a number of customers
who use 110.05 cubic meter gas per month (Titas 2009). This prepaid system can eliminate this difference and make
the customers aware against wastage and misuse of gas. This arrangement will eliminate the system loss incurred
due to use of gas in unauthorized gas appliances. The company will not also be deprived of the revenues for any
connection. In some cases at the customer end there may be gas leakage due to the problem in gas supply line which
are not known by the customers or utility companies. This problem can be identified by the uses pattern of the
customer and can be eliminated thereby.

1635
Prepaid system will enable the utility company to collect revenue in advance. In current postpaid system, there are
many cases where the customers’ could not trace their bill. Moreover, the domestic customers’ have to manually fill
a bill book, go to bank and stand in a long queue. On the other hand, the bank sometimes does not send the payment
information to the company. So the company tries to disconnect the customer’s line due to information gap between
the bank and the company. Prepaid gas metering system will help to remove all the above problems and improve
customer service significantly. Utility has to engage a number of people for disconnection and re-connection of
customer’s line. Moreover there are always dispute, arbitration etc. between customers and the utility companies. All
the above problems will be totally absent in prepaid gas metering system.

Some works have been done with smart and prepaid metering system in Khan et al. (2007), Khan et al. (2009),
McConnachie (1999), Ali et al. (2008), Mohammad (2013), Kwan and Moghavvemi (2002), Gavra et al. (2012) ,
Cowburn (2001) and MacDonald (2009). In Khan et al. (2007), Anglani et al. (2011), Deconinck et al. (2011),
Hindersah et al. (2011), Mohammad et al. (2013), Mehmood et al. (2011), Parvin et al. (2012) and Yu et al. (2010).
In Khan et al. (2007) for pulse from rotating gear i.e. consumption measurement is done optically which is power
consuming. Another disadvantage of this design is the valve control system which is also power hungry. These
problems are solved in another design in Khan et al. (2009). Later in 2010 smart card based prepaid gas meter was
designed, developed and tested in IICT, BUET for TITAS Gas Transmission and Distribution Limited, one of the
famous gas utility companies in Bangladesh. Under a pilot project 4500 meters were installed two areas in Dhaka,
Bangladesh. The previous meter installed in a customer’s house under a shade is shown in Figure 1. As the meters
are installed outdoor the shed is used to protect meters from rain. In this case each meter is used for different
customers in a house. In this design contact type smart cards were used to implement prepaid system. As in this case
the card has to be inserted to the gas meter the meter cannot be sealed perfectly. And sometimes dust particles block
the card insertion place. As in most of the cases meters are installed outside of houses and they are vulnerable to the
environment. Water and dust particle may enter the meter and damage the electronic module. The power
consumption of the meter was high and it was run with four AA size batteries. These problems are carefully studied
and solved in our new design. Another limitation of the previous design is that a customer is assigned to a zone and
the customer can’t buy credit vending station from other zones. This problem is solved by in our software design.
Though in our design a customer is assigned to a zone but s/he can buy credit form any vending station from any
zone which increases the flexibility of vending.

Figure 1: Previously designed prepaid gas meters installed in a house

1636
2. Design Architecture
In this design meters will be installed at the consumers’ places and the central server and database will be at utility
company’s secured place. For operational purpose, whole geographical area of the utility company servers may be
divided into different zones. For each zone there will be one or multiple vending stations assigned for that zone from
where customers can buy credits. All vending stations are connected to the central server through internet. In case of
internet failure customer can buy credit in the offline mode through the same station. As soon as the vending station
will be online, all credit information will be synced with the central server. This will help to increase vending
flexibility. Though each customer is assigned to a specific zone, s/he can buy credit from any other zone defined in
the central server. The whole design is shown in Figure 2. In the block diagram prepaid gas meter is the gas meter
module installed in customer’s place. A unique contactless smart card is assigned for the customer which is medium
of 2-way data flow i.e. balance recharge to the gas meter and information extraction from meter for analysis
purpose. Vending Station (VS) is a computer with internet facility in any place arranged by the utility company from
where customer can purchase credit. System Master Station (SMS) is the central server with database server where
all information is stored and processed. It is installed in a more secure location with stable internet and power
facility.

Figure 2: Contactless smart card based prepaid metering system

When a new customer requests for a gas line from utility company, first s/he is assigned a meter at customer’s house
and a smart card is assigned for him. Whenever customer wants to buy credit, s/he goes to any vending station and
buys credits. Then s/he holds the card near the meter and meter debits that amount of credit. At the same time meter
writes some information regarding meter to the card and next time customer goes to the vending station for buying
credit all information from meter is transferred to the central server through vending station. With this 2-way
dataflow communication the company can monitor the health of meter as well as usage of the customer.

2.1 Hardware Design


For this design a G1.6 diaphragm meter is used as a base meter and our electronic design is attached to that base
meter. Electronic circuit gets pulse from the base meter through magnetic reed switches. Figure 3 shows the block
diagram of our designed gas meter.

The control unit of the design is the MCU module. For the design we use ATMEGA64A, a high-performance, low-
power Atmel 8-bit AVR RISC-based microcontroller combines 64KB ISP flash memory with read-while-write
capabilities, 2KB EEPROM, 4KB SRAM (Atmel 2013). It has 53 general purpose I/O lines, 32 general purpose
working registers, a real time counter, four flexible timer/counters with compare modes and PWM, two USARTs, a
byte-oriented 2-wire serial interface, an 8-channel/10-bit A/D converter. It is a low power microcontroller which
consumes low power both in active and sleep mode. This device can operate 2.2 - 5 voltage. In our case the
electronic module is run with 3.5 V which is achieved by 3 AA batteries which are available everywhere in the
world.

The base meter includes an electronic pulse generating system with reed switches which work magnetically. It has 8
mechanical wheels that display analog usage among which 3 wheels are for fraction. A magnetic contact is fixed
with the rightmost wheel. Two other magnetic contacts are fixed with different points on the base meter with which
two reed switches are connected. Whenever the contact of the wheel is near to any of the contacts of the base meter
an electronic pulse is generated with the respective reed switch. For each rotation of the rightmost wheel, the base
meter generates two electronic pulses alternatively. These two pulses are connected to the MCU with two interrupts.
The gas meter also includes a DC brush motor which controls the valve to control gas flow. The motor is also

1637
connected with MCU through an H-Bridge driver IC Sanyo LB1836M. MCU sends signal to the LB1836M to run
the motor in desired direction.

A voltage level detector module is implemented. If the voltage level goes down below the tolerable voltage range to
run the whole circuit board perfectly, MCU saves all information to EEPROM, close the valve and shut down
normal operation. This module serves another important operation in case of sudden power down i.e. battery is
removed from the electronic board. In that case MCU saves all information and close the valve immediately.

Figure 3: Block diagram of gas meter hardware design

For displaying information a graphical LCD display SED1335 is used. But for increasing power performance, the
LCD is kept off in normal operating condition. Whenever customer press a switch mounted on the board, display
becomes active for a certain period of time and slides different information like consumption, current balance, and
active rate. It also includes icon for valve whether it is closed or open, battery and other operational information.

The smart card reader module is used to communicate with contactless smart card which uses UART protocol to
connect with MCU. The prepaid system is designed with Near Field Communication (NFC) standard to
communicate with the card from meter and vending station. It is based on Radio Frequency Identification (RFID)
standards including ISO/IEC 14443. A serial NFC reader is used to communicate with the card from. In our design
Mifare 1k card is used with the range of 6 inches. It uses contactless transmission for data and energy and no battery
is required for that. Each card has a unique serial number and uses mutual three pass authentication (ISO/IEC
DIS9798-2). The NFC reader module is not active all the time. When the push button is pressed, NFC module
becomes active. After pressing button MCU display information through display module and at the same time it
searches for valid NFC card for further operation. If customer holds the card upon the meter, MCU communicates
with the card and gets the credit information and writes back the meter’s health and consumption information.

Another important module is the power or battery module. The whole circuit is designed to run with 3.5V. To
achieve this voltage 3 AA batteries are used. A diode is used to protect the circuit board in case of reverse voltage
applied.

2.2 Firmware Design


The firmware is designed with two layers. The bottom layer is the hardware layer. In this layer for each module a
separate driver is written to communicate with that module form the MCU. The upper layer is the main firmware

1638
layer which implements the algorithm and controls the modules with the help of bottom hardware layer. Figure 4
shows the simplified flow chart of the design.

At the startup MCU loads necessary information from the EEPROM and initializes the meter and peripherals. Then
it goes to SLEEP mode to reduce the power consumption. The MCU is only waked up if any interrupt occurs. Three
types of interrupt which can occur are pulse interrupt, push button interrupt and low voltage interrupt. In each case
MCU goes to the ACTIVE mode, operates certain actions depending upon the interrupt type and goes back the
SLEEP mode again. The pulse interrupt occurs when pulse comes from any of the two reed switches. As the MCU
gets two pulses from the two reed switches per revolution of the right most wheel, an algorithm is implemented to
count one with two alternate reed switch pulses. If any switch gets faulty i.e. always open or always closed, pulse
from that reed switch is discarded. After detecting pulse MCU count usage and deduct credit depending upon the
active rate. Then it updates the valve status i.e. if balance is below the predefined threshold from the utility
company, the valve is closed. MCU waits for pulse for certain period of time. If any pulse interrupt occurs within
this period then it process the same counting and deducting balance procedure and also reset the waiting counter. If
the waiting counter expires i.e. there is no pulse within certain period of time, MCU goes back to the SLEEP mode.

1639
Figure 4: Flow chart of firmware design

Another reason for leaving the SLEEP mode is pressing the push button. Whenever someone presses the push button
the display becomes active and shows slides necessary information like consumption, remaining balance, active rate
and displays operational icons for a certain period of time. In the meantime MCU searches for valid NFC card. If
MCU gets any valid NFC card, it shows a CARD BUSY icon. MCU checks the card type and takes certain action
depending upon the card type like adding credit. Then MCU uploads necessary information to the card. After
successful operation of the card MCU shows REMOVE CARD to indicate that the customer can remove the card. If
MCU doesn’t get any valid card or customer doesn’t press the button within predefined time, MCU goes back to the
SLEEP mode again.

1640
An interrupt may come from the voltage level detector module. If low voltage is detected even in the SLEEP mode,
MCU goes to the ACTIVE mode. Then it saves all necessary information to the EEPROM, close the valve and
shutdown all operations.

Another important feature of the gas meter is that it can run with negative credit facility which gives the customer a
grace. In this case the meter can run even in the negative balance up to a negative balance threshold set by the utility
company. In case of credit run out after office hour or any time when customer can’t buy the credit this feature
becomes very useful.

2.3 Software Design


The software part of the prepaid system is divided into two parts – central server and vending station. The central
server runs an application that communicates with the vending stations and the central database. For redundancy a
backup database is also included which automatically syncs with the main database. In case of main database failure,
the backup database becomes active without any interruption of normal day to day operation. Any user of the
vending station or any system settings or any customer information can be created, deleted or edited from here. The
central server is a windows server and the central and the backup databases used are MySQL on linux machines.

Figure 5: Screenshot of the main screen of vending software

Figure 6 shows the vending window of vending software.

1641
Figure 6: Vending window of vending software

3. Prototype
We have implemented the prepaid contactless gas meter system in our laboratory. We have chosen a gas meter
among many others which is suitable in our environment and pressure condition of the utility companies. We
attached out designed circuit board with the base meter. We have tested the meter with gas flow and checked all
operations of it. The software part was implemented with a central server with backup facility and multiple vending
stations. We have simulated all necessary operations which include utility company and customers. The process
starts with defining a new customer in server and assigning him a new meter and a unique contactless card. Then
some credit is added to the card by vending station. After that the card was used to recharge the balance of the
meter. Then the card was checked with the vending station again to extract the data uploaded from the gas meter.
We have simulated all operations regarding the design successfully. Figure 7 shows a prototype gas meter based on
our design

Figure 7: Prototype of the contactless smart card based prepaid gas meter

1642
4. Conclusion and Future Work
In this paper the development of a prototype of contactless smart card based prepaid gas meter are presented. The
design algorithm is also mentioned briefly. The prototype has been tested successfully. It also has been
demonstrated to different utility companies. It is more secured, user friendly and consumes lower power than the
earlier version of prepaid gas meter. In the next step we want to replace the vending station with a portable module
which can be placed anywhere. It will increase the flexibility of vending and customers will enjoy more availability
of more vending modules. Nowadays NFC standard is becoming popular on cell phones. Many smartphone now
includes NFC module that can interact with external NFC modules. We can build smart phone application for the
NCF module so that customer can by credit by SMS or from other service and transfer credit to the meter directly
from cell phones.

Acknowledgements
We gratefully acknowledge the research fund provided by Karnafuly Gas Distribution Company Limited, one of the
gas utility companies in Bangladesh.

References
Ali Z., S. K., Masroor, H., Ashraf, S. R., and Hassan, A., Design and Implementation of Low Cost Electronic
Prepaid Energy Meter, IEEE International Multitopic Conference, pp. 548 – 552, 2008.
Anglani, N., Bassi, E., Benzi, F., Frosini, L., and Traino, T., Energy smart meters integration in favor of the end
user, International Conference on Smart Measurements for Future Grids, pp. 16-21, 2011.
Cowburn, J., Paying for energy the smart way, IEE Review, Volume. 47, Issue. 4, pp. 17-20, July, 2001.
Deconinck, G., Delvaux, B., De Craemer, K., Zhifeng Qiu, and Belmans, R., Smart meters from the angles of
consumer protection and public service obligations, International Conference on Intelligent System Application
to Power Systems, pp. 1-6, 2011.
Gavra, L., Crainic, M.S., Pupsa, P., and Popa, G., Residential smart gas meters, International Symposium on
Electronics and Telecommunications, pp. 37 – 40, 2012.
Hindersah, H., Purwadi, A., Ali, F. Y., and Heryana, N., Prototype development of single phase prepaid kWh meter,
International Conference on Electrical Engineering and Informatics, pp. 1-6, 2011 .
Khan, M. F., Zoha, A., and Ali, R. L., Design and Implementation of Smart Billing and Automated Meter Reading
System for Utility Gas, International Conference on Information and Emerging Technologies, pp. 1-6, 2007.
Khan, T. H., Paul, T. K., Shahabuddin, G. M., Wahid, K., Chowdhury, A. H., Kabir, S. M. L., International
Conferenece on Innovations in Information Technology, pp. 55-59, 2009.
Kwan, B. H., and Moghavvemi, M., PIC based smart card prepayment system, Student Conference on Research and
Development, pp. 440 – 443, 2002.
McConnachie, M., International Conference on Metering and Tariffs for Energy Supply, pp. 248 – 250, 1999.
MacDonald, F., Smart metering: The importance of creating a shared vision - start with a clear view of the end
game, IET Conference Publications, pp. 1-15, 2009.
Mohammad, N., Barua, A., and Arafat, M. A., A smart prepaid energy metering system to control electricity theft,
International Conference on Power, Energy and Control, pp. 562 – 565, 2013.
Mehmood, N., Ali, Z. A., Sidiqui, A. A., Asif, M., and Wasi, S.., Electronic meter reader & data base management
system, IEEE Joint Conference on Information Technology and Artificial Intelligence Conference, pp. 68 – 71,
2011.
Parvin, M. S., and Kabir, S. M. L., Standard and interoperable database for pre-paid electricity metering systems in
Bangladesh, International Conference on Informatics, Electronics & Vision, pp. 356 – 361, 2012 .
Yu, J., Yanchun, L., Yang, C., Lili, H., Yinghui, C., and Chengquan Hu, Wireless Digital Gas Meter with Lower
Power Consumption, International Conference on Frontier of Computer Science and Technology, pp. 192-197,
2010.
http://www.atmel.com/devices/atmega64a.aspx, July 31, 2013.
http://en.wikipedia.org/wiki/H_bridge, July 31, 2013.
http://en.wikipedia.org/wiki/Near_field_communication, July 31, 2013.
http://www.mifare.net/products/mifare-smartcard-ic-s/mifare-1k/, July 31, 2013.

1643
Biography
Md. Liakot Ali received his B.Sc. degree in Electrical and Electronic Engineering from Bangladesh University of
Engineering and Technology (BUET) in 1993, M.Sc. in Electrical, Electronic and Systems Engineering from
National University of Malaysia in 1998 and Ph.D. in Electronic Engineering from University Putra Malaysia
(UPM) in 2001. He served as an R & D Engineer in few reputed national companies of Malaysia and also as
Lecturer in University Putra Malaysia. Currently he is working as a Professor in Institute of Information and
Communication Technology (IICT), BUET, Bangladesh. His research interests include Embedded System
Design, VLSI Design and Testing.

Mohammad Imam Hasan Bin Asad is currently working as a Research Engineer in Institute of Information and
Communication Technology (IICT) of Bangladesh University of Engineering and Technology (BUET). He is
working on Embedded System Design for automotive and industrial applications. He earned his B.Sc. in Electrical
and Electronic Engineering from BUET and M.Sc. in Communications Technology from Ulm University, Germany.
He also worked as a HiWi in the Institute of Microelectronics in Ulm University.

Md. Saiful Islam is currently a Professor and Director of Institute of Information and Communication Technology
of Bangladesh University of Engineering and Technology (BUET). He obtained his B. Sc. in Electrical and
Electronic Engineering (EEE) from BUET, Dhaka in 1989; M. Sc. in Computer Science and Engineering from
Shanghai University, China in 1997 and Ph.D. in EEE degree from BUET in 2008. He contributed various projects
at national and international levels and published many articles in various research journals. His research interests
include nonlinear effects in optical DWDM transmission system, polarization mode dispersion and chromatic
dispersion, Erbium doped fiber amplifier, distributed Raman amplifiers, nonlinearity management in long-haul
transmission system. Mr. Islam is the Member of Institute of Electrical and Electronic Engineers (IEEE) and the
Fellow of Institute of Engineers Bangladesh (IEB).

1644

You might also like