Vous êtes sur la page 1sur 53

Iot Based Surveillance Robot Using Raspberry Pi

Chembur-Trombay Education Society’s


N.G Acharya & D. K.
Marathe College
Of Arts, Commerce, Science &
Professional Courses
N.G Acharya Marg, Chembur (E),

PROJECT REPORT ON

Iot Based Surveillance


Robot Using Raspberry Pi

SUBMITTED BY

Gaurav Dineshsingh Mehta

UNDER THE GUIDANCE OF


Mrs. Sunita Koli.

TO
UNIVERSITY OF MUMBAI
SUBMITTED IN PARTIAL FULFILLMENT OF
REQUIREMENT
FOR QUALIFYING
B.Sc(C.S.) (SEM V) EXAMINATION
ACADAMIC YEAR 2019-20

1
Iot Based Surveillance Robot Using Raspberry Pi

Chembur-Trombay Education Society’s


N.G Acharya& D. K. Marathe
College
Of Arts, Commerce, Science &
Professional Courses
N.G AcharyaMarg, Chembur (E),
DEPARTMENT OF COMPUTER SCIENCE

CERTIFICATE
This is to certify that the project entitled
“Iot Based Surveillance Robot using Raspberry Pi”
Under the guidance of Mrs.Sunita Koli is successfully completed by Gaurav
Dineshsingh Mehta. College Roll No.CS19, Seat No:…………. During the period
of 2019-20, as per the syllabus and fulfilment for the completion of the BSc-CS
of University of Mumbai. This certifies that this is the original work of the
Candidate done during the academic year 2019-20.
DATE:

_______________ __________________ _________________

Project Guide Head of Department External


(Mrs. Sunita Koli) (Mrs. Archana Jadhav) Examiner

2
Iot Based Surveillance Robot Using Raspberry Pi

Acknowledgement
“An act of gratitude is that which acknowledges the
blessings of well-wishers and supporting guidance of their rich
experience, which enlighten, inspires and motivates to do
something valuable.”
I would like to and acknowledge kind support, facilities
specially made available to us by management of our institute
N.G.ACHARYA& D.K. MARATHE COLLEGE. We would not have
completed it without their whole hearted support.
I would like to thank our Honourable Principal
-Dr.Vidyaguari Lele for granting us different facilities to do the
project under the guidance of our faculty. Due to their indeed
support this project was possible.
I sincerely acknowledge with deep sense of gratitude and
indebtedness the support given by our HOD – Ms. Archana
Jadhav, for her kind hearted cooperation, guidelines and various
suggestions.
Last but not the least, I would also like to thank all the
Faculty members of the Computer Science Department for their
generous support and all the Lab Attendants for all their timely
help.

Sincere Thank From,


(Gaurav Dinesh Mehta)

3
Iot Based Surveillance Robot Using Raspberry Pi

Iot based surveillance robot Using


Raspberry Pi

4
Iot Based Surveillance Robot Using Raspberry Pi

INDEX

Sr. No Topic Page No.


1) Preliminary Investigation
1.1 Introduction
1.2 Objectives
1.3 Proposed System
1.4 Scope
2) System Analysis
2.1 Existing System
2.2 Requirement Analysis
2.3 Feasibility Study
2.4 Hardware Requirement
2.5 Software Requirement
2.6 Gantt Chart
3) System Design
3.1 Usecase Diagram
3.2 Activity Diagram
3.3 Sequence Diagram
4) System Coding and System Layout
4.1 System Coding
4.2 System Layout
5) Implementation
5.1 Testing Approach
5.2 Test Cases, Test Data and Results
5.3 Maintenance
6) Conclusion
7) Limitation
8) Future Scope
9) References

5
Iot Based Surveillance Robot Using Raspberry Pi

PRELIMINARY INVESTIGATION

6
Iot Based Surveillance Robot Using Raspberry Pi

1.1 INTRODUCTION

IoT Based Surveillance Robot

Raspberry Pi 3B+ is a card sized computer. It functions almost same as a


