Sunteți pe pagina 1din 26

IMPLEMENTATION OF ENERGY

METER
MINOR PROJECT REPORT
A. SUBMITTED IN PARTIAL FULFILLMENT OF THE
REQUIRMENT
B. FOR THE AWARD OF THE DEGREE
C. OF
BACHELOR OF TECHNOLOGY
IN
ELECTRICAL ENGINEERING

Submitted by :
NAME
ROLL NO.
Under the supervision of

Prof. SHAKEB A. KHAN

DEPARTMENT OF ELECTRICAL ENGINEERING


FACULTY OF ENGINEERING AND TECHNOLOGY
1
JAMIA MILLIA ISLAMIA

CERTIFICATE

This is to certify that the Project titled “IMPLEMENTATION OF ENERGY METER”


submitted in partial fulfillment of the requirements for the award of the degree
of Bachelor of Technology in Electrical Engineering by “Name………..Roll
no………..” is a bonafide record of the candidate’s own work carried out by him
under my supervision and guidance.
This work has not been submitted earlier in any university or
institute for the award of any degree to the best of my knowledge.

Prof. SHAKEB A. KHAN


Designation:……………..
Address:…………………

Prof. Zainul Abdin Jaffery


Head

2
ABSTRACT

Efficient power consumption and savings has become a major issue these days
as the need for power is increasing day by day. Domestic energy consumer is
unaware of his power usage, means to save it, and also sometimes finds ways
to steal power without paying for it. One more issue is that service provider
can’t predict the power consumption of a specific consumer or a specific area
which can further be used to analyse the load changes of the same.
This has increased the emphasis on the need for accurate and economic
methods of power measurement. The goal of providing such data is to
optimize and reduce their power consumption. The Energy Meter proposed
here deals with the measurement of voltage, current, computation of active
power, and energy being consumed by a consumer and display the information
to the consumer and maintaining it as a record for the utility.
In the designed circuit, these quantities are measured using Arduino. The
measured values are displayed on the Serial Monitor. Hall Effect Current
Sensor ACS712 is used to measure the current signal and potential transformer
and voltage scaling circuit is used to scale down the supply voltage which can
then be sensed by the microcontroller.

3
CONTENT
 Chapter 1 : Introduction ……………………………[5]
1.1 Implementation…………………………......[5]
1.1.1 Hardware……………………………….[6]
1.1.2 Software………………..........................[6]
1.2 Objective…………………………………...[7]

 Chapter 2 : Electronic Meter- A Review…………...[8]


2.1 Introduction………………………………...[8]
2.2 Brief outline of power meters evolution …..[8]
2.2.1 Electro-mechanical meters………….….[9]
2.2.2 Electronic power meter………………...[9]
2.2.3 Smart measurement of electricity……..[10]
2.3 Smart Energy Meter……………… ……....[11]

 Chapter 3 : Implementation of Electronic Meter.....[12]


3.1 Components of Block Diagram…………..[12]
3.2 Hardware Implementation…..……………[14]
3.2.1 Microcontroller Used…………………[14]
3.2.2 Voltage Measurement……………..….[15]
3.2.3 Current Measurement………………...[16]
3.3 Software Implementation………………...[18]
3.3.1 Arduino IDE……………………...…..[18]
3.3.2 Emonlib Library………………..….....[18]
3.4 Fundamentals of AC Power Calculatio…..[19]
3.5 Program Flow…………………..…….…. [21]

 Chapter 4 : Conclusion………………..…………...[22]
4.1 Observations………………………..……..[22]
4.2 Sources of Error…………………..……….[23]
 References
 Appendix

4
1.INTRODUCTION
In this project, we have designed a single phase energy meter capable of
measuring current, voltage, active and reactive power consumption and power
factor instantaneously, using Arduino AtMega microcontroller, ACS712 hall
effect current sensor, a potential transformer and voltage dividing circuitry.
An energy meter is an instrument used to measure electrical energy
consumption of electrical powered appliances in residential or business areas.
Energy meter calibration is in billing units which are rated in kilowatt-hour
(kWh). The kilowatt-hour is the amount of energy consumed by a load of one
kilowatt over a period of one hour. Energy meter basically consists of a
potential transformer and offset circuit(for voltage measurement) and a hall
effect sensor(for current measurement). The voltage sensing circuit measures
the instantaneous voltage (volts) while the current sensor measures the
instantaneous current (amperes). The product of the instantaneous voltage,
current and power factor gives the instantaneous electrical power in wattage
which is multiplied over a period of time.
Our work focuses on measurement of instantaneous current, voltage, active
and reactive power component and power factor. This power is multiplied over
time for the total power consumption and this reading may be used for further
billing and load analysis purposes.

