Anda di halaman 1dari 51


Electricity and its metering – An overview

1.1 Introduction
Electricity, since its invention, has always been one of the fundamental
requirements for any modern civilization and its development. It is now at the heart of any
property, whether it is residential, commercial or industrial. Thinking for a while, we can
imagine how deep electricity goes through our lives. Factories, mills, laboratories, commercial
institutions, traffic, communication, home lights, televisions, PCs and cell phones are just few
examples on the present situation of Electricity Empire.

Since beginning, research and development in the field of electrical energy has been
concentrated on its generation, transmission, distribution, protection and line losses, etc.

But, in all the generations of electrical power technologies, no significant changes in

measuring methods of electricity consumption were noticed. Electric meter remains the very
basic and traditional meter in its shape or functionality. It had nothing to do as a part of the
whole electrical system except the electrical energy consumption calculation in a very
conventional manner. The conventional meters in two different forms, are shown in Fig.1.1.

Fig.1.1 Conventional Electric Meters

But the scene turned far different in the last few years particularly from the last decade of the
last century. Main causes for this, envisage are:

 Resources necessary to produce electricity particularly fossil fuels are
depleting rapidly,
 Electricity consumption is increasing in geometrical progression,
 World population is increasing day by day and proportionally the demand for
electricity is also increasing many folds.
 Change in human mindset and life style with more and more demand of
comfort has further loaded the electric grid in terms of electric supply required
for air conditioners, refrigerators, fans, ovens mixer grinders etc.
 Cumulative effect of all the above factors has enhanced the industrial and
commercial growth world over, which is further reflected in tremendous
demand for electricity.
 Transmission, distribution losses and poor efficiency of generating systems
have proved the term that conserving three units of electricity is equivalent to
producing five units. The total emphasis is thus diverted towards the
conservation of electricity.
In view of the above, new field of research and development has emerged in the form
of metering technology. The objectives of such technology were not limited merely to
measure the consumed units of the electricity but far above.

1.2 Objectives of electricity metering in today’s perspective

Metering of utilities, including electricity, should be designed to allow the following

objectives to be met with in the existing system [1]:

 To provide sufficient data for allowing correct financial charges to be made to each
consumer with appropriate periodicity,
 To provide sufficient data for periodic energy forecasts;
 To provide sufficient data for yearly energy budget standards;
 To provide sufficient data to take corrective action on energy-usage control, as per
 To provide sufficient data to measure the efficiency of all major sub-systems in the
utility area.
 To provide detail about the quality of electricity
 To provide information in case of tempering of any kind;

1.3 Conventional System and its Drawbacks

Electrical meter reading has always been done manually by a staff of the utility
company. In the normal practice, meter readers visit every meter location periodically and
enter the meter reading manually.

These readings are then analyzed with the previously read values and result is recorded
into the customer consumption register which is further maintained in the utility computer.
Cost of the consumed energy during the latest cycle (usually one or two months) can thus be
calculated. This is done either on a paper or in a computer.

In some cases where consumption rationalization strategies are followed, the consumer
is charged for the energy units in proportion to his/her total consumption.

Energy measurement by the traditional manual methods is in use since the

commercialization of electric power. But with the advent of new technologies, more complex
electric networks, ever increasing number of consumers, huge T&D losses and increasing
scarcity of electric power, following drawbacks of manual metering work have become more

 Human error and negligence in meter reading

 Long gap between two successive meter readings, making it extremely
difficult to prepare an exact load profile of the consumer and the group of
 Absence of continuous load profile record, causing the consumer to always
think that he/she is being charged more by the utility.
 Knowing any defect in the energy meter only after the next visit of meter
 Absence of any data collection for the purpose of energy auditing, planning
and forecasting,
 Instantaneous consumption of a particular locality is not easy to find out,
 Tempering with metering system remaining unnoticed.

1.4 Developments in Meter Technology

With the passage of time and also need, conventional meters have undergone changed
shape and design. Electromechanical induction meters have gradually been replaced by
electronic and digital meters. In India it has become mandatory to use the electronic meters in
all new installations. Commercial and Industrial institutions are required to get digital meters
installed in their premises.

Electronic and digital energy meters are shown in Fig.1.2 and 1.3 respectively.

Fig.1.2 Electronic Energy Meter Fig.1.3 Digital Energy Meter

1.5 Alternative systems for Meter Reading

Various drawbacks and limitations of the conventional manual metering system motivated the
technologists to go for alternative automatic approach for determining the electricity
consumption. The primary driver for the automation of meter reading is not so much to reduce
labour costs, but to obtain data that is otherwise unattainable. Mostly electric meters,
especially in multystoried buildings in metro cities, are located in places that are inaccessible
to the meter reader and require an appointment with the homeowner for the purpose of meter
reading. Electricity tends to be more valuable commodity as compared to others, and the
consumed energy must be measured through actual readings instead of estimated readings.
This has driven the electricity utility companies to consider for automation. This is commonly
called Automatic Meter Reading or AMR.

1.6 Types of Automatic Meter Reading (AMR)

Advent of electronic and digital energy meters facilitated the process of automatic meter
reading. AMR may be based on various methods and designs. Few important methods are
given below:

 On-site automatic meter reading

In this method, a meter reader carries a handheld computer or

data collection device with a wand or probe. The device
automatically collects the readings from a meter by touching or
placing the read probe in close proximity to a reading coil
enclosed in the touchpad. When a button is pressed, the probe
sends an interrogate signal to the touch module to collect the
meter reading. The software in the device matches the serial
number to one in the route data-base, and saves the meter
reading for later download to a billing or data collection
computer. Since the meter reader still has to go to the site of the
meter, this is referred to as "on-site" AMR.

Power Corporation Ltd, in the state of Uttarakhand, also uses similar method for
the purpose of recording of data in industrial and domestic units. Instead of using
rf signal optical contact using IR is being used as shown in Fig.1.4. This method
avoids the chances of recording incorrect reading due to human error. But even
this method still requires the exercise to access each and every meter in person.

Switch IR Port

Fig. 1.4 Digital meter being used in the state of Uttarakhand

 AMR using Radio Frequency Network

Radio frequency based AMR can take many forms. The more common ones
are Handheld, Mobile, and Fixed network. There are two-way RF systems
and one-way RF systems in use that employ both licensed and unlicensed RF

In a two-way or "wake up" system, a radio transceiver normally sends a signal

to a particular transmitter serial number, telling it to wake up from a resting
state and transmit its data. The transceiver attached with the electric meter and
the transceiver attached with the meter reader, send and receive radio signals
and data to each other. In a one-way “bubble-up” or continuous broadcast type
system, the transmitter broadcasts readings continuously every few seconds.
This means that the reading device can be a receiver only, and the meter AMR
device a transmitter only. Data goes one way, from the meter AMR transmitter
to the meter reading receiver. There are also hybrid systems that combine one-
way and two-way technologies, using one-way communication for reading and
two way communication for programming functions.

RF based meter reading usually eliminates the need for the meter reader to
enter the property or home, or to locate and open an underground meter pit.
The utility saves money by increased speed of reading, it has lower liability
from entering private property, and has less chance of missing readings
because of being locked out from meter access.

The Technology based on RF is not readily acceptable everywhere. In several

Asian countries the technology faces a barrier of regulations in place pertaining
to use of the Radio Frequency of any radiated power. For example in India the
radio frequency is not free for use even for a low power radio system of 10

 AMR using Mobile Van

Mobile or "Drive-by" meter reading is used where a reading device is installed

