Raspberry Pi based Smart Home for Deployment in the Smart Grid

Raspberry Pi based Smart Home for Deployment in the Smart Grid
International Journal of Computer Applications (0975 – 8887)
Volume 119 – No.4, June 2015
Raspberry Pi based Smart Home for Deployment
in the Smart Grid
Davinder Pal Sharma
Avatar Baldeo
Cassiel Phillip
Lecturer
Department of Physics
University of the West Indies
Trinidad & Tobago
Student
Department of Physics
University of the West Indies
Trinidad & Tobago
Student
Department of Physics
University of the West Indies
Trinidad & Tobago
ABSTRACT
The Smart Grid is an evolution of the existing electricity grid.
It comprises of a two-way communication where electricity
and information is exchanged by the consumer and utility to
maximize efficiency. Home automation is an important
milestone in achieving smart grid and is ever exciting field
that has exploded over the past few years. Advancement in
technologies have made homes more convenient, efficient and
even more secure. Introducing the Raspberry Pi to the world
of home automation provides numerous customizations to
turn a regular home into a smart home. Raspberry Pi provides
a low cost platform for interconnecting electrical/electronic
devices and various sensors in a home via the internet
network. The main objective of present work is to design a
smart home using various sensors which can be controlled and
monitored by the Raspberry Pi via the Internet of Things
(IoT). This will help the home owners to provide a simple,
fast and reliable way to automate their environment. This
paper focuses on two aspects of smart home i.e. home security
and home automation. Home security system, capable of
motion & disturbance detection at entry points and creating an
alarm system with email notification alerts having picture,
was implemented to allow real time monitoring for the house.
The home automation system was also implemented around
the same Raspberry Pi, which includes a smart doorbell, an
automated lighting system and a temperature & humidity
controller that turns an air-condition unit or fan on/off
automatically under given conditions. Python codes were
written for interfacing each sensor and a prototype of smart
home was developed. Smart home was fully tested and
performance was found satisfactory.
General Terms
Home Automation, Digital System Design, Smart Grid
Keywords
Raspberry Pi, Smart Home, Home Automation, Home
Security, Smart Grid
1. INTRODUCTION
The smart grid is an advanced platform to the way we receive
electricity today. In earlier times the demand for electricity
was substantial compared to that presently. Since the demand
for electricity has tremendously increased, a redesign of the
current grid system is much needed. With the technology
available in these modern times, the smart grid could be
designed in such a manner, that it uses digital communications
technology to detect and react to local changes in usage. The
system will feature a two-way dialog where electricity and
information can be exchanged between the consumer and
utility. This can increase or decrease the amount of energy a
consumer needs by analyzing the feedback of the two-way
dialog. The transfer of electricity and information between
consumer and utility would increase efficiency, reliability and
security. The smart grid also enables renewable energy
technology to be integrated into the system for a greener,
more environmentally friendly method of obtaining energy,
thus reducing a percentage of dependency on fossil fuel [1-3].
Home Automation can be considered as an act of using
electronic systems/devices and programming them to replace
a number of human interactions for the control of basic home
functions. This operates on the base of connecting sensors and
devices to the IoT. IoT can be considered as a network of
physical objects which can be accessed via the Internet. For
objects to considered IoT based, networks need to be
converted to an IP-based network for proprietary protocols.
The object being connected to the internet can represent
itself digitally thereby being controlled from anywhere
there is an internet connection. These objects have ability to
transmit and receive data over a network without human-tohuman or human-to-computer interaction. This also means
that more data can be gathered from these objects, even
at a number of places with real-time information being
presented from the objects. This super task can increase
efficiency, safety and security [4].
The smart home is supposed to be in regular interaction with
its internal and external environments. The external
environment consists of all the entities belonging to the smart
grid and the internal environment consists of all appliances
and devices belonging to the smart home, which are centrally
managed by an entity in it [5]. A smart home having
automated system can be created to establish control of
certain aspects of a home. This enhances security and
efficiency of a home, which also gives real time monitoring
via the internet. Apart from controlling the sensors and
components via a device connected to the internet, a centrallycontrolled panel having an LCD screen with keypad or an
LCD touchscreen can be used to control many of the
applications of home automation [6-7]. Some applications of
home automation include automated lights, which can be
programed to turn ON when someone enters a room, or
depending on the time of day or turn ON via a manual
command over the internet. Security system, which can be
controlled with real time monitoring of the house, where
different sensors used in the system can be programed to do
particular things such as take photos, turn on a siren, send
email alerts and much more. Another application of home
automation is a smart thermostat, which can be controlled via
6
International Journal of Computer Applications (0975 – 8887)
Volume 119 – No.4, June 2015
the internet. The thermostat can control the heating system or
air condition system in the house and adjust it to the desired
temperature. The thermostat can also be programed to control
the system turning it ON or OFF depending on the time of day
or depending on the temperature outside. The total market
value for European smart homes market will be worth $13.81
Billion by 2020 at an estimated compound annual growth rate
(CAGR) of 18.17% [8].
The Raspberry Pi and the subject of home automation is
a remarkable one. The Raspberry Pi can be used to automate
a home at a relatively low cost. It operates on the concept as
the IoT. There are numerous things that make the
Raspberry Pi essential for home automation but the one
that stands out the most has to be the remarkably
affordable cost. The vast amount of sensors at extremely
low cost makes it’s superb for home automation. A
security system to be installed into a house can be very
costly from security companies, however with some skills
and time the Raspberry Pi can be programed to be a
security system with as much sensors as you desire, for
a fraction of the cost [9-10]. Figure 1 shows the Raspberry
Pi B model with its specifications.
downloading NOOBS onto
manufacturer’s website [12].
the
SD
card
from
the
PiFace Rack, which is an expansion board with 4 set of 26
GPIO pins, was used to connect Piface digital expander and
Adafruit LCD Pi plate with the Raspberry Pi. Piface digital
expander was used to increase number of digital I/Os and
LCD Pi plate was used to display the status of Raspberry Pi.
All the sensors for home automation and security applications
e.g. PIR infrared motion sensor, magnetic contact switch
(Reed switch), siren, speaker, LEDs, push buttons, DHT 11
sensor, DC fan etc. were connected to Raspberry Pi through
PiFace digital board.
Main controller was also connected to the Wi-Fi module to
obtain the access of internet and html page using smart
phone/computer so as to control/access sensors and devices of
the home anytime, anywhere.
Table 1 shows the list of major components used during this
study. A prototype of smart home was also developed, which
is shown in Figure 3 along with controller unit.
Table 1. List of Major Components
Component
Picture
Raspberry Pi B
Piface Rack
Fig. 1: Raspberry Pi B Model [9]
In the present study an IP-based network was established,
Python codes were written for the sensors, which were
connected to the Pi, a command was then carried out
from the network website, which was processed by the
Pi and reacted with the connected sensors. The purpose
of present study is to build a system of interconnected
devices and sensors, which allow the user to control and
monitor certain electrical/electronic devices in their home
via the internet from the Raspberry Pi. This means
implementing a system which allows real time monitoring
of the home, also forwarding emails to the user when
certain devices are triggered.
Piface Digital
I/O Expander
Adafruit RGB
LCD Plate with
Keypad
PIR Motion
Sensor
DHT 11 Sensor
2. EXPERIMENTAL DETAILS
Block diagram of a Raspberry pi based smart home is shown
in Figure 2. Main controller unit was built around Raspberry
Pi, Piface rack and Piface digital expander. Controller was
attached with Wi-Fi module, smart phone, computer, LCD
module, power supply and various sensors for home
automation and home security features.
The Raspberry Pi operates on a LUNIX based open source
operating system called Raspbian OS. This allows more
control and flexibility in the software therefore making it easy
to program the Pi. The Raspberry Pi communicates with the
attached devices and sensors through PYTHON codes to
control their functions [11]. The Raspbian operating system
was installed onto Raspberry pi, which was obtained by
Reed Switch
Wi-Fi Module
USB Camera
7
International Journal of Computer Applications (0975 – 8887)
Volume 119 – No.4, June 2015
Smart
Phone
Internet
Computer
Wi-Fi
Module
Home Automation
Home Security
Main Controller
Push Button
DHT 11 sensor
DC Fan
LEDs
Speaker
Raspberry
Pi
Power
Supply
Piface
Rack
Piface
Expander
PIR Sensor
Reed Switch
USB Camera
Siren
LCD Pi
Plate
Fig 2: Block diagram of Raspberry Pi based Smart Home
(a)
(b)
Fig 3: (a) Prototype of Smart Home (b) Main Controller
3. RESULTS AND DISCUSSION
Implementation details and results related to the two aspects
of smart home i.e. home security and home automation are
discussed here.
3.1 Home Security
Home security system, capable of motion & disturbance
detection at entry points along with security alarm system
having email notification alerts containing picture, was
implemented to allow real time monitoring of the home
anywhere and anytime.
The Raspberry Pi based home security system was built using
Adafruit RGB positive 16x2 LCD Pi plate, Wi-Fi module,
PIR sensor, USB camera (web cam), Reed switch and internet
access point. To activate the security system, keypad of the
LCD Pi plate was used. Security alarm can be armed or
disabled by pressing up or left keys of keypads for 3 seconds.
Figure 4 indicates the status of alarm on LCD Pi plate. Upon
activating the alarm, an audio output is sent to 3.5mm audio
jack of Raspberry pi and then “System is Armed” sound can
be heard via self-powered audio speaker. All the devices
mentioned above will also become active.
When an object moves within the range of PIR sensor, a
signal is sent to the controller, which initiates the webcam.
Webcam snaps a photo which is stored onto memory card of
Raspberry Pi. The stored photo is then forwarded via email to
the owner with the title “Motion notification” as shown in
Figure 5.
8
International Journal of Computer Applications (0975 – 8887)
Volume 119 – No.4, June 2015
Fig. 4 Home security alarm system status
Home automated light system was designed using HTML and
LEDs. A webpage was developed to control the lights in the
home automatically from an internet using a computer, tablet
or even a cell phone. This system uses a server address hosted
by the Raspberry Pi itself, which is displayed on the LCD Pi
plate during start up. Figure 8 shows the web page, which was
created to control/check the status of lights and other sensors
discussed earlier.
Fig. 5 Email notification upon motion detection
When the door of home equipped with reed switch is opened
as shown in Figure 6, the alarm system detects it as a breach,
which turns ON the siren and a message “System Breached”
is heard on the speaker. At the same time an email is sent to
the owner with title “Door Open” and picture around the door.
Messages, notification titles, recipient email ID etc. were
entered into system through python scripts.
Fig. 6 Entry detection using Reed Switch
3.2 Home Automation
Fig. 8 Webpage to control the smart home
Each button on the webpage is clickable. Buttons on the input
section senses signals from the controller. According to which
input channel/sensor is in use, the respective button will show
ON and its colour will get changed from grey to sky blue.
When any button of the output section is pressed, the
respective output would show ON in red.
To control temperature and humidity inside the home i.e. to
control air conditioner (we have used DC fan here), DHT 11
sensor was used. We configured select button of LCD Pi
plate, which when pressed displays the temperature and
humidity of room/house for 60 seconds as shown in Figure 9
and then returns to its home screen. When the temperature
crosses threshold, 28oC in our case, the fan/AC will be turned
on automatically or also can be turned ON/OFF remotely
through the website by pressing Fan button. When the
temperature drops down to 28oC, the fan/AC will cut back off
and the process is repeated.
The home automation system was also implemented around
the same Raspberry Pi, which includes a smart doorbell, an
web based automated lighting system and a temperature &
humidity controller that turns an air-condition unit or fan
on/off automatically under given conditions.
Figure 7 shows smart door bell, which was built using a push
button, LEDs and a speaker. When the push button is pressed,
LED 1 will turn ON for 15 seconds and voice message
“Someone will attend you shortly” will be heard through
speaker. After LED 1 cutoff, LED 2 will be ON for 10 sec.
and voice message “Sorry, no one is at home, please come
again later” will be heard.
Fig. 9 Temperature/Humidity display
4. CONCLUSION
Very soon in near future, the traditional grids of today will
evolve into a robust, effective, environment friendly and
energy efficient system known as the Smart Grid. Even our
home will undergo its own transformation towards the smart
homes that will be in constant interaction with the grid in an
effort for better energy management and full home automation
to ensure comfort, security and privacy.
Fig. 7 Smart door bell
Present paper sought to design a smart home using various
sensors to be controlled and monitored by the Raspberry Pi
via the IoT. It is focused on two aspects of smart home i.e.
home security and home automation. For home security, the
Raspberry Pi is programed to operate as an alarm system in
9
International Journal of Computer Applications (0975 – 8887)
Volume 119 – No.4, June 2015
which it detects intrusion at entry points along with motion
within the home and where email alerts can be sent with
pictures to allow real time monitoring of the home. Home
automation included a smart door bell, humidity and
temperature control via a fan or air-conditioning system of the
home. This system is also equipped with automated lights and
virtual switches for controlling lights and appliances in the
home remotely using external and / or internal networking
with the Raspberry Pi via an HTML page.
Full functionality of prototype indicates that devices like
Raspberry Pi can play very important role in designing smart
home of the future at very low cost. An energy aware smart
home can be developed using Raspberry Pi and other sensors.
5. ACKNOWLEDGMENTS
[4] Bassi, Alessandro. Enabling Things to Talk: Designing
IoT Solutions with the IoT Architectural Reference
Model, 2013, Vol. 1 No. 1, 1-12.
[5] N. Komninos, E. Philippou and A. Pitsillides, “Survey in
smart grid and smart home security: issues, challenges
and countermeasures”, IEEE Communication Surveys &
Tutorials, 2014, Vol. 16, No. 4, 1933-1954.
[6] Dennis, A. K. 2013. Raspberry Pi Home Automation
with Arduino. Packt Publishing.
[7] Wei, L. Wei, L. Xin, L. 2013. Design and implement on
smart home system. In proceedings of the Fourth
International Conference on Intelligent Systems Design
and Engineering Applications.
Authors are thankful to UWI T&T RDI Fund to provide
necessary financial support to carry out present work through
project on “Capacity Building and Research on Smart Grid
Technology in the Caribbean Region”.
[8] European Smart Homes Market by Products (Security,
Access, Lighting, Entertainment, Energy Management
Systems, HVAC, and Ballast & Battery Pack), Services
(Installation & Repair, Renovation & Customization) &
Country - Global Forecasts and Analysis 2013 – 2020.
6. REFERENCES
[9] Upton, E. Halfacree, G. 2014 Raspberry Pi User Guide,
3rd. Ed. Wiley.
[1] X. Fang et. Al. , “ Smart grid- The new and improved
power grid: A Survey”, IEEE Communication Surveys &
Tutorials, , 2012, Vol. 14, No.4, 944-980.
[2] H. Gharavi and R. Ghafurian, “Smart grid: The electric
energy system of the future”, Proceedings of the IEEE,
2011, Vol. 99, No. 6, 917 – 921.
[3] A. Ipakchi and F. Albuyeh, “Grid of the future”, IEEE
Power & Energy Magazine, 2009, Vol. 7, No. 2, 52–62.
IJCATM : www.ijcaonline.org
[10] Richardson, M. Wallace, S. 2014 Getting Started with
Raspberry Pi, 2nd. Ed. Maker Media Inc.
[11] Bradbury, A. Everard, B. 2014 Learning Python with
Raspberry Pi. Wiley.
[12] FOUNDATION, RASPBERRY PI. 2014. NOOBS
SETUP.
Accessed
11
21,
2014.
http://www.raspberrypi.org/help/noobs-setup/.
10
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising