0% found this document useful (0 votes)
153 views58 pages

IoT-Based Energy Meter Automation

The document presents a project on automating energy meter readings through IoT, utilizing NodeMCU and ESP8266 to collect and transmit data to a web application for real-time monitoring. This system aims to eliminate the manual reading process and streamline billing, allowing users to track their electricity consumption conveniently. The project is submitted as part of the requirements for a B.E. in Information Technology at St. Francis Institute of Technology.

Uploaded by

Vinoth ROYAL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views58 pages

IoT-Based Energy Meter Automation

The document presents a project on automating energy meter readings through IoT, utilizing NodeMCU and ESP8266 to collect and transmit data to a web application for real-time monitoring. This system aims to eliminate the manual reading process and streamline billing, allowing users to track their electricity consumption conveniently. The project is submitted as part of the requirements for a B.E. in Information Technology at St. Francis Institute of Technology.

Uploaded by

Vinoth ROYAL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

ENERGY METER READING

THROUGH IOT

Submitted in partial fulfillment of the requirements

of the degree of

B. E. Information Technology

By

Clive Rodrigues 141092

Utsav Shah 141078

Viral Shah 141051

Kaushal Sharma 141075

Supervisor:

Ms. Priyanca Gonsalves

Assistant Professor

Department of Information Technology

St. Francis Institute of Technology (Engineering

College) University of Mumbai

2017-2018
Powered by TCPD F (www.tcpd f.org )
Abstract
At present, most of the houses in India have the traditional mechanical watt hours meter and the billing
system is not automated. At the end of each month, an employee, of the power supplier company you are using
of, come to your house to take the energy meter reading and provide you the necessary bill via post. Then to
pay the bill again you have to create a demand draft and send it via post. Being such a bland and lengthy
process, we have decided to automate it. An NodeMCU is connected to the user’s energy meter which would
collect this data recorded by the energy meter and convert it to respective currency. Then a Wi-Fi module
(ESP8266) in built into the NodeMCU sends this data to a web application. On the web application user can
see his real time consumption and visualizations. So, we have eliminated the manual energy meter reading.
Now, instead of monthly usage bill the users can track their electricity usage practically anytime and anywhere.

Keywords:- Internet of Things, Energy meter, NodeMCU, ESP8266.

iv
Contents

Contents v

List of Figures vii

List of Tables viii

1 Introduction 1
1.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Problem Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Proposed Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.5 Scope of the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Review of Literature 3

3 System Analysis 6
3.1 Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 Non Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3 Specific Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3.1 Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3.2 Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.4 Use Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4 Analysis Modeling 9
4.1 Data Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2 Functional Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2.1 Level 0 DFD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2.2 Level 1 DFD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2.3 Level 2 DFD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.3 Timeline Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5 Design 17
5.1 Architectural Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2 User Interface Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

6 Implementation 24
6.1 Working of Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.1.1 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

v
CONTENTS

7 Testing 36
7.1 Test Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
7.2 Type of Testing used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

8 Results and Discussions 39


8.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.2 Discussions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

9 Conclusion and Future Scope 42


9.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9.2 Future Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

Appendix 43

Bibliography 46
List of Figures

3.1 Use-Case Diagram for Energy Meter Reading Through IoT . . . . . . . . . . . . . 8

4.1 Activity Diagram for Login for Energy Meter Reading Through IoT . . . . . . . . 9
4.2 Activity Diagram for Computing Cost for Energy Meter Reading Through IoT . . 10
4.3 DFD level 0 for Energy Meter Reading Through IoT . . . . . . . . . . . . . . . . 11
4.4 Level 1 DFD for Energy Meter Reading Through IoT . . . . . . . . . . . . . . . . 12
4.5 DFD Level 2 for Login in Energy Meter Reading Through IoT. . . . . . . . . . . . 13
4.6 DFD Level 2 for Fetching Data in Energy Meter Reading Through IoT. . . . . . . 14
4.7 DFD Level 2 for Recording Data in Energy Meter Reading Through IoT. . . . . . . 15
4.8 Timeline Chart for Energy Meter Reading Through IoT . . . . . . . . . . . . . . . 16

5.1 Block Diagram for Energy Meter Reading Through IoT . . . . . . . . . . . . . . 17


5.2 User/Admin-Login Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.3 Admin-Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.4 User-Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.5 Admin-User Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.6 User-Live Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.7 User-Previous Monthly Energy Consumption . . . . . . . . . . . . . . . . . . . . 22
5.8 User-Generating and Downloading Bill . . . . . . . . . . . . . . . . . . . . . . . 22
5.9 User-Generated Bill in PDF format . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.10 Admin-Deactivate User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

8.1 Electric Energy Consumption for a User read in a text file . . . . . . . . . . . . . . 40


8.2 Usage for Month January for a User in graphical format . . . . . . . . . . . . . . . 41
8.3 Generated Bill for Month of January for a User . . . . . . . . . . . . . . . . . . . 41

9.1 NodeMCU -ESP -E12 Pin Diagram . . . . . . . . . . . . . . . . . . . . . . . . . 43


9.2 ESP8266 Pin Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

vii
List of Tables

2.1 Summary of Cited Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

7.1 Test cases: Admin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36


7.2 Test cases: Live Tracking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.3 Test Cases: User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

9.1 NodeMCU Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44


Chapter 1
Introduction

In this new era of Internet of Things (IoT), we can connect the physical world to the internet. Physical world
means literally everything like machines and appliances, which are used in our jobs and at homes, etc. The
things or objects can be changed into smart things by giving it unique identity in the world. The objects can
share information and communicate with each other through web. We can analyze and control the objects
anytime, anywhere from the corner of the world. Internet has become an important part of our lives. A new
technology has entered into this picture known as IoT. Smart Meter is one of the applications of IoT. It records
the consumption and sends the readings to the utility office on regular basis for monitoring and billing.

1.1 Description
Monitoring and keeping tracking of your electricity consumption for verification is a tedious task today since
you need to go to meter reading room and take down readings. Well it is important to know if you are charged
accordingly so the need is quite certain. Well we automate the system by allowing users to monitor energy
meter readings over the internet. Our proposed system uses energy meter with microcontroller system to
monitor energy usage using a meter. The meter is used to monitor units consumed and transmit the units as
well as cost charged over the internet using Wi-Fi connection. This allows user to easily check the energy
usage along with the cost charged online using a simple web application. Thus, the energy meter monitoring
system allows user to effectively monitor electricity meter readings and check the billing online with ease.

