Respberry Pi Basic
Respberry Pi Basic
I. INTRODUCTION
Home automation refers to the application of computer and
information technology for control of home appliances and
domestic features. Its application varies from simple remote
control of lighting to complex computer/micro-controller based
networks involving varying degrees of intelligence and
automation. Home automation results in convenience, energy
efficiency, and safety benefits leading to improved quality of
life.
The popularity of network enabled home automation has
been increasing greatly in recent years due to simplicity and
much higher affordability. Moreover, with the rapid expansion
of the Internet, there is the potential for the remote control and
monitoring of such network enabled appliances. However, the
new and exciting opportunities to increase the connectivity of
devices within the home for the purpose of home automation
through internet are yet to be explored.
Several definitions are available in the literature for home
Automation. Bromley et at (2003) describes home automation
as the "introduction of technology within the home to enhance
the quality of life of its occupants, through the provision of
different services such as telehealth, multimedia entertainment
and energy conservation". There has been significant research
into the field of home automation with many other
communication protocols like bluetooth, hand gestures, DTMF
etc. The XlO industry standard, developed in 1975 for
communication between electronic devices, is the oldest
standard identified from the author's review, providing limited
control over household devices through the home's power lines.
Sriskanthan et at (2002) introduced a Bluetooth based home
automation system, consisting of a primary controller and a
number of Bluetooth sub-controllers. AI-Ali et at (2004)
978-1-4799-2995-5/14/$31.0020 14 IEEE
277
Raspberry Pi
Quick start
Receiving
III.
CONTROL ALGORITHM
3V3
LED (Switch (l
I
LED2(Switch2) rI
I
GPI04
GPIOl7
5V
GND
I)
10
11
12
13
14
15
16
LED3(Switch3)
GPIOl8
278
The GPIO pins for input and output have been defined to
control different devices. The Raspberry Pi board has GPIO pin
layout as shown in fig. 4. Out of the 26 pins, 3 pins have been
used to control three devices in this project which have been
represented by 3 LEDs for testing the switching signal. For
practical purposes a relay driver circuit and relays can be
interfaced with Raspberry Pi and appliances, respectively, for
their controlling.
if(len(x)<>O):
GPIO.setmode(GPIO.BOARD)
#s ignal to devices
if(x[O]
==
'ONI'):
==
#Turn ON LEDI
'ON2'):
==
#Turn ON LED2
'ON3'):
Dedicated to
GPIO.output(12,GPI0.HIGH)
if(x[O]
==
#Turn ON LED3
'OFFI '):
==
'OFF2'):
Implement
the funct ion
if(x[O]
correspondi
==
'OFF3'):
ng to the
read subject
GPIO.setup( 12,GPIO.OUT)
and reply
GPIO.output(12,GPI0.LOW)
the status to
the senrer
time.sleep(O.S)
#call delay
update
Fig. 7. Working Experimental setup, responding to email with subject 'On I"
i.e. LEDI is glowing, representing the switching signal for switch I.
279
O N l ' w a s s e n t t o r a s p b e r r y P i a c c o u n t
('[email protected]' in this case) from the consumer
account (,[email protected]' in this case). The algorithm,
read the subject 'ONI' and turned ON the device 1 represented
by LEDI and instantly replied to sender by an email 'Turning ON switch l' under the subject- 'Home automation
activated'. The code also includes exception handling in case of
invalid e-mail from the consumer.
Go gle
Gmail-
*NH+*
Inbox
Home_automation_activated
Starred
Sent Mail
Turning ON swithch
Drafts
Circles
to anantvaib ....
-
.....
Search, chat
or SMS
to ananLvaib ....
Turning ON switch
Learn more
[email protected]
to ananLvaib ....
Turning ON swithch
Fig.
REFERENCES
[I]
[2]
c.,
"Technical Development
Implications of the
and
Socioeconomic
Ardam H. and Coskun I., "A remote controller for home and
[4 ]
gle
Gmail
10
Important
Go
....
Systems,
More ..
Primary
Connectivity
and
Services",
www.nextwave.org.uk,2003.
[6]
.-
Soc
Inbox
Anant vaibhav (2)
[7]
ON1
Starred
Important
Sent Mail
Anant vaibhav
OFF1
Anant vaibhav
ON2
Saito T., Tomoda I., Takabatake Y., Ami J. and Teramoto K.,
"Home Gateway Architecture And Its Implementation", IEEE
International Conference on Consumer Electronics, pp. 194195,2000.
[9 ]
Fig.
280
Communication