0% found this document useful (0 votes)
31 views68 pages

Design_and_Implementation_of_a_Quadcopte

The document presents a final report on the design and implementation of a quadcopter platform, detailing its hardware, control system, and flight dynamics. It describes the quadcopter as an unmanned aerial vehicle with four rotors, emphasizing its advantages in vertical takeoff and landing. The report includes technical specifications, control theories, and experimental results related to the quadcopter's performance and design.

Uploaded by

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

Design_and_Implementation_of_a_Quadcopte

The document presents a final report on the design and implementation of a quadcopter platform, detailing its hardware, control system, and flight dynamics. It describes the quadcopter as an unmanned aerial vehicle with four rotors, emphasizing its advantages in vertical takeoff and landing. The report includes technical specifications, control theories, and experimental results related to the quadcopter's performance and design.

Uploaded by

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

‫المركز الوطني للمتميزين‬

National Centre for the Distinguished

Design and Implementation of a Quadcopter platform

Final Report
Presented by: Adnan Saood, Ali Al-Reyahi,
Nada Salman, Sara Habeeb
Date: 2015-2016

1 Abstract
An unmanned aerial vehicle also known as UAV is an unpiloted aircraft, which can be remotely either
operated or flown autonomously, based on pre-programmed flight plans. They are also used in a growing
number of civil applications such as aerial photography and the transport of various goods.
Rotating wing (or helicopter) UAVs have the advantage above fixed wing UAVs in many ways; they are able
to take off and land vertically, making it possible to hover at a fixed point. The design discussed in this
report is based on the development of UAV quad rotor helicopter (Quad Copter), hardware, and control
system and flight dynamics.
The copter is built of electric motor driven rotors, an aluminum and fiberglass frame, an embedded on-
board computer, power distribution system and various sensor units. The hardware platform utilized for
the on board computer was a ATmega2560 microcontroller, with 54 Digital I/O pins, 256KB of Flash
memory, 8KB of SRAM and 4KB of EEPROM.

National Syrian Center for the Distinguished


Table of Contents
1 Abstract .............................................................................. 1
1 Table Of Tables: ................................................................. 3
2 Table Of Figures: ................................................................ 4
3 Table Of Equations: ............................................................ 5
4 Notations and Symbols ........................................................ 6
1 Introduction ....................................................................... 7
5 Body Platform .................................................................... 8
5.1 Dynamic Model ............................................................. 8
6 Control System: ................................................................ 12
6.1 Motors: ....................................................................... 12
6.2 PID control theory: ...................................................... 18
7 Flight Controller: .............................................................. 22
7.1 AVR Microcontroller (Atmega2650): ............................. 22
7.2 MPU 6050: ................................................................. 26
8 Communication: ............................................................... 29
8.1 HC-05 Bluetooth module ............................................. 29
8.2 Features ..................................................................... 30
9 Practical Part: .................................................................... 31
9.1 The connection between the Quadcopter and PC: ........... 31
: ........................................................................................... 32
9.2 Solid works Analysis: .................................................... 33
9.3 PID gains Optimization ................................................ 35
9.4 BLDC Experiments ................................................... 37
9.5 Fiberglass Epoxy Resin Plates Production ................ 40
10 Appendix ....................................................................... 42
10.1 Control System Design for the Final Year Project .......... 42
10.2 Simulation of ARM-Total .......................................... 51
10.3 Simulation Fiberglass Frame ........................................ 58
10.4 Mesh information - Details ......................................... 63
10.5 Programs used in the thesis .......................................... 65
MATLAB ........................................................................... 65
ENDNOTE ....................................................................... 65
CorelDraw.......................................................................... 65
Arduino software IDE 1.6.1 .................................................. 66
SolidWorks 2015 ................................................................. 66
Conclusion ............................................................................ 67

1 Table Of Tables:

Table 1 ................................................................................... 6
Table 2 ................................................................................. 21
Table 3 ................................................................................. 28
Table 4 ................................................................................. 32
Table 5 ................................................................................. 32
Table 6 Data from the experiment ............................................ 39

2 Table Of Figures:
Figure ‎3-1 A model of Quadcopter plus-shape .......................... 11
Figure ‎1-1 Bridge Circuit of Motor Driver ............................... 12
Figure ‎1-2 Three Phase Commutation and Hall Sensor Outputs .. 13
Figure ‎1-3 The back-EMF of PM motors ................................. 13
Figure ‎1-5 Inverter configuration of BLDC motor ..................... 15
Figure ‎1-4 BLDC motor structure and signals............................ 15
Figure ‎2-1 Open Loop Control Method ................................... 17
Figure ‎2-2 Closed Loop Control Method ................................. 18
Figure 1 A PID controller takes control action based on past, present
and prediction of future control errors ...................................... 19
Figure 1 TQFP-pinout ATmega640/1280/2560 ........................ 26
Figure 1 Orientation of Axes of Sensitivity ................................ 29
Figure 2 MPU - 6050 pinout................................................... 29
Figure ‎3-2 the final render....................................................... 34
Figure ‎3-3 Block diagram illustrates components of the control
system in MATLAB SIMULINK ............................................. 35
Figure ‎3-4 Sub-block diagram included in PID(s) block ............. 36
Figure ‎3-5 the whole block diagram of the control system .......... 36
Figure ‎3-6 the experiment setup .............................................. 38
Figure ‎3-7 Thrust according to pulse Time ............................... 39
Figure ‎3-8 parts of the process ................................................. 41

3 Table Of Equations:
Equation 1 quadrotor linear acceleration along x-axis ................. 11
Equation 2 quadrotor linear acceleration along y-axis ................. 11
Equation 3 quadrotor linear acceleration along z-axis ................. 11
Equation 4 quadrotor angular acceleration around x-axis ............ 11
Equation 5 quadrotor angular acceleration around y-axis ............ 11
Equation 6 quadrotor angular acceleration around z-axis ............ 11
Equation 7 control input for the first motor ............................... 11
Equation 8 control input for the second motor .......................... 11
Equation 9 control input for the third motor ............................. 11
Equation 10 control input for the third fourth motor .................. 11
Equation 11 motor thrust equation 37
Equation 12 Line equation .................. 39
Equation 13 slop of the line .......................... 39
4 Notations and Symbols
quadrotor linear position along x-axis
quadrotor linear position along y-axis
quadrotor linear position along z-axis
quadrotor angular position around y-axis (pitch)
quadrotor angular position around x-axis (roll)
quadrotor angular position around z-axis (yaw)
total thrust force
mass of the quadcopter
control input for the first motor
control input for the second motor
control input for the third motor
control input for the fourth motor
body moment of inertia around the x-axis
body moment of inertia around the y-axis
body moment of inertia around the z-axis
Pulse width sent to the first actuator
Pulse width sent to the second actuator
Pulse width sent to the third actuator
Pulse width sent to the fourth actuator
Table 1
1 Introduction
A quad rotor helicopter (quadcopter) is a helicopter that has four equally spaced rotors,
usually arranged at the corners of a square body.
The development of quadcopters has stalled until very recently, because controlling four
independent rotors has proven to be incredibly difficult and impossible without electronic
assistance. The decreasing cost of modern microprocessors has made electronic and even
completely autonomous control of quadcopters feasible for commercial, military, and even
hobbyist purposes.

Quadcopter control is a fundamentally difficult and interesting problem. With six