1.2 Problem Formulation


At present, most of the houses in India have the traditional mechanical watt-hour meters and the billing system
is not automated.This results in introduction of human errors and mistakes as most
CHAPTER 1. INTRODUCTION

of the work is done manually.These meter readings are used for electricity bill calculation and this bill
sent to consumer house by post. Customer goes to electricity department for paying this bill amount.
However, in this technique, we are required great number of persons for reading the meters. The
procedures of sending the bills to customer are very laborious and cumbersome.

1.3 Motivation
When tracking the meter readings, a person from the respective company comes to collects the
readings from the meter. Then the person returns and posts the user a detailed analysis of your energy
consumption. Then the user have to post a demand draft/cheque to pay his/her balance. This is very
lengthy and tedious task. What we have done is automated this whole process so that it is feasible for
both the company and the customer.

1.4 Proposed Solution


Our proposed system uses NodeMCU which has an ACS712 current sensor connected to it. The
NodeMCU collects the data from the current sensor and sends this data to a web application with the
help of ESP8266 Wi-Fi module built onto it. The web application will display the data to the user in
real-time and provide with additional features which would further enhance the systems functionality.
This will provide the user with consolidated data which will help the user visualize his/her account in
an efficient manner.

1.5 Scope of the Project


The NodeMCU has a current sensor connected to it. The NodeMCU collects the current sen-sors reading and
with the help of the built-in ESP8266 Wi-Fi module sends it to a web appli-cation.The client can view this real
time data and also calculate if there is over consumption of electricity.However there are certain limitations
attached to it.For demonstration purposes using a smart enegy meter is not practically feasible as it requires a
heavy amount of load to show minor changes in readings,hence a current sensor.Another limitation is of the
range of the Wi-Fi(15m).The collected datais sent through it to a web application.It can be used for automatic
power reading by which one can optimize their power usage thereby reducing the power wastage.

2
Chapter 2
Review of Literature

Table 2.1: Summary of Cited Literature


Paper Topic Methodology Conclusion
No.
1. Introduction To Electric utilities use electric Mechanical and Automatic
Electric Meter[1] meters installed at customers’ meter were studied in detail.
premises to measure electric Automatic meter here holds an
energy delivered to their advantage over mechanical
customers for billing purposes meter
2. Watt-hour Meter Used for the purpose of Watt-hour meter has higher
Reading Device for electronic billing but consists of accuracy( less than 0.1% failure
Electric Energy four sections(communication, reading based on the code).It
allowance[2] buttons, power supply, display) gives error correction software
3. Electronic Energy It explains how to connect micro Electronic Energy Meter
Meter With Instant controller with an energy meter enables automation. Reduces
Billing[3] and setting up an instant billing human error due to absence of
messages using GSM module human interaction and higher
security.
4. Cloud Computing Basic introduction to Cloud Cloud computing provides a
in a proposed Computing and its various terms selection of various graphs,
system[4] (IaaS, PaaS, SaaS). charts, structures based on the
data over cloud applications for
analysis papers
5. Design and Use of ZigBee and GSM Hence, ZigBee provides a more
implementation of module to make Energy meters secure way for theft detection
smart energy meter more secure by alarming when and makes the application more
using ZigBee.[5] theft of energy is detected. secure.

Preethi, V. et al. in their paper shows how smart meter are made so there is no theft of energy and instant bill
payment by using ZigBee and GSM.SEM is an electric device having energy meter chip for measuring the
electric energy consumed and a wireless protocol for data communication.Inthis meter energy utilized and the
corresponding amount will be displayed on the LCD continuously and communicated to the controlling base
station. The feedback from the user helps in identifying
CHAPTER 2. REVIEW OF LITERATURE

the usages between authorized and unauthorized users, which helps in controlling the power theft.
Communication between user/household and substation is done using ZigBee. GSM network is used
for sending SMS to the local authorities regarding the theft cases [1].

The authors Ji.Xiaohan et al.displays us and explains us a detailed explanation of watt-hourmeters, which are
currently widely used, and some of its main parts are given below. The system is divided into four parts: The
main function of the Display section is to provide the man-machine interface, display the data, and error
messages. About the error messages, mainly include electric meter fault display and communication line fault
display. Communication party is responsible for sending or-ders to watt-hour meter and reading the data of
watt-hour meter. Communication module interface should pay attention to in isolation prevent electrostatic, the
surge of port and CPU damage. It can use the combination of optical coupling and TVS can use integrated
isolation devices. The key part provides users with a man-machine interface channels. The power supply of the
device is a switch power supply, which turns 220V to 5V. In addition, considering the security, 220V AC is
drained from the origin port. It also gives the software used and the program used for error correction [2].

Also Vivek Kumar et al. in their paper focuses on how you should connect micro controller with energy
meter and how to set up an instant billing messaging service by using GSM module. The basic working is
as follows: It is just like postpaid mobile connection. A GSM modem is connected to the energy meter.
Each modem will be having its own sim (usual mobile phone sim). A PC is connected to other modem,
which contains the database. The module is designed such that user can have the complete usage details
about the energy meter just like postpaidmobile connections, one can know our due bill instantly and can
even pay for it. The SIM card used is implemented in energy meter and it sends a message to the user
about the due bill. A LCD is used in the hardware module for the user interface. The LCD displays the
current usage and units consumed. After the usage of each unit the amount and total units will be,
incremented whenever user wants to know his/her bill he/she can message a given code to sim card
attached to the meter and can know his/her present bill [3].

The basics of cloud computing was understood in this paper by Moonis and Syed Mohd. It gives
us basic definition, types, pros and cons and future scope. It defines deployment models for cloud
computing SaaS, IaaS and PaaS and mentions their advantages and disadvantages. Describes
types of clouds i.e. public, private, community and hybrid [4].

