You are on page 1of 49

SMART ENERGY METER

Undergraduate graduation project report submitted in


partial fulfillment of
the requirements for the Degree of Bachelor of Science of Engineering

in

The Department of Electrical & Telecommunication Engineering


South Eastern University of Sri Lanka

Group Members:
Supervisor:
P.G.H.M.C.K Herath
Dr. Jayathu Samarawickrama
T.M.D.N Karunarathna
Dr. Udayanga Hemapala
A.U Liyanamana

October 04, 2017


Approval of the Department of Electrical & Telecommunication Engineering

………………………………………………………………………

Academic Coordinator, Department of Electrical

Telecommunication Engineering

This is to certify that we have read this project and that in our opinion it is fully adequate, in cope
and quality, as an Undergraduate Graduation Project.

Supervisor: Dr. Udayanga Hemapala

Signature : …………………………………

Date : …………………………………

Supervisor: Dr. Jayathu Samarawickrama

Signature : …………………………………

Date : …………………………………
DECLARATION

This declaration is made on the October 04, 2017


Declaration by Project Group

We declare that the dissertation entitled Smart Energy Meter and work presented in it are our own.
We confirm that:

 this work was done wholly or mainly in candidature for a B.Sc. Engineering degree at this
university,
 where any part of this dissertation has previously been submitted for a degree or any other
qualification at this university or any other institute, has been clearly stated,
 where we have consulted the published work of others, is always clearly attributed,
 Where we have quoted from the work of others, the source is always given. With the
exception of such quotations, this dissertation is entirely our own work,
 we have acknowledged all main sources of help,

………………………………………….. ………………………………………………..

Date P.G.H.M.C.K Hearath (SEU/IS/11/EG/003)

………………………………………………..

T.M.D.N. Karunarathna (SEU/IS/11/EG/028)

………………………………………………..

A. U. Liyanamana (SEU/IS/11/EG/093)
Declaration by Supervisor

I/We have supervised and accepted this dissertation for the submission of the degree.

…………………………………… ……………………………………

Dr. Jayathu Samarawickrama Date

………………………………

Dr. Udayanga Hemapala


ABSTRACT

SMART ENERGY METER

Group Members: P.G.H.M.C.K Hearath, T.M.D.N Karunarathna,

A.U Liyanamana

Supervisors: Dr. Jayathu Samarawickrama, Dr. Udayanga Hemapala

Electrical Power Monitoring and Optimization is essential for energy management solutions,
allowing them to obtain appliance-specific energy consumption statistics that can further be used to
devise load scheduling strategies for optimal energy utilization. Sri Lankan government has
announced its ambitions of introducing smart meters to Sri Lanka within a short time span. Current
world wide initiatives show that smart meter deployments demands careful analysis and planning.
Functionalities of smart meters are not clearly defined and there are many attempts in defining them.
Most of the countries are doing pilot studies to ascertain the cost and the benefits. The reasons of
smart meter deployment are different from country to country. Though in principle smart meters
could increase power system operational efficiency and support power system control, easy to
communicate with consumers and monitor their energy consumption in real time. Smart meters are
devised to serve these purposes and are able to increase power system operational efficiency and
support power system control, easy to communicate with consumers and monitor their energy
consumption in real time and it motivating consumers to cut usage wherever possible. It is estimated
that the average consumer could save two to three percent in energy use each year using smart meter
technology. Multiply that by hundreds of millions of households, and the impact can be significant.
To Department of Electrical and Telecommunication Engineering,

South Eastern University of Sri Lanka


ACKNOWLEDGMENTS

First, we would like to convey our sincere gratitude to Dr. Jayathu Samarawickrama and Dr.
Udayanga Hemapala, Senior Lecturers, Department of Electrical and Telecomuniction Engineering,
South Eastern University of Sri Lanka for being the supervisor of the project and for his valuable
thoughts and guidance in carrying out this project.

Next, we would like to extend our gratitude to Eng. M.B. Murshid, Academic Coordinator of the
department for the allocation of required equipment and for his guidance on documentation and other
paper work. Finally, we thank all the academic and non-academic staff of the Department of
Electrical and Telecommunication Engineering for their kind collaboration. And Last but not least,
we would like to thank all who helped us in making this project a success.
TABLE OF CONTENTS

LIST OF FIGURES ............................................................................................................................... 1

LIST OF TABLES ................................................................................................................................. 2

ACRONYMS AND ABBREVIATIONS .............................................................................................. 3

CHAPTER 1 .......................................................................................................................................... 4

INTRODUCTION ................................................................................................................................. 4

1.1 Necessity of introducing Smart Meters to Sri Lanka ............................................................... 5


1.2 Anticipated Benefits from Development of Smart Metering Technology in Sri Lanka .......... 5
1.3 Objectives ................................................................................................................................ 8
1.4 Research Methodology ............................................................................................................ 8

CHAPTER 2 ........................................................................................................................................ 10

LITERATURE REVIEW................................................................................................................. 10
2.1 Introduction ............................................................................................................................ 10
2.2 Evolution of Electricity Meters from the Past ....................................................................... 10
2.2 Traditional Electricity Meters and its types ........................................................................... 10
2.2.2 Smart Meters ....................................................................................................................... 14
2.3 Power Consumption ............................................................................................................... 14
2.4 Study of People's Behavior .................................................................................................... 15