computer. There are different types of surveillance systems available such as
camera, CCTV etc., In these types of surveillance systems, the person who is
stationary and is located in that particular area can only able to view what is
happening in that place. Whereas, here, even if the user is moving from one
place to another, he/she can keep track of what is happening in that particular
place at exact time. Also, another advantage is that it offers privacy on both
sides since it is being viewed by only one person. The other big advantage is
that, it is a easy and simple circuit for understanding and designing. The
operating system used here is Raspbian OS. Raspbian OS has to be installed so
that the image can be transmitted to the smart phone Closed circuit television
monitoring system has now become an indispensable device in today’s society.
Robots have found an drastically increasing demand for different range of work
in our life. Their use in army and other security sector increases day by day.
Our project includes one such instance of how a robot can be of use to human
race in general. In this project, we use the internet to establish communication
between the user and a robotic vehicle. This is a dependable connection and a
continuous video feedback is available to control the robotic vehicle. Due to
the use of the web, there is no limitation on range or distance between the user
and the robotic vehicle. It is proposed to address the lower side at cost, efficient,
high-speed processing & control hardware for the self-navigating robotics
application. Design and Implementation of a Robotic Vehicle with Real-Time
Video Feedback Control via Internet/web paper illustrate on an approach to
control a robotic vehicle using the internet as the communication medium
between the user and robotic vehicle.

Raspbian OS has to be installed so that the image and videos can be seen to the
smart phone directly. Closed circuit television monitoring system has now
become an indispensable device in today’s society. There are afferent places
such as school, supermarkets, society security where we are having their own
CCTV system for 24/7 monitoring.

7
Iot Based Surveillance Robot Using Raspberry Pi

1.2 OBJECTIVE

This is the internet of things (IOT) based project, where we are particularly
using the Raspberry Pi 3B+, Pi camera and two DC motor with Robot chassis
to build this Robotic car setup.

It has a web camera mounted over it, through which we will get live video feed
and the interesting part here is that we can control and move this robot from a
web browser over the internet. As it can be controlled using webpage, means it
can also be controlled by using the other smart devices where we can control
through the webpage.

We built a webpage in HTML which has Left, Right Forward Backward links,
clicking on which we can move the robot in any direction. Here we use the term
“Motion” for getting live Video information from USB camera and used
“Flask” for sending commands from webpage to Raspberry Pi using python
script to move the Robot.

The webcam will capture live data with regards to its surroundings and then
send it to a desired device through internet.

The user will be observing this data on the monitor at the user end. According
to the desired movement, the user will control the robotic vehicle through the
webpage available at the user end.

8
Iot Based Surveillance Robot Using Raspberry Pi

1.3 PROPOSED SYSTEM

Our proposed System Consists Of a Raspberry pi 3B+ board along with a


Raspberry Pi camera connected to the Raspberry pi 3B+ board which will
provide us a live Video Feed on a web browser.

This setup would be fitted on to a root chassis which would contain two dc
motors and would enable us to move the surveillance camera (Pi Camera) in all
directions.

To control the motors we would be using a l298 Motor Driver Which would
provide data output and external power to the motors.

On the Software side we would be using python programming language to write


the code.

Motion Software to provide video feed on thee web browser from Raspberry Pi
3B+.

Flask Software to Send commands from the browser to the Raspberry Pi 3B+
and then to the l298 Motor Driver.

9
Iot Based Surveillance Robot Using Raspberry Pi

1.4 SCOPE

Here in this project, one can control the robot from remote end say mobile or
laptop with the use of Wi-Fi as well as Internet and also, we can get the live
streaming of video from the robot for the purpose of surveillance, this video is
obtained on web browser of the remote device from where we are operating the
device also we are able to control the robotic movement.

DC motors are being used for the movement of robotic wheels and stepper
motor is used for camera movement. Raspberry Pi 3B+ is used for video
processing and sending the processed video to user PC with the help of Wi-Fi as
well as internet the robotic unit consists of Wi-Fi dongle, a USB web cam, a
PCB consisting motor driven IC and voltage regulator circuitry.

The User unit consists of a PC within the Wi-Fi range. HTML page is designed
having options of controlling the dc motors and stepper motors. It shows the
live video streaming of the environment

10
Iot Based Surveillance Robot Using Raspberry Pi

SYSTEM ANALYSIS

11
Iot Based Surveillance Robot Using Raspberry Pi

2.1 EXISTING SYSTEM

In the existing system we have seen wall mounted CCTV(Closed-circuit


television) cameras which consume more power, are costly to set up and require
a standalone DVR to store the CCTV footage which ultimately ends up in an
increased cost. Another main limitation of installing a CCTV camera is that,
once fitted in a direction they can only monitor a specific area.

These CCTV cameras need wired connection which increases the cost of setting
up the surveillance cameras.

While Recording a CCTV Footage a Single CCTV camera can create video data
which can result in GB’s.

The Output from the CCTV Footage Was Visible only from a single Monitor.

If there is a electricity-cutoff the CCTV cameras wont work and hence won’t
give 100% video footage guarantee.

