You are on page 1of 44

CARGO DELIVERY SYSTEM WITH DRONE

GAZİ UNIVERSITY ENGINEERING FACULTY


ELECTRICAL-ELECTRONICS ENGINEERING DEPARTMENT

EEE4921 ELECTRICAL-ELECTRONICS ENGINEERING DESIGN I


DETAILED DESIGN REPORT
2020-21 Spring Semester

GROUP :
1- Emrullah ÜLKER (151110072)
2- Oğuzhan BULUT (151112008)
3- Utku ÇELİKER (151112009)
4- Oğuz Kaan ULUIŞIK (161110071)

COUNSELOR:
Dr. Öğr. Üyesi Mehmet KARAKAYA

1 OCAK 2021 Ankara


iii
CONTENTS
Page

SYMBOL AND ABBREVIATIONS ……………………………………………………….v

1. ENTRANCE…………………………………………………………………………….....1

1.1. Design Problem ……………………………………………………………………….1

1.2. Purpose and Importance of Design ……………………………………………..……..1

1.3. Design Constraints …………………………………………………………..…………1

2. CONCEPTUAL DESIGN …………………………………………………………………..4

2.1. Concept Development …………………………………………………………………2

2.2. Mission Requirements …………………………………………………..………..……4

2.3. Design Requirements.....................................................................................................4

2.4. Evaluated Concepts and Configurations ………………………………………..………5

2.5. Calculation and Amount of Unit Weights ………………………….………………..….5

2.6. Final Conceptual Design Configuration ……………………….………………...………5

3. DETAILED DESIGN…….........................................................................................……...8

3.1. Dimensional Parameters of Final Design...........................................................……...8


iv
3.2. Structural Features and Capabilities of the Final Design.....................................….8

3.3. Systems and Subsystems Selection, Integration, Architecture..................................8

3.4. Design Implementation ……………………………………………………….……..9


Design Level 0…………………………………………………………………..……9
Design Level 1…...………………………………………………………………......10
Design Level 2...................................................................................................……15
4. ADMINISTRATION ………………………………………..………………..….…..…….17

4.1. Team Organization …………………………………………..…………………..…….17

4.2 Timeline ……………………………………..…………………………………………..17

4.3 Work packages …………..……………………………………..………………………..17

5. TEST PLAN………………………………………………………………

6. OTHERS……………………………………………………….

7. RESULT……………………………………………………….

REFERENCES ……………………………………………………………..……………….22

ADDITIONS………………………………...……………………………..……………………23

v
SYMBOLS AND ABBREVIATIONS
The symbols and abbreviations used in this study are presented below with their
explanations.
Symbols Descriptions

0
C Santigrat Degree
cm Santimeter
gr Gram
m Meter
m² Meter square

Abbreviations Descriptions

A Amper
DSP Digital Signal Processor(Dijital sinyal işleyici)
ESC Electronic Speed Controller(Elektrik Hız Kontol)
FCB Flight Control Board(Uçuş kontrol kartı)
GPS Global Positioning System(Küresel konum sistemi)
KV Volt başına rpm
Li-Po Lityum-Polimer Batarya
mAh Mili amper hour(Miliamper -saat)
Prop Propeller(pervane)
Rpm Repeat per minute(Dakika başına devir)
TL Turkish Lira
UAV Unmanned Aerial Vehicle
V Volt

vi
1. ENTRANCE
This detailed design report gives detailed information about the design process
followed in the design stages of the project on "Cargo Delivery System with Drone" of the
"EEE491" course.
The main problem addressed in the project is that shipping systems are too
dependent on human beings, so the accidents and mistakes encountered can negatively
affect human, product and environmental factors.
Job descriptions and rules determined by our consultants in the design of the
transport system, today's scientific studies in this field, the necessity of having an
appropriate and affordable cost, and the environmental factors in the environments where
the use of the vehicle (drone) is aimed have played a major role.

1.1. Design Problem


In our daily life and business life, the quality of the work to be done in order to achieve
quality is as important as the fast and safe transportation of the products to be produced.
In today's classical cargo transportation; The main problems such as damage to the product
during transportation, minor or major damages to living and non-living environmental
factors during transportation, unacceptably prolongation of the transportation time, the
efficiency of the product transportation process to remain at certain levels and therefore the
inadequate energy saving. For this reason, health and safety issues are evaluated as a
design problem and appropriate solutions are tried to be presented.
1.2. Purpose and Importance of Design
The main purpose of the design is to minimize the human factor in product
transportation and to contribute to the industry by increasing the occupational safety in
transportation systems.
The design of the vehicle has been made in accordance with the user goals, taking
human health and environmental factors, dangers into consideration. The project also aims
to ensure that the vehicle reaches its target in the shortest possible way in a healthy way,
thus providing fast and easy use and increasing energy savings.

1.3. . Design Constraints


1) The developed vehicle should reach the coordination with the GPS module with the
lowest error rate and energy expenditure on the shortest route.
2) The engines of the vehicle must be suitable for lifting 5 * 5 * 5cm loads.

1
3) The package should be left within an area of 1 m².
4) After the drone has delivered the cargo, it should return to its starting point
autonomously.
5) The system cost should be limited to a maximum of 3000 TL.
6) Electronic circuits must be able to function fully between -20 ° C and + 40 ° C.2.
CONCEPTUAL DESIGN
This section contains the final version of the conceptual design presented earlier.2.1.
Concept Development
Since this project addresses the design of an autonomous drone system that can fulfill the
requirements, previous studies have been investigated and several projects have been found
that address similar topics. The information obtained from these studies formed an idea for
the project to be designed. Two of the academic studies on similar fields are given in the
following titles together with the summary information from the thesis studies.
GPS GUİDED AUTONOMOUS DRONE
In this project; An autonomous flying drone, especially a quadcopter, is being
designed. The drone is equipped with a GPS tracking system and is programmed to fly
autonomously from one location to another using GPS coordinates. Safety and durability
have been taken into consideration considerably due to the possibility of collisions with
various objects. In addition to collisions, the drone is also rugged enough to operate in
moderately windy conditions. The aim of the project is to establish a small-scale
autonomous air delivery system similar to the future delivery system that Amazon is
targeting. The top and side views of the final version of the project are given in Image 1.

Resim 1. Projenin son halinin yandan ve üstten görünümü

2
AUTOMATIC ROUTE DETERMINATION AND TRACKING FOR
DRONES

In this project, it is aimed that the drone (UAV) follows the assigned route and
returns to its starting point without any need for an operator. For this purpose, it is aimed to
be operated automatically through the GPS module and sensors to be added to the device.
Basic physical components for the operation of the drone; defined as energy source,
controller, sensors and modules. In this study, PixHawk flight controller, which is widely
used as a controller, and a 5200mAh 3S Li-Po battery was chosen as the energy source.
GPS module to determine the position of the drone, ultrasonic sensors to detect obstacles,
barometer to determine the height, and flow sensor to ensure the stability of the drone in
the air. In the application, DroneKit library was used to develop the necessary software to
control the drone, and Mission Planner was used to work with the flight controller to
monitor the instant sensor and status information of the device. Two different operating
environments, simulation and real systems, were designed to test whether autonomous
flights operate successfully and to perform the flight. Open source ArduCopter virtual
drone was used in the simulation environment. The simulation was installed in Windows
10 environment and a virtual simulation drone was created by compiling ArduCopter using
MavProxy in the Mavlink infrastructure. The created virtual simulation drone is monitored
through Mission Planner. Picture 2 shows the route the drone follows.

