Development of a Low Cost Portable Vending System for Prepaid Utility Meter

Similar documents
Keywords: GPS, GSM, AVR Microcontroller, SMS.

The Shift to Wireless Data Communication

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Display Message on Notice Board using GSM

DESIGN AND IMPLEMENTATION OF LOW COST HOME SECURITY SYSTEM USING PIC MICROCONTROLLER ANDGSM NETWORK

Design and Development of SMS Based Wireless Home Appliance Control and Security System

2.0 Command and Data Handling Subsystem

Automatic Ration Material Distributions and Payment System Based on GSM and RFID Technology

Data Transfer between Two USB Devices without using PC

PRT-CTRL-SE. Protege System Controller Reference Manual

ACR880 GPRS Portable Smart Card Terminal

PRT3 Printer Module: ASCII Protocol Programming Instructions

F2103 GPRS DTU USER MANUAL

Intelligent Home Automation and Security System

Web'n'walk. Manager. for Windows USER MANUAL

Gemalto Mifare 1K Datasheet

1. NON CONTACT DIGITAL TACHOMETER USING AVR MICROCONTROLLER 2. CELSIUS SCALE THERMOMETER USING Atmega BLACK BOX SECURITY SYSTEM FOR CAR USING

Serial Communications

Microtronics technologies Mobile:

Measurement and Analysis Introduction of ISO7816 (Smart Card)

How To Design A Code Lock System With A Status Display On A Cell Phone And A Password Code On A Smart Phone

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

Chapter 13. PIC Family Microcontroller

Smart Vending Anywhere System Solution

SOSSE. Matthias Brüstle Simple Operating System for Smartcard Education. Kommunikationsnetz Franken e.v.

Water Metering System SmartMeter Prepayment. SmartMeter Prepayment. Water Metering System

A 5 Degree Feedback Control Robotic Arm (Haptic Arm)

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

Protected Cash Withdrawal in Atm Using Mobile Phone

Location-Aware and Safer Cards: Enhancing RFID Security and Privacy

Wireless Home Security System

GETTING TO KNOW YOUR TELSTRA PRE-PAID 3G USB + WI-FI

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

WITURA CORPORATION SDN BHD

Development of a GSM based Control System for Electrical Appliances

INTERNATIONAL JOURNAL OF ADVANCED RESEARCH IN ENGINEERING AND TECHNOLOGY (IJARET) BUS TRACKING AND TICKETING SYSTEM

Serial port interface for microcontroller embedded into integrated power meter

Development of Low Cost Private Office Access Control System(OACS)

FaultAnalysisandElectricalProtectionofDistributionTransformers

Service Description. Ericsson IPX

Automobile Speed Violation Detection System using RFID and GSM Technologies

GETTING TO KNOW YOUR PRE-PAID TELSTRA WI-FI 4G

1. Product Overview 2. Product Feature 3. Product Value 4. Development Environment 5. Software Development Kit 6. Product Application 7.

C8051F020 Utilization in an Embedded Digital Design Project Course. Daren R. Wilcox Southern Polytechnic State University Marietta, Georgia

Living Requirements Document: Sniffit

ANYTIME ANYPLACE-REMOTE MONITORING OF STUDENTS ATTENDANCE BASED ON RFID AND GSM NETWORK

ADVANCED VEHICLE TRACKING SYSTEM USING ARM7

RS-232 Communications Using BobCAD-CAM. RS-232 Introduction

ENABLING WIRELESS DATA COMMUNICATION IN CONSTRUCTION MANAGEMENT SYSTEM

Design and Implementation of Vending Machine using Verilog HDL

RFID based Bill Generation and Payment through Mobile

ET-BASE AVR ATmega64/128

Serial Communications

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

Design and Development of Suraksha -A Women Safety Device

Booting from NAND Flash Memory

Rev GSM base station. Installation instructions

Pen Drive to Pen Drive and Mobile Data Transfer Using ARM

ABB solar inverters. User s manual ABB Remote monitoring portal

1. INTRODUCTION. Keywords SMS, GSM network, electrical device, encryption, control.

DATA LOGGER AND REMOTE MONITORING SYSTEM FOR MULTIPLE PARAMETER MEASUREMENT APPLICATIONS. G.S. Nhivekar, R.R.Mudholker

New GSM Alarm System. User s Manual. Profile For a better understanding of this product, please read this user manual thoroughly before using it.

Home Security System Using Gsm Modem

An In-vehicle ecall Platform for Efficient Road Safety

