0% found this document useful (0 votes)
164 views6 pages

Surveillance Robot Using Raspberry Pi and Iot: Harshitha R Muhammad Hameem Safwat Hussain

The document discusses the design of a surveillance robot using a Raspberry Pi and IoT. It aims to provide remote surveillance and monitoring capabilities for homes in an affordable way. The robot will use a Raspberry Pi, webcam, and face recognition to detect intruders and notify owners. It allows live streaming of the webcam feed from any location over the internet.

Uploaded by

Karthik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
164 views6 pages

Surveillance Robot Using Raspberry Pi and Iot: Harshitha R Muhammad Hameem Safwat Hussain

The document discusses the design of a surveillance robot using a Raspberry Pi and IoT. It aims to provide remote surveillance and monitoring capabilities for homes in an affordable way. The robot will use a Raspberry Pi, webcam, and face recognition to detect intruders and notify owners. It allows live streaming of the webcam feed from any location over the internet.

Uploaded by

Karthik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

2018 International Conference on Design Innovations for 3Cs Compute Communicate Control

Surveillance Robot using Raspberry Pi and IoT


Harshitha R Muhammad Hameem Safwat Hussain
Electronics and Communication Engineering
Assistant Professor, MVJ College of Engineering
MVJ College of Engineering, Bangalore, India
Bangalore, India
Email: [email protected]
Email: [email protected]

Abstract— remote surveillance and monitoring of our homes has II. RELATED WORK
seen a growing need in emerging times. By means of this paper, we
put forward a surveillance robot which can be integrated into any Several projects and systems have been introduced in
kind of household. The base controller of the bot will be the developing a robust home security system. With a common
powerful Raspberry Pi 3 Model B. A webcam attached to the Pi motto, they’ve developed systems using varying processors and
monitors the area and sends a notification when any trespassing or features.
obtrusion is detected. The camera also possesses face recognition
In [1], the author discusses a system developed for remote
algorithm which will possess the ability to identify the person
responsible for the motion triggering. If it is an authorized
surveillance of homes using an Arduino, IP cam and Team
personnel, the on board voice assistant will start talking with the Viewer to monitor the system. A DTMF controlled remote is
person. The notification will be sent only when it’s an unauthorized used to switch on the PC, camera and robot. Once the mobile
personnel and will contain pictures clicked of the trespasser and phone is called and specific set of keys are pressed,
also activate live streaming of the webcam feed. The live streaming corresponding relay switches activate all the components
ability of the Pi allows the camera feed to be analyzed from any required in the remote surveillance. Then to login to the remote
location using internet. With such a system, every user will feel PC, it uses a VNC server and the Windows app built on the PC.
more sheltered while they’re not at their place of residence or when The app then sends respective signals to the mobile robot using
they’ve left their children and old ones alone at home. RF technology. Looking at it from a broader prospective, we
use GSM technology to activate the system, Internet to gain
Keywords-surveillance, Raspberry Pi 3 Model B, webcam, live access of the remote PC and RF technology to control the
stream robot. The lag between each system has not been considered in
the system, which is a very crucial factor. When experimented
I. INTRODUCTION
with a similar setup, the response time between pressing the
Traditionally, surveillance systems are installed in every button on the Windows app and the robot’s movement can
security critical areas. These systems generally consist of high extend up to even a minute or more. The RF technology used
quality cameras, multiple computers for monitoring, servers for to control the robot requires line of sight communication
storing these videos and many security personnel for between the transmitter and receiver module. It also has limited
monitoring these videos. When considered as a whole, these range and cannot be used in long halls. The robot cannot be
systems can yield great complexities while installing as well as controlled from another room either. The advantage of using
for their maintenance. The CCTV camera feeds are only visible Raspberry Pi 3 Model B is that it has on-board Wi-Fi, allowing
in certain locations and they also have limited range within it to connect to the home’s router. This allows easy movement
which these can be viewed. Above all these, the cost of in every nook and corner of the house without any hassle. The
implementations of these systems is so high that they cannot be lag is also only dependent on the internet speed, which can be
installed in every household. . easily upgraded.
The traditional systems require continuous monitoring by The paper in [2] describes a system for smart surveillance
some dedicated personnel which is not possible in every of homes using a PC with on-board camera. The image
household. Hiring an unknown person to do so will also raise processing algorithm uses background subtraction to detect
privacy issues. The CCTV cameras installed these days also motion by fixing certain threshold above which it decides that
have limited vision because they’re stationary modules. If an intrusion is detected. It also uses Gaussian blur to smoothen the
intruder moves away from the field of view of a CCTV camera, high frequency noise which may occur while capturing the
it cannot follow or track his motions. The solution to all the images using different conditions. Once motion is detected, the
above issues is to have a surveillance robot which can monitor Arduino which has a buzzer connected to it. As soon as motion
the areas where it’s installed and send notifications to the is detected, the buzzer goes on. Simultaneously, the camera
owner when an intrusion happens. It also allows the user to clicks pictures and uploads it to the Dropbox. The obvious
login to the Raspberry Pi’s webcam from any remote location drawback of this system is that it doesn’t send any notifications
and view live feed of whatever is happening in his premises. to the user regarding the intrusion. Uploading the images to
The cost effectiveness and remote control features of the robot Dropbox is a good idea for remote access but not for instant
allow it to be used easily by every user. notifications. Moreover, using a PC’s camera for motion
detection makes it a very bulky system. It cannot be moved
around or controlled from a remote location. The another

