You are on page 1of 85

Multipurpose Pi

INTRODUCTION

A Project Report On

Multipurpose Pi
Submitted in Partial Fulfilment of
The Degree of

Bachelor of Engineering
In
Computer Engineering
(8thSEM)

Prepared By
Parth N Parikh (100640107058)
Piyush Sahani (100640107059)
Dharmendra Singh Pal (110640107032)
Guided By

Assistant Prof. Rohit Tiwari

GUJARAT TECHNOLOGICAL UNIVERSITY (GTU)

K.J.INSTITUTE OF ENGINEERING & TECHNOLOGY,


SAVLI, DIST: VADODARA
DEPARTMENT OF COMPUTER ENGINEERING

May 2015
KJIT
[1]

Multipurpose Pi

INTRODUCTION

K.J.INSTITUTE OF ENGINEERING & TECHNOLOGY,


SAVLI, DIST: VADODARA

CERTIFICATE
This is to certify that this work of UDP entitled Multipurpose Pi represents the bonafide work
of Parth N Parikh (100640107058), Piyush G Sahani (100640107059) and Dharmendra Singh Pal
(100640107032) for the partial fulfilment of the degree of Bachelor of Engineering in Computer
Engineering at the Department of Computer Engineering, K.J.Institute of Engineering &
Technology, Savli, Vadodara, Gujarat, during the academic year 2014-15 (Sem-8) and his work is
satisfactory.

Internal Guide,

Project Coordinators,

Rohit Tiwari

Dipali Jitiya

Assistant Professor

Assistant Professors

Computer Engineering Department

Computer Engineering Department

Head of Department,

Principal,

Sohil Shah

Dr. Neetha John

Assistant Professor

KJIT,Savli.

Computer Engineering Department

KJIT
[2]

Multipurpose Pi

INTRODUCTION

