You are on page 1of 16

FINAL 

YEAR PROJECT REPORT 
GSM BASED PREPAID ENERGY METER 

Session 2007-2011

 
 
Project Advisor

MR.MUHAMMAD BASIT SHAHAB 

 
 
                      Submitted By: 
 
Muhammad Arslan              071020014 
Zubair Hameed Khan                        071020110 
Shabahat Khan Naizi               071020101 

Department of Electrical Engineering 
University of Management and Technology 
Lahore

GSM BASED PREPAID ENERGY METER 
 
Project Report submitted to the  
Department of Electrical Engineering, University of Management and 
Technology, Lahore  
In partial fulfillment of the requirements for the degree of  
Bachelor of Science 
In 
                                                    Electrical Engineering

Muhammad Arslan              071020014 
Zubair Hameed Khan                        071020110 
Shabahat Khan Naizi               071020101 

Date: 04­04­2012 

ii 
Abstract
 

 Technique  has  been  proposed  to  modernize  the  existing  billing  procedure.  In  this 
project,  8051  microcontroller  have  been  used  to  control  the  main  operation  which  is 
being  performed  in  this  system.  Electromechanical  meter  has  been  installed  in  this 
project to measure the consumption of power in kilo  – watt hours. To get benefits  of 
GSM techniques a GSM module has been implemented in this system. Module has been 
interfaced  with  microcontroller,  and  microcontroller  communicates  with  module 
through AT Command.   External memory has been interfaced with microcontroller to 
store the units which will be charged by suppliers. Opto coupler sensor which is hybrid 
of photo diode and infrared light emitting   diode, have been used to detect the motion 
of metallic which continues its motion to show the consumption of power. This sensor 
has also been interfaced with microcontroller to receive the pulse on the completion on 
one revolution of a disc. Triac has been used to work as a switch it also receive signal 
from  microcontroller  to  control  the  switching  of  power  supply.  In  this  way  both 
suppliers and consumers get benefits of this technique.  

iii 
Dedication 
This project is dedicated to our parents and especially our worthy teachers. 

iv 
ACKNOWLEDGEMENTS 
With a deep sense and profound gratitude we take this opportunity to convey our sincere 
thanks to ALMIGHTY ALLAH for giving us courage and strength to reach this stage of life. We 
are  also  very  thankful  to  our  parents  who  gave  us  great  moral  support  at  every  step.  We 
also convey thanks to all of those who gave us valuable support to complete the challenging 
project. We are highly indebted to respected Mr.Muhammad Basit Shahab (project advisor) 
for her sincere help and guidance throughout the work.


List of Figures 
Fig 3.1: Flow diagram of prepaid system………………………………………………...... 16
Fig 3.2: Electromechanical energy meter………………………………………………...... 18
Fig 3.3: GSM Architecture Diagram……………………………………………………..... 22
Fig 3.4: View of Base Transmission Station……………………………………………..... 25
Fig 3.5: View of BSC……………………………………………………………………… 26
Fig 3.6: NSS Architecture………………………………………………………………...... 29
Fig 3.7: BSS Architecture………………………………………………………………...... 30
Fig3.8: 8051 micocontroller blockDiagram……………………………...…...... 35
Fig3.9: PIN diagram of AT89s52………………………………………………………...... 39
Fig3.10: Crystal Oscillator………………………………………………………………..... 41
Fig4.1: Manufacturing of PCB…………………………………………………………...... 43
Fig 4.2: Interfacing of GSM module with SIM and microcontroller………………............. 55
Fig4.3: EEPROM pin configuration………………………………………………….......... 57
Fig 4.4: Interfacing of microcontroller with EPROM……………………………………... 58
Fig 4.5: Symbol for Triac…………………………………………………………………...59
Fig 4.6: Symbol for opto triac……………………………………………………………… 60
Fig 4.7: Circuit diagram of Switching module…………………………………………...... 61
Fig 4.8: Rechargeable Battery diagram………………………………………………......... 62
Fig5.1: PROGRAM FLOW DIAGRAM……………………..………………………….... 66

vi 
Table of Contents 
 
 
 
Chapter I: Introduction…………………………………………………………………..…………………....1 
1.1Electricity Billing System……………………………………………………………………………………….2 
     1.1.1Current billing system………………………………………………………………………………….....2 
    1.1.2 Drawbacks in current billing system………………………………………..….………………….3 
