You are on page 1of 35

SMART ENERGY METER USING ARDUINO AND GSM SIM900A

Table of Contents
Chapter 1 – Introduction ............................................................................................................ 3
Chapter 1.1 objective of this chapter:..................................................................................... 3
Chapter 1.2 Project Background ............................................................................................ 3
Chapter 1.2.1 summary and overview of the project .......................................................... 3
Chapter 1.2.2 Current Scenario .......................................................................................... 3
Chapter 1.2.3 problem statement and motivation ............................................................... 4
Chapter 1.3 Approaches taken ............................................................................................... 5
Chapter 1.4 Project as a solution ............................................................................................ 5
Chapter 1.5 projects Aims and Objectives ............................................................................. 6
Chapter 1.5.1 AIM .............................................................................................................. 6
Chapter 1.5.2 Objectives .................................................................................................... 6
Chapter 1.6 Structure of the report ......................................................................................... 6
Chapter 1.7 summary of the chapter ...................................................................................... 6
Chapter 2 Background and Literature Review ................................................................... 7
Chapter 2.1 About the client and Survey ......................................................................... 7
Chapter 2.1.1 About client .................................................................................................. 7
Chapter 2.1.2 Interview with client .................................................................................... 7
Chapter 2.1.3 list of Questionnaire ..................................................................................... 8
Chapter 2.2 Similar projects .............................................................................................. 9
Chapter 2.2.1 GSM based Smart Energy Meter ......................................................... 9
Chapter 2.2.2 Smart Energy Meter with Reading Indication using GSM .............. 10
Chapter 2.2.3 Arduino-Based Prepaid Energy Meter Using GSM ......................... 11
Chapter 2.2.4 Comparison between similar projects ............................................... 12
Chapter 2.2.5 Critical analysis ..................................................................................... 12
Chapter 2.3 Understanding the Solution .............................................................................. 12
Chapter 2.3.1 Technical Requirements: ........................................................................... 12
Chapter 2.3.2 Analog meter .............................................................................................. 13
Chapter 2.3.3 Considered IOT devices ............................................................................. 13
Chapter 2.3.4 Considered Analog meter information exchange ...................................... 14
Chapter 2.4 Review of technical aspects ...................................................................... 15
Chapter 2.4.1 Arduino ...................................................................................................... 15
Chapter 2.4.2 Arduino IDE............................................................................................... 15
Chapter 2.4.3 considered of Arduino Libraries to GSM SIM900a .................................. 16
Chapter 2.4.5 Architecture of Smart Energy Meter.......................................................... 17
Chapter 3 Development ........................................................................................................... 18
Chapter 3.1 Projects Methodology: ...................................................................................... 18
Chapter 3.1.1 Dynamic System Development Method (DSDM) ..................................... 18
Chapter 3.1.2 Enhanced Waterfall .................................................................................... 20
Chapter 3.1.3 Spiral model ............................................................................................... 21
Chapter 3.1.4 Selection of methodology: ......................................................................... 22
Chapter 3.2 Dynamic System Development Method (DSDM) ........................................... 22
Chapter 3.2.1 MOSCOW prioritization............................................................................ 22
Chapter 3.2.2 The Project Plan: ........................................................................................ 22
Chapter 3.2.3 Work Break Down Structure ..................................................................... 23
Chapter 3.2.4 Gant Chart .................................................................................................. 25
Chapter 4 Code ........................................................................................................................ 26
Chapter 4.1.1 Declaration..................................................................................................... 26
Chapter 4.1.2 Setup function ................................................................................................ 26
Chapter 4.1.3 Interrupt function ........................................................................................... 27
Chapter 4.1.4 Loop function ................................................................................................ 28
Chapter 4.1.5 SendMessage function ................................................................................... 29
Chapter 5.1 Test Cases ......................................................................................................... 30
Chapter 5.1.1 Test Case 1 ................................................................................................. 30
Chapter 5.1.2 Test Case 2 ................................................................................................. 31
Chapter 5.1.3 Test Case 3 ................................................................................................. 32
Chapter 5.1.4 Test Case 4 ................................................................................................. 33
Chapter 5.1.5 Test Case 5 ................................................................................................. 35
Chapter 1 – Introduction
Chapter 1.1 objective of this chapter:
The objective of this chapter is to provide the overview and total idea of the project
“Smart Electric Energy Meter using Arduino”. It also provides the core concept of the
project and to introduce the problem background as planned. This chapter helps to
initiate the project by introducing different project aspects:
1. Project background
2. Current scenario
3. Problem statement and motivation
4. Approaches taken
5. Project as a solution
6. Aims and objectives
7. Project plan