Abstract
Project Description:
In todays fast growing world of technology computer and its proper education is very
important. Our proposed project`s motto is to make available an learning platform at very low
cost which could be affordable by each and every one, Project Multipurpose Pi will be
developed using the concepts of embedded system Raspberry PI configuring with different
applications , open source codes and tools to sum-up a perfect credit card sized device with
multiple functions.
Applicability of the Project:
This project is applicable for both Commercial and Public Utility Model. Web Server,
Controlling electronic devices, NAS, Media Centre, and Video Gaming.

KJIT
[3]

Multipurpose Pi

INTRODUCTION

ACKNOWLEDGEMENTS
I would like to acknowledge the contribution of certain distinguished people, without their support
and guidance this project work would not have been completed.
I take this opportunity to express my sincere thanks and deep sense of gratitude to my internal project
guide Mr.Rohit Tiwari, Asst. Professor, Computer Engineering, KJIT, for his guidance and moral
support during the course of preparation of this project report. I really thank him from the rock bottom
of my heart for always being there with his extreme knowledge and kind nature.
I take this opportunity to thank all my friends and colleagues who started me out on the topic and
provided extremely useful review feedback and for their all-time support and help in each and every
aspect of the course of my project preparation. I am grateful to my K.J. Institute of Engineering &
Technology, Savli for providing me all required stuff and good working environment.

Acknowledgements and thanks are also extended to all the authors whose articles have been referred
to for the completion of this report.

Parth N Parikh
Piyush Sahani
Dharmendra Singh Pal

KJIT
[4]

Multipurpose Pi

INTRODUCTION

LIST OF FIGURES
Figure Number

Description

Page Number

Figure-3.1

E-R Diagram

35

Figure-3.2

Use case Diagram

37

Figure-3.3

Sequence Diagram

39

Figure-3.4

Activity Diagram

41

Figure-3.5

Class Diagram

43

Figure-4.2.1

Desktop on High Resolution Display (HDMI)

48

Figure-4.2.2

Desktop on Low Resolution Display (RCA)

49

Figure-4.2.3

Gamming On Multipurpose Pi

50

Figure-4.2.4

IDLE - Python Programming

51

Figure-4.2.5

Graphics Creation Programming

52

Figure-4.2.6

Starting Raspbian

53

Figure-4.2.7

Starting Raspberry Pi Controlling Via SSH

54

Figure-4.2.8

Shell in Raspbian

55

Figure-4.2.9

Using Scratch Programming

56

Figure-4.2.10

Raspbian Basic Configuration Menu

57

Figure-4.3.1

XBMC Main Screen

58

Figure-4.3.2

Images from Hard Drive

59

Figure-4.3.3

Live Radio

60

Figure-4.3.4

Live Tv (with Addon IPNA)

61

Figure-4.3.5

Live TV

62

Figure-4.3.6

Movies Title

63

Figure-4.3.7

Music from Hard Drive

64

Figure-4.3.8

Music Streaming from Android Phone

65

Figure-4.3.9

Music Streaming from Internet

66

Figure-4.3.10

Video Streaming from Android Phone

67

Figure-4.4.1

LED Testing With GPIO

68

Figure-4.4.2

Single LED Blinking

69

Figure-4.4.3

Controlling LED Using Android Device

70

Figure-4.5.1

Network Attached File Server (NAS)

71

KJIT
[5]

Multipurpose Pi

Figure-4.6.1

INTRODUCTION

Accessing Web Server

72

LIST OF TABLES
Page
Number

Table Number

Description

Table 4.1.1

Raspberry Pi Specifications

45

Table 4.1.2

GPIO input/output pin electrical characteristics

46

Table 4.1.3

GPIO 26 Pin Header

47

KJIT
[6]

Multipurpose Pi

INTRODUCTION

ABBREVIATIONS AND SYMBOLS


ABBREVIATIONS
GPIO

: General Purpose Input Output

SDLC

: Software Development Life Cycle

SRS

: System Requirement Specification

UML

: Unified Modelling Language

GUI

: Graphical User Interface

KJIT
[7]

Multipurpose Pi

INTRODUCTION

SYMBOLS
E-R Diagram:
Entities:

Attributes:

Relationship:

Link:

Data flow Diagram:


Data Flow:

Process:

Source:

Data Store:

KJIT
[8]

Multipurpose Pi

INTRODUCTION

Use case Diagram:


Actor:

System Boundary:

Use Case:

Connectors:

Sequence Diagram:
Actor:

Object Life Cycle:

Activation:

Synchronous Message:

KJIT
[9]

Multipurpose Pi

INTRODUCTION

INDEX

Chapter : 1

Chapter : 2

Chapter : 3

Chapter : 4

Abstract
Acknowledgement
List of Figures
List of Tables
Symbols and Abbreviations
Index
INTRODUCTION
1.1 Project Detail
1.1.1 Project Definition
1.1.2 Project Profile
1.2 Purpose
1.3 Scope
1.4 Objective
1.5 Technology and Literature Review
ABOUT THE SYSTEM
2.1 System Requirement Specification
2.1.1 Project Management Approach
2.1.2 Study of Current System
2.1.3 Limitations of Current System
2.1.4 Tools and Technology used
2.1.5 Functionality
2.1.6 Hardware and Software
Specification
2.1.7 Raspberry Pi 2(Latest Version)
2.2 Feasibility Study
2.3 Project Planning
ANALAYSIS
3.1 E-R Diagram
3.2 Use Case Diagram
3.3 Sequence Diagram
3.4 Activity Diagram
3.5 Class Diagram
DESIGN
4.1 Raspberry Pi General Specifications
4.2 Raspbian OS

KJIT
[10]

I
II
III
IV
V
VIII
1
14
14
14

16
16
16
16
19
20
20
21
22
22
24
25
26
27
28
33
35
37
39
41
43
44
45
48

Multipurpose Pi

Chapter : 5

Chapter :6

Chapter :7

INTRODUCTION

4.3 XBMC OS ( Media Centre )


4.4 Controlling Electronic Devices
4.5 Network Accessed Storage
IMPLEMENTATION

58
68
71
73

5.1 Implementation Environment

74

5.2 Coding Standard


Tools for Python Code Quality
5.3
.
5.4 Tools for Python Code
5.5 Python Codes
TESTING
6.1 Testing Plan
6.2 Testing Strategy
6.3 Testing Methods
CONCLUSION & FUTURE WORK
6.1 Conclusion
6.2 Future Enhancement
Reference

74
75
76
78
79
80
81
81
84
85
86
87

KJIT
[11]

Multipurpose Pi

INTRODUCTION

CHAPTER - 1
INTRODUCTION

KJIT
[12]

Multipurpose Pi

1.

Introduction

1.1

Project Details

INTRODUCTION

1.1.1 Project Definition


Project Multipurpose Pi is developed using the concepts of embedded system Raspberry
PI configuring with different applications , open source codes and tools to sum-up a perfect
credit card sized device with multiple functions.

1.1.2 Project Profile


We have selected a project which is Multipurpose Pi for small, medium and large scale
enterprise. It will be beneficial in both Commercial Utility Model and Public Utility Model.
It will be based on embedded system technology.
The project will have following features:
Media Center :-

XBMC can be used to play almost all popular audio and video formats around. It was designed
for network playback, so you can stream your multimedia from anywhere in the house or
directly from the internet using practically any protocol available. Use your media as-is:
XBMC can play CDs and DVDs directly from the disk or image file, almost all popular archive
formats from your hard drive. XBMC will scan all of your media and create a personalized
library complete with box covers, descriptions, and fan art. There are playlist and slideshow
functions, a weather forecast feature and many audio visualizations. Once installed and
configured, your computer will become a fully functional multimedia jukebox.

NAS :NAS is Network Accessed Storage, one or more Hard Drive connected to the Multipurpose Pi
that provides file-based data storage services and sharing to other devices on the network.

KJIT
[13]

Multipurpose Pi

INTRODUCTION

Controlling Electronic Devices :By connecting the different devices to GPIO (General Purpose Input Output) pins we can
connect almost all types of electronic devices and control them through different mediums
like Keyboard/Mouse, Android Phone, Tablets and Over Internet.
Currently we have connected an LED (Light Emitting Diode) and using android phone to
control it over Wi-Fi.
Web Server :A web server is a system that processes requests via HTTP, the basic network protocol used to
distribute information on the World Wide Web. The most common use of web servers is to
host websites, but there are other uses such as data storage, running enterprise applications,
handling email, FTP, educational purpose for learning in school and collages or other web uses.
Gamming :The emulation machine runs off of a Multipurpose Pi running Retro pie, this allows it to support
various emulators such as NES, SNES, Gameboy, Gameboy Colour, Gameboy Advance, Sega
Genesis, Neo Geo, MAME, PlayStation One and can even emulate an Apple II. It also supports
Python Games which we have practically implemented.

KJIT
[14]

Multipurpose Pi

1.2

INTRODUCTION

Purpose

The system is being created for both public and industrial use.

Anyone can buy low cost device with multiple features compared to computer.

By this project computer literacy rate can be improved as it can be implemented


everywhere.

1.3

Scope

This device will improve the computer learning capabilities of students.

This device will improve the efficiency of an Enterprise.

This device can be used in home for entertainment, learning and luxury.

This device can work with any kind of display having RCA or HDMI port.

Exploring computing Education in Rural Schools.

Automation in Industries can be done.

It can be used as small scale web server anywhere.


1.4

Objective

In todays fast growing world of technology computer and its proper education is very
important. Our proposed project`s motto is to make available an learning platform at
very low cost which could be affordable by each and every one.

Low cost device with multiple features which gives enhancement in automation and
luxury.

1.5

Technology and Literature Review

There are many projects based on embedded system Raspberry Pi.


We have selected some of the best ones and configured all in one to make a
multipurpose device.
Some of the interesting projects are:

Raspberry Pi Web Server

How to set up a simple wired web server on your Raspberry Pi, with PHP and MySql.
The Raspberry Pi is a good choice for a webserver that will not receive too much traffic,

KJIT
[15]

Multipurpose Pi

INTRODUCTION

