i UNMANNED AERIAL VEHICLE FOR CAMPUS SURVEILLANCE A PROJECT REPORT Submitted in partial fulfillment of the requirement for the award of the Degree of BACHELOR OF TECHNOLOGY in ELECTRONICS AND COMMUNICATION ENGINEERING By Vedant Kumar (11BEC1033) Kamlesh Kumar Verma (11BEC1017) Amol Sehgal (11BCE1091) Under the Guidance of Prof.V.Umamaheswari Prof. Nisha V M SCHOOL OF ELECTRONICS ENGINEERING VIT University CHENNAI. (TN) 600127 MAY 2015
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
i
UNMANNED AERIAL VEHICLE FOR CAMPUS
SURVEILLANCE
A PROJECT REPORT
Submitted in partial fulfillment of the
requirement for the award of the
Degree of
BACHELOR OF TECHNOLOGY
in
ELECTRONICS AND COMMUNICATION ENGINEERING
By
Vedant Kumar (11BEC1033)
Kamlesh Kumar Verma (11BEC1017)
Amol Sehgal (11BCE1091)
Under the Guidance of
Prof.V.Umamaheswari
Prof. Nisha V M
SCHOOL OF ELECTRONICS ENGINEERING
VIT University
CHENNAI. (TN) 600127
MAY 2015
i
UNMANNED AERIAL VEHICLE FOR CAMPUS
SURVEILLANCE
A PROJECT REPORT
Submitted in partial fulfillment of the
requirement for the award of the
Degree of
BACHELOR OF TECHNOLOGY
in
ELECTRONICS AND COMMUNICATION ENGINEERING
By
Vedant Kumar (11BEC1033)
Kamlesh Kumar Verma (11BEC1017)
Amol Sehgal (11BCE1091)
Under the Guidance of
Prof.V.Umamaheswari
Prof. Nisha V M
SCHOOL OF ELECTRONICS ENGINEERING
VIT University
CHENNAI. (TN) 600127
MAY 2015
i
CERTIFICATE
This is to certify that the Project work titled ―Unmanned Aerial Vehicle for Campus
Surveillance‖ that is being submitted by ―Vedant Kumar”, ―Kamlesh Kumar Verma‖ and
―Amol Sehgal” is in partial fulfillment of the requirements for the award of Bachelor of
Technology, is a record of bonafide work done under my guidance. The contents of this Project
work, in full or in parts, have neither been taken from any other source nor have been submitted
to any other Institute or University for award of any degree or diploma and the same is certified.
Guide
The thesis is satisfactory / unsatisfactory
I n t erna l Ex a mi n er E x t ern a l E x a mi n er
Approved by
Program Chair
ii
ACKNOWLEDGEMENTS
The team would like to take this opportunity to thank those who have helped make this project a
success. First, the team would like to thank their guide, Professor V.Umamaheswari, Professor.
Nisha V M who were influential in providing guidance and direction to the project. In addition,
the team would also like to thank Embedded System Lab staff for helping in components. The
team would also like to thank Professor Venkatasubramanian.K for his guidance and suggestion.
Nishant Kumar Singh is another individual who helped during the implantation and flight test
deserves gratitude. Lastly, the team would like to thank our families for their continued love and
support in our education and personal development.
Reg. No. 11BEC1033
11BEC1017
11BCE1091
iii
ABSTRACT
This project, aims at monitoring the real time environment with help of Unmanned Aerial
Vehicle (UAV), like surveillance of banks, highly crowded areas, aerial traffic and security
watch etc. This project is intended to design and fabricate low cost, light weight surveillance
UAV. A drone in structure of quad rotor that houses a camera with a wireless transmission
system was designed. This provides a live feed from camera to the ground station via telemetry.
It is also intended to carry a payload for future developments. GPS is used to predict the location
of UAV and inertial measurement unit (IMU) sensors will be used to predict proper acceleration
and detection of changes in rotational attributes roll, pitch and yaw. IMU consists of 3-axis
accelerometer, 3- axis gyroscope and 3-axis digital compass. PID control system is used to
maintain the stability of flight.
iv
TABLE OF CONTENTS
Chapter No. Description Page No.
LIST OF TABLES vii
LIST OF FIGURES viii
LIST OF ABBREVIATIONS xi
1 INTRODUCTION 1
1.1 Objective 1
1.2 Motivation 2
1.3 Background 4
1.3.1 Quadcopter Dynamics 4
2 PROJECT DESCRIPTION AND GOALS 6
3 TECHNICAL SPECIFICATIONS 7
3.1 Specification of Mechanical & Electrical module 8
3.1.1 Quad Rotor Frame 8
3.1.2 Electrical Motors 10
3.1.3 Propellers 12
3.1.4 Battery 13
3.1.5 Power Distribution System 16
3.2 Sensor Technology Module 17
3.2.1 IMU / 3 Axis Digital Compass/ Digital Pressure Sensor 17
3.2.2 On Board Camera 18
3.2.3 Telemetry 19
3.2.4 GPS (Global Positioning System) 20
3.3 Embedded System & other Electronics Module 21
3.3.1 Flight Controller Using Arduino UNO board 21
3.3.2 On-board Processor using Raspberry Pi 23
v
Chapter No. Description Page No.
3.3.3 ESC 24
3.3.4 Transceiver (RF Remote Control) 25
3.4 Software Module 26
3.4.1 Fritzing 26
3.4.2 Matlab/ Simulink 26
3.4.3 Multiwii 27
3.4.4 Arduino IDE 28
4 DESIGN APPROACH AND DETAILS 29
4.1 Design Approach 29
4.1.1 Design of quadcopter 30
4.1.2 Quadcopter Architecture 30
4.1.3 Mathematical model of quadcopter 33
4.1.4 Wireless Transmission System 35
4.1.5 PID Control theory and algorithm 36
4.2 Codes and Standards 38
4.2.1 Standard used in Interface of camera with board 38
4.2.2 Standard used in GPS Receiver 38
4.2.3 Standard Used to interface sensors to Arduino Board (I²C) 38
4.2.4 Standard Used in RF Transceiver (2.4 GHz FHSS technology) 38
4.2.5 Standard Used in wireless transmission: IEEE 802.15.4 38
4.3 Constraints, Alternatives and Tradeoffs 39
4.3.1 Constraints 39
4.3.1.1 Legal Constrains 39
4.3.1.2 Power shortage and flight duration 40
4.3.1.3 Improper weight distribution 40
4.3.2 Alternatives 41
vi
Chapter No. Description Page No.
4.3.3 Tradeoff 41
4.3.3.1 Development Cost 41
4.3.3.2 Weight 41
4.3.3.3 Power System 41
5 SCHEDULE, TASKS AND MILESTONES 42
6 PROJECT DEMONSTRATION 43
6.1 Complete module of quadcopter 43
6.2 Interfacing of MUP 6050 with Arduino 49
6.3 Interfacing of Bluetooth with Arduino 50
6.4 Interfacing of GPS with Arduino 51
6.5 Establishing communication beween 2 XBees radio modules 53
7 MARKETING AND COST ANALYSIS 58
7.1 Marketing Analysis 58
7.1.1.1 DJI 59
7.1.1.2 3D Robotics 59
7.1.1.3 FireBox 59
7.2 Cost Analysis 59
8 SUMMARY 61
REFERENCES 62
APPENDIX A 63
1. Binding of RF Transceiver 63
2. Calibration of ESC & Programming 63
3. First flight test for throttle 64
APPENDIX B 65
1. Code interfacing of MPU6050 with Arduino Board for 65
2. Code for interfacing of GPS with Arduino Board 76
vii
LIST OF TABLES
Table No. Description Page No.
3.1 Engineering Module 7
3.2 Comparison matrix of glass fiber 10
3.3 Battery Comparison 14
3.4 Battery Capacities and Flight Times 15
3.5 Component Power Needs 16
3.6 Specification of Arduino UNO board 22
3.7 Comparison matrix of different development board 23
4.1 Interface protocol and communication type 32
viii
LIST OF FIGURES
Figure No. Description Page No.
1.1 ARES 2
1.2 Global Hawk 2
1.3 Parrot AR Drone 3
1.4 Amazon‘s PrimeAir 3
1.5 SWARM MAV 3
1.6 Quadcopter rotation 5
3.1 Quadcopter Frame 9
3.2 Brushless DC Motor 11
3.3 Representation of CCW and CW rotation of motor 11
3.4 Propellers 13
3.5 2300 mah LiPo Battery 14
3.6 Flight times with various battery sizes 15
3.7 MPU 6050, HMC5883L, BMP180 17
3.8 Camera 19
3.9 XBee Pro S1 Module 20
3.10 Ardiuno board 22
3.11 Raspberry pi 24
3.12 EMAX 20A, ESC 24
3.13 Avionic 6 channel RF Transceiver 25
3.14 PID Tuner tool box 26
3.15 Multiwii GUI Platform 27
3.16 Quadcopter throttle‘s value of each motor 27
ix
Figure No. Description Page No.
4.1 Flow Diagram 29
4.2 Quadcopter Design 30
4.3 Quadcopter Architecture 31
4.4 The inertial and body frames of a quadcopter 33
4.5 PID Control Block Diagram 36
4.6 PID Control graph 37
4.7 Improper throttle 40
5.1 Schedule of the project 42
6.1 Complete setup of quadcopter 43
6.2 Integral part of the project mentioned individually 44
6.3 Electrical and mechanical components of quadcopter 45
6.4 Integral component of embedded system module 46
6.5 XBEE PRO as a base station telemetry 46
6.6 GUI from Mutiwii on Base Station 47
6.7 Top view of quadcopter 47
6.8 Side view of quadcopter 48
6.9 Quadcopter as in flight. 48
6.10 Interfacing of MPU6050 with Ardunio board 49
6.11 Data of accelerometer, gyro, temperature 50
6.12 Interfacing of Bluetooth module 51
6.13 NMEA Format 52
6.14 GPS Output 52
x
Figure No. Description Page No.
6.15 System Data Flow Diagram in a UART‐interfaced - 53
Environment
6.16 UART data packet 0x1F (decimal number ʺ31ʺ) as - 53
Transmitted through the RF
6.17 Complete setup of XBee module in X-CTU software, 55
you can see the MAC NO. and port of device.
6.18 Configuring two XBee to communicate 55
6.19 Communication in AT Mode- XBee 1 56
6.20 Communication in AT Mode- XBee2 56
6.21 Communication of XBee in API Mode 57
xi
LIST OF ABBREVIATIONS
API Application programming interface
APM ArduPilot Mega
BEC Battery Eliminator Circuit
DARPA Defense Advanced Research Projects Agency
DARO Defense Airborne Reconnaissance Office
ESC Electronic Speed Controller
FPS Frames per Second
GPS Global Positioning System
GUI Graphical User Interface
HD High Definition
I/O Input/Output
IR Infrared
Kv Revolutions per Minute / Volt
MSP MultiWii Serial Protocol
MW MultiWii
NMEA National Marine Electronics Association
PCB Printed Circuit Board
PID Proportional-Integral-Derivative
PPFS Project Proposal and Feasibility Study
PPS Picture Parameter Set
PWM Pulse Width Modulation
OS Operating System
RAM Random Access Memory
RC Radio Controlled
UAV Unmanned Aerial Vehicle
USB Universal Serial Bus
VDC Volts Direct Current
1
CHAPTER 1
INTRODUCTION
A quadcopter is an aerial vehicle that uses four rotors for lift, steering, and stabilization.
Unlike other aerial vehicles, the quadcopter can achieve vertical flight in a more stable condition.
Furthermore, due to the quadcopter‘s cyclic design, it is easier to construct and maintain. As the
technology becomes more advanced and more accessible to the public, many engineers and
researchers have started designing and implementing quadcopter for different uses. One of the
main use is surveillance. Surveillance is critical for security operations. In the past, helicopters
were used for these types of missions. Recently, Unmanned Aerial Vehicles (UAVs) are (have
grown in popularity and are an excellent resource that can be) utilized for surveillance missions.
The unmanned aerial vehicles are helpful to observe, analyze and get information and transfer it
to base station. UAVs are able to perform missions with high level of complexity and at the same
time, they require less human operator involvement due to their autonomous behavior. The
additional advantage is, they are agile in nature and can have degree of freedom up to 10.
The goal of this project is to build an UAV in in structure of x shaped quad rotor that
houses a camera with a wireless transmission system. This unmanned aerial vehicle will be used
for campus surveillance. Aerial surveillance will be done by monitoring the real time
environment with help of UAV. Surveillance of banks, highly crowded areas, aerial traffic and
security watch can be easily done with the help of this UAV.
1.1 Objective
The objective of this project is to build an UAV in structure of quad rotor which can
maintain safe and stable flight and houses a camera with a wireless transmission system to
provide surveillance of real time environment. These are the following objective
a) Design and implementation of UAV in structure of ‗X‘ shaped quadcopter.
b) Development of flight controller by proper interfacing of sensor and tuning of PID
control values.
2
c) Apart from the stable flight, a camera is interfaced with quadcopter‘s processor to record
the aerial view for surveillance.
d) A wireless transmission system developed to telemeter the video and GPS data to ground
station.
1.2 Motivation
From observation of prior art in UAV, one can say that future is full of unlimited
potential and possibilities of UAV. Now days, UAVs are everywhere. It is not only used for civil
and commercial but also in scientific research as well. Fig. 1.2 shows the UAV Global Hawk
High-Altitude Endurance Unmanned Aerial Vehicle from Defense Advanced Research Projects
Agency (DARPA) and Defense Airborne Reconnaissance Office (DARO) is used for NASA's
airborne Hurricane and Severe Storm Sentinel or HS3 mission. NASA is redoubling its efforts to
probe the inner workings of hurricanes and tropical storms with two unmanned Global Hawk
aircraft flying over storms and two new space-based missions. UAVs are also considered as a
potential unmanned candidate for future mars mission over rover and landers. A mission named
ARES (Aerial Regional Scale Survey of Mars) was under evaluated mission, developed by
Langley Research Center to build a powered aircraft that would fly on Mars as shown in Fig. 1.1.
Fig. 1.1 ARES Fig. 1.2 Global Hawk
3
Although some UAVs like General Atomics MQ-1 Predator, General Atomics MQ-9 Reaper
were also considered as Human killing machine, yet there are several UAVs used for benefit and
improvement of society. For example, S.W.A.R.M. (Search with Aerial RC Multi-Rotor) is a
worldwide volunteer search and rescue network of over 1,100 SAR Drone Pilots dedicated to
searching for missing persons. Not only in the serious situation, but for entertainment UAVs are
used. Commercial available Parrot AR Drone [14] and DJI Phantom are best quadcopters for
aerial photography and videos. A drone from DJI Global have recently used in Golden Globe
Event.
Fig 1.3 Parrot AR Drone Fig 1.4 Amazon’s PrimeAir
Several attempts were also made in logistic and transport like delivery of Amazon‘s product by
Amazon‘s PrimeAir as shown in Fig 1.4 or pizza delivery in Mumbai. On the other hand, small
drone also known as micro and nano-copter are small, lightweight, spontaneous and very agile in
nature gives them advantage in flight. According to Vijay Kumar, GRASP Lab, University of
Pennsylvania micro drones are capable of 1850◦ /sec roll and pitch, performs a 360◦ flip in 0.4
seconds and exhibits a lateral step response of 1 body length in 1 second [1].
Fig. 1.5 SWARM MAV
4
1.3 Background
Quadcopter, also known as quadrotor, is a helicopter with four rotors. The rotors are
directed upwards and they are placed in a square formation with equal distance from the center
of mass of the quadcopter. The quadcopter is controlled by adjusting the angular velocities of the
rotors which are spun by electric motors. Quadcopter is a typical design for small UAV because
of the simple structure. Quadcopter are used in surveillance, search and rescue, construction
inspections and several other applications.
Quadcopter has received considerable attention from researchers, as the complex
phenomena of the quadcopter have generated several areas of interest. The basic dynamical
model of the quadcopter is the starting point for all of the studies but more complex aerodynamic
properties has been introduced as well. Different control methods has been researched, including
PID controllers, back stepping control, nonlinear H1 control, LQR controllers, and nonlinear
controllers with nested saturations. Control methods require accurate information from the
position and attitude measurements performed with a gyroscope, an accelerometer, and other
measuring devices, such as GPS, and sonar and laser sensors. PID controllers have been chosen
for this project.
1.3.1 Quadcopter Dynamics
Each rotor produces both a thrust and torque about its centre of rotation, as well as a drag
force opposite to the vehicle's direction of flight. Quad-copter achieves lift, yaw, roll and pitch
simply via a manipulation of the thrusts of four motors relative to each other as shown in Fig.1.6.
This way, fixed rotor blades can be made to manoeuvre the quad rotor vehicle in all dimensions.
Similar to other flying objects, a quadrotor has a group of forces and torques acting on it while it
flies. There are four main forces acting on the drone: drag, lift, weight, and thrust. In order for
the drone to fly, these different forces need to be balanced. This can be seen by utilizing
Newton‘s Second Law.
5
Fig. 1.6 Quadcopter rotation
Applying Newton‘s Second Law
𝐹 = 𝑚𝑎 (1)
For constant velocity acceleration is zero (a=0). Thus the sum of the forces is equal to zero. So
for steady, constant velocity flight, completing a force balance in the horizontal direction on the
diagram obtains:
𝐹𝑡𝑟𝑢𝑠𝑡 − 𝐹𝑑𝑟𝑎𝑔 = 0 (2)
𝐹𝑡𝑟𝑢𝑠𝑡 = 𝐹𝑑𝑟𝑎𝑔 (3)
Since this is for a constant velocity, the aircraft is either moving or at rest. An analysis in the
vertical direction will produce similar results.
𝐹𝑙𝑖𝑓𝑡 − 𝐹𝑤𝑒𝑖𝑔𝑡 = 0 (4)
𝐹𝑙𝑖𝑓𝑡 = 𝐹𝑤𝑒𝑖𝑔𝑡 (5)
6
CHAPTER 2
PROJECT DESCRIPTION AND GOALS
The goal of this project is to build an UAV in structure of quad rotor that houses a camera
with a wireless transmission system. This unmanned aerial vehicle will be used for campus
surveillance.
Quad rotor must hover in place, take off and land vertically, maintain stable flight and perform
flight attributes (like roll, pitch and yaw). These attributes are essential for surveillance. To do
these above mentioned flight traits, PID control system was utilized. The tuning of the PID
control system is very crucial because three different PID control systems for pitch, roll, and yaw
had to be tuned carefully for proper stabilization. Inertial measurement unit (IMU) sensors will
be used to collect data of 3-axis accelerometer, 3- axis gyroscope which can be exploited by PID
control algorithm to maintain the auto stable flight.
Wireless transmission system provides a live feed from camera to the ground station. Wireless
transmission system will help monitoring the real time environment like surveillance of banks,
highly crowded areas, aerial traffic and Security watch etc. A GPS module will be used to
determine the current position of UAV. Telemetry will be used as a wireless transmission system
(XBee Radio Modules works on RF 2.4 GHz frequency under the zigbee protocol, IEEE
802.15.4). Data from camera and GPS will be wirelessly transferred from uav to base station via
telemetry. Flight of quad rotor will be also controlled wirelessly through RF Transceiver working
at 2.4 GHz. Finally, this project intended to design and fabricate a low cost, light weight
surveillance UAV. The project has been divided into b following broad areas to achieve the
targeted functionality:
Maintain the stable flight and perform flight attributes (like roll, pitch and yaw).
Develop a wireless transmission system provides a live feed from camera to the ground
station.
7
CHAPTER 3
TECHNICAL SPECIFICATIONS
While the overall goals, strategies and objectives have been stated, the specifications of
the components will be determined as they are identified for their applicability in the project. The
technical specifications are divided in the following in engineering module on the basis of
application and engineering involved. The modules are represented in Table 3.1.
Table 3.1 Engineering Module
Mechanical & Electrical Module
Quad rotor Frame
Landing Stand
4 x Electrical Motor
4 x Propellers
2300 mAh LiPo Battery & charger
Power Distribution System
Sensor Technology Module
IMU / 3 Axis Digital Compass/ Digital
Pressure Sensor
On board camera
GPS
Telemetry
Embedded System & other Electronics
Module
Flight Controller Using Arduino UNO
board
On-board Processor using Raspberry Pi
ESC (Electronic Speed Control)
Transceiver (RF Remote Control)
Software Module
CadSoft EAGLE, Fritzing
Matlab/Simulink (Drake Tool Box)
Arduino IDE, Linux, Opencv
Python
8
3.1 Specification of Mechanical & Electrical module
These are the following main mechanical and electrical module whose specification are
described.
a) Quad rotor Frame
b) Electrical Motor
c) Propellers
d) LiPo Battery & Charger
e) Power Distribution Board
3.1.1 Quad Rotor Frame:
Quad copter is a novel appearance, superior performance VTOL aircraft, which has a simple
structure, flexible operation, high load capacity and other characteristics, have important civilian
and military value. According to our design, we have select the necessary materials and
structures that meet the strength and stiffness the system needs. They are designed to be strong
and lightweight.
To decide the appropriate frame for the copter three main factors, i.e. weight, size and materials
have taken in consideration. The frame should be flexible enough to minimize the vibrations
from the motors. Our frame is consisting of these following fragments:
1) The center plate where the electronics are mounted.
2) Four arms mounted to the center plate.
3) Four motor brackets connecting the motors to the end of the arms.
Strong, light and sensible configuration including suspension system that allows for a clean and
easy build is highly recommended. Parts and accessories that are 100% compatible and
interchangeable are always preferred.
Frames are usually made of:
a) Carbon Fiber: Carbon fiber is the most rigid and vibration absorbent but it is the most
expensive too.
b) Aluminum: Hollow aluminum square rails are the most popular for the arms due to its
light weight, rigidness and affordability. However aluminum can suffer from motor
9
vibrations, as the damping effect is not as good as carbon fiber. In cases of severe
vibration problem, it could mess up sensor readings.
c) Wood: Wood/ Plywood could be used for the arms as they are better at absorbing the
vibrations than aluminum and carbon fiber. Unfortunately the wood is not a very rigid
material and can break easily if the quad copter crashes. For the center plate, plywood is
most commonly used because of its light weight, easy to work factor and good vibration
absorbing features. As for arm length, ―motor-to-motor distance‖ is sometimes used,
meaning the distance between the 12 centers of one motor to that of another motor of the
same arm. The motor to motor distance usually depends on the diameter of the propellers
in order to have enough space between the propellers.
d) Glass Fiber: Fig. 3.1 shows the Quadcopter Frame is made of glass fiber. The glass fiber
is the most flexible and vibration absorbent very less expensive compared to carbon fiber.
An individual structural glass fiber is both stiff and strong in tension and compression—
that is, along its axis. The main frame is glass fiber while the arms are constructed from
ultra-durable polyamide nylon [2].
Fig. 3.1 Quadcopter Frame
10
Table 3.2 Comparison matrix of glass fiber
Fiber type Tensile strength
(MPa)
Compressive
strength
(MPa)
Density
(g/cm3)
Softening T
(°C)
Price
($/kg)
E-glass 3445 1080 2.58 846 2
S-2 glass 4890 1600 2.46 1056 20
3.1.2 Electrical Motors
Four motors drive the propellers and provide thrust for the quad copter.
Requirements
The motors shall be powerful enough to spin the propellers, lift the quad copter, and
move the quad copter at the required speed of 50 km/hr for the production model, and 15
km/hr for prototype
Alternatives
On the basis of design, the motors were 935 Kv brushless motors with a 3.17 mm
diameter shaft. The weight of each motor was 55 grams. The max current draw is 17A.
Decision Criteria
The motors chosen for the final design depended on weight, power (Kv), current
draw, and cost. The motors must have a maximum current draw lower than the ESC output
rating. The shaft diameter is another factor as a thicker shaft makes for a more durable
motor.
Implementation
Motors are mounted to the end of the quadcopter‘s four arms as shown in
Figure.3.1.2.1 They are each connected to an ESC with three wires. The order of wiring
simply affects the direction that the motor turns. As such, two motors (opposite each other)
are connected to spin counter-clockwise and two connected to spin clockwise. See the
11
quadcopter block diagram in Figure 3.2 and accompanying Table for more information.
Figure 3.3 below shows the direction of the motors on prototype.
Fig.3.2 Brushless DC Motor
Fig.3.3 Representation of CCW and CW rotation of motor