12
Iot Based Surveillance Robot Using Raspberry Pi

2.2 REQUIREMENT ANALYSIS

➢ Requirements Determination

The requirement determination involved the collection of information about


how the AR Furniture Application should operate. The requirements
determination activity was the most difficult part of system analysis. It involved
gatherings and documenting of the true and real requirements for the system
being developed.

➢ Requirement Analysis

The primary goal of this phase was to create a detailed functional specification
defining the full set of system capabilities to be implemented, along with
accompanying data and process model. Illustrating the information to be
managed and the processes to be supported by the new system. It involved
examination of the collected data. Models such as Data Flow Diagrams (DFD)
and Entity Relationship (ERD’s) were used to model individual processes and
data respectively. Under here requirements were classified as functional and
nonfunctional requirements, the determination and analysis of requirements
helped the researcher to achieve his/her objective.

13
Iot Based Surveillance Robot Using Raspberry Pi

2.3 FEASIBLITY STUDY

Feasibility studies to check the visibility of the project under the consideration
the theoretical project various types of feasibility are conducted but below are
important represent explain

1) Economic feasibility:

With manual system the operation cost of this system is about 60 lacks for
annual this cost comprises salary of Swiss 25 people’s stationary, building rent,
electricity water telephone etc. but with a new system this offering cost comes
out to be about 20 lacks for renewal and the new system is economically
feasible.

2) Technical feasibility:

Technical Feasibility determines whether the work for the project can be done
with the existing equipment’s software technology and available personals
technical feasibility is concerned with the specified equipment and software that
will satisfy the user requirement this project is feasible on technical remark also
as the proposed system is beneficiary in term of having a soundproof system
with new technical equipment’s install on the system that proposed system can
run on any machine supporting window and work on the best software and
hardware that had been used while designing the system so it would be visible
in all technical term of feasibility.

3) Operational feasibility:

The new solution is possible in all sense but operationally is not the new
system demands the explosion of at least 15 people from the company it creates
an environment of joblessness and fear among the employees it can lead to
indefinite Strike in the company also, so the management must take corrective
action prior in advance to start further proceeding.

14
Iot Based Surveillance Robot Using Raspberry Pi

2.4 HARDWARE REQUIREMENT

1- RASPBERRY PI 3B+

Raspberry Pi is used for making robot wireless and web based.ge Raspberry Pi
and then the videos are transmitted wirelessly from the robot to the user’s
monitor, from where the user can conveniently control the robotic vehicle’s
movement and also the robotic arm movement.

Raspberry pi is connected with the dongle which enables raspberry pi to


transmit over the web network. Raspberry-Pi Module Raspberry Pi uses an SD
card for booting and for memory as it doesn’t have an inbuilt hard disk for
storage.

Raspberry Pi requires 5 volt supply with minimum of 700- 1000 mA current


and it is powered through micro USB cable. ARM11 only requires 3.3 volt of
supply which it takes with the help of linear regulator. 5 volt is required for the
USB ports.

It operates at 700M Hz. We use python or embedded C to write code into the
raspberry pi. It has a strong processing capability due to the ARM11
architecture and Linux-based system.

In terms of interface and control, it has 1 SPI, 1 UART, 1 I2C and 8 GPIO,
which basically meet the control requirement .There are easy to use open source
peripheral driver libraries.

15
Iot Based Surveillance Robot Using Raspberry Pi

Raspberry PI 3B+

2- MOTOR DRIVER IC L298N

The L298N H-bridge module can be used with motors which have a voltage
range of between 5 and 35V DC. With the help of L298N H-bridge module, it is
quite easy to control one or two DC motors. First, connect each motor to the A
and B connections on the L298N module.

Ensure that the polarity of the motors is the same on both inputs if you are using
two motors for a robot or anything. Otherwise, you may need to exchange them
over when both motors are set to forward and one goes backward.

Next, connect the power supply to pin number 4 on the L298N module and
negative/GND to pin number 5 of the L298N module. In this project, we have
two DC motors, therefore digital pins D9, D8, D7 and D6 will be connected to
pins IN1, IN2, IN3 and IN4 respectively.

Then connect D10 to pin number 7 on the module (remove the jumper first) and
D5 to pin number 5 of the module (again, remove the jumper). The direction of
the DC motor is controlled by sending a HIGH or LOW signal to the drive for
each of the motors. For example, for motor one, a HIGH signal to IN1 and a
LOW signal to IN2 so that motor will be turning one direction, and a LOW
signal to IN1 and HIGH signal to IN2 will move the motor in other direction.