978-1-5386-7523-6/18/$31.00 ©2018 IEEE 46


DOI 10.1109/ICDI3C.2018.00018
disadvantage of using a PC is that it should always be
connected to the power supply. It incurs too much of wastage
of electricity. The PC is also capable of doing a multitude of
tasks and using it solely for surveillance is an under utilization
of resources. By doing so, the cost of implementation of the
project also increases, making it less suitable for the different
kinds of households available.The other advantage of using a
microprocessor like Raspberry Pi is that it can be made into a
very handy device. This ensures that we can install this system
in any position and in any part of the house. The camera
mounted on the robot can also be turned in any required
direction, in contrast to the stationary one built in the PC. The
power consumption is also very less comparatively. Since the
Raspberry Pi runs on 5V DC, it can be easily powered from a
power bank. That helps us achieve an uninterrupted power Figure 2. Raspberry Pi 3 Model B
supply for the system as a low power consumption rate.
The microprocessor used in the project is the Raspberry Pi 3
The authors in [3] have developed a surveillance system Model B. There have been many significant upgrades made
using Raspberry Pi and the algorithm for detecting motion is in the latest version of the Raspberry Pi board in comparison
written using SimpleCV. The USB camera attached to the to the Raspberry Pi 2, which make it more suitable for this
Raspbeeri Pi looks out for any motion and once its detected, it project. The SOC in the Raspberry Pi 3 Model B is
switches on the lights of the room and clicks snapshots of the Broadcomm BCM2837, which is almost 50% faster than the
surrounding area. These images are sent over the internet to the Raspberry Pi 2[4]. The CPU is also faster, at 1.2GHz, in
user. This project has the feature of switching on the lights of comparison to the 900MHz Quad Cortex A7 in Pi 2.The
the room as an added feature and uses a low power processor, Graphical Processing Unit is clocked at 400MHz compared
compared to the others. But it lacks any authentication feature to the 250 MHz VideoCore IV in Pi 2. Above all, the
of the detected intrusion. It will send notifications even when Raspberry Pi 3 Model B features an on-board WiFi and
an authorized person moves in front of the system. This is also Bluetooth 4.0, which makes it easier to use in IoT
a stationary module which cannot be moved around. The face applications. Apart from all these, there many many other
recognition feature used in our project provides an extra improvisations made in the Raspberry Pi 3, but hardware
authentication for the system. It avoids unnecessary storage of wise, there has not been any major changes when compared
images or sending of notifications when the user is at home or to the Raspberry Pi 2. All the peripherals required in this
in motion in front of the camera. It can also be controlled from project are connected to the Raspberry Pi 3 and it also
any remote location over the internet. Since it has a voice contains the programs required for motion detection,
assistant in it, it can be easily controlled by the user using notification alert, controls to move the robot and voice
simple voice commands when he is at home. control algorithm. It is the brain of the complete project. The
III. SYSTEM OVERVIEW Raspberry Pi features 4 USB 2.0 ports, which are used to
connect the different components. The Raspberry Pi is
Figure 1 contains an overview of the system proposed in powered using 5V DC supply to the micro USB Power
this paper. input. It has been upgraded to handle up to 2.5 amperes of
current. The MicroSD card slot is inserted with a memory
card which contains the OS running on the Raspberry Pi.
ii. USB Camera with Microphone

Figure 1. Block Diagram of Proposed System


The main components of the system are:

Figure 3. Logitech C270


i. Raspberry Pi 3 Model B The camera is used in this project for motion detection,
capturing the image of the intruder when motion is detected,

