Agyeman 2019

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

2019 Fourth International Conference on Fog and Mobile Edge Computing (FMEC)

Design and Implementation of an IoT-Based Energy


Monitoring System for Managing Smart Homes

Michael Opoku Agyeman, Zainab Al-Waisi and Igla Hoxha


Department of Computing, University of Northampton.
Email: [email protected]
TABLE I. C OMPARISON BETWEEN
Abstract—The usage of smart meters has been expanding S MART M ETER AND C ONVENTIONAL M ETER
rapidly since the 2000s, as they provide economic, social and
environmental benefits for multiple stakeholders. A smart meter Conventional Meters Smart Meters
can have a customizable design based on the requirements of Electromechanical meters Digital Meters
customer and utility company. They can be implemented by One-way communication Two-way communications
using different sensors and devices, supported by dedicated Few sensors Multiple sensors
communication infrastructure. This paper presents the design Manual monitoring Automatic monitoring
and implementation of a full working smart meter system that Limited control Unlimited control
provides remote control of individual loads by using Arduino, Few Customer choices Many customer choices
Raspberry Pi and other sensors. The implemented system in- Manual generated fees Automatical generated fees
cludes a mobile application, developed for the client to control Centralized generation Distributed generation
and manage the smart meter, along with a website application,
developed for the utility company to monitor and administer the
system. The energy monitoring system is equipped with various
features such as sending a notification to the client if consumption unit is accountable for transmitting data over the network to
budget exceeds a customizable threshold (75%), payment options the utility company. Thus, the utility company has the ability
by Visa or PayPal and many others. to generate bills for the customer, containing all the needed
information regarding energy consumption. Moreover, Table I
I. I NTRODUCTION shows that differently from the conventional grids, smart grids
can automatically monitor the energy features. Smart meter-
Traditionally, electromechanical meters or basic electronic ing technology facilitates the switch between suppliers and
meters have been conventionally used to measure energy con- different payments. In addition to providing both consumers
sumption [1]. These type of meters requires the transportation and electricity suppliers with electricity consumption-related
of suppliers to the energy meter location for meter readings and information, smart meters contribute in the enhancement of
other management tasks e.g., meter disconnection. However, monitoring the power supply quality for different connections.
taking into consideration the high number of customers, this
is quite exacerbating [2]. Smart meters have recently gained a Previously, we have presented a study of the challenges and
substantial popularity for calculating, controlling and measur- opportunities of smart meters in smart homes and smart grids
ing power, gas and water consumption [3]. A smart meter is [8]. Our previous paper [8], reviewed existing work on smart
an electronic device, used to record and transmit the gathered meters and smart grids and explored the feasible solution for
information of electricity, water or gas consumption. The data efficient energy managing system for smart homes.
is normally stored in a server for further operations like
This paper complements our previous work by present-
calculating consumption fees, displaying dissipation statistics
ing the design and implementation of an Internet-of-Things
or reporting other information to the customer [4], [5]. Hence,
(IoT)-based energy monitoring system for managing smart
based on the processed data, significant energy efficiency and
homes [9]–[11]. Therefore, this paper presents the details of
financial savings are expected to be achieved [6]. The massive
a designed smart meter system that allows remote control of
amount of data generated by the large-scale installations of
individual loads by using Arduino, Raspberry Pi and other
smart meters, can therefore offer a unique insight of the
sensors. The implemented system includes a mobile applica-
power consumption of different consumers to the company.
tion for the user and a website application, developed for the
This information can be used to help customers to shift their
utility company. The system aims at providing a full-power
consumption from peak hours, resulting in notable savings of
management system. By using this system, the user can see
the energy [7]. Furthermore, it can help electricity scheduling
a real-time measurement of the power consumption and the
to facilitate safe and efficient operation of the power system.
total cost of used energy. The mobile application allows the
Recently, there has been an upsurge in adopting smart grid and
client to control any electrical device while displaying several
smart meters by smart cities.
relevant statistics (e.g. fees, power consumption etc.). The web
As shown in Table I, there are considerable differences be- interface, on the other hand, gives the utility company access to
tween smart meters and conventional meters, as well as smart the power consumption information in order to generate bills.
grids and conventional grids. Smart meters provide efficient Furthermore, the system allows the company to implement
communication between customers and utility companies. By different features for the client e.g., monitoring the client
using smart meters, the system will automatically send the in- consumption and sending a monthly notification whenever the
formation from client unit to central unit and vice versa. Client budget reaches a threshold (say, 75%).