However, the motors will not move until a HIGH signal is set to the enable pin
(7 for motor one, 12 for motor two). And they can be turned off when the LOW

16
Iot Based Surveillance Robot Using Raspberry Pi

signal is set to the same pin. However, if you need to control the speed of the
motors, the PWM signal from the digital pin connected to the enable pin.

Motor Driver IC L298N

3- Pi CAMERA MODULE

The Raspberry Pi Camera Module is a custom designed add on for Raspberry


Pi. It attaches to Raspberry Pi 3B+ by way of one small sockets on the board
upper surface.

This interface uses the dedicated CSI interface, which was designed especially
for interfacing to cameras.

The Raspberry Pi Camera Module is a 5MP CMOS camera with a fixed focus
lens that is capable of capturing still images as well as high definition video.
Stills are captured at a resolution of 2592 x 1944, while video is supported at
1080p at 30 FPS, 720p at 60 FPS and 640x480 at 60 or 90 FPS.

The camera is supported in the latest version of Raspbian, Raspberry Pi's


preferred operating system.

17
Iot Based Surveillance Robot Using Raspberry Pi

PI CAMERA V2.1

2.5 SOFTWARE REQUIREMENT

1- MOTION

Motion (Surveillance Software) is free, open source motion detector CCTV


software, developed for Linux. It detects the motion and start recording video
of it. With ‘Motion’ installed in your Raspberry Pi, you can magically turn your
Raspberry Pi into a Security Camera. It is used for getting live video feed,
making time-lapse videos and taking snapshots at regular interval. It records
and saves the Video whenever it detects Motion or any disturbance in the view
area. Live Video feed can be watched on the web browser by entering the IP
address of Pi along with the port.

2- FLASK

18
Iot Based Surveillance Robot Using Raspberry Pi

Here, we have created a web server using Flask, which provides a way to send
the commands from webpage to Raspberry Pi to control the Robot over the
network. Flask allows us to run our python scripts through a webpage and we
can send & receive data from Raspberry Pi to web browser and vice versa.
Flask is a micro framework for Python. This tool is Unicode based having
built-in development server and debugger, integrated unit testing support,
support for secure cookies and it’s easy to use, these things make it useful for
the hobbyist.

3- RASPBIAN OS

Raspbian is a Debian-based computer operating system for Raspberry Pi. There


are several versions of Raspbian including Raspbian Stretch and Raspbian
Jessie. Since 2015 it has been officially provided by the Raspberry Pi
Foundation as the primary operating system for the family of Raspberry Pi
single-board computers. Raspbian was created by Mike Thompson and Peter
Green as an independent project. The initial build was completed in June
2012.The operating system is still under active development. Raspbian is highly
optimized for the Raspberry Pi line's low-performance ARM CPUs. Raspbian
uses PIXEL, Pi Improved X windows Environment, Lightweight as its main
desktop environment as of the latest update. It is composed of a modified
LXDE desktop environment and the Open box stacking window manager with a
new theme and few other changes.

4- VNC VIEWER

In computing, Virtual Network Computing (VNC) is a graphical desktop


sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely
control another computer. It transmits the keyboard and mouse events from one
computer to another, relaying the graphical-screen updates back in the other
direction, over a network. VNC is platform-independent – there are clients and
servers for many GUI based operating systems and for Java. Multiple clients
may connect to a VNC server at the same time. Popular uses for this
technology include remote technical support and accessing files on one's work
computer from one's home computer, or vice versa. The original VNC source
code and many modern derivatives are open source under the GNU General
Public License. There are a number of variants of VNC which offer their own

19
Iot Based Surveillance Robot Using Raspberry Pi

particular functionality; e.g., some optimized for Microsoft Windows, or


offering file transfer (not part of VNC proper), etc. Many are compatible
(without their added features) with VNC proper in the sense that a viewer of
one flavour can connect with a server of another; others are based on VNC code
but not compatible with standard VNC.

5- HTML

Hypertext Markup Language (HTML) is the standard markup language for


creating web pages and web applications. With Cascading Style Sheets (CSS)
and JavaScript, it forms a triad of cornerstone technologies for the World Wide
Web. Web browsers receive HTML documents from a web server or from local
storage and render the documents into multimedia web pages. HTML describes
the structure of a web page semantically and originally included cues for the
appearance of the document. HTML elements are the building blocks of HTML
pages. With HTML constructs, images and other objects such as interactive
forms may be embedded into the rendered page. HTML provides a means to
create structured documents by denoting structural semantics for text such as
headings, paragraphs, lists, links, quotes and other items. HTML elements are
delineated by tags, written using angle brackets. Tags such as <img /> and
<input /> directly introduce content into the page. Other tags such as <p>
surround and provide information about document text and may include other
tags as sub-elements. Browsers do not display the HTML tags but use them to
interpret the content of the page. HTML can embed programs written in a
scripting language such as JavaScript, which affects the behaviour and content
of web pages. Inclusion of CSS defines the look and layout of content.