Resim 2. Dronun İzlediği Rota

3
2.2. Mission Requirements
The missions that the drone will undertake are defined as follows in order to meet the need
and to provide problem solving;
Mission 1 - Cargo handling: To ensure the delivery of the product; It must be able to carry
the cargo at the starting point and take it to the desired delivery area.
Mission 2 - Automatic routing: Delivery should be able to reach the desired point
automatically.
Mission 3 - To follow the route without dropping the package: It is expected to deliver the
package without being affected by weather conditions such as wind and rain during
delivery.
Mission 4 - To be able to land at the delivery point: When reaching the delivery area, it
should be able to land near the delivery point.
Mission 5 - Returning to the starting point: After the delivery is completed, the vehicle is
expected to return to the starting point.
Mission requirements are summarized in Table 1.
2.3. Design Requirements
The design of the vehicle should be made to meet the mission requirements. For this;
• Selecting the engine to be selected with a power suitable for the load to be carried and the
weight of the vehicle
• Selecting the batteries that are strong enough to keep the vehicle in the air until the
vehicle leaves the starting point and returns to the starting point,
• Choosing the appropriate GPS module for the drone to determine the route.
• Selecting the engine and the appropriate ESC to control the speed adjustments of the
vehicle engines,
• Selection of propellers suitable for the engine and with a diameter that can lift the cargo,
• Choosing the appropriate motherboard for the integration of sensors and control units
• There should be a suitable cargo platform in order to prevent the cargo from being
affected by wind and rain.
2.4. Evaluated Concepts and Configurations
Our design is designed to be simple and similar to other designs in the same space.
Efficiency is prioritized and mission-oriented work is aimed. All the specified criteria have
been evaluated and the appropriate hardware and software have been selected to complete
the mission completely. Its maneuverability and speed capability has been adjusted

4
according to the equipment and the route layout. It is aimed to return to the starting point in
case of any malfunction or obstacle. Vehicle equipment has been selected in accordance
with its ease of operation under the specified conditions.
Unlike other existing projects, it was predicted that the change we made in the load
lifting mechanism would bring along a few problems and it was decided to place
appropriate equipment on the drone by producing appropriate solutions to these problems.
With the adjustments, tests and experiments to be made, the vehicle is expected to
complete the mission completely in accordance with all criteria.

2.5. Calculation and Amount of Unit Weights


The list of materials to be used in the design is given in Table 2 below. The weights
of these materials are approximately indicated next to them.

Metarial name Amount (Adet) Mass (gr)


Frame(Drone Çerçevesi) 1 160
Brushless DC Motor 4 4x40
propeller 4 4x7
ESC 1 30
DSP 1 50
FCB 1 200
Li-Po Baterry 1 115
Camera 1 20
Load Platform 2 50
Various Bolts 20 10
Tablo 2. Unit’s Weight and Amount

Approximately total system mass (all existing) 823 gr  1000gr

2.6. Final Conceptual Design Configuration


Simplicity, understandability and durability have been taken as a basis in the design in
accordance with the determined project constraints and the missions to be performed by
the vehicle. In order to facilitate the maneuvers to be made by the vehicle, the necessity of
the motors to be used to operate with maximum efficiency by consuming the least energy
and the necessity of staying in the air sufficiently were realized by using brushless motors.
In the selection and design of the electronic equipment, priority was given to reducing the
cost and weight load on the vehicle, so it was thought that it would be appropriate to use
this loss in the transport of the load by minimizing the loss of movement caused by the

5
weight of the vehicle. In other words, with the reduction of the weight of the vehicle, it is
aimed to carry more weight by using less power. This directly affects the cost of the power
supply to be used and the efficiency of the vehicle by increasing the load carrying.
Due to the advantages of its cost and easy programming capability, compatibility with
sensors (camera, GPS) and motor drivers to be used, the number of available digital pins,
and its low power consumption, it can be used at low voltage values. It was designed by
taking.
DESIGN LEVEL ZERO(0)

Digital Signal
camera Proccessor Battery
(DSP)

Communication
Control unit
unit Power unit

Land control Motors and


sensors
propellers

The basic modules that should be approximately available in the autonomous drone are
shown in the figure. In addition, the basic connection scheme of these elements is
discussed. Connections or elements may change at the next design level. It is even possible
to experience the number of additional elements used.
In addition, in this connection diagram, the input output output, current and power data of
electronic or electromechanical systems are not specified. Only their relationship with each
other is given at an introductory level.
DESIGN LEVEL ONE(1)

6
At this design level, we will look at what is in the blocks we saw in the previous
stage and which individual elements they should be connected to, and what data they will
receive from them or what data they will transmit to them.
CAMERA
The system needs image data as it will operate on a computer vision basis. Therefore, the
camera is an essential component of this system. At this stage, it was decided to work with
a 480p camera in order not to take much memory. The camera would only send data to the
DSP module. Data is digital data.

480p
Vision data DSP
Camera

DSP
DSP is the unit that will process the data it receives from the camera. At this stage, it was
decided to use a raspberry pi electronic card for the DSP unit.
This card, which will be programmed in Python language, will process the image data and
transmit it to the central control unit in the most
appropriate format.

DSP Processed data Control unit

BATTERY

The battery will serve as the power source for the drone. When
deciding on its size and type, the tare calculation of the drone should be
chosen according to the current to be drawn depending on the rotor
RPM value required depending on the weight of the package it will

7
carry. In addition, since other circuit elements work with electrical
energy, these elements can be energized separately or can be provided
over the main battery.

Energy Other
Power unit
components

POWER UNIT
The power unit is responsible for transmitting the necessary
power to the motors for the movement to take place. In drones, this element is called ESC
(Electronic Speed Controller). ESC or ESCs must be compatible with the body of the
drone. For a drone with a short wingspan, the central ESC called 4-in-1 should be used, or
1-1 or 2-1 ESCs can be used for a drone with a long wingspan. The biggest advantage of 4-
in-1 ESC is that it is a single element and is located in a safe
ESCs have essential 2 input and 1 output terminals. One of the
input terminals is connected to the power supply and one to the
control unit. Thus, the ESC adjusts the power to be transmitted
to the motor according to the signal from the control unit.
Output terminal is connected only to the motor. Reduces
Battery Energy ESC
propeller
energy

Energy
control
signal

Control unit

PROPELLER AND MOTORS


Drone engines should be selected with the capacity to produce the necessary
torque to carry the tare weight of the drone and the package load, if any. Similarly,
propellers should be selected in a width that can carry this torque and in dimensions that
can provide the required fluid movement. Motors have KV ratings. It has been deemed

8
appropriate to use a 3100 KV motor. This means that this motor is rotating at 3100 rpm
without any propellers attached under 10 V / 6A voltage and current. It has been decided to
use a 2 pole 6 inch diameter propeller as the
propeller.

propeller