978-1-7281-1796-6/19/$31.00 ©2019 IEEE 253


2019 Fourth International Conference on Fog and Mobile Edge Computing (FMEC)

The remainder of the paper is organized as follows. Section


II highlights the details of the proposed system architecture.
Section III presents the hardware, software and programming
requirements of the system. Evaluation of the implemented
system is provided in Section IV. Eventually, the paper is
concluded in Section V.

II. S YSTEM A RCHITECTURE


The proposed system is a power management system that
allows consumers to monitor and control the electrical devices
Fig. 2. System Architecture Diagram (Central unit side)
via Internet-of-Things (IoT) enabling devices (e.g. mobile
application). In addition to real-time energy monitoring and
budget control, the system allows clients to control devices
using turn on/off buttons (by voice and/or manually), to
securely transfer the data between the client side and the
control unit side, to use an alarm button for emergency cases
and it also provides a google map for the utility company to
display which houses use more energy. These features aim at
helping both the utility company and the client to contribute
in green energy by remotely monitoring energy consumption
and automatically switching electrical devices on/off at specific
times.
The hardware part of the system consists of the client unit
(Figure 1) and central unit (Figure 2). The microcontroller
interface (in this case, Arduino) i.e., the client unit, is re-
sponsible for reading information from the sensor. The sensed
data is then sent to the central units database. Additionally,
the microcontroller interface is used for controlling electrical
devices. A Raspberry Pi is used to implement the central unit,
that consists of the database and all web services including,
monthly budget monitoring and notifications. Fig. 3. Entity Relationship Diagram

Secondly, the system includes a mobile application that


is built using Java with PHP and MySQL. The application payment record, nonactive contact, system setup etc. are
allows the authorised utility clients to remotely make use of required. As illustrated in Figure 3, the relationship between
different features, such as real-time consumption as gauge client and sub-client is one-to-many because each client has
chart, manual device control, system setup etc. On the other many sub-clients in his/her family. Additionally, the relation-
hand, the website application allows both the utility and their ship between the client table and power cost table is one-
clients to access and manage the services provided by the to-many because each record in the power cost entity is
central unit. Such services include automatic generation of related to one client and each client has more than one record
bills, registration (both clients and administrators), control of in power cost table. On the other hand, non-active-clients-
different information related to the client, payment details contact table is required only for registering the last contact
(paying via Visa or PayPal), graphical representation of energy by the company. Consequently, the relationship between the
usage, etc. client and non-active-client contact is one-to-many and it is an
optional relationship. Furthermore, system-setup table has an
one-to-many relationship with the client, because each client
can set up more than one device, whereas each device is
related to one client only. Similarly, the clients payment record
table has an one-to-many relationship with client table, because
clients make the payments monthly and each record is related
to one client.

B. Mobile App Interface: Wireframes


Figures 4 - 7 show some of the key wireframes used to
Fig. 1. System Architecture Diagram (Client Side) implement the mobile app, detailing the desired functions of
the components of the app interface and associated flowchart.
A. System Analysis and Design Figure 4 illustrates the enabled security feature of the system
which ensures user authentication before using the system.
In order to build the smart meter system, different entities This login page is also equipped with a password recovery
such as client, staff, sub-client, power cost, client budget, and registration credentials. As can be seen in Figure 5,

254
2019 Fourth International Conference on Fog and Mobile Edge Computing (FMEC)

different fields are required fields for the registration and client
identification. These fields include password, first name, last
name, email, phone number, etc.

Fig. 4. Wireframe (Login Page)

Fig. 6. Wireframes (’Forgot password’ page)

Fig. 5. Wireframes (Register page)

As shown in Figure 6, the email address is used as a