in a vehicle. The meter reader drives the vehicle while the reading device
automatically collects the meter readings. With mobile meter reading, the
reader does not normally have to read the meters in any particular route order,
but just drives the service area until all meters are read. Components often
consist of a laptop or proprietary computer, software, RF receiver/transceiver,
and external vehicle antennas. Wi-Fi technique is also implemented for this
type of data collection system.

 Power Line Communication

It is a method in which electronic data is transmitted over power lines back to

the substation, then relayed to a central computer in the utility's main office.
This would be considered as a type of fixed network system -- the network
being the distribution network which the utility has built and maintains to
deliver electric power. Such systems are primarily used for electric meter

 Web-Enabled AMR

Broad-band availability at nominal cost and without much complexity, web-

enabled AMR system is emerging at very fast pace. In this method electric
meter is made net enabled so that useful data from the meter is periodically
uploaded to the relevant site of the utility, from where analysis and billing job
be performed automatically. The author has made a successful attempt to
utilize this technique for executing the present work.

Literature Review
2.1 Introduction

Severity of energy crises was realized in the decade of 1990, hence reforms in all the related
fields started only after that. Most of the literature published there after, belongs to the diverse
fields of new sources of energy, fuel efficiency, fuel economy etc. The topic which the author
has undertaken in this work, belongs to the energy saving and monitoring techniques.
Literature shows that various efforts are being made constantly at laboratory as well as in the
field level to demonstrate a useful metering system. In consequence to this, use of electronic
(digital and analog) meters in all upcoming domestic and all commercial locations have been
made mandatory.

2.2 Literature Survey

The author has reviewed a large number of literature including research papers, technical
broachers, specification sheets, government rules and project reports in connection with the
proposed work. These are described below:

 Wayne L Stebbins emphasized in [1] on managing energy in industry, with many test
measurements and recordings to determine usage patterns before deciding what can
be done to reduce consumption. The author also mentioned the developments in digital
metering over the past several years that have significantly improved both meter
accuracy and repeatability. The advent of microprocessor based test devices and
meters has greatly improved the ease of operation, making the equipment "user-
friendly" even to the novice. Details presented in this paper include an introduction to
metering objectives, practical metering applications, latest metering techniques to
employ in the process of measurement and certain pitfalls in the process that should be
 Gambhir Ajay has mentioned in [2] in year 2001, regarding the use of internet enabled
modem chip for the benefit of the service provider and the end user. As per the author, de-
regulation, new technologies, energy shortages, price increases, heightened attention to
conservation and increased global competition are all causing sweeping changes to the utility
industry, in both residential and commercial sectors. These changes heighten the importance
of load management and motivate consumers to change their usage patterns to balance the
loads. In order to efficiently adapt to these changes and facilitate load balancing, utility

companies and their customers require new management and control capability. Advanced
communications techniques can provide these new capabilities and improve operating
 Reaz M.I.,Rahman et al. reported in [3], the development of an efficient algorithm that
implements a flexible and affordable digital energy meter intended for home usage. As
a first step, the algorithm is downloaded into an FPGA prototype board. The algorithm
architecture comprises four main modules: power, energy, billing and display. Two
digitized inputs, which are assumed to come from single-phase voltage and single-
phase current, will be fed into the digital energy meter and the output is expected to be
the energy consumed and the corresponding billing. The timing analysis and circuit
synthesis, have been performed on suitable platforms. Using digital synthetic test data
it has been proven that the model is tested successfully. This work forms the first
phase of developing a commercial but affordable digital energy meter for home usage
employing digital techniques. Another step will be to make the meter communicable
with remote control unit.
 Application note, Atmel, AVR465 in [4] describes a single-phase power/energy meter
with tamper logic. The design is such that, the meter measures active power, voltage,
and current in a single-phase distribution environment. It differs from ordinary single-
phase meters in that it uses two current transducers to measure active power in both
live and neutral wires. This enables the meter to detect, signal, and continue to
measure reliably even when subject to external attempts of tampering. The heart of the
meter is an AVR microcontroller. All measurements have been carried out in the
digital domain and measurement results are available in the form of frequency-
modulated pulse outputs and as plain-text values, accessible over the USART
interface. This enables the design to be used in cost-effective applications based on
mechanical display counters. Alternatively, the design easily fits more computerized
applications with features such as remote reading, demand recording, multiple tariffs,
and several others.
 Nagarju M. et al. mentioned in [5], regarding Smart metering using the IEEE P1451.2
Protocol, Energy meter standards have also been described in this paper along with the
requirements for such a meter and use of the technique for the quality power
measurement are also mentioned.
 M/S Energy Tracking, NJ, USA have produced a web enabled meter. Installation and
Operation procedures of this are mentioned in [6]. This manual describes the
installation and operation procedure for company’s standard commercial meter. This

meter consists of an embedded network module that has a web-server and is capable of
transmitting reports via Email and /or FTP. But it has no facility to upload the site of
the concerned utility periodically. This can send periodic reports only.
 Paranhos I. et al. in [7] emphasized that nowadays, the control over every minimal cost
is being very important for the market competition. Since the electric energy bills
represent a great amount of expenses for the companies, the monitoring of the power
quality helps to lower the energy costs and to prolong the machine’s life. But, not
every company can pay for an expensive resource that helps to minimize the expenses.
This paper presents study and development of a low cost electrical energy monitoring
system, that consists of a digital energy meter, a software for the system management,
a data-base to store the measurements and a web-page to monitor the energy quality
from anywhere, through the internet. Algorithms based on calculus, were proposed for
implementation. Physical environment and communication protocols have also been
 Coca Eugen, in [8] presented an energy meter reading interface application. Energy
pulses for every quarter of an hour are counted by a microcontroller and stored on a
non-volatile medium, all required data being transmitted to the energy dispatcher
control unit via an Internet communication embedded controller. The idea may be
applied in power substations but is also useful for medium-size consumers who have
multiple exchange points with the energy supplier, equipped with standard meters that
are able to provide only free potential relay contacts for billing applications. Using
standard Ethernet network communications is also a very new idea in this field, all
data may be available in real time to the energy management unit.[8]
 Markow John, in [9] described microcontroller based energy metering using the IC
AD 7755. The author also described how the Energy Meter’s IC AD 7755 could be
used in three-phase energy metering with power outage detection and measurement
backup, remote, automated, multiple-rate metering.
 Specification sheet of IC ADE 7754 in [10], described multifunction poly-phase
energy metering IC with serial port interface, from Analog Devices. It described the
use of this IC as interface between measuring equipment and serial port of the
computer. This can be used as an analytic tool for electrical measurement.

 Specification sheet of IC ADE 7758 from Analog Devices, in [11],described

multifunction poly-phase energy metering IC with serial port interface. The

specifications for the microcontroller based IC ADE 7758 to be used as analytic tool
for electrical measurement, are also described in this.
 Loss P.A.V. et al. presented in [12] a microcontroller based energy meter, a totally
electronic single-phase energy meter for residential use, based on Microchip
Technology Inc. PIC family of microcontrollers. In this paper author explained the
basics of energy measurement, in integration with the use of microcontroller. This
paper has demonstrated the possibility of measuring the electrical energy consumption
with a microcontroller based meter, as an alternative to the conventional
electromechanical meters.The design proposed in the said paper takes into
consideration the correct operation in the event of an outage or blown out, by
recording the energy consumption in EEPROM memories internally available in the
microcontroller. When the supply is restored, the energy consumption computation is
properly initialized. Also, a four digit display is used to show the energy consumption.
 Chavan S et al in [13] proposed an open standard protocol for networking of energy