1.1Implementation:

Figure 1.1 Block diagram of project

5
Implementation part of this energy meter is broadly divided into hardware
and software implementation for clear explanation
1.1.1) Hardware : For the measurement of AC current, ACS712, a hall effect
current sensor which can measure upto 20A is used. It is directly connected in
series with the input AC line and it’s output is 0-5V DC, with the output voltage
corresponding to the input current. This is fed to the Arduino analog pin which
reads the values 0-1024 corresponding to 0-5V. The value is further calibrated
using practical methods to obtain absolute AC current reading instantaneously.
For the measurement of AC voltage, a step down potential transformer is used
which steps down the 220V AC(approx.) to 9V AC. Then a DC offset circuit is
used to get the corresponding 0-5V DC from this 9V AC. This DC voltage is then
fed to Arduino analog pin which reads the values 0-1024 corresponding to 0-
5V. The value is further calibrated using practical methods to obtain absolute
AC voltage reading instantaneously.
1.1.2) Software : Given the instantaneous voltage and current readings are
obtained for further calculations in the program, an open source library called
‘Emonlib’ is used to find out instantaneous active and reactive power and
power factor.
Emonlib offers different functions for calculation of different quantities, the
internal working of which, is explained in detail in the implementation section
of this project work. Measurement of active power is done by multiplying
instantaneous voltage and current values and then averaging it over a period
of time. Another major principle of working of ‘emonlib’ is to take sample of
instantaneous current and voltage values over a period of time( window
length) which in our design is kept at 10 AC cycles(100ms for 50Hz supply).
These values are then used to calculate RMS values of voltage and current
which are multiplied to obtain the apparent power and thus the power factor
and reactive power.

All these values, that is ,RMS values of current & voltage, active and reactive
power consumption and power factor are calculated by the microcontroller
repeatedly at a time interval of 1 second, which is shown as output on the
laptop screen in the serial monitor of Arduino IDE using the “Serial.Print()”
command.

6
1.2 Objective:
In a world of rising energy cost human beings and organizations have been
started for investigation for an efficient way to minimize their extended
electric cost. The appropriate method for decreasing these expenses is to
continuously monitor the power that has being expended and from this
information, comparing the available choices about how to deal with the
electrical devices being controlled. As more home machines and customer uses
electricity are introduced, residential energy consumption tends to grow
rapidly. A large number of home devices increase the control utilization in two
ways: standby power and ordinary control. Those two types of force utilization
are relative to the quantity of home devices. Subsequently, the operational
cost in homes is additionally expanding. If a person can instantly watching how
much power consumes per minute, they might be more careful later on about
giving devices a chance to stop working when not required. The project means
to give a clear vision of a home's energy use.

7
2.ELECTRONIC METER- A REVIEW

2.1 INTRODUCTION
The world growing demand for electricity brings up important issues about
how to supply such energy needs in a sustainable manner [1]. It has been
necessary to look for alternatives that allow the efficient use of energy,
following the sustainable development concept, on which the electricity is
considered a fundamental resource for the socioeconomic development and
an essential asset for the maintenance of life in society [1-3].
Consequently, the improvement of the electrical system by means of all
possible high-tech advances is imperative. Therefore, several modifications in
the existing network infrastructure and operational procedures are expected
for the future smart grids, what may ensure that all entities are interconnected
and operating to guarantee the best use of primary energy resources and all
other infrastructure related to generation, transmission, distribution and use
(GTDU) of energy, from producers to consumers.
In such context, the power meters are very important elements in the smart
grid concept [2, 4], since they are the basic device to connect different GTDU
equipment over the grid, either point-to-point or by means of hierarchical
supervisory systems. Thus, electromechanical meters have been replaced by
electronic meters to meet the needs of the modern power grids [5-6].
Recently, these electronic meters have been called as smart meters and among
other features, they should provide superior accurate measurements, data
storage, automatic data reading and integration to local or wide-area energy
management systems [2, 4, 7].

