0% found this document useful (0 votes)
217 views

Home Automation Raspberry Pi

This document discusses a home automation project using a Raspberry Pi. The project allows users to control home appliances like lights and doors remotely from their office or elsewhere using their cell phone. It also detects intruders using a PIR motion sensor connected to the Raspberry Pi. The system sends commands from a user's device to the Raspberry Pi to control appliances. It also sends sensor data from the Raspberry Pi to IBM's IoT platform to detect motion. The goal is to build a simple yet effective home automation system to control devices and monitor a home remotely.

Uploaded by

ron
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
217 views

Home Automation Raspberry Pi

This document discusses a home automation project using a Raspberry Pi. The project allows users to control home appliances like lights and doors remotely from their office or elsewhere using their cell phone. It also detects intruders using a PIR motion sensor connected to the Raspberry Pi. The system sends commands from a user's device to the Raspberry Pi to control appliances. It also sends sensor data from the Raspberry Pi to IBM's IoT platform to detect motion. The goal is to build a simple yet effective home automation system to control devices and monitor a home remotely.

Uploaded by

ron
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

1.

INTRODUCTION

1.1 WHAT IS HOME AUTOMATION ?


With the rising power of technology, we are able to accomplish things at a much quicker rate.
We have at the touch of a button access to large amounts of information due to the capability of
computers and the Internet. Not only has technology given us more information, but it also has
given us the ability to communicate, organize, and manage our time.

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.

1.2 WHAT IS RASPBERRY PI?


The Raspberry Pi is a credit card-sized computer that plugs into your TV and a keyboard. It is a
capable little computer which can be used in electronics projects, and for many of the things that
your desktop PC does, like spreadsheets, word processing, browsing the internet, and playing
games. It also plays high-definition video.
Raspberry pi 2 The Micro SD card is used for installing OS and the complete project will be done
with python coding. The board has specification:

Figure 1.1 Raspberry Pi B+ model

A 900MHz quad-core ARM CortexA7 CPU


4 USB ports
1GB RAM
Full HDMI port
40 GPIO pins

Display Interface
Ethernet Port
Micro SD card Slot
Combined 3.5mm audio jack and
composite video
Video core IV 3D graphics core

A brief description of the components on the Pi.


1.2.1 Processor / SoC (System on Chip) The Raspberry Pi has a Broadcom BCM2835 System
on Chip module. It has an ARM1176JZF-S processor. The Broadcom SoC used in the Raspberry
Pi is equivalent to a chip used in an old smartphone (Android or iPhone). The Raspberry Pi chip
operating at 700 MHz by default, will not become hot enough to need a heat sink or special
cooling.

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:

GPIO pins can be configured to be input or output


GPIO pins can be enabled/disabled
Input values are readable (typically high=1, low=0)
Output values are writable/readable
Input values can often be used as IRQs (typically for wakeup events)

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.

Figure 2 GPIO pins


3

1.3 WHAT IS IBM BLUEMIX?

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.

1.4 INTRODUCTION TO PROJECT


With the rising power of technology, we are able to accomplish things at a much quicker rate.
We have at the touch of a button access to large amounts of information due to the capability of
computers and the Internet. Not only has technology given us more information, but it also has
given us the ability to communicate, organize, and manage our time.

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.

The project Home automation using Raspberry Pi has different Sections :-

Section 1: Sending commands to the Raspberry Pi


The server side script running on our laptop or on a web server takes input commands from the
user and correspondingly sends it to the client (Raspberry Pi). Here, we will be using commands
to turn a light ON/OFF. When we pass the command to turn ON a light through the server side
script, the information is relayed to the Raspberry Pi and its GPIO pin turns ON a relay. The
system also sends status updates to the server on whether the light is ON/OFF.

Section 2: Receiving data from the Raspberry Pi


In case of sending data from the PIR motion sensor connected to the Raspberry Pi, we run a
script which reads the sensor through a GPIO pin and broadcasts the data through the IoTF
platform. This can then be viewed through the IoTF console or through a custom web application
designed using the platform.

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:

Sending commands to the Raspberry Pi


The server side script running on our laptop or on a web server takes input commands
from the user and correspondingly sends it to the client (Raspberry Pi). Here, we will be
using commands to turn a light ON/OFF. When we pass the command to turn ON a light
through the server side script, the information is relayed to the Raspberry Pi and its
GPIO pin turns ON a relay. The system also sends status updates to the server on whether
the light is ON/OFF.

Receiving data from the Raspberry Pi


In case of sending data from the PIR motion sensor connected to the Raspberry Pi, we
run a script which reads the sensor through a GPIO pin and broadcasts the data
through the IoTF platform. This can then be viewed through the IoTF console or
through a custom web application designed using the platform.

10

2.2

PROJECT FUNCTIONS

Here is have listed the steps which I will follow in making of this project (steps may change)

Step 1: Setting UP/Testing IBM IoTF using a simulator

Step 2: Adding the Raspberry Pi to IBM IoTF

Step 3: Get the API key

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

Step 6: Running and executing the Raspberry Pi home automation system

11

2.3

CIRCUIT DIAGRAMS

Figure 2.1 Circuit Diagram

12

2.4

ADVANTAGES AND DISADVANTAGES

Advantages of the Raspberry Pi

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

3.1 HARDWARE REQUIREMENT:

Raspberry Pi 2

Wifi Module

PIR Sensor

Temperature sensor

3.2 SOFTWARE REQUIREMENT:

Raspbian Jessie

Python 3

Putty

VNC viewer

IBM Bluemix

Text Editor (preferably Sublime Text or Notepad++).

14

4. CONCLUSION AND FUTURE WORK


4.1

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

SCOPE FOR FUTURE WORK

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.

Others future works described below:

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

You might also like