1.2Objective………………………………………………………………………………….………………….............…….…...3 
    1.2.1Advantages of prepaid billing system……………………………..…………………..……….…..4 
    1.2.2Advantages of using GSM techniques in prepaid billing system…………………….….5 
     1.2.3Advantage of using analog energy meter…………………………….......................................................7 
 
Chapter II: Literature Review……………………………..............................................................9 
2.1 Automatic meter reading system………………………………………………………..…………  9 
     2.1.1 Touch technology………………………………………………………………..............................................  10 
    2.2.2 Radio frequency network……………………………………………………….…………………………….. 10 
     2.2.3 Power line communication…………………………………………………….….........................................13 
     2.2.4 Benefits of Automatic Meter reading………………………………………….…………………….......... 13 
    2.3 Smart meter technology………………………………………………………….…………………..... 14 
    2.4 Memory card based prepaid meters…………………………………………………….…..……. 14 
 
Chapter III: Methodology & Technical Details………………………………….....………..….  16 
3.1 Design Methodology………………………………………………………………………………………..  16 
     3.1.1Block Diagram……………………………………………………………………………………..…….. 16 
     3.1.2Working procedure……………………………………………………...…………….……................ 17 
3.2 Working of Electromechanical Meter………………………………………………………………... 18 
    3.2.1 Units of Measurements………………………………………………………………….…………… 19 
    3.2.3 Error Calculation of Meter………………………………………………….....……………………. 19 
3.3 GSM Techniques…………………………………………………………………….………………………... 20 
    3.3.1MOBILE STATION (MS)…………………………………………………….………………………… 22 
    3.3.2 BASE TRANCEIVER STATION (BTS)………………………………...…………………………. 23 
    3.3.3 BASE STATION CONTROLLOR……………………………………..………………….................. 26 
    3.3.4 Mobile Switching control……………………………………………..…………………………...... 27 
    3.3.5 BSS ARCHITECTURE……………………………………………..……………………....................... 30 
    3.3.6 BSS INTERFACES………………………………………………..…………………...…....................... 31 
    3.3.7Air Interface CHANNELS……………………………………………………………………….......... 32 
    3.3.8 Functional layers of GSM……………………………………………………………………............ 32 
    3.3.9Modulation in GSM………………………………………………………………………………..........  33 
    3.3.10Main Features of GSM……………………………………………………………………………....  34 
3.4 Concepts Of Microcontroller…………………………………………………………………................  34 
    3.4.1Feature of the 8051………………………….…………………………………………………............  35 
   3.4.2   Characteristics of a Microcontroller……………………………………………………..........  38 
   3.4.3Pin Configuration………………………………………………………………...….............................  39 
 
 

vii 
 
 
Chapter IV: Hardware implementation…………………………………………………...……….. 42 
4.1 Designing of print circuit board…………………………………………………….…...…………….  42 
    4.1.1 Manufacturing METHOD……………………………………………………................................................. 42 
     4.1.2 Pattering……………………………………………………………………………………………...….................... 43 
    4.1.3 Lamination……………………………………………………………………........................................ 44 
    4.1.4 Drilling…………………………………………………………………………………………................... 45 
    4.1.5 Exposed conductor and Platting…………………………………………………………………. 45 
    4.1.6 Screen Printing………………………………………………………………….................................... 46 
    4.1.7 Printed Circuit Assembly ……………………………………………………….............................. 46 
    4.1.8Design……………………………………………………………………………........................................ 47 
4.2 List of Components…………………………………………………………………………......................... 49 
4.3GSM Modem SIM900DZ…………………………………………………………………………………….  50 
    4.3.1 Feature of SIM900DZ……………………………………………………………............................... 51 
    4.3.2 Operating Mode………………………………………………………………….................................. 52 
    4.3.3 Interfacing SIM900DZ with microcontroller………………………………...……………… 53 
    4.3.4 Serial Interfacing ........................................................................................................................... 54 
4.4 EEPROM……………………………………………………………………………………….…………............ 56 
    4.4.1 Interfacing of EEPROM with Microcontroller…………………….………………………… 58 
4.5 Triac……………………………………………………………………………………..……….………………… 59 
4.6 Opto triac………………………………………………………………………………………………………… 60 
    4.6.1 working of power triac and opto triac…………………...……………………….................... 60 
4.7 Sensor…………………………………………………………………………………………………….............. 61 
4.8 Rechargeable Battery ………………………………………………………………….............................. 61 
 