such as a testing server, or small intranet, as it doesnt get too hot (so is nice and quiet), and
only uses around 5 Watts of power (approx. costing 3.50 a year if it's running 24/7)
http://www.instructables.com/id/Raspberry-Pi-Web-Server/

Raspberry Pi Remote For Free!

How to use the HDMI-CEC protocol to control your Pi with your Tv's remote control.
This is very useful because it saves you from having to buy a remote just for your Pi and
also leaves you with an open usb that you would have needed for your wireless keyboard
and mouse.
http://www.instructables.com/id/Raspberry-Pi-Remote-For-Free/

Raspberry Pi Smart Target

The Raspberry Pi Smart Target was designed to be hit by the now famous Flying Monkey,
but it can be hit by any other light object such as small ball. When the Target is hit the
following events happen:
1. A random sound effect is played through a small set of speakers connected to the
Raspberry Pi.
2. A "congratulations" message is displayed in the front LCD screen.
3. The Raspberry Pi grabs a snapshot from a network camera (Dropcam) and is posted to a
social network.
4. A random message is posted along with the picture taken by the Dropcam.
5. The whole action is immortalized in the interwebz.
http://www.instructables.com/id/Raspberry-Pi-Smart-Target/

Raspberry Pi as low-cost HD surveillance camera

This instruct able describes how to build a surveillance cam based on a Raspberry Pi
micro-computer which records HD video when something moves in the monitored area.
Live picture can be viewed from any web browser, even from your mobile while you're on
the road.
What you will get:
See live stream in any web browser from anywhere
Record any motion into video file
KJIT
[16]

Multipurpose Pi

INTRODUCTION

Usually, such a cam will cost you around US$1.000, but with the result from this
intractable, you will get such a cam for only about US$120.
http://www.instructables.com/id/Raspberry-Pi-as-low-cost-HD-surveillance-camera/

KJIT
[17]

Multipurpose Pi

ABOUT THE SYSTEM

CHAPTER - 2
ABOUT THE SYSTEM

KJIT
[19]

Multipurpose Pi

ABOUT THE SYSTEM

2. About the System:


2.1 System Requirement Specification

2.1.1 Project Management Approach


Waterfall Model has been adopted as an approach for development of project.
Most of the requirements of the project are fixed and already thought of functionality updating
is expected in future. So Waterfall model is the right approach for our project.
The waterfall model is a sequential design process, often used in software development
processes, in which progress is seen as flowing steadily downwards through the phases of
Conception, Initiation, Analysis, Design, Construction, Testing, Production/Implementation,
and Maintenance.
The waterfall development model originates in the manufacturing and construction industries:
highly structured physical environments in which after-the-fact changes are prohibitively
costly, if not impossible. Since no formal software development methodologies existed at the
time, this hardware-oriented model was simply adapted for software development.
Waterfall model, the following phases are followed in order:
1. Requirements
2. Analysis
3. design
4. coding
5. Testing
6. Acceptance
It places emphasis on documentation as well as source code. In less thoroughly designed and
documented methodologies, knowledge is lost if team members leave before the project is
completed, and it may be difficult for a project to recover from the loss.

KJIT
[20]

Multipurpose Pi

ABOUT THE SYSTEM

Figure-2.1.1 Water Fall Model

2.1.2 Study of Current System:


Currently, there are many people who dont have any computer knowledge and due to its cost
they cant afford it.
There are also many schools and organizations in rural areas where requirement of computer
is very necessary for education and development purpose.
There is very less awareness about the embedded systems which could reduce the cost of
computers and can be used for many purposes.

KJIT
[21]

Multipurpose Pi

ABOUT THE SYSTEM

2.1.3 Limitations of Current System:

Currently only computers are used for computer education that also not on all places.

Size of computer is very huge and it is bulky compared to Multipurpose Pi.

Cost of computer is also very high almost three times of Multipurpose Pi.

Higher power consumption for running a computer.

Limited display options are available.

Only Universal Serial Bus as port for connecting different devices.

Very less chance of easy portability.

Cannot run for 24 x 7 without specific environment.

2.1.4 Tools & Technology Used:


Technology used:-

Embedded System (Raspberry Pi)

The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor
or TV, and uses a standard keyboard and mouse
Tools:-

Raspbian Operating System

Raspbian is a free operating system based on Debian optimized for the Raspberry Pi hardware.
An operating system is the set of basic programs and utilities that make your Raspberry Pi run.

XBMC Operating System

XBMC can be used to play almost all popular audio and video formats around. It was designed
for network playback, so you can stream your multimedia from anywhere in the house or
directly from the internet using practically any protocol available. Use your media as-is:
XBMC can play CDs and DVDs directly from the disk or image file, almost all popular archive
formats from your hard drive. XBMC will scan all of your media and create a personalized
KJIT
[22]

Multipurpose Pi

ABOUT THE SYSTEM

library complete with box covers, descriptions, and fan art. There are playlist and slideshow
functions, a weather forecast feature and many audio visualizations. Once installed and
configured, your computer will become a fully functional multimedia jukebox.

SD Formatter 4.0
This software formats all SD memory cards, SDHC memory cards and SDXC memory cards.
SD Formatter provides quick and easy access to the full capabilities of your SD, SDHC and
SDXC memory cards.
The SD Formatter was created specifically for memory cards using the SD/SDHC/SDXC
standards. It is strongly recommended to use the SD Formatter instead of formatting utilities
provided with operating systems that format various types of storage media. Using generic
formatting utilities may result in less than optimal performance for your memory cards.
The SD/SDHC/SDXC memory cards have a "Protected Area" on the card for the SD standard's
security function. The SD Formatter does not format the "Protected Area". Please use
appropriate application software or SD-compatible device that provides SD security function
to format the "Protected Area" in the memory card.

Win32 Disk Imager


This program is designed to write a raw disk image to a removable device or backup a
removable device to a raw image file. It is very useful for embedded development, namely Arm
development projects (Android, Ubuntu on Arm, etc).

KJIT
[23]

Multipurpose Pi

ABOUT THE SYSTEM

2.1.5 Functionality:
Media Center :XBMC can be used to play almost all popular audio and video formats around. It was designed
for network playback, so you can stream your multimedia from anywhere in the house or
directly from the internet using practically any protocol available. Use your media as-is:
XBMC can play CDs and DVDs directly from the disk or image file, almost all popular archive
formats from your hard drive. XBMC will scan all of your media and create a personalized
library complete with boxcovers, descriptions, and fanart. There are playlist and slideshow
functions, a weather forecast feature and many audio visualizations. Once installed and
configured, your computer will become a fully functional multimedia jukebox.

NAS :NAS is Network Accessed Storage, one or more Hard Drive connected to the Multipurpose
Pi that provides file-based data storage services and sharing to other devices on the network.

Controlling Electronic Devices :By connecting the different devices to GPIO (General Purpose Input Output) pins we can
connect almost all types of electronic devices and control them through different mediums
like Keyboard/Mouse, Android Phone, Tablets and Over Internet.
Currently we have connected an LED (Light Emitting Diode) and using android phone to
control it over Wi-Fi.
Web Server :A web server is a system that processes requests via HTTP, the basic network protocol used to
distribute information on the World Wide Web. The most common use of web servers is to
host websites, but there are other uses such as data storage, running enterprise applications,
handling email, FTP, educational purpose for learning in school and collages or other web uses.
Gamming :-

KJIT
[24]

Multipurpose Pi

ABOUT THE SYSTEM

The emulation machine runs off of a Multipurpose Pi running Retropie, this allows it to support
various emulators such as NES, SNES, Gameboy, Gameboy Color, Gameboy Advance, Sega
Genesis, Neo Geo, MAME, PlayStation One and can even emulate an Apple II. It also supports
Python Games which we have practically implemented.

2.1.6 Hardware and Software Specification:

H/w Requirements:
o

Raspberry Pi Model B

Display ( HDMI )

Keyboard

Mouse

External Hard Disk

USB Power Hub

Wi-Fi Adapter

Portable Power Bank

S/w Requirements:
o

Operating System: Raspbian, XBMC

Open Source applications and tools.

KJIT
[25]

Multipurpose Pi

ABOUT THE SYSTEM

2.1.7 Raspberry Pi V2 Latest Version


The Raspberry Pi 2 Model B is the second generation Raspberry Pi. It replaced the original Raspberry
Pi 1 Model B+ in February 2015.
Compared to the Raspberry Pi 1 it has:

A 900MHz quad-core ARM Cortex-A7 CPU

1GB RAM

Like the (Pi 1) Model B+, it also has:

4 USB ports

40 GPIO pins

Full HDMI port

Ethernet port

Combined 3.5mm audio jack and composite video

Camera interface (CSI)

Display interface (DSI)

Micro SD card slot

VideoCore IV 3D graphics core

Because it has an ARMv7 processor, it can run the full range of ARM GNU/Linux distributions,
including Snappy Ubuntu Core, as well as Microsoft Windows 10 (see the blog for more information).
The Raspberry Pi 2 has an identical form factor to the previous (Pi 1) Model B+ and has complete
compatibility with Raspberry Pi 1.

KJIT
[26]

Multipurpose Pi

ABOUT THE SYSTEM

2.2 Feasibility Study


Feasibility studies aim to objectively and rationally uncover the strengths and weaknesses
of an existing business or proposed venture, opportunities and threats as presented by the
environment, the resources required to carry through, and ultimately the prospects for
success. In its simplest terms, the two criteria to judge feasibility are cost required and value
to be attained.
The assessment is based on an outline design of system requirements, to determine whether
the company has the technical expertise to handle completion of the project.
Economic Feasibility
Economic analysis is the most frequently used method for evaluating the effectiveness of a
new system. More commonly known as cost/benefit analysis, the procedure is to determine
the benefits and savings that are expected from a candidate system and compare them with
costs.
If benefits outweigh costs, then the decision is made to design and implement the system.
An entrepreneur must accurately weigh the cost versus benefits before taking an action.
Cost-based study:
It is important to identify cost and benefit factors, which can be categorized as follows:

Development cost

Operating cost

This is an analysis of the costs to be incurred in the system and the benefits derivable out
of the system.
Time-based study:
This is an analysis of the time required to achieve a return on investments. The future value
of a project is also a factor.

KJIT
[27]

Multipurpose Pi

ABOUT THE SYSTEM

Operational Feasibility
Operational feasibility is a measure of how well a proposed system solves the problems, and
takes advantage of the opportunities identified during scope definition and how it satisfies
the requirements identified in the requirements analysis phase of system development.
Schedule Feasibility
A project will fail if it takes too long to be completed before it is useful. Typically this means
estimating how long the system will take to develop, and if it can be completed in a given
time period using some methods like payback period. Schedule feasibility is a measure of
how reasonable the project timetable is.
Technical Feasibility
A large part of determining resources has to do with assessing technical feasibility. It
considers the technical requirements of the proposed project. The technical requirements are
then compared to the technical capability of the organization. The systems project is
considered technically feasible if the internal technical capability is sufficient to support the
project requirements.

2.3 Project Planning


Project planning is part of project management, which relates to the use of schedules such as
Gantt charts to plan and subsequently report progress within the project environment.
Initially, the project scope is defined and the appropriate methods for completing the project
are determined. Following this step, the durations for the various tasks necessary to complete
the work are listed and grouped into a work breakdown structure. The logical dependencies
between tasks are defined using an activity network diagram that enables identification of the
critical path.
Necessary resources can be estimated and costs for each activity can be allocated to each
resource, giving the total project cost

KJIT
[28]

Multipurpose Pi

ABOUT THE SYSTEM

At this stage, the project plan may be optimized to achieve the appropriate balance between
resource usage and project duration to comply with the project objectives. Once established
and agreed, the plan becomes what is known as the baseline.
Progress will be measured against the baseline throughout the life of the project. Analyzing
progress compared to the baseline is known as earned value management.
Gantt Charts
Gantt Charts are useful tools for analyzing and planning more complex projects.

Help you to plan out the tasks that need to be completed

Give you a basis for scheduling when these tasks will be carried out

When a project is under way, Gantt charts are useful for monitoring its progress. You
can immediately see what should have been achieved at a point in time, and can
therefore take remedial action to bring the project back on course. This can be essential
for the successful and profitable implementation of the project.

Allow you to plan the allocation of resources needed to complete the project, and help
you to work out the critical path for a project where you must complete it by a particular
date.

When a project is under way, Gantt Charts help you to monitor whether the project is
on schedule. If it is not, it allows you to pinpoint the remedial action necessary to put it
back on schedule.

Sequential and parallel activities:


An essential concept behind project planning (and Critical Path Analysis) is that some activities
are dependent on other activities being completed first. As a shallow example, it is not a good
idea to start building a bridge before you have designed it!
These dependent activities need to be completed in a sequence, with each stage being more-orless completed before the next activity can begin. We can call dependent activities 'sequential'
or 'linear'.

KJIT
[29]

Multipurpose Pi

ABOUT THE SYSTEM

Other activities are not dependent on completion of any other tasks. These may be done at any
time before or after a particular stage is reached. These are nondependent or 'parallel' tasks.
Step 1.List all activities in the plan
For each task, show the earliest start date, estimated length of time it will take, and whether it
is parallel or sequential. If tasks are sequential, show which stages they depend on.
Step 2.Set up your Gantt chart
Head - up graph paper with the days or weeks through to task completion.
Step 3.Plot the tasks onto the graph paper
Schedule them in such a way that sequential actions are carried out in the required sequence.
Ensure that dependent activities do not start until the activities they depend on have been
completed.
Step 4.Presenting the analysis
The last stage in this process is to prepare a final version of the Gantt chart. This shows how
the sets of sequential activities link together, and identifies the critical path activities. At this
stage you also need to check the resourcing of the various activities. While scheduling, ensure
that you make best use of the resources you have available, and do not over-commit resource.

Analysis, development and testing of supporting modules are essential activities that must
be completed on time.

Hardware installation and commissioning is not time-critical as long as it is completed


before the Core Module Training starts.

KJIT
[30]

Multipurpose Pi

ABOUT THE SYSTEM

Figure-2.3.1 Gantt chart

KJIT
[31]

Multipurpose Pi

ANALYSIS

CHAPTER - 3
ANALYSIS

3. Analysis
KJIT
[33]

Multipurpose Pi

ANALYSIS

3.1 E-R Diagram


An entity-relationship diagram (ERD) is a type of data modelling that shows a graphical representation
of objects or concepts within an information system or organization and their relationship to one
another.
An entity-relationship diagram (ERD) is a graphical representation of an information system that
shows the relationship between people, objects, places, concepts or events within that system. An ERD
is a data modelling technique that can help define business processes and can be used as the foundation
for a relational database.
Three main components of an ERD are the entities, which are objects or concepts that can have data
stored about them, the relationship between those entities, and the cardinality.
Which defines that relationship in terms of numbers.

KJIT
[34]

Multipurpose Pi

ANALYSIS

E-R Diagram

Figure-3.1: E-R Diagram

KJIT
[35]

Multipurpose Pi

ANALYSIS

3.2 Use Case Diagram:


A use case diagram at its simplest is a representation of a user's interaction with the system and
depicting the specifications of a use case. A use case diagram can portray the different types of users
of a system and the various ways that they interact with the system. This type of diagram is typically
used in conjunction with the textual use case and will often be accompanied by other types of diagrams
as well.

KJIT
[36]

Multipurpose Pi

ANALYSIS

Use Case Diagram

Figure 3.2: Use case Diagram

KJIT
[37]

Multipurpose Pi

ANALYSIS

3.3 Sequence Diagram:


The Sequence Diagram models the collaboration of objects based on a time sequence.
It shows how the objects interact with others in a particular scenario of a use case.
With the advanced visual modelling capability, you can create complex sequence diagram in few
clicks.

Besides, VP-UML can generate sequence diagram from the flow of events which you have defined in
the use case description.
The Sequence Diagram models the collaboration of objects based on a time sequence.
It shows how the objects interact with others in a particular scenario of a use case.

With the advanced visual modeling capability, you can create complex sequence diagram in few clicks.
Besides, VP-UML can generate sequence diagram from the flow of events which you have defined in
the use case description.

KJIT
[38]

Multipurpose Pi

ANALYSIS

Sequence Diagram

Figure 3.3: Sequence Diagram

KJIT
[39]

Multipurpose Pi

ANALYSIS

3.4 Activity Diagram:


It show the interaction, focusing on the work performance.
Display a sequence of actions including alternative execution and object involved in performing the
work.

Symbols:
Action state:
It show the internal actions that are executed when in the state.
It typically has an automatic state transaction to another state when its actions have been performed.

Start State:

Stop state:

It show the interaction, focusing on the work performance.


Display a sequence of actions including alternative execution and object involved in performing the
work.

KJIT
[40]

Multipurpose Pi

ANALYSIS

Activity Diagram

Figure-3.4: Activity Diagram

KJIT
[41]

Multipurpose Pi

ANALYSIS

3.5 Class Diagram:


A class diagram is an illustration of the relationships and source code dependencies among classes in
the Unified Modelling Language (UML). In this context, a class defines the methods and variables in
an object, which is a specific entity in a program or the unit of code representing that entity.

In software engineering, a class diagram in the Unified Modelling Language (UML) is a type of static
structure diagram that describes the structure of a system by showing the system's classes, their
attributes, operations (or methods), and the relationships among objects.

The class diagram is the main building block of object oriented modelling. It is used both for general
conceptual modelling of the systematics of the application, and for detailed modelling translating the
models into programming code. Class diagrams can also be used for data modeling.[1] The classes in
a class diagram represent both the main objects, interactions in the application and the classes to be
programmed.A UML use case diagram for the interaction of a client (the actor) and a restaurant (the
system)

KJIT
[42]

Multipurpose Pi

ANALYSIS

Class Diagram

Figure-3.5: Class Diagram

KJIT
[43]

Multipurpose Pi

DESIGN

CHAPTER 4
DESIGN

KJIT
[44]

Multipurpose Pi

DESIGN

4. Design
4.1 Raspberry Pi General Specifications
4.1.1 Raspberry Pi Specifications
CPU:
CPU speed:
RAM:
Ethernet:
HDMI:
Analog video:
Audio
SD socket:
On-board regulators:
Expansion header pins (GPIO):
USB ports:
Mounting holes:
Dimensions:
Weight:

BCM2835
700 MHz
512 MB
Yes
Yes
Yes
3.5 mm jack
standard SD
linear
26
2
2
3.35 2.2 0.8
40 g

Table-4.1.1: Raspberry Pi Specifications

KJIT
[45]

Multipurpose Pi

DESIGN

4.1.2 GPIO input/output pin electrical characteristics Table :

Output low voltage


VOL

< 0.40 V 1)
< 0.66 V 2)
< 0.40 V 3)
> 2.40 V 4)
> 2.64 V 5)
> 2.90 V 6)
< 0.80 V 7)
< 0.54 V 8)
< 1.15 V 9)
> 2.00 V 10)
> 2.31 V 11)
> 2.15 V 12)
> 0.25 V 13)
0.66 2.08 V 14)

