Project Report FYP
Project Report FYP
by
Research Supervisor:
Engr. Tazeen Amber
2016-2020
i
by
A THESIS
presented to The Islamia University of Bahawalpur, Bahawalpur
in partial fulfillment of the requirements for the degree of
Bachelor of Science
in
[COMPUTER SYSTEMS ENGINEERING]
APPROVED BY:
2016-2020
ii
2020
Any part of this thesis cannot be copied, reproduced or published without the written approval of
the Scholar.
ABSTRACT
Autonomous systems pose both an opportunity and challenge for war-fighters. Militaries who
harness their advantage will be able to field forces with greater range, persistence, mass,
iii
coordination and speed on the battlefields. Autonomous systems are already capable enough to
eliminate many tasks currently performed by war fighters’ and are likely to continue improving
over time. And at the same time war is and will remain a human Endeavour. Robots are not
combatants but are merely tools in the hand of war fighters to better perform their job: to fight
and win. The gauge existing advance point of view for supervision as well as to defend border
line areas using multi-functional Robot based on present use of robotics in protection and
military applications. System consists of Raspberry pi with a logical code to drive the other
hardware e.g. robotic cars and installed rotating automatic guns to shoot targets, with the help Pi
Cam 5.0 and ultrasonic sensors, targets will be checked and signals transmitted to Raspberry pi,
which commands the other hardware accordingly. The project is integrated using python and
android Studio programming language.
Acknowledgement
In the name of Allah, the Most Gracious and the Most Merciful
Alhamdulillah, all praises to Allah for the strengths and His blessing in completing this thesis.
Special appreciation goes to my supervisor, Engr. Tazeen Amber, for her supervision and
iv
constant support. Her invaluable help of constructive comments and suggestions throughout the
experimental and thesis works have contributed to the success of this research. We are thankful
to our seniors, fellows and departmental staff. We are indebted to our parents for their
continuous support and encouragement.
v
STATEMENT OF ORGINALITY
It is stated that the research work presented in this thesis consists of my own ideas and research
work. The contributions and ideas from others have been duly acknowledged and cited in the
dissertation. This complete thesis is written by us.
Mubashir Hussain
vi
Table of Content
s
ABSTRACT..............................................................................................................................................iv
Acknowledgement.....................................................................................................................................v
STATEMENT OF ORGINALITY..........................................................................................................vi
List of Figures:..........................................................................................................................................ix
List of Tables:............................................................................................................................................x
1. Introduction.......................................................................................................................................1
1.1 Motivation.........................................................................................................................................2
1.2 Background.......................................................................................................................................2
1.3 Purpose of the Project......................................................................................................................3
1.4 Benefits..............................................................................................................................................3
1.5 Current Technologies in Pakistan...................................................................................................4
2. Problem Statement............................................................................................................................5
2.1 Literature Review..........................................................................................................................5
2.1.1 Autonomous Robotic Drone (Kamikaze drone)........................................................................5
2.1.2 CROWS......................................................................................................................................6
2.2 Mobile Operated Robot....................................................................................................................7
2.3 Radio Frequency based Remote operated SPY Robot...................................................................8
2.4 War Field Spying Robot with Night Vision Camera......................................................................8
2.5 RF Based Spy Robot.........................................................................................................................9
2.6 Intelligence Spy Robot with Wireless Night Vision Camera Using Android Application...........9
2.7 Design of an Intelligent Combat Robot for war fields..................................................................10
2.8 Remote Operated Spy Robot Control System..............................................................................10
2.9 Secured Spy IP Control Robot Using Raspberry Pi.....................................................................10
3. Components.....................................................................................................................................12
3.1 Raspberry pi3 B+.........................................................................................................................12
3.2 Applications:..................................................................................................................................12
3.3 Working...........................................................................................................................................13
3.4 Where RASPBERRY PI 3 is Used?...............................................................................................14
Table 1.......................................................................................................................................................16
3.5 Robotic Vehicle...............................................................................................................................16
vii
3.6 Pi Camera 5.0 megapixel................................................................................................................17
3.6.1 Webcam characteristics include:...............................................................................................17
3.7 Servo motors...................................................................................................................................18
3.8 L298N Motor Driver.......................................................................................................................19
3.9 Lm2596 Dc-Dc Buck Converter.....................................................................................................20
3.10 Lithium Battery............................................................................................................................21
3.11 Dc Motors......................................................................................................................................22
3.12 Ultrasonic Sensors........................................................................................................................23
3.13 Arduino.........................................................................................................................................24
4. Methodology.....................................................................................................................................25
4.1 Mechanical Parts...............................................................................................................................26
5. Software Description.......................................................................................................................27
5.1 Raspbian OS...................................................................................................................................27
5.2 GNU nano........................................................................................................................................28
5.3 PuTTY.............................................................................................................................................28
5.4 Notepad++..........................................................................................................................................30
6. Programming...................................................................................................................................31
6.1 Python..............................................................................................................................................31
6.2 Libraries Used..................................................................................................................................32
6.2.1 FLASK.......................................................................................................................................32
6.2.2 OpenCV....................................................................................................................................33
6.3 Android Studio.................................................................................................................................33
6.4 Arduino programming language:..................................................................................................34
6.4.1 FUNCTIONS............................................................................................................................34
6.4.2 VARIABLES............................................................................................................................36
STRUCTURE....................................................................................................................................38
7. Analysis and discussion...................................................................................................................40
8. Results and Conclusion...................................................................................................................41
References................................................................................................................................................42
viii
List of Figures:
figure 1 CROWS............................................................................................................................6
Figure 2...........................................................................................................................................7
Figure 3 Robotic Vehicle.............................................................................................................17
Figure 4 PI Camera.....................................................................................................................18
Figure 5 Servo Motor..................................................................................................................19
Figure 6 Motor Driver L298.......................................................................................................20
Figure 7 Buck Converter............................................................................................................21
Figure 8 Dc Motor.......................................................................................................................22
Figure 9 Ultrasonic Sensor..........................................................................................................23
Figure 10 Raspbian.....................................................................................................................27
Figure 11 GNU Nano..................................................................................................................28
Figure 12 Putty Interface..........................................................................................................29
Figure 13 Notepad++..................................................................................................................30
Figure 14 Python.......................................................................................................................31
Figure 15 Flask Web Development.........................................................................................32
Figure 16 OpenCV.....................................................................................................................33
Figure 17 Android Studio.........................................................................................................34
ix
List of Tables:
Specification ................................................................................................................................16
x
FYP Evaluation Form
Date: _____________________________
Comments: ___________________________________________________________________
xi
1. Introduction
Surveillance is major thing when we are going to secure anything as it is tedious job peoples are
getting boarded because of that it will might risky to observing all this thing we are going to
make a robot which is continuously monitor things. This robotic system continuously watches
and sending a live streaming of it to an authorized person. Because of that monitoring the work
will be somewhat easy and it will be making accurate because of technology. The
implementation of this project to resolve the problem of replacing human to surveillance robot,
because of this we reduce harm of human resource. Robots are usually miniature in size so they
are enough capable to enter in tunnels, mines and small holes in building and also have
capability to survive in harsh and difficult climatic conditions for life long time without causing
any harm. Military robots were designed from last few decades. Nowadays, most of the system
uses a mobile robot with a camera for surveillance. The camera mounted on the robot can move
to different locations. These types of robots are more flexible than the fixed cameras. In it is
given that mostly used surveillance robots are wheel robot. The wheel-based robots are more
suitable for flat platform. With the development in wireless communication and internet, the
videos captured by wheel robot can be seen remotely on computer or laptop. According to the
survey, majority of the people of security force are using IP based installation rather than the
analog This is because IP based system provides better picture quality, and it also beneficial in
term of mobility, scalability and flexibility. Due to the costing people are less interested to take
the advantages of IP based system. So, it is very much clear that IP based system overcome some
of the limitation over the analog but still the camera, complex operation and expensive sensors
are still a drawback of these system. This page contains the information for controlling the
robotic system through internet web browser or android apps. This is only possible when the
raspberry pi connects with internet connection Other sensor like Ultrasonic sensor are used to
enhance the performance of the smart spy system. The circuit diagram shows the component are
interfaced to the raspberry pi and L298D driver is use to interface DC motor. Motor, Ultrasonic
sensor and camera are the main interfacing device for security point of view because camera can
able to send continuous picture or video information.
12
1.1 Motivation
In military there are more dangerous tasks to do so there are asked the solider to perform but they
cannot do work efficiently. For example, walking through minefields, or clearing out hostile
areas and spying, are some of the most dangerous tasks a soldier is asked to perform in the line
of duty. These tasks can be solved by an autonomous robot. Some areas difficult for surveillance.
So, we are using a camera for surveillance. So that robot senses data from environment with the
help of sensors. We are using two modes in this robot autonomous and manual; all commands
are controlled by PC. So that robot travel by wirelessly. For remote operation IoT will be used.
At receiver section the transmitted data are received by PC via IoT. A rotating camera is
mounted on the robotic body to keep eye continuously on enemy even in complete dark area; if
any problem persists then we can attack the opponent soldiers. So, we are using a robot to detect
the own solider and opponent solider and also to detect mines, toxic gas, hurdles and self-
destruction and GPS tracking are also included.
1.2 Background
Security is one the leading issue Pakistan is facing today in the border areas. Every security
system in the world has security lacks. In the recent years so many times enemy attacked on the
ground borders as well as in the air or their soldiers tried to cross it, and taking action against
them and trying to protect the border, Pakistani army has got great losses. We analyzed these
attacks and security forces casualties in these attacks, we came to the conclusion that while
taking action against these enemies, the security forces had no information about the exact
number of enemies, the weapons they are equipped, and their exact locations. Our system
consists of radars and live video transmission will solve this problem. When deployed in the
border area, our robot will provide useful information about enemies on the ground and in air
about their exact position, their numbers and the weapons they are equipped with. Having this
information in hand the security forces can conduct a very effective operation against them or
they can just command the system to take action. Our robotic system is also a defensive system,
couple of guns are installed on it, so, it can defend the border and spy on it. Our robotic system
can be controlled using secure internet from anywhere in the country.
13
1.3 Purpose of the Project
The main purpose of this project is to spy on border, border surveillance and to defend the
border. It can also be used in terrorists occupied areas to get details about them before operation
or terrorists can be shoot down using this robot. Spy robot project has been designed for the
spying purpose. There are many spy or surveillance camera widely used for home or
organization security system. Some of the design able to control via computer. They transmit
data. With this device the soldiers will be able to control and see the wireless visual system via
computer from other location.
In military, the wireless camera has been used as their first line force to survey the enemy
location from their base. By using this robot, they can save their soldier live because before they
move to enemy location, they already know the enemy situation and percentage to they win in
the war will be increase. The main objective behind making this robot is to provide little or small
help to our army specially on the border area. It can be used for SPYING PURPOSES to get the
confidential details of anybody from remote area without making our life in danger. The camera
which would be installed can provide the live streaming of the places where a soldier cannot
reach (especially during natural calamities). To accomplish this task, we have installed a robot
with a camera which can help the purpose of spying. Along with the camera we have installed a
defense system an automatic gun. So, it is a soldier itself, it can spy and defend the border or any
area in which it is deployed.
1.4 Benefits
The War field robots do not get tired, it does not need to sleep, it does not know fear, it is IoT
operated and equipped with auto fire guns, and it is used for the surveillance, the enemy
detection as well as for autonomous defending. This military robot includes the camera to see the
vision, it can do the risky jobs, and it has specified shape like military tanks according to the
purposes of the robot. The job of this robot is the assistant of the soldier while in difficult
situations on the border, it can help to make the human life easier, it helps to save them from
risks in the dangerous areas. This robot can perform duties similar to human duties without the
actual danger to human lives, it can endure the damage done by the bombs or other types of
14
weaponry that would destroy the human body. The robot has very small size, that can fit into the
spaces which are fit easily accessible for the humans as tight and the dark spaces that are
common and this robot are a perfect fit for doing that task. This robot can replace the soldiers in
the dangerous missions such as crawling through the caves or in the streets during the wars, they
can reduce the casualties. This robot can reduce the soldier’s casualties, they can make faster
decisions than the human it cannot feel anger, the revenge, the hunger, the fear, the fatigue, or
the stress. This robot can use video or other sensors to monitor the human soldiers on both sides
of a battle for violations of the laws of war, they have been used for the reconnaissance and the
direct warfare.
Objectives
Today for Security Systems problems and Area monitoring on the ground borders and airways,
Armed forces and Air forces are used. In Pakistan there is no such well and accurate type
technology that measure, analyze and detect the environment. Human operators or forces are
used but these are not so accurate enough if we talk about dangerous, dirty and difficult places
where a human being cannot handle that task so hurriedly. Autonomous Robotic system is so
beautiful and flexible in security systems problems to survive themselves, live video
transmission and to map the Unknown environment.
15
2. Problem Statement
Making of autonomous robotic system that can select and eliminate a target as well as provide
live surveillance, and the entire system can be operated remotely from anywhere.
Conducting the literature review is done prior to undertaking the project. This will critically
provide as much information as needed on the technology available and methodologies used by
other research counterparts around the world on the topic. This chapter provides the summary of
literature reviews on topics related to autonomous robot or robot that has capability to survey the
environment via wireless vision system including robot with obstacle sensor and metal detector.
With the development of technologies especially in robotic technology, robots are predominant
in many of the applications. Some of those are of highly risky type and hazardous areas. Military
and battle field applications are now growing their usage of robots in some crucial and
complicated tasks. In articles described about the use of autonomous robots in military
operations. Now what if there is a need for the defense of the robotic vehicle or an attack by the
robot? That is where the need for a robot embedded with an attack mechanism comes. One such
example is the robotic vehicle with gun and an autonomous radar which can command anti-air
missiles to counter air missiles.
The Israeli military deploys weapons with a considerable degree of autonomy. One of the most
relevant examples is the Harpy loitering munitions, also known as a kamikaze drone: an
unmanned aerial vehicle that can fly around for a significant length of time to engage ground
targets with an explosive warhead.
16
2.1.2 CROWS
The Common Remotely Operated Weapon Station (CROWS) is a series of remote weapon
stations used by the US military on its armored vehicles and ships. It allows weapon operators to
engage targets without leaving the protection of their vehicle. The US military has fielded both
the M101 CROWS and M153 CROWS II systems. The CROWS system provides an operator
with the ability to acquire and engage targets while inside a vehicle, protected by its armor. It is
designed to mount on a variety of vehicle platforms and supports the Mk 19 grenade launcher,
12.7 mm M2 .50 Caliber Machine Gun, 7.62 mm M240B Machine Gun, and 5.56 mm M249
Squad Automatic Weapon. The system is composed of two parts: the mount which is fixed to the
exterior of the vehicle and the control group. The mount is capable of 360-degree rotation and
−20 to +60 degree elevation and is gyro-stabilized.[1] The sight package includes a daylight video
camera, a thermal camera and an eye-safe laser rangefinder. It is also furnished with a fully
integrated fire control system that provides ballistic correction.[2] The weight of the weapon
station varies accordingly due to different armament modules:
figure 1 CROWS
17
2.2 Mobile Operated Robot
Conventionally, Wireless-controlled robots use rf circuits, which have the drawbacks of limited
working range, limited frequency range and the limited control. Use of a mobile phone for
robotic control can overcome these limitations.
It provides the advantage of robust control, working range as large as the coverage area of the
service provider, although the appearance and the capabilities of robots vary vastly, all robots
share the feature of a mechanical, movable structure under some form of control. The Control of
robot involves three distinct phases: perception, processing and action. Generally, the preceptors
are sensors mounted on the robot, processing is done by the on-board micro-controller or
processor, and the task is performed using motors or with some other actuators. The robot, is
controlled by a mobile phone that makes call to the mobile phone attached to the robot in the
course of the call, if any button is pressed control corresponding to the button pressed is heard at
the other end of the call. This tone is called dual tone multi frequency tome (DTMF) robot
receives this DTMF tone with the help of phone stacked in the robot. The received tone is
processed by the atmega16 micro-controller with the help of DTM. DTMF assigns a specific
frequency (consisting of two separate tones) to each key s that it can easily be identified by the
electronic circuit. The signal generated by the DTMF encoder is the direct algebraic submission,
in real time of the amplitudes of two sine (cosine) waves of different frequencies, i.e., pressing 5
will send a tone made by adding 1336hz and 770hz to the other end of the mobile. (Dahlstrom,
2017)
Figure 2
18
2.3 Radio Frequency based Remote operated SPY Robot
It is a remote operated spy robot circuit which can be controlled by using a wireless remote
controller. It can capture audio and video information’s from the surroundings and can be sent to
a remote station through RF signals. The maximum range is 125 meters. It overcomes the limited
range of infrared remote controllers. The circuit uses HT 12E, HT 12D encoder and decoder.
433MHz ASK transmitter and receiver are used for the remote control. H-bridge circuits are used
for driving motors. Two 12V DC/100RPM gear motors are used as drivers. When we are
pressing any key in remote controller the HT 12E generate 8-bit address and 4-bit data. The DIP
switches are used for setting the address. Then the ASK transmitter sends the 8-bit address and
4-bit data to the receiver Then the ASK receiver receives the 8-bit address and 4-bit data and HT
12D decoder decodes the data, thus enabling the appropriate output. Thus, the output signals that
are generated controls the H-bridge which then rotates the motors. In this paper we are using a
wireless CCD camera. It works on 12VDC supply. The 12 Volt DC supply is taken from the
battery placed on the robot. The camera has a receiver, which is placed in the remote station. Its
output signals are in the form of audio and video. These signals are directly connected to a TV
receiver or a computer through a tuner card. (Rao, 2014)
With the aim of the satisfying and meeting the changing needs of human from manufacturing
unit to the household unit robotics and automation has been a distinct key player throughout.
This project focuses on building a RF based spying robot attached with wireless camera that can
reduce the human victim. This robot sends the signal to the base station using wireless camera.
One of the major applications of this project can be analyzed using android based smart phone
which can be used to control the movement of the robot. The robot sends the signal to the RF
receiver mounted on the robot via RF transmitter at the base station. With this feature the robot
can transmit real time videos with night vision capabilities and cannot be identified by the
enemies in war zone. (Jha, 2015)
19
2.5 RF Based Spy Robot
The intention of this paper is to reduce human victims in terrorist attack such as 26/11. So, this
problem can be overcome by designing the RF based spy robot which involves wireless camera.
so that from this we can examine rivals when it required. This robot can quietly enter into enemy
area and sends us the information via wireless camera. On the other hand, one more feature is
added in this robot that is color sensor. Color sensor senses the color of surface and according to
that robot will change its color. Because of this feature this robot can’t easily detected by
enemies. The movement of this robot is wirelessly controlled by a hand held RF transmitter to
send commands to the RF receiver mounted on the moving robot. Since human life is always
Valuable, these robots are the substitution of soldiers in war areas. This spy robot can also be
used in star hotels, shopping malls, jewelry show rooms, etc. where there can be threat from
intruders or terrorists. (Jain, 2014)
2.6 Intelligence Spy Robot with Wireless Night Vision Camera Using Android
Application
The main objective for developing the robot is for the surveillance of human activities in the war
field or rescue operations in order to reduce attacks from the enemy side. The robot consists of
night vision wireless camera which can transmit videos of the war field in order to prevent any
damage and loss to human life. Military men have a huge risk on their lives while entering an
unknown territory. The robot will serve as an appropriate machine for the Defense sector to
reduce the loss of human life and will also prevent illegal activities. It will help all the military
people and armed forces to know the condition of the territory before entering it. This can also be
used in various rescue operations to save the man power and to monitor hazardous situations.
The main advantage of this project is that we can easily control the robot using an android
mobile by a blue control screen app. (Louis, 2017)
20
2.7 Design of an Intelligent Combat Robot for war fields
The objective of this paper is to minimize human casualties in terrorist attack such as 26/11. The
combat robot has been designed to tackle such a cruel terror attack. This robot is radio operated,
self- powered, and has all the controls like a normal car. A wireless camera has been installed on
it, so that it can monitor enemy remotely when required. It can silently enter into enemy area and
send us all the information through its’ tiny Camera eyes. This spy robot can be used in star
hotels, shopping malls, jewelry show rooms, etc. where there can be threat from intruders or
terrorists. Since human life is always precious, these robots are the replacement of fighters
against terrorist in war areas. (Bhargavi, 2011)
21
cases, we may use the proposed robotic system whose working based on advanced micro
controller (Raspberry pi), which will go into those areas and provide us with the videos of those
locations. When someone enters such highly secured places, the camera mounted on the robot
will keep on capturing the videos from the surroundings to keep a record of the details of the
incident happened and this is readily available to the user and only the authenticated users can
see the recorded details. (Meenakshi, 2015)
22
3. Components
In this chapter we will discussed about all the component that is used in the project.
3.2 Applications:
Hobby projects
Low cost PC/tablet/laptop
IoT applications
Media center
Robotics
Industrial/Home automation
Server/cloud server
Print server
Security monitoring
Web camera
Gaming
Wireless access point
Environmental sensing/monitoring (e.g. WEATHER STATION)
23
3.3 Working
Take the 16GB micro SD card and dedicate it specifically for PI OS. Choose and
Download OS software. [https://www.raspberrypi.org/downloads/] (‘NOOBS’
recommended for beginners)
Format the SD card and install OS on to the SD memory card using convenient methods.
Take the SD card after OS installation and insert it in PI board
Connect monitor, keyboard and mouse
Power the board with micro USB connector
Once the power is tuned ON the PI will run on the OS installed in the memory card and
will start from boot
Once all drivers are checked the PI will ask for authorization, this is set by default and
can be changed
After authorization you will reach desktop where all application program development
starts
On the PI you can download application programs required for your use and can directly install
as you do for your PC. After that you can work on developing required program and get the PI
run the developed programs. (Raspberry, 2017)
24
Where the system processing is huge. Most ARDUINO boards all have clock speed of
less than 100MHz, so they can perform functions limited to their capabilities. They
cannot process high end programs for applications like Weather Station, Cloud server,
gaming console etc. With 1.2GHz clock speed and 1 GB RAM RASPBERRY PI can
perform all those advanced functions.
RASPBERRY PI also has dedicated camera port so one can connect camera without any
hassle to the PI board
RASPBERRY PI also has PWM outputs for application use
25
Components Specifications
Raspberry pi3 B+
CPU ARM Cortex-A53 ARM Cortex-A53
Table 3 1
Weight 3g
Still
5 Megapixels 12.3 Megapixels
resolution
It can freely move in any direction. It is made of high-quality plastic. It can be use in different
type of robotic projects and it can be used to design smart toys.
Specifications:
Motor:
Voltage: 6V-12V
Weight:
Track Width:
Size:
27
Figure 3 Robotic Vehicle
Pi camera is a type of web camera. A webcam is an input device that captures digital images.
These are transferred to the computer, which moves them to a server. From there, they can be
transmitted to the hosting page. Laptops, desktops and mobile phones are often equipped with a
webcam.
The features of a webcam are largely dependent on the software operating system of the
computer as well as the computer processor being used. Webcams can have additional features
such as motion sensing, image archiving, automation or even custom coding. Webcams are
mostly used in videoconferencing and for security surveillance. Other uses include video
broadcasting, social video recording and computer vision. (Wu, 2006)
28
Figure 4 PI Camera
Specifications:
Plastic motor
Torque
48.1 Reducer
29
Double shift start
90 RPM
30
Figure 6 Motor Driver L298
DC-DC Buck Converter Step Down Module LM2596 Power Supply is a step-down (buck)
switching regulator, capable of driving a 2.5-A load with excellent line and load regulation.
These devices are available in fixed output voltages of 3.3 V, 5 V, 12 V, and an adjustable output
version. The LM2596 series operates at a switching frequency of 150kHz, thus allowing smaller
sized filter components than what would be required with lower frequency switching regulators.
Specifications:
31
A lithium polymer battery, or more correctly lithium-ion polymer battery (abbreviated as LiPo,
LIP, Li-poly, lithium-poly and others), is a rechargeable battery of lithium-ion technology using
a polymer electrolyte instead of a liquid electrolyte. High conductivity semisolid (gel) polymers
form this electrolyte. These batteries provide higher specific energy than other lithium battery
types and are used in applications where weight is a critical feature. This lipo battery is a highly
efficient and lightweight pouch cell. Lipo batteries are increasing in popularity due to consumer
demand for thinner mobile computing devices. This is good news, as they are quickly
approaching cost-per-kilowatt-hour parity with the most efficient cylindrical 18650 cells. High
energy lipo batteries can simplify pack design with fewer parts, and high discharge rates can
facilitate demands of new technologies like Robots, quad copters and drones.
32
3.11 Dc Motors
A DC motor is any of a class of rotary electrical machines that converts direct current electrical
energy into mechanical energy. The most common types rely on the forces produced by
magnetic fields. Nearly all types of DC motors have some internal mechanism, either
electromechanical or electronic, to periodically change the direction of current flow in part of the
motor.
DC motors were the first form of motor widely used, as they could be powered from existing
direct-current lighting power distribution systems. A DC motor's speed can be controlled over a
wide range, using either a variable supply voltage or by changing the strength of current in its
field windings. Small DC motors are used in tools, toys, and appliances. The universal motor can
operate on direct current but is a lightweight brushed motor used for portable power tools and
appliances. Larger DC motors are currently used in propulsion of electric vehicles, elevator and
hoists, and in drives for steel rolling mills. The advent of power electronics has made
replacement of DC motors with AC motors possible in many applications.
These motors run on DC. Here, in our case, the motors used are brushed DC electric motor. A
brushed DC motor is an internally commutated electric motor designed to be run from a DC
power source.
Specifications:
Size = D24mm*L27mm
Voltage = 3-36V
Speed = 4000-20000 RPM
Power = 0.3-20 W
Figure 8 Dc Motor
33
3.12 Ultrasonic Sensors
The HC-SR04 ultrasonic sensor uses SONAR to determine the distance of an object just like the
bats do. It offers excellent non-contact range detection with high accuracy and stable readings in
an easy-to-use package from 2 cm to 400 cm or 1” to 13 feet.
The operation is not affected by sunlight or black material, although acoustically, soft materials
like cloth can be difficult to detect. It comes complete with ultrasonic transmitter and receiver
module.
Specifications
Resolution − 0.3 cm
34
3.13 Arduino
The Arduino Uno is one kind of microcontroller board based on ATmega328, and Uno is an
Italian term which means one. Arduino Uno is named for marking the upcoming release of
microcontroller board namely Arduino Uno Board 1.0. This board includes digital I/O pins-14,
a power jack, analog i/ps-6, ceramic resonator-A16 MHz, a USB connection, an RST button, and
an ICSP header. All these can support the microcontroller for further operation by connecting
this board to the computer. The power supply of this board can be done with the help of an AC to
DC adapter, a USB cable, otherwise a battery.
SPECIFICATIONS:
35
4. Methodology
The entire proposed system consists of a Raspberry pi, Arduino, servo motor, Ultrasonic sensors,
Buck converter,12v DC battery, Pi camera 5.0 mega pixel, Toy gun, L298N motor drivers, and
robotic vehicle.
The Raspberry pi Camera is 5MP static sensitive type camera. The pi camera module is
connected to CSI port of Raspberry pi. Python script is used to control the pi camera and capture
the videos. Arduino is connected with ultrasonic sensors, the code for Arduino and for its
interface is written in C language. The combination of Arduino and sensors will act as radar. The
motors assembly includes the DC motors plus servo motors. The L298D is typically used to
control the motor speed and direction. This driver module is supplying a high current and high
voltage to connected DC motors. It can drive up to two DC motors 1A each. The Raspberry pi 3
comes with inbuilt Wi-Fi and Bluetooth controller features. An inbuilt Wi-Fi controller is used
for connecting Raspberry Pi to Wi-Fi router and the router is connected to the wireless area
network (WAN) for providing internet connectivity to the Raspberry pi. Once the IP assigned to
Raspberry pi and it establishes the internet connection with WAN through a router the major
intention of this system is live video streaming plus storing the actions, for that we are using a
static IP. The Robotic cars developed by using DC geared motors, which is controlled through
the GPIO pins of the Raspberry Pi. The Python programming language is used to operate the
robot. Furthermore, the Android App is used to monitor the status of the sensors and the action
of spy robot is controller though IOT.
The entire system is based on a Raspbian operating system like Linux platform. The
programming language which is utilized for coding is Python, HTM, Android provides the basic
structure of sites. The Internet of Things (IOT) can be considered as a global network. The
commands can be sent through the android app with the help of internet. The robot is controlled
from remote place which isolates the human being from dangerous environments. The Raspberry
pi is connected the L298 motor driver which will control the direction of motors based on
command received from user. Once system gets turned on, user can see moving living objects
and their accurate positions with the help of radar on android interface. Different photos of our
country flag and enemie’s country flag are stored in database, after taking photos through Picam,
36
system will compare that with stored data sets and identify the enemies then they attack on that
object or person with gun that can rotate around 180 degree with servo motor and also rotate the
gun with servo motor and they rotation of camera and gun is same. It shoots the person or any
object automatically. The android interface can be used to monitor and control the installed guns
plus robotic vehicles by displaying all sensor status.
To build the intelligent autonomous system, several specifications need to apply, for the robot,
radar and on installed guns. The intelligent vehicle robot must have the wheel for the robot to
move and twin motor needed to move the wheel, we have used rubber tires for this purpose to
make the robot run in any type of land. An automatic gun is installed on the robot as a defense
system.
Secondly mechanical part is radar. By combining receiver and sender ultrasonic sensors with
Arduino, we used it as radar to detect objects and their accurate positions.
Third mechanical part is installed rotating guns on the ground. They can freely move at 360
degree with the help of servo motors.
The last mechanical part is the wireless visual system or wireless camera. The wireless camera
needs to be placed at the top of the robot and there are need mechanism for the camera to has
capability to turn up and down for the robot able to survey the surrounding environment.
37
5. Software Description
5.1 Raspbian OS
Raspbian is a Debian-based computer operating system for Raspberry Pi. There are several
versions of Raspbian including Raspbian Buster and Raspbian Stretch. 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. (Smith, 2007)
Raspbian uses PIXEL, Pi Improved X-Window 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. The
distribution is shipped with a copy of computer algebra program Mathematica and a version of
Minecraft called Minecraft Pi as well as a lightweight version of Chromium as of the latest
version. (Harrington, 2015)
Figure 10 Raspbian
38
5.2 GNU nano
GNU nano is a text editor for Unix-like computing systems or operating environments using a
command line interface. It emulates the Pico text editor, part of the Pine email client, and also
provides additional functionality. Unlike Pico, nano is licensed under the GNU General Public
License (GPL). Released as free software by Chris Allegretto in 1999, nano became part of the
GNU Project in 2001. (Limna, 2007)
5.3 PuTTY
PuTTY (/ˈpʌti/) is a free and open-source terminal emulator, serial console and network file
transfer application. It supports several network protocols, including SCP, SSH, Telnet, rlogin,
and raw socket connection. It can also connect to a serial port. The name "PuTTY" has no
official meaning.
PuTTY was originally written for Microsoft Windows, but it has been ported to various other
operating systems. Official ports are available for some Unix-like platforms, with work-in-
progress ports to Classic Mac OS and macOS, and unofficial ports have been contributed to
39
platforms such as Symbian, Windows Mobile and Windows Phone. PuTTY was written and is
maintained primarily by Simon Tatham. PuTTY supports many variations on the secure remote
terminal, and provides user control over the SSH \cite{lucas2012ssh} encryption key and
protocol version, alternate ciphers such as AES, 3DES, Arcfour, Blowfish, DES, and Public-key
authentication. PuTTY supports SSO through GSSAPI, including user provided GSSAPI DLLs.
It also can emulate control sequences from xterm, VT220, VT102 or ECMA-48 terminal
emulation, and allows local, remote, or dynamic port forwarding with SSH (including X11
forwarding). The network communication layer supports IPv6, and the SSH protocol supports
the [email protected] delayed compression scheme. It can also be used with local serial port
connections.
PuTTY comes bundled with command-line SCP and SFTP clients, called "pscp" and "psftp"
respectively, and plink, a command-line connection tool, used for non-interactive sessions.
PuTTY does not support session tabs directly, but many wrappers are available that do. (Tatham,
2006)
40
5.4 Notepad++
Notepad++ is a text editor and source code editor for use with Microsoft Windows. It supports
tabbed editing, which allows working with multiple open files in a single window. The project's
name comes from the C increment operator. Notepad++ is distributed as free software. At first
the project was hosted on Source Forge.net, from where it has been downloaded over 28 million
times, and twice won the Source Forge Community Choice Award for Best Developer Tool.[4]
The project was hosted on TuxFamily from 2010 to 2015; since 2015 Notepad++ has been
hosted on GitHub. Notepad++ uses the Scintilla editor component. Notepad++ is a source code
editor. It features syntax highlighting, code folding and limited auto completion for
programming, scripting, and markup languages, but not intelligent code completion or syntax
checking. As such it may properly highlight code written in a supported schema but whether the
syntax is internally sound or compliable cannot be verified. As of version 7.6.3, Notepad++ can
highlight the syntactic elements. (Kraft, 2007)
Figure 13 Notepad++
41
6. Programming
6.1 Python
Python is an interpreted, high-level, general-purpose programming language. Created by Guido
van Rossum and first released in 1991, Python's design philosophy emphasizes code readability
with its notable use of significant whitespace. Its language constructs and object-oriented
approach aim to help programmers write clear, logical code for small and large-scale projects.
Python was conceived in the late 1980s as a successor to the ABC language. Python 2.0, released
2000, introduced features like list comprehensions and a garbage collection system capable of
collecting reference cycles. Python 3.0, released 2008, was a major revision of the language that
is not completely backward-compatible, and much Python 2 code does not run unmodified on
Python 3. Due to concern about the amount of code written for Python 2, support for Python 2.7
(the last release in the 2.x series) was extended to 2020. Language developer Guido van Rossum
shouldered sole responsibility for the project until July 2018 but now shares his leadership as a
member of a five-person steering council.
Python interpreters are available for many operating systems. A global community of
programmers develops and maintains CPython, an open source reference implementation. A
non-profit organization, the Python Software Foundation, manages and directs resources for
Python and CPython development. (Pilgrim, 2009)
Figure 14 Python
42
6.2 Libraries Used
6.2.1 FLASK
Flask is a micro web framework written in Python. It is classified as a micro framework because
it does not require particular tools or libraries. It has no database abstraction layer, form
validation, or any other components where pre-existing third-party libraries provide common
functions. However, Flask supports extensions that can add application features as if they were
implemented in Flask itself. Extensions exist for object-relational mappers, form validation,
upload handling, various open authentication technologies and several common framework
related tools. Extensions are updated far more regularly than the core Flask program.
Applications that use the Flask framework include Pinterest, LinkedIn, and the community web
page for Flask itself. We used it to control our robot from internet using web-control interface
and to transmit live video streaming. (Grinberg, 2018)
43
6.2.2 OpenCV
OpenCV (Open source computer vision) is a library of programming functions mainly aimed at
real-time computer vision. Originally developed by Intel, it was later supported by Willow
Garage then It seez (which was later acquired by Intel). The library is cross-platform and free for
use under the open-source BSD license.
OpenCV supports the deep learning frameworks TensorFlow, Torch/PyTorch and Caffe.
(Howse, 2013)
Figure 16 OpenCV
The Android Emulator installs and starts our apps faster than a real device and allows us to
prototype and tests our app on various Android device configurations: phones, tablets, Android
Wear, and Android TV devices. We can also simulate a variety of hardware features such as GPS
44
location, network latency, motion sensors, and multi-touch
input.
Arduino programming language can be divided in three main parts: functions, values
(variables and constants), and structure.
6.4.1 FUNCTIONS
Digital I/O
digitalRead()
digitalWrite()
pinMode()
Analog I/O
analogRead()
analogReference()
analogWrite()
45
Zero, Due & MKR Family
analogReadResolution()
analogWriteResolution()
Advanced I/O
noTone()
pulseIn()
pulseInLong()
shiftIn()
shiftOut()
tone()
Time
delay()
delayMicroseconds()
micros()
millis()
Math
abs()
constrain()
map()
max()
min()
pow()
sq()
sqrt()
Trigonometry
cos()
sin()
tan()
Characters
isAlpha()
isAlphaNumeric()
isAscii()
isControl()
isDigit()
isGraph()
isHexadecimalDigit()
isLowerCase()
46
isPrintable()
isPunct()
isSpace()
isUpperCase()
isWhitespace()
Random Numbers
random()
randomSeed()
External Interrupts
attachInterrupt()
detachInterrupt()
Interrupts
interrupts()
noInterrupts()
Communication
Serial
Stream
USB
Keyboard
Mouse
6.4.2 VARIABLES
47
Constants
HIGH | LOW
INPUT | OUTPUT | INPUT_PULLUP
LED_BUILTIN
true | false
Floating Point Constants
Integer Constants
Conversion
(unsigned int)
(unsigned long)
byte()
char()
float()
int()
long()
word()
Data Types
array
bool
boolean
byte
char
double
float
int
long
short
size_t
string
String()
unsigned char
unsigned int
unsigned long
void
word
48
static
volatile
Utilities
PROGMEM
sizeof()
STRUCTURE
The elements of Arduino (C++) code.
Sketch
loop()
setup()
Control Structure
break
continue
do...while
else
for
goto
if
return
switch...case
while
Further Syntax
#define (define)
#include (include)
/* */ (block comment)
// (single line comment)
; (semicolon)
{} (curly braces)
Arithmetic Operators
% (remainder)
* (multiplication)
+ (addition)
- (subtraction)
/ (division)
= (assignment operator)
49
Comparison Operators
!= (not equal to)
< (less than)
<= (less than or equal to)
== (equal to)
> (greater than)
>= (greater than or equal to)
Boolean Operators
! (logical not)
&& (logical and)
|| (logical or)
Bitwise Operators
& (bitwise and)
<< (bitshift left)
>> (bitshift right)
^ (bitwise xor)
| (bitwise or)
~ (bitwise not)
Compound Operators
%= (compound remainder)
&= (compound bitwise and)
*= (compound multiplication)
++ (increment)
+= (compound addition)
-- (decrement)
-= (compound subtraction)
/= (compound division)
^= (compound bitwise xor)
|= (compound bitwise or)
50
7. Analysis and discussion
Although the main challenge was time which was brought about by unavailability of
components, the project objectives were accomplished. A system that could be used to realize a
digital locking mechanism was designed and constructed using the Raspberry pi. An android
interface is developed, robot can be controlled using it or it can work on auto mode. In addition
to the project objectives A robotic surveillance and defensive system is useful in any kind area.
In conclusion the use of the Raspberry pi reduced the size and cost of implementing the circuit,
making the SPY Robot a low cost control system which could be used in the borders; It can
defend and spy on border which significantly reduce the loss of lives of soldiers.
51
8. Results and Conclusion
When a client is connected to the system, an android-based command interface and auto
interface is shown on the screen of client. Robotic cars and installed guns can be accessed and
controlled using this control interface from any place in the country. Live video streaming will
help to spy and for border surveillance.
52
References
Bhargavi, S. a. (2011). Design of an Intelligent Combat Robot for war fields. Department of Electronics
and Communication Engineering, SJCIT, Chikballapur, Karnataka, India, 12-14.
Bibeault, B. a. (2008). jQuery in Action. Dreamtech Press.
Dahlstrom, R. L. (2017). Mobile computing device-based guidance navigation and control for unmanned
aerial vehicles and robotic systems. US Patent 9,611,038: Google Patents.
Grinberg, M. (2018). Flask web development: developing web applications with python. O'Reilly Media,
Inc.
Harrington, W. (2015). Learning Raspbian. Chicago: Packt Publishing Ltd.
Howse, J. (2013). OpenCV computer vision with python. Packt Publishing Ltd.
Jain, P. a. (2014). RF based Spy robot. Kalyanee N. Kapadnis et al Int. Journal of Engineering Research
and Applications, 6-9.
Jha, A. a. (2015). War Field Spying Robot With Night Vision Camera. Journal of Network
Communications and Emerging Technologies (JNCET) www. jncet. org, 50-62.
Khaing, W. M. (2014). Design and Implementation of Remote Operated Spy Robot Control System.
International Journal of Science, Engineering and Technology Research (IJSETR), 1952-1959.
Kraft, C. (2007). Communication terminal having a predictive text editor application. US Patent, 224-
245.
Labriola, I. D. (1999). Digital motor driver circuit and method. Google Patents, 77-79.
Limna, T. a.-t. (2007). Linux user interface and front-end operation for the visually impaired. 179: ACM.
Louis, K. A. (2017). Intelligence spy robot with wireless night vision camera using android application.
International Journal for Modern Trends in Science and Technology, 01-05.
Meenakshi, V. a. (2015). Secured Spy IP Control Robot Using Raspberry Pi. International Journal of
Emerging Technology and Advanced Engineering Website: www. ijetae. com (ISSN 2250-2459),
91-100.
Ohishi, K. a. (1987). Microprocessor-controlled DC motor for load-insensitive position servo system.
IEEE transactions on industrial electronics, 44-49.
Pilgrim, M. a. (2009). Dive Into Python 3. New York: Springer.
Rao, T. K. (2014). Radio Frequency based Remote operated SPY Robot. International Journal of Ethics
in Engineering \& Management Education, 1-4.
Raspberry. (2017). Raspberry pi 3b+. Raspberry-Pi-Model-Bplus-Product-Brief, 100-110.
Smith, B. (2007). Raspberry Pi Assembly Language RASPBIAN Beginners: Hands On Guide. xyz:
CreateSpace Independent Publishing Platform.
53
Tatham, S. a. (2006). PuTTY: A free Telnet/SSH client. Available on line at: http://www. chiark.
greenend. org. uk/~ sgtatham/putty, 112-119.
54