Georgakopoulos, Dimitrios, et al. describes how IoT and Cloud Computing will go hand in hand in future and
current devices. It gives us basic idea of how Smart plants will be built on these two technologies. Describes
the business values and the effects and profits of using these technologies together. It shows us a roadmap how
different companies already have started using these and the profits made by them in combining these two
sectors. It gives various reasons why IoT should be
4
brought in manufacturing plants and what new opportunities are there for IoT in this industry
and the impact it can bring to the world [5].

5
Chapter 3
System Analysis

3.1 Functional Requirements


The system requires the user to log in to the cloud interface which receives the data from
the microcontroller

The system maintains all the received data on the cloud

Anytime the user requests/wants to view the consumption the cloud provides the user with
various visualizations options

3.2 Non Functional Requirements


Acceptable – Verified as meeting the mentioned objectives

Accessible – Accessible across various devices and

platforms Availability – 24 x 7 x 365

Capacity and scalability – Data processing and concurrent user

capacities Verifiable – System and process controls

Maintainability – Configuration and content management

Modifiable & Extensible – Ease and cost effective to make ongoing

changes Reliable – Consistent and dependable quality of service


3.3. SPECIFIC REQUIREMENTS

3.3 Specific Requirements

3.3.1 Hardware Requirements


ACS712 Current Sensor/Energy

Meter NodeMCU ESP-12E

ESP8266 (built onto

NodeMCU) Resistors

3.3.2 Software Requirements


Arduino IDE

Embedded C

Eclipse IDE

Apache Tomcat 7

7
CHAPTER 3. SYSTEM ANALYSIS

3.4 Use Case

Figure 3.1: Use-Case Diagram for Energy Meter Reading Through IoT

Description: As shown in the above Figure 3.1, it shows the various actors involved in the project.
Each actor has a role to play which are defined in the form of use cases. The user can login to the
interface to view his consumption and the corresponding cost. The admin fetches data from the
device, records the data, and uploads the data on the web application. The IoT system device gets the
data from the energy meter, computes cost for the units consumed, and displays the data on the LED
screen as well as on the cloud service.
Chapter 4
Analysis Modeling

4.1 Data Modeling

Figure 4.1: Activity Diagram for Login for Energy Meter Reading Through IoT

Description: The above Figure 4.1, shows the sequence of activities that is to be executed by various actors and
denotes the flow of operations of each actor that is involved in the system in order to develop the desired
system successfully. The user provides login details and is authenticated
CHAPTER 4. ANALYSIS MODELING

against it. If authenticated successfully, he/she is allowed to view the data and the cost as well as the
bill. If authentication is unsuccessful then the invalid counter is incremented by one. Once he is
satisfied with the results, he/she can logout of the interface .

Figure 4.2: Activity Diagram for Computing Cost for Energy Meter Reading Through IoT

Description: The above Figure 4.2, shows the sequence of activities that is to be executed to
compute the total cost of the consumption. Readings from the meter are read and is multiplied
with the cost of one unit of kiloWatts(kW).

10
4.2. FUNCTIONAL MODELING

4.2 Functional Modeling


4.2.1 Level 0 DFD

Figure 4.3: DFD level 0 for Energy Meter Reading Through IoT

Description: The above Figure 4.3, is a context diagram of the system, it is a basic overview of
the whole system or process being analyzed or modeled. It’s designed to show the system as a
single high-level process, with its relationship to external entities.
CHAPTER 4. ANALYSIS MODELING

4.2.2 Level 1 DFD

Figure 4.4: Level 1 DFD for Energy Meter Reading Through IoT

Description: The above Figure 4.4, shows the DFD Level 1 diagram of our system. This diagram provides
a more detailed breakout of pieces of the context level diagram. This diagram provides much more details
into the functioning of our system and what each process performs.
4.2. FUNCTIONAL MODELING

4.2.3 Level 2 DFD

Figure 4.5: DFD Level 2 for Login in Energy Meter Reading Through IoT.

Description: The above Figure 4.5, is a DFD Level 2 diagram that goes one step deeper into parts
of Level 1 and displays the details of various processes by dividing each process into multiple
sub-processes. The following diagrams lays out the steps of user being authenticated to access the
cloud database.
CHAPTER 4. ANALYSIS MODELING

Figure 4.6: DFD Level 2 for Fetching Data in Energy Meter Reading Through IoT.

Description: The above Figure 4.6, is DFD Level 2 diagram that details about how the data is fetched
from the microcontroller, how the unit is converted to cost and put up to the cloud, and how user can
access this data and verify his usage by checking on the cloud.
4.2. FUNCTIONAL MODELING

Figure 4.7: DFD Level 2 for Recording Data in Energy Meter Reading Through IoT.

Description: The above Figure 4.7, is DFD Level 2 diagram which explains how the data is
stored and how the user can check his bill on the cloud interface/web application.
CHAPTER 4. ANALYSIS MODELING

4.3 Timeline Chart

Figure 4.8: Timeline Chart for Energy Meter Reading Through IoT
Chapter 5

Design

5.1 Architectural Design

Figure 5.1: Block Diagram for Energy Meter Reading Through IoT
CHAPTER 5. DESIGN

Description: The following are the various ways through which electric energy can be generated:

1. Heat/Thermal Energy

(a) Fossil Fuels


i. Coal
ii. Petroleum
iii. Natural Gas
(b) Solar Thermal Energy
(c) Geothermal Energy
(d) Nuclear Energy

2. Hydroelectricity (Water free falling on turbines)

3. Wind Energy (Wind rotating blades of Windmill)

4. Solar Energy (Photovoltaic cells)

5. Chemical Energy

(a) Fuel Cells


(b) Batteries

Relay Switch - The companies have a relay switch which is operated by an electromagnet. It takes a
small input current and is in turn able to power in appliances requiring large input currents. A relay
switch can be thought of an electric lever which switches on with a small electric current and it
switches on appliances using large electric current. Thus relay not only work as switches (on/off) but
can also work as amplifiers. These companies transfer and monitor the electricity reaching to our
home [8].

Energy Meter& Load - The power line inbounds from the company to our home first goes through an energy
meter. An energy meter is a device that measures the amount of electricity consumed by our house. Therefore
in this case our house becomes the Load. Energy meter are connected at customer’s premises for billing
purposes. Energy meter typically use the unit of consumption - kilowatt hour (kWh) and display it over its
exterior body either by dials or by LED/LCD screen. Over the course of time there have been different kinds of
energy meter invented [9].