2.2 A BRIEF OUTLINE OF POWER METERS EVOLUTION


The ability to manage and control electric power GTDU has always been
related to this basic element, the power meter. These devices are developed to
measure and record the energy consumption in single-phase or three phase
consumer units, independently of their current and voltage levels or frequency
definition. Such information is traditionally used for the power system plaining,
operation and for charging consumer’s use of energy. Thus, next sections
present a brief overview of the energy meter evolution in the last decades.

8
2.2.1 Electromechanical Meter

Considering the international scenario, the electromechanical power meters


are still a widely applied technology, especially for residential consumers.
Although a well-known technology, the
electromechanical meter shown in Fig.
2.1(a) presents several limitations due to its
constructive characteristics. In general,
electromechanical meters are not highly
accurate and its measurement may be
affected by many factors, such as: waveform
Figure 2.1 ELECTROMECHANICAL METER
distortions or imbalance, operation
temperature, among others. In addition, this
category of energy meter can only measure the active or average power
component and basically considering unidirectional power flow, mostly for
revenue purposes. As depicted in Fig, 2.1 (b), other important limitation
related to this technology is the fact that the energy measurement typically
requires manual or human reading (by the utility personnel), what is certainly
more susceptible to reading errors. Besides, it should be emphasized that such
process represents a high operational cost for the utilities, which are basically
transferred to the consumers in the energy tariffs.

2.2.2 Electronic power meters

Considering the evolution of electronic and microelectronic devices in the last


decades, several solutions have
arisen for the problems related
to the electromechanical meter.
Thus, the first electronic meters
were developed, as shown in Fig.
2.2, and the main goals were
associated to the improvement
of measurement accuracy and
Figure 2.2 ELECTRONIC METER
the reduction of operational
measuring costs
The concept of electronic meters was called AMR (Automated Meter Reading).
Specifically, AMR is a system that enables utilities to access remotely the data
generated by electronic meters at consumer units. The data can be transmitted

9
from the meter to the utility company by radio frequency, telephone, power
line or satellite communication. The evolution of the AMR concept was called
AMI (Advanced Metering Infrastructure). The main difference between these
categories is in the
communication
approach, since the AMI
enables the possibility of
data exchange between
utility and consumer, in
Figure 2.3 AMI
bidirectional mode. Thus,
the AMI shown in Fig. 2.3 can be represented as a system with electronic
meters, data storage, management system and communication infrastructure.
The main features of the AMR/AMI systems are:
• Electronic meters: perform energy measurements and provide
communication between consumer and utility.
• Management system: is composed of a data concentrator and signal
processing unit.
• Communication infrastructure: Establish the means of communication for
the data transmission between the network elements.

2.2.3 “Smart” Measurement of the Electric Power


With the
dissemination of
the electrical smart
grids, AMI has
being known as
Smart Metering
System (SMS), as
Figure 2.4 illustrated in Fig.
2.4 This new
concept has been developed in a fast way during the last years and it has been
driven by the technological progress and by the need to obtain data that
cannot be provided by the traditional metering systems. In this scenario, the
smart meter is considered a pillar of the smart grid evollution [4].
There is an estimate of almost 800 million smart meter will be installed by
2020 around the world. The penetration rate of these devices varies among
regions and it is increased by policy and legislative incentives, such as in

10
Europe and North America.
Despite the great initial
investments in North America,
it is estimated an almost
constant development for the
near future, especially due to
the cautiousness perspective
for the uncertain future
approaches. However, other
countries like China have being
doing substantial incentives for
the smart meters use. The
lowest penetration rate is in
Latin America, Middle Est and
Figure 2.5
Africa, where the use of smart
meters is set to steady growth.

2.3 SMART ENERGY METERS


Smart meters are different from each other in three basic characteristics: The
possibility of consumption reading in a higher frequency, regular data
communication and bidirectional communication (usually between the utility
and the smart meter). Fig. 2.6 presents a commercial smart meter. Figure 2.6.
Commercial smart meter. A. General features Regarding the elementary
functions, a smart meter should record, in real time,
active power consumption and also other relevant
information, such as: voltage and current phasors,
reactive power, maximum power demand, frequency
and power factor.In general, commercial smart
meters have the following characteristics:
Figure 2.6
• Internal memory for data storage.
• Real time clock. A simplified smart meter diagram can be seen in Fig. 2.7.