Chapter V: Software Implementation…………………………………………………..…………… 64 
5.1 Language of Programmer…………………………………………………………………………………. 64 
     5.1.1Comparison of assembly and high level languages………………………………………. 64 
     5.1.2 compiler…………………………………………………………………………………….……………… 65 
     5.1.3 Flow Chart…………………………………………………………………….…..………………………. 66 
5.2 Hay modem command set……………………………………………………………..………………….. 67 
     5.2.1 Introduction to AT Command ……………………………………………..…...……………….  67 
     5.2.2 Types of AT Command………………………………………………………………,…………….  71 
Appendix A………………………………………………………………………………………,…………………… 71 
Coding…………………………………………………………………………………………………………………....76 

viii 
 
 

Introduction
In the 19th and early 20th century, electricity was not part of the everyday life of many people,
even in the industrialized world. But now it has become as one of the essential needs of our lives.
Electricity’s extraordinary versatility as a source of energy means it can be put to an almost
limitless set of applications which include transport, heating, lighting, communications,
and computation. Electricity is an extremely flexible form of energy, and has been adapted to a
huge, and growing, number of uses. Electricity is however a highly practical energy source
for refrigeration, with conditioning representing a growing sector for electricity demand, the
effects of which electricity utilities are increasingly obliged to accommodate. Electricity is used
within telecommunications, so it had enabled communications in minutes across the
globe. Optical fiber and satellite communication technology have taken a share of the market for
communications systems, but electricity can be expected to remain an essential part of the
process. The rapid expansion in electrical technology at this time transformed industry and
society. Electrical power is the backbone of modern industrial society, and is expected to remain
so for the foreseeable future.

Demand for electricity grows with great rapidity as a nation modernizes and its economy
develops. The growth rate for electricity demand has outstripped that for other forms of energy.
Demand of electricity is so much through out the world that electric power consumption rate of
world is 297watts per capita which is still increasing with the passage of time. Development of
any country can be estimated from its consumption of electric power. As in Pakistan electric
power consumption rate is 48.4watts per capita while in The United States it is 1460watts per
capita. All this data shows that electric power is one of the basic areas which have to modernized
and developed for any nation to make progress in such highly competitive and modern world.
Electric power is enhanced not only by increasing generation capacity but also by modernizing
transmission and distribution network of power which controls power losses.


GSM Based Prepaid Energy Meter 
 
 

1.1Electricity Billing System

Bill is that which the end consumer pays the supplier according to a tariff agreed between the
consumer and supplier. The tariff may include pass-through costs. A pass-through cost is a cost
that is charged to the energy supplier, but is then 'passed through' directly to the consumer.
Electricity bill usually contain transmission charges which is paid to National Grid to cover the
expense of running the grid and distribution charges which is paid to the Distribution Network
Operator (DNO) on whose network the meter point is located. Other charges may also be
included according to government or supplier’s policies regarding billing. Billing system is one
of the most important part of electricity network. This keeps as the importance of backbone in
economy of supplier and tights consumer and supplier in an agreement. Correct implementation
of this system has mutual benefits for supplier as well for consumer.

1.1.1 Current billing system

Current billing collection system of electricity mostly depends on man power especially in
Pakistan. Energy suppliers have installed analog energy meter in customer’s sight. During first
time of installation, meter is adjusted on zero reading then this meter is visited by supplier’s
agent in the end of each month ,he note the current reading from the meter and then energy
consumed by customer is calculated with the reference of previous reading of meter i.e.

Used units = current reading - previous reading

This documentation is submitted to company’s office where total cost of consumed energy is
calculated according to company’s strategy and bill is posted to consumer’s address that has to
deposit it before the time limit. Electricity suppliers must provide a variety of ways to costumer
to pay the bill.

The electricity supplier normally allows the bill to be paid:-

• By posting a cheque, postal order, credit or debit card details to the electricity supplier
• At any post office, in cash, saving stamps or by cheque
• At your bank. A charge may be made if the bill is paid in cash


GSM Based Prepaid Energy Meter 
 
 

• At another bank. A charge may be made, although some electricity suppliers have set up
free payment schemes
• In cash at Pay Points, which are situated in local outlets such as supermarkets, service
stations and shops.

1.1.2 Drawbacks in current billing system

