Ika Monica Telaumbanua, Christopher Mika Andrew Siahaan, Richad Harianja

You might also like

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

Smart House Electricity Monitoring Based on

Raspberry Pi

Ika Monica Telaumbanua, Christopher Mika Andrew Raspberry Pi. Smart home or smart home is a programmable
Siahaan, Richad Harianja system and can work with the help of a computer to integrate
Faculty of Informatics and Electrical Engineering and control a device or home appliance automatically and
efficiently which aims to facilitate energy saving, comfort and
Institut Teknologi Del, Laguboti, Toba Samosir, Sumatera
so on [2]. Smart Home can be used to control almost all
Utara, Indonesia
equipment and equipment in the home, from lighting
Email : info@del.ac.id
arrangements to household appliances, whose commands can be
done using sound, infra red light, or remote control.
Abstrak---Currently, the number of household appliances that Pre-built home electrical appliances control systems such as
require electrical resources makes the use of electricity is home electrical appliance control systems using short message
increasing. But in the usage the user is often excessive and can’t media (SMS), or using android bluetooth or home web based
control it well. For example, users who forget or are lazy to turn home power control systems do not provide complete data for
off electronic devices manually while in the house or leave users that can make the user know how much power electricity
home. Excessive use of electricity is very detrimental to the user that has been used [3]. With Smart House Electricity Monitoring
both in terms of electrical power and costs incurred. based on Raspberry Pi the problem will be solved. This system
Electrical equipment monitoring system automatically helps users in monitoring the use of power consumed power
becomes the best solution to overcome the problem of excessive tools in the house.
electricity usage. In this research, a monitoring system for the
use of electrical appliances is automatically called Smart House II. TOOLS & MATERIALS
Electricity Monitoring Based on Raspberry Pi which aims to
monitor and control the use of electrical equipment in the house. a. Raspberry Pi
This research is useful for users who handle the use of electricity Raspberry pi is a small computer board working on Linux
in excessive and inappropriate. OS that is connected with computer, monitor, keyboard, and
The method of monitoring the use of electricity used in this
mouse. Raspberry Pi can be applied to electronic structure and
study is to detect the power consumed electrical devices using
network programming jobs, can also function as personal
Current Transformer sensor connected to Arduino then Arduino
will send the power Raspberry Pi to be stored and processed. computer and Apache Webserver. Raspberry Pi that has no
Raspberry Pi will send the processed data to the database and analog input. For that it must use an external analog-to-digital
will be displayed on a website based application built using the converter (ADC). In aquarium replacement and the automatic
Codeigniter framework to enable users to easily monitor the feeder will use Raspberry pi as the activity controller of the
electrical devices. activity.
In this final project will be discussed how to implement
Smart House Electricity Monitoring Based on Raspberry Pi b. Arduino
where user can use home electric appliances efficiently and Arduino is an open-source microcontroller that is
appropriately through website application which can be accessed compatible with any platform currently available. Arduino can
through laptop or smartphone. Keywords: Current Sensor connect to a computer via Universal Serial Bus (USB) and
Transformer, Arduino, Raspberry Pi, Relay and Codeigniter connect with both analog signals and digital signals. The
Arduino is a microcontroller platform, mounted on a board that
Keywords— Sensor Current Transformer, Arduino, Raspberry
connects easily to most computers. This allows the user to
Pi, Relay;
program the onboard chip, Atmega to do various things with the
programming language, in a program called sketch.
I. INTRODUCTION
Electricity is a very important component in helping every c. LM358
work of humanity, ranging from lighting to setting the The LM358 is a dual operational amplifiers (OpAmps)
temperature of the room and so forth. But in its use is often
consisting of two high-gain operational amplifiers with
inefficient, many people are letting an electric device turn on
when not in use. For example forget to turn off all lights or other independent frequency compensators [4]. The LM358 is
devices while away from home. This of course leads to waste in designed to operate from a single supply with a wide voltage
the use of electrical power. range for full flexibility in applying electronics circuit design.
Research that has been done to control electrical appliances The LM358 can also use a separate power supply during the
basically just turning off and turning on electrical appliances voltage difference between the two power supplies between 3V
only, no other features [1]. In this study the author made a and 32V and Vcc at least 1.5 volts higher than the common-
prototype home system based on Raspberry Pi smart user mode voltage input. The pull of the low supply current drain is
interface android that will perform data communication through independent of the magnitude of the power supply voltage.
web service that is Smart House Electricity Monitoring based on
CT sensor serves as a tool to measure the electrical
current consumed from each electrical device that is
d. Sensor Current Transformer
connected directly with the CT sensor by clamping. Lm358
Current transformer (CT) or current transformer is a tool serves as a ground provider for CT Sensors. CT sensor only
used to measure the amount of current on a large-scale primary has cable. The first cable serves to provide power for CT
power (TET, TT and TM) electric installation by transforming Sensors and other cables serve to provide data transmission
large quantities of current into small current quantities so as to on Arduino UNO via analogs contained on the Arduino UNO
make measurements or metering and accurately and precisely board. The power supply will be sent to Arduino UNO.
determining tool boundaries [5]. The measurement current Arduino UNO serves to receive data in the form of electric
transformer for metering has a high accuracy in the working current power from the CT sensor. Data received by Arduino
area (rated region) of 5% - 120% of its nominal current UNO will be sent to Raspberry Pi for further data is stored
and processed in Raspberry Pi operating system. Data from
depending on its class and relatively low saturation level
the Arduino UNO can be sent to Raspberry Pi by using a USB
compared to the current transformer for protection. While the
cable as a serial communication or communication link
current transformer for protection, has a high accuracy in the
between Raspberry Pi and Arduino. The power data obtained
event of interference where the current flowing several times
by Arduino is electric current power in Ampere units that
from the rated current and saturation level is high enough. The have been calculated into KW (KiloWatt) units which can
CT sensor will be wrapped around a cable at the positive pole to only be seen when the user accesses the monitoring
be able to measure the amount of electric current flowing application.
through the cable.
Raspberry pi plays a role in processing data transmitted
e. Software Aplikasi (Web Aplikasi) by CT Sensors to be further displayed into a website-based
A website is a collection of pages displaying a wide range monitoring application. Next Raspberry pi sends data to the
of text, data, still or moving images, animation, sound, video or database for display on the application based website. The
built application has one way authenticaton as a process to
combination data of all, whether static or dynamic, forming an
determine whether the user who wants to enter into the
interconnected set [6]. A website is usually placed at least on a
system is a valid user or not. This application is only used by
web server that can be accessed through a network such as the
two users who act as admin and client.
Internet, or a local area network (LAN) through an Internet
address identified as a URL. The current authentication process generally only uses a
username and password. When the user successfully logs in
the user can see the dashboard application and use the
III. CONCEPT DIAGRAM application to monitor and control the use of electrical power
in the home. If the user logs into this system then
automatically logs the system to log / history user to know
whenever the application is used which is done on the system
used. The application is built with the purpose of facilitating
the user in controlling the use of electricity in the home.
V. Flow Chart Diagram