COMMUNICATION UNIT
The communication unit is responsible for the
communication between the ground control center
and the drone, as well as the location determination
by using coordinates since it contains a GPS module.
Here, the ground control center is intended as a control. It detects simple commands that
will come from the control and transmits them to the control unit. At the same time, the
battery fill rate, height, engine rotation speed, etc. from the sensor group. It is also
responsible for sending the data to the controller.
It was decided to use NRF24 module for bi-
directional communication within the unit. The
communication band is 2.4 GHz and the
communication between two stations can go up to 250
meters in an unobstructed environment. The module
can work integrated with Ardunio. In addition, PCB
design can also be made.

Sensör Kontrol
Grubu ünitesi

Kumanda
REMOTEHaberleşme
CONTROL
ünitesi control station.
The controller represents a ground
Commands such as "cancel mission", "return" are
transmitted to the drone by the transmitter from the remote.
The remote also informs the drone operator about the
physical condition of the drone by reflecting the sensor data

9
sent by the drone's sensors with the help of the communication unit with the display
indicator. In this way, the user can be sure that everything is working well on the drone.

SENSORS
The drone has to use some data while performing
its mission. Some of these are data such as
height, battery charge rate, engine rotation speed.
Our goal is to ask the drone to send us the data that will answer questions such as how
accurately we are following the route we envisioned while doing the drone mission, is it at
the height it should be right now, will its battery be enough to complete the mission.
The sensors that should be on the drone at this stage are:
1) Altimeter (for altitude information)
2) Gyroscope (for directional information)
3) Optical encoder sensor (to measure motor speed)
4) Ultrasonic proximity sensor (to avoid collision)
5) Battery charge sensor (for battery information)

CONTROL UNIT
The most important part of the drone is its brain, the control unit. This unit is called
the "Flight Control Board (FCB)". Market review has shown that some types have built-in
gyroscope and GPS modules.
Flight control card is the unit that receives data from sensors, evaluates them and
makes final decisions. This unit also evaluates the commands that will come from the
control and implements them immediately.

10
Since our drone will be processing the image, it takes the processed image data
from the DSP module and whether it is where it should be, or whether it sees the signs or
images that will enable it to perform the mission, whether to approach depending on this,
decide whether to reduce the height or do any of these, cancel the mission and return to the
starting point. takes the necessary decision for.
Since the flight control card works in conjunction with the ESC, the flight control
card also monitors the speed of the motors and drives the ESC to change the speed data
where necessary.

DSP

Communication ESC
unit

FCB

2.1. Mission Requirements


Land control
sensors
The missions that the drone will undertake are defined as follows in order to meet the need
and provide problem solving;
Mission-1 - Cargo handling: To ensure the delivery of the product; It must be able to carry
the cargo at the starting point and take it to the desired delivery area.
Mission-2 - Automatic routing: Delivery should be able to reach the desired point
automatically.
Mission-3 - To follow the route without dropping the package: It is expected to deliver the
package without being affected by weather conditions such as wind and rain during
delivery.
Mission-4 - To be able to land at the delivery point: When reaching the delivery area, it
should be able to land near the delivery point.

11
Mission-5 - Returning to the starting point: After the delivery is completed, the vehicle is
expected to return to the starting point.
Mission requirements are summarized in Table 1.

2.2. Design Requirements


The design of the vehicle should be made to meet the mission requirements. For this;
• Selecting the engine to be selected with a power suitable for the load to be carried and the
weight of the vehicle,
• Selecting batteries that are strong enough to keep the vehicle in the air for the time it
takes to deliver after leaving the starting point and return to the starting point,
• Choosing the appropriate GPS module for the drone to determine the route.
• Selecting the engine and the appropriate ESC to control the speed adjustments of the
vehicle engines,
• Selection of propellers suitable for the engine and with a diameter that can lift the cargo,
• Choosing the appropriate motherboard for the integration of sensors and control units
• There should be a suitable cargo platform in order to prevent the cargo from being
affected by wind and rain.

2.3. Evaluated Concepts and Configurations


Our design is designed to be simple and similar to other designs in the same space.
Efficiency is prioritized and mission -oriented work is aimed. All the specified criteria
have been evaluated and the appropriate hardware and software have been selected to
complete the mission completely. Its maneuverability and speed capability has been
adjusted according to the equipment and the route layout. It is aimed to return to the
starting point in case of any malfunction or obstacle. Vehicle equipment has been selected
in accordance with its ease of operation under the specified conditions.
Unlike other existing projects, it was predicted that the change we made in the load lifting
mechanism would bring along a few problems and it was decided to place appropriate
equipment on the drone by producing appropriate solutions to these problems. With the

12
adjustments, tests and experiments to be made, the vehicle is expected to complete the
mission completely in accordance with all criteria.
2.4. Calculation and Amount of Unit Weights
The list of materials to be used in the design is given in Table 2 below. The weights
of these materials are approximately indicated next to them.

Metarial name Amount (Adet) Mass (gr)


Frame(Drone Çerçevesi) 1 160
Brushless DC Motor 4 4x40
propeller 4 4x7
ESC 1 30
DSP 1 50
FCB 1 200
Li-Po Baterry 1 115
Camera 1 20
Load Platform 2 50
Various Bolts 20 10
Tablo 2. Unit’s Weight and Amount

Approximately total system mass (all existing) 823 gr  1000gr

2.5. Final Conceptual Design Configuration


Simplicity, understandability and durability were taken as a basis in the design in
accordance with the determined project constraints and the missions to be performed by
the vehicle. In order to facilitate the maneuvers to be made by the vehicle, the necessity of
the motors to be used to operate with maximum efficiency by consuming the least energy
and the necessity of staying in the air sufficiently were realized by using brushless motors.
In the selection and design of the electronic equipment, priority was given to
reducing the cost and weight load on the vehicle, so it was thought that it would be
appropriate to use this loss in the transport of the load by minimizing the loss of movement
caused by the weight of the vehicle. In other words, with the reduction of the weight of the
vehicle, it is aimed to carry more weight by using less power. This directly affects the cost
of the power supply to be used and the efficiency of the vehicle by increasing the load
carrying.

13
Due to the advantages of its cost and easy programming capability, compatibility
with sensors (camera, GPS) and motor drivers to be used, the number of available digital
pins, and its low power consumption, it can be used at low voltage values. It was designed
by taking.

3- DETAILED DESIGN

3.1. Dimensional Parameters of Final Design


The design was designed by considering the weight and the required lifting force,
as it contains many sensors and equipment. The length of the vehicle planned to cover the
design requirements was designed as approximately 300 mm. Considering the weight of
the equipment owned by the vehicle, it was thought that these equipment should be placed
in suitable places for the vehicle. Since it will lift the load from the front, it is aimed to
place the heavy equipment starting from the rear of the vehicle towards the front in order to
stay in balance. The weight of the vehicle together with the equipment was calculated to be
around 1 kg. In order to pull the load, the pulling force of the platform was considered and
the weight effect of the load on the vehicle was calculated. A design plan was made
considering the sensitivity of the elements that may be affected by vibration while in
motion and any disconnection criteria.

3.2. Structural Features and Capabilities of the Final Design