degrees of freedom (three translational and three rotational) and only four independent
input (rotor speeds), quadcopters are severely under actuated. In order to achieve six
degrees of freedom, rotational and translational motion are coupled. The resulting
dynamics are highly nonlinear, especially after accounting for the complicated aerodynamic
effects. Finally, unlike ground vehicles, helicopters have very little friction to prevent their
motion, so they must provide their own damping in order to stop moving and remain
stable. Together, these factors create a very interesting control problem. A very simplified
model of quadcopter control system and design electronic system for our dynamics will be
presented.
5 Body Platform

5.1 Dynamic Model


The rotation transformation matrix ZYX is used to transform the vector components from
body axes to inertial frame of reference and vice versa as following:

[ ] [ ]

Where:

[ ]

Since is an orthogonal matrix, then

Now using Newton Second law:

( ) [ ]

[ ]

Using to calculate the acceleration vector in inertial frame of reference :

Where is the resultant angular velocity vector due to the three rotations , and
given by:

⃗ [ ] [ ]

Then can be written as:


⃗⃗⃗ [ ]

Equation is also used to get the rate of change of Euler angles as the following:

[ ] [ ][ ]

Rotational equations of motion

⃗⃗⃗⃗ ⃗ ( ⃗)
Now writing the resultant forces:

( ) ( )

( ) ( )
( )

( )
[ ( ) ]
( )

[ ]

So.

( ) ( )
[ ( ) ] [ ( ) ]
( ) ( )

Since:

⃗ ⃗⃗⃗⃗⃗ ⃗ ( ⃗)
( )

( )

( )
[ ]

Which leads us to:

( )

( )

( )

( )

Where

5.1.1 Results of the Dynamical Model:


The Quadcopter is a nonlinear, multivariable and under actuated system of 6DOFs and
only four actuators. In this work, the mathematical model equations of motion are derived
using a full Quadcopter with body axes as shown in Fig. 1. It is assumed that the
Quadcopter and its components are rigid bodies, body mass is concentrated at the center of
gravity and the body axes are the principle axes for the Quadcopter. The aerodynamic
forces and gyroscopic effects are neglected in this study.
𝑥 𝑦

Figure 5-1 A model of Quadcopter plus-shape

Depending on the previous setup the acquiesced equations are:

Equation 1 quadrotor linear acceleration


̈
along x-axis
Equation 2 quadrotor linear acceleration
̈
along y-axis
Equation 3 quadrotor linear acceleration
̈
along z-axis
̈ Equation 4 quadrotor angular acceleration
around x-axis
̈ Equation 5 quadrotor angular acceleration
around y-axis
̈ Equation 6 quadrotor angular acceleration
around z-axis
( ) Equation 7 control input for the first motor

( ) Equation 8 control input for the second


motor
( ) Equation 9 control input for the third motor
( ) Equation 10 control input for the third fourth
motor
6 Control System:
6.1 Motors:
6.1.1 Brushless Direct Current (BLDC) Motors
6.1.1.1 Three Phase Motor Commutation
As compared to Brushed motors, the commutator and brushes in Brushless motors are
replaced by six Transistor/MOSFETs/IGBTs to form three-phase Bridge as shown in fig. 1.
Three phase windings either in Star/Delta fashion is connected in motor with each winding
120 degrees apart. Winding are energized by providing a constant voltage level at the
transistor on one branch of bridge (as indicated by signals PWM A, PWM B& PWM C);

Figure ‎6-1 Bridge Circuit of Motor Driver

while on the other branch the PWM pulses are applied (as indicated by signals PWM ̅,
PWM ̅, & PWM ̅ .

At any time, one winding is connected to positive terminal through upper transistor; one
winding is connected to negative terminal through lower transistor and third winding
connected to ground terminal. The phase sequence at each terminal will be as per fig. 2.

Only two phases are active at a time. Hall-Effect sensors are used to detect the position of
rotor; their outputs will appear at exactly 120 degree apart from each other as per fig. 2.
Figure ‎6-2 Three Phase Commutation and Hall Sensor Outputs

Permanent magnet (PM) motors are synchronous motors that have permanent magnets
mounted on the rotor with armature windings located on the stator. PM motors are
categorized into two types. The first type is referred to as a PM synchronous motor
(PMSM) which has sinusoidal back-EMF as shown in Fig. (3-a). The other type has a
trapezoidal back-EMF and is referred to as the brushless DC (BLDC) motor shown in Fig.
(3-b)(Miller 1994)1.

Figure ‎6-3 The back-EMF of PM motors

In BLDC motor drives, polarity reversal is performed by power transistors switching in


synchronization with the rotor position. Therefore, the BLDC motor has to use either an
internal or external position sensor to detect the actual rotor position. In addition, the rotor

1
Miller, J. R. H. J. a. T. (1994). Design of Brushless Permanent Magnet Motors. Oxford,.
position can be estimated without the need for a position sensor. However, this paper uses
three hall sensors to determine the actual rotor position.

In general, a BLDC motor may use either 60 Deg. or 120 Deg. commutation intervals. In
this paper, a 120-degree conduction interval is used. Fig. 2 shows a schematic of the BLDC
motor and the ideal current waveforms versus position. In addition, the position sensors
outputs are illustrated. Fig.4 shows the ideal phase current in each of the motor windings
and the three-phase inverter, respectively. According to Fig. 4 from the first interval, phase
A will conduct positive DC link current while phase B will conduct negative DC link
current. Phase C will be left open. As a result, only phase A and B are conducting and
phase C is left silent, which means that only two switches (A_H and B_L) are active, while
the rest (A_L, B_H, C_H, and C_L) are inactive.(Nam-Hun Kim 2007)2

During every PWM cycle to achieve this switching scheme, the desired duty cycle is
imposed by the upper switch (A_H) of the two involved switches (A_H and B_L) and the
lower switch (B_L) is kept on (100% duty cycle). Therefore, there is no need for dead time
to be considered for BLDC motors. Because whenever the upper switch is turned on, the
lower switch of the same leg always is already off and vice versa.

2
Nam-Hun Kim, O. Y., Min-Huei Kim (2007). "BLDC Motor Control Algorithm for Industrial
Applications using a General Purpose Processor." Journal of Power Electronics 7(2): 134-135.
Figure ‎6-4 Inverter configuration of BLDC motor

Much of the impetus for the development of brushless D.C. motors came from the
computer peripheral and aerospace industries, where high performance coupled with
reliability and low maintenance are essential.

Figure 6-5 BLDC motor structure and signals

Very large numbers of brushless D.C. motors are now used, particularly in sizes up to a few
hundred watts. The small versions (less than 100 W) are increasingly made with all the
control and power electronic circuits integrated at one end of the motor, so that they can
be directly retrofitted as a replacement for a conventional D.C. motor. Because all the heat
dissipating circuits are on the stator, cooling is much better than in a conventional motor,
so higher specific outputs can be achieved. The rotor inertia can also be less than that of a
conventional armature, which means that the torque–inertia ratio is better, giving a higher
acceleration. Higher speeds are practicable because there is no mechanical commutator.

In principle, there is no difference between a brushless D.C. motor and the self-
synchronous permanent magnet motor discussed earlier in this chapter. The reader may
therefore be puzzled as to why some motors are described as brushless D.C. while others
are not. In fact, there is no logical reason at all, nor indeed is there any universal definition
or agreed terminology.

Broadly‎ speaking,‎ however,‎ the‎ accepted‎ practice‎ is‎ to‎ restrict‎ the‎ term‎ ‘brushless‎ D.C.
motor’‎ to‎ a‎ particular‎ type‎ of‎ self-synchronous permanent magnet motor in which the
rotor magnets and stator windings are arranged to produce an air-gap flux density wave
which has a trapezoidal shape. Such motors are fed from inverters that produce rectangular
current waveforms, the switch-on being initiated by digital signals from a relatively simple
rotor position sensor. This combination permits the motor to develop a more or less
smooth torque, regardless of speed, but does not require an elaborate position sensor. (In
contrast, many self-synchronous machines have sinusoidal air-gap Welds, and therefore
require more sophisticated position sensing and current profiling if they are to develop
continuous smooth torque.)

The brushless D.C. motor is essentially an inside out electronically commutated D.C.
motor, and can therefore be controlled in the same way as a conventional D.C. motor.
Many brushless motors are used in demanding servo-type applications, where they need to
be integrated with digitally controlled systems. For this sort of application, complete digital
control systems, which provide for torque, speed and position control are available(Hughes
2006)3.

3
Hughes, A. (2006). Electric Motors and Drives Fundamentals, Types and Applications. Great Britain,
Elsevier Ltd.
6.1.2 Methods for Speed Control of Motor
For speed control of BLDC motor using sensor based method, it is required for the
controller to know the rotor position for electronic commutation. Sensor based
commutation method can be implemented in two ways:

1. Open loop
2. Closed loop

6.1.2.1 Open-loop Method


In this method, the actual motor speed is not tracked and hence there is no feed-back
mechanism. Only reference speed is used to control the motor speed by updating PWM
duty cycle. The advantages of this method are simplified control algorithm and lower cost
of implementation. The disadvantage is that accuracy cannot be maintained, as there is no
way to track the actual motor speed.

Figure ‎6-6 Open Loop Control Method

6.1.2.2 Closed-Loop Method


In this method, the actual motor speed is tracked and hence the feedback mechanism is
critical. Here both the reference speed and the actual speed are used to control the motor
speed by updating the PWM duty cycle. The main advantages of this method are the
system stability; minimal disturbances compared to open-loop control and reduced
sensitivity for dynamic load variations.

P controller, PI controller, PD controller and PID controller are the controller types which
can be used in feedback or feed forward systems based on the system requirements. PID
controller is widely implemented in closed-loop type of feedback control system for speed
control of BLDC motors.

P and PD controller is directly proportional to incoming error; hence, a little change in


error can cause system instability.
PI controller is an accurate and provides good system stability i.e. less steady state error
response. Nevertheless, the integral factor in controller takes more iteration to reduce error
to zero.

PID controller is the most reliable, accurate and provides better system stability i.e. less
steady state error response as well as it helps to eliminate incoming error to zero with
minimum iterations.

Figure ‎6-7 Closed Loop Control Method

6.2 PID control theory:


PID control the most common way of using feedback in natural and man-made systems, it
is commonly used in industry, instruments and laboratory equipment. PID controller can
be understood as a controller that takes the present, the past, and the future of the error into
consideration. A proportional– integral–derivative controller (PID controller) is a method
of the control loop feedback. This method is composing of three controllers:

1. Proportional controller (PC).

2. Integral controller (IC).

3. Derivative controller (DC).


Figure 8 A PID controller takes control action based on past, present and prediction of
future control errors

The ideal version of the PID controller is given by the formula:

( ) ( ) ∫ ( )

where u is the control signal and e is the control error (e = r − y). The reference value, r, is
also called the setpoint. The control signal is thus a sum of three terms: a proportional term
that is proportional to the error, an integral term that is proportional to the integral of the
error, and a derivative term that is proportional to the derivative of the error. The
controller parameters are proportional gain kp, integral gain ki and derivative gain kd.4

6.2.1 Basic controller types:


6.2.1.1 PD controller:
In general, it can be said that P controller cannot stabilize higher order processes. For the
first order processes, meaning the processes with one energy storage, a large increase in gain
can be tolerated. Proportional controller can stabilize only first order unstable process.
Changing controller gain K can change closed loop dynamics. A large controller gain will
result in control system with:

a) Smaller steady state error, i.e. better reference following