AVR1309: Using the XMEGA SPI. 8-bit Microcontrollers. Application Note. Features. 1 Introduction SCK MOSI MISO SS

CENTRONICS interface and Parallel Printer Port LPT

A Scalable Large Format Display Based on Zero Client Processor

8051 MICROCONTROLLER COURSE

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

UMBC. ISA is the oldest of all these and today s computers still have a ISA bus interface. in form of an ISA slot (connection) on the main board.

A L ERT. Quick Start With

Waspmote. Quickstart Guide

ENERGY HARVESTED ELECTRONIC SHELF LABEL

Real Time Web based Vehicle Tracking using GPS

Secure My-d TM and Mifare TM RFID reader system by using a security access module Erich Englbrecht (info@eonline.de) V0.1draft

Design and Development of SMS Based Wireless Home Appliance Control and Security System

Lab 2.0 Thermal Camera Interface

Design of Wireless Home automation and security system using PIC Microcontroller

Navigation Aid And Label Reading With Voice Communication For Visually Impaired People

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

Cell Phone Based Liquid Inventory Management Using Wireless System

Beginners Guide to Mobile Technology

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

DECT Module UM-9802 Datasheet

DEVELOPMENT OF E-PUBLIC DISTRIBUTION SYSTEM (E-PDS) USING SMART CARD

Implementation of Smart Homes and Industrial Automation System with Secure Communication over GSM

Security features include Authentication and encryption to protect data and prevent eavesdropping.

Secure Automatic Ticketing System

a8251 Features General Description Programmable Communications Interface

Automatic Railway Gate Controller with High Speed Alerting System

GSMPBX version 1.3 Datasheet

The Secrets of RS-485 Half-duplex Communication

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Wireless Medical History Tracker and Token Generator Using Finger Biometric Technology and Arm

Hand Gestures Remote Controlled Robotic Arm

3. Identification of water pumps through RFID technology. 4. Wireless control of remote water pump using RF technology.

Intelligent Fleet Management System Using Active RFID

M6310 USB Flash Drive Tester/Duplicator

Advanced Vehicle Tracking System Using ARM7

SMS GSM Alarm Messenger

Transcription:

Development of a Low Cost Portable Vending System for Prepaid Utility Meter M. Mobaidul Islam, K. Hossain Ansary, S.M. Tofayel Ahmad, Liakot Ali, A. H. Chowdhury, S. M. Lutful Kabir Institute of Information and Communication Technology, Bangladesh University of Engineering and Technology, Postcode 1000, Dhaka, Bangladesh Abstract The use of smart card is rapidly increasing to pay different type of utility bills like electricity or gas bill for prepaid electricity meter or prepaid gas meter respectively. It is time consuming for the consumer to recharge smart card from the vending station if it is far away from home. It is costly to increase the number of vending station too. This paper presents a low cost portable vending system for recharging smart card. It is a micro-controller based embedded system interfaced with GPRS modem, slip printer, memory card, smart card, RTC, LCD and keypad. The system is tested for prepaid electricity and gas meters developed by the Institute of Information and Communication Technology of Bangladesh University of Engineering and Technology. Performance of the developed system is very satisfactory. Keywords Portable vending system, smart card, GPRS, PHP, MySQL. 1.0 Introduction Prepaid metering system has been successfully implemented in different countries [1]. Most of the prepaid system uses smart card to recharge the prepaid meter [2-3]. Smart cards are very secure financial or transactional storage device which have small size and portable capabilities. To ensure the proper use of electricity and gas, Bangladesh government has decided to introduce pre-paid electricity and gas meters throughout the country. In the existing systems in Bangladesh, a consumer needs to go to designated vending station which may be located far from his residence to recharge their smart card [4]. In this paper, a low cost portable vending system is proposed which can be used to recharge the consumer s smart card at any vending station. The vending station may be located in a local shop. The smart card contains the account holder ID, meter ID, default recharge amount and other transaction related information. The smart card is entered into the card reader, the micro-controller read the card information and sends it to the server through the GPRS modem and complete the transaction. At the server end, a server side language, PHP (Pre-processor Hypertext) is used to receive that information and check from MySQL database for validity. The rest of the paper is organized as follows. Section 2 describes the proposed system. In Section 3, the system architecture of the mobile vending system and its different components are described. Section 4 describes the system implementation. Test results are discussed Section 5. Finally, Section 6 concludes the paper. 2.0 Proposed System The overall system is presented in Figure 1. A shop owner who wants to be utility retailer will have to go to the vending station to buy the mobile vending device. He has to open an account and make a deposit to purchase credit. The consumers need to buy a smart card and also open an account from the vending station by giving their personal information and prepaid meter information. To buy credit, consumers will have to go to the shop owner (mobile vending device holder) with money and the smart card. The shop owner will insert the smart card into card reader of the mobile vending device. The device will read the smart card information and will send it to the server using GPRS connection of the modem. Server will authenticate, and if successful shall update the consumer database and deduct the shop owner s credit deposit. The server shall return updated information to the mobile vending device and the device shall recharge consumer s smart card. 644