password recovery medium. In future work, alternative ways
such as fingerprint, face recognition and/or iris recognition can
be possibly used for login and/or password recovery.
Figure 7 highlights the simplified interface that allows the
user to switch between voice control and manual/finger control
of the system.
The wireframes for both mobile application and website are
quite similar. The mobile application provides several features
such as: real-time consumption as gauge chart; consumption Fig. 7. Wireframes (Controlling page)
rate as charts; fee statistics as charts; adding a sub-client;

255
2019 Fourth International Conference on Fog and Mobile Edge Computing (FMEC)

changing the password; updating account information (per-


sonal data, address etc.); system setup (on-off); monthly budget
setup; automatically controlling devices; voice recognition and
Android IP settings .
The web application provides features that include: client
profile (personal data, last consumption, consumption rate,
monthly consumption, payment details, etc.); non- active
client; adding/updating/deleting/selecting city, admin, client;
contacting clients via email; paying via PayPal or Visa card;
displaying receipts; printing options and statistics.

III. S YSTEM D ESIGN


The smart meter hardware measures the current energy
consumption, calculates the sensed data, converts it from
analog to digital and displays the consumption on the LCD.
The meter sends the data to the database on an hourly basis
(Figure 8). Figure 9 shows the hardware components used in
designing the system. The hardware components implement
the web services to control household appliance/devices via
mobile application, using online and offline requests. A JSON
array is used to control devices via internet enabled Arduino
hardware system. A Firebase cloud messaging is implemented
in the Raspberry Pi to send notifications for various aspects.
Fig. 8. System Architecture Diagram (Hardware side)
Smart relays are used as an interface between Arduino and
household appliance/devices to provide remote control of
power supply to these devices (Figure 10). The used hardware
can be summarised as follows:
1) Raspberry Pi: is the control unit server, which collects
different information from the client unit.
2) Arduino: is the reader point that reads the information
from the sensor and sends it to the control unit.
Fig. 9. Hardware Devices
3) Non-invasive current sensor: is used to read the
electricity consumption from any electrical device.
The sensed data is then sent to the central unit through current sensor into Arduino, as it can only receive a maximum
Arduino. of 5V.
4) Other components such as resistors, wires, relays,
capacitors, etc. To illustrate how the system could be applied in a real
5) 12 C module: contributes in connecting the pins of house, the first prototype included a model house which was
LCD display with inputs of Arduino via a few pins. built using wood and LEDs(Figure 11). The user can control
these LEDs (loads) using the mobile application and they can
The used programming languages are: be easily converted into a real power.
1) Java programming language for building an android
application for the end-user. IV. I MPLEMENTED S YSTEM
2) Python for the Raspberry Pi.
3) C/C++ for Arduino. Figure 12 illustrates the implemented smart metering sys-
4) PHP in order to connect the android application with tem, highlighting the sensor and microcontroller interface
the database. demonstrating a successful remote control of LED.
5) HTML, Jquery, JavaScript and PHP for building the
web application.
6) MYSQL database: used to store all information in it
as it is a secure place.
7) SQLite for the mobile application.
To read data from the non-invasive current sensor, a Jack
stereo polo is used to get negative and positive data from the
sensor, as well as three resistors (33 ohm, and two 10 kohms),
one Capacitor 10 uf, Arduino Uno R3, non-invasive current
sensor, LCD display, Ethernet shield (in order to connect
Arduino with internet) and a router (Figure 11). The resistors
and capacitors are used to reduce the received power from the Fig. 10. System Architecture Diagram (Hardware side)

256
2019 Fourth International Conference on Fog and Mobile Edge Computing (FMEC)

Fig. 11. Circuit Diagram of Hardware Interface

Fig. 14. Main Menu of the Mobile App

through manual and voice control respectively.

Fig. 12. Smart Meter System (Sensor and Microcontroller Interface)

In Figure 13, the smart meter is enclosed in a designed


wooden case and the associated meter readings when a load
(hair dryer) is connected are shown.

Fig. 15. Mobile App: Manual Load Control

Figure 17 shows the view mode of the available fees for