47
to stream live feed of the intrusion to the user in remote v. Buck Converter
location and also to authenticate the user in case the motion
is caused by him or any other authorized personnel. The
camera used in this project is the Logitech C270[5]. It can be
connected to the Raspberry Pi using the USB port. The live
video stream captured by the camera has a resolution of
1280 x 720 pixels. The built-in mic with noise reduction
allows background noise cancellation and high quality video
capture. The software provided with the camera make it
suitable for face tracking and motion detection, the two
major components of our project.
iii. Motor Driver
Figure 6. LM2596 Buck Converter
The Buck converter is a DC-DC power step down module,
used to regulate higher DC voltage to lower voltages and
provide constant DC voltage[7]. In this project, we require a
12V supply for the motors, for which the lead acid battery is
used. But the Raspberry Pi requires constant 5V DC for its
operations. So the 12V battery is connected to the buck
converter, which regulates it into 5V DC which is used to
power up the Raspberry Pi. We use LM2596 buck converter
module, which can drive loads up to 3 amperes with high
efficiency. The high precision potentiometer can be varied to
obtain voltages in the range 1.25 to 30V for input voltages
Figure 4. L298N Motor driver between 4 to 35V.
The motor driver contains the H-bridge connection required vi. Motors
for bi-directional control of the motor. This is essential for
the robot to achieve all directions of locomotion, namely,
forward, backward, left and right.The power source for the
motors is a 12V battery which is supplied appropriately to
the motors using the motor driver. The motor driver is
controlled using the actuating signals from the
microprocessor. The motor driver used in this project is the
L298N. It is a dual motor controller, meaning it can control
two motors at the same time[6]. For controlling 4 motors,
we need to connect two motors in parallel to the same slot. It Figure 7. DC motor
can provide up to 2 amperes per channel and it is an
inexpensive module to use. This board also features an on- The robot’s locomotion is achieved by connecting it to wheels.
board 12v to 5v regulator, IC 7805, which can be used to To run these motors, we require motors. The motors used in
power up any board which requires it. This makes it a this project are 300 rpm DC motors which have ample speed as
common choice for hobbyist projects. well as torque to carry the whole weight of all the components
that are mounted on the robot [8]. We used 4 motors and
iv. Battery wheels to build a 4 wheeled robot which provides stability and
proper control of the robot’s movements.
vii. Speaker
The speaker is used for the voice assistant. It is connected to
the Raspberry Pi’s 3.5mm audio jack, which is configured for
audio output. The speaker used in this project is the Sony SRS-
XB2 which is a portable speaker with a rechargeable battery
[9]. This makes it handy to use. It can provide up to 10 hours of
battery life for one cycle of complete charge. It is also light
weight which allows it to be easily mounted on the robot’s
Figure 5. 12v Lead Acid battery base.
The battery used for powering the system is a 12v Lead acid IV. FLOWCHART
battery. It is rechargeable and can provide up to 1.3 amperes
in an hour. This is ideal for controlling the movement of the Figure 9 contains a flowchart explaining the sequence of
4 DC motors used in the project. events taking place in the system.

48
Figure 9. Flowchart of proposed system

Figure 10. Motion Detection Using SimpleCV


V. SYSTEM IMPLEMENTATION
The system’s plot begins by switching in the main switch, The algorithm for motion detection is based on background
which gives power supply from the 12V battery to the entire subtraction. There are two steps in doing so, namely
system. Once switched on, the buck converter regulates it to background initialization and background update [10]. The
5V DC supply and powers the Raspberry Pi. The Pi boots and first step is computation of the background. In our project, this
runs the script written for motion detection using the USB is the reference image we use for determining whether there
camera feed. The algorithm for motion detection is shown in has been motion or not. The background update is the second
Figure 10. operation taking place. For doing so, the second image is
captured and the difference between the two images is
computed after converting both of them to grayscale. If this
difference exceeds a certain threshold, we conclude that there
has been motion detected.
Once motion is detected, the camera is triggered to start its
face tracking algorithm. If the face detected is an authorized
user, the on board voice assistant on the Raspberry Pi switches
on and enables the robot to be moved using voice commands.
On the other hand, if the face detected is not of an authorized
person, it sends a notification to the user through email. It
simultaneously starts clicking snapshots of the intruder and
stores it locally for future use. It also uploads them to an
external FTP server, enabling them to be viewed from a remote
location. The Raspberry Pi also begins live video streaming of