Figure 1. Full design diagram of the system.

IV. SYSTEM OVERVIEW


Figure 2. Flowchart controls the tool automatically

In Figure 4 is shown a general overview of the built


system. The electrical devices used are lights and extensions. Figure 2 shows the workings of the system in controlling
The power consumption of such electrical devices is electric current devices automatically using Raspberry Pi and
measured by the CT Sensor. The relay is used to disconnect Relay. Raspberry Pi serves to turn on the light automatically
or connect the electrical current when receiving a signal from and Relay can disconnect the electric current or open the flow
Raspberry pi. Relay can work because of a coil that contains of electric current on each device when getting the signal /
iron and if the coil is electrified then the coil becomes a command from Raspberry Pi. When the device is turned on
magnet that pulls the plate so that the flow of electricity. automatically, the CT sensor measures the electrical power
used on each device that uses electric power. Power obtained
Sensor CT will be sent to Arduino and will be sent again to
Raspberry Pi. The data is compared to the power limit
specified by the user on the web application. When the power
has exceeded the power consumption limit set then Raspberry
pi will send a signal to the Relay to turn off devices that use
excessive power. The disabled device will come back to life
after 30 seconds. Raspberry Pi will check the power of the
device, if the power no longer exceeds the limit then the
device will remain alive but if the power still exceeds the
specified limit then the device will turn off again. When the
power does not exceed the specified power limit then the data
will be accommodated in an array and will be entered into the
database for subsequent display in the website-based
monitoring application.

VI. EXPERIMENTAL AND RESULTS Figure 4. Dashboard AppsHome for client

The model of the developed application is expected to have


a good impact on the use of electricity in the home.

Figure 5. Dashboard AppsHome for admin

Dashboard is a layer that appears after the user login by


