Home Automation Raspberry Pi
Home Automation Raspberry Pi
INTRODUCTION
Home automation refers to the use of computer and information technology to control home
appliances and features (such as windows or lighting). System can range from simple remote
control of lighting to complex microcontroller based networks with varying degrees of
intelligence and automation. Home automation is adopted for reasons of ease, security and
energy efficiency.
In modern constructions in industrialized nations, most homes have been wired for electrical
power, telephones, cable wires etc. Many households tasks were automated by the development
of specialized appliances. For instance automatic washing machines were developed to reduce
the manual labor of cleaning cloths, and water heaters reduces the labor necessary for bathing.
As the number of controllable devices in the home rises, interconnection and communication
becomes a useful and desirable feature. For example AC will send a alert message when it needs
cleaning, or refrigerator when it needs service. Rooms will become intelligent and will send
signals to the controller when someone enters. If no one is supposed to be home and the alarm
system is set, the system could call the owner, or an emergency number.
In simple installations, automations can be straightforward as turning on the lights when a person
enters the room.
In advance installations rooms can sense not only the presence of a person inside but know who
that person is and perhaps se appropriate lighting, temperature, music levels or television
channels, taking into account the day of the week, time of the day, and other factors.
Display Interface
Ethernet Port
Micro SD card Slot
Combined 3.5mm audio jack and
composite video
Video core IV 3D graphics core
1.2.2 Power source The Pi is a device which consumes 700mA or 3W or power. It is powered
by a MicroUSB charger or the GPIO header. Any good smartphone charger will do the work of
powering the Pi.
1.2.3 SD Card The Raspberry Pi does not have any onboard storage available. The operating
system is loaded on a SD card which is inserted on the SD card slot on the Raspberry Pi. The
operating system can be loaded on the card using a card reader on any computer.
1.2.4 GPIO General Purpose Input Output General-purpose input/output (GPIO) is a generic
pin on an integrated circuit whose behaviour, including whether it is an input or output pin, can
be controlled by the user at run time.
GPIO capabilities may include:
The production Raspberry Pi board has a 26-pin 2.54 mm (100 mil) expansion
header, marked as P1, arranged in a 2x13 strip. They provide 8 GPIO pins plus
access to IC, SPI, UART), as well as +3.3 V, +5 V and GND supply lines. Pin
one is the pin in the first column and on the bottom row.
IBM Bluemix is a cloud platform as a service (PaaS) developed by IBM. It supports several
programming languages and services[1] as well as integrated DevOps to build, run, deploy and
manage applications on the cloud. Bluemix is based on Cloud Foundry open technology and runs
on SoftLayer infrastructure. Bluemix supports several programming languages[2] including Java,
Node.js, Go, PHP, Swift, Python, Ruby Sinatra, Ruby on Rails and can be extended to support
other languages such as Scala[3] through the use of buildpacks.
The IBM Internet of Things service lets your apps communicate with and consume data collected
by your connected devices, sensors, and gateways. Our recipes make it super easy to get devices
connected to our Internet of Things cloud. Your apps can then use our real-time and REST APIs
to communicate with your devices and consume the data you've set them up to collect.
Home automation refers to the use of computer and information technology to control home
appliances and features (such as windows or lighting). System can range from simple remote
control of lighting to complex microcontroller based networks with varying degrees of
intelligence and automation. Home automation is adopted for reasons of ease, security and
energy efficiency.
In modern constructions in industrialized nations, most homes have been wired for electrical
power, telephones, cable wires etc. Many households tasks were automated by the development
of specialized appliances. For instance automatic washing machines were developed to reduce
the manual labor of cleaning cloths, and water heaters reduces the labor necessary for bathing.
As the number of controllable devices in the home rises, interconnection and communication
becomes a useful and desirable feature. For example AC will send a alert message when it needs
cleaning, or refrigerator when it needs service. Rooms will become intelligent and will send
signals to the controller when someone enters. If no one is supposed to be home and the alarm
system is set, the system could call the owner, or an emergency number.
In simple installations, automations can be straightforward as turning on the lights when a person
enters the room.
In advance installations rooms can sense not only the presence of a person inside but know who
that person is and perhaps se appropriate lighting, temperature, music levels or television
channels, taking into account the day of the week, time of the day, and other factors.
My project lets you operate your home appliance like lights and doors from your office or any
other remote place. So if you forgot to switch off the lights or other appliances while going out, it
5
helps you to turn off the appliances with your cell phone. Your cell phone works as remote
control to your home appliances. You can control the desired appliance by presetting the
corresponding key. The system also gives you voice acknowledgement of the appliance atatus.
1.5
OBJECTIVE
We all have at some point of life desired to control everything at the click of a button. May it be
turning off unnecessary lights when you are not at home to detecting intruders when you are not
around. This tutorial will guide you to build a simple raspberry pi home automation system that
will allow you to control appliances in your home from anywhere in the world. And it will also
allow you to view data from the PIR motion sensor via the internet to detect intruders. This
project will be using platforms like the Raspberry Pi, IBMs IoTF (Internet of Things
Foundation) and Bluemix packages. And can be used as a perfect project to get into the world of
Internet of Things.
1.6
MOTIVATION
I was always interested in automating the things around me from an early age. So I started to
learn about electronics and how to make use of switches and sensors to control the various
electronic equipment.
I came across Raspberry Pi in my freshman year of Engineering and started to work on it in third
year. In my third year I also made a project on Fully Automated Home Security System using
Arduino.
2. OVERALL DESCRIPTION
2.1
DESIGN METHEDOLOGY
The design consists more on actual planning of hardware part than the code to be created. A
number of software and hardware implementation techniques were used to design and develop
the system.
This section can be divided into many parts: Raspberry pi controller, Wifi dongle, Camera
design, Power supply adapter, Ultrasonic sensor, IR sensors, and Motor control design. Block
diagram is shows as below:
The Raspberry Pi home automation system uses client and server side python scripts. These can
communicate with each other through IBMs IoTF platform. This whole Internet of
Things project can be divided into two parts:
10
2.2
PROJECT FUNCTIONS
Here is have listed the steps which I will follow in making of this project (steps may change)
Step 4: Assembling the components together for the Raspberry Pi home automation
system
Step 5: Setting up the client and server side python scripts for the Raspberry Pi home
automation system
11
2.3
CIRCUIT DIAGRAMS
12
2.4
This microcomputer is useful for small or home based businesses that run on a smaller
budget than bigger companies for you are not required to purchase any special licenses
from the Raspberry Pi Foundation to use their product or if you invent new technology that
embeds the product.
The product does not require the user to have extensive programming experience since it
is aimed for the younger generation to learn about programming. Python, the programming
language that the Pi uses, is less complex than other languages available.
The SD cards on the board can be easily switched, which allows you to change the
functions of the device without spending a lot of time re-installing the software.
The Raspberry Pi is perfect for adaptive technology: it is able to display images or play
videos at 1080p high definition resolution. This product makes it possible to build complex
and effective products at a cheaper price.
This small credit card sized product makes it easy to recycle and does not release as much
carbon dioxide emissions into the environment, unlike big servers that require lots of
energy and extensive cooling systems.
Disadvantages
It does not replace your computer, since the Ethernet is only a 10/100 and the processor is
not as fast, it is time consuming to download and install software and is unable to do any
complex multitasking.
Not compatible with other operating systems such as Windows (There are currently 1.3
billion Windows users around the world.)
This product will not be useful for bigger businesses that already have big servers, which
would already do everything that the Raspberry Pi does, so it would not be worth it to take
the time to get someone to put it together.
13
3. SYSTEM REQUIRMENTS
Raspberry Pi 2
Wifi Module
PIR Sensor
Temperature sensor
Raspbian Jessie
Python 3
Putty
VNC viewer
IBM Bluemix
14
CONCLUSION
To get to the aim of a project there will be always a set of objectives, to achieve that objectives
we need to know how where and with what resource is the step towards completing the
objectives taken. Now in this project too to get to the aim of the project there was a set of
objectives, which gradually changed as the project research was completed and then while
testing a certain technology the objectives again changed due to the failure of the method.
Now the first thing of the project is a good research, I had to do a wide and a strong research
before I started to put my objectives as this technology was new in market. The research for the
project was done using Advanced Google search and also from the search engines available in
the student portal like tutorials, pi4j, w3school and raspberry pi. The Google advanced search is
the one that was more widely used as it is a new technology and there are very less articles or
journals published regarding the raspberry pi technology and IoT.
Each stage of the project was tested after every part of it was completed and then moved on to
the next one. During the course of the project I gained knowledge of Java I also gained
knowledge of the raspberry pi technology and what the small computer is capable of. After
knowing the capabilities of raspberry pi and the applications it could have in the field of robotics,
and IoT it actually has made me to think of doing more research work on the raspberry pi for the
robotic and IoT applications. The challenges that I faced during the course of the project were
that of the time constrain, as I had to learn about the raspberry pi and then learn programming in
Java and HTML. Then during the programming of the server client interfaces the problems of
calling functions with a button press. One of the main challenges that No output comes when
some functions are called from software side. Other than the small problem the buddy robot
works fine and meets all its purpose. If given an opportunity to work again on the same
technology i.e. the raspberry pi and IoT technology or on a project like this where the raspberry
pi is used for any kind off application I would be happy to take it up.
15
4.2
In the future this raspberry pi technology can be used in various different fields of work. The home
automation system can be made autonomous with the help of more sensor, gyroscope, compass
and a GPS. So that it can be set to a target or a specific area where in can monitor. The robot can
also be developed into an advanced robot toy for young people.
Face recognition: All the family members face images are stored in controller when an
unknown person will come at door, it will create alert and click the image and send it to
user.
In changing the Mechanical design work using the same concept, different functions as
Open the door, Turn on/off switch, bring newspaper for user, etc work can be done.
Make a simple unified platform which can be accessed on any device to control the system
16
REFERENCES
[1] About Raspberry Pi, http://www.raspberrypi.org/about/
[2] Early prototype of Raspberry Pi, http://www.raspberrypi.org/raspberry-pi-2006-edition/
[3] Raspberry Pi Hardware information, http://elinux.org/RPi_Hardware
[4] How SoC works, http://www.androidauthority.com/how-it-works-systems-on-a-chip-soc93587/
[5] Boot process, http://thekandyancode.wordpress.com/2013/09/21/how-the-raspberry-pi-bootsup/
[6] List of available OS, http://elinux.org/RPi_Distributions
[7] Home automation project, http://www.instructables.com/id/Raspberry-Pi-GPIO-homeautomation
17