Figure 1: Overall system of mobile vending 3.0 Design of the system The design of the system mainly consists of two parts: a server for maintaining record of all transactions and actual usage of the user, and a client side vending system that would do actual top-up of the smart card. Figure 2 shows the architecture of the system. Figure 2: System architecture 3.1 Client Side Vending System 3.1.1 Microcontroller A low cost 8 bit AVR microcontroller (ATmega128) [5] is used in this system which has 128 kb of program memory, 4 kb EEPROM and 4 kb Internal SRAM. It also has dual programmable serial USARTs and Master/Slave SPI serial interface. 645

3.1.2 Smart Card Reader The smart card reader is used to read the smart card and modify user data. In the proposed system, SLE 4428 [6] smart cards are used. The smart card contains necessary data including subscriber ID, meter ID, last vending date and month, etc. The smart card reader is constructed using an interface to connect the smart-card to the board, and the reading algorithm is implemented in the interface. 3.1.3 Hand Held Printer A hand held printer is used for printing transaction records for the consumer. A pre-assembled handheld printer module from SEIKO Corporation [7] is used for the purpose. The printing module is a thermal printer, and has facility to automatic feed and cut printed paper. The printer is connected with microcontroller through USART serial communication protocol. 3.1.4 Memory Card Reader A Secure Digital memory card is used so that the encrypted vending data can be stored into it, so that the vending station has record of the transactions that is performed through it. This can be particularly useful in case of a system malfunction or bad write request. A 2 GB SD card from Kingstone [8] is used in the system. In our experiment we store data in raw format, but we still manage option to store data in FAT32 format. The 512 bytes block size is used to read and write data in SD card. So we maintained a buffer structure of 512 bytes of smart card data for information transferring. 3.1.5 GPRS Modem A GPRS modem is used in the vending device to connect it to internet. This enables the vending system to operate without the need for a wired internet connection. The GPRS modem is connected with a serial port. USART0 (Universal Synchronous and Asynchronous Receiver Transmitter) of the microcontroller is used for serial communication with the modem. ATmega128 USART units has a transmit pin, a receive pin and an external clock pin. Some AT commands are used to active the GPRS connection of the modem [9]. 3.1.6 Real Time Clock A Maxim real time clock (RTC) is interfaced with the vending device for father use in future. The RTC has 114 bytes of memory. The extra memory is available to store some important offline mode data. The RTC is interfaced with the microcontroller through parallel communication protocol. 3.1.7 LCD A 16x2 character LCD from Fordata [10] is used as the display unit in the vending device. 3.1.8 Keypad A 4x4 matrix keypad is used in the vending device for input operation. 3.2 Server Side System 3.2.1 Web Server Apache [11] has been used as the web server in server side. This web server is platform independent, open source and support server side scripting language to communicate with database. 3.2.2 Server Side Scripting Language PHP [12], a server side language is used in to get information which comes from the GPRS connection of the modem. This language work closely with the web server to interpret the requests made from the World Wide Web, process these requests, interact with other programs on the server to fulfil the requests, and then indicate to the web server exactly what to serve to the client system. 3.2.3 Relational Database Relational database management system (RDBMS) provides a great way to store and access complex information. In this system, MySQL [13], open source relational database has been used for this purpose. Figure 3 shows entity relationship diagram of the sample database. There are five entity card_info, vending_info, user_account_info, vending_info and vending_usr_balance_update_info. 646

Figure 3: Entity relationship diagram 4.0 Implementation The mobile vending system works in different sequence as shown in Figure 4. Smart card is inserted into card reader which embedded with the system. Micro-controller program read the smart card information and sends it to the server using GPRS connection. Server check the validity from database and acknowledgement is sent to the client system. According to validity information, client system sends vending amount to the server. Server updates the amount from the database according to the smart card information. After update is completed, server sends acknowledgement and client system writes the new recharge value into the smart card. Figure 4: Vending system sequence diagram 647