entering a valid username and password. There are two
dashboard views ie dashboard for admin and dashboard for
client.
In the sidebar dashboard for admin there are Users menu,
Details Room, Log Activity, User Log, Record and Report.
While on the sidebar dashboard for the client there is only one
menu that is the Details Room menu. The dashboard displays a
graph of electric power usage in one day in KiloWatt (KW). At
Figure 3. Table Results CT Sensor Testing Scenario
the top of the dashboard there are four menus namely details
room, new user, log activity and user log. Menu details room is
a menu that contains details about the device used in the room,
on this menu the user can control the device in every room. The
New User menu is a menu to add new users. Users who can
access this app can amount to more than one person. Menu
Activity is a menu that contains a note about the time of use of
the device while the User Log menu is a menu to view user data.
Admin can access these four menus but the client can only
access the Details Room menu.
Another menu contained in the Details Room layer is View
Details, this menu contains the location of each device used by
the user. In the prototype, the device used as many as seven ie 4
lights and 3 extensions. View Menu Details can be seen in
Figure 9.

Figure 6. Layer Log User

The User Log Layer contains data about the user ie ID,
email, name, permissions and description of when the user is
actively using the application. The User Log Layer is only
accessible by the admin. Shown the User Log layer can be seen
in Figure 6.
Figure 9. Menu View Details

The first test is successfully done, all CT Sensors can


retrieve data from any devices that use electric current. The
data in the form of electrical power is measured every
second. If the CT sensor is clipped on the device cable but
the device is not turned on, then the device consumes power
is still zero (no power is consumed). Data is displayed
through the python program and runs in console using
Raspberry Pi. The data shown is the result of calculations
Figure 7. Layer Details Room from the data obtained from the CT Sensor. The console
shows the device name, status and power consumed. Figure
10 shows the power measurement results consumed by the
Layer details room displays a description of the device used device for 15 minutes.
inside the house. Item description includes device name, power
limit, status, action and control. Layer Details Room can be
accessed by admin and client. In the action table, admins can
edit the device in case of changes or erase the device if it is no
longer used by the client. In the control table, the client can turn
the device on or off simply by pressing the on button or green
button to power the device and the off button or red button to
turn off the device. Display Layer Details Room can be seen in
Figure 7.
In the Room Details layer there is also a menu that can turn
on or off all devices at the same time the On all to turn on all
devices or Off all to turn off all devices. In addition, there is an
add new menu that is useful to add new devices and their full
description. In Add New menu, admin must fill in provided box Figure 10. Testting for 15 minutes
in the form of device name, power limit and description. Add
New menu on the Details Room layer can be seen in Figure 8. The results of power measurements consumed by the device
for 60 minutes are shown in Figure 11. In the figure it can be
seen that the power consumed for 60 minutes totaled more than
the data consumed for 15 minutes and 30 minutes.

Figure 8. Menu Item Management


Tangga Menggunakan Media Pesan Singkat (SMS).
Jurnal Teknologi dan Sistem Komputer, 4(3), p.454.

[4] Id.wikipedia.org. (2018). Arus listrik. [online]


Available at: https://id.wikipedia.org/wiki/Arus_listrik
[Accessed 25 Jan. 2018].

[5] Teknik Elektronika. (2018). Pengertian Relay dan


Fungsi Relay. [online] Available at:
http://teknikelektronika.com/pengertian-relay-fungsi-
relay/ [Accessed 25 Jan. 2018].