Many electric supply companies face serious problem of lean revenue collection as against
energy supplied due to energy thefts and network losses. All the steps taken so far in Pakistan,
regarding the improvement of the revenue collection did not yield satisfactory results. It is
reported that the most faulty sub system is the metering and meter reading system. The
traditional billing system is still in use in spite of its disadvantages. So this system Therefore,
several attempts were made to automate the billing systems. Even though accurate and fast
readings are obtained, bill payment is still performed based on the old billing procedure. This
procedure of billing depends on man power so this increase economic load on energy suppliers.
Current billing procedures have its many drawbacks like:

• Highly unreliability
• Inaccurate
• Costly
• Slow
• Discrete
• Increase man power

These disadvantages of billing system are causing problems not only for customers but also are
the main hurdle in progress of electric energy suppliers.

1.2 Objective

As described earlier that credit meters have caused great problems and difficulties regarding
billing procedure for the consumers as well as for the suppliers. Such prepaid billing system is
required for the solution of these difficulties. So our objective is to design and development of


GSM Based Prepaid Energy Meter 
 
 

GSM based prepaid system for analog electrical energy meter which provides both the suppliers
and the consumers with better services regarding meter billing and payment. Hence this project
will facilitate the suppliers by reducing man power and gives authority only to company’s office
to recharge units via GSM. Costumer’s electric supply will be cut off automatically on zero
credit. Costumer will also have advantage of using this technique by automatically receiving
S.M.S of confirmation on charging of units and also automatically receiving ‘alarming’ S.M.S on
low credit of meter on his\her mobile set. This system would provide information about current
readings of meter on costumer’s request through his\her mobile phone. Costumer will be
authorized to cut off\on his electric supply via hand set. This system will inform its owner about
its current location on his demand. Besides all these advantages which suppliers and costumers
will have of using this system, it will also provide privacy to its owner regarding his electricity
billing so it will respond only on its owner’s demand.

1.2.1 Advantages of prepaid billing system:

Since the last decades of the past century, scientists, researchers and public people have been
worried about energy conservation. People spend much more power than what they actually need
and that results in a huge loss of energy. Moreover, the continuous increase in the universal
energy prices has resulted in a huge economical loss. Thus we are proposing a prepaid electricity
GSM based system so people can buy specific amount of energy to use it only when then need.
Using this prepaid technique of billing, suppliers and consumers will get rid of old conservative
and unreliable billing procedure of electricity which is not only unreliable but also costly and
slow. This modern system of billing can bring drastic change in electricity distribution network
because this system is not only making billing procedure prepaid but also facilitating the
costumers in different aspects A scheme of PREPAID billing can facilitate in improved cash
flow management in energy utilities and can reduces problem associated with billing consumer
living in isolated area and reduces deployment of manpower for taking meter readings..
Costumers can control their power consumption using this system. GSM based billing procedure
will have many more befits over old billing system like:

• Highly reliability
• Fast procedure


GSM Based Prepaid Energy Meter 
 
 

• Accuracy
• Low cost
• Reduces man power
• Secure
• Maintain privacy for costumers

1.2.2 Advantages of using GSM techniques in prepaid billing system:

Billing procedure can be made prepaid using different techniques and methods but in this project
billing system is being prepaid using GSM technique because of its unique advantages and
reasons which are going to be explained here:

Mobile phone subscribers:

Like other fields of science and technology, field of telecommunication has made drastic
progress in last century. The first mobile telephone call made from a car occurred in St. Louis,
Missouri, USA on June 17, 1946, using the Bell System's Mobile Telephone Service, but the
system was impractical from what is considered a portable handset today. In 1960, the world’s
first partly automatic car phone system, Mobile System A (MTA), was launched in Sweden.
MTA phones were composed of vacuum tubes and relays, and had a weight of 40 kg. In 1962, a
more modern version called Mobile System B (MTB) was launched, which was a push-button
telephone, and which used transistors in order to enhance the telephone’s calling capacity and
improve its operational reliability. In 1971, the MTD version was launched, opening for several
different brands of equipment and gaining commercial success. Martin Cooper,
a Motorola researcher and executive is considered to be the inventor of the first practical mobile
phone for handheld use in a non-vehicle setting, after a long race against Bell Labs for the first
portable mobile phone.