4
Honeywell, D. (200). PID Control.
b) Faster dynamics, i.e. broader signal frequency band of the closed loop system and larger
sensitivity with respect to measuring noise.

c) Smaller amplitude and phase margin.

D mode is used when prediction of the error can improve control or when it necessary to
stabilize the system. Often derivative is not taken from the error signal but from the system
output variable. This is done to avoid effects of the sudden change of the reference input
that will cause sudden change in the value of error signal. Sudden change in error signal will
cause sudden change in control output. To avoid that it is suitable to design D mode to be
proportional to the change of the output variable.

PD controller is often used in control of moving objects such are flying and underwater
vehicles, ships, rockets etc. One of the reason is in stabilizing effect of PD controller on
sudden changes in heading variable y(t). Often a "rate gyro" for velocity measurement is
used as sensor of heading change of moving object.

6.2.1.2 PI controller:
PI controller will eliminate forced oscillations and steady state error resulting in operation
of on-off controller and P controller respectively.

However, introducing integral mode has a negative effect on speed of the response and
overall stability of the system. PI controllers are very often used in industry, especially when
speed of the response is not an issue. A control without D mode is used when:

a) fast response of the system is not required

b) large disturbances and noise are present during operation of the process

c) there is only one energy storage in process (capacitive or inductive)

d) there are large transport delays in the system

6.2.2 PID Controller:


PID controller has all the necessary dynamics: fast reaction on change of the controller
input (D mode), increase in control signal to lead error towards zero (I mode) and suitable
action inside control error area to eliminate oscillations (P mode).

Derivative mode improves stability of the system and enables increase in gain K and
decrease in integral time constant Ti, which increases speed of the controller response.
PID controller is used when dealing with higher order capacitive processes (processes with
more than one energy storage) when their dynamic is not similar to the dynamics of an
integrator (like in many thermal processes). PID controller is often used in industry, but also
in the control of mobile objects (course and trajectory following included) when stability
and precise reference following are required. Conventional autopilot is for the most part
PID type controllers.5

6.2.3 Effects Of PID Parameters:


Characteristics of the closed-loop step response:

1. Rise Time: the time it takes for the plant output y to rise beyond 90% of the desired
level for the first time.

2. Overshoot: how much the peak level is higher than the steady state, normalized against
the steady state.

3. Settling Time: the time it takes the system to converge to its steady state.

4. Steady-state Error: the difference between the Steady-state output and the desired
output6

Response: Rise Time Overshoot Settling Steady-


Time state Error
KP Decrease Increase NT7 Decrease
KI Decrease Increase Increase Eliminate
KD NT Decrease Decrease NT

Table 2

5
ARI, K., et al. PI, PD, PID CONTROLLERS, MIDDLE EAST TECHNICAL UNIVERSITY
ELECTRICAL & ELECTRONICS ENGINEERING.

6
Zhong, J. (2006). PID Controller Tuning.

7
NT: No definite trend. Minor change.
6.2.4 PID Tuning Methods
Tuning is adjustment of control parameters to the optimum values for the desired control
response. Stability is a basic requirement. However, different systems have different
behavior, different applications have different requirements, and requirements may conflict
with one another.

PID tuning is a difficult problem, even though there are only three parameters and in
principle is simple to describe, because it must satisfy complex criteria within the limitations
of PID control. There are accordingly various methods for loop tuning, some of them8:

6.2.4.1 Manual Tuning Method:


In manual tuning method, parameters are adjusted by watching system responses. Kp, Ki,
Kd are changed until desired or required system response is obtained. Although this
method is simple, it should be used by experienced personal.