NodeMCU and ESP8266 - The readings from the energy meter are sent over to the NodeMCU.
NodeMCU is an Open Source Firmware Development Board that helps you to build your IoT projects
with a few LUA Script Lines, NodeMCU it is like Arduino Hardware with a Input Output built in the
Board itself, it has also a Wifi built in to connect directly to internet to control your things online using
Nodejs Style network API for digital network applications, which facilitates
18
5.2. USER INTERFACE DESIGN

developers to code running on the Board, Greatly speed up your Internet of Things application
development process. The Development Board base on ESP8266 Chip, integrated GPIO(General
Purpose Input Output), PWM(Pulse with Modulation),IIC(Interconnected Integrated Circuit), 1-
Wire and ADC all in one board to power up your development board in fastest way combined with
the NodeMCU Firmware.Powered by a remote power supply. The NodeMCU is responsible for
conversion of the electricity units i.e. kWh in to respective currency which would be rupees. Web
application - A custom web application catering to the user that allows him to see his real time
consumption and also allowing to see various visualizations.

ACS712 Current Sensor: The ACS712 current sensor records the voltage used across the load
and passes this value to the NodeMCU.

Database and Personal Computer: The NodeMCU is connected to the personal computer of the user
where the data of the NodeMCU is stored in a database. Using the personal computer the user
connects to the web application where he can login to see his/her real time consumption, his/her
monthly usage, and he/she can generate their own bill. The admin can login to add new users,
deactivate existing users, and generate bill numbers.

5.2 User Interface Design

Figure 5.2: User/Admin-Login Page

Description: The above Figure 5.2, shows the Login page that allows the Administrator/user to
login and manage his/her data and account.
CHAPTER 5. DESIGN

Figure 5.3: Admin-Dashboard

Description: The above Figure 5.3, shows Admin Dashboard that is the main page where the
Admin can either add a user or deactivate a user and assign billing number.

Figure 5.4: User-Dashboard

Description: The above Figure 5.4, shows the User dashboard through which the user can track
his/her usage in real time and also view/download his/her bill.
5.2. USER INTERFACE DESIGN

Figure 5.5: Admin-User Registration

Description: The above Figure 5.5, shows User Registration page that allows the Admin to add a
new user.

Figure 5.6: User-Live Tracking

Description: The above Figure 5.6, shows the graphical visualization in real time of the
electric enrgy consumed by the user in the specified interval.
CHAPTER 5. DESIGN

Figure 5.7: User-Previous Monthly Energy Consumption

Descripton: The above Figure 5.7, shows the previous month’s electric energy consumption in
units for a particular User.

Figure 5.8: User-Generating and Downloading Bill

Description: The above Figure 5.8, shows the user the bills for every month and the User can
view the bill by downloading it in PDF format.
5.2. USER INTERFACE DESIGN

Figure 5.9: User-Generated Bill in PDF format

Description: The above Figure 5.9, shows the generated bill for a specified User for the month of
January 2018.

Figure 5.10: Admin-Deactivate User

Description: The above Figure 5.10, shows the Admin privilege of deactivating any User if
he/she fails to adhere to the guidelines mentioned by the Admin.
Chapter 6
Implementation

6.1 Working of Project


