You are on page 1of 4

Intelligent Automation System using Raspberry Pi

Pavitra S. Kambli

Rakesh P. Tapaskar

Assistant Professor
Department of Electrical and Electronics.
KLE Institute of Technology
Hubballi
pavitrakambli5@gmail.com

Research Associate
Department of Mechanical Engineering.
B V Bhoomaraddi College of Engg. & Tech.
Hubballi,
rptapaskar@gmail.com

Abstract Modern day networking tools have shrunk the


world in the finger tips, each process or activity can be monitored
and controller remotely using IoT based system. The advent of
embedded systems and digital technology has proved to be a boon
for automation of things. Such an application of automation with
the use of IoT has been discussed in the presented paper. The
heart of the system is credit card sized computer known as
Raspberry Pi, which is powerful enough to replace the desktop
computer for the networking and IoT applications. Raspberry Pi
is used as the central communication and control unit for the
home automation system elaborated in the paper. Arduino
microcontroller acts as the slave device which accepts
instructions from the Raspberry Pi to perform the switching and
controlling actions as dictated by the remote user or as per the
programmed conditions. Raspbian operating system on the
Raspberry Pi along with the python programming language is
used to toggle the states on the GPIO which in turn facilitate the
relays to switch the domestic loads. Temperature and PIR sensors
are used for the sensing the home temperature and presence for
any activity to take autonomous decisions to switch the loads. The
Raspberry Pi is accessed through SSH/Putty Session running on
any mobile or laptop which is connected to internet. Using both
Arduino and Raspberry Pi in home automation have many
advantages such as open source, low system cost, consumes less
space and increased flexibility.
Keywords Automation, Raspberry Pi, Arduino;

I.

INTRODUCTION

Electronic Home automation systems based on internet


have become the most popular home automation systems in the
market. The monitoring and controlling of home appliances remotely
using internet requires a computer, which is large in size and it is
heavy to carry around. Generally, home automation systems make
use of different wireless communication standards for data exchange
and signaling between their components, such as Bluetooth, Wi-Fi,
ZigBee and the GSM (Global System for Mobile Communication).
Wireless based home automation systems increase system scalability
and flexibility due to decrease in installation cost and effort.
In Home automation systems, collections of
interconnected devices are needed to control and monitor
various appliances running within a house.

II. SYSTEM WORKING


A. Problem Statement
This paper work focuses on the design and
development of a smart and intelligent home automation
system. The system includes the usage of Raspberry Pi as a
server system. The automation of home appliances is
accomplished using AVR microcontroller board called
Arduino MEGA, to which the sensors are connected and the
board is programmed to control the appliances running in
home. Also, the user has a provision to disable the automation
process and manually override and control the appliances in
home by remotely accessing the Raspberry Pi server system
using PuTTY SSH client. This system helps users to remotely
access the home aminities over a network and also helps old
aged and physically handicapped people.
B. Proposed System
The proposed home automation system has two main
components. An AVR microcontroller named Arduino MEGA
and a Raspberry Pi board. The automation of home appliances
is achieved using AVR microcontroller, Arduino MEGA to
which the sensors are connected. Analog sensors are
connected to AVR microcontroller through in-built Analog to
Digital convertor, whereas digital sensors are directly
connected to digital pins of microcontroller. The sensor data is
then fed to the Arduino which decides further action to be
taken based on the sensor data. The Arduino is connected to a
slave Relay board. According to the commands sent by
Arduino the relay controls the corresponding appliances
running in home. Here the users have a provision to control
the appliances in home remotely PuTTY SSH client, from
anywhere in the world by disabling the automation. This is
called manual overriding because the commands given by a
remote user override the automatic operation between sensors
and appliances via Arduino. For this, the user gives commands
to Raspberry Pi, which in turn is connected to a master relay
circuit board. According to the action taken by Raspberry Pi,
the relay controls the appliances.
III. SYSTEM DESIGN
Design involves the process of defining the systems
architecture, its components and modules, interfaces and data
required for the system to satisfy the specified hardware and
software requirements.

A. Architectural Design
Architectural design shows the structure of components
such as data and program that are required to develop a
computer based system.

Fig 1. Proposed Home Automations Architecture

B. Proposed Methodology

The proposed home automation system has two


main components. An AVR microcontroller named
Arduino MEGA and a Raspberry Pi board. The
automation of home appliances is achieved using AVR
microcontroller, Arduino MEGA to which the sensors
are connected. Analog sensors are connected to AVR
microcontroller through in-built Analog to Digital
convertor, whereas digital sensors are directly
connected to digital pins of microcontroller. The sensor
data is then fed to the Arduino which decides further
action to be taken based on the sensor data. The
Arduino is connected to a slave Relay board.
According to the commands sent by Arduino the relay
controls the corresponding appliances running in home.
Here the users have a provision to control the
appliances in home remotely PuTTY SSH client, from
anywhere in the world by disabling the automation.
This is called manual overriding because the
commands given by a remote user override the
automatic operation between sensors and appliances
via Arduino. For this, the user gives commands to
Raspberry Pi, which in turn is connected to a master
relay circuit board. According to the action taken by
Raspberry Pi, the relay controls the appliances.