Output high voltage


VOH
Input low voltage
VIL
Input high voltage
VIH
Hysteresis
Schmitt trigger input low
threshold
VT
Schmitt trigger input high
threshold
VT+
Pull-up/down
resistance
Pull-up/down
current
Pin capacitance
Bus hold resistance

1.09 - 1.16 V 15)


0.9 16)
2.24 - 2.74 V 17)
0.90 V 18)
40 65K 19)
100K 20)
< 50 uA 21)
< 28 uA 22)
5 pF 23)
5-11K 24)

Table-4.1.2: GPIO input/output pin electrical characteristics Table

KJIT
[46]

Multipurpose Pi

DESIGN

4.1.3 GPIO 26 Pin Header


Signal
+3.3V
GPIO_02 GPIO_00
(SDA1)
GPIO_03 GPIO_01
(SCL1)
GPIO_04
(GPCLK0)

P1: 26-pin header


Pins
1
2

Signal
+5V

+5V

GND
GPIO_14

(UART0_TxD)
GPIO_15

GND

10

(UART0_RxD)
GPIO_18

GPIO_17

11

12

GPIO_27 GPIO_21
GPIO_22
+3.3V
GPIO_10
(SPI_0_MOSI)
GPIO_09
(SPI_0_MISO)
GPIO_11