6.1.1 Code
Hardware Code:
nodemcu_v_2.ino
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
// Replace with your network credentials
const char* ssid = "lenovo k4";
const char* password = "123456789";
ESP8266WebServer server(80); //instantiate server at port 80 (http
port) String page = "";
float Voltage;
float AcsValue=0.0,Samples=0.0,AvgAcs=0.0,AcsValueF=0.0; void
setup(void){
pinMode(A0, INPUT);
delay(1000);
Serial.begin(115200);
WiFi.begin(ssid, password); //begin WiFi
connection Serial.println("");
// Wait for connection
while (WiFi.status() != WL CONNECTED)
{ delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
server.on("/", [](){
6.1. WORKING OF PROJECT

page = "<head><meta http-equiv=’refresh’ content=’2’></head><h1>Sensor to Node MCU Web


Server</h1><h3>Voltage:</h3>
<h4>"+String(Voltage)+"</h4><h3>Current:</h3> <h4>"+String(-AcsValueF)+"</h4>";
server.send(200, "text/html", page);
});
server.begin();
Serial.println("Web server started!");
}
void loop(void){
unsigned int x=0;
Voltage = 0;
Samples = 0;
AcsValue = 0;
AvgAcs = 0;
for (int x = 0; x < 150; x++){ //Get 150 samples
AcsValue = analogRead(A0) - 50; //Read current sensor
values Samples = Samples + AcsValue; //Add samples
together delay (3); // let ADC settle before next sample 3ms }
AvgAcs=Samples/150.0;//Taking Average of Samples
Voltage = (AvgAcs * (5 / 1024.0)); //is converitng the read voltage in 0-5 volts
//2.5 is offset(I assumed that arduino is working on 5v so the viout at no current comes
//out to be 2.5 which is out offset. If your arduino is working on different voltage than
//you must change the offset according to the input voltage)
//0.185v(185mV) is rise in output voltage when 1A current flows at
input AcsValueF = ((2.5 - Voltage )/0.185); Serial.print("2");

Serial.print("|");
Serial.print(Voltage);
Serial.print("|");
Serial.print(-AcsValueF);//Print the read current on Serial monitor
Serial.println("");
delay(500);
server.handleClient();
}
Software Code:
Livetrackinging.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
25
CHAPTER 6. IMPLEMENTATION

<meta name="viewport" content="width=device-width, initial-


scale=1"> <meta name="description" content=""> <meta
name="author" content="">
<title>My Tracking</title>
<!-- Bootstrap Core CSS -->
<link href="${pageContext.request.contextPath}/resources/bower_components
/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> <!-- Custom CSS -->
<link href="${pageContext.request.contextPath}/resources/bower_components
/bootstrap/dist/css/modern-business.css" rel="stylesheet"> <!-- Custom Fonts -->

<link href="${pageContext.request.contextPath}/resources/bower_components
/bootstrap/dist/font-awesome/css/font-awesome.min.css" rel="stylesheet"
type="text/css"> <!-- jQuery -->
<script src="${pageContext.request.contextPath}/resources/bower_components
/bootstrap/dist/js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="${pageContext.request.contextPath}/resources/bower_components
/bootstrap/dist/js/bootstrap.min.js"></script> <script>
window.onload = function () {
var dps = []; // dataPoints
var chart = new CanvasJS.Chart("chartContainer",
{ title :{
text: "My Consumption"
},
axisY: {
includeZero: false
},
data: [{
type: "line",
dataPoints: dps
}]
});
var xVal = 0;
var yVal = 0;
var updateInterval = 10000;
var dataLength = 20; // number of dataPoints visible at any
point var updateChart = function (count) { count = count || 1;
console.log("count"+count);
$.ajax({
type: "post",
url: "livedata",
contentType: "application/json",
datatype: "json",
success: function (data) {
26
6.1. WORKING OF PROJECT

console.log("data"+data);
$.each(data,function(i,v){
console.log("index "+i +"value"+v);
yVal= v;
dps.push({
x: new Date(),
y: yVal
});
xVal++;
console.log("index "+i +"value"+v);
});
if (dps.length > dataLength) {
dps.shift();
}
chart.render();
}
});
};
updateChart(dataLength);
setInterval(function(){
console.log("called");
updateChart()}, updateInterval);
}
</script>
</head>
<!-- Page Content -->
<div class="container">
<!-- Page Heading/Breadcrumbs -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Welcome,
<small></small>
</h1>
<ol class="breadcrumb">
<li><a href="dashboard.html">Home</a>
</li>
<li class="active">Live Tracking</li>
</ol>
</div>
</div>
<!-- /.row -->
<!-- Content Row -->
<div class="row">
<!-- Sidebar Column -->
<!-- Content Column -->
<div class="col-md-12">
<div id="chartContainer" style="height: 370px; max-width: 920px; margin: 0px auto;"></div>

27
CHAPTER 6. IMPLEMENTATION

<script src="${pageContext.request.contextPath}/resources/js/canvasjs.min.js"></script>
</div>
</div>
<!-- /.row -->
<hr>
</div>
<!-- /.container -->
<!-- Script to Activate the Carousel -->
<script>
$(’.carousel’).carousel({
interval: 5000 //changes the speed
})
</script>
</html>
BillGenerationService.java
package com.billtracker.service;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import
org.springframework.scheduling.annotation.Scheduled; import
org.springframework.stereotype.Service;
import com.billtracker.dao.RefMasterMaintainDAOImpl;
import com.billtracker.model.MonthlyBillingUsage; import
com.billtracker.model.User;
import com.billtracker.util.ApplicationConstantsUtil;
@Service
public class BillGenerationService {
@SuppressWarnings("rawtypes")
@Autowired
private RefMasterMaintainDAOImpl
refMasterMaintainDAOImpl; @Autowired
private UserService userservice;
@Scheduled(cron="0 10 16 * * *")
public void generateBill()
{
Calendar c = Calendar.getInstance();
int date = c.get(Calendar.DATE);
if(date==1)
{
List<User> userList = userservice.getuserlist();
if(userList!=null && userList.size()>0)
{
6.1. WORKING OF PROJECT

for(User u:userList)
{
User user = u;
if(u.getIsEnabled())
{
try {
this.calculateBillAmount(user);
} catch (ParseException e) {
// TODO Auto-generated catch
block e.printStackTrace();
}
}
}
}
}
}
@Scheduled(cron="0 17 16 * * *")
public void sendnotification(){
List<User> userList = userservice.getuserlist();
if(userList!=null && userList.size()>0)
{
for(User u:userList)
{
User user = u;
if(u.getIsEnabled())
{
try {
EmailService.sendEmaill("YOUR BILL Has Been Genereated", "BIll Notification",
u.getEmailId()); } catch (Exception e) {
// TODO Auto-generated catch
block e.printStackTrace();
}
}
}
}
}
private void calculateBillAmount(User user) throws ParseException
{ DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
Calendar gc = new GregorianCalendar(); Calendar c =
Calendar.getInstance();
int month
=c.get(Calendar.MONTH); int year =
c.get(Calendar.YEAR); String
monthName =""; if(month==0)
{
monthName= "December";
}
CHAPTER 6. IMPLEMENTATION

else
{
monthName= ApplicationConstantsUtil.MONTH_LIST[month-1];
}
gc.set(Calendar.MONTH, month-1);
gc.set(Calendar.DAY_OF_MONTH, 1);
String monthStart = df.format(gc.getTime());
gc.add(Calendar.MONTH, 1);
gc.add(Calendar.DAY_OF_MONTH, -1);
String monthEnd = df.format(gc.getTime());
Date startDate =df.parse(monthStart);
Date endDate = df.parse(monthEnd);
List<Double> consumedList = refMasterMaintainDAOImpl.calculateConsumptionUnit(startDate,
endDate, user.getUserId());
double sum = 0d;
if(null!=consumedList && consumedList.size()>0)
{
for(Double d : consumedList)
{
sum = sum +d;
}
}
Double price = sum*ApplicationConstantsUtil.UNIT PRICE;
//Add taxes to price if required
MonthlyBillingUsage b = new MonthlyBillingUsage();
b.setMonth(monthName);
b.setPrice(price);
b.setUnitconsumed(sum);
b.setYear(String.valueOf(year));
b.setUserId(user.getUserId());
try {
refMasterMaintainDAOImpl.create(b);
} catch (Exception e) {
// TODO Auto-generated catch
block e.printStackTrace();
}
}
}
FileReaderService.java package
com.billtracker.service; import
java.io.BufferedReader; import
java.io.FileReader; import
java.io.IOException; import
java.util.Date;
import org.springframework.beans.factory.
annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
6.1. WORKING OF PROJECT

import org.springframework.stereotype.Service;
import com.billtracker.dao.RefMasterMaintainDAOImpl;
import com.billtracker.model.UsageDetails;
import com.billtracker.util.ApplicationConstantsUtil;
@Service
public class FileReaderService {
@SuppressWarnings("rawtypes")
@Autowired
private RefMasterMaintainDAOImpl refMasterMaintainDAOImpl;
private static Integer count =0;
@Autowired
private LineCountService lineCountService;
@Scheduled(fixedDelay=60000)
public void readFileFromTextFile()
{
System.out.println("Service Called
Successfully"); count++;
if(count % 2 == 0)
{
BufferedReader reader;
try {
reader = new BufferedReader(new FileReader(
ApplicationConstantsUtil.TXT_FILE));
String line = reader.readLine();
int count =lineCountService.getLineCount();
int readcount = 0;
while (line != null) {
readcount++; if(!
(readcount <= count))
{
String data[] = line.split("\\|");
if(data!=null && data.length == 3)
{
int userid = Integer.parseInt(data[0]);
//Hardcoding for user id as id is not coming from
file //int userid = 2;
Double current = Double.parseDouble(data[2]);
if(current<0)
{
current = current * -1;
}
Double voltage = Double.parseDouble(data[1]);
//reomve this block for voltage range
if(voltage < 2.5)
{
voltage = 0d;
}
CHAPTER 6. IMPLEMENTATION

this.addusage(userid,current,voltage);
}
else
{
System.out.println("Skipping line"+ line);
}
}
line = reader.readLine();
}
reader.close();
try {
lineCountService.updateCount(readcount);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace(); System.out.println("Failed
to update count");
}
} catch (IOException e)
{ e.printStackTrace();
}
}
}
private void addusage(int userid, Double current, Double voltage) {
// TODO Auto-generated method stub
UsageDetails u = new UsageDetails();
u.setCurrent(current);
u.setUsageDate(new Date());
u.setUserId(userid);
u.setVoltage(voltage);
u.setConsumedunit(current*voltage);
try {
refMasterMaintainDAOImpl.create(u);
} catch (Exception e) {
// TODO Auto-generated catch
block e.printStackTrace();
}
}
}
deactivateuser.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-
1" pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"
%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4
.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
6.1. WORKING OF PROJECT

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-
scale=1"> <meta name="description" content=""> <meta
name="author" content="">
<title>My Invoice</title>
<!-- Bootstrap Core CSS -->
<link href="${pageContext.request.contextPath}/resources/bower_component
s/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> <!-- Custom CSS -->

<link href="${pageContext.request.contextPath}/resources/bower_components
/bootstrap/dist/css/modern-business.css" rel="stylesheet"> <!-- Custom Fonts -->

<link href="${pageContext.request.contextPath}/resources/bower_components
/bootstrap/dist/font-awesome/css/font-awesome.min.css" rel="stylesheet"
type="text/css"> <!-- jQuery -->
<script src="${pageContext.request.contextPath}/resources
/bower_components/bootstrap/dist/js/jquery.js"></script> <!--
Bootstrap Core JavaScript -->
<script src="${pageContext.request.contextPath}/resources
/bower_components/bootstrap/dist/js/bootstrap.min.js"></script> <script src="$
{pageContext.request.contextPath}/resources
/bower_components/raphael/raphael-min.js"></script>
<script src="${pageContext.request.contextPath}/
/bower_components/morrisjs/morris.min.js"></script> <script src="$
{pageContext.request.contextPath}/resources
/js/resultanalysis.js"></script>
<link href="${pageContext.request.contextPath}/resources
/bower_components/morrisjs/morris.css" rel="stylesheet"> <script
src="${pageContext.request.contextPath}/resources
/bower_components/flot/excanvas.min.js"></script> <script src="$
{pageContext.request.contextPath}/resources
/bower_components/flot/jquery.flot.js"></script>
<script src="${pageContext.request.contextPath}/resources
/bower_components/flot/jquery.flot.pie.js"></script> <script src="$
{pageContext.request.contextPath}/resources
/bower_components/flot/jquery.flot.resize.js"></script> <script
src="${pageContext.request.contextPath}/resources
/bower_components/flot/jquery.flot.time.js"></script> <script src="$
{pageContext.request.contextPath}/resource
s/bower_components/flot.tooltip/js/jquery.flot.tooltip.min.js"></script> <!--
DataTables CSS -->
<link href="${pageContext.request.contextPath}/resources/
bower_components/datatables-plugins/integration/bootstra
p/3/dataTables.bootstrap.css" rel="stylesheet"> <!-- DataTables
Responsive CSS -->
<link href="${pageContext.request.contextPath}/resources/
CHAPTER 6. IMPLEMENTATION

bower_components/datatables-responsive/css/dataTables.re
sponsive.css" rel="stylesheet">
<script src="${pageContext.request.contextPath}/resource
s/bower_components/datatables/media/js/jquery.dataTables.min.js"></script> <script src="$
{pageContext.request.contextPath}/resources /bower_components/datatables- plugins/integration/bootstrap
/3/dataTables.bootstrap.min.js"></script> </head>
<!-- Page Content -->
<div class="container">
<!-- Page Heading/Breadcrumbs -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Welcome,
<small></small>
</h1>
<ol class="breadcrumb">
<li><a href="dashboard.html">Home</a>
</li>
<li class="active">Deactivate User!!</li>
</ol>
</div>
</div>
<!-- /.row -->
<!-- Content Row -->
<div class="row">
<!-- Sidebar Column -->
<!-- Content Column -->
<div class="col-md-12">
<div class="panel panel-primary">
<div class="panel-heading">
All User
</div>
<div class="panel-body">
<div class="col-md-1"></div>
<div class="col-md-10">
<div class="row">
<c:if test="${fn:length(message) > 0 }">
<div class="alert alert-danger" id ="message">
${message }
</div>
</c:if>
</div>
<div class="row">
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover"
id="usertable"> <thead>
34
6.1. WORKING OF PROJECT

<tr>
<th>Id</th>
<th>First Name</th>
<th>Last Name</th>
<th>User Name</th>
<th>Action</th>
</tr>
</thead>
<c:forEach items="${userlist}" var="u">
<tr>
<td>${u.userId }</td>
<td>${u.firstName }</td>
<td>${u.lastName }</td>
<td>${u.userName }</td>
<td><a href="disableuser.html?userId=${u.userId }" >Deactivate</a></td>
</tr>
</c:forEach>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.row -->
<hr>
</div>
<script>
/* $(document).ready(function() { */
$(’#usertable’).DataTable({
responsive: true
});
/* }); */
</script>
</html>

35
Chapter 7
Testing

7.1 Test Cases

Following Tables 7.1, 7.2, 7.3 denote Test cases for Admin, Live Tracking & User Operations
respectively.

Table 7.1: Test cases: Admin


Test Description Inputs Expected Pass/Fail
Output
1. Valid Login Id and Correct Id and password Successful Login Pass
Password
2. Invalid Login Id and Incorrect Id and Unsuccessful Login Pass
Password password
3. Bill generation Opens the generate bil Bill generated with Pass
tab for a user unique number
4. Add customer Admin enters valid user Adds new customer Pass
details
5. Deactivate customer Admin opens Deactivate Deactivates customer Pass
Customer tab and selects details
the customerto be
deactivated
6. Logout Admin clicks on the Logout Admin portal Pass
Logout button
7. Send E-mail notification Scheduler based E-mail sent to User Pass
functionality
7.2. TYPE OF TESTING USED

Table 7.2: Test cases: Live Tracking


Test Description Inputs Expected Output Pass/Fail
1. Check Live Reading User opens the Live Accurate readings Pass
Tracking tab received
2. Check Readings with load Load is connected and Displays accurate Pass
User opens the Live reading
Tracking tab
3. Check readings without load Load is not connected Diplays zero on Pass
and User opens the Live live tracking graph
Tracking tab

Table 7.3: Test Cases: User


Test Description Inputs Expected Output Pass/Fail
1. Valid username and Correct Id and password Successful Login Pass
password
2. Invalid username and Incorrect Id and Unsuccessful Login Pass
password password
3. Monitor usage User opens the Live Displays Live Tracking Pass
Tracking tab graph
4. Read monthly electric User opens the Previous Displays monthly units Pass
usage Consumption tab consumed in graphical
format
5. Change password User enters the new Password is updated Pass
password
6. Download Bill User clicks on Successful operation Pass
Download/View bill
7. E-mail notification User needs to login on Displays the monthly Pass
received his/her email account message sent by the
Admin
8. Logout User clicks on the Successful Logout Pass
Logout button

7.2 Type of Testing used

Since we are concerned with final results (i.e. results and preventive measures) for that, we have used black
box testing methodology. The benefit of black box testing is that the way the code is running is not the topmost
priority ,but testing is done only for obtaining the correct output.In our case, an input is given to system and the
system presents us with the output. If the system generates correct output and proper Mining reports we
conclude, the system testing has passed.

Black Box Testing:


Black box testing is the Software testing method which is used to test the software without knowing
the internal structure of code or program.Most likely this testing method is what most of tester
37
CHAPTER 7. TESTING

actual perform and used the majority in the practical life.Basically software under test is called as “Black-Box”,
we are treating this as black box & without checking internal structure of software we test the software. All
testing is done as customer’s point of view and tester is only aware of what is software is suppose to do but
how these requests are processing by software is not aware. While testing tester is knows about the input and
expected output’s of the software and they do not aware of how the software or application actually processing
the input requests & giving the outputs. Tester only passes valid as well as invalid inputs & determines the
correct expected outputs. All the test cases to test using such method are calculated based on requirements &
specifications document.The main purpose of the Black Box is to check whether the software is working as per
expected in requirement document & whether it is meeting the user expectations or not.There are different
types of testing used in industry. Each testing type is having its own advantages & disadvantages. So fewer
bugs cannot be find using the black box testing or white box testing [11]. Following black box testing
techniques are used for testing the software application.

Boundary Value Analysis (BVA)

Equivalence Class Partitioning

Decision Table based testing

Cause-Effect Graphing Technique

38
Chapter 8
Results and Discussions

8.1 Results
The user can monitor his/her electric energy consumption in real time using graphical visu-
alization method

The user can view/download the bill generated by the admin at the end of each month to
analyze the units consumed

The admin can create an account for a new user and also can deactivate a user if required in
extreme scenarios

The admin can generate a unique bill for a user and also send an e-mail notification to the
user at the end of each month
CHAPTER 8. RESULTS AND DISCUSSIONS

Figure 8.1: Electric Energy Consumption for a User read in a text file

Description:From the above Figure 8.1,data is directly read from the Wi-Fi module of the NodeMCU.The NodeMCU
gets the data via the current sensor.Here the above data is read in the following format:
Id | Voltage | Current.This data is recorded for User with Id “2” for the month of January.The total
electric energy consumed for the month of January as calculated to be 80 units.

40
8.2. DISCUSSIONS

Figure 8.2: Usage for Month January for a User in graphical format

Description: The above Figure 8.2, depicts the electric energy consumption recorded via the text
file to be 80 units for the month of January for the given User.

Figure 8.3: Generated Bill for Month of January for a User

Description: The above Figure 8.3, shows the generated bill for the mentioned User showing the
units consumed to be 80 and the amount to be paid is Rs. 340.

8.2 Discussions
More advanced and highly compacted hardware componenets can be utilized for
more accu-rate results and high efficiency

A more simplified user interface may result in smoother operations and high customer
satis-faction
Chapter 9
Conclusion and Future Scope

9.1 Conclusion
The dependence of the electric energy companies and the Electricity Board on human intervention may result
in some inconsistencies and errors. Our main aim is to provide a service, which would ease the task of the
energy companies as well as that of the customer by eliminating human labor. The NodeMCU would collect
the readings from ACS712 current sensor which is connected to the load and send these readings to a web
application via the built in Wi-Fi module ESP8266, which would let the consumer see his consumption and
analyze it in real time.The NodeMCU in com-parison with Arduino Uno packs an in-built Wi-Fi module
whereas the Arduino UNO will require an additional ethernet shield which costs more than the Arduino itself
making NodeMCU cost ef-fective.The drawback of using current sensor is that the reading is influenced by the
surrounding temperature which may result in anamolies. Through this process we have removed the load on the
company as well as added some form of satisfaction for the customer in terms of transparency by allowing him
to analyze the data, check the bill, and verify it anytime he/she wants.

9.2 Future Scope


In the near future, we plan on refining and expanding our project scope such that it reaches a
wider audience.

Bill payment gateway and payment acknowledgement

alarm Power consumption limit notification

Emergency/Planned cut-off from power station


Appendix

1. NodeMCU

Figure 9.1: NodeMCU -ESP -E12 Pin Diagram

NodeMCU is an open source IoT platform. It includes firmware which runs on the ESP8266 Wi-Fi
SoC from Espressif Systems, and hardware which is based on the ESP-12 module. The term
"NodeMCU" by default refers to the firmware rather than the development kits. The firmware uses
the Lua scripting language. It is based on the eLua project, and built on the Espressif Non-OS SDK
for ESP8266. It uses many open source projects, such as lua-cjson, and spiffs.NodeMCU was created
shortly after the ESP8266 came out. On December 30, 2013, Espressif Systems began production of
the ESP8266.The ESP8266 is a Wi-Fi SoC integrated with a Tensilica Xtensa LX106 core, widely
used in IoT applications[9].

43
CHAPTER 9. CONCLUSION AND FUTURE SCOPE

Table 9.1: NodeMCU Pin Description


No. Pin Name Function
1 RST Reset the module
2 ADC A/D Conversion result. Input voltage range 0-1v, scope:0-1024
3 EN chip enable pin. Active high
4 IO16 GPIO16; can be used to wake up the chipset from deep sleep mode
5 IO14 GPIO14; HSPI_CLK
6 IO12 GPIO12; HSPI_MISO
7 IO13 GPIO13;HSPI_MOSI; UART0_CTS
8 VCC 3.3V power supply (VDD)
9 CS0 Chip selection
10 MISO Slave output Main input
11 IO9 GPIO9
12 IO10 GPIO10
13 MOSI Main output slave input
14 SCLK Clock
15 GND Ground
16 IO15 GPIO15; MTDO; HSPICS; UART0 RTS
17 IO2 GPIO2;UART1_TXD
18 IO10 GPIO0
19 IO4 GPIO4
20 IO5 GPIO5
21 RXD UART0 RXD; GPIO3
22 TXD UART0 TXD; GPIO1

2. ESP8266

Figure 9.2: ESP8266 Pin Diagram


9.2. FUTURE SCOPE

The ESP8266 is a low-cost Wi-Fi microchip with full TCP/IP stack and microcontroller capability produced by
Shanghai-based Chinese manufacturer, Espressif Systems.The chip first came to the attention of western
makers in August 2014 with the ESP-01 module, made by a third-party manu-facturer, Ai-Thinker. This small
module allows microcontrollers to connect to a Wi-Fi network and make simple TCP/IP connections using
Hayes-style commands. However, at the time there was al-most no English-language documentation on the
chip and the commands it accepted.The very low price and the fact that there were very few external
components on the module which suggested that it could eventually be very inexpensive in volume, attracted
many hackers to explore the module, chip, and the software on it, as well as to translate the Chinese
documentation [10].
Bibliography

[1] Preethi, V., and G. Harish. "Design and implementation of smart energy meter." Inventive
Computation Technologies (ICICT), International Conference on. Vol. 1. IEEE,1(2), pp.
234-241, 2016.

[2] Ji, Xiaohan, Dapeng Zhang, and Chunmeng Wang. "A watt-hour meter reading device for
electric energy allowance." Artificial Intelligence, Management Science and Electronic
Com-merce (AIMSEC), pp. 456-463, 2011

[3] Sehgal, Vivek Kumar, et al. "Electronic Energy Meter with instant billing." Computer Mod-
eling and Simulation (EMS), pp 739-751, 2010

[4] Moonis, Syed Mohd. "Cloud Computing for Agent-Based Urban Transportation
System.", pp 47-51, 2016.

[5] Georgakopoulos, Dimitrios, et al. "Internet of Things and edge cloud computing
roadmap for manufacturing." IEEE Cloud Computing, pp 66-73, 2016

[6] OSHA, “Power Generation Plants,” Electric Power eTool: A detailed Illustrated Glossary -
Power Generation Plants. [Online]. Available: https://www.osha.gov/SLTC/etools/electric
power/illustrated glossary/power.html.

[7] Ankitdaf, “Getting Started With the ESP8266 ESP-12,” Instructables.com [Online]. Available:
http://www.instructables.com/id/Getting-Started-with-the-ESP8266-ESP-12/.

[8] MarmotXing and R. M. Rogers, “WiFi Module - ESP8266,” WRL-13678 - SparkFun Elec-
tronics. [Online]. Available: https://www.sparkfun.com/products/13678.

[9] Board, E. (2018). ESP8266 ESP-12E NodeMcu Lua WiFi Development Board. [on-line]
Itead.cc. Available at: https://www.itead.cc/esp-12e-nodemcu-lua-wifi-development-
board.html.

[10] ESP8266 ESP-12E nodemcu 1.0 Getting started with Esplorer - Loading latest firmware - Lua
sketch for onboard and external LED blinking. [online] Theelectromania.blogspot.com. Available at:
http://theelectromania.blogspot.com/2015/12/esp8266-e12-nodemcu-getting-started.html
46
BIBLIOGRAPHY

[11] Software Testing Class. (2018). What is Black Box Testing?. [online] Available
at: http://www.softwaretestingclass.com/what-is-black-box-testing/

47
Acknowledgements

The success and the outcome of this project required a lot of guidance and assistance from many people
and we are extremely fortunate to have this all along the completion of our project work. Special
appreciation to the head of department, Information Technology, St. Francis Institute of Technology ,Dr.
Joanne Gomes and principal of our college Dr. Sincy George for their precious contribution without which
the depth of the project would not have been the same.Also we would like to thank our Project Co-
ordinators, Ms Shree Jaswal and Ms Amrita Mathur for their contribu-tion.Whatever we have done is only
due to such guidance and assistance of our project supervisor Ms. Priyanca Gonsalves and Ms. Sonali
Vaidya to help see us through this project. In addition, grateful acknowledgement to all our friends who
never gave up on us and always supported us in all aspects of our lives. Thanks.

48

You might also like