CHAPTER 3 ........................................................................................................................................ 18

METHODOLOGY .............................................................................................................................. 18

3.1 OVERALL CONCEPT..................................................................................................................... 18


3.2 BLOCK DIAGRAM OF SMART METER ........................................................................................... 19
3.3 HARDWARE COMPONENT USE IN SMART METER .......................................................................... 21
3.4 BLOCK DIAGRAM OF MASTER DEVICE ........................................................................................ 24

CHAPTER 4 ........................................................................................................................................ 26

RESULTS ............................................................................................................................................ 26
CHAPTER 5 ........................................................................................................................................ 29

CONCLUSION AND FURTHER IMPROVEMENTS ...................................................................... 29

5.1 CONCLUSION ............................................................................................................................... 29


5.2 FURTHER IMPROVEMENTS......................................................................................................... 30

REFERENCES .................................................................................................................................... 31
LIST OF FIGURES

Figure 2.1: Traditional meter………………………………………………………………….......12

Figure 2.2: Sectorial consumption of electricity in 2016………………………………………….17

Figure 2.3: CEB consumer accounts by tariff in 2016…………………………………………….17

Figure 3.1: Overall Concept……………………………………………………………………….19

Figure 3.2: previous Block Diagram………………………………………………………………20

Figure 3.3: Present Block Diagram………………………………………………………………..21

Figure 3.3: Hlw8012 Arduino Module…………………………………………...……………….22

Figure 3.4: NRF24l01 Transceiver……………………………………………………………..…24

Figure 3.5: ATMEGA328P Chip……………………………………………......………………...25

Figure 3.6: PCB Layout and components…………………………………………………………25

Figure 3.6: Block Diagram of Master Device…………………………………………………..…26

1
LIST OF TABLES
Table 2.1: Various Electricity Meters……………………………………………………...13
Table 2.2: Test Results……………………………………………………………………..27

2
ACRONYMS AND ABBREVIATIONS

CEB: Ceylon Electricity Board

µc: microcontroller

PWM: Pulse Width Modulation

3
Chapter 1

Introduction
Although electricity was considered a luxury in the past, today it has become an essential basic
necessity with the enhanced living standards of people and growth of the technology and industrial
sector. Therefore the electricity demand in most of countries of the world is growing day by day. To
meet this demand most of the developing countries have added more fossil fuel generation to their
systems as they are the low risk proven technologies in large scale despite the environmental impact
caused by them. Current trends in power generation and use are patently unsustainable economically,
environmentally and socially. Without decisive action, increased fossil fuel demand will heighten
concerns over the security of supplies and energy related emissions of carbon dioxide (CO2). In
today’s world most of the developing countries are already swamped with power crisis due to
inadequacy of generation to meet the demand.

Therefore there is a pressing need to implement mechanisms to manage the growing demand and
improve the efficiency while reducing the energy losses, accelerating the development of low carbon
energy technologies such as renewable power generation, in order to address the global challenges of
energy security, climate change and economic growth.
One promising means of reducing the transmission and distribution losses is through the distributed
generation of electricity closer to the end user such as net metering schemes. And the other approach is
managing customer consumption of electricity in response to supply conditions, for example,
stimulating electricity customers to reduce their consumption at critical times or in response to
market prices, thereby reducing the peak demand for electricity. In order to assist consumers to make
informed decisions on how to manage and control their electricity consumption, consumers should
have a system to monitor their real- time electricity consumption as well as a communication network
with the service provider. But traditional electricity meters only record energy consumption
progressively over time, normally in monthly basis and provide no information of when the energy
was consumed. Therefore the necessity of Advanced Metering Infrastructure (AMI) has been
emerged to address the above matters.
Nowadays most of the nations are looking to rollout into Smart Meters enabling faster automated
communication of information to consumers on their real time electricity consumption, and to
service providers. And in traditional meter there is difficulties to meter reader to reach meter in
plat area best solution for this is use device which can access meter far from meter.

4
1.1 Necessity of introducing Smart Meters to Sri Lanka

During the first half of year 2012, 64% out of total electricity generation in Sri Lanka has been
catered by expensive fossil fuel oil power plants. Most of these plants have been operated only to
meet the steep night peak. Sri Lanka has a daily load curve with a steep peak in the night, where
starting from about 6.30 pm the load grows to about 2,000 MW by 7.30 pm and starts falling off
after about 10.30 pm. Therefore the system must be comprised a substantial additional generation
capacity only to meet that abrupt sharp night peak which is a huge burden for Ceylon Electricity
Board (CEB).
Therefore requirement has been aroused to control the demand by paying attention to demand side
management (DSM) while exploring the possibilities of developing sustainable energy resources.
CEB has already implemented number of energy conservation drives to curtail the overall electricity
demand. Also to pull down the steep night peak by pushing some industrial activities to low demand
hours, CEB has introduced a three tier tariff plan for the industrial electricity consumers in 2011 with
low off peak rates and penal peak rates. But in order to introduce this time-of-day tariff scheme for
the domestic consumers it is necessary to replace the existing electricity meters with advanced smart
meters since the existing electricity meter does not support both demand side management and
decentralized power generation. By introducing smart meters to all electricity consumers both
consumers and suppliers (CEB and LECO) can be benefited in many ways.
Initiating pre-paid electricity service, creating efficient electricity consumption patterns, establishing
an efficient electricity consumption system and power and energy management are some of the
special benefits anticipated by smart meter installation.
Also smart meter can provide collect monthly electricity consumption easily. Then it can reduce
wasting time of meter readers.