13
15
17

14
16
18

GND
GPIO_23
GPIO_24

19

20

GND

21

22

GPIO_25

(SPI_0_SCLK)

(PCM_CLK)

GPIO_08
23

24

(SPI_0_CE0_N)
GPIO_07

GND

25

26

(SPI_0_CE1_N)

Notes:
1. Signals in plain type are for Rev 2 boards,
Signals for Rev 1 boards are shown in italics.
2. Primary functions for signals are shown in parentheses.
Table-4.1.3: GPIO 26 Pin Header

KJIT
[47]

Multipurpose Pi

DESIGN

4.2 Raspbian OS :

4.2.1 Raspbian Desktop on High Resolution Display (HDMI) :

Figure-4.2.1: Raspbian Desktop on High Resolution Display (HDMI)

KJIT
[48]

Multipurpose Pi

DESIGN

4.2.2 Raspbian Desktop on Low Resolution Display (RCA) :

Figure-4.2.2: Raspbian Desktop on Low Resolution Display (RCA)

KJIT
[49]

Multipurpose Pi

DESIGN

4.2.3 Gamming On Multipurpose Pi:

Figure 4.2.3: Gamming On Multipurpose Pi

KJIT
[50]

Multipurpose Pi

DESIGN

4.2.4 IDLE - Python Programming:

Figure-4.2.4: IDLE - Python Programming

KJIT
[51]

Multipurpose Pi

DESIGN

4.2.5: Graphics Creation Programming:

Figure-4.2.5: Graphics Creation Programming

KJIT
[52]

Multipurpose Pi

DESIGN

4.2.6: Starting Raspbian:

Figure-4.2.6: Starting Raspbian

KJIT
[53]

Multipurpose Pi

DESIGN

4.2.7: Starting Raspberry Pi Controlling Via SSH:

Figure-4.2.7: Starting Raspberry Pi Controlling Via SSH

KJIT
[54]

Multipurpose Pi

DESIGN

4.2.8: Shell in Raspbian:

Figure-4.2.8: Shell in Raspbian

KJIT
[55]

Multipurpose Pi

DESIGN

4.2.9: Using Scratch Programming:

Figure-4.2.9: Using Scratch Programming

KJIT
[56]

Multipurpose Pi

DESIGN

4.2.10: Raspbian Basic Configuration Menu:

Figure-4.2.10: Raspbian Basic Configuration Menu

KJIT
[57]

Multipurpose Pi

DESIGN

4.3 XBMC OS ( Media Center ) :


4.3.1 XBMC Main Screen:

Figure-4.3.1: XBMC Main Screen

KJIT
[58]

Multipurpose Pi

DESIGN

4.3.2 Images from Hard Drive:

Figure-4.3.2: Images from Hard Drive

KJIT
[59]

Multipurpose Pi

DESIGN

4.3.3 Live Radio:

Figure-4.3.3: Live Radio

KJIT
[60]

Multipurpose Pi

DESIGN

4.3.4 Live Tv (Add-on IPNA):

Figure-4.3.4: Live Tv (Add-on IPNA)

KJIT
[61]

Multipurpose Pi

DESIGN

4.3.5 Live Tv:

Figure-4.3.5: Live TV

KJIT
[62]

Multipurpose Pi

DESIGN

4.3.6 Movies Title:

Figure-4.3.6: Movies Title

KJIT
[63]

Multipurpose Pi

DESIGN

4.3.7 Music from Hard Drive:

Figure-4.3.7: Music from Hard Drive

KJIT
[64]

Multipurpose Pi

DESIGN

4.3.8 Music Streaming from Android Phone:

Figure-4.3.8: Music Streaming from Android Phone

KJIT
[65]

Multipurpose Pi

DESIGN

4.3.9 Music Streaming from Internet:

Figure-4.3.9: Music Streaming from Internet

KJIT
[66]

Multipurpose Pi

DESIGN

4.3.10 Video Streaming from Android Phone:

Figure-4.3.10: Video Streaming from Android Phone

KJIT
[67]

Multipurpose Pi

DESIGN

4.4 Controlling Electronic Devices :


4.4.1 LED Testing With GPIO:

Figure-4.4.1: LED Testing With GPIO

KJIT
[68]

Multipurpose Pi

DESIGN

4.4.2 Single LED Blinking:

Figure-4.4.2: Single LED Blinking

KJIT
[69]

Multipurpose Pi

DESIGN

4.4.3 Controlling LED Using Android Device:

Figure-4.4.3: Controlling LED Using Android Device

KJIT
[70]

Multipurpose Pi

DESIGN

4.5 NAS :
4.5.1 Network Attached File Server (NAS)