2.6 GANTT CHART

A Gantt chart is a graphical representation of the duration of tasks against the


progression of time. A Gantt chart is a popular type of bar chart that aims to
show the timing of tasks or activities as they occur over a period of time.
Although the Gantt chart did not initially indicate the relationship between
activities this become has become more common in current usage as both
timing and interdependences can be identified.
In project management a Gantt chart can show when the project terminal
elements start and finish, summary elements (shown) or terminal element

20
Iot Based Surveillance Robot Using Raspberry Pi

dependences (not shown). A terminal element is defined as the smallest task


tracked as part of the project effort.

Since the initial introduction of Gantt charts, they have become an industry
standard as a key project management tool for representing the phases, tasks
and activities that are scheduled as a part of a Project Work Breakdown
Structure or timeline of activities.

21
Iot Based Surveillance Robot Using Raspberry Pi

22
Iot Based Surveillance Robot Using Raspberry Pi

SYSTEM DESIGN

23
Iot Based Surveillance Robot Using Raspberry Pi

3.1 USECASE DIAGRAM

A use case diagram at its simplest is a representation of a user's interaction with


the system that shows the relationship between the user and the different use
cases in which the user is involved.
A use case diagram can identify the different types of users of a system and the
different use cases and will often be accompanied by other types of diagrams as
well.
While a use case itself might drill into a lot of detail about every possibility, a
use-case diagram can help provide a higher-level view of the system. It has
been said before that "Use case diagrams are the blueprints for your system”.
They provide the simplified and graphical representation of what the system
must do.
Due to their simplistic nature, use case diagrams can be a good communication
tool for stakeholders. The drawings attempt to mimic the real world and provide
a view for the stakeholder to understand how the system is going to be
designed.

24
Iot Based Surveillance Robot Using Raspberry Pi

IoT Based Surveillance Robot Use Case Diagram

25
Iot Based Surveillance Robot Using Raspberry Pi

3.2 ACTIVITY DIAGRAM


Activity diagrams are graphical representations of workflows of stepwise
activities and actions with support for choice, iteration and concurrency. In the
Unified Modeling Language, activity diagrams are intended to model both
computational and organizational processes (i.e., workflows), as well as the data
flows intersecting with the related activities.
Although activity diagrams primarily show the overall flow of control, they can
also include elements showing the flow of data between activities through one
or more data stores Activity diagrams can be regarded as a form of a structured
flowchart combined with a traditional data flow diagram.
Typical flowchart techniques lack constructs for expressing concurrency.
However, the join and split symbols in activity diagrams only resolve this for
simple cases; the meaning of the model is not clear when they are arbitrarily
combined with decisions or loops.
While in UML 1.x, activity diagrams were a specialized form of state diagrams,
in UML 2.x, the activity diagrams were reformalized to be based on Petri net-
like semantics, increasing the scope of situations that can be modeled using
activity diagrams.
These changes cause many UML 1.x activity diagrams to be interpreted
differently in UML 2.x.UML activity diagrams in version 2.x can be used in
various domains, e.g. in design of embedded systems. It is possible to verify
such a specification using model checking technique.

26
Iot Based Surveillance Robot Using Raspberry Pi

IoT Based Surveillance Robot Activity Diagram

27
Iot Based Surveillance Robot Using Raspberry Pi

3.3 SEQUENCE DIAGRAM


A sequence diagram shows object interactions arranged in time sequence. It
depicts the objects and classes involved in the scenario and the sequence of
messages exchanged between the objects needed to carry out the functionality
of the scenario. Sequence diagrams are typically associated with use case
realizations in the Logical View of the system under development. Sequence
diagrams are sometimes called event diagrams or event scenarios.
A sequence diagram shows, as parallel vertical lines, different processes or
objects that live simultaneously, and, as horizontal arrows, the messages
exchanged between them, in the order in which they occur. This allows the
specification of simple runtime scenarios in a graphical manner.
If the lifeline is that of an object, it demonstrates a role. Leaving the instance
name blank can represent anonymous and unnamed instances .Messages,
written with horizontal arrows with the message name written above them,
display interaction. Solid arrow heads represent synchronous calls, open arrow
heads represent asynchronous messages, and dashed lines represent reply
messages. If a caller sends a synchronous message, it must wait until the
message is done, such as invoking a subroutine.
If a caller sends an asynchronous message, it can continue processing and
doesn’t have to wait for a response. Asynchronous calls are present in
multithreaded applications, event- driven applications and in message-oriented
middleware. Activation boxes, or method-call boxes, are opaque rectangles
drawn on top of lifelines to represent that processes are being performed in
response to the message (Execution Specifications in UML).