1.2 Anticipated Benefits from Development of Smart Metering Technology in Sri Lanka

Following benefits can be enjoyed once smart meters are implemented. Some of these benefits will
be felt immediately, others will build up over time and as the technology evolves.

Automatic Meter Reading (AMR) Facility

Currently in Sri Lanka, electricity consumption of customers is recorded manually by sending meter
readers to the customer sites on monthly basis. But there are some issues with this stand-alone meter
5
reading such as meter reading errors, poor accessibility of meters in rural, take readings easily at plat
houses and urban areas, estimated bills and inability to monitor and control real-time usage.
The above issues can be avoided by replacing with advanced smart meters, where both supplier and
consumer can be benefited in many ways. One of the advantages of enabling AMR facility is,
allowing field operations such as meter reading and service disconnection without sending utility
personnel to the customer site. And it ensures accurate bills based on the actual consumption, rather
than estimated bills which are major source of complaints by many customers. This will result in
physical privacy to the consumers and also a high reduction in the operational cost of the utility
which will ultimately benefit the consumers with low energy charges. Similarly, many maintenance
and customer service issues such as voltage drop downs can be resolved more quickly and cost-
effectively through the use of remote diagnostics.

Outage Detection Ability

Currently with the mechanical energy meters, the detection of an outage and restoration of power are
not possible, therefore supplier largely rely on the consumer calls to take an idea of how large a
power outage might be and where the power outage is occurring. Smart meters provide faster outage
detection once an outage occurs and make it easier and quicker to locate and fix the problem. It helps
to identify location and extent of outages remotely via meter signals. With the aid of this ability
electricity suppliers also can keep records of power quality performance measures at each individual
by recording the number and duration of power interruptions. Similarly, smart meters equipped with
power quality monitoring capabilities enable more rapid detection, diagnosis and resolution of power
quality problems.

Permitting Prepayment Facility

After replacing the existing mechanical energy meters with smart meters, prepayment facility can be
introduced to the customers facilitating shifting from credit mode to prepayment mode, and vice
versa, without the need to physically change the meter. When facilitating the prepayment mode,
energy suppliers should offer more convenient ways to top up, for example cash payments, online or
over the phone. Normally prepaid meters are programmed to issues warnings when the credit reaches
a threshold or zero. Service gets automatically disconnected. Then customer needs to recharge the
meter and eventually the prepaid meter to avail the services again. Prepaid consumption is generally

6
a very good commercial option for electricity consumers since they can preplan the budget required
for paying the electricity bill, and no additional charges are imposed on the customer upon reconnect,
hence no need to keep even security deposit to avail the service. Prepaid system is also advantageous
for the electricity suppliers since it reduces paper work, enhances the reduction of customer energy
consumption, reduces financial risks and improves operational efficiencies.

Reducing theft of energy

The most common method of tampering the mechanical meter is attaching magnets to the outside of
the meter to prevent forming eddy currents in the rotor by magnetically saturating the coils of current
transformer. And in Sri Lanka, events of tapping electricity from energized power lines are reported
often. Not only do energy thieves risk their own lives, but also the lives of those nearby. Deployment
of smart meters is useful to stop this energy theft using its ability of detection of tampering and
discovering energy theft. This allows the company, fast detection of any abnormal consumption due
to tampering or by-passing of a meter and enables the company to take corrective action. Moreover,
by using smart meters the supplier will be able to get detailed information about their region, which
means they can examine any suspicious areas where energy usage is higher than expected, and thus
smart metering will provide the supplier with a tool to detect fraud. In addition to that since these
devices remove the human factor from the equation, customers can no longer collude with dishonest
meter readers to cheat the power company.

Financial benefits through efficient use of energy

Currently, electricity customers are informed of their energy usage via a bill that arrives months after
they’ve used the electricity. The existing meters do not provide details of the real time energy usage,
which could help consumers to understand their energy consumption in order to make intelligent
decisions about it. However, Smart meters comprise the option of displaying the real time
consumption including the energy usage in a previous period, hence consumers can keep track of
their energy usage with a better understanding and make informed decisions on how to manage and
control their electricity consumption according to the budget. Smart meters also provide detailed
information and historical comparison reports to help the consumers to identify when they are using
more or less energy during the day, the week or the month, which ultimately will help them to make
changes that let them take control of their energy bills by changing their habits.

7
Promoting TOU Tariff

As in most countries, even in Sri Lanka, low voltage customers pay a flat, time-independent
electricity tariff, which does not incentivize the customers to reduce demand at peak times and it
leads to inefficient use of network assets. Once the smart meters are deployed, electricity suppliers
will get the opportunity to offer and communicate time-dependent rates to the consumers through the
meter, which eventually facilitate enabling Time of Use (TOU) based tariff system for the customers,
rewarding low rates for energy usage at off peak times of day. Through the meter, customers can see
how their consumption varies during the day and respond to the TOU based tariffs that encourage
them to use cheaper energy. These price differences will help to encourage consumers to reduce their
consumption in peaks times by pushing some heavy power activities to low demand hours and is
known as load shifting or peak lopping. If this pricing method is applied in Sri Lanka, especially for
domestic consumers, it will be a great support to pull down the steep night peak and flatten the
demand curve, which, in turn, reduce the generation cost by shifting to low cost base load
generation, as well as reduce the need for additional expensive, carbon-polluting peaking power
plants to cater the night peak. Ultimately the electricity customers become an integral and active part
of the overall electric power system by helping to balance electrical demand with supply, easing the
stress on the distribution network.