the users. What is noteworthy to be mentioned is that these are
only a handful of most implemented features of the system due
to page restrictions.
A group of 17 people from different fields such as comput-
ing, accounting, law, etc. evaluated the hardware along with
the mobile and web applications and answered questionnaires.
The main goal was to get the end-users’ feedback regarding
Fig. 13. Systems Architecture Diagram (Hardware side)
the functionalities, interface design and feasibility evaluation of
the proposed system for energy management in smart homes.
Furthermore, Figure 14 displays the key features (main Overall, they were all highly satisfied. Specifically, when they
menu) of the designed app as described earlier. were asked about the feasibility of the completed hardware
system (the full system with integrated LCD display, sensor
Figures 15 and 16 show successful remote control of load map, controlling devices, etc.) and its relevance to their homes,

257
2019 Fourth International Conference on Fog and Mobile Edge Computing (FMEC)

V. C ONCLUSION
This paper presented the design and implementation of a
smart meter system that manages energy efficiency for smart
homes. The implemented system exploits IoT technology to
provide remote access to control household appliances via
both a web interface and a mobile application. The system
is fully integrated with beneficial features for both the utility
company and end-user, in terms of visualizing energy usage
and providing control, aiming at promoting green energy. This
smart meter system allows remote control of individual loads
by using Arduino, Raspberry Pi, mobile application and web
interface. Future work includes incorporating machine learning
algorithms to efficiently manage the household load and power
budget.

R EFERENCES
[1] J. Zheng, D. W. Gao, and L. Lin, “Smart meters in smart grid: An
overview,” in IEEE Green Technologies Conference (GreenTech), April
2013, pp. 57–64.
Fig. 16. Mobile App Interface: Voice Control
[2] Z. Jebroni, H. Chadli, B. Tidhaf, A. Benlghazi, and A. Tahani, “Gain
correction and phase compensation of a smart electrical energy meter,”
in International Conference on Engineering MIS (ICEMIS), Sept 2016,
pp. 1–6.
[3] J. Q. Azasoo, E. Kuada, K. O. Boateng, and M. O. Agyeman, “An
algorithm for micro-load shedding in generation constrained electricity
distribution network,” 2017 IEEE PES PowerAfrica, pp. 396–401, 2017.
[4] S. B. Taieb, R. Huser, R. J. Hyndman, and M. G. Genton, “Forecasting
uncertainty in electricity smart meter data by boosting additive quantile
regression,” IEEE Transactions on Smart Grid, vol. 7, no. 5, pp. 2448–
2455, Sept 2016.
[5] S. Arora and J. W. Taylor, “Forecasting electricity smart meter data
using conditional kernel density estimation,” Omega, vol. 59, no. Part
A, pp. 47 – 59, 2016, business Analytics.
[6] L. S. N. A. C. VD, “Estimating the impact of time-of-use pricing on
irish electricity demand,” 2012.
[7] ——, “Estimating the impact of time-of-use pricing on irish electricity
demand, working paper,” 2012.
[8] Z. Al-Waisi and M. Opoku Agyeman, “On the challenges and opportuni-
ties of smart meters in smart homes and smart grids,” in Proceedings of
the 2Nd International Symposium on Computer Science and Intelligent
Control, ser. ISCSIC. ACM, 2018, pp. 16:1–16:6.
[9] A. Dean and M. O. A. Agyeman, “A study of the advances in
iot security,” in Proceedings of the 2Nd International Symposium on
Computer Science and Intelligent Control, ser. ISCSIC. ACM, 2018,
pp. 15:1–15:5.
[10] D. M. P. Hung, S. M. S. Naidu, and M. O. Agyeman, “Architectures for
cloud-based hpc in data centers,” in IEEE 2nd International Conference
Fig. 17. Mobile App Interface: Payment and Fees Record on Big Data Analysis (ICBDA)(, March 2017, pp. 138–143.
[11] N. Mohammedali and M. O. Agyeman, “A study of reconfigurable ac-
celerators for cloud computing,” in Proceedings of the 2Nd International
63.6% of them responded ”Excellent” and 36.4% rated it ”Very Symposium on Computer Science and Intelligent Control, ser. ISCSIC.
ACM, 2018, pp. 17:1–17:5.
good”.

258

You might also like