IOT Based Smart Energy Meter
IOT Based Smart Energy Meter
IOT Based Smart Energy Meter
( 2019-20 )
Department of Computer Technology
S.K.B.P. POLYTECHNIC, KOPARGAON
CERTIFICATE
Is a bonafide work carried out by above students under the supervision of Prof.
V. A. Parjane and it is submitted towards the partial fulfillment of the require-
ment of MSBTE, Mumbai for the award of Diploma in Computer Technology.
Date : / /
Place : Kopargaon
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION, MUMBAI
EXAMINERS CERTIFICATE
Submitted by
First and the foremost I, express my deep sense of gratitude, sincere thanks and
Technology, Sanjivani K.B.P. Polytechnic, Kopargaon. Your availability at any time through-
out the year, valuable guidance, opinion, view, comment, critics, encouragement, and sup-
providing me the best support I ever had. I like to express my sincere gratitude to Prof. A.R.
Mirikar, Principal, Sanjivani K.B.P. Polytechnic, Kopargaon for providing great platform
Sanjivani K.B.P. Polytechnic, Kopargaon for giving comments for improvement of work,
Last but not the least; I should say thanks from my bottom of heart to my family and
friends for their never ending love, help, and support in so many ways through all this time.
In this paper the idea of smart energy meter using IoT and Node MCU have been
introduced. In this method we are using Node MCU because it is energy efficient i.e.
it consumes less power, it is fastest and has two UARTS. In this paper, energy meters
which is already installed at our houses are not replaced, but a small modification on the
already installed meters can change the existing meters into smart meters. The use of Wi-Fi
module provides a feature of notification through Server. One can easily access the meter
working through web page that we designed. Current reading with cost can be seen on web
page. Automatic ON OFF of meter is possible. Threshold value setting and sending of
notification is the additional task that we are performing.
Contents
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II
1 INTRODUCTION 1
1.1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 PROBLEM STATEMENT . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 OBJECTIVES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 REQUIREMENT ANALYSIS 3
2.1 REQUIREMENT SPECIFICATION . . . . . . . . . . . . . . . . . . . . . 3
2.2 SYSTEM REQUIREMENT . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2.1 HARDWARE REQUIREMENT . . . . . . . . . . . . . . . . . . . 3
2.2.2 SOFTWARE REQUIREMENT . . . . . . . . . . . . . . . . . . . 4
2.3 Literature Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 SYSTEM ANALYSIS 5
3.1 PROCESS MODEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.1 Waterfall Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.2 Advantages of Waterfall Model . . . . . . . . . . . . . . . . . . . 5
3.1.3 When to Use Waterfall Model . . . . . . . . . . . . . . . . . . . . 6
3.2 BLOCK DIAGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 Data Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.4 ER DIAGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.5 UML Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.5.1 Use case Diagram: . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.6 Sequence Diagram: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.6.1 Activity Diagram: . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4 IMPLEMENTATION DETAILS 14
4.1 NODE MCU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2 RELAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.3 POTENTIAL TRANSFORMER . . . . . . . . . . . . . . . . . . . . . . . 16
4.4 CURRENT SENSOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.5 VOLTAGE SENSOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.6 LCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.7 FLOWCHART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.8 CODING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
I
List of Tables
II
IoT BASED SMART ENERGY METER
C HAPTER 1
INTRODUCTION
1.1 INTRODUCTION
In the present billing system the distribution companies are unable to keep track
of the changing maximum demand of consumers. The consumer is facing problems like
receiving due bills for bills that have already been paid as well as poor reliability of elec-
tricity supply and quality even if bills are paid regularly. The remedy for all these problems
is to keep track of the consumers load on timely basis, which will held to assure accurate
billing, track maximum demand and to detect threshold value. These are all the features to
be taken into account for designing an efficient energy billing system. The present project
“IoT Based Smart Energy Meter” addresses the problems faced by both the consumers and
the distribution companies. The paper mainly deals with smart energy meter, which utilizes
the features of embedded systems i.e. combination of hardware and software in order to
Smart energy meter as the name suggest; it is a next generation meter which is highly
efficient and user friendly ,which provides a great way to save control the usage of energy.
These are all the features to be taken into account for designing an efficient en-
ergy billing system. The present project “IoT Based Smart Energy Meter” addresses the
problems faced by both the consumers and the distribution companies. The paper mainly
deals with smart energy meter, which utilizes the features of embedded systems i.e. combi-
1.3 OBJECTIVES
The main objective of smarter meter reading syatem is provides effective, reliable
and efficient wireless automatic meter reading, biling and security through the use of this
system. Thus reduce human operator meter reading operation costs. . The remedy for all
these problems is to keep track of the consumers load on timely basis, which will held to
assure accurate billing, track maximum demand and to detect threshold value.
C HAPTER 2
REQUIREMENT ANALYSIS
As per the problem definition of the project the requirement analysis from the
software and hardware has been performed. The requirements have been elaborated
in the following section.
In this chapter of our project all the requirement needed to run the project
successfully on the system are specified. The project requirements are useful for
its deployment in users computing environment. Generally they are categorized
as.
• Node MCU
• Wifi Modem
• Relay
• Current sensors
• Voltage sensors
• Energy Meter
• Orcad
• Altium
C HAPTER 3
SYSTEM ANALYSIS
This is the most common easy to implement and classic of all the life cycle models.
It is also referred as the Classic Life Cycle Model or Linear-Sequential Life Cycle Model.
This is the most common easy to implement and classic of all the life cycle models.
It is also referred as the Classic Life Cycle Model or Linear-Sequential Life Cycle Model.
This model places a lot of emphasis on documentation i.e. Requirement Specification and
Design Document. In waterfall model each phase must be completed successfully before
• A schedule can be set with deadlines for each stage of development and a product
can be proceed through the development process model phases one by one.
• Development moves from concept, through design, implementation, testing, in- stal-
• Technology is understood.
the Block Diagram. A block diagram of a system is a pictorial representation of the function
performed by each component and of the flow of signals. Such a diagram depicts the
inter-relationships which exist between the various components. A block diagram has the
advantage of indicating more realistically the signal flows of actual system. In a block
diagram all system variables are linked to each other through functional blocks. The
functional block or simply Block is a symbol for the mathematical operation on the input
signal to the block which produce the output. The transfer functions of the components are
usually entered in the corresponding blocks, which are connected by arrows to indicate the
A data flow diagram is the graphical representation of flow data through an informa-
tion system. Modeling its process aspects often they are preliminary step used to create an
overview of system which can be later elaborated DFDs can be also used for the visualiza-
tion of data processing. A DFD shows what kind of information will be input to and output
from the system where the data will come from and go the data will be stored. It does not
DFD 0
DFD 1
DFD 2
3.4 ER DIAGRAM
C HAPTER 4
IMPLEMENTATION DETAILS
On board USB to serial chip to easily program and upload codes from the Arduino
IDE
Has on board 3.3V regulator to ensure enough power to function as your go-to WiFi
chip!
ESP-12E Processor
4.2 RELAY
Relay are output devices which are used to control or operate some external devices.
This is a 5 volt Isolated relay module which means that there is a Optocoupler used in
between your control circuit and the relay thus protecting your circuit in case of any short
circuit issues on the relay side.The relay is driven safely by BC547 transistor which is
triggered via an Optocoupler IC which serves as isolator between your microcontroller and
the relay.
Potential transformer or voltage transformer gets used in electrical power system for
stepping down the system voltage to a safe value which can be fed to low ratings meters
and relays. Commercially available relays and meters used for protection and metering, are
This sensor produces an output voltage which is directly proportional to sensed cur-
5V should be supplied to Vcc of ACS712 breakout board and the GND should be the neg-
ative of 0v of supply. Once it is powered, the Vout should produce output voltage which
represent current going through the sensing pads. When the load is in OFF state then the
ACS712 is able to measure current in two directions. Output voltage more than 2.5V
(VCC/2) indicates current in one direction and voltage less than 2.5V indicates current
in another direction.
4.6 LCD
Features of LCD
4.7 FLOWCHART
Step 1: Start
Step 8: Go to Step 5
4.8 CODING
intcounter = 0;
intRelay = D6;
intB;
intButton = D4;
void setup()
Serial.begin(9600);
Bly.begin(ssid, pass);
lcd.init();
lcd.backlight();
lcd.setCursor(0 ,0);
lcd.print(”Sanjivani K.B.P”);
lcd.setCursor( 0,1);
lcd.print(”Polytechnic”);
delay(3000);
lcd.setCursor(0 ,0);
lcd.setCursor( 0,1);
lcd.print(”energy meter”);
delay(3000);
lcd.clear();
pinMode(Relay, OUTPUT);
pinMode(Button, INPUT);
void loop()
Blynk.run();
int val;
val=digitalRead(Button);
if (val==0)
// digitalWrite( Relay,LOW);
lcd.setCursor(0, 0);
lcd.setCursor(0, 1);
Serial.print(counter);
units = counter;
//lcd.setCursor(0, 0);
Serial.println(units);
lcd.setCursor(12, 0);
lcd.print(units);
calc = units ∗ 4;
//lcd.setCursor(0, 1);
Serial.println(calc);
lcd.setCursor(11, 1);
lcd.print(calc);
delay(2000);
else
delay(500);
else{
lcd.setCursor(0, 0);
lcd.print(”SystemisOf f ”);
lcd.setCursor(0, 1);
lcd.print(”T urnOnSwitch”);
//putyourmaincodehere, torunrepeatedly :
C HAPTER 5
•Testing is an internal part of any system. The various objectives of testing are:
• To verify that software has been implemented according to the predefined standard.
• The primary purpose of testing is to uncover systems limitations and measure its full
capabilities. A list of various planned tests and a brief explanation follows belows.
the factory, using special automated test hardware the product being tested is generally
called UUT (Unit Under Test), or sometimes DUT (Device Under Test).
Software testing is the process of validating and verifying that a software program or
application or product, meets the business and technical requirements that guided its design
and development.
In this each module is tested individually. Criteria selected for identifying unit test module
is that identity modules that has core functionality implementation. Module could be and
tegration testing individuals modules and tested as a group. Integration Testing takes as
its input modules that have been unit tested, groups then in larger aggregates, applies tests
define in an integration test plan to those aggregations, and delivers as its output the in-
tegrated system ready for testing. The purpose of integration testing to verify functional,
The process of evaluating software during or at the end of the development process is to
5.2.1 RESULT
C HAPTER 6
6.0.1 APPLICATION
• Many industries.
• In household.
• Converting this system to home automation will prove an emerging benefit to IoT tech-
nology.
• Using this technology in smart grid can provide more efficient power supply and power
saving.
• IoT technology coupled with smart meters and smart devices can help in the upbringing
6.0.3 ADVANTAGES
• There will be no more estimated bills. The user has to pay bills for what is actually used
in a billing period.
• The smart meter will report if it encounters any electrical issues to deliver better quality
of supply.
• It will be providing precise details of consumption. This will allow users to manage the
usage of electricity.
The user can set his limits of consumption and crossing of this limit will gener-
C HAPTER 7
7.0.1 CONCLUSION
Meter reading by using IOT modem and also we can control the load using relays
via the web page. The IOT based energy meter was developed and extended with the relay
controls to disconnect the load from the power supply. Live status about power consumption
can be viewed by both consumer as well as electric board. The relay in the energy meter
can be controlled by the EB officer using the website created, for turning off the power
supply. Another relay is provided to the Thus by this project we have created the prototype
model using which we will be able to monitor the energy consumer for turning off the load
7.0.2 References
[1] Petri Oksa, Mikael Soini, “Considerations of Using Power Line Communication. In the
AMR System”, 2006 IEEE International Symposium on 26-29, pp.208- 211, Mar. 2006
[3] Ali Abdollahi, Marjan Dehghani, and Nega Zaman zadeh,”SMS-based Reconfigurable
An Automatic Meter Reading System Based on ZigBee PRO Smart Power Profile IEEE
[5] Subhashis Maitra, “Embedded Power Meter- A new concept to measure the power con-
sumed by a consumer and to pay the bill”, Power System Technology and IEEE Power