Chapter 1.2 Project Background


Chapter 1.2.1 summary and overview of the project
Chapter 1.2.2 Current Scenario
According to report of ‘department for Business, Energy & industrial Strategy of UK’.
UK government install 11 Million of smart meter in domestic and non-domestic site. At
the end 2020 smart metering programme aims will be achieved by installing 53 million
smart meters. It estimated that smart meters will take £300 million off consumer’s bills
in 2020, rising to more than £1.2 billion a year by 2030- an average annual saving of
£47 per household. Further this report provides a smart meter penetration rate of
electric meters by region. All together 800 Million of smart meter would have been
installed globally by 2020. While Europe leads the penetration rate- growing from 15%
in 2010 to 85% in 2020. China will be the largest install based with over 435 million of
meters followed by the US with 135 million meters.
According to the report which is published in Kathmandu post, Nepal electricity
authority (NEA) are planning to replace around 90,000 traditional analog meter with
smart meter for testing purpose. Further, NEA published a report about Kathmandu
valley smart metering project, in this report they are planning to install 90,000 digital
meter and smart meter. further details information is in appendix section I.

Chapter 1.2.3 problem statement and motivation


In Nepal. The current electricity billing system is completely manual. The electric meter
is situated in the house, office and factories etc. the energy meter reading is collected
by meter readers on their fortnightly or monthly visits to the premises. This system has
disadvantage of appointing meter reader to take the meter reading, effects consumer
privacy etc. according to report of smart meter project which was published by
Government of Nepal ministry of communication and IT. Nepal has one of the highest
electricity output losses globally, recording 22.9% in 2017 during the transmission and
distribution process. NEA plan and leading several projects to improve this problem
by implementation smart metering, smart grid project. After implementing this system
meter loss analysis, advance analytics solutions of track energy consumption and
check power thefts is possible which helps to reduce problems. Some of the problem
observed in analog meter reading are as follows:

• Meter reading and other related task like bill payment and line cut system are
performed by many staffs. i.e. large number of employees are required.
• Billing errors due to careless of staff (human errors).
• In context of Nepal (meter reading is carried out in once in 3 months due to
road condition and situation of place. So, it creates a lot of problems to
consumers) source: NEA https://www.nea.org.np
Case Study: Digital tech addressing Brazil’s power theft crisis. Rising incident of
electricity theft in Brazil was costing its government billons in lost revenue. On
average, 8% of energy in Brazil was stolen from grid each year, reaching a staggering
40% in some areas.
Solution: Siemens used innovation Smart Meter software to access, collect and
process data from meters. Integration the platform with the billing and management
system to ensure efficient energy billing to users.

Chapter 1.3 Approaches taken


The following approach will be adopted during the construction of the proposal system:
1. A detail study will be carried out on the problem domain.
2. A workable and familiar with client product will be designed.
3. Detail requirement of hardware and software of smart meter will be gathered
4. Design a workable and practicable, feasible smart energy meter.
Chapter 1.4 Project as a solution
The main solution of the above mention problem is to change Analog Meter Reading
(AMR) to digital(smart) meter reading system. On digital energy meter data of meter
is passed through user by SMS services. On my purposed system. The analog meter
used to detected pulse of analog meter and count it with serial monitor. Send the
information of analog meter which consists of unit, price of energy consumed by
analog meter.
Chapter 1.5 projects Aims and Objectives
Chapter 1.5.1 AIM
The main aim of the project is to develop Arduino based energy meter and send
information of meter through GSM module via SMS to the user.
Chapter 1.5.2 Objectives
• To develop a smart energy meter that sends information of meter through user
using SMS services.
• To implement the knowledge if hardware, software and programming language
on IOT projects.
• To understand and deal with a client for this project as a part of requirement.

Chapter 1.6 Structure of the report