meters under the simple network-management protocol (SNMP) environment. Since
the SNMP is quite popular for network enabling uninterruptible power supplies, the
necessary support hardware and software already exist. Hence, migrating energy meter
connectivity to the transfer control protocol/Internet protocol-based SNMP would be
an easy task. A sample network has been created under the LabVIEW virtual
instrumentation environment and studied to validate the proposed open standard
protocol for networking of energy meters.
 Ayurzana Odgerel et al. in [14] described an automatic remote water measurement
system. This system sends remotely collected water meters data automatically from
the transmitter with CDMA modem through SK-Telecom network. The water meter
data are received through LAN TCP/IP and displayed as test file on Internet browser.
This paper is all about the water meter reading but the objective is same, that can also
be used for electricity measurement.
 Cao Liting et al. in [15] suggested the mesh technology for cluster of networked
meters. As per the authors, meters at a particular location are networked together and
connected to one gateway server from where wireless link is made to the main control
centre. This paper gave an insight to the connections of the meter.

 Cao Liting et al. in [16] mentioned how to network remote meter reading system,
based on wireless technology. Heart of the system is ARM MPU S344B0X with

embedded software system. In this system different residences are connected with
local management centre by GSM medium, where as local management centre was
connected with utility using wired or wireless technology.
 Artur Krukowski et al. in [17] presented an alternative route to transfer Simulink
model into VHDL. Such an idea would be a very attractive way of designing test chips
quickly. It takes less time to get the final synthesised version from the Simulink
model. However the process of transferring the design on FPGA chip, has not been
mentioned in this report.
 Naphade S.P. in [18], has focused, on the cost reduction benefits of the automatic
meter reading. This is a motivational paper to promote the use of automatic meter
reading further.
 Doraswami Anand in [19] has insisted upon the need for an electronic meter at
domestic as well as industrial level.
 Specification sheet [20] provided by Atmel for 8-Bit microcontroller IC AT89S52
with 8KB in system programmable flash memory provides the methods to develop the
circuit as per the requirement.
 Specification sheet [21] provided by Atmel for Energy metering IC ADE 7755 with
pulse output, provides great insight for power measurement in digital domain. This
paper also provides the way to incorporate microcontroller in the process of energy

2.3 Inferences Drawn out of the Literature Survey

A thorough literature survey revealed that after the decade of nineties, concern over the need
for accurate and transparent electricity measurement [19] has arisen. Simultaneously
manufacturers have started developing electronic products to suit this need [10,11,16,20].
Main observations as inferences drawn out of the literature survey are summarized below:

 Electric energy generation and demand are not comparable. Demand is much more
than the generation. This gap is increasing day by day and there is no way out because
conventional resources are limited. Non-conventional sources are not at the state to
feed the large demand. In view of this, conservation of electricity is the only probable

 Proper data acquisition and correct measurement of the consumption are necessary for
demand analysis, fault finding and on the top, executable planning for the future.

 There should be a phased program to replace the inefficient electromechanical meters
by the precise electronic meters,

 Manual meter reading is not feasible because of the large number of users staying in
multistoried buildings and none is available at the home during working hours.

 Increased literacy rate and awareness of the consumer rights, have prompted the
transparency requirement in energy reading also. Every consumer has the right to
know the actual consumption of electricity measured.

 The methods for collecting data regarding use of electric energy, must be transparent,
and there must be proper record of the collected data and which may be open to the

 The technology is now advanced enough and there are various electronic products
available in the market which along with the latest technical knowhow, may be used to
fabricate the system for achieving the objectives of transparency and efficient data

 Among others, Atmel Corporation US has already been engaged in producing low cost
microcontrollers which, along with suitable software and hardware support, can
economically be used for this purpose of fabricating such systems [20].

 Atmel Corporation have also produced front end IC ADE 7755 that can be used in an
energy metering system as an ideal replacement for the conventional electromagnetic
energy meters [21].

 Work on the net enabled electric meters, is already in pipeline. Products based on the
preliminary designs, are already available in the market [11,14,16].

2.4 Scope of the Work

The scope of the present work is limited to the use of microcontroller Atmel’s AT 89 S 52
along with support hardware like serial port interfacing IC HIN 232, Energy metering IC ADE
7755, external serial EEPROM IC 2402 and 16 x 2 LCD display IC. Suitable software to
program the microcontroller and to capture and display the data on the screen of the computer
working in server mode, are also used. Software are responsible to read the consumption of
electrical energy from the hardware and display number of consumed units at site as well as to
transmit the data to the web page of the internet for electricity supply company and the
consumer also.

The present work is limited to the following:

 Measurement of the single- phase parameters,

 Voltage, current and power factor have been taken as the main parameters sampled
for processing,
 Electrical energy consumption has been recorded and transferred to the utility with
time stamp,
 Sampling of the above data periodically and provision of maintaining the records, for at least
one year on the computer itself.
 Data processing is performed with the use of microcontroller AT 89 S 52 module.

2.5 Problem Definition

Design, development and implementation of a reliable, efficient and cost effective
“Web Enabled Automatic Electrical Energy Meter” comprising microcontroller based
hardware and compatible software to capture, transmit, display and maintain the record of the
electricity consumption data of a particular user on the internet page.

Power and Energy Measurement

3.1 Energy Measurement

Active power is defined as the power used by a device to produce useful work.
Mathematically it is the definite integral of voltage, u (t), times current, i (t),
Active Power Definition:

P= x i (t) = U x I x cos (φ) 3.1

Here U and I are the respective voltage and current root mean square (RMS) values of in
coming signal and Φ is the phase lag between current and voltage.
The discrete time equivalent is:
Active Power Definition in Discrete Time:

P= x i (n) 3.2
Here u(n) and i(n) are the sampled instances of u(t) and i(t) and N is the number of
samples. Small n indicates the discreet nature of the equation. Active power is calculated
simply as the average of N voltage-current products. It can be shown that this method is valid
for both sinusoidal and distorted waveforms. The implementation uses 32-bit data types
(signed long) for storing accumulated data. The result is stored as a floating-point number.
When the meter has been calibrated, the active power results are in units of watts.

3.2 Theory of Power Measurement in Digital Domain

In a common digital system for measurement of the power, voltage and currents are
monitored using resistor and current transformer respectively as transducers. The two ADCs
digitize the voltage signals from the current and voltage transducers. These ADCs are of 16-
bit, second-order Σ-Δ with an oversampling-rate of fairly high frequency. A high-pass filter in
the current channel removes any dc components from the current signal. This removal
eliminates any inaccuracies in the active power calculation due to offsets in the voltage or
current signals.
The active power calculation is derived from the instantaneous power signal. The
instantaneous power signal is generated by a direct multiplication of the current and voltage
signals. To extract the active power component (that is, the dc component), the instantaneous
power signal is low-pass filtered.

Fig. 3.1 Power measurement and conversion to frequency

Fig. 3.1 shows the two inputs CH1 and CH2 corresponding to current and voltage respectively.
Current value at CH1 is usually read by the current transformer. Input voltage is amplified
with programmable gain amplifier (PGA) and then goes to sigma-delta second order
modulator with a sampling frequency of 900 kHz. Then signal is passed through high pass
filter and then delayed to compensate phase shift in filter.

In second input CH2, available voltage is proportional to the load voltage. This voltage
is modulated with second sigma-delta modulator. Then instant current and voltage values are
digitally multiplied to get instant active power. Results are then passed through low pass filter
to get current active power. Instantaneous power value is converted into proportional
frequency and this frequency is made available at output terminals F1. Another terminal F2
has the same frequency but in inverted phase. Frequency signals at F1 and F2 are applied to
drive low rpm motors such as stepper motor.