Fig 3. Data Flow Diagram of Proposed System

IV. SYSTEM IMPLEMENTATION


Sensors will sense the physical data and the sensor data
will be fed to AVR microcontroller named Arduino Mega
2560. Based on the sensor data Arduino decides further
actions to be taken and it enables the slave relay board and
relay controls (turning ON and OFF) the corresponding
appliances running in home. Raspberry Pi which acts as a
server system will decide further action to be taken and sends
actuating signals to relay board which will control the
appliances running in home. This is automation. Also, the user
has a provision to disable the automation process and
manually override and control the appliances in home by
remotely accessing the Raspberry Pi server system using
PuTTY SSH client. This system helps users to remotely access
the home aminities over a network and also helps old aged and
physically handicapped people.
The system is more flexible and scalable, as it allows the
safe and secure addition of home appliances which are
designed by multiple vendors, to the home network with the
least amount of effort. The serial data which comes from
internet is fed to Raspberry-Pi circuit. The heart of the home
automation system has a Raspberry-Pi board. This board can
be viewed as a small computer which is capable of doing
many functions. This raspberry-pi board can be configured for
each and every home appliance. So based on the user
intervention, the appliance which gets matched out will make
high and then the corresponding relay makes the switch on
and device starts functioning.
A. System Components
a) Sensors : Sensors are used to sense the physical
data according to environmental conditions. The different
sensors used like tempature and light sensors.

Fig 2. Block Diagram of Proposed Home Automation System

C. Data Flow Design


A data flow diagram shows the graphical representation of
the data flow through an information system along with
modelling its process aspects. Often the data flow diagrams
are a preliminary step which are used to create an overview of
the entire system which can be elaborated later. Data Flow
Diagrams (DFDs) can also be used for the purpose of
visualization of data processing. The following figure
represents the data flow diagram of the proposed home
automation system.

b) AVR microcontroller :
The Arduino
Software is an open source Integrated Development
Environment (IDE), which makes it easy to write the code and
upload it to the board. This runs on Windows, Linux and Mac
OS X. The Arduino environment is written in Java based on
Processing and many other open-source softwares. The
arduino software can be used with any type of Arduino
boardlike ATMEGA 328, Arduino Mega 2560 etc. Arduino
receives inputs from many physical sensors connected to it
according to environmental conditions, and affects its
surroundings by monitoring and controlling various appliances
like lights, motors, and other actuators. We can tell the

Arduino what to do by writing a code in Arduino


programming language using Arduino IDE 1.6.5.
c) Raspberry Pi: The Raspberry Pi is a credit-card
sized computer which is small in size and has low cost that
can be plugged into a television, computer monitor via HDMI
and it uses a standard USB keyboard and mouse. This small
powerful device is cost effective which allows people to
explore computing, and learn programming in different
languages such as Scratch and Python. Raspberry Pi is capable
of doing everything that we expect a desktop computer to do,
which includes browsing the web pages, playing highdefinition video, making spreadsheets, word-processing, and
playing games etc. People all over the world make use of
Raspberry Pi to learn programming in different languages like
Scratch and Python and understand the working of computers.
d) User Interface :
User interface is everything
which the user is able to see and interact with. In this project a
user who wishes to have remote access to Raspberry Pi in
order to manually control the appliances running in home,
establishes an interface with Raspberry Pi via PuTTY SSH
over a network such as Ethernet. This interface must allow the
user to disable the automation process and manually override
the control of appliances.
e) Relay circuit :
A relay is a switch which is
electronically controlled. There are many forms of switches
and so do relays. It is an electromagnetic switch which is
operated by a small electric current which can turn on or off a
higher electric current. An electromagnet is the heart of the
relay. There exist a number of different relay boards right from
the simplest 2-channel to 16-channel boards. In this project, 4
channel relay board is used as a slave relay for the automation
of home appliances using Arduino to which the sensors are
connected. Also, 8 channel relay board is coupled with
Raspberry Pi and used it as a master relay for manual
overriding of the control of appliances in home by a remote
user via PuTTY SSH.
f) Appliances : A variety of appliances can be used
in home automation systems such as light, fan, heater, air
conditioner and many other electrical appliances. In this
project, we have used 3 230V bulbs and a fan to build the
home automation system. The automation of these appliances
running in home is carried out by Arduino that receives the
physical data through temperature and light sensors which are
connected to it. These appliances can also be controlled
manually by a remote user by using PuTTY SSH over a
network such as Ethernet.
V. OPERATION OF SYSTEM
The aim of this paper is to develop a smart and
intelligent home automation system. In the first part of the
paper an AVR microcontroller named Arduino Mega 2560 is
used for automation. Two sensors named LM35 temperature
sensor and light sensor are connected to analog inputs of
Arduino board (A0 and A1). Sensors sense the physical data

according to environmental conditions and provide this data as