It is requested from the design that loads of certain weight and characteristics are
autonomously transported, left to certain delivery areas and returned to the starting area.
The design was discussed under separate headings as load and vehicle. A GPS module and
image processing sensor have been added to the vehicle so that the vehicle can move
autonomously. USB connection was made to the vehicle over a windows based software in
order to receive commands from the user. It is equipped with sensors in order to easily
locate the vehicle. A return to the starting point was provided upon the need for the vehicle
to receive commands again. A brushless motor was used to make the vehicle move easily.
It was determined that there are some uncertainties in this project, which was designed by
considering the design requirements. These uncertainties can be listed as follows:
• How will the load lifting and carrying performance be,
The sharpness of the mechanical turns that the vehicle will make while carrying the load,

14
• Uninterrupted communication with GPS, connection status,
• The condition that the vehicle can move easily in weather conditions.

3.3. Selection, integration, architecture of systems and subsystems


The selection of the subsystems in the design has been designed in accordance with
the criteria of cost, efficiency, easy coding and being part of a user-friendly system.

3.3.1. Raspberry Pi
The first thing to do in the design is to choose a controller that mainly distributes
the missions to be performed and controls the performance of the missions. The fact that
this controller is compatible with other subsystems to be used, can operate at low power, is
at an acceptable level in terms of cost, and is easy to program, will add extra advantages to
the design.
Arduino family Raspberry Pi
It is included in the microcontroller It is included in the microprocessor family.
family. It contains units such as It is a central processing unit, it can only
processor, memory, input / output, ROM, manage and decide transactions, but cannot
RAM and does not need to be added perform transactions alone. Peripherals must
peripherals. Therefore, it can control and be added from outside.
perform transactions alone.
It is used to control simple systems. It is used for controlling complex systems.
It is open source, easy to program, easy Programming is complex and may take a
to learn and its programming interface is long time to learn. Requires installation of
more user-friendly. It does not require its own operating system.
installing an extra operating system.
It is low cost and easier to obtain. It can It is costly and more difficult to obtain. It is
be used in simple systems to further used in projects where high performance is
reduce costs. required.
Tablo 3. Arduino ve Raspberry Pi karşılaştırması
As seen in the table, it was seen that the Arduino family has more advantages over the
Raspberry Pi family. But the missions to be done by the project are at certain levels, and
Arduino was removed from the options because it was not at a level to meet these
requirements.

DETAILED DESIGN

15
In this design phase, the finest details of all components will be included, and the exact
parts to be used will be selected while the drone is finalized. On the other hand, the drone
will be assembled and the test phase of the vehicle will begin.
DSP
DSP, raspberry pi was chosen in our drone vehicle. This card is of one type and we
have decided to use RASPBERERY-4.
This card can operate synchronously with the flight control
card to be selected and there are samples made.
Raspberry Pi 4 Technical Specifications:
Broadcom BCM2711, quad-core Cortex-A72 (ARM v8) 64-bit
SoC @ 1.5GHz
2GB / 4GB LPDDR4-3200 SDRAM
4 / 5.0 GHz 802.11ac supported wireless network, Bluetooth 5.0, BLE supported
2xUSB 3.0, 2xUSB 2.0 ports
2 × micro-HDMI ports (4K 60fps supported)
2-line MIPI DSI display port
2-line MIPI CSI camera port
265 (4kp60 decode), H264 (1080p60 decode, 1080p30 encode)
Graphics processor with OpenGL ES 3.0 support
Micro SD card slot for operating system and data storage
5V power input (minimum 3A) via USB-C
5V power input (minimum 3A) via GPIO connection
50 grams
Important Note: GPIO pins on Raspberry Pi work at 3.3V level. It is not compatible with
5V.
CAMERA
The system needs image data as it will operate on a computer vision basis.
Therefore, we took care that it is both cheap and high quality. As a result of the
comparisons made from different sales sites on the Internet, it was decided to use the
following camera.
ANGL
VIDEO
SYNCHRONIZATIO SIZE(mm RESOLUTIO SENSOR E OF PRIC
SHOOTIN
N ) N TYPE VISIO E
G
N

16
OmniVisio
5MP 1080p
Compatible with n 54x41 129,9
25x20x9 (2592x1944 720p
Raspberry pi 3-4 OV5647 degree 9 TL
piksel) 640x480p
(5 MP)
Estimated weight is 20 grams

FLIGHT CONTROL CARD


The flight control card is the decision-making centerpiece of the drone and is an
indispensable element for the autonomous drone. During this period, we scanned many
flight control cards and found that there are many models in the 150 TL - 1500 TL band.
However, for our autonomous drone project, we decided to use the "PixHawk" card, which
has autoplot software, which will allow us to add or add to this software and has a lot of
package content. This card has different versions for different purposes and the element
marked in red has been selected. Namely;

SELLER
WEIG FEATUR INTERNAL
MODEL SIZE PACKAGE INCLUDED AND
HT ES SENSORS
PRICE
32 Bit Package Ichoroscope:
ICM-20689
Arm®
+ PIX
Cortex®- Accelerometer /
+
Pixhawk M7, gyroscope: BMI055 Robotista
+
PX4 44x84x12 15.8 216MHz, n.com
Magnetometer (compass): Security key
v2.4.8 2MB IST8310 599,96 TL
+
memory, +
Barometer (altitude Buzzer
512KB
sensor): MS5611
RAM Prunes

17
gyroscope: ICM-20689 MINI PIX

+ +
Buzzer
Accelerometer: ICM- +
20689 Neo-M8N Gps Module
+
SMT32f40 +
Black Gps Holder
Pixhawk Barometer: MS5607 +
7 (32bit Banggood
PX4 + Power module
36x36 200 Cortx-M7 + .com
v2.4.8 Compass: IST8310 Minim OSD w / shell
168Mhz Support for up to three + 689,83 TL
Mini I2C Expand Splitter Module
Arm) + +
Compass with built-in PPM Module w / shell
+
+
433 MHZ 100 mw / 500 MW telemetry
2x outer support 2 +
Cable
(maximum)
L3GD20 3 axis digital 16 bit PIX
32 bit 2M gyroscope +
+ Security key
flash
LSM303D 3-axis 14 bit +
memory accelerometer / Flight control shell
Pixhawk magnetometer +
Banggood
STM32F4
PX4 - 37 + Buzzer .com
27 Cortex MPU6000 6-axis +
v2.4.8 accelerometer / From 6 pins to 6 pins
542,92 TL
M4
magnetometer +
168MHZ + 4Pin to 4Pin line
MS5611 high precision +
RAM
barometer 3pin DuPont line
ELECTRONIC SPEED CONTROLLER
Since our drone is not for industrial purposes, but for training purposes and the
amount of load it will carry is not much, it is predicted to have a short wingspan. Since the
wingspan is short, instead of placing 1 ESC in each arm, that is, instead of 4 1-in1 ESCs, it
has been deemed appropriate to choose a 4-in-1 ESC to be positioned in the center. As a
result of market researches, the ESC marked in red was deemed appropriate due to its
price.
INPUT
CONTINIOUS. BURST INCLUDED
BRAND MODEL VOLTAGE SIZE(mmxmm) WEIGHT(gr) EXTRA PRICE(TL)
CURRENT(A) CURRENT(A) (packing)
(V)
1x15A 4in1
ESC
JHEMCU EM15A 2-4S LIPO 15 20 29x31 4.9 - 147,46
1x 6P 1.0
mm cable
1x 12A
GEPRC F411 2-4S LIPO 12 - 23x21 2.7 ammeter 155,46
4-in-1 ESC
HAKRC BLHELI_ 2-4S LIPO 15 20(5S) 27x31 4.8 1x 15A 4-in- Programmable 161,49
S 1 ESC for racing