6.2.4.2 Ziegler–Nichols tuning method:


This method was introduced by John G. Ziegler and Nathaniel B. Nichols in the 1940s.
The Ziegler-Nichols’‎closed‎loop‎method‎is‎based‎on‎experiments‎executed‎on‎an‎
established control loop (a real system or a simulated system).

6.2.4.3 PID Tuning Software:


There is some prepared software that they can easily calculate the gain parameter. Any
kind of theoretical methods can be selected in some these methods.

Some Examples:

MATLAB Simulink PID Controller Tuning.

BESTune, Exper Tune etc.

7 Flight Controller:
7.1 AVR Microcontroller (Atmega2650):
7.1.1 Features:
•‎High‎Performance,‎Low‎Power‎Atmel®‎AVR®‎8-Bit Microcontroller

8
ARI, K., et al. PI, PD, PID CONTROLLERS, MIDDLE EAST TECHNICAL UNIVERSITY
ELECTRICAL & ELECTRONICS ENGINEERING.
•‎Advanced‎RISC‎Architecture

– 135 Powerful Instructions – Most Single Clock Cycle Execution

– 32‎×‎8‎General‎Purpose‎Working‎Registers

– Fully Static Operation

– Up to 16 MIPS Throughput at 16MHz

– On-Chip 2-cycle Multiplier

•‎High‎Endurance‎Non-volatile Memory Segments

– 64K/128K/256KBytes of In-System Self-Programmable Flash

– 4Kbytes EEPROM

– 8Kbytes Internal SRAM

– Write/Erase Cycles:10,000 Flash/100,000 EEPROM

– Data retention: 20 years at 85 C/ 100 years at 25 C

– Optional Boot Code Section with Independent Lock Bits

•‎In-System Programming by On-chip Boot Program

•‎True‎Read-While-Write Operation

– Programming Lock for Software Security

•‎Endurance:‎Up‎to‎64Kbytes‎Optional‎External‎Memory‎Space‎•‎Atmel®‎QTouch®‎
library support

– Capacitive touch buttons, sliders and wheels

– QTouch and QMatrix acquisition

– Up to 64 sense channels

•‎JTAG‎(IEEE®‎std.‎1149.1‎compliant)‎Interface

– Boundary-scan Capabilities According to the JTAG Standard

– Extensive On-chip Debug Support


– Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG Interface

•‎Peripheral‎Features

– Two 8-bit Timer/Counters with Separate Prescaler and Compare Mode

– Four 16-bit Timer/Counter with Separate Prescaler, Compare- and Capture Mode

– Real Time Counter with Separate Oscillator

– Four 8-bit PWM Channels

– Six/Twelve PWM Channels with Programmable Resolution from 2 to 16 Bits

(ATmega1281/2561, ATmega640/1280/2560)

– Output Compare Modulator

– 8/16-channel, 10-bit ADC (ATmega1281/2561, ATmega640/1280/2560)

– Two/Four Programmable Serial USART (ATmega1281/2561, ATmega640/1280/2560)

– Master/Slave SPI Serial Interface

– Byte Oriented 2-wire Serial Interface

– Programmable Watchdog Timer with Separate On-chip Oscillator

– On-chip Analog Comparator

– Interrupt and Wake-up on Pin Change

•‎Special‎Microcontroller‎Features

– Power-on Reset and Programmable Brown-out Detection

– Internal Calibrated Oscillator

– External and Internal Interrupt Sources

– Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby, and
Extended Standby.

•‎I/O‎and‎Packages.

– 54/86 Programmable I/O Lines (ATmega1281/2561, ATmega640/1280/2560).


– 64-pad QFN/MLF, 64-lead TQFP (ATmega1281/2561)

– 100-lead TQFP, 100-ball CBGA (ATmega640/1280/2560)

– RoHS/Fully Green.

•‎Temperature‎Range:

– -40 C to 85 C Industrial

•‎Ultra-Low Power Consumption

– Active Mode: 1MHz, 1.8V: 500μA

– Power-down Mode: 0.1μA at 1.8V

•‎Speed‎Grade:

– ATmega640V/ATmega1280V/ATmega1281V:

•‎0‎- 4MHz @ 1.8V - 5.5V, 0 - 8MHz @ 2.7V - 5.5V

– ATmega2560V/ATmega2561V:

•‎0‎- 2MHz @ 1.8V - 5.5V, 0 - 8MHz @ 2.7V - 5.5V

– ATmega640/ATmega1280/ATmega1281:

•‎0‎- 8MHz @ 2.7V - 5.5V, 0 - 16MHz @ 4.5V - 5.5V

– ATmega2560/ATmega2561:

•‎0‎- 16MHz @ 4.5V - 5.5V9