Figure 11. Testting for 60 minutes [6] Immersa-lab.com. (2018). [online] Available at:
http://www.immersa-
VI. CONCLUSIONS lab.com/wpcontent/uploads/2018/03/Struktur-
Sederhana-Relay_Featured-Image.jpg [Accessed 25 Jan
After doing the design and manufacture of the system
2018].
and then tested and analyzed, it can be taken some
conclusions about Smart House Electricity Monitoring based
on Raspberry Pi, among others: [7] Muharram, A. (2018). Trafo Arus (CT). [online]
Bloglistrik.com. Available at:
1. After doing some testing on the system, the current http://www.bloglistrik.com/2016/08/trafo-arus-ct.html
detection using CT Sensor can not be done through [Accessed 26 Jan. 2018].
Raspberry Pi so that made changes by adding a
device that is Arduino. With Arduino the current [8] Materi Mafia Online. (2018). Cara Menghitung Energi
consumed by each electrical device can be detected dan Daya Listrik. [online] Available at:
by the CT Sensor well. But on CT Sensor only has https://mafia.mafiaol.com/2013/04/cara-menghitung-
cable for voltage (volt) and GPIO and there is no energi-dan-dayalistrik.html [Accessed 5 Jun. 2018].
cable to ground. So that added device of LM358
which is used as ground on CT Sensor. [9] Id.wikipedia.org. (2018). Raspberry Pi. [online]
2. The system can monitor the use of electrical power Available at: https://id.wikipedia.org/wiki/Raspberry_Pi
in the home can also control electrical devices such [Accessed 26 Jan. 2018]
as turning on and off electrical devices using
website applications that can be accessed through a [10] N, S. (2018). Mengetahui Pengertian Website Dan
laptop or smartphone. Jenisnya - Pengertian Apapun. [online] Pengertian
3. The system built is in accordance with the scope Apapun. Available at:
described previously http://www.pengertianku.net/2014/09/mengetahui-
pengertian-website-dan-jenisnya.html [Accessed 26 Jan.
Recognition 2018].
This research is supported by Faculty of Informatics and
[11] Id.wikipedia.org. (2018). CodeIgniter. [online]
Electrical Engineering
Available at: https://id.wikipedia.org/wiki/CodeIgniter
Institut Teknologi Del, Laguboti, Toba Samosir, Sumatra [Accessed 30 Jan. 2018].
Utara, Indonesia
[12] Pintarci.blogspot.co.id. (2018). Pengenalan Struktur
References Codeigniter | Pintar Codeigniter. [online] Available at:
http://pintarci.blogspot.co.id/2014/09/pengenalan-
[1] Kumar, S. and Sharma, A. (2017). An Efficient Home strukturcodeigniter.html [Accessed 30 Jan. 2018].
Automation Approach using Raspberry Pi in Wireless
Sensors with Smart Phone. International Journal of
[13] Blog.langitrobotika.com. (2018). Pengertian Arduino
Computer Applications, [online] 173(9), pp.38-43.
UNO | LangitRobotika.Com. [online] Available at:
http://blog.langitrobotika.com/article/robotika/pengertia
[2] Elib.unikom.ac.id. (2018). Digital library - n-arduinouno/.html [Accessed 3 Jun. 2018].
Perpustakaan Pusat Unikom - Knowledge Center -
WELCOME | Powered by GDL4.2 | ELIB UNIKOM.
[14] DIP-8), I. (2018). IC LM358 Dual OpAmps
[online] Available at:
(SMD/SOP-8 atau DIP-8). [online] Vcc2GND.com |
http://elib.unikom.ac.id/gdl.php?mod=browse&op=read
Solusi Rekayasa Elektronika. Available at:
&id=jbptunikompp-gdl-putrimeili- 35884 [Accessed 23
http://blog.vcc2gnd.com/2014/02/ic-lm358-dual-
Jan. 2018].
opamps-smdsop-8-atau-dip-8_10.html [Accessed 3 Jun.
2018].
[3] Imron, H., Isnanto, R. and Widianto, E. (2016).
Perancangan Sistem Kendali pada Alat Listrik Rumah
[15] DASAR KOMPUTER BUAT PEMULA. (2018).
Pengetahuan Dasar dan Pemrograman Raspberry Pi.
[online] Available at:
https://pccontrol.wordpress.com/2014/06/17/pengetahua
n-dasar-dan-pemrogramanraspberry-pi/. [Accessed 30
Jan 2018].

[16] 14core.com. (2018). Wiring 8 Channel Optocoupler


Relay Module | 14core.com. [online] Available at:
https://www.14core.com/wiring-8-channel-optocoupler-
relay-module/ [Accessed 31 Jan 2018].
[17] Learn.openenergymonitor.org. (2018). Learn |
OpenEnergyMonitor. [online] Available at:
https://learn.openenergymonitor.org/electricity-
monitoring/ct-sensors/introduction [Accessed 31 Jan
2018].

[18] Blog.langitrobotika.com. (2018). [online] Available at:


http://blog.langitrobotika.com/wp-
content/uploads/2016/01/arduino-uno.jpg [Accessed 3
Jun. 2018].

[19] DIP-8), I. (2018). IC LM358 Dual OpAmps


(SMD/SOP-8 atau DIP-8). [online] Vcc2GND.com |
Solusi Rekayasa Elektronika. Available at:
http://blog.vcc2gnd.com/2014/02/ic-lm358-dual-
opamps-smdsop-8-atau-dip-8_10.html [Accessed 3 Jun.
2018].

You might also like