18
1xCable
1x bag of
screws
1x ESC
1x8Px1mm
cable
1000uF/35V
Software
3-6S Filter
RACESTAR AIR50 55 - 30.5x30.5 12.1 support and 172,30
(12-36V) Capacitor
amperage
1x14AWG
Red Cable
1x14AWG
Black Cable
1xESC
JHEMCU EM25A 2-4S LIPO 25 30 29x31 4.9 1x6P 1mm - 172,38
Cable
Support
BLHELI_
LDARC 2-3S 12 15 25x28 4.0 1x ESC voltage 174,65
S
module
BLHELI_
HAKRC 2-4S 20 25(5S) 27x31 3.7 1x ESC programmable 188,05
S
Tryo89-
Programmable
EACHINE Racing- 2-4S 20 23(3S) 30x30 5.5 1x ESC 189,62
for racing
Drone
Includes
current sensor
RACESTAR BLheli_S 3-6S 35 40 36x36 13 1x ESC and use of no 195,81
extra
capacitors
COMMUNICATION UNIT
The communication unit is built into the flight control card. There is no need for an
external communication unit or GPS transceiver.
LAND CONTROL
There is no need to design or purchase and compile an external controller. On the
contrary, the interface of the flight control card is suitable for communication with the
computer.
SENSORS
The sensors that are internally on our flight control card are sufficient for us, and it
has been decided to use the following sensors as an option.
1) Optical reflection sensor (to measure motor speed)
2) Ultrasonic proximity sensor (to avoid collision)
3) Battery charge sensor (for battery information)
GÖVDE

19
DİNGİL
FOTOĞRAF AĞIRLIK(gr) MESAFESİ ÖNERİLER ÖZELLİKLER FİYAT
(mm)
4 x Motors
Emax XA2212
1400KV
Brushless Motor
PCB frame board
+
Optimized frame
4 x Hobbywing
design, making
SKYWALKER
20A Brushless the wiring of
ESC ESCs and battery
160 330 + safer and easier 96,53
4 x 8045 +
Propellers Plenty of
+
mounting space
1 x Battery 3S-
for autopilot
4S LiPo
systems.
+
1 x CC3D
Flight
Controller
FC mounting
hole: 30x30mm
118 250 - + 132,50
Camera mounting
distance: 27mm
Flight Control:
APM 2.6 /
Pixhawk 2.4.6
Flight Controller
Engine: EMAX
Can connect the
MT2213 935KV ESC and power
460 450 Engine
225,50
cable directly to
ESC: 20-30A ESC
the center board
Propeller: 10/11
Inch Propeller
Battery: 3-4S Lipo
Battery

MOTOR

1.motor )

20
48,50TL

Önerilen
Prop: 80xx-
90xx

2.
motor )
52,97 TL

Önerilen Prop: 6040

3. motor
65,74 TL

4. motor)

21
77,57 TL

5. motor )
90,81 TL

DECISION

22
Weight factor is important in motor selection. The calculated weight, including the
body of the drone, was 534 grams. It is predicted to be 600 grams with internal sensors.
Although it is large, the maximum weight of the drone was calculated as 700 grams in case
of a 15% margin of error, and the engine selection was made in this regard and the 1st
engine was won.

Depending on the choice of the propeller to be made later and the


selection of the battery, the engine may change, but since the selected
engine is well above the drone weight values, it will not be affected by
the weight of the propeller, battery and other connection elements.

PROPELLER
Manufacturers use numbers in two different formats.
Here; L: length, P: pitch, B: number of palms.

For example, we have a 6 * 4.5 (also known


as 6045) propeller. Here 6 represents the length and
4.5 represents the pitch. Length units are in inches.
To give another example, the numbers 5 * 4 *
3 or 5040 * 3; Represents a 5 inch long, 4 inch pitch,
3 blade or 3 blade propeller.

Sometimes you can see the word "BN" on the


impeller. The "BN" here indicates a stubby nose
propeller (bullnose). Sometimes you may see the
words "R" or "C" on the impeller. The expressions
here refer to the rotation of the propeller. If you see
the word "R" on the propeller, it means "reversed". It should be attached to the propeller
rotating clockwise. If there is a "C" it must be attached to the motor rotating
counterclockwise.

As the drone team, we decided to use the 2-blade 7045 propeller, that is, the
propeller with the above features. The 7 gram weight of the drone is included in the
calculated weight, the calculation is correct. The price of our product is 28,13 TL
BATTERY

23
Considering the engine to be used in the drone, the most suitable battery for us
ZOP Power 11.1V 1500mAh 40C 3S Lipo Battery.
Its price is 140.96 TL and its weight is 115 grams.
Please pay attention to the operating voltage of the
motor and the operating voltage of the battery.

4- ADMINISTRATION
The project group consists of four people. It is
aimed for each group member to have full knowledge
of the project, and detailed research topics were given to the group members in line with
their interests and abilities. These people and their research topics are given below.
4.1 Team Organization
Emrullah Ülker: Electronic components and connections are concerned with the
mechanical, structural design to fulfill the vehicle's requirements. With regard to the
personality of the researcher, he provided the literature research related to the project and
the examination of the examples.
Oğuzhan Bulut: In line with his interest in control systems, he is interested in researching
the necessary materials for determining the movement and route of the vehicle and their
integration into the vehicle.
Oğuz Kaan Uluışık: In line with his interest in image processing and software, he conducts
research on the sensor and electronic card that the vehicle will operate. It conducts research
on the platforms where the software will be built..
Utku Çeliker: Due to its familiarity with the market, it conducts market research in order to
achieve the minimum cost of equipment to be used. It focuses on battery, motor, motor
drivers and system integration.

Instead of choosing a single team leader throughout the project process, periodic
leadership practice was deemed appropriate. Each team member is set to lead the processes
in a two-month period. During the period between November and December, Oğuzhan
BULUT, Emrullah ÜLKER in the period between January and February, Oğuz Kaan
ULUIŞIK in the period between March and April, and Utku ÇELİKER in the period
between May and June will be the team leader. The team leader has created major work
packages and determined the distribution of tasks in line with the abilities.

24
Organization chart

Takım lideri
Oğuzhan Bulut

Danışman Şirket Danışmanı


Emrullah Ülker Utku Çeliker

Danışman
Oğuz Kaan Uluışık

Güç Optimizasyonu Elektronik ve


Hareket ve Mekanik Yazılım ve
ve Enerji Tasarrufu Yapısal Tasarım Sistem Test Lideri
Tasarım Lideri Algoritma Lideri
Lideri Lideri Oğuz Kaan Uluışık
Emrullah Ülker Oğuzhan Bulut
Oğuz Kaan Uluışık Utku Çeliker

Güç Optimizasyonu Elektronik ve Yazılım ve