Another digital to frequency output terminal is CF. Signal frequency available at this
terminal is proportional to the instantaneous active power. This frequency is higher than
frequency available at terminal F1, and called calibration frequency (CF). This high output
frequency has shorter integration time, and this is useful for system calibration purposes
under steady load conditions. The same CF output is taken to run external microcontroller
device for manipulation and display purpose.

Having obtained this data there are many ways to display and register energy. One of
the ways is to use stepper motor and other one is to implement microcontroller based display.

3.3 Power Factor Consideration
The method used to extract the active power information from the instantaneous power
signal (that is, by low-pass filtering) is valid even when the voltage and current signals are not
in phase. Fig. 3.2(a) displays the unity power factor condition and Fig. 3-.2 (b) at 0.5 power
factor (PF), that is, current signal lagging the voltage by 60°. Assuming that the voltage and
current waveforms are sinusoidal, the active power component of the instantaneous power
signal (that is, the dc term) is given by:

P = x Cos (60) 3.3

Fig. 3.2 DC Component of Instantaneous Power Signal

The active power calculation method also holds true for non-sinusoidal current and
voltage waveforms. All voltage and current wave-forms in practical applications have some
harmonic content. With the use of the Fourier Transform operation, instantaneous voltage
and current waveforms can be expressed in terms of their harmonic contents.

3.4 Energy Measurement with the Microcontroller Interface

The easiest way to interface the microcontroller with power measurement module is to use
the high calibration frequency( CF) output of the power IC. With full-scale ac signals on the
analog inputs, the output frequency on CF is approximately 5.5 kHz. Fig.3.3 illustrates one
scheme that can be used to digitize the output frequency and carry out the necessary averaging
for estimating the amount of energy consumed.

Fig.3.3 Power IC and Microcontroller Unit Interfacing

The frequency output at terminal CF of the power measuring IC, is connected to a

microcontroller unit (MCU) counter, which counts the number of pulses in a given integration
time that is determined by the internal timer of the MCU. The energy consumed during an
integration period is given by:

Average Frequency Average Active Power =

Energy = Average Power x Time = x Timer = Counter

For the purpose of calibration, this integration time can be 10 to 20 seconds to
accumulate enough pulses to ensure correct averaging of the frequency. In normal operation,
the integration time can be reduced to 1 or 2 seconds depending on the situation, for example,
on the required update rate of a display. With shorter integration times on the MCU, the
amount of energy in each update may still have some small amount of ripple, even under
steady load conditions. However, over a minute or more, there is a chance that the measured
energy has no ripple.

The circuit also includes a no load threshold and start-up current feature that
eliminates any creep effects in the meter.

Any load generating a frequency lower than a minimum frequency would not cause a
pulse to be issued on terminals F1, F2, or CF of power IC 7755. The minimum output
frequency is given as 0.0014% of the full-scale output frequency.

International Electro-technical Commission standard IEC 1036 (1990) for alternating

current static watt-hour meters for active energy, states that the meter must start up with a load
current equal to or less than 0.4% nominal current. For a 5 A meter, 0.4% is equivalent to 20
mA. Therefore counting will start at 20 mA of the load current value.

Calculating and displaying power information always has some associated ripple that
depends on the integration period used in the microcontroller unit to determine average power
and also the load. For example, at light loads, the output frequency can be 10 Hz. With an
integration period of 2 seconds, only about 20 pulses are counted. The possibility of missing
one pulse always exists because the IC ADE7755 used in the current project, output frequency
is running asynchronously to the microcontroller unit timer. This possibility results in a 1-in-
20 (or 5%) error in the power measurement. Looking at this point in the present case 3600
pulses per kWh is maintained as the standard.

3.5 Microcontroller Unit

In industrial and domestic products, microcontroller is a device that can perform
automatic control, data storage and processing in cost effective and efficient way.
Microcontroller provides smaller size, flexible configuration, fast implementation of desired
job and low power consumption [20]. The microcontroller has changed the architecture of
instrumentation, measurement and control due to its custom build configuration and
computation capability. Microcontroller allows controlling the timing sequence of the
machines, processes and can carry out simple arithmetic and logic operations.

Microcontroller is an embedded system having all the functional blocks which can
fulfill the general need of automation. Microcontroller consists of central processing unit
(CPU), Airthmatic and logic unit (ALU), serial port, Accumulator, Timer, Stack and many
more functional blocks on a single chip. All these blocks can be programmed as per our
requirement. In other words microcontroller can be called as a single chip microprocessor.
Microprocessor require additional memory and other components to be added externally, but
microcontroller has all required components integrated in the chip. It is therefore

microcontroller system is fabricated for a specific single job. Microprocessor based system is
fabricated keeping in view of its versatility for millions of jobs.

There are many brands of microcontrollers available commercially in the market. Most
popular are Intel 8051, MCS -51, ATMEL’s 89C2051, and ATMEL’s 89S52. Fig.3.4 shows
the block diagram of a general microcontroller.

Fig. 3.4 Block Diagram of Generalized Microcontroller

As shown in Fig. 3.4 a microcontroller has the following functional blocks:

 CPU: Central Processing Unit

 I/O: Input /Output
 Bus: Address bus & Data bus
 Memory: RAM , ROM and/or Flash memory
 Timer Oscillator
 Interrupt
 Serial Port
 Parallel Port

Microcontroller has CPU, RAM, ROM, I/O and Timer on a single chip for cost
effectiveness, power and space consideration. Microcontroller is made for one application and

it remains dedicated to the same work. Its functionality seldom changes. That is why it is
known as a dedicated or stand alone controller.

In the current work, author has used ATMEL’s AT89S52, an 8-bit Microcontroller
with 8K Bytes in-System Programmable (ISP) Flash. The device is manufactured using high-
density nonvolatile memory technology and is compatible with the industry-standard 80C51
instruction set and pin configuration. The on-chip Flash allows the program memory to be
reprogrammed in-system or by a conventional non-volatile memory programmer.Fig.3.5
shows the pin configuration of AT 89 S 52 microcontroller.

Fig. 3.5 Pin configuration of microcontroller AT 89S52

3.6 Microcontroller Programming Hardware and Software

A micro-controller can be compared to a small stand alone computer; it is a very

powerful device, which is capable of executing a series of pre-programmed tasks and
interacting with other hardware devices. But microcontroller requires some software in terms

of the program burned into its memory before the execution of the project. This software
guides the hardware what and when to perform a desired action. In case of the current project
the microcontroller Atmel’s 89S52 is based on the core technology of Intel’s 8051 which is
compatible with the Intel’s assembly language used for its microprocessors and
microcontrollers. Long programs as with the current case may also be written in higher level
language such as most common language C with suitable software and hardware support.

The C source code is very high level language, meaning that it is far from being at the
base level of the machine language that can be executed by a processor. This machine
language is basically just zero’s and one's and is written in Hexadecimal format, that’s why it
is called HEX files. KEIL u-Vision is the name of proprietary software dedicated to the
development and testing of a family of microcontrollers based on 8051 technology, like the
89S52 which the author has used along this project. An evaluation version of KEIL was down
loaded from the website:

KEIL software is used to convert a C program to machine language, it takes several

steps however, and the main idea is to produce a HEX file at the end. This HEX file was then
used by the 'burner' to write every byte of data at the appropriate place in the Flash memory of
the 89S52.