1.3 Objectives

 Real-time power display and by awareness


 Enabling remote accessibility of consumption data by using hand device
 Allowing changing of tariff in response to price changes
 Ability to see bill, power consumption of last month and previous months by access
personal account in server.
 Power quality monitoring

1.4 Research Methodology

Designing the smart meter:

Smart meter consist with power consumption measuring module, Arduino nano, Circuit board,
Resistors, capacitor, NRF module, display etc. The smart meter should have two energy measuring
systems and display facility and communication facility to hand device. The usage is calculated in
8
KWh.
The data will be collected by hand device and the web server is updated each month. By this method,
the cost of communication can also be reduced.

9
Chapter 2
LITERATURE REVIEW

2.1 Introduction

This chapter will describe details about literature review on the meter evolution and power
consumption in Sri Lanka.

There are many types of smart meters used in world. These are mainly based on electromechanical
induction. Therefore types of smart meter designs and using technologies are reviewed in this chapter
and through those designs some ideas have been obtained to how the development of technology
focused for our design configuration.

2.2 Evolution of Electricity Meters from the Past

In early years, electricity is available only to a specific section of affluent society. The advancement
in technology over time encouraged meeting the demands of common people in all parts of the
world. The general usage of electricity in the early 1870`s is only confined to telegraphs and arc
lamps. With the invention of the electric bulb by Thomas Elva Edison, the power energy market
became widely opened to the public in the year 1879. Oliver B. Shallenberger introduced his AC
ampere hour meter in the year 1888. Eventually, the progressive development in metering
technology leads in enlightening the lives of many common people.

2.2.1 Traditional Electricity Meters and its types

The electrical devices that can detect and display energy in the form of readings are termed as
electricity meter. Traditional meters are used since the late 19th century. They exchange data
between electronic devices in a computerized environment for both electricity production and
distribution. In most of the traditional electricity meter aluminum discs are used to find the usage of
power. Today`s electricity meter is digitally operated but still has some limitations. A simple 1 phase
2 wire electricity meter is shown in the below figure 2.1.

10
Figure 2.1: Traditional meter

Some of the limitations faced by the traditional electricity meter are as follows:

 Meters are unreliable in nature as consumer has to anticipate for the monthly electricity
bill.
 The process of measurement is supported by a specific mechanical structure and hence
they are called as electromechanical meters.
 In order to perform meter readings, a great number of inspectors have to be employed.
 Payment processing is expensive and time consuming.
 New type of tariffs on hourly basis cannot be introduced with the corresponding meters for
encouraging the consumer.
 Development of meter software applications and supportive network infrastructure is complicated.

Besides the above mentioned limitations, there are also several other elements creating a huge gap
between the consumer and distributor because of installation of traditional meters. Meters are of
distinct types. Even though timely development of electricity meters helps the consumer to gain
knowledge with respect to electricity consumption, statistics of the consumption couldn`t be
changed. Table 2.1 illustrates the some of the basic types of electricity meters.

11
Table 2.1: Various Electricity Meters

Different Types Outline


Electrolytic Meter The whole current passes through the electrolyte.
The major drawback is mechanical considerations
and adoption by limited localities.
Brush-shifting device is used to vary the current
Commutator Meter load and commutator‘s of small diameter facilitates
in insulation attention. The major drawbacks are
inadequate load characteristics, maintenance cost
and lack of proper insulation.
Mercury Motor There is a satisfactory performance with the
Meter introduction of this meter. The adoption of rotor
made a prominent role in supplying the calibration.
The momentary short circuit is
Reduced or even prevented.
D.C Watt Hour This meter model is developed for heavy current
Meter circuits where the temperature coefficient is high.
For indication of demand purposes a separate time
switch is used. Also, it is a clock-type meter in
which voltage variations is less with the reduced
shunt loss.
Single Phase Magnetic conditions are better improved to control
Induction Meter the energy consumption and a considerable
improvement in performance is also done. Meter
inspection is easily assessed as the construction of
this model has accessibility of
Simplifying assembly.
Poly-phase Watt- Lagging power factors in the meter reflects the
hour Meter characteristics of the current transformer.
Attempts for improving high degree of accuracy
have been built to avoid troublesome corrections.

12
Interaction effects, calibration and increase in the
effects of shunt loss are the greatest drawback of
this model.

13
2.2.1 Smart Meters

Smart Meter is an environmentally friendly energy meter that is used for measuring the electrical
energy in terms of Kilowatt - hours. It is simply a device that affords a direct benefit to the consumers
who want to save money on their electricity bill. They belong to a division of Advanced Meter
Infrastructure and are responsible for sending meter readings automatically to the energy supplier.

Accurate meter reading will be provided with the inclusion of ram benefits from the smart meter. A
smart meter has non-volatile data storage, remote connect or disconnect capability, tamper detection
and two-way communication facilities. They perform remote reporting of the collected data to the
central meter. This central meter monitors the functionality of the smart meter. From an operational
perspective, use of smart metering allows an improved management and control over the electricity
grid. Some of the benefits of smart meters are as follows:

 Low operational cost.


 Time saving to the consumers and utility companies for reporting the meter reading back to the
energy providers.
 Online electricity bill payment is allowed.
 Power consumption can be greatly reduced during the high peaks with an intimation policy.
 Has a feature of automatically terminating the appliances of when they are not in use.

Smart Meter senses all the consumption generated inside the residents. Meter readings give a broader
understanding to the energy utilities so that overall energy usage customs of the habitants can be
altered. Finally, all the information that is generated by smart meter will increase help in noble
generation.

2.3 Power Consumption

The total amount of power consumed in an individual household is referred as power consumption.
The consumption of power is an important aspect of electricity supply. People should be aware of
preserving energy for future use. With daily usage of electricity, the energy patterns have been

14
slowly varying. This variation of consumption patterns can be caused by weather conditions or
unnecessary utilization of power by inhabitants such as increase of appliances in respective
households and careless attitude in utilization for example not switching OFF the lights or television
when not watching it. These factors may show greater impacts on the end user. As the power
supplied by energy companies is vast, most of the people are neglecting energy and its savings. The
importance of consumption is declining in the mindset of utilities. The energy utilities should play a
major role in advancing the smart meter technology and should make people participate in reducing
energy consequences by creating awareness about the impact of their current level of consumption.

2.4 Study of People's Behavior

People`s behavior is termed as behavior of consumer on appliance consumption in a household. If the