Hareket ve Mekanik Sistem Test
ve Enerji Tasarrufu Yapısal Tasarım Algoritma
Tasarım Mühendisi Mühendisi
Mühendisi Mühendisi Mühendisi
Utku Çeliker Emrullah Ülker
Oğuzhan Bulut Oğuzhan Bulut Oğuz Kaan Uluışık

Elektronik ve Yazılım ve
Yapısal Tasarım Algoritma
Mühendisi Mühendisi
Emrullah Ülker Utku Çeliker

4.2 Timeline
In this section, the work to be done during the design process is planned by dividing into
processes and shown on a work time chart. Gann diagram is preferred to show this scheme.
This diagram is shown in Table 1 in the "Annexes" section.
During the project process, this schedule will be followed. The processes completed from
October until the report delivery period are marked in red, and the planned process after
this process is marked in black on the timeline.
4.3 Job Packages

25
In this section, the work to be done during the design process is planned by dividing
into processes and shown on a work time chart. Gann diagram is preferred to show this
scheme. This diagram is shown in Table 1 in the "Annexes" section.

5. TEST PLAN
In this section, the components of the system to be produced and the tests to be performed
on all
plan will take place. The plans include how and when each test step will take place.
It should include a process to be implemented. Three types of test plans will be made. 1)
Unit testing,
2) Integration test, 3) Acceptance test.
5.1. Unit Tests
In unit tests, the components used on the vehicle and each of which has an important role
in the vehicle's mission should be tested separately and checked whether it works as
desired. In other words, the subcomponents of the whole system should be examined unit
by unit, the expected result and the result data should be compared with the test forms, and
the errors should be removed and improved according to the result. The table of unit tests
performed is in the appendices.
5.1.1. Engine Thrust Test
Propellers are attached to the motors and a weight that cannot be lifted and a sensitive scale
is placed one by one. The motors operate at full power respectively and the measured
values are expected to be equal to each other. Finally, the data obtained are compared with
the values given by the manufacturer of the engine.

5.1.2.Raspberry Pi Tests

26
Camera is integrated into Raspberry Pi device. Display connection is made with an HDMI
cable. The camera hardware is powered up and tested.
GPS is integrated into the Raspberry Pi device. Display connection is made with an HDMI
cable. GPS positions are requested and the results obtained are compared with the current
GPS positions.

5.1.3. Target Recognition and Positioning Test


The object / shape that needs recognition is shown to the camera. Software description of
the object is made. Prepared codes are run and tested. The codes used are given in the
appendices. (ANNEX 1)

5.2. Integration Tests


Integration tests should be done after the unit tests are completed and positive results are
obtained. After the unit tests are completed, the necessary connections should be provided
between these sub-units and larger units should be created. The harmonious and integrated
operation of the sub-units is very important for the vehicle to fulfill its mission completely,
accurately and efficiently. Integration experiments test whether the main modules fulfill

27
their functions. Test setups should be able to be associated with high-level design, and
should be written by taking into account the characteristics of the design architecture.
5.2.1. Pixhawk Integration with Raspberry Pi
Connection between Raspberry Pi device and Pixhawk 4 control board is made. Display
connection is made with Raspberry pi HDMI cable, then control card integration codes are
entered via python. The codes used and the test table are given in the appendices.
(ANNEX-2) (Integration test-1)
5.2.2. Drone Movements and Control Card Tests
The drone is made ready for use, and connection tests are performed through "if"
commands. The codes used and the test table are given in the appendices. (ANNEX-3)
(Integration test-2)
5.2.3. Target Recognition and Movement Towards Target
After the drone goes to the given GPS position, it is tested to detect the target introduced to
it and move towards it. The codes used are given in the appendices. (ANNEX-4)
(Integration test-2)
5.2.4. Landing and Cargo Drop Test
After the drone goes to the target introduced to it, it is tested to land on the ground and the
mechanical arm to release the cargo. The codes used and the test table are given in the
appendices. (ANNEX-5) (Integration test-3)

5.3. Acceptance Test


After the acceptance test, unit and integration tests are completed with good results, it is
the test determined according to the customer's requirements. The acceptance test is a
formal document that includes the conditions under which the customer will receive the
produced system. Generally, the system is requested to be tested under environmental
conditions of the user. Tests are set up to verify that engineering requirements are met. It

28
may not be necessary to pass every test for the system to be accepted. The importance of
each test should be stated in the acceptance test document. Since test plans are made at the
beginning of the project, they may need to be reviewed according to the needs arising in
the process. The four basic characteristics of a good requirement are abstraction, precision,
traceability and verifiability. A verifiable requirement provides an objective criterion for
evaluating the system as pass / fail on the test result.

6. OTHER ISSUES

6.1. Ethic
During the project process, attention was paid to act in accordance with originality and
ethical principles. The topics such as showing the sources used in the research, awareness
of responsibility, confidentiality and security are handled in accordance with ethical rules.
In addition, group members always acted with courtesy and respect towards each other.
6.2. Standards to be followed
IEEE802.11p /LTE-V2V : It covers all vehicle communication systems as an
umbrella protocol where sensor data can be transferred at high speed with low
loss.

ISO 45001: It is the standard of occupational health and safety.

ISO 27001: It is designed to protect information assets and to provide adequate


and proportional security controls that give confidence to interested parties.

IEC 61850: It is an international industrial communication protocol used for


electrical network data communication.

6.3. Sustainability
Sustainability is the ability to continue the project even after it is completed, in other
words, ensuring the permanence of the project. Updating the electronic devices and
software used in the project ensures the sustainability of the project.

6.4. Health, Environment and Safety


Health and environmental criteria have always been prioritized in the project. Personal
protective equipment was used in the use of solder, heater, and cutting tools during the

29
assembly phase. The health and environmental damage risks that may be caused by the
product during operation were examined and reduced to zero. Occupational Health and
Safety criteria were used as a provider tool in these three issues.
6.5. Legal

Persons who damage living, non-living things and the environment as a result of using the
design outside of its intended purpose and not being used under the specified standards and
conditions will be legally subject to material and moral penal sanctions. In addition, the
manufacturer will face legal sanctions as a result of the failure to perform the tests and
trials required during the production of the product and this situation endangers the
primary person and the environment. In addition, as a result of unauthorized copying and
production of the electronic and mechanical design of the vehicle, our patent owner team
has the right to initiate a material and moral legal struggle against the real or legal persons
who perform this transaction. This legal process may result in the other party's
compensation or imprisonment.

7.RESULT

In this study, it is aimed to develop an autonomous drone for use in cargo delivery. With
the autonomy of the device, the workforce used has been reduced to almost zero. In
addition, accidents that may occur during today's cargo transportation process are
prevented. The vehicle goes to the GPS coordinates entered into it, thanks to the control
card and Python programming, and determines the point where it should leave the load via
the camera and positions itself. Then he leaves the mechanical arm he has to drop the cargo
with the programmed software again. After completing the cargo drop process, it
determines the return route to the starting point (can be the cargo distribution center) and
returns. Units to be used were determined with the tests performed and design plans were
made. Then the units were tested one by one and made ready for integration. After
successful completion of the tests with integrated systems, the project was made ready for
completion. During the project construction process, ethical values were complied with
and the design was shaped by considering health, environment and safety. Accordingly, it
is envisaged to be completed in the targeted time in the plans determined for the project.