After the evolution process mobile phone has got great importance in our societies use of mobile
phone is still increasing across the world. In the year 1990, 12.4 million people worldwide had
cellular subscriptions. By the end of 2009, less than 20 years later, the number of mobile cellular
subscriptions worldwide reached approximately 4.6 billion, 370 times the 1990 number,
penetrating the developing economies and reaching the bottom of the economic pyramid. It was


GSM Based Prepaid Energy Meter 
 
 

reported that 72.6% population of the world uses cell phones. Cell phones got so much
popularity because of their different uses in our in societies. People contact each other any time
any where across the world without any wire or cable, keeping in touch with family members
conducting business, and having access to a telephone in the event of an emergency.

Use of hand set is also not less popular even in developing countries. Pakistan is at number six in
world ranking of mobile subscribers, according to one report of PTA there are about 100 millions
mobile subscribers in Pakistan. About 66% of the total population of Pakistan uses cell phone.
All these figures show that use of mobile of is very common through out the world and is still
expanding because of its attractive features.

GSM Standards:

The first commercially automated cellular network (the 1G generations) was launched in Japan
by NTT in 1979, initially in the metropolitan area of Tokyo. Within five years, the NTT network
had been expanded to cover the whole population of Japan and became the first nationwide 1G
network. In 1981, this was followed by the simultaneous launch of the Nordic Mobile Telephone
(NMT) system in Denmark, Finland, Norway and Sweden. NMT was the first mobile phone
network featuring international roaming. The first 1G network launched in the USA was
Chicago-based Ameritech in 1983 using the Motorola Dyna TAC mobile phone. Several
countries then followed in the early-to-mid 1980s including the UK, Mexico and Canada.

In 1981, the [European Conference of Postal and Telecommunications Administrations] (CEPT)


created the Group Special Mobile (GSM) to develop a standard for a mobile telephone system
that could be used across Europe. In 1987, a memorandum of understanding was signed by 13
countries to develop a common cellular telephone system across Europe. In 1989, GSM
responsibility was transferred to the European Telecommunications Standards Institute (ETSI)
and phase I of the GSM specifications were published in 1990. The first GSM network was
launched in 1991 by Radiolinja in Finland with joint technical infrastructure maintenance
from Ericsson.

By the end of 1993, over a million subscribers were using GSM phone networks being operated
by 70 carriers across 48 countries. Now according to GSM Association estimates that 80% of the
global mobile market uses the standard. GSM is used by over 1.5 billion people across more than
212 countries and territories. This ubiquity means that subscribers can use their phones


GSM Based Prepaid Energy Meter 
 
 

throughout the world, enabled by international roaming arrangements between mobile network
operators. GSM differs from its predecessor technologies in that both signaling and speech
channels are digital, and thus GSM is considered a second generation (2G) mobile phone system.
This also facilitates the wide-spread implementation of data communication applications into the
system. In Pakistan mobile communication network is also based on GSM standards. Many
telecom companies in Pakistan have set their communication network on GSM standards like:

 Mobilink
 Warid
 Telenor
 Ufone
 Zong

Above mentioned details show that mobile phone is very popular and common in through out
the world and network of mobile communication is mostly based on GSM standards so GSM
based prepaid billing scheme is most facilitated and suitable technique for the suppliers and
consumers of electric power other than any other any techniques.

1.2.3 Advantage of using analog energy meter:

In this project electromechanical energy meter has been used, the reason of using analog meter is
that most distribution companies especially in Pakistan have installed these meters for billing
purpose. According to one estimated report millions of analog meters are in use in Pakistan. So
installation of digital meters instead of these analog meters will be highly costly project and all
these analog meters which are working properly will be useless and distribution companies of
electricity will have to pass through economic losses during the installation of this project. That
is the reason we have proposed to make the billing procedure prepaid by using already working
electromechanical energy meters.


GSM Based Prepaid Energy Meter 
 
 

Organization of the Report

In this report we have tried our best to explain the all the aspects of this project so organization
of report is as follow:

Chapter 2 contains the literature review regarding this project and in this chapter development
and work have been done so for, for the improvement and betterment of billing proceure.

Chapter 3 contains the design methodology and technical details regarding this project and in
this chapter design methodology of this project, working of electromechanical meter, GSM
techniques and basic concepts of microcontroller have been explained.

Chapter 4 contains the hardware description of this project. Details and working of components
which have been used in this project have explained here

Chapter 5 contains the description regarding software of this project.

Chapter 6 contains the conclusion and future work of this project.

 

GSM Based Prepaid Energy Meter 

You might also like