9
.)4102( ATmega640/V-1280/V-1281/V-2560/V-2561/V [DATASHEET], Atmel.®
Figure 10 TQFP-pinout ATmega640/1280/2560

7.2 MPU 6050:


The MPU-60X0‎is‎the‎world’s‎first‎integrated‎6-axis MotionTracking device that
combines a 3-axis gyroscope, 3-axis accelerometer, and a Digital Motion Processor™‎
(DMP) all in a small 4x4x0.9mm package. With its dedicated I2C sensor bus, it directly
accepts inputs from an external 3-axis compass to provide a complete 9-axis
MotionFusion™‎output.‎The‎MPU-60X0 MotionTracking device, with its 6-axis
integration, on-board‎MotionFusion™,‎and‎run-time calibration firmware, enables
manufacturers to eliminate the costly and complex selection, qualification, and system level
integration of discrete devices. The MPU-60X0 is also designed to interface with multiple
non-inertial digital sensors, such as pressure sensors, on its auxiliary I2C port.10

7.2.1 Features:
7.2.1.1 Gyroscope Features

The triple-axis MEMS gyroscope in the MPU-60X0 includes a wide range of features:

" . MPU-6050 accelerometer+gyro".


10
 Digital-output X-, Y-, and Z-Axis angular rate sensors (gyroscopes) with a user-
programmable full-scale‎range‎of‎±250,‎±500,‎±1000,‎and‎±2000°/sec‎
 External sync signal connected to the FSYNC pin supports image, video and GPS
synchronization
 Integrated 16-bit ADCs enable simultaneous sampling of gyros
 Enhanced bias and sensitivity temperature stability reduces the need for user
calibration
 Improved low-frequency noise performance
 Digitally-programmable low-pass filter
 Gyroscope operating current: 3.6mA
 Standby current: 5μA
 Factory calibrated sensitivity scale factor
 User self-test

7.2.1.2 Accelerometer Features:


The triple-axis MEMS accelerometer in MPU-60X0 includes a wide range of
features:
 Digital-output triple-axis accelerometer with a programmable full scale range of
±2g,‎±4g,‎±8g and‎±16g
 Integrated 16-bit ADCs enable simultaneous sampling of accelerometers while
requiring no external multiplexer
 Accelerometer normal operating current: 500μA
 Low power accelerometer mode current: 10μA at 1.25Hz, 20μA at 5Hz, 60μA at
20Hz, 110μA at 40Hz
 Orientation detection and signaling
 Tap detection
 User-programmable interrupts
 High-G interrupt
 User self-test
7.2.2 MotionProcessing
 Internal‎Digital‎Motion‎Processing™‎(DMP™)‎engine‎supports‎3D‎
MotionProcessing and gesture recognition algorithms
 The MPU-60X0 collects gyroscope and accelerometer data while synchronizing
data sampling at a user defined rate. The total dataset obtained by the MPU-60X0
includes 3-Axis gyroscope data, 3-Axis accelerometer data, and temperature data.
The‎MPU’s‎calculated output to the system processor can also include heading data
from a digital 3-axis third party magnetometer.

Pin MPU-
Pin name Pin description
number 6050
Optional external reference clock input. Connect to
1 Y CLKIN
GND if unused.
I2C master serial data, for connecting to external
6 Y AUX_DA
sensors
I2C Master serial clock, for connecting to external
7 Y AUX_CL
sensors
8 Y /CS SPI chip select (0=SPI mode)
8 VLOGIC Digital I/O supply voltage
I2C Slave Address LSB (AD0); SPI serial data output
9 Y AD0 / SDO
(SDO)
9 AD0 I2C Slave Address LSB (AD0)
10 Y REGOUT Regulator filter capacitor connection
Frame synchronization digital input. Connect to
11 Y FSYNC
GND if unused.
12 Y INT Interrupt digital output (totem pole or open-drain)
13 Y VDD Power supply voltage and Digital I/O supply voltage
18 Y GND Power supply ground
19,20 Y RESV Reserved. Do not connect
20 Y CPOUT Charge pump capacitor connection
22 Y RESV Reserved. Do not connect
23 Y SCL / SCLK I2C serial clock (SCL); SPI serial clock (SCLK)
23 SCL I2C serial clock (SCL)
24 Y SDA / SDI I2C serial data (SDA); SPI serial data input (SDI)
24 SDA I2C serial data (SDA)
2,3,4,5,14, Not internally connected. May be used for PCB
Y NC
15,16,17 trace routing.

Table 3
 The FIFO buffers the complete data set, reducing timing requirements on the
system processor by allowing the processor burst read the FIFO data. After burst

Figure 12 MPU - 6050 pinout Figure 11 Orientation of Axes of Sensitivity

reading the FIFO data, the system processor can save power by entering a low-
power sleep mode while the MPU collects more data.
 Programmable interrupt supports features such as gesture recognition, panning,
zooming, scrolling, tap detection, and shake detection
 Digitally-programmable low-pass filters
 Low-power pedometer functionality allows the host processor to sleep while the
DMP maintains the step count.
7.2.3 Clocking
 On-chip‎timing‎generator‎±1%‎frequency‎variation‎over‎full‎temperature‎range‎
 Optional external clock inputs of 32.768kHz or 19.2MHz

7.2.4 Pin Out and Signal Description

8 Communication:
8.1 HC-05 Bluetooth module

HC-05 module is an easy to use Bluetooth SPP (Serial Port Protocol) module,
designed for transparent wireless serial connection setup. Serial port Bluetooth module is
fully qualified Bluetooth V2.0+EDR (Enhanced Data Rate) 3Mbps Modulation with
complete 2.4GHz radio transceiver and baseband. It has the footprint as small as
12.7mmx27mm.11

11
(2010). HC-05 -Bluetooth to Serial Port Module.
8.2 Features
8.2.1 Hardware Features

 Typical -80dBm sensitivity


 Up to +4dBm RF transmit power
 Low Power 1.8V Operation ,1.8 to 3.6V I/O
 PIO control
 UART interface with programmable baud rate
 With integrated antenna
 With edge connector

8.2.2 Software Features12

 Default Baud rate: 38400, Data bits: 8, Stop bit: 1, Parity: No parity, Data control: has.
 Supported baud rate: 9600,19200,38400,57600,115200,230400,460800.
 Given a rising pulse in PIO0, device will be disconnected.
 Status instruction port PIO1: low-disconnected, high-connected;
 PIO10 and PIO11 can be connected to red and blue led separately. When master and slave
are paired, red and blue led blinks 1time/2s in interval, while disconnected only blue led
blinks 2times/s.
 Auto-connect to the last device on power as
default.
 Permit pairing device to connect as default.
 Auto-pairing‎PINCODE:”0000”‎as‎default‎
 Auto-reconnect in 30 min when disconnected as
a result of beyond the range of connection.
 Maximum (Outdoor) Range (Meters): 10 (class
2), 100 (class 1)
 IEEE Standard: 802.15.1

Figure 1 HC-05 Bluetooth module

12
(2014). DATASHEET - BLUETOOTH TO SERIAL PORT MODULE-HC05.
9 Practical Part:
9.1 The connection between the Quadcopter and PC:
9.1.1 Materials and software programs:
 Bluetooth module HC-05.
 Arduino chip.
 Arduino IDE.
 Matlab.

9.1.2 Making a link between HC-05 and PC:


 Go to the Bluetooth icon. Right click and select (Add a Device).
 Search for new device, Bluetooth module will appear as HC-05, and add it.
 The pairing code will be 1234.
 After make a pairing, we can program the Arduino and upload a sketch to send or
receive data from Computer.

9.1.3 communicating between Arduino and computer:


We use Matlab to send and receive data between Arduino and computer.

9.1.3.1 Matlab commands:


Command Property Description
B = Bluetooth('Remote Use to specify a channel if the device has channels. If none
Channel
Name', Channel); is provided, it defaults to 0.
"Friendly name" for the Bluetooth device. For example, in
the case of an iPhone, it might be simply 'iPhone' or a
name like 'Zor'.
Remote Name
This property is a string and can be empty. If it is empty,
you must use the Remote ID to communicate with the
device.
Internal ID of the Bluetooth device, equivalent to the
Device ID. This is usually a 12-digit string that starts with
btspp://. For example, 'btspp://0016530FD65F'
Remote ID
This property is a string and every device has one. You
can use this or the Remote Name to communicate with
the device.

Table 4

Command Property Description


fopen (B);
B (obj) An interface object or an array of interface objects.

fclose (B); B (obj) An interface object or an array of interface objects.

fprintf (B , 'cmd' ); B (obj) An interface object.

'cmd' The string written to the instrument.

Table 5
:
9.2 Solid works Analysis13:
The Solid works software was used for mechanical and static data acquisition about
two different designs; the first one is estimated to be made of E-Fiberglass Epoxy Resin and
the second one of Plexi.

9.2.1 Plexi Frame


This table represents a part of the Plexi frame, and it was analyzed statically, for
further information please refer to the appendix

Model name: ARM-Total


Current Configuration: Default
Solid Bodies
Document Name and Treated As Volumetric Properties Document
Reference Path/Date Modified
Scale1 Mass:0.0285035 kg
Volume:2.65859e-005
m^3
Nov 06 20:53:07
Solid Body Density:1272.13
2015
kg/m^3
Weight:0.279334 N

13
For more details, reports of the static study are in the appendix
Figure ‎0-1 the final render

9.2.2 Fiber Glass Frame:


The second design was done depending on that we are going to make it from E-Fiberglass
epoxy resin

Model name: kham - WD


Current Configuration: Default
Solid Bodies
Document Name and Treated As Volumetric Properties Date Modified
Reference
Boss-Extrude2 Solid Body Volume:4.11409e-005 Jan 29 23:40:51 2016
m^3

9.3 PID gains Optimization


Feedback control is a control mechanism that uses information from measurements.
In a feedback control system, the output is sensed. A PID is widely used in feedback control
of industrial processes. A proportional-integral-derivative controller (PID Controller) is a
method of a control loop feedback.

The optimization was accomplished using MATLAB SIMULINK™; a transfer function


was first acquiesced out of the Dynamical model, then an implementation process occurs to
the components of the control system which is briefly explained in the figure (2):

Figure ‎0-2 Block diagram illustrates components of the control system in MATLAB
SIMULINK

Mentioning that the GOTO2 block is routing the signal to a SCOPE, and the
( ) Block is replacing this block diagram
Figure ‎0-3 Sub-block diagram included in PID(s) block

Then it was simulated in the same software for making sure out of the results:

Figure ‎0-4 the whole block diagram of the control system

For further and more detailed information please refer to appendix (1).
9.4 BLDC Experiments
9.4.1 Measuring BLDC motor gain:
The angular velocity cannot be controlled directly in contrast with PWM signal,
thus a relation between the PWM signal and the motor thrust force is required, so it is
assumed that:

Equation 11 motor thrust equation

Where PWM is in (𝜇 sec.), is the motor constant that relates the motor thrust
force with , and its value is obtained from this experiment.

9.4.2 Equipment:
1. Two EMAX MT2213 920kv Brushless Motors (1045 Combo).
2. Two ESCs (Electronic Speed Controller).
3. Two‎Propeller‎“Plastic‎propeller‎1045”.
4. Balance.
5. Metal tool.
6. Power‎supply‎“220v‎AC-11.1v‎DC”.
7. Arduino‎“MEGA‎2650”.
8. Electrical Wires.
9. A rectangular piece of wood
10. A metal base.
11. AVO meter.

9.4.3 Objectives:
1. Checking the nominal motor max thrust.
2. Measuring‎ the‎ motor’s‎ gain‎ which‎ converts‎ pulse‎ width‎ (microseconds)‎ to‎ thrust‎
(Newton).
Figure 0-5 the experiment setup

9.4.4 Results:

Thrust Amperage
Double Thrust (g) Thrust (g) Pulse width ( )
( ) ( )
56 28 0.274586 100 0.311
109 54.5 0.534462 150 0.538
167 83.5 0.818855 200 0.812
224 112 1.098345 250 1.118
285 142.5 1.397448 300 1.451
348 174 1.706357 350 1.81
388 194 1.90249 400 2.133
440 220 2.157463 450 2.447
483 241.5 2.368306 500 2.811
525 262.5 2.574246 550 3.15
576 288 2.824315 600 3.6
640 320 3.138128 650 4.16
710 355 3.481361 700 4.8
760 380 3.726527 750 5.59
833 416.5 4.08447 800 6.34
886 443 4.344346 850 7.1
930 465 4.560092 900 7.57
942 471 4.618932 950 7.6

Table 6 Data from the experiment

BLDC Motor Gain


6

5 y = 0.0053x - 0.2259

4
Thrust (N)

0
0 100 200 300 400 500 600 700 800 900 1000
Pulse Time (μs)

Practical
Theoritical Theoritical
Linear (Theoritical)

Figure ‎0-6 Thrust according to pulse Time

It is possible to obtain the equation of the line, which represents the theoretical
values by using Excel 2013 program, and then calculate the slope from equation.

Equation 12 Line equation

Equation 13 slop of the line

From above results, it can be noticed the motor constant that relates the motor
thrust force with is slope of the line, which is 0.0052.
9.5 Fiberglass Epoxy Resin Plates Production
9.5.1 Introduction:
Hand lay-up process is the simplest and oldest open molding method of the
composite fabrication processes. It is a low volume, labor-intensive method suited
especially for large components, such as boat hulls. Glass or other reinforcing mat or woven
fabric or roving is positioned manually in the open mold, and resin is poured, brushed, or
sprayed over and into the glass plies. Entrapped air is removed manually with squeegees or
rollers to complete the laminates structure. Room temperature curing polyesters and
epoxies are the most commonly used matrix resins. Curing is initiated by a catalyst in the
resin system, which hardens the fiber-reinforced resin composite without external heat. For
a high quality part surface, a pigmented gel coat is first applied to the mold surface.
In order to make the Fiber Glass frame‎that‎was‎analyzed‎using‎Solid‎Work™‎software,‎A‎
Hand lay-up process was used.

9.5.2 Materials:
1- 20 layers of fiberglass (the dimensions of a layer are (16*100) cm.
2- Epoxy (98) g.
3- Hardener (42.23).
4- Place: Materials Science Lab in the High Institute for Applied Science and
Technology.

9.5.3 Steps:
1. Mix the Epoxy with the Hardener until it become a fluid homogeneous
(clear/crystal) liquid.
2. Put (28.046) g of the liquid on a fiberglass layer and let it absorb it.
3. Put another layer on the top of the last one and perform hand lay-up process.
4. Redo these steps until we have 5 fiberglass layers that linked by a combination of
Epoxy and Hardener.
5. Leave the layers until it solidify.
Figure 0-7 parts of the process
10 Appendix

10.1 Control System Design for the Final Year Project

Design Description

National Syrian Center for the Distinguished

Fifth Generation

A.Reahi, N.Salman, S.Habeeb, A.Saood

Published 07-Apr-2016 17:52:46

For Initial Report


10.1.1 Model Version

Version: 1.5
Last modified: Mon Apr 04 09:26:14 2016
Checksum: 1291566556 2106039442 2373603144 398579625

10.1.2 Root System

Figure 2-1. irace

43
10.1.3 Subsystems
10.1.3.1 3.1. PID angle Block

10.1.4 System Design Variables


10.1.4.1 Design Variable Summary

Vari Parent Blocks Size Byte Clas Value


able s s
Na
me

Thru Constant3 [Error! 1x1 8 doub 1500


st Bookmark not le
defined.]

d PID angle [Error! 1x1 8 doub 663.5192

44
Bookmark not le
defined.]
PID angle1 [Error!
Bookmark not
defined.]

i PID angle [Error! 1x1 8 doub 62.8976


Bookmark not le
defined.]
PID angle1 [Error!
Bookmark not
defined.]

p PID angle [Error! 1x1 8 doub 2.8891e+03


Bookmark not le
defined.]
PID angle1 [Error!
Bookmark not
defined.]

10.1.4.2 Design Variable Details

Thrust. 1500
Used by Blocks:
• irace/Constant3 [Error! Bookmark not defined.]

Resolved in: base workspace


d. 663.5192
Used by Blocks:
• irace/PID angle [Error! Bookmark not defined.]
• irace/PID angle1 [Error! Bookmark not defined.]

Resolved in: base workspace


i. 62.8976

45
Used by Blocks:
• irace/PID angle [Error! Bookmark not defined.]
• irace/PID angle1 [Error! Bookmark not defined.]

Resolved in: base workspace


p. 2.8891e+03
Used by Blocks:
• irace/PID angle [Error! Bookmark not defined.]
• irace/PID angle1 [Error! Bookmark not defined.]

Resolved in: base workspace

10.1.5 Glossary14

Atomic Subsystem. A subsystem treated as a unit by an implementation of


the design documented in this report. The implementation computes the
outputs of all the blocks in the atomic subsystem before computing the next
block in the parent system's block execution order (sorted list).
Block Diagram. A Simulink block diagram represents a set of simultaneous
equations that relate a system or subsystem's inputs to its outputs as a
fuenction of time. Each block in the diagram represents an equation of the
form ( ) where t is the current time, u is a block input, y is a
block output, and x is a system state (see the Simulink documentation for
information on the functions represented by the various types of blocks that
make up the diagram). Lines connecting the blocks represent dependencies
among the blocks, i.e., inputs whose current values are the outputs of other
blocks. An implementation of a design described in this document computes
a root or atomic system's outputs at each time step by computing the outputs
of the blocks in an order determined by block input/output dependencies.
Block Parameter. A variable that determines the output of a block along
with its inputs, for example, the gain parameter of a Gain block.

14
Some of the mentioned sections in this chapter are removed for the needs of abbreviation

46
Block Execution Order. The order in which Simulink evaluates blocks
during simulation of a model. The block execution order determined by
Simulink ensures that a block executes only after all blocks on whose outputs
it depends are executed.
Checksum. A number that indicates whether different versions of a model
or atomic subsystem differ functionally or only cosmetically. Different
checksums for different versions of the same model or subsystem indicate
that the versions differ functionally.
Design Variable. A symbolic (MATLAB) variable or expression used as the
value of a block parameter. Design variables allow the behavior of the model
to be altered by altering the value of the design variable.
Signal. A block output, so-called because block outputs typically vary with
time.
Virtual Subsystem. A subsystem that is purely graphical, i.e., is intended to
reduce the visual complexity of the block diagram of which it is a subsystem.
An implementation of the design treats the blocks in the subsystem as part of
the first nonvirtual ancestor of the virtual subsystem (see Atomic Subsystem).

10.1.6 Chapter 8. About this Report


10.1.6.1 Report Overview

This report describes the design of the irace system. The report was
generated automatically from a Simulink model used to validate the design.
It contains the following sections:
Model Version. Specifies information about the version of the model from
which this design description was generated. Includes the model checksum,
a number that indicates whether different versions of the model differ
functionally or only cosmetically. Different checksums for different versions
indicate that the versions differ functionally.
Root System. Describes the design's root system.
Subsystems. Describes each of the design's subsystems.

47
Design Variables. Describes system design variables, i.e., MATLAB
variables and expressions used as block parameter values.
System Model Configuration. Lists the configuration parameters, e.g.,
start and stop time, of the model used to simulate the system described by
this report.
Requirements Traceability. Shows design requirements associated with
elements of the design model. This section appears only if the design model
contains requirements links.
Glossary. Defines Simulink terms used in this report.
10.1.6.2 Root System Description

This section describes a design's root system. It contains the following


sections:
Diagram. Simulink block diagram that represents the algorithm used to
compute the root system's outputs.
Description. Description of the root system. This section appears only if
the model's root system has a Documentation property or a Doc block.
Interface. Name, data type, width, and other properties of the root system's
input and output signals. The number of the block port that outputs the
signal appears in angle brackets appended to the signal name. This section
appears only if the root system has input or output ports.
10.1.6.3 Subsystem Descriptions

This section describes a design's subsystems. Each subsystem description


contains the following sections:
Checksum. This section appears only if the subsystem is an atomic
subsystem. The checksum indicates whether the version of the model
subsystem used to generate this report differs functionally from other
versions of the model subsystem. If two model checksums differ, the
corresponding versions of the model differ functionally.
Diagram. Simulink block diagram that graphically represents the algorithm
used to compute the subsystem's outputs.

48
Description. Description of the subsystem. This section appears only if the
subsystem has a Documentation property or contains a Doc block.
Interface. Name, data type, width, and other properties of the subsystem's
input and output signals. The number of the block port that outputs the
signal appears in angle brackets appended to the signal name. This section
appears only if the subsystem is atomic and has input or output ports.
Blocks. Blocks that this subsystem contains. This section has two
subsections:
• Parameters. Key parameters of blocks in the subsystem. This section also
includes graphical and/or tabular representations of lookup table data used
by lookup table blocks, blocks that use lookup tables to compute their
outputs.
• Block Execution Order. Order in which the subsystem's blocks must be
executed at each time step in order to ensure that each block's inputs are
available when the block executes .This section appears only if the
subsystem is atomic.
State Charts. Describes state charts used in the subsystem. This section
appears only if the root system contains Stateflow blocks.
10.1.6.4 State Chart Descriptions

This section describes the state machines used by Stateflow blocks to


compute their outputs, i.e., Stateflow blocks. Each state machine description
contains the following sections:
States. Describes the state machine's states. Each state description includes
the state's diagram and diagrams and/or descriptions of graphical functions,
Simulink functions, truth tables, and MATLAB functions parented by the
state.
Transitions. Transitions between the state machine's states. Each transition
description specifies the values of key transition properties. Appears only if a
transition has properties that do not appear on the chart.
Junctions. Transition junctions. Each junction description specifies the
values of key junction properties. Appears only if a junction has properties
that do not appear on the chart.

49
Events. Events that trigger state transitions. Each event description specifies
the values of key event properties.
Targets. Executable implementations of the state machine used to compute
the outputs of the corresponding Stateflow block.
MATLAB Supporting Functions. List of functions invoked by
MATLAB functions defined in the chart.

50
10.2 Simulation of ARM-Total

Date: Thursday, April 07, 2016


Designers:
Adnan Saood, A.Ryahi, S.Habeeb,
N.Salman
Study name: Static 1
Analysis type: Static

51
10.2.1 Model Information

Model name: ARM-Total


Current Configuration: Default
Solid Bodies
Document Name and Treated Volumetric Document
Reference As Properties Path/Date
Modified
Scale1 Mass:0.0285035
kg
Volume:2.65859e
-005 m^3
Solid Nov 06 20:53:07
Density:1272.13
Body 2015
kg/m^3
Weight:0.279334
N

52
10.2.2 Study Properties
Study name Static 1
Analysis type Static
Mesh type Solid Mesh
Thermal Effect: On
Thermal option Include temperature loads
Zero strain temperature
Include fluid pressure effects from Off
SOLIDWORKS Flow Simulation
Solver type FFEPlus
In plane Effect: Off
Soft Spring: Off
Inertial Relief: Off
Incompatible bonding options Automatic
Large displacement Off
Compute free body forces On
Friction Off
Use Adaptive Method: Off

10.2.3 Units
Unit system: ( )
Length/Displacement
Temperature
Angular velocity
Pressure/Stress

53
10.2.4 Material Properties
Model Reference Properties Comp
onents
Name: ABS PC Solid
Model type: Linear Elastic Body
Isotropic 1
Default failure Unknown (Scale
criterion: 1)
Tensile strength: 4e+007 N/m^2
Elastic modulus: 2.41e+009 N/m^2
Poisson's ratio: 0.3897
Mass density: 1070 kg/m^3
Shear modulus: 8.622e+008
N/m^2

54
10.2.5 Loads and Fixtures
Fixture name Fixture Image Fixture Details
Fixed-1 Entities: 4 face(s)
Type: Fixed Geometry

Resultant Forces
Components
Reaction force( )
Reaction
Moment( )

Load name Load Image Load Details


Force-1 Entities: 1 face(s)
Type: Apply normal force
Value: 3 N

55
10.2.6 Mesh information
Mesh type Solid Mesh
Mesher Used: Standard mesh
Automatic Transition: Off
Include Mesh Auto Loops: Off
Jacobian points 4 Points
Element Size 3.15798 mm
Tolerance 0.157899 mm
Mesh Quality High
Remesh failed parts with incompatible mesh Off
Total Elements 9367

10.2.6.1 Mesh information - Details


Total Nodes
Maximum Aspect Ratio
% of elements with Aspect Ratio < 3
% of elements with Aspect Ratio > 10
Time to complete mesh(HH-MM-SS):
Computer name: SANA-PC

56
10.2.7 Resultant Forces
10.2.7.1 Reaction forces
Selection set Units Sum X Sum Y Sum Z Resultant
Entire Model N -7.4029e- 0.999978 9.90927e-006 0.999978
005

10.2.8 Conclusion
From the static study above, we can see that theoretically we are able to use it.

57
10.3 Simulation Fiberglass Frame

Date: Thursday, April 07, 2016


Designer: A.Saood, N.Salman,
A.Reyahi, S.Habeeb
Study name: Static 2
Analysis type: Static

10.3.1 Description
This study was made using Solid works
software to aid us decide the optimized frame
for the drone.

58
10.3.2 Model Information

Model name: kham - WD


Current Configuration: Default
Solid Bodies
Document Name and Treated As Volumetric Properties Date
Reference Modifi
ed
Boss-Extrude2 Solid Body Mass:0.0440208 kg Jan 29
Volume:4.11409e-005 23:40:5
m^3 1 2016
Density:1070 kg/m^3
Weight:0.431404 N

59
10.3.3 Study Properties
Study name Static 1
Analysis type Static
Mesh type Solid Mesh
Thermal Effect: On
Thermal option Include temperature loads
Zero strain temperature 298 Kelvin
Include fluid pressure effects from Off
SOLIDWORKS Flow Simulation
Solver type FFEPlus
Inplane Effect: Off
Soft Spring: Off
Inertial Relief: Off
Incompatible bonding options Automatic
Large displacement Off
Compute free body forces On
Friction Off
Use Adaptive Method: Off
Result folder SOLIDWORKS document
(C:\Users\SANA\Desktop\ready to
print\new 508\sketch\kham dad)

10.3.4 Units
Unit system: SI (MKS)
Length/Displacement mm
Temperature Kelvin
Angular velocity Rad/sec
Pressure/Stress N/m^2

60
10.3.5 Material Properties
Model Reference Properties Compone
nts
Name: ABS PC Solid
Model type: Linear Elastic Body
Isotropic
Default failure Unknown
criterion:
Tensile strength: 4e+007 N/m^2
Elastic modulus: 2.41e+009 N/m^2
Poisson's ratio: 0.3897
Mass density: 1070 kg/m^3
Shear modulus: 8.622e+008 N/m^2
Curve Data:N/A

61
10.3.6 Loads and Fixtures
Fixture name Fixture Image Fixture Details
Fixed-1 Entities: 3 face(s)
Type: Fixed
Geometry

Resultant Forces
Resultan
Components X Y Z
t
Reaction force(N) 0.00118327 15.9832 -0.0031743 15.9832
Reaction
0 0 0 0
Moment(N.m)

Load name Load Image Load Details


Force-1 Entities: 4 face(s)
Type: Apply normal
force
Value: 4 N

62
10.3.7 Mesh information
Mesh type Solid Mesh
Mesher Used: Standard mesh
Automatic Transition: Off
Include Mesh Auto Loops: Off
Jacobian points 4 Points
Element Size 4.25784 mm
Tolerance 0.212892 mm
Mesh Quality High

10.4 Mesh information - Details


Total Nodes 17809
Total Elements 8116
Maximum Aspect Ratio 8.655
% of elements with Aspect Ratio < 3 87.7
% of elements with Aspect Ratio > 10 0
% of distorted elements(Jacobian) 0
Time to complete mesh(hh;mm;ss): 00:00:05
Computer name: SANA-PC

63
10.4.1 Resultant Forces
10.4.1.1 Reaction forces
Selection set Units Sum X Sum Y Sum Z Resultant
Entire Model N 0.00118327 15.9832 -0.0031743 15.9832
10.4.1.2 Reaction Moments
Selection set Units Sum X Sum Y Sum Z Resultant
Entire Model N.m 0 0 0 0

64
10.5 Programs used in the thesis
MATLAB
MATLAB (matrix laboratory) is a multi-paradigm numerical computing environment and
fourth-generation programming language. Developed by MathWorks,
MATLAB allows matrix manipulations, plotting of functions and data,
implementation of algorithms, creation of user interfaces, and interfacing
with programs written in other languages, including C, C++, Java, Fortran
and Python. the latest version is R2015a, and was released in March 5,
2015

ENDNOTE
EndNote is a software program that works with Microsoft
Word to automatically format in-text citations and end-of-
paper reference lists with your chosen style (APA, MLA,
Chicago, etc.). EndNote can also be used as a personal database
to gather and store citation records from different information sources. The latest version is
ENDNOTE X7.1.

CorelDraw
CorelDraw is a vector graphics editor developed and marketed by
Corel Corporation of Ottawa, Canada. It is also the name of Corel's
Graphics Suite, which bundles CorelDraw with bitmap-image editor
Corel Photo-Paint as well as other graphics-related programs. The
latest version is designated X7 (equivalent to version 17), and was
released in March 2014. Corel Draw is designed to edit two-
dimensional images such as logos and posters.

65
Arduino software IDE 1.6.1

Arduino software IDE 1.6.1 is an open project written, debugged and


supported by Massimo Banzi, David Cuartielles, Tom Igoe, Gianluca
Martino and David Mellis, based on processing by casey Reas and Ben
Fry.

The Arduino Integrated Development Environment - or Arduino Software (IDE) -


contains a text editor for writing code, a message area, a text console, a toolbar with
buttons for common functions and a series of menus. It connects to the Arduino and
Genuino hardware to upload programs and communicate with them.

SolidWorks 2015

Solidworks‎(or‎DSS‎“Dassault‎Systems‎whis‎is the developper of this


programme”‎solidworks)‎is‎a‎CAD‎software‎helps‎to‎ceat‎2D‎or‎3D‎
solid models without any complexity, faster and in the cost effective
way.The advantage of the solid modeler is thar very easy to use, single
graphic user interface and much more friendly, as compared with other CAD solid
modeling softwares. It contains solid modeling, Motion, Simulation, Toolbox,,
TolAnalyst, Circute works, Photoview 360, ScanTo3D, e-drawings and DWG editor

66
Conclusion:

In this project, a quadcopter has been established. Three aircraft bodies has been done (Fiberglass,
Aluminum and Plexi). We depend on a torque inertia to each one of those bodies to build a
mathematical algorithm that is responsible for the dynamic movement.

The Quadcopter is built of electric motor driven rotors, an embedded on-board computer, power
distribution system and various sensor units. The hardware platform utilized for the on board
computer was a ATmega2560 microcontroller, with 54 Digital I/O pins, 256KB of Flash memory,
8KB of SRAM and 4KB of EEPROM. In addition, we used HC-01 Bluetooth module to
communicate with the copter.

We have finished the main idea of the project – making a balanced quadcopter - . Our next step is
to develop this aircraft and use it in many applications like photographing, spying and monitoring.

67
References:

 Hughes, A. (2006). Electric Motors and Drives Fundamentals, Types and


Applications. Great Britain, Elsevier Ltd.
 (2010). HC-05 -Bluetooth to Serial Port Module.
 (2014). DATASHEET - BLUETOOTH TO SERIAL PORT MODULE-HC05.
 . "MPU-6050 accelerometer+gyro."
 (2013). MPU-6000 and MPU-6050
 (2014). ATmega640/V-1280/V-1281/V-2560/V-2561/V [DATASHEET],
Atmel®.
 (2105). ATmega48A/PA/88A/PA/168A/PA/328/P [DATASHEET].
 ARI, K., et al. PI, PD, PID CONTROLLERS, MIDDLE EAST TECHNICAL
UNIVERSITY
ELECTRICAL & ELECTRONICS ENGINEERING.

68

You might also like