28
Iot Based Surveillance Robot Using Raspberry Pi

Sequence Diagram For Interaction Of Camera

29
Iot Based Surveillance Robot Using Raspberry Pi

Sequence Diagram For Forward Movement Of The Robot

30
Iot Based Surveillance Robot Using Raspberry Pi

Sequence Diagram For Movement of Robot In The Right Direction

31
Iot Based Surveillance Robot Using Raspberry Pi

Sequence Diagram For Movement Of Robot In The Left Direction

32
Iot Based Surveillance Robot Using Raspberry Pi

SYSTEM CODING
AND
SYSTEM LAYOUT

33
Iot Based Surveillance Robot Using Raspberry Pi

4.1 SYSTEM CODING

Python Flask Module Code

Project.py

from flask import Flask

from flask import render_template, request

import RPi.GPIO as GPIO

import time

app = Flask(__name__)

m11=18

m12=23

m21=24

m22=25

GPIO.setwarnings(False)

GPIO.setmode(GPIO.BCM)

GPIO.setup(m11, GPIO.OUT)

GPIO.setup(m12, GPIO.OUT)

GPIO.setup(m21, GPIO.OUT)

34
Iot Based Surveillance Robot Using Raspberry Pi

GPIO.setup(m22, GPIO.OUT)

GPIO.output(m11 , 0)

GPIO.output(m12 , 0)

GPIO.output(m21, 0)

GPIO.output(m22, 0)

print "IoT Based Surveillance Robordeveloped by Gaurav Mehta"

a=1

@app.route("/")

def index():

return render_template('robot.html')

@app.route('/left_side')

def left_side():

data1="LEFT"

GPIO.output(m11 , 0)

GPIO.output(m12 , 0)

GPIO.output(m21 , 1)

GPIO.output(m22 , 0)

return 'true'

@app.route('/right_side')
35
Iot Based Surveillance Robot Using Raspberry Pi

def right_side():

data1="RIGHT"

GPIO.output(m11 , 1)

GPIO.output(m12 , 0)

GPIO.output(m21 , 0)

GPIO.output(m22 , 0)

return 'true'

@app.route('/up_side')

def up_side():

data1="FORWARD"

GPIO.output(m11 , 1)

GPIO.output(m12 , 0)

GPIO.output(m21 , 1)

GPIO.output(m22 , 0)

return 'true'

@app.route('/down_side')

def down_side():

data1="BACK"

GPIO.output(m11 , 0)
36
Iot Based Surveillance Robot Using Raspberry Pi

GPIO.output(m12 , 1)

GPIO.output(m21 , 0)

GPIO.output(m22 , 1)

return 'true'

@app.route('/stop')

def stop():

data1="STOP"

GPIO.output(m11 , 0)

GPIO.output(m12 , 0)

GPIO.output(m21 , 0)

GPIO.output(m22 , 0)

return 'true'

if __name__ == "__main__":

print "Starting Code Execution"

app.run(host='192.168.0.108',port=5010)

37
Iot Based Surveillance Robot Using Raspberry Pi

HTML Code View

robot.html

<html>

<head>

<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

</head>

<body>

<img src="http://192.168.0.108:8081"/>

<div style="float:right">

</div>

<div style=" height:400px; width:300px; float:right;">

<center>

<h1><span style="color:#5C5C5C;">Welcome</span><span
style="color:#139442"> User</span></h1>

<h2>IoT Based Surveillance Robot</h2><br><br>

<h3>Project Developed By Gaurav Mehta</h3><br>

38
Iot Based Surveillance Robot Using Raspberry Pi

<a href="#" id="up" style="font-size:30px;text-decoration:none;">


&#x1F881;&#x1F881;<br>Forward</a><br><br></center>

<a href="#" id="left" style="font-size:30px;text-decoration:none;">


&#x1F880;&#x1F880;Left</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;

<a href="#" id="right" style="font-size:30px; text-decoration:none;"> Right