Chapter 1.7 summary of the chapter
Chapter 2 Background and Literature Review
Chapter 2.1 About the client and Survey
Chapter 2.1.1 About client
As a part of projects of smart energy projects, a company name “Padma merchant company”
wants to be my clients. Padma merchant company is fairly known as a home designing
company in Nepal. This company build different house, apartment and necessary equipment
required for home. My project is co-related with home automation. On first phase, I approach
my idea and proposal of Smart Energy meter to company manager. They analysis and review
my projects and ask further details of projects. When I show my progress till date (research on
different smart meter condition on different country, how can we implement smart energy
meter and hardware material required to implemented it. So, with the mutual understanding
between me and client. they want to become my client and help me on further days and provide
me an optimum solution of the projects. Features that need to be included in smart energy meter
as prospective of client are as follows:
• The user needs to get information of meter through.
• The user can also send message to get information of meter (i.e. about price and
pulse(unit) of meter).
• The product need to reliable, workable and cost efficient.
As further requirement of client, features like two ways communication need to establish in
meter and end user. So, if user send SMS to smart energy meter then user need to get
information of meter reading.
Chapter 2.1.2 Interview with client
Chapter 2.1.3 list of Questionnaire
Chapter 2.2 Similar projects
Chapter 2.2.1 GSM based Smart Energy Meter

Overview of project
k. Bowya had a purpose a GSM based smart energy meter. On this project’s information of
analog meter is send through SMS using GSM modem. On initial phase of this projects the
development phase is carried out in virtual simulation on proteus software. After completing
virtual simulator, hardware component is design and implemented it. Hardware component
used in this project are energy meter, optocoupler which is used to connect Arduino and energy
meter, Arduino, GSM shield, circuit board and bulb(load).
Finding from the project
• Easy applicable in daily life for end user because GSM Modem easily push notification
to user at any time.
• The features like relay control bulb, SMS alert notification are impressive and
workable.
• Projects development phase is carried out in both hardware and software.
Analysis of the project
GSM based smart meter reading is best way to implemented on client side. Both hardware and
simulation phase are carried out in this project. Optocoupler is used to communicate Arduino
and analog meter. Relay is used to control bulb or load. If user didn’t pay bill or don’t recharge
meter reading instantly energy meter will cut off.
Chapter 2.2.2 Smart Energy Meter with Reading Indication using GSM

Overview of project
M. leelavathin had a purpose the smart energy meter with reading indication using GSM. It is
developed to decrease the electric consumption bill by providing the energy meter reading to
the user by an alert SMS at certain days. the reading from electric analog meter data is send
through end user by GSM module using SMS services. This project is based on both customer
and server side. Using WIFI module sending meter information to sever side and control the
consumption of electricity and can easily cut the utility by using relay. Some of the pros and
cons of this projects are as follows:
Finding from the project
• The features of smart energy meter are based on both client and server side.
• Features like smart notification, wireless and server connection with load cut off are
workable.
• Features like SMS service using GSM modem is practicable and more reliable.
Analysis from Project
the features like server connection, database details and GSM are well managed. So, this project
gives an idea of both client and server connection. This program will only run if the meter is
recharge. Current consumption price is also set in this project.
Chapter 2.2.3 Arduino-Based Prepaid Energy Meter Using GSM

Overview of Project
U.A Rajput had a purpose Modeling of Arduino-Based Prepaid Energy Meter Using GSM
technology this projects or research paper is based on study of different country analog meter
reading system and necessary change to make it smart, workable and applicable on working
environment. Different problem statement faced by analog meter which can be improve by
implementation of smart energy meter. Some of the problem faced by analog meter reading are
meter reading error ratio is high, large number of employees are required, billing errors due to
careless of meter reading and human error. So, to solve these types of problems smart meter is
designed and implement by display information of meter reading in LCD display and
information of meter is send through SMS by GSM module. Some of pros and cons of this
projects are as follows:
Finding from the project
• Research of different county meter reading condition.
• Information of meter is display in LCD and display information at certain interval of
time on user by SMS services.
• Used optocoupler for meter reading pulse in Arduino. Which make meter reading error
ratio in low.
Analysis from Project
LCD display is used in this project to interact with user. It displays units and balance. User
need to recharge the system using GSM SMS. If user doesn’t pay bill amount it will alert user
and further line will cut. To cut electricity relay is used.

Chapter 2.2.4 Comparison between similar projects

Features GSM based smart energy GSM based Arduino-based


Smart energy meter with Smart energy prepaid Energy
meter (my reading mete II meter using GSM
projects) indication using
GSM
Cost Efficient Cheaper Expensive Cheaper Expensive
Information send Available Available Available Available
through SMS
Information send Not Available Available Not Available Available
through WIFI
Two Ways Available Not Available Not Available Not Available
commination
between meter
and end user
Serial monitor of Available Not Available Not Available Not Available
information of
meter reading
Implementation Available Not Available Available Not Available
of projects on
both virtual
software and
hardware

Chapter 2.2.5 Critical analysis

Chapter 2.3 Understanding the Solution


Chapter 2.3.1 Technical Requirements:
1. Analog meter
2. Arduino UNO
3. Optocoupler
4. GSM module
5. SIM card and Mobile
6. Bulb and holder
Chapter 2.3.2 Analog meter
Analog meter is an electric device that can detect and display energy reading. The
working mechanism of analog meter is energy pulse output (EP) is a ready indication of active
power, as registered by the meter. The frequency of the pulse is directly proportional to active
power. For below meter there is 3200 impulses. So, every 3200 impulses it counts 1 unit. There
are different types of electricity meters they are as electrolytic meter, mercury motor meter.
D.C watt hour meter, single phase induction meter.

Chapter 2.3.3 Considered IOT devices


To communicate analog meter and GSM instantly we can use Arduino, Raspberry pi and
NodeMcu. Some of the IOT devices that was considered during the process of consideration
are listed as follows (Evidence to be referred from project folder):
• Arduino
• Raspberry pi
• NodeMcu
Justification of the consideration
The major reason to choose Arduino are it is Simplicity, Robustness and cheaper price than
other IOT devices. Further reason to choose Arduino are as follows:
• Inexpensive- Arduino boards are relatively inexpensive compare to other
microcontroller platforms.
• Cross-platform- The Arduino Software (IDE) runs on windows, Macintosh and Linux
OS.
• Simple, Clear Programming environment- The Arduino Software (IDE) is easy-to- use
and flexible.
Arduino Uno is a microcontroller board based on the ATmega328. It has 14 digital I/O pins
of which 6 can be used as PWM outputs, 6 analog inputs, a 16 MHz crystal oscillator with USB
connection, power jack and reset button.

Features of Arduino UNO:


Microcontroller ATmega328
Operating Voltage 5V
Input voltage (Limits) 7-14v
Analog input pins 6
DC current per I/O pin 40 mA
DC current for 3.3v pin 50 mA
Digital I/O pins 14 (of which 6 provide PWM output)
Clock speed 16 MHZ
EEPROM 1KB

Chapter 2.3.4 Considered Analog meter information exchange


During research period some of the hardware that can used as transmit information of analog
meter reading are as follows.
• WIFI module
• GSM SIM900a
• Thingspeak (website which will send SMS to which required WIFI module
Justification of the consideration
As mention previously in the client requirement. Information of analog meter need to be
exchange using GSM modem as SMS features.
GSM SIM900a- GSM (Global System for mobile) work on frequencies of 850 MHZ, 900
MHZ, 1800 MHZ and 1900 MHZ. In this project as I have explained that consumer will get
notified about energy meter so information will passed through GSM module through user
phone. Mainly GSM operating frequency are 900MHz and 1900MHZ. So, on Nepal GSM work
on 900MHZ. I will used GSM SIM900a in this project. It is used for the purpose for sending
message form the hardware we have design to the consumer. Below is the figure of GSM
module.

Chapter 2.4 Review of technical aspects


Chapter 2.4.1 Arduino
For communication or sending data of analog meter to IOT device I will used Arduino which
is cheaper than raspberry pi. Arduino is an open-source electronic platform based on easy-to-
use hardware and software as compare to other IOT devices. Arduino boards can read inputs-
light on a sensor. So, the main reason to choose Arduino device for this project is it can easily
read light signal. Analog meter reading can be carried out by reading or counting pulse of meter
(LED). Arduino can read light signal easily and error ratio of the project will be low. Some of
the reason to choose Arduino for this project are as follows:
• It is an open-source project, software/hardware is extremely accessible and very
flexible to be customized and extended
• It is flexible, offers a variety of digital and analog input.
Chapter 2.4.2 Arduino IDE
The Arduino integrated Development Environment (IDE) is the main text editing program used
for Arduino programming. Some of the features and function are as follows:
• Based on C++ with 80% of the instructions.
• Programs are called sketches
• Sketches need two functions: Void setup (), Void loop ()
• Setup () run first and once.
• Loop () tuns over and over, until power is lost, or new sketch is loaded.

Chapter 2.4.3 considered of Arduino Libraries to GSM SIM900a


The GSM shield has a modern that transfers data from a serial port to the GSM network. The
modem executes operation via a series of AT commands. The library that used to
communicate between modem and SIM card is Software Serial library. Some of the serial
monitor libraries are as follows:
• Software Serial
• AltSoftSerial (doesn’t support serial monitor in Arduino UNO)

Justification of the consideration


Only one library can be used to communicate Arduino and GSM SIM900a which is software
serial. Software Serial also have its own limitation to overcome the limitation we can use
AltSoftSerial library.
Some of the limitations of this library are as follows.
• Multiple software serial ports cannot be assigned, only one can receive data at a time
• On Arduino board the current maximum RX speed is 57600bps.
• On Arduino board RX pin doesn’t work on pin 13.
The limitation of this library can be solved by using AltSoftSerial library. Using AltSoftSerial
library above mention major issued will be solved.
Chapter 2.4.5 Architecture of Smart Energy Meter
Chapter 3 Development
Chapter 3.1 Projects Methodology:
In this section different types of methodology are described and finally one of the
methods will be selected among 3 different models for the development cycle of this project.
1. Dynamic system development method (DSDM)
2. Enhanced waterfall model
3. Spiral model
Chapter 3.1.1 Dynamic System Development Method (DSDM)
DSDM is an agile method that focuses on full project lifecycle. DSDM is an agile approach,
which allows it to remain flexible and meet changing business requirements. At the same time,
it provides the necessary projects management and governance mechanisms. The prioritization
of the features is done using the Moscow method, which splits them into four group: Must
have, should have, could haves and won’t haves. The phase of DSDM are feasibility study,
business study, functional model iteration, design and build iteration and implementation. All
these phases are shown in the figure below.

1. Feasibility study: During this stage of the project, the feasibility of the project
is examined. Gathering research for the current projects in this method is suited
or not. The most important techniques used in this phase are the research
gathering and using this methodology related project can be easier or not.
2. Business study: In this phase the overall business study of the desired system
is done. The requirement of the business is specified on a leveling method.
After it, the basic framework layout or prototype of the desire system is
prepared. The development portion or system architecture is done by using
Rapid Application Development (RAD), as on this process the prioritization of
work (MOSCOW principle) also separated with highly important to low
important. Moscow prioritization priorities are set as M- must have requirements
S - Should have if possible, C - Could have but not critical W - Won’t have this
time, but potentially later.
3. Functional model iteration: this model consists of models and functioning
prototype. Mention two things are key techniques within this project or in this
stage. The developed prototype is review again and again. Every review testing
is done. The prototype is improved through demonstrating the clients or the
user of the projects.
4. Design and build iteration: It this phase, focus identifies functional and non-
functional requirements that need to be implement on system and designed it.
Identified the functional requirement which is need to the end user and build
iteration the tested system is handed over to the next phase.
5. Implementation: In this stage, the pre-design system is installing and tested.
According to Goldman and Rawle’s this phase is cited as pilot test where
problems can be determined, corrected and corrections can be made to the
project plan for future works. If end user wants some non-functional
requirement to be added. We can move on development phase to design and
implement the system if possible. End user can easily approve the tested
system for implementation. Further guidelines of end user system can be
modified.

Advantages of DSDM:
1. Provide a technique-independent process.
2. Flexible in terms of requirement evolution.
3. Incorporates stakeholders into the development process.
4. Strict time and budget adherence.
Disadvantage of the DSDM:
1. Focus on RAD can lead to decrease in code robustness
2. Involves progressive development of requirements.
3. Required significant user involvement.
Chapter 3.1.2 Enhanced Waterfall

Waterfall model describes a development method that is linear and sequential. Waterfall
development has distinct goals for each phase of development. On this methodology, once a
phase of development is completed, the development proceeds to the next phase and there is
no turning back. (Rouse, 2007)
Advantages of Waterfall:
1. Process and result are well documented.
2. Works well for small projects and predefined requirement projects.
3. Easy to understand and implement.
4. Process and result are well documented.
Disadvantages of waterfall:
1. It is very difficult to estimate time for each phase of development process.
2. Not a good model for complex and undefined projects which requirement are
at moderate to change.
3. Idealized, doesn’t match reality well
Chapter 3.1.3 Spiral model
The spiral model is like iterative model with more emphases placed on risk analysis. The
development phase of this model is planning, design, build and test phase over and over with
risk analysis. The spiral model is typically used for large projects. A software projects
repeatedly passes through these phases in iterations. The baseline spiral, starting in the planning
phase, requirement is gathered during the planning phase. Risk analysis phase identify risk and
gives alternative solution, along with testing at the end of the phase. The evaluate phase allow
to evaluate the output of the project to date before the projects to the next spiral. (Guru99,
2017)

Advantages:
1. High amount of risk analysis.
2. Good for large and mission-critical projects.
3. Software is produced early in the software life cycle.
Disadvantages:
1. Can be a costly model to use.
2. Risk analysis requires highly specific expertise.
3. Doesn’t work well for smaller projects.
Chapter 3.1.4 Selection of methodology:
To generate a successful working framework on this project different methodology
were discussed. Among them Dynamic System Development Method (DSDM) is feasible,
implementable and easier with extra features of rapid application development (RAD). On my
projects, there is not any fixed approach. It means end products can be change when problem
arrived. On DSDM methodology time is fixed, resource is fixed but requirement is allowed to
change when any problem arise. On waterfall methodology product need to pre-define before
projects start. This project is about IOT projects on “Smart energy meter”. End products can
be change as end user want or problem can arise on hardware components. DSDM method will
be easier than waterfall method on this project.
DSDM method life cycle is divided into 5 phases. They are clearly described above its scope
and areas. It’s enough to clear those boundaries and criteria and also provide the clear-cut
concept of implemented framework or prototype. In my projects all planning and requirements
are cleared but it can be change as required. So, I will follow the step of DSDM methodology
for my project.
Chapter 3.2 Dynamic System Development Method (DSDM)
Planning the project using Dynamic System Development Method (DSDM)
Chapter 3.2.1 MOSCOW prioritization
M - Must have requirements S - Should have if possible, C - Could have but not critical W -
Won’t have this time, but potentially later
Must have should have could have won’t have this time

MO1: user need to SO1: Display the CO1: plot the WO1: display
get information of details information graph of current multiple meter
analog meter of Analog Meter used of certain reading on a same
through the Reading in Arduino days used. display.
message. Serial monitor.
SO2: user also can CO2: Give alert to Wo2: send data of
send message to user to pay current meter reading
get detail of energy or cut the network. through WIFI
meter reading.

Chapter 3.2.2 The Project Plan:


The following documentation contains the comprehensive planning for the constructive
development of the project from commencement till conclusion.

PRM: Project Manager BAD: Business Ambassador


TLD: Team Leader WOF: Workshop Facilitator
BSP: Business Sponsor BUA: Business Analyst
CON: Consultant TEC: Technical Coordinator
SOT: Solution Tester SAN: System Analyst
BUV: Business Visionary
SOD: Solution Developer
Chapter 3.2.3 Work Break Down Structure

NO. Activity Deliverable Start Date End Date Duratio Resource


n
1. Pre Projects- Topic 15/11/201 22/11/201 7 Days
stage selected 8 8
1.a Initial Research 15/11/201 22/11/201 7 Days BUA.BS
8 8 P
2. Project Stage Multiple 23/11/201 16/12/201 24 Days
8 8
2.a Practicability Feasibility 23/11/201 07/12/201 15 Days
research Description 8 8
2.a. Technical Technical 08/12/201 11/12/201 4 Days SAN,
a Analysis Documentatio 8 8 TEC
n
2.a. Financial Cost 12/12/201 13/12/201 2 Days BUA,
b analysis Approximatio 8 8 BUV
n
2.a.c Methodology DSDM 14/12/201 16/12/201 3 Days PRM
Selection 8 8
3. Business Stage Priorities and 17/12/201 29/12/201 14 Days
SRS report 8 8
3.a Identification of 17/12/201 19/12/201 3 Days WOF
scope 8 8
3.b Reflection 20/12/201 21/12/201 2 Days BUV
8 8
3.c Consumer Framework 22/12/201 23/12/201 2 Days WOF
Consultation Paper 8 8
3.d Useful and non- List of 24/12/201 24/12/201 1 Days TEC,
functional requirements 8 8 WOF
prerequisite
instigation
3.e Simplified 25/12/201 26/12/201 2 Days WOF,
workshop 8 8 PRM
3.f Moscow Ranked list 27/12/201 30/12/201 4 Days PRM
prioritization 8 8
4 Time box 1 user need to 1/1/2019 20/2/2019 50 days SOD,
(MO1) get TLD,
information PRM,
of analog SOT,
meter BAD
through the
message
4.a Investigation 1/1/2019 1/7/2019 7 days
4.a.a MO1: prepare Document 1/1/2019 2/1/2019 2 days PRM,
documentation MO1 SOD
4.a. Finalize Virtual 3/1/2019 7/1/2019 5 days TLD,
b prototype simulation of SOD
software
4.b Design and Implement 8/1/2019 17/2/2019 40 days
development the system of
MO1
4.b. MO1: 8/1/2019 10/1/2019 2 days SOD
a categorize
4.b. System Design MO1 11/1/2019 5/2/2019 25 days SOD,
b Development BAD
phase
4.b. Coding in 6/2/2019 15/2/2019 10 days SOD
c Arduino
4.b. Testing Mo1 tested 15/2/2019 17/2/2019 3 days SOT
d
4.c Implementation 18/2/2019 20/2/2019 3 days
4.c. SMS sending 18/2/2019 20/2/2019 3 days
a system design
from GSM to
user
5 Time BOX 2 User also can 21/2/2019 13/3/2019 22 days SOD,
(SO1, SO2) send message TLD,
to get detail PRM,
of energy SOT,
meter BAD
reading.
5.a Investigation 21/2/2019 24/2/2019 4 days
5.a. SO1 & SO2: Document 21/2/2019 22/2/2019 2 days
a documentation SO1 and SO@
5.a. Finalize Virtual 23/2/2019 24/2/2019 2 days PRM,
b prototype simulation of SOD
software
5.b Design and Implement 25/2/2019 10/3/2019 15 days TLD,
development the system of SOD
SO1 and SO2
5.b. SO1 & SO2: 25/2/2019 26/2/2019 2 days
a categorized
5.b. Development Design SO1 27/2/2019 2/3/2019 6 days SOD
b phase and So2
5.b. Coding in 3/3/2019 8/3/2019 6 days SOD,
c Arduino BAD
5.b. Testing SO1 and SO2 15/2/2019 10/2/2019 1 days SOD
d tested
5.c Implementatio 11/3/2019 13/3/2019 3 days SOT
n
5.c. SMS sending 11/3/2019 13/3/2019 3 days
a system design
from GSM to
user
6 Execution 4/3/2019 23/3/2019 20 days
6.a Generate end user can 4/3/2019 8/3/2019 5 days SAN
operator easily operate
guidebook the design
system
6.b Operator Training end 9/3/2019 13/3/2019 5 Days SAN
training use how to use
system
6.c Application 14/3/2019 18/3/2019 5 days SAN,
integration SOD
6.d Corporate Identify end 19/3/2019 20/3/2019 2 days BAD
strategy products result
evaluation
6.e Ultimate Product 21/3/2019 23/3/2019 3 days PRM
delivery system deliver to
client
7 Subsequent 24/3/2019 3/4/2019 10 days
steps
7.a Turnover 24/4/2019 3/4/2019 10 days BAD,
valuation BSP

Chapter 3.2.4 Gant Chart


Chapter 4 Code
Smart energy meter coding is divided into 5 stage which is screenshot is shown in below.
Declaration, setup loop, interrupt function, loop function and sendmessage function. Brief
explanation of each function with screenshot is in below.
Chapter 4.1.1 Declaration
Declaration of software serial library for communciation of arduino and GMS SIM900a.
connection of RX and TX pin of SIM900a with digital pin of arduino with 9 and 10. Which is
decleared in mySerial. Which screenshot is shown in below

Char incomingbyte helps to store incomming SMS in char and used for further communcation
between Arduino and GSM. After storing incomming SMS in char again storing it in string
inputstring. Decelaration of pulse in 2( int pusle = 2) which means connection of analog meter
anode wire in digital pin 2 of arduino. Reason to connect in digital pin 2 is interrupt of arduino
UNO board can be configured only in 2 and 3 pin. When led of analog meter will blink counter
integer will count it and display it in serial monitor of arduino. Integer price will count each
pulse price and display iy in serial monitor of arduno.

Chapter 4.1.2 Setup function


This function will run once when we run the program. PinMode (pulse, INPUT_PULLUP) is
used to setup analog meter LED to digital pin (2) of Arduino. INPUT_PULLUP is used analog
meter LED is given input in Arduino board so pinMode (pulse is declared as input. PULLUP
is used for internal resistor. Arduino UNO has inbuilt resistor so we can setup it as PULLUP.
Interrupt will be activated when its state change. In case of analog meter LED will blink when
load is on. Interrupt can be used to minimize error of pulse reading of analog meter reading.
Attachinterrupt is linked to digitalpin (pulse) where pulse is already declared and setup as
digital pin 2 which is anode wire of LED of analog meter. When its state will fall then it will
call function of interrupt.

Connection of GSM SIM900a with arduino. Myserial is declared as SIM900a and Arduino
connection of decleration portion. While myserial is available then connection will be tested
by using AT command. AT command is used for testing and communcation between arduino
and GSM modem. While testing is true then on Arduino Serial monitor it will display
Connected. “AT+CMGF=1” command is used to set GSM into SMS mode.
“AT+CMGL=\”REC UNREAD\”” command is used to read all unread message.

Chapter 4.1.3 Interrupt function


Interrupt function is called when digital pin pulse (2) change it state.
When state is change function interrupt will be called. In interrupt function condition is applied
LED of analog meter is in low, high state. If LED of analog meter change into LOW state, then
it will count pulse and store value in counter. Simultaneously price of each pulse is calculated.
Display it in serial monitor of Arduino.

Chapter 4.1.4 Loop function


mySerial is declared and setup as GSM communication which is already setup and declare in
above function. It will check if mySerial is available the store the mySerial data in
incomingbyte. Incomingbyte is setup as char when mySerial data is available it will read and
store individual letter and store in inputstring which is also already declare in declare function.

When incoming SMS is stored in string inputstring display it in Serial monitor of Arduino.
Stored inputstring or user SMS is change into uppercase. Checking if inputstring is equal to
“METER” or not if statement is true then sendmessage function is called. “AT+CMGDA”
command is used to delete all SMS of SIM card. SIM card will store only 30 SMS only. If
SMS exceed then it will show error. Storing inputstring into null. Newly SMS will only store
in inputstring.
Chapter 4.1.5 SendMessage function
sendmessage function will be called when inputstring is equal to “METER”

“AT+CMGF=1” command of GSM is used to set GSM in SMS setup mode. AT is used to
check the interaction between arduino and GSM module. “AT+CMGS” is used to set phone
number to send SMS. User will get SMS of (“Dear Customer, Your Meter pulse (current
pulse) and its price (current pulse price”). Information of analog meter reading is shared or
exchange by using SMS service to user. To end function and using ASCII code of char(26)
which is shown in below diagram.
Chapter 5.1 Test Cases
Chapter 5.1.1 Test Case 1

Test Case 01

Objective To test Meter Reading System using Arduino Serial Monitor

Expected Results When Load is given on Analog meter and pulse will
counted and display it in Serial monitor
Actual Results When load is on the pulse of analog meter is started to
count and display it in Serial Monitor of Arduino
Analysis Pulse will count on Serial Monitor of Arduino if LED of
analog meter will blink.
Further Notes (If
any)

Proof: Screen shoot of Pulse Count of analog meter


Chapter 5.1.2 Test Case 2
Test Case 02

Objective To test SMS function on Arduino Serial, monitor whether it


is working or not
Expected Results Communication between Arduino and GSM is carried out
by using AT command. Further configured it in SMS mode.
Actual Results Communication between Arduino and GSM is successful
and CNMI command also work. It is used to set to read
SMS setting.
Analysis Connection between Arduino and GSM is successful using
AT command and further configure GSM and Arduino with
text mode.
Further Notes (If
any)

Proof: Screenshot of AT command used and Text mode setting in


GSM and displaying it in Arduino Serial monitor
Chapter 5.1.3 Test Case 3
Test Case 03

Objective Send SMS from phone and display it in serial monitor using
GSM SIM900a
Expected Results Sending SMS from phone and display it in Serial monitor of
Arduino
Actual Results Arduino display the user input which is SMS.

Analysis Using GSM SIM900a user can send SMS to Arduino board
and display it in Serial monitor
Further Notes (If
any)

Proof: Screenshot of phone SMS and Serial monitor SMS


Chapter 5.1.4 Test Case 4
Test Case 04

Objective Sending SMS on Initial stage of analog meter reading

Expected Results User need to send SMS to Smart meter and it will again
send SMS to user about the current information of user. In
initial stage meter reading and price will be zero.
Actual Results Information of Smart meter is sent to user when user send
SMS to smart meter.
Analysis

Further Notes (If


any)

Proof: Screenshot of SMS from User phone and analog meter


reading on Serial monitor of Arduino.
Chapter 5.1.5 Test Case 5
Test Case 05

Objective Testing of Analog meter reading when load is given to the


system.
Expected Results When load is on then it will display pulse and price details
on Arduino serial monitor. If user send SMS, then send
information of analog meter reading.
Actual Results It will continually count pulse of analog meter reading and if
user send Valid SMS then it will display information of
meter reading.
Analysis Display of analog meter reading on Arduino serial monitor
and provide information (i.e. pulse reading, price details) to
user. If user SMS is correct
Further Notes (If
any)

Proof: Screenshots of meter reading and user SMS. If user SMS


is verified, then meter reading current status information is
SMS to user phone.

You might also like