Академический Документы
Профессиональный Документы
Культура Документы
PROJECT REPORT ON
SUBMITTED BY
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
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:
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.
3
Iot Based Surveillance Robot Using Raspberry Pi
4
Iot Based Surveillance Robot Using Raspberry Pi
INDEX
5
Iot Based Surveillance Robot Using Raspberry Pi
PRELIMINARY INVESTIGATION
6
Iot Based Surveillance Robot Using Raspberry Pi
1.1 INTRODUCTION
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
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.
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
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
➢ Requirements Determination
➢ 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
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
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.
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+
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.
3- Pi CAMERA MODULE
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.
17
Iot Based Surveillance Robot Using Raspberry Pi
PI CAMERA V2.1
1- MOTION
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
4- VNC VIEWER
19
Iot Based Surveillance Robot Using Raspberry Pi
5- HTML
20
Iot Based Surveillance Robot Using Raspberry Pi
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
24
Iot Based Surveillance Robot Using Raspberry Pi
25
Iot Based Surveillance Robot Using Raspberry Pi
26
Iot Based Surveillance Robot Using Raspberry Pi
27
Iot Based Surveillance Robot Using Raspberry Pi
28
Iot Based Surveillance Robot Using Raspberry Pi
29
Iot Based Surveillance Robot Using Raspberry Pi
30
Iot Based Surveillance Robot Using Raspberry Pi
31
Iot Based Surveillance Robot Using Raspberry Pi
32
Iot Based Surveillance Robot Using Raspberry Pi
SYSTEM CODING
AND
SYSTEM LAYOUT
33
Iot Based Surveillance Robot Using Raspberry Pi
Project.py
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)
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__":
app.run(host='192.168.0.108',port=5010)
37
Iot Based Surveillance Robot Using Raspberry Pi
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>
<center>
<h1><span style="color:#5C5C5C;">Welcome</span><span
style="color:#139442"> User</span></h1>
38
Iot Based Surveillance Robot Using Raspberry Pi
</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
41
Iot Based Surveillance Robot Using Raspberry Pi
42
Iot Based Surveillance Robot Using Raspberry Pi
43
Iot Based Surveillance Robot Using Raspberry Pi
IMPLEMENTATION
44
Iot Based Surveillance Robot Using Raspberry Pi
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
System Testing
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
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
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.
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
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
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
International general of
Computer Applications –
March 2015
52
Iot Based Surveillance Robot Using Raspberry Pi
53