Figure-4.5.1: Network Attached File Server (NAS)

KJIT
[71]

Multipurpose Pi

DESIGN

4.6 Web Server :


4.6.1 Accessing Web Server

Figure-4.6.1: Accessing Web Server

KJIT
[72]

Multipurpose Pi

IMPLEMENTATION

CHAPTER 5
IMPLEMENTATION

KJIT
[73]

Multipurpose Pi

IMPLEMENTATION

5. Implementation:

5.1 Implementation Environment:


Our project is based on embedded system, moreover it is multi user device (User cover both
Public utility and commercial Utility usage). User can use any feature whenever they want so
for that all the features combined in such a manner that users can use it easily.
Multi Users:
The environment in our system is Multi User environment. There can be multiple users like
Public at home, Workers in industries, Students in schools and colleges, Scientist and
researchers at their labs and organizations etc.
Multipurpose:
A better model is needed so that each user can perform their task easily. Moreover system
should be such that it is easily understandable by users so they can use this system with easily
and improve their productivity and knowledge.
For this we have divided modules in two parts based on operating system used. XBMC for
Media Center and Raspbian for Webserver, NAS, Controlling Electronic Devices & Gamming.
Implementation phase requires precise planning and monitoring mechanism in order to ensure
schedule and completeness.

5.2 Coding Standard:


The following guidelines are applicable to all aspects python development:

Make code as simple and readable as possible. Assume that someone else will be reading
your code.

Prefer small cohesive classes and methods to large monolithic ones.

Use a separate file for each class, struct, interface, enumeration, and delegate with the
exception of those nested within another class.

Write the comments first. When writing a new method, write the comments for each step
the method will perform before coding a single statement. These comments will become

KJIT
[74]

Multipurpose Pi

IMPLEMENTATION

the headings for each block of code that gets implemented.

Use liberal, meaningful comments within each class, method, and block of code to
document the purpose of the code.

Mark incomplete code with // TODO: comments. When working with many classes at once,
it can be very easy to lose a train of thought.

Prefer while and for each over other available looping constructs when applicable. They
are logically simpler and easier to code and debug.

5.3 GPIO (General Purpose Input Output)


The GPIO pins on a Raspberry Pi are a great way to interface physical devices like buttons and
LEDs with the little Linux processor. If youre a Python developer, theres a sweet library
called RPi.GPIO that handles interfacing with the pins. In just three lines of code, you can get
an LED blinking on one of the GPIO pins.
The R-Pi has 17 GPIO pins brought out onto the header, most have alternated functions other
than just I/O, and there are two pins for UART, two for I2C and six for SPI. All the pins can
be use for GPIO with either INPUT or OUTPUT, there also internal pull-up & pull-downs for
each pin but the I2C pins have and onboard pull-up so using them for GPIO may not work in
some cases.
Using any of the pins will require extra care, than most Arduino users maybe be used to. These
pins are 3V3 not 5V like the AVR chips, and they a directly connected to the Broadcom chip
at the heart of the R-Pi. This means there is not protection, if you send 5V down a pin there is
a good chance of killing the Pi.
There will also be an issue with trying to draw to much power form the pins, according to the
data-sheet each pin programmed to current drive between 2mA and 16mA, and it has been
warned that trying to draw 16mA from several pins at once could also lead to a damaged Pi.
Also from the wiki the "maximum permitted current draw from the 3v3 pin is 50mA" and the
"maximum permitted current draw from the 5v pin is the USB input current (usually 1A) minus
any current draw from the rest of the board." The current draw for Model B is stated as 700mA
so with a 1A power supply this leaves about 300mA to play with.
KJIT
[75]

Multipurpose Pi

IMPLEMENTATION

Installing RPi.GPIO
RPi.GPIO is a small python library that take some of the complexity out of driving the GPIO
pins, once install a single LED can be lit with 3 lines of python. Installing the library is almost
as simple, either at a text console or using Terminal enter the following

$ wget http://pypi.python.org/packages/source/R/RPi.GPIO/RPi.GPIO-0.1.0.tar.gz
$ tar zxf RPi.GPIO-0.1.0.tar.gz
$ cd RPi.GPIO-0.1.0
$ sudo python setup.py install

5.4 Tools for Python Code Quality:


There are various tools that can help you to check your Python code for PEP8 conformance
and general code quality. We recommend using them.

pep8 checks your Python code against some of the style conventions in PEP 8. Perform
style clean-ups on master to help avoid spurious merge conflicts.

pylint analyzes Python source code looking for bugs and signs of poor quality.

pyflakes also analyzes Python programs to detect errors.

flake8 combines both pep8 and pyflakes into a single tool.

Syntactic is a Vim plugin with support for flake8, pyflakes and pylint.

KJIT
[76]

Multipurpose Pi

IMPLEMENTATION

5.5 Python Codes:


Python program for activating GPIO pin to glow LED.

import RPi.GPIO as GPIO ## Import GPIO library


GPIO.setmode(GPIO.BOARD) ## Use board pin numbering
GPIO.setup(7, GPIO.OUT) ## Setup GPIO Pin 7 to OUT
GPIO.output(7,True) ## Turn on GPIO pin 7

Python program to switch off LED.

import RPi.GPIO as GPIO ## Import GPIO library


GPIO.setmode(GPIO.BOARD) ## Use board pin numbering
GPIO.setup(7, GPIO.OUT) ## Setup GPIO Pin 7 to OUT
GPIO.output(7,False) ## Turn on GPIO pin 7

Python program to blink LED.

import RPi.GPIO as GPIO ## Import GPIO library


import time ## Import 'time' library. Allows us to use 'sleep'

GPIO.setmode(GPIO.BOARD) ## Use board pin numbering


GPIO.setup(7, GPIO.OUT) ## Setup GPIO Pin 7 to OUT

##Define a function named Blink()


def Blink(numTimes,speed):
for i in range(0,numTimes): ## Run loop numTimes
print "Iteration " + str(i+1) ## Print current loop
GPIO.output(7,True) ## Switch on pin 7
time.sleep(speed) ## Wait

KJIT
[77]

Multipurpose Pi

IMPLEMENTATION

GPIO.output(7,False) ## Switch off pin 7