&#x1F882;&#x1F882;</a><br><br>

<center><a href="#" id="down" style="font-size:30px;text-decoration:none;">


Backward<br> &#x1F883;&#x1F883;</a></center>

</div>

<script>

$( document ).ready(function(){

$("#down").on("mousedown", function() {

$.get('/down_side');

}).on('mouseup', function() {

$.get('/stop');

});

$("#up").on("mousedown", function() {

$.get('/up_side');

}).on('mouseup', function() {

39
Iot Based Surveillance Robot Using Raspberry Pi

$.get('/stop');

});

$("#left").on("mousedown", function() {

$.get('/left_side');

}).on('mouseup', function() {

$.get('/stop');

});

$("#right").on("mousedown", function() {

$.get('/right_side');

}).on('mouseup', function() {

$.get('/stop');

});

});

</script>

</body>

</html>

40
Iot Based Surveillance Robot Using Raspberry Pi

4.2 SYSTEM LAYOUT

41
Iot Based Surveillance Robot Using Raspberry Pi

Surveillance Robot Model

VNC Viewer ScreenShot

42
Iot Based Surveillance Robot Using Raspberry Pi

Configuring Flask Server

Configuring and Enabling Motion Module

43
Iot Based Surveillance Robot Using Raspberry Pi

Loading The Final WebPage and Performing Operations

IMPLEMENTATION
44
Iot Based Surveillance Robot Using Raspberry Pi

5.1 TESTING APPROACH


 Software Testing is evaluation of the software against requirements gathered
from users and system specifications. Testing is conducted at the phase level
in software development life cycle or at module level in program code.
Software testing comprises of Validation and Verification.

 Unit Testing

While coding, the programmer performs some tests on that unit of program to
know if it is error free. Testing is performed under white-box testing approach.
Unit testing helps developers decide that individual units of the program are
working as per requirement and are error free.

 Integration Testing

Even if the units of software are working fine individually, there is a need to
find out if the units if integrated together would also work without errors. For

45
Iot Based Surveillance Robot Using Raspberry Pi

example, argument passes and data updating etc.

 System Testing

The software is compiled as product and then it is tested. This can be


accomplished using one or more of the following tests:

 Functionality Testing-Tests all functionalities of the software against the


requirement.

 Performance testing-This test proves how efficient the software is. It tests
the effectiveness and average time taken by the software to do desired
task. Performance testing is done by means of load testing and stress
testing where the software is put under high user and data load under
various environment conditions.
 Acceptance Testing-When the software is ready to hand over to the
customer it must go through last phase of testing where it is tested for
user-interaction and response. This is important because even if the
software matches all user requirements and if user does not like the way
it appears or works, it may be rejected.

 Alpha testing

The team of developer themselves perform alpha testing by using the system as
if it is being used in work environment. They try to find out how user would
react to some action in software and how the system should respond to inputs.

 Beta testing
After the software is tested internally, it is handed over to the users to use it
under their production environment only for testing purpose. This is not yet the
delivered product. Developers expect that users at this stage will bring minute
problems, which were skipped to attend.

46
Iot Based Surveillance Robot Using Raspberry Pi

5.2 TEST CASES, TEST DATA AND RESULTS

Test Module Test Steps/ Expected Actual Pass/


Case /Sub Condition Prerequisit procedur output Output Fail
ID Module e e
Name
T01 Robot To check If Flask Press On The Robot The Robot Pass
Movement the robot Configured Forward moves in moves in
Forward moves in and Button Forward Forward
forward Running And Wait Direction Direction
direction For
Response

47
Iot Based Surveillance Robot Using Raspberry Pi

T02 Robot To check if Flask Press On The Robot The Robot Pass
Movement the robot Configured Backward moves in moves in
Backward moves in and Button Forward Backward
backward Running And Wait Direction Direction
direction For
Response

T03 Robot To check if Flask Press On The Robot The Robot Pass
Movement the Robot Configured Right moves in moves in
Right moves in and Button Right Right
Right Running And Wait Direction Direction
Direction For
Response

T04 Robot To check if Flask Press On The Robot The Robot Pass
Movement the Robot Configured Left moves in moves in
Left Moves in and Button Left Left
Left Running And Wait Direction Direction
Direction For
Response

T05 Video To Check If Motion Enter the Video Video Pass


Survellian we are configured Ip address survellia Surveillance
ce receiving the and running of Flask nce is seen on
video server should be the screen
Surveillance seen on
the screen

5.3 MAINTENANCE
 Maintenance is an enigma of the system development. It holds the software