The Code memory array of the AT89S52 can be programmed using the serial In System
Programming (ISP) interface. The serial interface consists of pins SCK, MOSI (input) and
MISO (output) of the microcontroller IC 89S52. Before a reprogramming sequence can occur,
a Chip Erase operation is required. Fig.3.6 depicts the schematics of the connections made to
serially program the microcontroller.

Fig.3.6 Connection layout for Serial Programming of Microcontroller
Programming sequence after the chip erase has occurred, follows the follows the steps given

(i) Input the desired memory location on the address lines.

(ii) Input the appropriate data byte on the data lines.

(iii) Activate the correct combination of control signals.

Fig. 3.7 Block Diagram of In System Programmer

Fig. 3.7 shows the block diagram of an In System Serial programmer for AT 89 S XX series
microcontrollers. This In System Programmer is RS232 (serial port) based but can be used with

USB using USB to RS232 converter. In the block diagram five pull resistors are visible, which
makes the in system input and output pins MISO and MOSI pulled up to high status if data is
not available.

The Programmer is powered from the target board ie. microcontroller under programming. The
AT89C2051 microcontroller is programmed with the programmesr firmware. The PC software
available with it, is easy to use and is designed especially for batch programming. This
hardware supports the microcontroller AT89S52.

The crystal for the programmer board is of the rating of 11059,2 kHz. To use this frequency S
(Slow mode) in the command line has been included. All command line parameters are
displayed by the program itself.

3.7 Display System

Electrical energy consumption depends upon the value of voltage and current at the
measuring input and output terminals. According to these values instantaneous active power is
calculated and in proportion to instantaneous power, pulses are produced. The number of
pulses and corresponding energy consumption is displayed on an LCD panel.
Microcontroller interfaces with this 5 volts display screen. In the current data
regarding the consumption of the electrical energy is made available on the internet but it is
also desirable to show the instant data locally at the site of meter installation. This objective is
met with the use of LCD panel, which shows pulse counts and the kWh consumed. The LCD
panel unit receives character codes (8 bits per character) from the microcontroller, latches the
codes to its display data RAM (80-byte DD RAM for storing 80 characters), transforms each
character code into a 5 x 7 dot-matrix character pattern, and displays the characters on its
LCD screen.

The LCD unit incorporates a character generator ROM which produces 160 different 5
x 7 dot-matrix character patterns. To display a character, positional data is sent via the data
bus from the microcontroller to the LCD panel, where it is written into the instruction register.
A character code is then sent and written into the data register. The LCD unit displays the
corresponding character pattern in the specified position. The LCD unit can either increment
or decrement the display position automatically after each character entry, so that only
successive characters codes need to be entered to display a continuous character string. The
display/cursor shift instruction allows the entry of characters in either the left-to-right or right

to left direction. Since the display data RAM (DD RAM) and the character generator RAM
(CG RAM) may be accessed by the microcontroller, unused portions of each RAM may be
used as general purpose data areas. The LCD unit may also be operated with dual 4-bit or
single 8-bit data transfers, to accommodate interfaces with both 4-bit and 8-bit

3.8 PC and Web Interfacing
Web interfacing can be achieved using microcontroller programmed in a way to
interface with the PC through serial port. In case of serial port interfacing all the data remains
available at the buffer of the serial port. To fetch and display the data from the serial port
following software packages are used

 Visual Basic : Visual Basic is a tool that allows us to develop Windows (Graphic User
Interface - GUI) applications. The applications have a familiar appearance to the user.
It is an event-driven application, which means the program code remains idle until
called upon to respond to some event such as button pressing, menu selection, etc.

Visual Basic is governed by an event processor. Nothing happens until an event is

detected. Once an event is detected, the code corresponding to that event (event
procedure) is executed. Program control is then returned to the event.

Some important features of the Visual Basic are as follows:

• Lots of icons and pictures for page design use,
• Response to mouse and keyboard actions,
• Clipboard and printer access,
• Full array of mathematical, string handling, and graphics functions,
• Can handle fixed and dynamic variables and control arrays,
• Sequential and random access file support,
• Useful debugger and error-handling facilities,
• Powerful database access tools,
• ActiveX support,
• Package & Deployment Wizard makes distributing one’s applications
• simple
In the current , It is used to design the window that fetches the data from serial port at
a periodic interval decided by the software program.

MySQL: It is a Relational Data-Base Management System (RDBMS). MySQL stands

for “My Structured Query Language”. The program runs as a server providing multi-
user access to a number of data-bases. It is the software used to prepare data-base of

the fetched data. Many web applications use MySQL, as the data-base component of a
Linux based software stack. Its popularity for use with web applications is closely tied
to the popularity of PHP, which is often combined with MySQL. Several high traffic
web sites including Flicker, Facebook, Wikipedia, Google (not the search engine)
Nokia and YouTube use MySQL, for data storage and logging of user data. Keeping
this in view and free availability of this software, it has been used as data-base for the
current work. It is available free under General Public License.
 ODBC: In computing, Open Data-base Connectivity (ODBC) provides a standard
software API method for using data-base management systems (DBMS). The
designers of ODBC aimed to make it independent of programming languages,
database systems, and operating systems. It works as bridge to display the data from
database. In case of MySQL, ODBC driver is installed to fetch data from it and to
display on desktop as clint. ODBC aims to provide a common API for access to
SQL1-based data-base management systems (DBMSs) such as MySQL, The
connection to the particular DBMS needs an ODBC driver and these come with the
DBMS or the ODBC driver manager or be provided separately by the DBMS
 PHP: This stands for "PHP: Hypertext Preprocessor" and is a widely-used Open
Source general-purpose scripting language that is especially suited for Web
development and can be embedded into HTML. Its syntax draws upon C, Java, and
Perl, and it is easy to learn. The main goal of the language in the current project is to
allow web developers to write dynamically generated web pages quickly. Instead of
lots of commands to output HTML (as seen in C or Perl), PHP pages contain HTML
with embedded codes. The PHP code is enclosed in special start and end processing
instructions, that allows to jump into and out of "PHP mode."

What distinguishes PHP from something like client-side JavaScript is that the code is
executed on the server, generating HTML which is then sent to the client. The client
would receive the results of running that script, but would not know what the
underlying code was. Author has configured the web server to process all HTML files
with PHP.

This is the most traditional and main target field for PHP. The PHP parser (CGI or
server module), a web server and a web browser are needed to execute the present
assignment. The PHP program output can be accessed with a web browser, viewing

the PHP page through the server. In layman’s language, it is used to make the web
page dynamic; otherwise normal html page remains static. In the current work data is
continuously varying and hence display should follow the same.

 Apache: Internet or intranet connectivity is possible through a well defined server.

Apache is the available medium for this. It is generally recognized as the world's most
popular Web server (HTTP server). Originally designed for Unix servers, the Apache
Web server has been ported to Windows and other network operating systems (NOS).
The name "Apache" derives from the word "patchy" that the Apache developers used
to describe early versions of their software.
The Apache Web server provides a full range of Web server features, including
CGI, SSL, and virtual domains. Apache also supports plug-in modules for
extensibility. Apache is reliable, free, and relatively easy to configure. Apache
software is distributed free by the Apache Software Foundation.
Keeping all the points in view, in current work, the author has developed a
dynamic web page on the Apache server platform, for showing the electricity
consumption, to all connected computers.

 Wamp Server: It is a special purpose server that runs Apache, PHP and My SQL
simultaneously in auto configured form. In the current work, Apache is the web server,
which handles browser requests and sends the information across the internet to the
browser. PHP is the programming language and creates dynamic content which in turn
is sent to Apache, which further sends the data to the browser. And finally, MySQL is
the data-base which stores the information for programs. PHP is used to access this