input to Arduino. Based on the sensor data the Arduino
decides further action to be taken. The threshold value set for
temperature sensor is 42 degree Celsius and hence when the
temperature goes beyond 42 degrees, Arduino decides to make
fan ON and the corresponding action takes place via 4 channel
slave relay board. Similarly, the threshold value set for light
sensor is 600. When the brightness is less than 600, Arduino
decides to ON 3 230V bulbs and these actions will be taken
place via relay board. This happens automatically and this is
nothing but home automation.
The second part of the paper involves manual
overriding of automation. To do this, we make use of a small,
low cost, credit card sized computer called Raspberry Pi. This
Raspberry Pi board has an SD card in which the Raspbian OS
is loaded. This board is programmed in Python programming
language to control the home appliances. The RPi is in turn
connected to a 8 channel master relay board which can control
appliances according to the commands given by Raspberry Pi.
To remotely access the home appliances, we need to have
remote access to Raspberry Pi. For this we make use of SSH
client, a commonly used one is PuTTY. PuTTY is downloaded
in our laptop which has Windows OS. To get connected to Pi
remotely, we need to give the IP address of Pi after running
putty.exe. Once the PuTTY session starts, we will have the
Raspberry Pi prompt which is identical to the prompt on the
Raspberry Pi itself. Now, we can give commands in PuTTY
which will access the Raspberry Pi and the corresponding
actions will be taken place through master relay board. This
operation is called manual overriding.
VI. RESULTS AND DISCCUSSIONS
The first part of the paper includes the automation of home
appliances by the usage of AVR microcontroller named
Arduino Mega 2560. The LM35 temperature sensor and light
sensors are connected to analog inputs of Arduino. Sensors
sense the physical data according to environmental conditions
and this data is fed to Arduino. Arduino receives the sensor
data as its input and decides further action to be taken based
on the program loaded into it.
The second part of the project is manual overriding of
automation and controlling of home appliances. This involves
the usage of Raspberry Pi which is a small, single board
computer. The Raspberry Pi board is programmed in Python
programming language to control the appliances running in
home. To access the home appliances remotely, we need to
have remote access to Raspberry Pi. For this we make use of
SSH protocol, a commonly used one is PuTTY. PuTTY is
downloaded in our laptop having Windows OS and by putting
the IP address of Raspberry Pi after running putty.exe, we will
have a prompt which is identical to the prompt on Raspberry
Pi itself. Commands which are given in PuTTY reflect in
Raspberry Pi and corresponding actions take place via master
relay board. In this way we can disable the automation process
and manually override to control the appliances. The programs
used for manual override are those which are written in
Python language and loaded on Raspberry

VII. CONCLUSION
The proposed system of home automation integrates
electrical appliances or devices within the house with each
other. The main components are Raspberry Pi and Arduino.
The sensors are connected to Arduino and based on the sensor
data Arduino decides further action to be taken, sending
actuating signals to relay board, which in turn switch or
regulate high power AC devices/equipments. Also, the user
can control home appliances remotely by having access to
Raspberry Pi via SSH/PuTTY.
The Raspberry Pi board which is being used in our home
automation system has its application in a wide range of fields.
Using both Arduino and Raspberry Pi in home automation
makes the system cost effective, more compact, flexible and a
novel home automation system.

v. Mass production of this system in the form of automation


product will reduce the overall system cost and reduce the
payback of capital incurred.
References
[1]

[2]
[3]

[4]

VIII. FUTURE SCOPE


i. This paper can be ascended to meet large automation for
industrial purpose.
ii. Flexibility of user interaction with the model can be
altered by implementing different interfaces like
Bluetooth, ZigBee or NFC as per the requirement.
iii. Switching time can be greatly reduced by implementing
MOSFETS as switches instead of electromechanical
relays for smooth and quick response of the system.
iv. Switching can be programmed on the basis of priority so
that specific switch may be included by default in
automation or manual over ride mode depending on load.

[5]

[6]

Shaiju Paul, Ashlin Antony, Aswathy Android Based


Home Automation Using Raspberry Pi, IJCT Journal
Volume 1, Issue 1, February 2014.
Jrg Walter, Maher Fakih, and Kim Grttner, HardwareBased Real-Time Simulation on the Raspberry Pi, 2013
D.Jeevanand,
K.Keerthivasan,
J.MohamedRilwan,
P.Murugan, Real Time Embedded Network Video
Capture And SMS Alerting system, International
Journal of Communication and Computer Technologies,
Volume 02 No.11 Issue: 05 June 2014, ISSN
NUMBER : 2278-9723
Sanjana Prasad, P.Mahalakshmi, A.John Clement Sunder,
R.Swathi, Smart Surveillance Monitoring System Using
Raspberry PI and PIR Sensor, (IJCSIT) International
Journal of Computer Science and Information
Technologies, Vol. 5 (6) , 2014, 7107-7109
SriSaiCharan Naidu, Touch Screen Based Home
Automation Using Bluetooth With Rasberry Pi, Volume
No: 1(2014), Issue No: 10 (October) ISSN No: 2348-4845
Bhuvaneswari.S,
Sahaya
Anselin
Nisha.A,
Implementation of Tcp/Ip on EmbeddedWebserver Using
Raspberry Pi In Industrial Application, International
Journal of Advanced Research in Computer and
Communication Engineering, Vol. 3, Issue 3, March
2014.

You might also like