consumption of the customer is high then we can empathize that their usage of devices is also high,
which means cost is directly proportional to the product of number of uses and the corresponding
durations. It is important for energy companies in reaching the anticipation of the customer. In-fact,
most of the consumers rely on monthly bill they expect for. They usually do not know which
appliances are consuming more energy and how they can manage their consumption better.

These factors play an important role in influencing the behavior of the customer. The better
understanding of the people`s behavior is only achieved through analyzing how they use their
energy. The consumers should be influenced in a smart way while accessing their appliances.
Domestic sector plays a major role in the electricity demand in Sri Lanka as shown in figure

Due to the improved lifestyle and the increased income level, consumers tend to use more and more
electrical appliances which will ease their day-to-day activities. During the last decade, the domestic
electricity consumption experienced a steady growth

15
Figure 2.2: Sectorial consumption of electricity in 2016

The average size of a house has increased and the number of people in a house has decreased.
Therefore, the number of houses per equal population has increased. Then it is obvious that the
number of customer accounts in the domestic sector is significantly higher than the customer
accounts in the other sectors as shown in figure2.3.

Figure 2.3: CEB consumer accounts by tariff in 2016

16
So, it is clear that the domestic sector has more electricity demand than other sectors. The
consumption of electricity is increasing rapidly. But CEB hasn't provided a time base tariff system
to domestic sectors. To Calculate electricity bill of consumers, we hope to use time base tariff
system.

17
Chapter 3

Methodology
3.1 Overall Concept

Figure 3.1: Overall Concept

First of all we had some basic concept about our project. Our project go through this concept it is,
make a smart meter to measure energy consumption and all the Smart meter has their unique ID.
When we enter the meter ID to master device it recognize the meter and send the data to the master
device. After collecting data it will upload to the base station.

18
3.2 Block Diagram of Smart Meter

Figure 3.2: previous Block Diagram

Above figure shows about our first method which use to measure energy consumption. In this
method we use AD7751 as power measuring module but we had to face some difficulties in this
module. These are

 Component are not available in local or foreign market.

 Some errors with AD7751

 Less accuracy in power calculation

19
Figure 3.3: Present Block Diagram

Because of errors in AD7751 we replaced HLW8012 module as power measuring module. We


could measure power with less error from this module. HLW8012 connect to the live and neutral
wire which in to the house. Real time power consumption measure by HLW8012 and according to
the power, makes frequency signal. Frequency signal identify by microcontroller convert to the
energy. Calculated energy and real time power send to the display and NRF module.

20
3.3 Hardware component use in smart meter

 HLW8012 Power Monitoring Module

Figure 3.3: Hlw8012 Arduino Module

 Based on HLW8012, single phase energy monitor IC. SOP8 package and
simple perpherial circuits.
 Need to invasive to AC main power. VBe very careful when use it because of
the HIGH AC voltage.
 Output power, or current or voltage directly by frequency, which can be read by
MCU like arduino.
 Current sense by sample resistor
 voltage sense by resistors net.
 Board dimension is 40 x 23 mm..
 Demo code (check in wiki page) support ESP8266 remote debug via telnet, safe
to read data when mains AC power connected.
 According to application note, the power supply of hlw8012 must be not
isolated, read more information on wiki page.

21
 NRF module

Figure 3.4: NRF24l01 Transceiver

Features:

• It uses 2.4G global open ISM band, with license free.

• Transmit power is greater than +20 dbm.

• Support six-channel data reception.

• 2Mbit/s speed makes high-quality VoIP possible

• Low operating voltage: 2.7 to 3.6V

• Multi-frequency points: 125 frequency points meet the needs of multi-point


communications and frequency hopping.

• Low cost: integrated with high-speed signal processing parts associated with RF

22
protocol, such as: automatically re-send lost packets and generate acknowledge signal;

• SPI interface facilitates the communication with MCU I/O port.

• Can transmit about 1100m

 Microcontroller Atemega328p IC use as our microcontroller. IC programed using arduino


board and replace to PCB.

Figure 3.5: ATMEGA328P Chip

The high-performance Microchip picoPower 8-bit AVR RISC-based microcontroller combines 32KB
ISP flash memory with read-while-write capabilities, 1024B EEPROM, 2KB SRAM, 23 general
purpose I/O lines, 32 general purpose working registers, three flexible timer/counters with compare
modes, internal and external interrupts, serial programmable USART, a byte-oriented 2-wire serial
interface, SPI serial port, a 6-channel 10-bit A/D converter (8-channels in TQFP and QFN/MLF
packages), programmable watchdog timer with internal oscillator, and five software selectable power
saving modes. The device operates between 1.8-5.5 volts.

23
By executing powerful instructions in a single clock cycle, the device achieves throughputs
approaching 1 MIPS per MHz, balancing power consumption and processing speed.

Figure 3.6: PCB Layout and components

3.4 Block Diagram of Master Device

Figure 3.6: Block Diagram of Master Device

24
Master device is a device which we can carry on hand and it can take readings remotely from it.
It communicates with smart meter using NRF24l01 (Duplex) communication module. The meter
ID and total energy consumption will be displayed and it will be recorded in a log.

25
Chapter 4

RESULTS

Device Rated Actual Time Total Practical Error Error


power power(measure duration Energy(using energy percentage
by digital Power meter) consumption
power meter)

Soldering 30w 33w 1 hour 0.033Kwh 0.034Kwh 0.001 3.03%


iron (01) Kwh

Incandescent 100w 106w 1 hour 0.106Kwh 0.109Kwh 0.003 2.83%


lamp (01) Kwh

Incandescent 200w 318w 1 hour 0.210Kwh 0.216Kwh 0.005 2.38%


lamp (02) Kwh

Incandescent 300w 318w 1 hour 0.318Kwh 0.326 Kwh 0.007 2.20%


lamp (03) Kwh

Hotplate 1500w 1517w 1 hour 0.01.517Kwh 1.528Kwh 0.0016 0.73%


(01) Kwh

26
Calculation

Considering 2nd row

Theoretical energy consumption = Actual Power × Time duration

= 0.210Kw × 1 h

= 0.210KWh

Error = Practical energy Theoretical energy


- Consumption
Consumption

= 0.210Kwh - 0.216Kwh

= 0.005 Kwh

Error percentage = (Error / Theoretical energy consumption) × 100%

= (0.005 Kwh / 0.210Kwh) × 100%

= 2.38%

Error Graph(%)
3.5

2.5

2
Eror

1.5

0.5

0
0 200 400 600 800 1000 1200 1400 1600
Power(W)

27
Power meter vs Smart Meter
1800
1600
1400
1200
Power(W)

1000
800 Theory
600 practicle
400
200
0
30 100 200 300 1500
Rated Power(W)

28
Chapter 5

Conclusion and Further Improvements


5.1 Conclusion

The aim of this project to implement a reliable energy monitoring system, which can
measure current and voltage values to calculate useful parameters in order to produce
useful outcomes or to carry out certain functionalities like device identification pattern
recognition, cost prediction etc.

Most consumers do not know energy consumption levels of the appliances they use and
how to manage their energy consumption levels effectively. These factors play an
important role in influencing the behavior of the customer. The better understanding of
the consumer’s behavior is only achieved through analyzing how they use their energy.
The consumers should be influenced in a smart way while accessing their appliances.

In here we introduce an electrical power monitoring and optimization system and it


provides the services such as viewing electricity consumption in real time, viewing the
effect of turning electrical appliances on and off and making estimation of the next bill.
The Smart Meter being developed consists of number of smart features for the consumer
and utility. With these features, consumer has much flexible control of the energy meter
and consumer behavior is transparent to the utility.

When consider about the cost of the smart metering system, it is low. But the cost of
smart meters that is in the world market is higher. So our product is a low cost one.
Therefore this electrical power monitoring and optimization system is a low expensive
solution for the power sector.

29
5.2 Further Improvements

Smart meter and smart power consumption module are still at its basic development
level as number of improvements can be done to the system to increase the accuracy of
the readings and identify usage patterns of the consumers very accurately. With more
developments this network can be used for variety of applications which will be
discussed in this chapter. Possible improvements for each system element can be
summarized as in the followings.

Smart Meter
For commercial use this cloud be improved with a tariff basis for billing
purpose and for being in a effective communication method, it could be
use in a long range data transmission.

Web Server
To pay bills online we can prepare payment gateway. A payment gateway
facilitates a payment transaction by the transfer of information between a payment
portal (such as a website, mobile phone) and the front end processor or acquiring
bank.

Master Device
Introducing payment gateway using STS algorithm for prepaid billing.

30
REFERENCES
[1] CEB Statistical Digest 2016

[2] Uteley J., Shorrock L. Domestic Energy Fact File 2008. Technical Report for

Building Research Establishment; Garston, UK: 2008.

[3] http://www.watthourmeters.com/history.html

[4] http://matrix.dte.us.es/grupotais/images/articulos/berhanu itrevolutions.pdf

[5] http://tonyhodgson.blogspot.se/2010/12/energy-electricity-pictures.html

[6] ] L. O. AlAbdulkarim and Z. Lukszo, Smart Metering for the future energy

systems in the Netherlands, in Fourth International Conference on Critical

Infrastructures,2009, pp. 1–7.

[7] E. F. Livgard, ”Electricity customers’ attitudes towards Smart Metering,” in

IEEE International Symposium on Industrial Electronics (ISIE), July. 2010, pp.

2519-2523

[8] CEB Long Term Generation Expansion Plan 2015-2034

31
Appendix A

Arduino code for Energy Meter

#include <Arduino.h>
#include "HLW8012.h"
#include "U8glib.h"
#include <Wire.h>
#include "RTClib.h"
RTC_DS1307 RTC;
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <EEPROM.h>

const uint64_t pipeOut = 00001; //This same code should be in the receiver as well
RF24 radio(9, 10); //select CE and CSN pins

U8GLIB_ST7920_128X64_4X u8g(7, 6, 8);

#define SERIAL_BAUDRATE 115200

// GPIOs
#define SEL_PIN 3
#define CF1_PIN 2
#define CF_PIN 4

// Check values every 2 seconds


#define UPDATE_TIME 2000

// Set SEL_PIN to HIGH to sample current


// This is the case for Itead's Sonoff POW, where a
// the SEL_PIN drives a transistor that pulls down
// the SEL pin in the HLW8012 when closed
#define CURRENT_MODE HIGH

// These are the nominal values for the resistors in the circuit
#define CURRENT_RESISTOR 0.0014
#define VOLTAGE_RESISTOR_UPSTREAM ( 5*470000) // Real: 2280k
#define VOLTAGE_RESISTOR_DOWNSTREAM ( 1000) // Real 1.009k
float TOTAL_ENERGY;
int eeAddress = 0;
float myvalue;
float averageActivePower;
HLW8012 hlw8012;
unsigned long time;

32
void unblockingDelay(unsigned long mseconds) {
unsigned long timeout = millis();
while ((millis() - timeout) < mseconds) delay(1);
}

void calibrate() {

int x = hlw8012.getActivePower();

hlw8012.setMode(MODE_CURRENT);
unblockingDelay(2000);
hlw8012.getCurrent();

hlw8012.setMode(MODE_VOLTAGE);
unblockingDelay(2000);
hlw8012.getVoltage();

// Calibrate using a 60W bulb (pure resistive) on a 230V line


hlw8012.expectedActivePower(x);
hlw8012.expectedVoltage(230.0);
hlw8012.expectedCurrent(x / 230.0);
}

void setup() {

float TOTAL_ENERGY = 0.00f; //Variable to store data read from EEPROM.


int eeAddress = 0; //EEPROM address to start reading from

Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
Serial.print( "Read float from EEPROM: " );

//Get the float data from the EEPROM at position 'eeAddress'


EEPROM.get( eeAddress, TOTAL_ENERGY );
Serial.println(TOTAL_ENERGY ); //This may print 'ovf, nan' if the data inside the EEPROM is not a
valid float.

Wire.begin();
RTC.begin();
if (! RTC.isrunning()) {
Serial.println("RTC is NOT running!");
// following line sets the RTC to the date & time this sketch was compiled
RTC.adjust(DateTime(__DATE__, __TIME__));
}

// Init serial port and clean garbage

33
Serial.begin(SERIAL_BAUDRATE);

// Initialize HLW8012
hlw8012.begin(CF_PIN, CF1_PIN, SEL_PIN, CURRENT_MODE, false, 500000);
hlw8012.setResistors(CURRENT_RESISTOR, VOLTAGE_RESISTOR_UPSTREAM,
VOLTAGE_RESISTOR_DOWNSTREAM);

calibrate();

/*******************NRF24L01****************/

radio.begin();
radio.setAutoAck(false);
radio.setPALevel(RF24_PA_MAX);
radio.setDataRate(RF24_250KBPS);
radio.openWritingPipe(pipeOut);
radio.stopListening();
}

void loop() {
static unsigned long start = millis();
static unsigned long endTime = millis();
float averageActivePower;

if ((millis() - start) > UPDATE_TIME) {


start = millis();
Serial.print("[HLW] Active Power (kW) : "); Serial.println(hlw8012.getActivePower());
Serial.print("[HLW] Voltage (V) : "); Serial.println(hlw8012.getVoltage());
Serial.print("[HLW] Current (A) : "); Serial.println(hlw8012.getCurrent());
Serial.print("start time: ");
Serial.println(start);

for (int i = 1; i <= 10; i++) {


float x = hlw8012.getActivePower();
averageActivePower += x;
Serial.print("x = ");
Serial.println(x);
delay(20);
}

endTime = millis();

hlw8012.toggleMode();

averageActivePower = averageActivePower / 10000;

double energy = averageActivePower * (endTime - start);

34
TOTAL_ENERGY = EEPROM.get( eeAddress, TOTAL_ENERGY );
TOTAL_ENERGY = TOTAL_ENERGY + ((energy) / 360000);

Serial.print("I received: ");


Serial.println(TOTAL_ENERGY, 3);

EEPROM.put(eeAddress, TOTAL_ENERGY);

myvalue = EEPROM.get( eeAddress, TOTAL_ENERGY );

const char meterID[] = "12345";


radio.write(&meterID, sizeof(meterID));
float myvalue = TOTAL_ENERGY;
radio.write(&myvalue, sizeof(myvalue));

Serial.print("The average: ");


Serial.println(averageActivePower);
Serial.print("start time: ");
Serial.println(start);
Serial.print("end time: ");
Serial.println(endTime);
Serial.print("time difference: ");
Serial.println(endTime - start);
Serial.print("energy: ");
Serial.println(energy);
Serial.print("Total energy: ");
Serial.println(TOTAL_ENERGY);

// picture loop
u8g.firstPage();
do {
draw();
} while ( u8g.nextPage() );
// rebuild the picture after some delay
delay(50);

}
Appendix B

Arduino Code for Master Device

#include <EEPROM.h>

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address

35
#include "Keypad.h"

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

const uint64_t pipeIn = 00001; //Remember that this code is the same as in the transmitter

RF24 radio(7, 8);

const byte Rows = 4; //number of rows on the keypad i.e. 4


const byte Cols = 4; //number of columns on the keypad i,e, 4

//we will definne the key map as on the key pad:

char keymap[Rows][Cols] =
{
{'1', '2', '3', 'A'},
{'4', '5', '6', 'B'},
{'7', '8', '9', 'C'},
{'*', '0', '#', 'D'}
};

byte rowPins[Rows] = {A7, A6, A5, A4}; //connect to row pinouts


byte colPins[Cols] = {A3, A2, A1, A0}; //connect to column pinouts

Keypad keypad = Keypad( makeKeymap(keymap), rowPins, colPins, Rows, Cols );


char ID[5];
char GR[0];
int k = 0;
int l = 0;
int eeAddress = 1;
int address = 3;
float TOTAL_ENERGY;
String value;

// initialize the library with the numbers of the interface pins


//LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {

float myvalue = 0.00f; //Variable to store data read from EEPROM.


int eeAddress = 1; //EEPROM address to start reading from

36
Serial.begin(115200); // set up the LCD's number of columns and rows:
lcd.begin(20, 4);

/*******************Wireless communication******************/

Serial.begin(115200);
radio.begin();
radio.setAutoAck(false);
radio.setDataRate(RF24_250KBPS);
radio.openReadingPipe(1, pipeIn);
radio.startListening();

// ------- Quick 3 blinks of backlight -------------


for (int i = 0; i < 3; i++)
{
lcd.backlight();
delay(250);
lcd.noBacklight();
delay(250);
}
lcd.backlight();

lcd.setCursor(6, 1); //Start at character 4 on line 0


lcd.print("WELCOME");
delay(8000);
lcd.clear();
lcd.cursor();
// set the cursor to column 0, line 0
// (note: line 0 is the first row, since counting begins with 0):
displayMenu(); //jump to the display menu function

/************optional item****************************/

void displayMenu()
{
lcd.setCursor(0, 0);
lcd.print("'A'-Enter the MID");
lcd.setCursor(0, 2);
lcd.print("'B'-Reset");
}

void loop()

37
{
k = 0;
int number = 0;
char key = keypad.getKey();
String meaterID = "";
float RS;
char meterID;

/*************key specification*******************/

switch (key)
{
case 'A':
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Enter Meter ID");
lcd.setCursor(0, 1);

while (k < 5 )
{
char key1 = keypad.getKey();
if (key1 >= '0' && key1 <= '9' )
{
ID[k] = key1;
if (k == 4) {
Serial.print("keypad ID:");
for ( int i = 0 ; i < 5 ; i++)
{
meaterID += ID[i];
}
}
Serial.println(meaterID);

lcd.print(key1);
k++;
}

if (key1 == 'B')
{
lcd.clear();
lcd.setCursor(0, 0);
return displayMenu();
}
}

lcd.noCursor();
delay(1000);
lcd.clear();

38
lcd.setCursor(0, 1);
lcd.print("'D'-Get Readings");
lcd.noCursor();

break;

case 'B':

lcd.clear();
displayMenu();

break;

case 'C':

break;

case 'D':
if (radio.available()) {

char meterID[32] = "";


radio.read(&meterID, sizeof(meterID));
Serial.print("Meter ID: "); Serial.print(meterID);
Serial.println();
delay(1000);

float myvalue = {0};


radio.read(&myvalue, sizeof(myvalue));
Serial.print("myvalue: "); Serial.println(myvalue);

EEPROM.put(eeAddress, myvalue);
TOTAL_ENERGY = EEPROM.get( eeAddress, TOTAL_ENERGY );
Serial.println(TOTAL_ENERGY);

lcd.clear();
lcd.setCursor(0, 1);
lcd.print(".......Wating.......");
lcd.noCursor();
lcd.clear();
lcd.print("Meter ID: ");
lcd.print(meterID);
lcd.setCursor(0, 1);
lcd.print("Total Unit: ");
lcd.print(TOTAL_ENERGY);
lcd.setCursor(0, 4);
lcd.print("#-calculate Bill");

39
}

break;

case '#':

lcd.clear();
lcd.setCursor(0, 1);
lcd.print("Monthly Bill:");
RS = TOTAL_ENERGY * 30;
lcd.setCursor(0, 2);
lcd.print("Rs:");
lcd.print(RS);
lcd.print("/=");
lcd.setCursor(0, 4);
lcd.print("*-Send Data");

break;

case '*':

lcd.clear();
lcd.setCursor(0, 1);
lcd.print("Sending Data To the");
lcd.setCursor(0, 2);
lcd.print("Server-----------");
lcd.setCursor(0, 4);
lcd.print("B- Reset");

break;
}
}

40