In the same way a great majority of websites are run by a trio of services –
Apache, MySQL and PHP. It is a tried and tested trio which works phenomenally well.
Usually to gain access to all three simultaneously, a package Wamp Server is available
and has been used in this work . The WAMP Server bundle includes Apache Server,
MySQL, and PHP. WAMP stands for Windows Apache, MySQL and PHP.

It is an open source software package and available on the web.

Hardware and Software Implementation

4.1 Introduction

The present work was undertaken by the author with the aim to develop and implement the
scheme of a Web Enabled Automatic Electric Energy Meter that provides the metered data to
a computer server from where it may be available to every authorized person over internet.
Fig. 4.1 shows the main block diagram of the system.

Fig.4.1 Block Diagram of the Web Enabled Energy Meter

4.2 Voltage and Current Sampling

Module 1 comprises the embedded components and is applied to monitor the voltage
and current. This is a standard Bentex make integrated circuit 7755 based module. Fig.4.2
shows its block diagram.

Fig. 4.2 Block Diagram of Module 1

Module 1, is a DSP enabled system which monitors the voltages corresponding to supply
voltage and load current. As already been discussed in sections3.1 and 3.2 of chapter 3.This
module samples the voltages

This module, based on the Atmels IC ADE7755, provides a high accuracy electrical
energy measurement system. The part specifications surpass the accuracy requirements as
quoted in the statutory standards. The only analog circuitry used in the ADE7755 is in the
ADCs and the reference circuit. All other signal processing (for example, multiplication and
filtering) is carried out in the digital domain. This approach provides superior stability and
accuracy over extremes in environmental conditions and over time.Fig.4.3 shows the
functional block diagram of IC 7755.

Fig.4.3 Functional Block Diagram of IC ADE7755

The IC ADE7755 supplies average active power information on the low frequency
outputs, F1 and F2. These logic outputs can be used directly to drive an electromechanical
counter, and the CF logic output gives instantaneous active power information. This output is
intended to be used for calibration purposes or for interfacing to a Micro Controller Unit.

The ADE7755 includes a power supply monitoring circuit on the AVDD supply pin.
The ADE7755 remains in reset condition until the supply voltage on AVDD reaches 4 V. If the
supply falls below 4 V, the ADE7755 resets and no pulse is issued on F1, F2, and CF. Internal
phase matching circuitry ensures that the voltage and current channels are phase matched
whether the HPF in Channel 1 is on or off. An internal no load threshold ensures that the
ADE7755 does not exhibit any creep when there is no load. The easiest way to interface the
ADE7755 to a microcontroller is to use the high frequency output CF with the output
frequency scaling set to 2048 × F1, F2. This is done by setting SCF = 0 and S0 = S1 = 1 [21].
With full-scale ac signals on the analog inputs, the output frequency on CF is approximately
3.6 kHz. These pulses are taken to an opto-coupler and then applied to microcontroller. Fig.
4.4 shows the embedded circuit of module 1 based on IC 7755.

Fig. 4.4 Embeded Circuit of Module 1, based on IC 7750

4.3 Microcontroller Selection
The Web Enabled Automatic Electrical Energy Meter has been implemented using
Atmel’s microcontroller AT89S52. The AT89S52 is a low-power, high-performance CMOS
8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The on-chip
Flash allows the program memory to be reprogrammed in-system or by a conventional non-
volatile memory pro-grammer. By combining a versatile 8-bit CPU with in-system
programmable Flash on a monolithic chip, the Atmel AT89S52 has become a powerful
microcontroller which provides a highly-flexible and cost-effective solution to many
embedded control applications. Fig.4.5 shows the simple architecture of this microcontroller

Fig 4.5 Architecture of ATMEL’s Microcontroller AT 89S52

The AT89S52 provides the following standard features:
 8K bytes of In-System Programmable (ISP) Flash Memory,
 256 bytes of RAM,
 32 I/O lines, distributed in four ports,
 Watchdog timer,
 Two data pointers,

 Three 16-bit timer/counters,
 A six-vector two-level interrupt architecture,
 A full duplex serial UART Serial Channel port, on-chip oscillator, Clock circuitry.
 4.0V to 5.5V Operating Range
 Compatible with MCS®-51 Products
 Fully Static Operation: 0 Hz to 33 MHz
With the availability in the Indian market at economic rate and build in with these
features along with ease of programming made the microcontroller AT 89S52 the first choice
to be used in Web Enabled Automatic Electric Energy Meter. Fig.4.6 shows the internal
architecture of microcontroller AT 89 S 52.

Fig. 4.6 Internal Archietecture of Microcontroller

4.4 Microcontroller Pin Connections
Microcontroller receives the signal from the terminal marked CF in IC 7755 through opto-
coupler in power module. Frequency of the signal is proportional to average power consumed.
This input is received at the pin no.12 which is an active low interrupt under port 3 of
microcontroller. Fig 4.7 shows the various input and out put connections of microcontroller
AT 89S52.

Fig.4.7 Pin Connections of Microcontroller AT 89S52

Pin 26 to 28 and 32 to 39 are connected with the LCD display board. These pins constitute the
Port 0 and partly port 3. Pin 21 and 22 are connected with the external EEPROM for
integration of the pulse data received from the power module 1. Pin 6 to 9 are assigned for In
System Programming (ISP) in serial mode. Crystal of 11.0592 connected between
Pins 18 and 19, which are specifically assigned this function. Pin 40 and Pin 31, are connected
to the supply and pin 20 is grounded.

4.5 External Code Memory

External memory exists off chip in the form of EEPROM. This is a serial in out
memory. Serial memory devices offer significant advantages over parallel devices in applica-
tions where lower data transfer rates are acceptable. In addition to requiring less board space,
serial devices allow microcontroller I/O pins to be conserved. This is especially valuable
when adding external memory to low-pin count microcontrollers such as the Atmel AT89S52
and AT89C4051. External memory is only of 2 KB and address bits A0, A1 and A2 are kept
high. Pin diagram of IC 2402 is shown in Fig. 4.8.
Fig.4.9 shows the connections of the external memory chip with the microcontroller.
Two wire serial EEPROM IC 2402 has been used in the current assignment, This EEPROM is
Internally organized with 256 x 8 bits (2k), in 32 pages of 8 bytes each, the 2K requires an 8-
bit data word address for random word addressing.

Fig. 4.8 Pin Diagram of IC 2402

Fig.4.9. External Memory Connection with Microcontroller

4.6 Transmitter/ Receiver Hardware
Microcontroller AT 89S52 supplies the data of energy consumption, to the computer
through its serial port which is based upon the RS 232 standard. Matching of the
microcontroller to RS 232 is done through another IC HIN 232. The HIN232 family of RS-
232 transmitters/receivers interface circuits meet all RS-232E specifications, and are
particularly suited for those applications where ±12V is not available. They require a single
+5V power supply and feature onboard charge pump voltage converters which generate +10V
and -10V supplies from the 5V supply.
This family of devices offer a wide variety of RS-232 transmitter/receiver combinations to
accommodate various applications efficiently hence has been preferred for developing the
hardware. The drivers with this device feature true TTL/CMOS input compatibility, The
receivers can handle up to ±30V, and have a 3 to 7 kΩ input impedance. The receivers also
feature hysteresis to greatly improve noise rejection. The Fig. 4.10 shows the pin
configuration of IC HIN 232 CP

Fig.4.10 Pin Configuration of IC HIN 232 CP

4.7 Liquid Crystal Display(LCD) Panel

