Development of An Internet Based Prepaid Energy Meter: Deenmat@unilorin - Edu.ng
Development of An Internet Based Prepaid Energy Meter: Deenmat@unilorin - Edu.ng
Development of An Internet Based Prepaid Energy Meter: Deenmat@unilorin - Edu.ng
Abstract: Energy fuels the growth and development of any deployment of electricity smart meters. They are energy theft,
country, and as such effective monitoring, measurement, cyber-attacks, mismanagement and erroneous billing etc. [2]
billing and access control is imperative. This paper and thus, various research aspects to curb the challenges have
presents a device that uses the evolving Internet of Things been ongoing. This paper proffers a solution of reducing
(IoT) technology in the design and implementation of an human involvement in energy management for both utility
Internet based prepaid energy meter often referred to as companies as well as consumers. All the monitoring and
smart meters. The energy measurement and billing system control features are provided access via a dedicated web
is automated. The system employs the ATMega328p and portal, anywhere, anytime provided there is Internet
ESP8266 to operate a dual core microprocessor unit with connection.
one core dedicated to energy sensing and measurements,
while the other handles the network connectivity, storage, II. RELATED WORKS
computations and overall system performance. This work Smart meters data are collected, stored and analysed for
uses the HTML5 technology to develop a highly interactive proper planning and billing of consumers [3]. Various designs
mobile and web frontend Graphic User Interface (GUI) have been implemented as presented below from some
application that allows for consumers to have access to selected works. In [4], Omijeh and Ighalo, introduced a tamper
monitor and control their consumption pattern while the detect feature for a GSM solution for prepaid energy meter,
utility companies can monitor and control customers and however this work didn’t provide an interactive interface for
their billing systems. real-monitoring, access control as well as a robust database. A
modelled GSM-based Energy Recharge System for prepaid
Keywords: Internet of Things, Energy Meters, HTML5, metering was presented in [5] with focus on proffering
ESP8266, Microcontroller solution to human error, processing error as well as electro-
mechanical errors while [6] aims at proposing a system that
I. INTRODUCTION will reduce the loss of power and revenue due to power thefts
Energy meters are used to measure the amount of energy and other illegal activities. It uses an AT89S52
consumed by domestic, commercial and sometimes industrial microcontroller which acts as the primary controller. The
users [1]. With the growing population of energy consumers, energy meter reading is compared with the smart card
smart meters are timely innovation which eases the energy information by the microcontroller for effective monitoring
management system. Utility companies can monitor and control of switching depending on the credit status.
consumption, automatically disconnect defaulting consumers, Bluetooth technology was employed in [7] where the meters
update tariff, and have a secured database and consumption were made to communicate with a master PC but all
pattern of a mapped location. The consumers on the other end communications were limited to within the 100-meter range
can also monitor their energy consumption in real-time, for Bluetooth connections. In [8], a digital signal processor
recharge their accounts, monitor tariff rates and hence based meter to measure electricity consumption of users in a
improves the demand response. Unfortunately, the energy residential area was presented exploring Power Line
sector is bedevilled by several challenges resulting from the Communication (PLC) technique. The limitation of this
1370
1371
IEEE Africon 2017 Proceedings
D. WEB SERVICE SECURITY protocol which makes it compatible with ESP8266. With just
Traditional internet security techniques were employed in the 4 wire connection required, its Pin requirement is fewer than
applications as well as the communications between them. most other displays. The esp8266 NodeMCU provides
These includes authentication built into web application to activating signal to the relay, controls display and connectivity
ensure that no unauthorized user has access to the system. as stated earlier.
Also, the Websocket server requires an authentication before
communication can proceed between the server and the CPE.
The authentication parameters include a One Time Password
(OTP) which is generated during the connection.
E. DESIGN ANALYSIS
The whole device is designed in a modular structure. It is
made up of different modules or subsystems in order to allow
for good maintainability, and to ensure that the system is
scalable and interchangeable. The device uses a dual
controller unit. The first controller is an Arduino AT328p
micro-controller unit which is used for voltage and current
sensing as well as energy computations while the second
controller is an esp8266 NodeMCU. It serves as the main Fig. 2 Complete Circuit Diagram
controller unit of the system. It handles internet connectivity,
communication peripherals, connection to load, control
process, display system and general system utility and
functionalities. The two MCU’s communicate through a Serial
Peripheral Interface (SPI). The esp8266 is the brain of the
system and it features the following a 32-
bit RISC CPU: Tensilica Xtensa L106 running at 80 MHz, 64
KiB of instruction RAM, 96 KiB of data RAM External QSPI
flash: 512 KiB to 4 MiB* (up to 16 MiB is supported), Wi-Fi
802.11b/g/n, low power MCU, integrated 10 bit ADC,
integrated TCP/IP protocol stack, supports antenna diversity,
Wi-Fi 2.4 GHz, and supports WPA/WPA2, very low power
consumption, has a data transmission rate of about 110-
460800bps[12]. However it has only one analog pin and as
such will not be sufficient by itself to read voltage and current
which are both analog parameters. The Arduino UNO
provides for six (6) analog pins which made it a suitable
choice for voltage and current sensing. The voltage sensing
circuit is made up of a step down transformer, which steps
down the voltage and steps up the current following the
transformer formula. The current transformer on the other
hand is used to step down the line current which is then passed
through a burden resistor to convert it to a voltage level
measurable by the Arduino analog pins. To prevent negative
outputs of these two sensing units, their outputs are biased by
a D.C voltage and it is ensured that the outputs will always be
between 0 V and 5 V for all measurements within the device
Fig. 3 The main Embedded System Firmware Flowchart
specification. The project consists of a rectification circuit
which provides 5 V and up to 2000 mA to drive the relay, this
is used instead of the 5 V from the Arduino board because the
load will draw current up to 1A, which the board cannot IV. IMPLEMENTATION AND RESULTS
support. The display unit is made up of Organic Light The hardware components were mainly modular in nature and
Emitting Diode (OLED). It is a low power display as it does hence, the system was implemented unit by unit. The software
not have backlight. It supports Inter Integrated Circuit (I2C) components were implemented with some frameworks such as
1372
IEEE Africon 2017 Proceedings
1373