industry captive. Analysts spend more time in maintaining programs than
coding them. Software maintenance denotes any changes made to the
software product after it has been delivered to the customer. Most products
need maintenance due to the wear and tear of the product. Software
Maintenance can be divided into following types:
 Corrective Maintenance: It is necessary to rectify the bugs observed while
the system is in use. Security Master needs this maintenance for any

48
Iot Based Surveillance Robot Using Raspberry Pi

removing flaws that can arise while loading data or for correcting the logical
bugs that might have been left unchecked as they appear only in real time.
 Adaptive Maintenance: Software might need this type of maintenance when
the customers need the product to run on new platforms, on new operating
systems, or when they need the product to interface with new hardware or
software. . Security Master needs this type of maintenance for adapting to
the new Browser and Server Configurations that may be required in future.

 Perfective Maintenance: Software product might need maintenance to


support the new features that users want it to support, to change different
functionalities of the system according to the customer demands, or to
enhance the performance of the system. . Security Master needs this
maintenance for removing the short falls of its current version. New features
to balance load on the network more efficiently or more facilities to the user
on the mobile phone can be given.
 Software Maintenance is essential as initial stages of any software developed
are always unstable. Over the time it achieves stability as bugs are fixed and
faults are removed to make the system accurate

CONCLUSION
 Using this robotic system a remote area can be monitored easily from remote
end. One can easily monitor as well as control the activity of the robotic
unit. This system can be used any conditions and areas where it is difficult
for the security forces to reach it can monitor the areas.
 As the communication is done with the help of internet so limitation of
range of operation does not arise and thus we can monitor any remote areas.
 If this robot is within the Wi-Fi range there is no need of internet too.
 We control the robot using the Wi-Fi as a medium.
 In this project we used raspberry pi zero w working on Raspbian OS. As the

49
Iot Based Surveillance Robot Using Raspberry Pi

communication is done with the help of internet so limitation of range of


operation does not arise and thus we can monitor any remote areas.
 One can easily monitor as well as control the activity of the robotic unit.

LIMITATIONS
 If the wireless network is not properly configured, there would be
interference from access points operating in the same channel (From internal
and neighboring AP’s) which would reduce the quality of the Wi-Fi network.
 The most commonly used Wi-Fi network band – 2.4 Ghz has only three non-
overlapping channels and is always over-crowded. Besides, non Wi-Fi
devices like Microwave Owens, Bluetooth devices, etc can interfere with
Wireless networks.
 For long-haul backbone wireless networks, Line of Sight might be required.
Even for WiFi access networks (that don’t require a Line of Sight), the
signal strength and signal quality might be affected due to interfering objects
like Glass, Trees, Elevators, Metallic Racks, etc.

50
Iot Based Surveillance Robot Using Raspberry Pi

 Wireless networks offer sufficient bandwidth when IP Surveillance Cameras


are placed near the Wireless Access Points. But the bandwidth decreases
with increasing distance.
 IEEE 802.11n is the latest wireless standard that offers more bandwidth +
increased wireless coverage distance. But many Wireless IP Surveillance
Cameras do not support this standard and even if they do, they might support
a reduced MIMO configuration

FUTURE SCOPE
 There are lots of improvements that can be made on the current design and
technology and lots of additional feature scan be added.
 We can use different types of sensor so that we can use robot in different
field i.e. Temperature Sensor, Pressure Sensor, Heat Sensor, Position Sensor,
Proximity Sensor.
 A multipurpose robot can be made by wireless network, ranging from
surveillance and home security to industrial applications where the user need
not be present at the work place in person but can do it from his home itself.
 We can use this system for military applications installing suitable sensors.
Just by changing the robotic unit design we can use it in hospitals for patient

51
Iot Based Surveillance Robot Using Raspberry Pi

monitoring.With reduced time delay we can have faster operation and quick
response to any illegal activities in the monitored area.
 Also it can be used as a spy robot.
 The robot is very economical.

REFRENCES
 www.electronicsforu.com

 www.circuitdigest.com/webcontrolled robotic surveillance ca

 International general of
Computer Applications –
March 2015

 International Journal of Emerging


Technology and Advanced Engineering

52
Iot Based Surveillance Robot Using Raspberry Pi

 Website: www.ijetae.com (ISSN 2250-


2459, Journal, Volume 5, Issue 10,
October 2015)

 Robotic Vehicle Control using Internet via


Webpage and Keyboard – International
journal of computer application Volume 117
14 Mar.2015

53

Vous aimerez peut-être aussi