time.sleep(speed) ## Wait
print "Done" ## When loop is complete, print "Done"
GPIO.cleanup()

## Ask user for total number of blinks and length of each blink
iterations = raw_input("Enter total number of times to blink: ")
speed = raw_input("Enter length of each blink(seconds): ")

## Start Blink() function. Convert user input from strings to numeric data types and pass
to Blink() as parameters
Blink(int(iterations),float(speed))

KJIT
[78]

Multipurpose Pi

TESTING

CHAPTER - 6
TESTING

KJIT
[79]

Multipurpose Pi

TESTING

6.1 TESTING PLAN

Software Testing has a dual function; it is used to identify the defects in program and it is used
to help judge whether or not program is usable in practice. Thus software testing is used for
validation and verification, which ensure that software conforms to its specification and meets
need of the software customer.

Developer resorted Alpha testing, which usually comes in after the basic design of the program
has been completed. The project scientist will look over the program and give suggestions and
ideas to improve or correct the design. They also report and give ideas to get rid of around any
major problems. There is bound to be a number of bugs after a program have been created.

Analyze and check system representations such as the requirements document, design diagrams
and program source code. They may be applied at all stages of the process.

Figure 6.1 Testing Diagram

KJIT
[80]

Multipurpose Pi

TESTING

6.2 TESTING STRATEGY


Unit Testing
Software products are normally tested first at the individual component (unit) level. Unit
testing (or module testing) is the testing of different units (or modules) of a system in
isolation.
Integration Testing
After testing all the components individually the components are slowly integrated and
tested at each level of integration. That is called integration testing.
System Testing
Finally the fully integrated system is tested that is called system testing.

6.3 TESTING METHODS


Statistical Testing
Statistical Testing is used to test the programs performance and reliability and to check
how it works under operational conditions. Tests are design to reflect the actual user inputs
and their frequency.
The stages involved in the statistical analysis for this system are as follows:

Parameter type mismatches

Parameter number mismatches

Black-Box Testing
In Black-Box Testing or Functional Testing, Developers are concerned about the output of
the module and software, i.e. whether the software gives proper output as per the
requirements or not. In another words, this testing aims to test behavior of program against
it specification without making any reference to the internal structure of the internal
structure of the program or the algorithms used. Therefore the source code is not needed,
and so even purchased modules can be tested. The program just gets a certain input and its
functionality is examined by observing the output.

This can be done in the following ways:

KJIT
[81]

Multipurpose Pi

Input Interface

Processing

Output Interface

TESTING

The programs get certain inputs. Then the program does its jobs and generates a certain
output, which is collected by a second interface. This result is then compared to the
expected output, which has been determined before the test.

White Box Testing


White box testing is an important primary testing approach. Here code is inspected to see
what it does. This test is designed to check the code. Code is tested using code scripts,
driver, etc which are employed to directly interface with and drive the code.
The tester can analyse code and use the knowledge about the structure of a component to
drive the test data.

Performance Testing
Performance testing is design to test the runtime performance of the system within the
context of the system. This test is performed at module level as well as the as at system level.
Individual modules developed by Developers are tested for required performance.

KJIT
[82]

Multipurpose Pi

TESTING

TEST CASES
TEST CASE: Starting, Power Failure, Internet Failure
Sr.

Test Case

Expected Output

Actual Output

Status

Starting Raspberry Pi

Raspbian should

Booting

Pass

with Raspbian OS

Boot and Desktop

completed and

should be loaded

Desktop Loaded

Power Failure &

Raspbian should

Booting Done

Reboot (Raspbian)

Boot and Desktop

Desktop Loaded

should be loaded

Message : Use

No
1

Pass

Power Off to
Shutdown
3

Starting Raspberry Pi

XBMC should Boot Booting

with XBMC OS

and Media Centre

completed and

should be loaded

Media Centre

Pass

Loaded
4

Power Failure &

XBMC should Boot Booting Done.

Reboot (XBMC)

and Media Centre

Media Centre

should be loaded

Loaded.

Pass

Message : Use
Power Off to
Shutdown
5

Internet Connection

Running

All applications

Lost

Applications do not

running

affected other than

successfully.

live streaming

Message:

Pass

Internet Conn
Lost

Table: 6.1.1 Test Case for Starting, Power Failure, Internet Failure.

KJIT
[83]

CHAPTER - 7
CONCLUSION & FUTURE
WORK

- 84 -

7. Conclusion & Future Work:

7.1 Conclusion:
The development of Multipurpose Pi includes so many people like user system developer, user
of system and the management, it is important to identify the system requirements by properly
collecting required data for its development.

Proper design builds upon this foundation to give a blue print, which is actually implemented
by the developers. On realizing the importance of systematic documentation all the processes
are implemented using a software engineering approach.

Working in a live environment enables one to appreciate the intricacies involved in the System
Development Life Cycle (SDLC) with Water fall model.

The Multipurpose Pi is developed using embedded system Raspberry Pi and Open Source tools.

The Project provide a credit card sized computer with multiple features which can be used as
both public utility model and commercial utility model.
The system includes mainly 5 modules:
(i)

Media Center

(ii)

Web Server

(iii)

Controlling Electronic Devices

(iv)

Network Access Storage

(v)

Gamming

We have gained a lot of practical knowledge from this project, which we think, shall make us
stand in a good state in the future.

- 85 -

7.2 Future Work:

We will try to implement voice recognition.

Controlling electronic devices directly through voice commands.

Controlling more number of electronic devices.

We will try to add motion sensing technology.

Add more applications to maximize the luxury living by automations.

- 86 -

REFRENCES
1. Raspberry Pi Official Website
http://www.raspberrypi.org/

We got the startup and basic guide to achieve this successful completion of project.

2. Raspberry Pi Forum
We got help from the developer all over the world by this forum.
http://www.raspberrypi.org/forums/

3. Source forge
We got many open source tools and softwares from source forge like SD card formatter,
win32 disk writer etc.
http://www.sourceforge.net/

4. Instructables
We got ideas and help to understand the procedures easily from this tutorial website.
http://www.instructables.com/

5. Google
Last but not least, without Google we could not think to resolve our problems we faced. We
surfed thousands of website through it to successfully complete the project.
http://www.raspberrypi.org/documentation/usage/gpio/

- 87 -