When the vending device is powered on, it requires security code to make it operational. Vending device holder enters the security code by keypad. Device checks the security code and if validity is found it will wait for smart card insertion. This validity check is done once while the device is turned on. Now the device is ready to provide service. After a smart card is entered in the vending device, it checks the validity of the card. If card is valid, the device reads consumers information from the card displays consumer ID and consumer name on the display. Then it offers the vendor to start vending. The vending can be set at the default amount that was written on consumer s card previously or change that amount according to consumer s requirement. After selecting the appropriate amount vendor request to server for vending through the GPRS modem. When the server receives a vendor request it performs the following tasks: a) It checks the vendor s deposit amount and compare with the amount that is request for vending. The parameter pass through this function are vending station ID, consumer s ID, amount request for vending. Some additional information can also be passed through this function like six month data. b) It notes the time. c) It checks the monthly charge status and makes decision about monthly charge. d) Then the server generates a transaction ID. e) The server then completes a buffer set (a complete structure) for the vending station. f) Finally it sends the buffer structure to the vending station. The whole operation takes only a few moments. After a successful reception of buffer structure vending device write vending amount and other information from the structure to the card. It sends a confirmation message to the server after writing successfully in the card. Server take the confirmation message and store it for further reporting. The vending device print a transaction slip through SEIKO slip printer and the vendor provide it to the consumer. This concludes a successful transaction for the pre paid system. 5.0 Testing the Overall System A portable vending system prototype (shown in Figure 6) is developed and several tests have been conducted. We developed three mobile vending devices and one central server. The total time taken to get data from the vending device to the central server is approximately 35 seconds using GPRS connection of the modem. This time may vary a little bit depending upon the GSM network condition. In our tests, for 97% cases, data was received successfully by one attempt. The remaining 3% cases, data were received after second or third attempt. Figure 5: Labarotory prototype of the vending device We have tested the system performance at different worst case scenarios like modem SIM without any credit balance, invalid account ID, invalid amount insertion and invalid smart card insertion. The system gives proper error messages on the LCD. The correct information inserted and updated into the server side database has been tested and verified by display on the LCD and printing document. The SD card and RTC are successfully interfaced for further use of the system. The mobile top-up system used in Bangladesh uses short message service (SMS) to transfer information between the server and the retailer. It does not use internet. The retailing device is a mobile. Hence in Bangladesh, no similar vending system as proposed by the authors exists at this moment. 648

6.0 Conclusions In this paper, a low cost, portable and secure mobile vending system was proposed and its design components have been discussed. A prototype of the system has been successfully implemented and tested. The proposed system has the benefit for the consumer to recharge their smart card from easily reachable distance. Utilities need not establish different vending stations in different zones. Shop owners are also benefited from the proposed system. The proposed system features the using of GPRS modem, which provides remote access to the server without the additional cost of a personal computer. Acknowledgment The authors would like to thank Institute of Information and Communication Technology of Bangladesh University of Engineering and Technology for supporting the research work of this paper. References 1. Subramoney, K.P and Hancke, G.P, 2007, A Secure Web Service for Electricity Prepayment Vending in South Africa: A Case Study and Industry Specification, The 2 nd International Conference on Internet and Web Applications and Services, ICIW '07, pp. 66 66, May 13-19, Morne. 2. McConnachie, M., 1999, Prepayment advances with smart-card solutions that cover electricity, gas and water, Metering and Tariffs for Energy Supply, Ninth International Conference on (Conf. Publ. No. 462), pp. 248-250, Aug, Birmingham. 3. Raad, M.W, Sheltami, T, Sallout, M, 2007, A Smart Card Based Prepaid Electricity System, 2nd International Conference on Pervasive Computing and Applications, ICPCA 2007, pp. 219-224, July 26-27, Birmingham. 4. Khan, T.H, Paul, T.K, Shahabuddin, G.M, Chowdhury, A.H, Kabir, S.M.L, 2009, Towards Design of a Smart Prepaid Gas Metering System, International Conference on Innovations in Information Technology, IIT '09, pp. 55-59, Dec 15-17, Al Ain. 5. ATmega128 Microcontroller Datasheet, http://www.atmel.com/dyn/resources/prod_documents/doc2467.pdf 6. Smart Card Datasheet,http://www.smartcardzone.com/datasheets/SLE4428data. 7. http://www.sii.co.jp/corp/eg/index.html 8. http://www.kingston.com/flash/securedigital.asp 9. AT Command set, http://www.sparkfun.com/datasheets/pic/pic-gsm_sim300datc.pdf 10. http://www.fordata.cn 11. Apache Web Server,http:// www.apache.org 12. PHP, http://php.net/index.php 13. MySQL, http://www.mysql.com/ 649