Microcontroller also drive an LCD panel which remains available at the users
premises so that consumption of electrical energy may be visible at the measuring end also.
Sunrom make LCD panel has been used for this purpose.This is a high quality 16 character
by 2 line intelligent display module, with back lighting. It works very well with AT 89S52
microcontroller. It has the following features:

• 16 Characters x 2 Lines
• 5x7 Dot Matrix Character + Cursor
• LCD Controller/driver Built-In
• 4-bit or 8-bit MPU Interface
• Standard Type
• Works with almost any Microcontroller

Fig.4.11 shows the LCD panel used in the circuit.

Fig. 4.11 LCD Panel

4.8 Complete Hardware Implementation

In case of hardware microcontroller is the heart of the work. It takes the pulses from the
power module and counts them to convert into the equivalent energy value. This energy value
is displayed in the LCD panel. At power on, microcontroller displays the kWh reading stored

Working of the microcontroller AT 89 S 52 is depicted in flow-chart shown in Fig.4.12.

Fig. 4.12 Flow chart of Microcontroller Operation

EEPROM IC 2402 maintains the kWh data in nonvolatile mode so that reading always
remain there in case of power failure also. Module 1, IC 7755 keeps the track of voltage,
current and corresponding power. In proportional to the average power pulses are made
available at its pin CF and which through isolation of an optocoupler sends these pulses at the
pin 12 marked as INT0 of Microcontroller AT 89S52. The same pin can also be used for other
interrupts also hence microcontroller checks for proper signal of pulse count. In case of power
pulses counting starts at the rate of total 3600 pulses per kWh. As soon as pulse count reaches
3599 next pulse resets the pulse display and microcontroller increments the EEPROM reading
of kWh by 1 and the cycle repeats.
Display of pulse count and kWh readings is on the same panel but both are controlled
separately. EEPROM IC 2402 is available for integration of energy as well as maintaining the
data secure in case of power failure.

4.9 Supporting Components

Complete circuit require some supporting components also for its working. These
components are as follows:

 Miniature Transformer It is a 6-0-6 volts, 300 mA, centre tap transformer with 230
V in put winding. This provides the electrical power for the functioning of the
complete assembly. In case of working units this consumption would also be taken
into account.
 Voltage Regulator IC 7805 is the common three legs IC used for the regulation of the
dc voltage before supply is made available to the different integrated circuits. This has
rated for a current up to 1 amp. In the present case total demand is limited within
200mA only.
 Terminal Block It is the location where supply and load conductors are connected
with the meter. It is made of hardened fireproof plastic and chrome plated copper
terminals are moulded in it. All the connections are secured by the brass terminal and
screws for least resistance contacts.
 Crystal Clock quartz crystal in metal can is also mounted with the microcontroller IC
to maintain the constant frequency of the microcontroller. This crystal has its
resonance frequency equal to 11.0592 MHz.

 Current Transformer Current monitoring is done with the use of a current
transformer (CT) shown in Fig. 4.13. This CT has 1000 turns in the secondary winding
and rated for 10 A of the current.

Fig. 4.13 Terminal Block and Current Transformer

 Miscellaneous Items Various miscellaneous items such as indicating LED’s, resistors,

Capacitors, hook up wires, bakelite printed circuited board etc. are also included in the
final prototype working model of the present system. Complete circuit is developed on
hardboard and main components are tied by the metal screws.

4.10 Complete Assembly of the Circuit

Fig. 4.14 shows the photograph of actual prototype assembly of the Web Enabled Automatic
Electric Energy Meter. On the board, microcontroller IC, module-1 based on IC 7755,
external EEPROM IC 2402, Serial port interface IC HIN 232, and LCD panel are mounted
with all the electrical connections.

Fig.4.14 Complete Assembly of Web Enabled Electrical Energy Meter without PC

Complete circuit is powered by a miniature center tap transformer, full-wave rectifier

with filter capacitors and 5 Volts regulator. This circuit delivers a current 300 mA maximum,
which is sufficient for this circuit. Plastic moulded connectors are provided for power
connections from supply and load sides. Current measurement has been done using a
miniature current transformer of 1000 : 1 ratio.

4.11 Software Implementation
Electronic circuit as fabricated for this Web Enabled Automatic Electric Energy Meter
requires various software programs to run and perform the desired operation. Following
software were used for this purpose:
 C / Assembly language compatible to 8051 series of microcontrollers,
 Visual Basic Studio for data recorder set up as shown in Fig.4.15
 Wamp Server comprising Apache, PHP and My SQL
 Open Data Base Connectivity (ODBC) for bridging between data recorder and
database in My SQL.

Fig.4.15 Visual Basic Data Recorder Window

4.12 Web Page

A dynamic web page is prepared with the PHP software available in Wamp Server.
The same server also contains the Apache which floats this dynamic page for internet or
Two web pages are prepared to show the following data on the net:
 Hourly data page : Updates every minute to the data for one hour, as shown in
 Daily data page: After every hour this page is updated and it keeps the data for
one year as shown in Fig. 4.17
 Web page in background keeps the user’s identity, password and payment
made to utility.

Fig.4.16 Hourly data page

Fig.4.17. Daily data page

4.13 System Operation

Working of the system requires installation of all the software in main server PC.
These software are ODBC, VB studio-6, My SQL, Apache, and PHP. Although last three are
included in configured manner with Wamp Server itself. As per the fig. 4.18 connections from
the pins 10 and 11 along with the ground reaches to serial port of the PC through transmitter/
Receiver IC HIN 232.

Fig.4.18 Layout and connections of the complete circuit

All the electrical energy consumption is interpreted by the microcontroller and displayed at
the local LCD display. Corresponding data is also send to the serial port of the PC, where
whole of the data is fed to data-base MySQL. This data will remain for complete one year.
Frequency of data collection is set by the software as one reading per minute whereas
hardware is so tuned that 3600 pulses are generated for each one kilowatt-hour. Energy
consumption data is collected at the buffer of the serial port from where it is collected by the
software data- recorder. Data-storage-rate may be different from the one minute software rate
of data reading by the PC, therefore to avoid any dispute PC software always collects the
latest data available at the serial port buffer.
4.14 Complete Circuit Diagram

Fig. 4.19 Complete Circuit Diagram

Results and Discussions

5.1 Results
Design and development of solid-state single-phase web enabled electric energy meter
was successfully completed. The electric energy was captured with integrated circuit AD7750
based module and processed by Atmel’s microcontroller AD 89S52. Instantaneous reading is
shown on the LCD panel where as hourly and daily log is maintained on the computer data-
base. This log on the PC will remain maintained up to one year and updated subsequently.
Rating of the system is designed for 2 kW load and standard pulses produced for the
calibration and for microcontroller are 3600 per KWH.It is clear from the databases created by
the prototype, that reading for energy consumption is available up to fourth place of the
decimal. With a load of as low as 60 W and for higher load of 1000 W, meter has recorded the
correct consumption reading and maintained the record.Fig.4.20 shows the section of the data-

Fig. 4.20 Section of the data-base created by the proto-type developed in the work