Figure 2.7

11
3. IMPLEMENTATION OF ENERGY
METER

Figure 3.1 BLOCK DIAGRAM OF ENERGY METER

3.1 COMPONENTS OF BLOCK DIAGRAM

1. ARDUINO ATMEGA 2560 -The Arduino Mega 2560 is a microcontroller


board based on the ATmega2560. It has 54 digital input/output pins (of which
15 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial
ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP
header, and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it
with a AC-to-DC adapter or battery to get started.

12
2. ACS712 CURRENT SENSOR- The Allegro ACS712 provides economical
and precise solutions for AC or DC current sensing in industrial, commercial,
and communications systems. The device consists of a precise, low-offset,
linear Hall sensor circuit with a copper conduction path located near the
surface of the die. Applied current flowing through this copper conduction
path generates a magnetic field which is sensed by the integrated Hall IC and
converted into a proportional voltage.

3. POTENTIAL TRANSFORMER(9-0-9)- It is a general purpose chassis


mounting mains transformer. Transformer has 240 V primary windings and
centre tapped secondary winding. The transformer has flying colored insulated
connecting leads ( Approx 100 mm long ). The Transformer act as step down
transformer reducing AC - 240V to AC - 9V. The Transformer gives two outputs
of 9V, 9V and 0V.

4. DC OFFSET CONDITIONING CARD - The function of offset data


conditioning card is to clamp the AC signal with respect to a reference DC
voltage. The reference DC voltage is preset according to the components used
in the circuit which intern depends on the maximum load rating.

13
3.2 HARDWARE IMPLEMENTATION

3.2.1 MICROCONTROLLER USED

Figure 3.2 ARDUINO MEGA 2560

The Arduino Mega 2560 is a microcontroller board based on the ATmega2560.


It has 54 digital input/output pins (of which 14 can be used as PWM outputs),
16 analog
inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB
connection, a
power jack, an ICSP header, and a reset button. It contains everything needed
to support microcontroller; simply connect it to a computer with a USB cable
or power it with a AC to DC adapter or battery to get started .

Why Arduino?

Thanks to its simple and accessible user experience, Arduino has been used in
thousands of different projects and applications. The Arduino software is easy-
to-use for beginners, yet flexible enough for advanced users. It runs on Mac,
Windows, and Linux. Teachers and students use it to build low cost scientific
instruments, to prove chemistry and physics principles, or to get started with
programming and robotics.

14
3.2.2 VOLTAGE MEASUREMENT[8]
AC voltage measurement is needed to calculate real power, apparent power
and power factor. This measurement can be made safely (requiring no high
voltage work) by using an AC to AC Transformer. To measure AC voltage
using Arduino analog input we need to:

 scale down the waveform and


 add an offset so there is no negative component.

The waveform can be scaled down using a voltage divider connected


across the transformer's terminals, and the offset (bias) can be added
using a voltage source created by another voltage divider connected
across the Arduino's power. The following circuit shows how we are going
to do that

Figure 3.3 CIRCUIT DIAGRAM OF AC VOLTAGE MEASUREMENT

15
The step-down transformer reduces the voltage to about 11.6 V rms, and the
potential divider formed by resistors R1 & R2 further reduce the voltage to
comfortably fit inside the 0 – 3.3 V d.c. range of the analogue input.

There are many methods for voltage measuring and calibration using
Microprocessors, we used

The instantaneous voltage calculation method, the nature of the


voltage and current in DC power system is characterized by having
a constant value unless the voltage level or loads current are changed. But
when it comes to an AC supply the voltage and currents are sinusoidal in
nature, hence a sinusoidal varying voltage is connected to the sensor
which means it can only read the value of the voltage at a particular time.
The instantaneous calculation is used in the case of AC supply in which an
algorithm uses the samples of the voltage to calculate the rms
value of the voltage. It is also useful in the calculation of
the rms current and real power consumption of the system. As the voltage
is sampled at regular intervals the Arduino programming calculates the
rms voltage as illustrated in following Equation:

3.2.3 CURRENT MEASUREMEMT[9]

AC current measurement is done using the ACS712 Current sensor. The device
consists of a precise, low-offset, linear Hall sensor circuit with a copper
conduction path located near the surface of the die. Applied current flowing
through this copper conduction path generates a magnetic field which is
sensed by the integrated Hall IC and converted into a proportional voltage
Line current is first downsized using ACS712T 30A current sensor module .
Since the sensor output will have a DC offset of 2.5V, a separate circuit for
offset is not required. The sensitivity of the sensor is 66mV/A.

16
For example if 2A line current flows, the output will be 132mV pk-pk sine wave
with 2.5V DC offset. Now, this output is directly given to ADC input terminal of
Arduino through analog pins.

Figure 3.4 CURRENT MEASUREMENT USING ACS712

The current sensor is connected in series with the load as shown in FIG[4].
Final output voltage (Vout) is given to the analog pin A1 of the microcontroller
which reads the values 0-1024 corresponding to 0-5V .The RMS current
calculation done is similar to the RMS voltage done by the arduino.

17
3.3 SOFTWARE IMPLEMENTATION

3.3.1 ARDUINO IDE


The Arduino integrated development environment (IDE) is a cross-platform
application (for Windows, macOS, Linux) that is written in the programming
language Java. It is used to write and upload programs to Arduino board.
The source code for the IDE is released under the GNU General Public License,
version 2. The Arduino IDE supports the languages C and C++ using special
rules of code structuring. The Arduino IDE supplies a software library from the
Wiring project, which provides many common input and output procedures.
User-written code only requires two basic functions, for starting the sketch and
the main program loop, that are compiled and linked with a program stub
main() into an executable cyclic executive program with the GNU toolchain,
also included with the IDE distribution.

3.3.2 EMONLIB LIBRARY


The Emonlib is a open source library of Arduino which is used for energy
monitoring. Emonlib offers different functions for calculation of different
quantities like RMS voltage , RMS current, power factor, reactive power, active
power etc. We package the calculations into EmonLib to simplify Arduino
energy monitor sketches.The Emonlib library is freely available
at OpenEnergyMonitor.org. Library can be downloaded from the following link

https://github.com/openenergymonitor/EmonLib

18
3.4 FUNDAMENTALS OF AC POWER
CALCULATIONS IN ARDUINO[10]

1. Real Power
Real power is the average of instantaneous power. The calculation is relatively
straightforward. First we calculate the instantaneous power by multiplying
the instantaneous voltage measurement by the instantaneous current
measurement. We sum the instantaneous power measurement over a given
number of samples and divide by that number of samples:
for (n=0; n// inst_voltage and inst_current calculation from
raw ADC input goes here

inst_power = inst_voltage * inst_current;

sum_inst_power += inst_power;
}

real_power = sum_inst_power / number_of_samples;

2. Root-Mean-Square (RMS) Voltage


The root-mean-square is calculated in the way the name suggests. First we
square the quantity, then we calculate the mean and finally, the square-root of
the mean of the squares, this is how its done:
for (n=0; n// inst_voltage calculation from raw ADC input goes
here.

squared_voltage = inst_voltage * inst_voltage;

sum_squared_voltage += squared_voltage;
}

mean_square_voltage = sum_squared_voltage / number_of_samples;


root_mean_square_voltage = sqrt(mean_square_voltage);

19
3. Root-Mean-Square (RMS) Current
Same as the RMS voltage calculation:
for (n=0; n// inst_current calculation from raw ADC input goes
here.

squared_current = inst_current * inst_current;

sum_squared_current += squared_current; }

mean_square_current = sum_squared_current / number_of_samples;


root_mean_square_current = sqrt(mean_square_current);

4. Apparent Power

The apparent power is the product of RMS voltage and RMS current and thus
can be calculated using-

apparent_power = root_mean_square_voltage * root_mean_square_c


urrent ;

5. Power Factor

The power factor as we all know is a ratio of real power to the apparent power,
thus can be calculated by

power_factor = real_power / apparent_power;

20
3.5 PROGRAM FLOW

Figure 3.5 SETUP PART OF ARDUINO CODE

Figure 3.7 LOOP PART OF ARDUINO CODE

21
4. CONCLUSION

4.1 Observations:
The implementation of electronic meter is done successfully. The tested loads
used are 2x100 watts bulbs and a 12 watt LED bulb with an average error of
1.28% at normal load conditions, however the meter gives high percentage
error at no load or light load conditions.
Following observations were recorded during the experiment done.

True voltage value =233V


Table 4.1 POWER MEASUREMENT

Table 4.2 POWER FACTOR MEASUREMENT

22
4.2 SOURCES OF ERROR:

Power Consumed by Potential Transformer :


At no load conditions there should be zero power consumption but due to
magnetising current component of transformers core losses are present.

Low Sensitivity of Current sensor ACS712 :


The current sensor is unable to detect the low values of current at lightly
loaded conditions which leads to a significant error.

Harmonics in Supply :
The input supply is not perfect sinusoidal hence lead to errors due to
harmonics present.

23
REFERENCES

[1] G. Platt, S. West, T. Moore, "The real-world challenges and


opportunities of distributed generation", IEEE Energy Conversion
Congress and Exposition, pp. 1112-1116, September 2015.
[2] G. R. Barai, S. Krishnan and B. Venkatesh, “Smart Metering and
Functionalities of Smart Meters in Smart Grid - A Review,”
Electrical Power and Energy Conference (EPEC), pp. 138-145, 26-
28 October 2015.
[3] S. Makonin, F. Popowich, T. Moon and B. Gill, “Inspiring Energy
Conservation Through Open Source Power Monitoring and In-Home
Display,” IEEE Power & Energy Society General Meeting, pp. 1-5,
21-25 July 2013.
[4] J. Zheng, D. W. Gao and L. Lin, “Smart Meters in Smart Grid: An
Overview,” IEEE Green Technologies Conference, pp. 57-64, 4-5
April 2013.
[5] S. Makonin, F. Popowich and B. Gill, “The cognitive power meter:
Looking beyond the smart meter,” 26th Annual IEEE Canadian
Conference on Electrical and Computer Engineering (CCECE), pp.
1-5, 5-8 May 2013.
[6] S. Makonin, L. G. Flores, R. Gill, R. A. Clapp, L. Bartram and B.
Gill, “A Consumer Bill of Rights for Energy Conservation,” IEEE
Canada International Humanitarian Technology Conference -
(IHTC), pp. 1-6, 1-4 June 2014.
[7] I. Opris and L. Caracasian, “The relation between smart meters and
electricity consumers,” 12th International Conference on
Environment and Electrical Engineering (EEEIC), pp. 325-329, 5-8
May 2013.
[8]https://gist.github.com/ItKindaWorks/a75969cd7b385c440cf86b5a0a68c86
e#file-powermon_voltageandcurrent-ino
[9] Allegro MicroSystems Inc. ACS712 Datasheet.
[10] https://learn.openenergymonitor.org/electricity-monitoring/ac-power-
theory/arduino-maths

24
APPENDIX
// EmonLibrary examples openenergymonitor.org, Licence GNU GPL V3

#include "EmonLib.h" // Include Emon Library


#define VOLT_CAL 230.5
#define CURRENT_CAL 15

EnergyMonitor emon1; // Create an instance

void setup()
{
Serial.begin(9600);

emon1.voltage(A1, VOLT_CAL, 1.7); // Voltage: input pin, calibration, phase_shift


emon1.current(A0, CURRENT_CAL); // Current: input pin, calibration.
}

void loop()
{
emon1.calcVI(20, 1000); // Calculate all. No.of half wavelengths (crossings), time-out

float currentDraw = emon1.Irms; //extract Irms into Variable


float supplyVoltage = emon1.Vrms; //extract Vrms into Variable
float realPower = emon1.realPower;
float appPower = emon1.apparentPower;
float pf = emon1.powerFactor;
Serial.print("Voltage: ");
Serial.println(supplyVoltage);

Serial.print("Current: ");
Serial.println(currentDraw);

Serial.print("Watts: ");
Serial.println(realPower);

Serial.print("VA: ");
Serial.println(appPower);

Serial.print("powerfactor: ");
Serial.println(pf);
Serial.println("\n\n");

25
26

S-ar putea să vă placă și