30
KAYNAKÇA

1. https://www.evansville.edu/majors/eecs/downloads/projects2016/CameronRobertsRep
ort.pdf

2. Building An Autonomous Indoor Drone System - eGrove.

3. http://www.set-science.com/manage/uploads/ISAS2019-
ENS_0042/SETSCI_ISAS2019-ENS_0042_0011.pdf.

4. https://www.mathworks.com/videos/image-and-signal-processing-with-matlab-
simulink-82478.html

5. https://stackabuse.com/introduction-to-image-processing-in-python-with-opencv/

6. https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711/rpi_DATA_2711_
1p0_preliminary.pdf

7. https://projects.raspberrypi.org/tr-TR/projects/raspberry-pi-setting-up/5

8. https://github.com/ArduPilot/pymavlink

9. https://dronekit-python.readthedocs.io/en/latest/guide/copter/guided_mode.html

10. https://maker.robotistan.com/raspberry-pi-dersleri-12-dc-motor-kontrolu/

31
ANNEXES

Finish Date

November
Start Date

December

February
January
(mouth)
BUSINESS PACKAGES and ACTIVITIES

March
Süre

April

June
May
1. Creating Conceptual Design 20.10.2020 15.12.2020  2
1.1 Literature Review 3
1.2 Conceptual Design 2
2. Detailed Design and Material Selection 15.12.2020 15.02.2021 2
2.1 Detailed Design 2
2.2 Material Selection and Mechanical Design 1
2.3 Updating the Design 1
3. Prototype Manufacturing and System Integration 15.02.2021 10.05.2021 3
3.1 Prototype Mechanical Manufacturing and Assembly 2
3.2 Electric Electronic System Integration 2
3.3 Creating Software and Algorithm 3
4. Creating the Final Report and Planning the Tests 10.05.2021 25.06.2021 1.5
4.1 Unit Tests 1
Communication Test 1
4.2 Integration Tests 1
Systematic Movement and Orientation Tests 1
Load Carrying Tests 1
System Function Tests 1
4.3 Acceptance Test 1
EK-1 EK-2
import cv2 from dronekit import connect, VehicleMode,
from collections import deque LocationGlobalRelative, Command
import numpy as np import time
boyut = 16
from pymavlink import mavutil
ddq = deque(maxlen = boyut)
import argparse
mavi1 = (84, 98, 0)
mavi2 = (179, 255, 255) parser = argparse.ArgumentParser(description='commands')
vid = cv2.VideoCapture(0) parser.add_argument('--connect')
vid.set(3,960) args = parser.parse_args()
vid.set(4,480) connection_string = args.connect
while True: print("Connection to the vehicle on %s"%connection_string)
goo, img1 = vid.read() vehicle = connect(connection_string, wait_ready=True)
if goo:
blur = cv2.GaussianBlur(img1, (11,11), 0)
hsv = cv2.cvtColor(blur, cv2.COLOR_BGR2HSV) EK 3
mask = cv2.inRange(hsv, mavi1, mavi2) Drone yükseklik ve hız ayarları yapılır:
mask = cv2.erode(mask, None, iterations = 2) def arm_and_takeoff(tgt_altitude):
mask = cv2.dilate(mask, None, iterations = 2) print("Arming motors")
(contours,_) = cv2.findContours(mask.copy(), cv2.RETR_EXTERNAL, while not vehicle.is_armable:
cv2.CHAIN_APPROX_SIMPLE) time.sleep(1)
center = None vehicle.mode = VehicleMode("GUIDED")
if len(contours) > 0: vehicle.armed = True
c = max(contours, key = cv2.contourArea) while not vehicle.armed: time.sleep(1)
rect = cv2.minAreaRect(c) print("Takeoff")
((x,y), (width,height), rotation) = rect vehicle.simple_takeoff(tgt_altitude)
s = "x: {}, y: {}, width: {}, height: {}, rotation: #-- wait to reach the target altitude
{}".format(np.round(x),np.round(y),np.round(width),np.round(height),np.round(rotation while True:
)) altitude = vehicle.location.global_relative_frame.alt
print(s) if altitude >= tgt_altitude -1:
rect1 = cv2.boxPoints(rect) print("Altitude reached")
rect1 = np.int64(rect1) break
m = cv2.moments(c) time.sleep(1)
center = (int(m["m10"]/m["m00"]), int(m["m01"]/m["m00"])) arm_and_takeoff(10)
cv2.drawContours(img1, [rect1], 0, (0,0,255),3) #-- set the default speed
cv2.circle(img1, center, 5, (255,255,255),-1) vehicle.airspeed = 7
cv2.putText(img1, s, (25,50), cv2.FONT_HERSHEY_COMPLEX_SMALL, 1, Drone’un gitmesi istenen GPS konumu enlem, boylam ve yükseklik
(255,255,255), 2) cinsinden verilir:
ddq.appendleft(center) print ("go to wp1")
for i in range(1, len(ddq)): wp1 = LocationGlobalRelative(35.9872609, -95.8753037,
if ddq[i-1] is None or ddq[i] is None: continue 10)
cv2.line(img1, ddq[i-1], ddq[i],(0,255,255),1) vehicle.simple_goto(wp1)
cv2.imshow("Orijinal Tespit",img1) Drone hareketleri tanımlama:
if cv2.waitKey(1) & 0xFF == ord("q"): break def set_velocity_body(vehicle, vx, vy, vz):
msg =
vehicle.message_factory.set_position_target_local_ned_encode(
0,
EK-4
0, 0,
import cv2
from collections import deque mavutil.mavlink.MAV_FRAME_BODY_NED,
import numpy as np 0b0000111111000111, #-- BITMASK -> Consider
boyut = 16 only the velocities
ddq = deque(maxlen = boyut) 0, 0, 0, #-- POSITION
mavi1 = (84, 98, 0) vx, vy, vz, #-- VELOCITY
mavi2 = (179, 255, 255) 0, 0, 0, #-- ACCELERATIONS
vid = cv2.VideoCapture(0)
0, 0)
vid.set(3,960)
vid.set(4,480) vehicle.send_mavlink(msg)
while True: vehicle.flush()
goo, img1 = vid.read() if BURASI UYGULAMA SONRASINDA KAMERA
if goo: KONUMUNA GÖRE BELİRLENİP EKLENECEK
blur = cv2.GaussianBlur(img1, (11,11), 0) set_velocity_body(vehicle, gnd_speed, 0, 0)
hsv = cv2.cvtColor(blur, cv2.COLOR_BGR2HSV) elif BURASI UYGULAMA SONRASINDA KAMERA
mask = cv2.inRange(hsv, mavi1, mavi2)
KONUMUNA GÖRE BELİRLENİP EKLENECEK
mask = cv2.erode(mask, None, iterations = 2)
mask = cv2.dilate(mask, None, iterations = 2) set_velocity_body(vehicle,-gnd_speed, 0, 0)
(contours,_) = cv2.findContours(mask.copy(), cv2.RETR_EXTERNAL, elif BURASI UYGULAMA SONRASINDA KAMERA
cv2.CHAIN_APPROX_SIMPLE) KONUMUNA GÖRE BELİRLENİP EKLENECEK
center = None set_velocity_body(vehicle, 0, -gnd_speed, 0)
if len(contours) > 0: elif BURASI UYGULAMA SONRASINDA KAMERA
c = max(contours, key = cv2.contourArea) KONUMUNA GÖRE BELİRLENİP EKLENECEK
rect = cv2.minAreaRect(c)
set_velocity_body(vehicle, 0, gnd_speed, 0)
((x,y), (width,height), rotation) = rect
s = "x: {}, y: {}, width: {}, height: {}, rotation: Drone başlangıç noktasına geri dönüş:
{}".format(np.round(x),np.round(y),np.round(width),np.round(height),np.round(rotation)) vehicle.mode = VehicleMode("RTL")
print(s)
rect1 = cv2.boxPoints(rect)
rect1 = np.int64(rect1)
m = cv2.moments(c)
center = (int(m["m10"]/m["m00"]), int(m["m01"]/m["m00"]))
cv2.drawContours(img1, [rect1], 0, (0,0,255),3)
cv2.circle(img1, center, 5, (255,255,255),-1)
cv2.putText(img1, s, (25,50), cv2.FONT_HERSHEY_COMPLEX_SMALL, 1,
(255,255,255), 2)
ddq.appendleft(center)
for i in range(1, len(ddq)):
if ddq[i-1] is None or ddq[i] is None: continue
cv2.line(img1, ddq[i-1], ddq[i],(0,255,255),1)
cv2.imshow("Orijinal Tespit",img1)
if cv2.waitKey(1) & 0xFF == ord("q"): break
EK-5
arm_and_takeoff(1)
import RPi.GPIO as GPIO
from time import sleep
GPIO.setmode(GPIO.BOARD)
Motor1A = 16
Motor1B = 18
Motor1E = 22
GPIO.setup(Motor1A,GPIO.OUT)
GPIO.setup(Motor1B,GPIO.OUT)
GPIO.setup(Motor1E,GPIO.OUT)
Print“Ileri hareket”
GPIO.output(Motor1A,GPIO.HIGH)
GPIO.output(Motor1B,GPIO.LOW)
GPIO.output(Motor1E,GPIO.HIGH)
sleep(2)
Print“Gerihareket”
GPIO.output(Motor1A,GPIO.LOW)
GPIO.output(Motor1B,GPIO.HIGH)
GPIO.output(Motor1E,GPIO.HIGH)
sleep(2)
print “Motor durdu”
GPIO.output(Motor1E,GPIO.LOW)
GPIO.cleanup()