49
the camera feed, which can also be viewed from any remote
location.To do so, we use VNC viewer to see the video feed
and also control the robot over internet from far away places.
VI. RESULTS
Figure 11 shows a snapshot of the motion detection
algorithm running on the Raspberry Pi.

Figure 13. Remote login using VNC Viewer


Once we gain remote access to our Raspberry Pi, we can
view live feed from the camera easily using SimpleCV. The
live feed obtained is shown in Figure 14.

Figure 11. Motion detected

Once the motion is detected, an email notification is sent


to the user through his registered email address. This is shown
in Figure 12.

Figure 12. Email notification


Figure 14. Live feed from USB Camera
Once the user receives the notification, he can login to the The quality of live feed obtained depends on the resolution
Raspberry Pi by knowing its IP address and using VNC viewer of camera used as well as the internet speed at the Raspberry
software[11]. For this purpose, the Pi’s IP address should be Pi’s end (for uploading) as well as the user’s end (for video
made static, that is, it should not change whenever it reboots and streaming).
connects to the network again.
The robot’s motion is controlled by pressing appropriate
keys for performing its various functions. The keys
corresponding to these functions is given in Table 1.
Key Function
W Robot moves forward
X Robot moves backward
A Robot turns left
D Robot turns right
Figure 13. VNC login authentication S Robot stops moving
For logging in to the Raspberry Pi from remote location, we
need to enter the right credentials, namely, Username and Q Robot rotates left
password which are defined at the time of installation. Once
E Robot rotates right
logged in, we can see our desktop from remote location, as
shown in Figure 13. Table 1. Keyboard keys and their functions

The control functions for this robot is written using a


python script. In this script, we have defined separate functions
for each movement. When a key is pressed, an appropriate
function is executed and the robot moves in the specified

50
direction. Using Tkinter package, a GUI (Graphical User VIII. REFERENCES
Interface) can also be built to control the robot easily, instead [1] Sushant Kumar and Dr. S. S. Solanki, “Remote Home Surveillance
of using keyboard keys[12]. A buzzer can also be attached to System “, 2016 International Conference on Advances in Computing,
the robot to activate an alarm to scare the intruder away. Communication, & Automation (ICACCA), 29 September 2016
[2] JTutun Juhana and Vivi Gusti Anggraini, “Design and Implementation
The robot can be moved around the house and it can also of Smart Home Surveillance System”, 2016 10th International
communicate with any authorized user at home while doing so. Conference on Telecommunication Systems Services and Applications
(TSSA), 6 March 2017
VII. CONCLUSION [3] Virginia Menezes, Vamsikrishna Patchava and M. Surya Deekshith
Gupta, “Surveillance and Monitoring System using Raspberry Pi and
The advantages of installing such a system in every SimpleCV”, 2016 International Conference on Green Computing and
household is that it provides peace of mind to the user about Internet of Things (ICGCIoT), 14 January 2016
his premises even when he’s not present at home. The low [4] https://hackaday.com/2016/02/28/introducing-the-raspberry-pi-3/
power consumption of this system enables it to be installed in [5] https://www.logitech.com/en-in/product/hd-webcam-c270
any kind of household with ease. It can also be used for a long [6] https://tronixlabs.com.au/news/tutorial-l298n-dual-motor-controller-
duration of time by using an appropriate battery. It will allow module-2a-and-arduino
the system to be under working condition for weeks together. [7] https://robu.in/product/lm2596-dc-dc-buck-converter-step-down-
Even if a security camera has already been installed, this module-power-supply-output-1-23v-
30v/?gclid=Cj0KCQjwnqzWBRC_ARIsABSMVTNntWcvCMu9FzXc8
system can be added to it so that it can provide extra security. JvR5NxH1Xur68-w1D2nTLDBTcirjNPBRoS_-z4aAmAOEALw_wcB
The users will be able to keep an eye on their loved ones at [8] https://robokits.co.in/motors/300rpm-12v-dc-motor-with-
home, even if they are busy working in any other place. It gearbox?cPath=2_3&zenid=vgkkmg5l1t4efo596pqoulkr85
provides safety to old age people and children if they’re alone [9] https://www.ebay.in/itm/253373210339?aff_source=Sok-Goog
at home. [10] https://docs.opencv.org/3.2.0/d1/dc5/tutorial_background_subtraction.ht
ml
[11] https://www.raspberrypi.org/documentation/remote-access/vnc/
[12] https://docs.python.org/2/library/tkinter.html

51

You might also like