5.2 Discussions
Interfacing between the hardware and the PC is through serial port, whereas other
ports are also available in the PC. Serial port in smaller PC’s such as laptops, is now phasing
out, even than serial port has been given priority over the others in the present work.
Serial port is based on the protocol defined by EIA specification RS 232 and has
numerous feature which suits the power level jobs. It has longer connectivity up to 100 feet
where as USB has only 16 feet. Speed is slower than the USB but it is compensated by its
Its Speed is around 20 kbps when used alone and up to 115 kbps maximum when used
with other external drivers. This speed is more than required to transfer the electric data from
metering module to the PC.
RS 232 also supports the asynchronous mode of data transmission; therefore UART of
the microcontroller suits the serial port with minimum number of wires. It also makes this
system independent of the particular computer and thus any unit can be used by any computer.
In microcontroller crystal frequency 11.0592 MHz, is also within the range of UART
bit-rate frequency. In a PC, standard UART clock frequency is 1.8432 MHz, with respect to
this the bit rate would be 1.8432MHz / 16 = 1, 15,200 Hz. In microcontroller with crystal
frequency of 11.0592 MHz, hardware timer runs at 11.0592/12 = 921600 Hz and this allows
the bit rate of 921600 / 16 = 57,600 Hz only which is compatible with computers top rate.
Maintenance of data records for one year needs memory space of around 1.2 MB per
consumer. This figure is not enormously high and could be accepted.


Scenario in power sector prompted the author to undertake the current project and a
prototype of Web enabled Automatic Electrical Energy Meter has been designed and
fabricated with indigenously available components. The meter has been tested successfully.
Implementation of microcontroller based energy meter can read the energy consumption successfully
within permissible limits of the error. It is found to be most suitable for the present day need, and it is
inevitable that within one decade, this would be the only option left with the electricity utility
companies and the consumers. Conclusions out of the current work are summarized below:
 A web page is designed on which details of the kWh consumed are uploaded.
Consumption rate on one minute basis is also uploaded on the page. This
minute detail is maintained for every one hour.
 Accumulated data for one hour is transferred to daily data log successfully and
record is maintained.
 It is estimated that per consumer around 1.2 MB memory space would be
required for maintenance of the yearly record.

Future Scope

This work is suitable for the domestic requirement of electricity in typical Indian
houses..Even then there exists scope of improvement. The future scope points are summarized
 There is scope to develop an integrated system in which power measurement and
processing should be in one module only. This can be achieved using FPGA or FPAA
technology. This will make the system more compact and modular.
 This system has scope to provide more channels to record frequency, power factor and
reactive power. This can also be developed for three phase system also.
 In the current work the author has used a PC to connect to the network. But there is
scope to make the modular power measuring apparatus directly connected to the cyber
space. For this purpose each device should be allotted an individual dynamic IP code.
Such system would directly link itself with the server situated remotely. Connection
with the remote server may be wired or wireless using broad band.
 As far as software part is concerned a lot of scope exists in developing a compact
package to run the entire work and different isolated software may not be required. In
current project compatibility among different software packages and their versions
created lot of trouble.
 In the current system data transfer is only one way, but in future this may be made two
way so that server can control the meter. In such a case, power control can be
implemented from the server end also. Consumer may also be alerted for some fault
from the consumer end.
 There is further scope of enhancing this system to become a part of the network in
which issuance of the electricity bills and their payments would be on-line. This is not
an impossible preposition because all the banks are already on-line, meters can also be
on-line. In other words concept of prepaid meters may also be realized.

References and Bibliography

1 Stebbins Wayne L “New concepts in Electrical Metering for Energy Management” IEEE
Transaction on Industry Application, Vol. 1A-22, No. 2 March/April 1986.
2 Gambhir Ajay “Improving Billing and Load Management Communications For
Energy Meter Manufacturers and Service Providers” for Analog Devices, Inc.
September 2003.
3 Reaz M.I., Rahman M.S., Mohd-Yasin F, Sulaman M.S., Choong F., “Development of
an efficient and flexible Algorithm for Implementing A Digital Household Energy
Meter: An FPGA Approach”, 3rd International Conference on Electrical & Computer
Engineering, ICECE-2004, 28-30 December 2004, Dhaka, Bangladesh.
4 Application note, Atmel, AVR465: Single phase Power/Energy Meter with Temper
Detection, Source, available at Atmel’s web site
5 Nagarju M, Praveen Kumar T., “Networked Electronic Energy Meter with Power Quality
Analysis”, Signion Systems Ltd., Hyderabad, IEEE Transactions on electric power, available
on IEEE Xplore, Power Quality 98, June, 18, 98, pages 45 - 57.
6 Installation and Operation Manual: Web enabled meter, WEM – MX, Energy Tracking,
available at the company’s site, updated Aug,19, 2008.
7 Paranhos I., Líbano F, Melchiors J, Mano O, Roenick A., “ Power Energy Meter in a low
cost Hardware/ Software”, IEEE symposium on Power Electronics, volume 3, July, 9-13,
2006, pages 1712-1715.
8 Coca Eugen, “ A new Energy meter interface using internet communications,” 7 th International
Conference on Development and Application Systems, Suceava, Romania, May 27-29, 2004;
9 Markow John, Microcontroller based Energy Metering using the AD 7755, Analog Dialogue
33-9 (1999): Technical specification of the IC AD 7755.
10 Specification sheet of IC ADE 7754, Multifunction Polyphase Energy Metering IC with Serial
port interface. Issued by Analog Devices Inc, revised on Jan, 2008.
11 Atmel 8-bit AVR Microcontrollers based AVR465: Single-Phase Power/Energy meter with
Tamper Detection, specification manual revised on Apr,2007.
12 Loss P.A.V, Lamego M.M, Sousa G.C.D. and Vieira J.L.F “A Single Phase Microcontroller
based Energy Meter”, IEEE Instrumentation and Measurement Technology Conference, St.
Paul, Minessota, USA, May, 18-21, pp 797-800.
13 Chavan Santosh S, Jayaprakash S. and Kumar Jagdeesh V, “An Open Standard Protocol for
Networking of Energy Meters”, IEEE Transactions no.0885-8977 on Power Delivery, Vol 23,
No.4, October, 2008.

14 Ayurzana Odgerel et al. “Development of Telemetering system of water supply using RF
module and TCP/IP Socket programme” Paper presented in the SICE-ICASE International
Joint Conference, Oct, 18-21, 2006 Busan Korea.
15 Cao Litting, Tian Jingwen and Liu Yanxia, “ Remote Wireless Automatic Meter Reading
System Based on Wireless Mesh Networks and Embedded Technology’, 5 th IEEE
International Symposium on Embedded Computing, DOI 10.1109/SEC.2008.57;Oct, 6 -8,
2008, pp 192-197.
16 Cao Liting, Tian Jingwen and Zhang Dahang, “Networked Remote Meter-Reading System
Based on Wireless Communication Technology” Proceedings of the 2006 IEEE International
Conference on Information Acquestion, Weihai, Shandong, China, August 20-23, 2006, pp
172 – 176.
17 Krukowski Artur and Kale Izzet, “Simulink/MAtlab-to-VHDL Route for Full-Custom/FPGA
Rapid Prototyping of DSP Algorithm”, Matlab DSP Conference(DSP’99), Tempere, Finland,
November, 16-17, 1999.
18 Naphade S.P. The TATA power Co. Ltd. Mumbai, “Automatic Meter Reading- Cost
Reduction Techniques”, Note available on internet.
19 Doraswami Anand, Associate Editor, Energy for Sustainable Development, A Case for
electronic electricity meters in India, Energy for Sustainable Development, Volume II No.2
July, 1995.
20 Specification sheet [20] provided by Atmel for 8-Bit Microcontroller no. AT89S52
with 8KB in system Programmable Flash memory gives the methods to develop the
circuit as per the requirement.
21 Specification sheet [21] provided by Atmel for Energy metering IC ADE 7755.
22 Axelson Jan, Serial Port Complete, Penram Int. Publishing(India) Pvt. Ltd.