Test
Test Plan Name Drone Unit Tests Iden 5.1.
tifica
tion
Num
ber:
Unit tests and results of all sub-elements in the cargo WhiteBox
drone system ☒
Definition Type Black box

Experiment Performer
Project team Date

Hardware Version Hour


Information on the setup Cargo Drone subunits
No Step

Action Expected Result Comments


UD
G

Engines to be able to Engines run at full power and tested at


Efficient handle the total weight maximum weight.
01
operation of

engines
Raspberyy pi
Raspberry Pi Raspberry installation has been
installation
02 operating
should result in ✓ successfully completed. Control card,
camera and GPS modules can be added.
success
The camera
Camera-GPS
03
module
should be able to ✓ Camera operation has been observed and
be turned on and GPS coordinates have been taken at
operation
off and the GPS expected values..
data should give
accurate data.
Code written in the The code worked efficiently and detected
Target
04
recognition
Python program ✓ the object identified as a blue cross from
should work without different angles and distances.
software
errors .
Overall Results ✓
P: Pass; F: Fail; CA: Could not apply

34
Test
Test Plan Name Integration Test-2 Iden 5.2.2. ve 5.2.3.
tifica
tion
Num
ber:

The drone is made ready for flight. Display White Box


Definition connection is provided to Raspberry pi device Type ☒
via HDMI cable. The purpose of this test is to Black Box
test the Cargo Drone's application of the ☐
commands given to it in the python interface
and to verify the data with the screen output.
Experiment
Project team Date
Performer
Hardware Time
Version
Step Np

UD
Action Expected Result Comments
G

Making the Successful take- The drone has correctly performed the
0
drone ready off and landing
✓ ascent / descent commands given to it in the
1
for flight of the drone Python interface. With the help of the meter,
its height was measured and verified with the
desired data.
Direction Correct East / West and North / South movements are
0
al recognition of
✓ defined as X (+ -) and Y (+ -). Their
2
moveme compass movements in these directions were tested and
nts directions and their controls were matched with the compass.
movement
Moveme Accessing the It has completed the movement to the GPS
0
nt to given GPS
✓ location entered. The distance difference is
3
given position compared with the measured GPS data sheet
location data. The margin of error is due to GPS. The
by GPS system is working properly.
Fixing Returning from Memorized the position of the starting point.
0
the the shortest
✓ The position received by the print function
4
starting route to the coincided with the origin position. The return
point and starting point command in the resource library has returned
return assigned as a to the starting point with a tested success.
GPS code
Recognizing the The camera detected the place defined by the
0
Image place
✓ cross by entering the field of view. The drone
5
detection determined with made the determination of the movement in a
and the cross and way to take the vertical position of the cross.
moveme coming to the
nt to the region so that
area the route
determination is
perpendicular
Overall Results ✓
P: Pass; F: Fail; CA: Could not apply

35
Test
Test Plan Name Integration Test-1 Identifi 5.2.1.
cation
Numbe
r:

Includes integration and operation of


Raspberry Pi and Pixhawk-4 control board Type White Box
Definition ☒
Black box ☐

Experiment
Project team Date
Performer

Hardware Version Time


Step No

Action Expected Result Comments


UD
G

Integration of Raspberry Raspberry Pi device is connected to Pixhawk


0
control cards and Pixhawk
✓ control board. Pixhawk-4 driver has been
1
must be able installed on the Raspberry device and the
to receive / connection of the control card hardware is
send signals confirmed on the screen connected for control
to each other. purposes.
Executing Ability to The outputs of the test codes written in Python
0
Python perform
✓ were checked. Confirmation of the printouts
2
tasks software was requested using the If / Print commands.
functions The expected results have been obtained.
Overall ✓
Results
P: Pass; F: Fail; CA: Could not apply

36
Test
Integration Test-3 Iden 5.2.4.
Test Plan Name tifica
tion
Num
ber:

Test of the drone that reaches the cargo drop White Box
Definition area by means of a mechanical arm. Type ☒
Black box

Experiment
Project team Date
Performer
Hardware Version Time
Adım No

Action Expected Result


UD

Comments
G

Descent The drone The drone verifies its location in the Python
0
should verify
✓ interface both in the GPS interface and via the
1
through its camera. With the outputs being "true", it made
software that it the descending movement in a controlled
has reached the manner and reached the desired height level..
coordination
given to it and
begin its landing
motion.
Cargo Cargo arm The drone positioned perpendicular to the
0
handle taking /
✓ cargo on the ground has successfully
2
opening releasing the received / released the cargo.
and 5x5x5 cm load
closing given to it
Overall Results ✓
P: Pass; F: Fail; CA: Could not apply

37
GAZI IS THE FUTURE...

38

You might also like