Flight Control and Hardware Design of Multi-Rotor Systems
Flight Control and Hardware Design of Multi-Rotor Systems
e-Publications@Marquette
Master's Theses (2009 -) Dissertations, Theses, and Professional Projects
Recommended Citation
Zimmerman, Nathan M., "Flight Control and Hardware Design of Multi-Rotor Systems" (2016). Master's Theses (2009 -). Paper 370.
http://epublications.marquette.edu/theses_open/370
FLIGHT CONTROL AND HARDWARE DESIGN OF
MULTI-ROTOR SYSTEMS
by
Milwaukee, Wisconsin
August 2016
ABSTRACT
ACKNOWLEDGEMENTS
TABLE OF CONTENTS
ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i
ACKNOWLEDGEMENTS . . . . . . . . . . . . . . . . . . . . . . . . . ii
TABLE OF CONTENTS . . . . . . . . . . . . . . . . . . . . . . . . . . iii
LIST OF TABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
CHAPTER 1 Problem Statement, Objective and Contributions . 1
1.1 Problem statement . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Previous Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 Thesis Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
CHAPTER 2 Quadcopter Background Information . . . . . . . . . 6
2.1 Common Quadcopter Motor Types . . . . . . . . . . . . . . . . . . 7
2.2 Quadcopter Configurations and Frame Design . . . . . . . . . . . . 9
2.3 Quadcopter System Architecture . . . . . . . . . . . . . . . . . . . 10
CHAPTER 3 Control Goals and Orientation Establishment . . . 12
3.1 Quadcopter’s Reference Frame . . . . . . . . . . . . . . . . . . . . . 12
3.2 Control Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Purpose of Mathematical Derivation . . . . . . . . . . . . . . . . . 14
3.4 Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4.1 Forces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.4.2 Torques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.5 Inertia and Angular Acceleration . . . . . . . . . . . . . . . . . . . 20
CHAPTER 4 Flight Orientation Estimation . . . . . . . . . . . . . 23
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2 3 Axis Accelerometer . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.2 3D MEM Accelerometer . . . . . . . . . . . . . . . . . . . . 24
iv
LIST OF TABLES
LIST OF FIGURES
3.4 Grams thrust (Ti ) per duty cycle input. Duty cycle input represents
power percentage of a 3 cell lipo battery. . . . . . . . . . . . . . . . . . 17
4.11 Global variation in: (a) magnetic intensity, (b) magnetic declination,
(c) magnetic inclination [11]. . . . . . . . . . . . . . . . . . . . . . . . 36
6.1 RF Marq Drone hardware: (a) Flight controller, (b) Radio controller . 50
6.3 PCB transmission lines: (a) Microstrip line, (b) Coplanar waveguide. . 55
6.6 RF Baluns: (a) Integrated Balun [13], (b) Discrete Balun [14]. . . . . 58
7.5 LiPo under voltage, over current, over charge, reverse bias, and backfeed
protection circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
7.7 Picture of ESCs: (a) Marq ESC, (b) Marq ESC Dev board. . . . . . . 69
7.11 Brushless motor phase voltage (yellow) and zero cross detection com-
parator (green). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
8.2 (a) Hokuyo UTM-30LX lidar used in [15] . (b) Neato XV-11 lidar device
used in this project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
8.7 ICP and ICL integration results acting on dataset in Fig. 8.3. . . . . . 84
8.8 Quadcopter control diagram with lidar and sonar inputs added. . . . . 85
8.9 (a) Quadcopter simulation with external disturbance. (b) Plot of posi-
tional drift elimination. . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
9.2 Pitch, roll, and yaw performance during hover test of quadcopter. . . . 88
xi
Acronym Definition
Math/symbol Definition
θ Pitch
φ Roll
ψ Yaw
x̂ Estimate of x
· Scalar product
× Cross product
U P P ERCASE Matrix
CHAPTER 1
coordinate system and then uses this system to determine control goals. The
remainder of the thesis focuses on how to meet the proposed control goals. An
kinematics, software, and hardware involved in flight control. Finally, this thesis
vehicle (drone), designers are faced with the choice of paying for a custom
designed aerial vehicle, building their own vehicle from scratch, or sacrificing
and radios. These modules are often proprietary and have limited hardware
1.2 Objectives
fully specified, and stabilized quadcopter. This system will be specified from
scratch hardware and software with the intent of eliminating as many black box
theoretical control as well as IMU data collection making it a prime candidate for
future research.
Admittedly, much work has been done in the area of advance control of
multi-rotor systems and these works are too numerous for a comprehensive
reference for the development of this thesis. For example, Robert Mahony
quadcopter with state space methods [18]. Another example of advance control is
With regards to open source multi-rotor systems, Open Pilot and Clean Flight
are perhaps two of the most popular open software flight controller systems
systems, the Pixhawk and Sparky systems feature an open source flight
controllers [23],[24]. While these systems feature some open hardware and
In regards to indoor autonomous control, this is an active area of research for all
with mutli-rotor vehicles utilizing lidar and employing the iterative closest point
(ICP) algorithm [15],[25],[26]. However, in these cases the multi-rotor vehicle was
aerial vehicle by combining lidar data and IMU data with an extended Kalman
filter as well as a Gaussian particle filter [27]. However, in this case the
research.
1.4 Contributions
integration than most other open source options. In addition, this thesis develops
• Provides open source software / hardware files for a remote control system
translation
associated with multi-rotor systems that will be used throughout this thesis.
Chapter 3 overviews the the mathematical reference frame for the multi-rotor
system and specifies control objectives. Chapter 4 describes sensors used for
flight. This chapter also overviews the software architecture used in order to
execute the desired control system. Chapter 6 overviews the quadcopter’s radio
system and introduces applicable theory required for its design and construction.
algorithm for parsing lidar data under significant processing and memory
CHAPTER 2
In order to provide context for future chapters, this chapter introduces the
Beyond the similarity of four propellers, there is significant design diversity. This
design diversity includes but is not limited to motor type and frame design.
(a) (b)
(c) (d)
Figure 2.1: Examples of quadcopter implementations [1],[2],[3],[4].
quadcopters is the motor type that they utilize. Consequently, the next section
there exist small electric motors that are light-weight, low-cost, and of simple
construction. These features make small electric motors ideal for low-cost
electric motors exist which are brushed and brushless motors. As the name
powered by DC, and are explained in detail in [28]. The control simplification
and cost of brushed DC motors makes them a popular choice for micro-size
quadcopters such as the Turnigy Micro-X shown in Fig. 2.1(d). However, the
brush which mechanically commutates the motor results in friction losses as well
as limited motor life span. Consequently, larger quadcopters often use brushless
motors are also split into two common types which are sensored and sensor-less
motors. Examples of these two motor types are illustrated in Fig. 2.2.
(a) (b)
position must be known. This can be achieved by using Hall effect sensors or by
complexity but results in heavier and more exspensive motor as seen in Fig. 2.2.
since their output controls the orientation of the quadcopter by varying the speed
Quadcopters have various configurations though the most common types are the
control. However, this configuration is least ideal for a forward facing camera.
Consequently, very few commercial drones are sold in this configuration and they
achieve improved camera perspective [31]. While this configuration can be ideal
for forward facing cameras, it is also not symmetrical about its center. This lack
of symmetry should be taken into account and will be discussed later in this
architecture unique to the quadcopter designed in this thesis is shown in Fig. 2.5.
Motor 2 Motor3
3 Phase AC
ESC2 ESC1
Remote
Flight Controller
PPM UART Lidar
Battery 2.4GHz
IMU SPI MCU SPI Radio Radio
3C LIPO 2FSK
PPM
FRONT
ESC3 ESC4
Motor 1 Motor 4
The underlying system for the quadcopter in this thesis is named the ”Marq
Drone” system. This system consists of a flight controller, a radio, and ESCs.
communicates with the ESCs through pulse position modulation (PPM). More
with ESCs, the flight controller communicates with a lidar sensor through a
with devices external to the quadcopter, a USB interface can be used for data
Now that all the components involved have been introduced, the I/O of the
system can be identified. For the flight controller itself, feedback inputs are from
the IMU, sonar, and lidar sensors. The outputs of the system are the four
individual PPM signals that are sent to the ESCs. Now that the I/O of the
system has been briefly introduced, a control scheme will be derived that uses
CHAPTER 3
its altitude above ground non zero. With this in mind, a commonly used reference
Yaw ψ
y
Roll ϕ Pitch θ
x
Front
Fig. 3.1 demonstrates a reference frame for quadcopters. The reference frame
uses Cartesian x,y,z system of coordinates for position and uses Euler angles
pitch (θ), roll (φ), and yaw (ψ) to denote orientation. The origin the axes
orientation. With this in mind, the first set of control goals can be summarized
θ̇, φ̇, ψ̇ represent the rotational velocities of the quadcopter, and where Tc
θ̇ = 0 φ̇ = 0 ψ̇ = 0
(3.1)
θ → θc φ → φc ψ → ψc , T → Tc
give users these four degrees of freedom to operate a quadcopter. However, the
user must also act as a control system in order to regulate the quadcopter’s
height to keep it above the ground. To achieve this, the user must observe the
quadcopter’s height and constantly adjust the throttle, Tc , such that the height
quadcopter to stay at a fixed position in space, they must also observe the x, y
While these parameters allow a user to control a quadcopter, these four degrees
of freedom are not enough for stable autonomous flight. Without a user to
observe and control the quadcopters x, y, z position with respect to the room,
ẋ = 0, ẏ = 0, ż = 0
(3.2)
x → xc y → yc z → zc
are needed such as lidar, GPS, and sonar. These methods will be introduced
laws and helps a designer gain intuition regarding the system. In simple cases,
these update laws can be derived from visual inspection of the airframe.
asymmetries are introduced to the air frame, and as motor angles are changed.
motor speed to angular velocities (θ̇, φ̇, ψ̇) such that the control system can drive
pitch (θ), roll (φ), and yaw (ψ) to their desired values.
Now that control goals have been defined for user-assisted quadcopter flight, a
model of the quadcopter must be derived to meet the proposed goals. For this
l = 168.7mm
h = 184.5mm 250mm
These dimensions are relevant to the physics based model derivation. Note that
this quadcopter is not symmetrical about its center. Fig. 3.3 demonstrates a
more detailed free body diagram of forces and torques acting upon the
quadcopter.
are generated by the propellers. Note, the aerodynamic effects that are not
shown in Fig. 3.3 since these forces are assumed to be negligible. Wind and drag
are examples of aerodynamic effects that have been set to zero in order to
z
T3
Yaw ψ
y
T2 T0
Roll ϕ Pitch θ
T1 -mg
x
Front
3.4.1 Forces
that this force is related proportionally to the propeller’s angular velocity. It can
is a force vector for motor index i, where k is a scaling constant, and where ω is
Ti = k · ω 2 (3.3)
The sum of thrust force vectors, T , is shown in equation 3.4 where x̄, ȳ, z̄ are
x̄
3
X
T = Ti = k · 0 0 ω 2 ·
ȳ
(3.4)
i=0
z̄
Note that all these forces are in the z direction. The implication of this is that
This has aerial footage implications which is why some multi-rotor platforms use
angled motors as seen here [34]. Another important note is that while a ESC is
aware of motor speed, ESCs do not commonly send this information back to a
controller. ESCs are simply circuits to which a PPM signal is sent to. Without
relationship, the Marq Drone was put upside down on a weight scale and then
varying PPM signals were sent to the motors. The results of this testing are
Thrust Linearization:
600
Grams Thrust (Ti)
500
400
300
200
100
0
0 0.2 0.4 0.6 0.8 1
Input Duty Cycle
Figure 3.4: Grams thrust (Ti ) per duty cycle input. Duty cycle input represents
power percentage of a 3 cell lipo battery.
18
As observed in Fig. 3.4, there was a roughly linear relationship between input
duty cycle and thrust. Consequently, linear regression was used to approximate
the thrust for a given motor in terms of the PPM duty cycle as shown in
equation 3.5.
propellers and motors used in the Marq Drone. This experiment would need to
3
X
T̂i · z̄ = m · g
i=0
m·g
T̂i =
4 · cos(θ) · cos(φ)
Assuming T̂i is set equal to the result calculated in equation 3.6, the quadcopter
it is important to note that thrust vectors Ti occur at some ri distance away from
3.4.2 Torques
From physics, we know that torque, τ , is equal to the cross product of distance
and force. For control purposes, it is useful to calculate the torque for each of the
quadcopters rotation axes as seen in equation 3.7. In equation 3.7, height (h)
τ =r×F
τψ = a · (T0 + T2 − T1 − T3 ).
These equations are similar to what shown in [33] and adapted for an
and roll torques (τθ , τφ ) are defined with respect to the quadcopter’s frame
geometry. Had the quadcopter frame been symmetrical, l, h would have been
equal which would have resulted in a simpler equation. Without taking this
asymmetry into account at the control system level, the quadcopter’s pitch and
about the yaw axis (τψ ) geometrically. This torque is slightly less intuitive
because it arises from having spinning masses attached to the frame. Without
taking this into account, the quadcopter would continuously spin about the yaw
axis. However, this problem is not unique to just quadcopters. A helicopter, for
example, uses a tail rotor in order to counteract the yaw torque introduced by
quadcopter frame, two propellers are selected to spin clock wise and two
20
directions are illustrated in Fig. 3.3. While geometry and force vectors have
The angular accelerations can be solved for by equating equation 3.8 to equation
3.7. Approximations can be used to simplify the inverting and calculation of the
inertia tensor matrix. Note, if rotations are defined about an object’s center of
mass and the mass is symmetrically distributed, the inertia matrix is diagonal
body into basic shapes such as rectangles. For a 3D rectangle, the inertia about
1
an axis can be calculated as Ixx = 12
· m · ((ylength )2 + (zlength )2 ). Similar
equations would apply for Iyy , Izz . Using this approximation, equation 3.9 was
calculated for the quadcopter frame and is expressed in grams meter squared.
21
0.0907 0 0
Ixyz = 0 0.5005 0 · g · m2 (3.9)
0 0 0.5422
the inverse of the tensor matrix, the results are shown in equation 3.10 where k
φ̈(k) (l/2) · (T0 (k) + T1 (k) − T2 (k) − T3 (k))
−1
θ̈(k) = Ixyz · (h/2) · (T (k) + T (k) − T (k) − T (k)) (3.10)
0 3 1 2
ψ̈(k) a · (T0 (k) + T2 (k) − T1 (k) − T3 (k))
This equation can be used in the formation of a state space system. The state
space system is approximated using a discrete derivative. Also, equation 3.6 can
φ̇(k + 1) 1 0 0 0 φ̇(k)
θ̇(k + 1) 0 1 0 0 θ̇(k)
= · +
ψ̇(k + 1) 0 0 1 0 ψ̇(k)
ż(k + 1) 0 0 0 1 ż(k)
(3.11)
l l l l
2·IXX 2·IXX
− 2·IXX − 2·IXX T0 (k)
h −h −h h T (k)
2·IY Y 2·IY Y 2·IY Y 2·IY Y 1
· · ∆T
a −a a −a T (k)
IZZ IZZ IZZ IZZ 2
g g g g
4·cos(θ)·cos(φ) 4·cos(θ)·cos(φ) 4·cos(θ)·cos(φ) 4·cos(θ)·cos(φ)
T3 (k)
These equations will form the basis of the control system update laws. However,
CHAPTER 4
4.1 Introduction
with respect to multi-rotor aircraft. This chapter then establishes the minimum
4.2.1 Introduction
3 axis accelerometers are devices that are designed to measure Cartesian x̄, ȳ, z̄
z1
m
x1
z2
acceleration is represented in Fig. 4.1 with the to equation 4.1 can be derived
for Ax and Ay . Also, note that in Fig. 4.1, the x dimension springs are also
the x dimension springs are of equal magnitude. When using equation 4.1 for the
deflection of the z springs. This gravity reference is crucial for steady state
calculate the acceleration per axis as shown in equation 4.1 specifically for the z
axis.
F = m · A, F =k·z
(4.1)
k · (z1 − z2 )
Az =
2·m
Given one is using a 3D accelerometer, similar equations
25
In order to achieve low form factor, low power consumption, and low cost,
modern accelerometers are designed using MEMS based technology. While they
operate under the same principles illustrated in Fig. 4.1, there is little visual
similarity since the springs are often of micron size etched in a silicon based
spring loaded masses in combination with parallel plates. When the device is
accelerating, this applies force to the internal springs of the MEMS structure.
This force results in the distance between capacitive plates changing. The MEMS
distance. Using the deflection distance of the plates, the device can then
calculate acceleration by taking into account the spring system’s mass and a
spring coefficient [36]. The accelerometer can then transmit this acceleration
equation 4.2 and equation 4.3 convert from Cartesian acceleration to Euler
Ax 180
θ = atan p 2 · (4.2)
2
Ay + Az π
Ay 180
φ = atan2 · (4.3)
Az π
Note that in the case of φ in equation 4.3, the atan2 function is used which is a
four quadrant version of the traditional arc tangent function. Also note that there
is no equation for the yaw (ψ) orientation angle. This is because a ψ orientation
will not register as any measurable change in the Cartesian acceleration vector.
use of an accelerometer is not enough for the control goals 3.1 to be achieved.
27
Without yaw feedback, any unbalanced ψ torques about the quad-copter would
result in the aircraft spinning in air. Naturally, this would make navigation
Another noteworthy issue with accelerometers is that they are sensitive to high
spinning at high speeds. The effect that this can have is illustrated in Fig. 4.3.
1.5
G Force (G)
0.5
-0.5
-1
1
11
21
31
41
51
61
71
81
91
101
111
121
131
141
151
161
171
181
191
201
211
221
231
241
251
261
271
281
Samples
Ax Ay Az
As seen in Fig. 4.3, when at rest, there is negligible noise on the accelerometer
readings. However, when the quadcopter’s motors are turned on, a significant
amount of high frequency noise is registered on the sensor. While low pass
filtering would remove this noise, the delay of such a filter can lead to flight
instability.
28
example, if the quadcopter in Fig. 3.3 is moving upwards at a rate twice that of
gravity, the accelerometer would yield Az = −1g, Ax = 0g, Ay = 0g. Using this
Consequently, equation 4.3 is only valid and useful for orientation when the
4.3.1 Introduction
navigational systems. The first gyroscopes were generally spinning masses held in
a gimbal frame. These frames allowed the mass to spin freely and maintain its
conservation of angular momentum, the spinning mass would resist any changes
electrical potentiometers are connected to the gimbal frames. While these devices
are capable of a large degree of accuracy, they are large, heavy, and expensive.
29
A MEMS version of the gyroscope is illustrated in Fig. 4.5. Due to the silicon
design process, they are small, low power, and cost effective.
Unlike the macro version shown in Fig. 4.4, MEMS gyroscopes do not contain a
spinning disk. Owing to the fact that it is difficult to achieve a large angular
physical principle. This physics principle is called the “coriolis effect” [38].
estimate orientation angles, it follows that the MEMS gyroscope readings must
Z t Z t Z t
θ= θ̇ · dt φ= φ̇ · dt ψ= ψ̇ · dt (4.4)
0 0 0
As a result of integrating the readings MEMS gyroscope over time, steady state
4.4.1 Introduction
Magnetometers are devices that measure magnetic field. The most common and
direction of earth’s magnetic north, have been used in navigation for hundreds of
31
years. For modern low power electronics, a MEMS solution also exists. An
order to measure magnetic field [10]. This force is then converted to a electronic
Primarily, these sensors are used to measure the earth’s magnetic field which
gives orientation insight. When these devices are used in conjunction with an
these devices can provide useful insight into orientation, they also have their own
drawbacks.
source of error. These errors are called hard-iron and soft-iron interference for
32
earth’s magnetic field is weak, these errors can dominate the output readings of a
magnetometer.
1000
Y/X
Z/Y
500 X/Z
mG
-500
-1000
-1500 -1000 -500 0 500 1000 1500
mG
Figure 4.7: Milli-Gauss (mG) output of an uncalibrated magnetometer when ro-
tated in 3 dimensions.
Mx − min(Mx )
M̂x = 2 · −1
max(Mx ) − min(Mx )
My − min(My )
M̂y = 2 · −1 (4.5)
max(My ) − min(My )
Mz − min(Mz )
M̂z = 2 · −1
max(Mz ) − min(Mz )
Note that this calibration procedure should only be performed during a window
of time in which the quadcopter is being rotated about all its axes. If a windowed
calibration is not performed, eventually the min and max values will be
This calibration procedure was performed on the quadcopter’s IMU and the
1
Y/X
Z/Y
X/Z
0.5
Normalized
-0.5
-1
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
Normalized
Figure 4.8: Output of a calibrated and normalized magnetometer when rotated in
3 dimensions.
As seen in Fig. 4.8, the magnetometer data is normalized and no longer has
significant scaling or offset variation between the axes. While the result of this
done using ratios. For example, assuming the quadcopter is level (θ = 0, φ = 0),
34
yaw (ψ) can be calculated with the basic equation shown in equation 4.6.
M̂y
ψ = atan2( ) (4.6)
M̂x
Note this equation is no longer valid if the magnetometer is not level since it
are required.
on observed θ, φ. The end goal of tilt compensation is to make equation 4.6 valid
by de-rotating the axes by θ, φ. Using rotation matrices along with equation 4.6,
− M̂z · sin(φ) − M̂y · cos(φ)
ψ̂C = tan 1 (4.7)
M̂x · cos(θ) + M̂y · sin(θ)sin(φ) + M̂z · sin(θ)cos(φ)
For this equation to work properly, it is imperative that all IMU outputs match
the axis as shown in Fig. 3.1. This equation was validated with IMU data and a
50
0
Degrees
-50
3
-100
?
A Compensated
-150
A Uncompensated
-200
0 200 400 600 800 1000 1200 1400 1600
Samples
Earth’s magnetic field direction and strength vary across the surface of the earth.
The earth’s magnetic field vector points towards magnetic north as opposed to
the true geographical north. The angular difference between these two locations
varying vertical component. The angular difference between the surface of the
earth and the earth’s magnetic field is defined as magnetic inclination. This is
inclination.
Up
MIntensity
−δ
σ
T rueN orth
M agneticN orth
East
(a) (b)
(c)
Figure 4.11: Global variation in: (a) magnetic intensity, (b) magnetic declination,
(c) magnetic inclination [11].
strength would affect the results of the calibration procedure in equation 4.8.
However, if the quadcopter’s location is known, the map in Fig. 4.11(b) can be
used for correction. Finally, magnetic inclination can be accounted for likewise
using the map in Fig. 4.11(c). Another method of compensating for magnetic
inclination is to use the equation in equation 4.7 which effectively ignores the z
4.5.1 Introduction
The process of combining data from multiple sensors and coming up with a
collective estimate is commonly called sensor fusion. For orientation, there are
multiple different sensor fusion algorithms such as gradient descent and Kalman
filtering [42]. However, due to the high frequency vibrations, large system
accelerations, low computational power available, and fast control loop update
requirements, not all algorithms are ideal for quadcopter flight use. With this in
mind, a simple complementary filter was selected. This work was inspired by [43]
and is shown in Fig. 4.12 where subscript k represents the sample number.
θk-1,ϕk-1,ψk-1
Figure 4.12: Complementary filter acting on raw accelerometer and gyro inputs.
4.12 where Ax,y,z is the raw accelerometer data and Gθ̇,φ̇,ψ̇ is the raw gyroscope
data. This filter addresses weaknesses such as what was discussed in 4.2.4 and
4.3.3. While gyroscopes have good dynamic response and noise immunity, they
have long term drift. In contrast, accelerometers have poor dynamic response but
are not susceptible to drift in the same manner. Consequently, a high pass filter
is used on the gyroscope data and a low pass filter is used on the accelerometer
magnetometer can be added using equation 4.8. This data can be fused with the
accelerometer and gyro data were fused. A block diagram form of this filter is
shown in Fig. 4.13 where Mx,y,z represents the magnetometer readings scaled by
equation 4.8.
θk-1,ϕk-1,ψk-1
This diagram can be easily implemented in C code. Due to the filtering and
1 #i n c l u d e <math . h>
2 #d e f i n e DeltaT 0 . 0 0 2 // F i l t e r i s run e v e r y 2ms .
3 v o i d IMU Comp Filter ( ) {
4 f l o a t Accel Mag , P i t c h A c c e l , R o l l A c c e l ,Num, Den , Yaw Mag ; // temp
vars
5
6 Ax = Ax + 0 . 1 ∗ ( Ax Raw − Ax) ; // A c c e l e r a t i o n Low Pass F i l t e r
7 Ay = Ay + 0 . 1 ∗ ( Ay Raw − Ay) ;
8 Az = Az + 0 . 1 ∗ ( Az Raw − Az ) ;
9
10 P i t c h+= Gx ∗ DeltaT ; // Apply Gyro I n t e g r a l
11 R o l l+= Gy ∗ DeltaT ;
12 Yaw+= Gz ∗ DeltaT ;
13
14 Accel Mag = f a b s f (Ax) + f a b s f (Ay) + f a b s f ( Az ) ; // Should be n e a r
1g
15 i f ( f a b s f ( Accel Mag −1) <0.2) // I f not e x p e r i e n c i n g e x t e r n a l
acceleration
16 {
17 P i t c h A c c e l = ( 1 8 0 / PI ) ∗ atan (−Ay , Az ) ; // Apply T r i g
18 R o l l A c c e l = ( 1 8 0 / PI ) ∗ atan2 (Ax , s q r t (Ay∗Ay + Az∗Az ) ) ;
19
20 P i t c h = 0 . 9 9 ∗ P i t c h + 0 . 0 1 ∗ P i t c h A c c e l ; // Combine Gyro & A c c e l
Data
21 R o l l = 0 . 9 9 ∗ P i t c h + 0 . 0 1 ∗ R o l l A c c e l ; // Fuse gyro and
accelerometer
22 } // End o f t y p i c a l complementary f i l t e r
23
24 Mx = Mx + 0 . 1 ∗ ( Mx Raw − Mx) ; // Magnetometer Low Pass F i l t e r
25 My = My + 0 . 1 ∗ ( My Raw − My) ;
26 Mz = Mz + 0 . 1 ∗ ( Mz Raw − Mz) ;
27
28 Mag Mag = f a b s f (Mx) + f a b s f (My) + f a b s f (Mz) ; // Should be n e a r 1
29 i f ( f a b s f ( ( Mag Mag−1) <0.2) // I f not e x p e r i e n c i n g e x t e r n a l f i e l d s
30 {
31 Num = Mz∗ s i n ( R o l l ) − My∗ c o s ( R o l l ) ;
32 Den = Mx∗ c o s ( Theta )+My∗ s i n ( P i t c h ) ∗ s i n ( R o l l )+Bz∗ s i n ( P i t c h ) ∗ c o s (
Roll ) ;
33 Yaw Mag = ( 1 8 0 / PI ) ∗ atan2 (num , den ) ; // Apply T r i g
34 Yaw = 0 . 9 9 ∗Yaw + 0 . 1 ∗ Yaw Mag ; // Fuse gyro and magnetometer
35 }
36 }
The proposed IMU fusion filter is a computationally efficient and simple filter
validated using real world test data by placing the drone on a measured rotary
bed. Data was then simultaneously collected from the IMU as well as from
potentiometers attached to the bed itself. The results of the testing are shown in
20
10
Degrees
-10
?Measured
-20 ?Filter
Error
-30
0 1 2 3 4 5 6 7 8 9
Seconds
Figure 4.15: Complementary filter validation test measuring and computing roll.
20
10
Degrees
-10
3 Measured
-20 3 Filter
Error
-30
0 1 2 3 4 5 6 7 8
Seconds
Figure 4.16: Complementary filter validation test measuring and computing pitch.
As observed in validation plots, the steady state error is negligible and the
41
20
Degrees
0
-20 A Measured
A Filter
Error
-40
0 2 4 6 8 10
Seconds
Figure 4.17: Complementary filter validation test measuring and computing yaw.
this filter is that it is using Euler angles (θ, φ, ψ). Euler rotation angles become
easy to understand and implement. In addition, with added data checks for valid
CHAPTER 5
5.1 Introduction
This chapter will overview the control system used to achieve stable flight and
meet the control objectives listed in 3.1. This control system was needed in order
to handle real world disturbances and to account for unknown offsets. In order to
A PID controller is a control loop that updates based upon the error observed
between a desired output and the measured output. This control loop’s response
Z t
de(t)
u(t) = Kp · e(t) + Ki · e(τ )dτ + Kd (5.1)
0 dt
loops such as PID act on systems to stabilize them if needed. In addition, a PID
43
controls context are often referred to as a “plant”. In the case of this thesis, the
plant is the quadcopter system. This plant along with control is visualized in Fig.
5.1, where u(t) is the input to the plant, where r(t) is the desired set point of the
plant, and where e(t) is the error between the output of the plant and the desired
set point.
r(t)
+
- PID
e(t) u(t)
Control System
The input to the plant, u(t), represents the speed commanded to each of the
vectors. r(t), the desired quadcopter outputs, is the user commanded orientation
defined in equation 3.1. Note that this system is linearized at a current point in
time and consequently assumes that superposition is upheld. It follows that the
components. This control concept is shown in Fig. 5.2 and the calculations for
44
θc
θIMU PID
ϕc PID
T
ϕIMU T
ψr
PID T ∑ ESCs
ψIMU
ϕIMU T
Gravity
Throttlec
θIMU Compensation
With the input and output relationship established, the following section
overviews the PID code developed for the system as well as how T is updated
The first step in implementing the control shown Fig. 5.2 was to write a simple
This code provides a PID output per a given input, target, and PID parameter
structure. This PID block can then be used to act on pitch, roll, and yaw.
With these control outputs, we can now finally use the model developed in
equation 3.11 which relates how θ, ψ, φ relate to motor speeds T . This model
5.5 shows how equation 3.11 was applied in code to update T based on a given
control error. Note, apart from simulation, a motivation for this derivation is
45
such that pitch and roll perform similarly. Consequently, constants A, B are
formed for pitch and roll respectively. For normalization, pitch and roll were
divided by A such that their response would be roughly equal. Yaw rate is due to
However, to simplify user control, aspects of equation 3.11 can still be taken into
account. Specifically when the quadcopter has a non-zero roll or pitch, more
collective thrust is needed in order to ensure the quadcopter maintains its height.
The code designed to achieve this throttle control is demonstrated in Fig. 5.6.
46
Figure 5.5: Code snippet of pitch, roll, and yaw thrust calculations.
With the implementation of the PID system and update laws, these segments of
code can be combined to formulate the overall control system. Note that to
at a rate of 100 Hz. This control loop code is illustrated in Fig. 5.7.
control system. Given one has an accurate physical model, the optimal PID
coefficients can be selected based upon desired overshoot and speed for example.
However, without a physical model, values can be tunned on the fly. Initially,
quadcopter parameters to achieve flight were tunned on the fly. A javascript GUI
was written to help for debug purposes. This GUI had the capacity to tune the
PID parameters of the quadcopter on the fly. A snapshot of this GUI is shown in
47
1 #i n c l u d e <math . h>
2
3 v o i d Apply Gravity Compensation ( ) { // a d d i t i o n a l t h r u s t i f t i t l i n g
4 f l o a t MG Factor = (MASS ∗ GRAVITY / 4 ) ∗ c o s ( IMU Pitch ) ∗ c o s (
IMU Roll ) ;
5 T [ 0 ] +=MG Factor ;
6 T [ 1 ] +=MG Factor ;
7 T [ 2 ] +=MG Factor ;
8 T [ 3 ] +=MG Factor ;
9 }
10
11 v o i d A p p l y T h r o t t l e ( ) { // Take j o y s t i c k v a l u e o f t h r o t t l e and
apply i t t o a l l motors
12 T [ 0 ] +=R e m o t e T h r o t t l e ;
13 T [ 1 ] +=R e m o t e T h r o t t l e ;
14 T [ 2 ] +=R e m o t e T h r o t t l e ;
15 T [ 3 ] +=R e m o t e T h r o t t l e ;
16 }
17
18 #d e f i n e MOTOR SPEED MAX 1 0 0 0 . 0 // Max s p e e d n o r m a l i z e d t o 1 0 0 0 .
19 #d e f i n e MOTOR SPEED MIN 1 0 0 . 0
20
21 v o i d A p p l y T h r o t t l e L i m i t s ( ) { // Ensure motor v a l u e s a r e not
beyond t h e i r min/max v a l u e s
22 uint16 t i = 0;
23 f o r ( i =0; i <4; i ++)
24 {
25 i f (T [ i ] >(MOTOR SPEED MAX) )
26 T [ i ] = MOTOR SPEED MAX;
27 e l s e i f (T [ i ] <(MOTOR SPEED MIN) )
28 T [ i ] = MOTOR SPEED MIN;
29 }
30 }
1
2 v o i d Run Control Loop ( )
3 {
4 Get Control Errors () ;
5 Apply Throttle () ;
6 Apply Gravity Compensation ( ) ;
7 Apply Pitch ( ) ;
8 Apply Roll ( ) ;
9 Apply Yaw ( ) ;
10 Apply Throttle Limits () ;
11 }
Fig. 5.8.
This GUI was useful for collecting and saving live flight data, testing motor
48
orientation, and adjusting PID values. Being able to update and visualize data
The control loop in Fig. 5.7 along with the IMU code in Fig. 4.14 account for
To keep control timing and IMU collection constant, the software was
filter updates, control system updates, and radio link updates. For this
No No No
Radio Data Timer ISR IMU Data
Ready? Expired? Ready?
(Loop) (200Hz) (ISR)
Send Telemetry
Data
interrupt basis. Gyro and accelerometer readings are updated and filtered at 500
Hz. The magnetometer is updated at 100 Hz which is the maximum for the
selected device. These updates are performed based on an interrupt to give the
IMU filter constant timing characteristics. Likewise, the control system is also
triggered through interrupts. The control system executes every 200 Hz and uses
the most up to date data from both the controller and the IMU filter to perform
its calculations. Less timing critical tasks are then executed in a super loop such
as checking for new radio data, transmitting telemetry data, handling USB
commands, and other non flight related features. Full source code is provided at
[45].
50
CHAPTER 6
6.1 Introduction
This chapter overviews the radio frequency (RF) system used with the Marq
Drone and explains concepts regarding its design. Radio frequency design at
design a legal and efficient RF link. The RF hardware designed for the Marq
(a) (b)
Figure 6.1: RF Marq Drone hardware: (a) Flight controller, (b) Radio controller
The Marq Drone utilizes a flight controller with an integrated radio as well as a
remote controller with an integrated radio. The primary motivation behind this
was to eliminate use of the PPM protocol as well as have the capacity to collect
data in real time. This hardware was designed to help understand the nature of
51
architecture as shown previously in Fig. 2.5. The schematics of these pieces are
included in Appendix A. The CC2500 transceiver was selected for this RF system
RF Remote
Monopole
2.4GHz 2.4GHz CPWG Matching
MCU SPI Radio Balun Antenna
100Ω 50Ω 50Ω Π network
¼λ
2.4GHz 2FSK
Flight Controller
Monopole
2.4GHz 2.4GHz CPWG
MCU SPI Radio Balun Antenna
100Ω 50Ω 50Ω
¼λ
frequency determines the size of the radio system, the required power of the RF
system, and the legality of a system. Firstly, one must select a radio frequency
that is legal to operate in their region. For many countries, there exists
transmission does not require a license. For the United States, ISM operation is
The 2.4 GHz band is widely accepted in most countries and has become popular
for consumer electronics. Consequently, many affordable RF devices now exist for
this band of operation. An advantage of this band is the size of its quarter
wavelength. The calculations for the 2.4 GHz quarter wavelength are shown in
equation B.2 where λ is wavelength, where c is the speed of light, and where fo is
λ c
=
4 4 · fo
(6.1)
2.99 · 108 m/s
≈ 3.12cm ≈ 1.23inches
4 · 2.4GHz
Having a quarter wavelength of roughly 1.23 inches allows for the antenna to be
easily mounted to both the drone and the remote controller. While smaller
antennas could be used for lower frequency bands, these antennas would be
budget, the power output of the transmitter must be known, the antenna gain of
both the transmitter and receiver must be known, and the receiver sensitivity
must be known. With these inputs and assuming Friis transmission, the Friis
transmission equation can be used to calculate range [47]. For the Marq Drone
system, quarter wavelength monopoles were used for the transmitter and receiver
that have an ideal antenna gain of 5.19 dBi. In regards to the transiever, the
CC2500 was selected which has a max transmission power of 1dBm and a
Friis transmission equation as shown in equation 6.2 where Prx is the receiver
sensitivity in watts, where Ptx is the transmitter power in watts, where r is the
distance in meters, and where Gtx , Grx are the isotropic gains of the transmitter
2
c
Prx = Ptx · Gtx · Grx (6.2)
4π · r · fo
Next, this equation is solved for range in terms of units that are commonly
c
Ptx,dbm − Prx,dbm + Gtx,dbi + Grx,dbi + 20log10 ( 4·π·f ) − 10
o
r = 10E ≈ 82m
20
(6.3)
54
Note this is a highly optimistic estimate of the expected range since it assumes
perfect antenna gains and no additional losses. However, this number is a ball
park range and one cannot expect more than this value. Often it is assumed that
the observed value will be 10 times less than an ideal measurement which would
leave the range to be slightly under 100 feet which is acceptable for indoor flight.
Transmission lines are required for high frequency signals where parasitic
transmitted. 2.4 GHz is a high enough frequency where these parasitic effects
will have adverse influence over signals transmitted. For optimum power
transmission, the source impedance must match the load impedance and the
transmission line impedance. In general, both sources and antennas are matched
between the source and the antenna. There are two common transmission lines
that can be easily created on a PCB and they are shown in Fig. 6.3.
Calculations for these transmission lines are lengthy and are included in
Appendix B. Note that it is imperative that the correct r be used for both
equations and that this parameter changes with frequency. Fig. 6.4 is a
substrate. For most materials, the dielectric constant trends downwards as the
frequency increases.
55
εr h
(a)
b
a
εr h
(b)
Figure 6.3: PCB transmission lines: (a) Microstrip line, (b) Coplanar waveguide.
Failing to take the material’s frequency characteristics into account can result in
lossy transmission lines. While the transmission line equations in Appendix B are
dependency.
With regards to transmission line selection, coplanar wage guides are often
waveguides are more ideal for adding shunt tunning elements. Parallel and series
the transmission and the source impedance. Tunning strategies are beyond the
scope of this thesis but are overviewed at the following reference [48]. An
inductors as needed. This network should be located close to the load that is
intended to be matched. Vias were added around the network to reduce ground
loop impedance. Without vias, small value capacitors can act as inductors.
These vias are left un-tented to allow for connection of RF pigtails. RF pigtails
are used to validate the impedance of the network with a vector network
6.5 RF Baluns
RF sources and loads often exist in differential and single ended forms. The
used to convert from differential signals to a single ended signals and vice versa.
PCB mounted baluns can be made of passive discrete electrical components such
as inductors and capacitors [14]. However, the validation and the tunning of
For this thesis, an integrated balun was used to save space and reduce design
complexity [13].
Once the hardware design of the system was completed, a method of sending RF
range is prioritized. The RF packet structure used in this thesis is shown in Fig.
6.7.
58
(a)
(b)
Figure 6.6: RF Baluns: (a) Integrated Balun [13], (b) Discrete Balun [14].
Data Check
RF Preamble Sync
Sync Index Data sum
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
This packet contains four major components which are a preamble, sync, data,
and checksum. The preamble size can vary and is used to give the receiver an
opportunity to lock onto the signal being transmitted. Longer preambles increase
the probability of the packet being received. Sync bytes inform the receiver when
the preamble has ended. The data segment of the packet in this case consists of
59
two sync bytes, an index byte, and four bytes of data. Finally a checksum is
appended to the packet to help verify the validity of the data received. Note the
preambles are not checksummed since it takes time for the receiver to lock onto
the signal and initial corruption is expected. RF packets are discarded should the
this case, 15 bytes of data are used to convey 5 bytes of information. This limits
limitation is the speed that bytes are encoded on top of the 2.4 GHz carrier
modulation was used. Bytes were encoded at 250K baud rate which meant that
higher baud would allow for faster transmission. 250K was selected as a
communication, a ping system was used in which the remote would periodically
send out control packets and the flight controller would send back telemetry
must be longer than the time required to transmit 2 packets. A packet exchange
transmitted and received packets. While the presence of packets can be observed
without a GHz class oscilloscope. Having the remote transmit periodically and
the flight controller echoing back helps prevent any chance of packet collision. An
initial design where both the controller and flight controller periodically
signal loss, both the remote and controller were periodically transmitting at the
6.7 Conclusion
Designing a custom RF system allows for great flexibility and efficient data
acquisition but comes at the cost of design complexity. For a custom RF system,
first a frequency band is selected based on the antenna size desired and legal
bands of operation. After a frequency has been selected, antenna types and a
transceiver are selected given the mechanical and power constraints of the
61
system. RF transmission lines and baluns are required in order to get a signal
customizable, and bidirectional link was established between the quadcopter and
the remote. This is advantageous over the majority of off-the-shelf systems since
data is not encoded into PPM signals, the data is bidirectional, and the source
CHAPTER 7
Hardware Implementations
7.1 Introduction
Electronic hardware components of this system include the radio system, flight
7.1.
These pieces of hardware were designed to help understand the nature of the
63
shown previous in Fig. 2.5. Hardware involved in this project was designed in
The flight controller consists of a MCU, a IMU, a radiocore, and external IO.
The flight controller is responsible for stabilizing the quadcopter and executing
Cortex M4 MK22FN512 by Freescale was chosen for its FPU, large flash space,
large RAM space, USB interface, low per unit cost, and hardware simplicity.
With regards to the IMU, the MPU-9250 by Invensense was selected since it is a
flight tested in another multi-rotor platform [24]. For the radiocore, the CC2500
by Texas instruments was selected due to its low cost and high reconfigurability.
For motor control, four hardware PWM pins were exposed on external headers
for PPM communication with ESCs. Finally, serial IO and analog IO were
The board itself was assembled using solder paste and a toaster reflow oven. The
3V3
3V3
UART/AIO
ISP
PWM
Program Aux PPM
Header IO Headers
Integrated
Legend: Connector Passive
Circuit
development of the radio core. The micro-controller as well as the IMU are much
lower frequency devices which accordingly required less attention to detail. Clean
protection and other basic hardware principles were implemented in its design.
level block diagram for the remote is shown in Fig. 7.3. This diagram illustrates
all the major hardware blocks utilized by the controller. Further information can
For the joysticks, two Frsky Taranis Gimbals were selected. These joysticks were
65
selected since they were primarily designed for remote flight control. To simplify
the mechanical design, these joysticks mount directly to the PCB which avoids
was selected due to its low cost, availability, and USB interface. The radiocore is
the same as the flight controller which is the CC2500 and discussed in Chapter 6.
Push buttons were added for flight commands such as emergency cutoff. Finally,
for remote portability, a 1 cell 4.2V LiPo cell battery was used such that the
recharing any time the USB interface was plugged in. In addition, the battery
3V3
SPI
UV/OC/ MCU
RC/FB Joystick1 AI KL25Z128 AI Joystick2
Fault
Protection
Cortex M0+
DI
5V USB 2.0 ISP
Integrated
Legend: Connector Passive
Circuit
Apart from the RF design, the only other challenging aspect of the remote
controller design was the LiPo battery protection system. Care must be taken
such that Lipo batteries are not overcharged. Overcharging LiPos will break
down their internal chemistry and potentially cause fires. Consequently, the
MCP73812 charge IC was used to regulate the current being used to charge the
LiPo and to cutoff charging at the batteries nominal voltage. Another danger
with LiPo batteries is draining them past their minimum rated voltage.
recharge and sustain charge. Finally, drawing more than the battery’s rated
current can cause the battery to overheat and potentially catch fire and or break
down in chemistry. Note, the energy capacity contained in a small single cell
LiPo battery is very minimal which significantly reduces the potential hazards
the battery can generate. The circuit derived to prevent under voltage, over
Lithium Charger
Lipo Protection & Power System 5V
5V 5V
U1
4 3 Vreg
VDD VBAT
5 D1
PROG Backup Q1 Q2 Bat45C
PMUX
R1
C2 10K C3 Reverse
1uF 1 2 1uF R2 C4
CE VSS UVLO
2MEG Q3 Q4 10uF
C8 399-3699-6-ND
MCP73812
U3 100nF
CR2 R5
BH-CR2-PC 1MEG S1 System On/Off Switch
SW-SPST
Figure 7.5: LiPo under voltage, over current, over charge, reverse bias, and back-
feed protection circuit.
other ICs in the event of reverse bias. Q2 in combination with R2 and R5 creates
an under voltage lockout as well as an over current lockout. When the LiPos
battery voltage is low, the bridge divider on the gate of Q2 forces Q2 into the
68
internal resistance of the battery combined with the R2 and R5 bridge forces Q2
into cutoff. Back to back PFETs Q3 and Q4 prevent USB power from
back-feeding the battery when plugged in. FETs were used as opposed to diodes
on the batteries current path to eliminate voltage drop out on the 3.3V rail.
microcontroller, gate drivers, and high power FETs. The MCU selected was the
Cortex M0+ KL25Z128 Kinetis by Freescale. This was the same processor used
on the remote and is pin by pin compatible with the micro-controller on the
Semiconductor since it supported dual high side low side NFET driving,
supported 3.3V logic signals, is low cost, and has a easy to solder package. The
primary switching FET selected was the PSMN011 by NXP since it supports a
max drain current of 61A, has an RDSON of 10 mΩ, and since it utilizes a small
This ESC was designed to be compact and have capacity to drive atleast 10A of
current. To achieve this, double sided population was required. Another useful
aspect of this design was the USB interface for data acquisition as well as
programming. This ESC was created first as a larger dev board with more
debugging features such as headers for probing. Once the theory of operation was
confirmed, this board was shrunk to a 0.9” by 1.6” board. Pictures of both of
69
I2C PWM
BEMF_A
BEMF_C
Integrated
Legend: Connector
Circuit
(a) (b)
Figure 7.7: Picture of ESCs: (a) Marq ESC, (b) Marq ESC Dev board.
With regards to method of operation, recall these ESC are effectively sensorless
brushless motor controllers as stated in Section 2.1. This controllers uses is back
EMF zero crossing detection [29]. The following section will briefly describe
brushless motor basics as well as the BEMF zero cross detection driving method
70
brushed motor, brushless motor consists of a stator which contains coils and a
rotor which contains permanent magnets. If the coils are energized correctly, the
coils create a rotational torque that acts on the magnets on the rotor. Since the
magnets are adhered to rotor, this rotational torque causes the motor shaft to
spin. However, if the coils on the stator are not energized correctly with respect
to the polarity and position of the magnets, rotational torque is not generated.
used such that stator coils are always properly energized with respect to the
rotor. However, with a brushless motor, this mechanical linkage from stator to
the rotor is removed in order to reduce friction and extend motor lifetime.
Without the mechanical linkage between the rotor and the stator, external
sensing methods of the rotor are required. Hall effect sensor can be used in order
to detect the rotors position. However, hall effect sensors are expensive and
BEMF zero cross detection driving is a brushless 3 phase motor driving method
that relies on estimating the rotors position by using voltage generated by the
Within the BEMF waveform, there is an event called the “zero crossing”. This
event is used to determine the rotor’s position in order to drive the motor
correctly. The following section will introduce basic driving concepts as well as
Brushless motors are 3 phase loads. To drive current in any direction through
these three phases, three H-bridge switches are used. Consequently, there is a
total of six switches and only two switches are turned on at a given time. This
leaves one phase disconnected and this phase’s voltage is representational of the
BEMF of the motor. This concept is illustrated in Fig. 7.8 where the phase A
high side switch is on, where the phase C low side switch is on, and where phase
These 6 switches must be actuated in a specific sequence in order for the motor
sequence”.creates
sequence This sequence is illustrated
a rotational torque on in
theFig. 7.9.
rotor If actuated
of the correctly,
motor. Note thethis
that in
72
VBAT
Brushless Motor
Phase A Phase B
High Side
Phase A
Phase A
Low Side Phase C
Phases 1 2 3 4 5 6
Phase A
Zero Cross
(voltage)
Phase B
Zero Cross
(voltage)
Phase C
Zero Cross
(voltage)
order to determine the position of the rotor such that power can be applied
crossing events. A zero crossing is where the BEMF crosses over the neutral
73
voltage of the motor. This zero crossing event represents a rotor mid point
can be made that the rotor is not rapidly accelerating within a commutation
step. This assumption is fair for brushless motors on a quadcopter since the
torque load is nearly constant. With this assumption, one can assume that the
time it takes for the mid point to be observed will also be the approximate time
it takes for the rotor to reach the next commutation phase. A basic software
Zero
Increment To No crossing event Reset To
occurred?
Yes
Increment
Delay for
Commutation
To Cycles
Drive Step
Figure 7.10: Software block diagram of zero cross brushless motor driving.
While this driving scheme is simple, complexity arises in detecting the zero cross
comparator that compares the motor neutral voltage with the BEMF waveform.
However, most brushless motors for multi-rotors do not expose the neutral signal
BEMF noise generated by PWM switching. The diagram shown in Fig. 7.9
illustrates 100% duty cycle which is not a common mode of operation. It follows
74
that to vary the speed of the motor, the duration of on time is reduced with
PWM. These switching signals create voltage transients that couple onto the
BEMF phase. A brushless motor phase voltage is shown in Fig. 7.11 along with
Figure 7.11: Brushless motor phase voltage (yellow) and zero cross detection com-
parator (green).
To achieve these results, hardware filtering was implemented on the MCU where
comparator samples were windowed and transitions were generated only after a
along with the software method proposed in Fig. 7.10 allowed for effective
Brushless motors are efficient motors that can be driven through various
sensorless techniques such as zero cross detection. Section 7.4.3 overviews both
brushless motors. While sensorless driving was achieved, there was not enough
time to incorporate the drivers shown in Fig. 7.7 into the final quadcopter.
76
CHAPTER 8
8.1 Introduction
force vector that isn’t purely vertical. Another source of drift can be from
external forces such as air flow in a room. A final source of drift can occur from
sensors are needed. For outdoor flight, GPS in combination with IMU and
barometer sensors have been used to reduce positional drift with an extended
Kalman filter [49]. However, GPS is not reliable indoors and barometers do not
provide sub meter accuracy. Consequently, other sensors are used such as optical
77
flow cameras, external cameras, radio beacons, and lidars. This thesis will
required for a laser to strike a target and bounce back. This time of flight
measurement can be converted to distance using the speed of light. The lidar’s
distance output is then encoded into polar coordinates (r∠θ). This data can then
2000
1000
mm
-1000
-2000
-3000
-5000 -4000 -3000 -2000 -1000 0 1000
mm
In this plot, the change in color represents a change in time. For this dataset, the
lidar was in a stationary position. With regards to the physical hardware, this
dataset was taken with the XV-11 lidar [50]. This lidar was used in order to help
Currently, this lidar is the most affordable lidar on the market which provides
motivation for its use. Commonly, in other research, more expensive lidars such
as the Hokuyo UTM-30XL lidar was used [15],[26]. Pictures of the XV-11 lidar
(a) (b)
Figure 8.2: (a) Hokuyo UTM-30LX lidar used in [15] . (b) Neato XV-11 lidar
device used in this project.
While the XV-11 lidar is more affordable, this price reduction comes at the cost
While lidar can provide crucial distance information, this data comes at the cost
generates 57600 points per second. Once points are obtained, a significant
amount of post processing must occur in order to transform this data into useful
GHz processors with gigabytes of RAM. This chapter will focus on developing an
computation.
ˆ ∆y)
required in order to estimate (∆x, ˆ from the lidar datasets. An example
dataset of positional drift is shown in Fig. 8.3 where the lidar was moved left by
roughly 600mm.
2000
1000
mm
-1000
-2000
-3000
-5000 -4000 -3000 -2000 -1000 0 1000
mm
methods are employed such as iterative closest point (ICP), and iterative closest
point line (ICPL) [25][51]. These methods are commonly used for solving point
these algorithms can also be employed to detect rotational differences and scaling
differences between data sets. However, in order to limit scope, complexity, and
The magnetometer for example, can be used to determine rotation. While ICP
can estimate translation, ICP becomes less accurate with less data points and
when datasets that are taken at a further distance away. For example, if ICP is
employed on the dataset in Fig. 8.3, ICP would register positional changes in
P0,6 P1,6
P1,3
P0,3 ΔY3
Prev,index ΔX3
P0,1 P1,1
Lidar Average Resulting
Vector
8.1 where x and y are arrays of N lidar points, where σ represents the gradient
descent learning rate, and where ∆x, ∆y represent the resulting lidar translation.
81
i=N
X i=N
X
δx = E (xi − xcp ) , δy = E (yi − ycp )
i=0 i=0
∆x = ∆x + δx, ∆y = ∆y + δy (8.1)
i=N
X i=N
X
x= (xi + σ · δx), y= (yi + σ · δy)
i=0 i=0
Note that additional computation is required in order to find (xcp , ycp ) which
represent the coordinates of the closest point from a previous lidar data set to a
present given point (xi , yi ). Convergence requirements and the value of the
due to the geometry nature of ICP acting on lidar data, this algorithm may not
This section overviews a specific implementation of the iterative closest line (ICL)
algorithm proposed for parsing lidar data efficiently and accurately. ICL is based
point to point metric. In ICL, the point Pcp with coordinates (xcp , ycp ) is replaced
with a point PCL with coordinates (xCL , yCL ). The point PCL is located on line
between the two previous closest points. In addition, PCL is also the closest point
on that line to the point being compared. The concept of PCL points is shown in
Fig. 8.5 where lidar points are denoted in the form of PlidarRevolution,index .
The point (xCL , yCL ) is calculated using equation 8.2 where points
82
(x1 , y1 ), (x2 , y2 ) represent the two closest points from a prior lidar revolution with
respect to a new lidar point (x3 , y3 ). Note that in equation 8.2, a, b, c represent
Lines were formulated in this manner as opposed to slope intercept form in order
a = y2 − y1 , b = x1 − x2 , c = −by1 − ax1
b(bx3 − ay3 ) − ac
xCL = (8.2)
a2 + b 2
a(−bx3 + ax3 ) − bc
yCL =
a2 + b 2
With the calculation procedure of (xCL , yCL ) complete, the next step in ICL
algorithm is to formulate and minimize a cost function J. The ICL cost function
N
X
J= (xi − xCL )2 + (yi − yCL )2 (8.3)
i=1
P0,6 P1,6
P1,3
PCL
PCL P1,2
PCL P1,1
Lidar Average Resulting
Vector
This cost function can be minimized iteratively through gradient descent. To use
8.4.
N N
X ∂Jk,i X
δxk = = (xk,i − xCL )
i=1
∂x i=1
N N
(8.4)
X ∂Jk,i X
δyk = = (yk,i − yCL )
i=1
∂y i=1
Now that the necessary mathematical concepts have been overviewed, a basic
1 i n t N = 3 6 0 ; // 360 p o i n t s p e r r e v o l u t i o n
2 f l o a t α = 0 . 5 // L e a r n i n g Rate
3 i n t i t e r a t i o n C o u n t = 10 // Fixed number o f i t e r a t i o n s
4 f l o a t δx , δy , ∆x , ∆y , xCL , yCL =0; // i n t e r m e d i a t e v a r i a b l e s
5 f l o a t x [ ] = {x1 , . . . xn } ; // Array o f r e c e n t X l i d a r p o i n t s
6 f l o a t y [ ] = {y1 , . . yn } ; // Array o f r e c e n t Y l i d a r p o i n t s
7 f l o a t x P r e v i o u s [ ] = {x1 , . . . xn } ; // Array o f p r e v i o u s X l i d a r
points
8 f l o a t y P r e v i o u s [ ] = {y1 , . . yn } ; // Array o f p r e v i o u s Y l i d a r
points
9
10 v o i d ICL ( ) {
11
12 f o r ( j = 0 ; j <i t e r a t i o n C o u n t ; j ++)
13 {
14 f o r ( i = 0 ; i < N; i ++){ // accumulate d e l t a terms .
15 xCL = findCL ( x [ i ] , x P r e v i o u s ) ; // Find c l o s e s t p o i n t l i n e
16 yCL = findCL ( y [ i ] , y P r e v i o u s ) ;
17 δx = δx + ( x [ i ] − xCL ) ;
18 δy = δy + ( y [ i ] − yCL ) ;
19 }
20 f o r ( i = 0 ; i < N; i ++){ // S i m u l t a n e o u s update a l l p o i n t s
21 x [ i ] = x [ i ] − α ∗ δx/N;
22 y [ i ] = y [ i ] − α ∗ δy/N;
23 }
24 ∆x = ∆x + δx/N; // accumulate d i s p l a c e m e n t s
25 ∆y = ∆y + δy/N; // accumulate d i s p l a c e m e n t
26 δx = 0 ; δy = 0 ; // Reset d e l t a v a l u e s f o r next i t e r a t i o n
27 }
28 p r i n t f ( ∆x , ∆y ) // Output r e s u l t s
29
30 }
While this code example only covers a single lidar revolution, a more complete
to vanilla ICP is shown in Fig. 8.7 acting upon the dataset shown in Fig. 8.3.
"x ICP
s"x ICP
400 x Final
Measured
200
0 5 10 15 20 25 30 35
Lidar Revolutions
Figure 8.7: ICP and ICL integration results acting on dataset in Fig. 8.3.
.
ICL and ICP were performed on every consecutive set of lidar data. ∆x
R
represents the rate of drift while ∆x represents the total accumulated drift. As
seen in Fig. 8.7, ICL error is smaller over time which results in the correct
integration distance over time. In contrast, ICP has non negligible error resulting
information into the quadcopter’s control system such that positional drift is
reduced. As shown in Sections 8.3 and 8.4, ICP and ICL can act on lidar data to
85
obtain positional drift estimations ∆x, ∆y. An additional PID control loop can
0 θc
PID θr θIMU PID
Δ
T
ICL ϕc PID
Algorithm 0 ϕIMU T
PID ESC IMU
Δ ϕr
ψr T
ψIMU PID Qudacopter Plant
Lidar Data T
zr
zsonar PID
RC Remote
Flight Control Software
θr, ϕr, ψr, zr
Figure 8.8: Quadcopter control diagram with lidar and sonar inputs added.
to zero respectively. This control scheme is shown in Fig. 8.8 and is an extension
The control system proposed in Fig. 8.8 was tested only in simulation. Flying a
quadcopter with the XV-11 lidar would be challenging due to its heavy weight in
added causing drift in both the x and y planes. The control system in Fig. 8.8
14
12
Height
10
40
30 0
-5
-10
20 -15
-20
10 -25
-30
-35
(a)
3
0.4 ? 4
"X
"Y
degrees
mm/s
0.2 2
0
0
-0.2
0 100 200 300 400 500 600 700 800 900 -2
1000
Time (ms)
(b)
Figure 8.9: (a) Quadcopter simulation with external disturbance. (b) Plot of
positional drift elimination.
87
CHAPTER 9
described in equation 3.1. Using the control system proposed in Chapter 5 and
the hardware shown in Chapter 7, the quadcopter was able to achieve flight with
minimal steady state error. A segment of data taken during a flight hover test is
3 ?Remote Input
Error, Mean: -0.001
2
Degrees
-1
-2
Note that in this flight test, a human was controlling the quadcopter attempting
to make the qudacopter hover in place. As a result of this, the user commanded
roll, φRemote is not 0. Consequently, the error φRemote − φM easured , can be used as
a performance metric. This data was collected through the RF link and sent to a
88
computer through the USB interface on the remote. For the entire duration of
this test, the error averaged to be 0.001o . However, the standard deviation of the
error is 0.4816 degrees. In other-words, roughly 70% of the time the error is
within 0.5o of the target. This noise error is in part due to the noise of the user
generated control signal and in part due to jitter/noise in the control system.
While pitch and roll have similar performance, yaw had the most control error
over time. This is in part due to the control system gains and it is also in part
due to the quadcopter design not having a control input that acts directly on
yaw. Recall from the physical model that yaw control is achieved by a differential
torque from clockwise and counter clockwise spinning motors. In contrast, pitch
and roll can be controlled directly by the forces exerted by the propellers on the
frame. The control system errors for pitch, roll, and yaw are shown in Fig. 9.2.
-5
Figure 9.2: Pitch, roll, and yaw performance during hover test of quadcopter.
Using the dataset in Fig. 9.2, the mean squared error (MSE) was generated for
each control axis. The MSE tracks the controllability of each axis. For reference,
9.2 Conclusions
The main purpose of this thesis was to develop both the hardware and software
system to achieve stable auto leveling flight using a series of PID controllers.
between the remote and the quadcopter. Chapter 7 specifies the other hardware
involved in the system such as the flight controller and electronic speed
algorithm. Specifically, this thesis provides open source software / hardware files
source software / hardware files for a remote controller. It offers design insights
algorithm as well as a PID control system. Finally, this thesis presents a gradient
descent based ICL algorithm that can parse lidar data in real time with limited
computational resources.
90
This section describes potential follow-up work to the current Marq Drone
Design. Currently, the IMU filter operates on Euler angles when ideally it should
allow for true linear spherical interpolation where as low pass filtering Euler
angles does not produce a linear response. With regards to the control system,
the first thing that would be improved is the PID control system performance.
The current balancing action is somewhat noisy and the yaw control is lacking.
lidar to the quadcopter and implement the ICL algorithm in real time.
91
References
http://www.dji.com/product/inspire-1.
[32] G Lazaridis, “Pulse Position Modulation and Differential PPM”, 2011,
[Online]. Available:
http://www.pcbheaven.com/wikipages/Pulse_Position_Modulation/.
[33] A. Gibiansky, “Quadcopter Dynamics and Simulation”, 2012, [Online].
Available:
http://andrew.gibiansky.com/blog/physics/quadcopter-dynamics.
[34] CyPhy, “CyPhy LVL 1”, 2015, [Online]. Available:
http://www.cyphyworks.com/robots/lvl1/.
[35] R. Hibbeler, Statics and Dynamics, 12th edition, 2010.
[36] ST Microchip, “Accelerometer and Gyroscopes Sensors: Operation, Sensing,
and Applications”, 2015, [Online]. Available:
https://www.maximintegrated.com/en/app-notes/index.mvp/id/5830.
[37] ST Microchip, “Tilt measurement using a low-g 3-axis accelerometer”, 2013,
[Online]. Available: http://www.st.com/web/en/resource/technical/
document/application_note/CD00268887.pdf.
[38] V. Bahatia, Classical Mechanics: With introduction to Nonlinear Oscillations
and Chaos, Narosa Pub House, 1st edition, 1997.
[39] A. Trusov, “Overview of MEMS Gyroscopes: History, Principles of Operations,
Types of Measurements”, 2011, [Online]. Available:
http://www.alexandertrusov.com/uploads/pdf/
2011-UCI-trusov-whitepaper-gyros.pdf.
[40] Freescale, “Layout Recommendations for PCBs Using a Magnetometer
Sensor”, 2013, [Online]. Available:
cache.freescale.com/files/sensors/doc/app_note/AN4247.pdf.
[41] Freescale Semiconductor, “Tilt Sensing Using a Three-Axis”, 2013, [Online].
Available:
http://www.freescale.com/files/sensors/doc/app_note/AN3461.pdf.
[42] S. Madgwick, “An efficient orientation filter for inertial and inertial/magnetic
sensor arrays”, Tech. Rep., University of Bristol, Department of Mechanical
Engineering, Apr. 2010.
[43] P. Jan, “Reading a IMU Without Kalman: The Complementary Filter”, 2013,
[Online]. Available: http://www.pieter-jan.com/node/11.
[44] N. Nise, Control Systems Engineering, 6th edition, 2011.
[45] N Zimmerman, “Open source hardware/software quadctoper system”, 2016,
[Online]. Available: https://github.com/NateZimmer/MarqDrone.
[46] Federal Communications Commission, “Rules and Regulation for Title 47”,
2016, [Online]. Available:
https://www.fcc.gov/general/rules-regulations-title-47.
[47] C. Balanis, Antenna Theory: Analysis and Design, 4th edition, 2015.
94
[48] Maxim Integrated, “Impedance Matching and the Smith Chart: The
Fundamentals”, 2002, [Online]. Available:
https://www.maximintegrated.com/en/app-notes/index.mvp/id/742.
[49] ArduPilot Team, “Extended Kalman Filter Navigation Overview and Tuning”,
2016, [Online]. Available: http://ardupilot.org/dev/docs/
extended-kalman-filter.html#extended-kalman-filter.
[50] Neato Robotics, “LaserSmart Mapping & Navigation”, 2016, [Online].
Available:
https://neatorobotics.com/lasersmart-mapping-navigation.
[51] A. Censi, “An icp variant using a point-to-line metric”, in 2008 IEEE
International Conference on Robotics and Automation, 2008, pp. 19–25.
[52] N Zimmerman, “Marq Drone Flight Video”, 2016, [Online]. Available:
https://www.youtube.com/watch?v=cArrBF8TGZQ.
[53] S. Madgwick, “Estimation of imu and marg orientation using a gradient
descent algorithm”, in IEEE International Conference on Rehabilitation
Robotics, 2011.
[54] B. Wadell, Transmission Line Design Handbook, 1st edition, 1991.
[55] K. Lauszus, “Flight Controller for Quad Rotor Helicopter in X-configuration”,
Master’s thesis, Technical University of Denmark, the Netherlands, 2015.
[56] M. Thompson, “Lorentz Force MEMS Magnetometer”, 2010, [Online].
Available: http://www-bsac.eecs.berkeley.edu/publications/search/
send_publication_pdf2client.php?pubID=1271176542.
[57] I. Ltkebohle, “BWorld Robot Control Software”, 2008, [Online]. Available:
http://aiweb.techfak.uni-bielefeld.de/content/
bworld-robot-control-software/.
[58] Freescale Semiconductor, “Tilt Sensing Using a Three-Axis”, 2013, [Online].
Available:
http://www.freescale.com/files/sensors/doc/app_note/AN3461.pdf.
95
APPENDIX A
A A
A.2
Flight Controller Schematic
B
Marq Drone Flight Controller B
2. Power
3. Micro
C C
FC_1 FC_2
Flight_Controller2.SchDoc Flight_Controller3.SchDoc
96
D D
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
3.3V LDO
5V VBAT COD1
D1
A.3
VP1 3.3V
PID101
3 2
GND
PID103 PIV103 Vin Vout PIV102
PID102
PIC2502 COC25
C25 PIC1 02 COC11
C11
BAT54C-7-F 10uF V1
COV1
PIV10 MCP1702T-5002E/CB 10uF
1
PIC2501 0805 PIC1 01 0805
C1
COC1
Supplies VBAT 3.3V GND Clip PIC101 PIC102
P7
COP7
P8
COP8 CC2500 2.4 GHz Transciever PIF102 22pF
2
3 PIP703
DC
PIF103
1 PIP701 PIC2402 C24
COC24 3V3CC L4
COL4 P1
COP1
B 100nF 5016KCT-ND PIR302 COR3
R3 NLGDO0
GDO0 6
PIU406 GDO0(ATEST)
13 NLRF0N
RF_N
RN_N PIU4013NLRF0P
10nH Balun
UP
1 1PIP101
PIF101 B
M20-9960345
PIC2401 0603 MCR03EZPFX1002
NLGDO2
GDO2 3 12 RF_P LQW18AN10NJ00D
GND
GND
0603 PIU403 GDO2 RF_P PIU4012 PIP102 RP-SMA
CL10B104MB8NNNC
4 CONREVSMA002-G
2
NCS1 PIU407
7
CSn
CC2500 PIL402
1 F1
COF1
NLSCLK1
SCLK1 PIU401 SCLK
2.4 GHz
R16
COR16
PIF105 PIF106
5
6
2450BM15B0003E
NLMOSI1
MOSI1 20 17
PIU4020 SI RBIAS PIU4017 PIR1602 PIR1601
3.3V NLMISO1
MISO1 2 MCR01MRTF5602
8 9 NL3V3CC
3V3CC
COD2
D2
PIU408 XOSC_Q1 AVDD PIU409 PIL202 PIL201
10 11 CIM10U800NC
R21
COR21 PIU4010 XOSC_Q2 AVDD PIU4011
NLR0LED
PIR2102R_LED 14
AVDD
CLV1A-FKB-CJ1M1F1BB7R4S3
PIR2101 PIU4014
CLV1A-FKB MCR03EZPJ271 Y1
COY1 15
0603 AVDD PIU4015
1 3 3V3CC 4
270 PIY101 PIY103 PIU404 DVDD
C26
COC26 PIC2602 PIC2702 C27
COC27 5
DCOUPL
G
B
R22
COR22 NLG0LED
G_LED 18pF 18pF
PIU405
18 21 PIC1202 C12
COC12 PIC1302 C13
COC13 PIC1402 C14
COC14 PIC1502 C15
COC15 PIC10 2 C10
COC10
PIR2201 PIR2202 PIU4018 DGUARD PAD PIU4021
PID203 PID204 PID201 MCR03EZPJ271 0603 PIPIY104
C2601 4 2 PIC2701
PIY102 0603 19
PIU4019 GND GND
16
PIU4016 100nF 100nF 100nF 100nF 100nF
0603
3
4
1
CL05C180JB5NNNC
50V
PIC1702
CL05C180JB5NNNC
50V C17
COC17 PIC1802 C18
COC18 PIC2 02 C22
COC22 PIC1201 0603 PIC1301 0603 PIC1401 0603 PIC1501 0603 PIC10 1 0603
270 100nF 100nF 100nF CC2500RGPR 50V 50V 50V 50V 50V
7M-26.000MEEQ-T CL10B104MB8NNNC CL10B104MB8NNNC CL10B104MB8NNNC CL10B104MB8NNNC CL10B104MB8NNNC
R23
COR23 NLB0LED
B_LED PIC1701 0603 PIC1801 0603 PIC2 01 0603
PIR2301 PIR2302
50V 50V 50V
MCR03EZPJ271
CL10B104MB8NNNC CL10B104MB8NNNC CL10B104MB8NNNC
0603
270
R30-3001102
24
23
22
21
20
19
3
R6
COR6 PIR603 P9
COP9 PIR703 H3
COH3
2 2 R7
COR7 PIH301
CIM10U800NC
6 5 U2
COU2
SDA/SDI
nCS
SCL/SCLK
AUX_DA
RESV
PIR602 PIP906 PIP905 PIR702 CIM10U800NC
RESV
100K SDA SDA 100K R30-3001102
PIP904 4 3 PIP903 MPU-9250
NLPWM0CH1
PWM_CH1
PIR601 PIP902 2 1 PIP901 PIR701 NLPWM0CH0
PWM_CH0 H4
COH4
1
1 18 PIH401
PIU201 RESV GND PIU2018
68021-406HLF 2 17 R30-3001102
PIU202 NC NC PIU2017
PIC2102
3 16 C21
COC21 H5
COH5
PIU203 NC NC PIU2016
4 15 100nF PIH501
PIU204 NC NC PIU2015
5 14 3.3V PIC2101 0603 R30-3001102
Motor Control
AD0/SDO
NC NC
REGOUT
PIU205 PIU2014
AUX_CL
6 13 50V
VDDIO
FSYNC
PIR2802
INT
R28
COR28
MCR03EZPFX1002
SCL
PIR28010603
NLSCL
SCL
PIU207 PIU208 PIU209 PIU201 PIU201 PIU201
3
10K
7
8
9
10
11
12
R8
COR8 PIR803 P10
COP10 PIR903
2 2PIR902 R9
COR9 3.3V NLMPU0INT
MPU_INT
CIM10U800NC
PIR802 PIP1001 1 2 PIP1002 CIM10U800NC
100K SDA NLSDA
SDA
NLPWM0CH2
PWM_CH2
PIR801 PIP1003
PIP1005
3
5
4
6
PIP1004
PIP1006
PIR901100K
NLPWM0CH3
PWM_CH3 PIC1902 C19
COC19 NLMISO2
MISO2
PIC2302 COC23
C23
PIR16 01
1
10nF R161
COR161
100nF MCR03EZPJ000
68021-406HLF PIC1901 0603 PIC2301 0603 0603
CL10B103KB8SFNC
50V
CL10B104MB8NNNC
PIR16 020
97
D D
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
Micro
A COL1 5V A
L1 R1
COR1
USB_Slave PIL102 PIL101
PIC202
PIR101 PIR102
NLUSB0PWR
USB_PWR 12 MHz Crystal
CIM10U800NC C2
COC2
Kinetis SWD
M C R 03EZPFX1003
0603 R2
COR2
100nF
USB Micro PIC201 100K PIR202 PIR201
0603 1M
50V 3.3V Y2
COY2 0603
COJ1
J1 CL10B104MB8NNNC
COP2
P2 NL12MHz0Xin
12MHz_Xin 1
PIY201 3
PIY203
MCR03ERTF1004
NL12MHz0Xout
12MHz_Xout
1 NLSWD0DIO0TGTMCU PIC302 C3
COC3 PIC402 C4
COC4
A.4
SWD_DIO_TGTMCU
VCC PIJ101 MCR03ERTF33R0 PIP201 1 2 PIP202
2 NLUSB0MCU10N
USB_MCU1_N 33R39
COR39 0603 NLUSB0MCU0N
USB_MCU_N NLK22F0SWD0CLK
K22F_SWD_CLK 18pF 18pF
D- PIJ102 PIR3902 PIR3901 PIP203 3 4 PIP204
D+
3
PIJ103
NLUSB0MCU10P
USB_MCU1_P 33R40
COR40
PIR4002 0603 NLUSB0MCU0P
PIR4001 USB_MCU_P PIP205 5 6 PIP206 PIC301 0603 4
PIY204 PIY202 2 PIC401 0603
4 CL05C180JB5NNNC CL05C180JB5NNNC
ID PIJ104 MCR03ERTF33R0
PIP207 7 8 PIP208 50V 50V
5 NLRST0TGTMCU
RST_TGTMCU CX3225GB12000P0HPQCC
GND PIJ105 PIP209 9 10 PIP2010
614105150721 GRPB052VWVN-RC
3.3V 3.3V
NLSDA
SDA
PIR2602 PIR502 PIR402
R26
COR26
MCR03EZPFX1002
R5
COR5
M C R 03EZPFX1003
R4
COR4
MCR03EZPFX1002 Freescale KM22 M4 Cortex MCU GPIOS Freescale KM22 M4 Cortex MCU Power
0603
PIR2601 0603
10K PIR501100K PIR401 0603
10K U1A
COU1A
COU1B
COU1C
COU1D
COU1E 3.3V
U1E
NLSDAP 1
SDAP PIU101
PTE0/CLKOUT32K/ADC1_SE4a/SPI1_PCS1/UART1_TX/I2C1_SD A/RTC_CLKOUT 3
NLSCL
SCL 2 PIU103 VDD
PIU102 PTE1/LLWU_P0/ADC1_SE5a/SPI1_SOUT/UART1_RX/I2C1_SCL/ SPI1_SIN 30
5
USB_MCU_P PIU105 PIU1030 VDD
USB0_DP 48
6
USB_MCU_N PIU106 PIU1048 VDD
USB0_DM
B USB_PWR 7 B
PIU107 USBVDD 14
8 PIU1014VREFH
PIU108 NC 13
9 PIU1013VDDA
PIU109 ADC0_DP0/ADC1_DP3 21
10 PIU1021 VBAT
PIU1010 ADC0_DM0/ADC1_DM3
11 PIC602 PIC702 PIC802 PIC902 PIC502 C5
COC5
PIU1011 ADC1_DP0/ADC0_DP3 C6
COC6 C7
COC7 C8
COC8 C9
COC9
12 100nF
PIU1012 ADC1_DM0/ADC0_DM3 100nF 100nF 100nF 100nF
0603
MK22FN128VLH10
PIC601 0603 PIC701 0603 PIC801 0603 PIC901 0603 PIC501PIU104 4
VSS
50V 50V 50V 50V 50V
15
CL10B104MB8NNNC CL10B104MB8NNNC CL10B104MB8NNNC CL10B104MB8NNNC
PIU1015 VREFL
U1B 16
PIU1016 VSSA
17 31
VREF_OUT/CMP1_IN5/CMP0_IN5/ADC1_SE1
PIU1017 PIU1031 VSS
18
PIU1018 DAC0_OUT/CMP1_IN3/ADC0_SE2
47
PIU1047 VSS
19
PIU1019 XTAL32
20 MK22FN128VLH10
PIU1020 XTAL32
K22F_SWD_CLK 22
PIU1022 PTA0/JTAG_TCLK/SWD_CLK/EZP_CLK/UART0_CTS/FTM0_CH5
23
PIU1023 PTA1/JTAG_TDI/EZP_DI/UART0_RX/FTM0_CH6
24
PIU1024 PTA2/JTAG_TDO/TRACE_SWO/EZP_DO/UART0_TX/FTM0_CH7
SWD_DIO_TGTMCU 25
PIU1025 PTA3/JTAG_TMS/SWD_DIO/UART0_RTS/FTM0_CH0
26
PIU1026 PTA4/LLWU_P3/NMI/EZP_CS/FTM0_CH1
NLB0LED
B_LED 27
PIU1027 PTA5/USB_CLKIN/FTM0_CH2/I2S0_TX_BCLK/JTAG_TRST
NLR0LED
R_LED 28
PIU1028 PTA12/FTM1_CH0/I2S0_TXD0/FTM1_QD_PHA
NLG0LED
G_LED 29
PIU1029 PTA13/LLWU_P4/FTM1_CH1/I2S0_TX_FS/FTM1_QD_PHB
32
12MHz_Xin PIU1032
PTA18/EXTAL0/FTM0_FLT2/FTM_CLKIN0
MK22FN128VLH10
U1C
33
12MHz_Xout PIU1033
PTA19/XTAL0/FTM1_FLT0/FTM_CLKIN1/LPTMR0_ALT
34
RST_TGTMCU PIU1034
C RESET C
35
PIU1035 PTB0/LLWU_P5/ADC0_SE8/ADC1_SE8/I2C0_SCL/FTM1_CH0/FT M1_QD_PHA
36
P3
COP3 PIU1036 PTB1/ADC0_SE9/ADC1_SE9/I2C0_SDA/FTM1_CH1/FTM1_QD_PH B
NLA2
A2 37
A2 RX1 PIU1037 PTB2/ADC0_SE12/I2C0_SCL/UART0_RTS/FTM0_FLT3
PIP301 1 2 PIP302 NLA1
A1 38
A1 PIU1038 PTB3/ADC0_SE13/I2C0_SDA/UART0_CTS/FTM0_FLT
PIP303 3 4 PIP304 NLRX1
RX1 39
TX1 PIU1039 PTB16/SPI1_SOUT/UART0_RX/FTM_CLKIN0/FB_AD17/EWM_I
PIP305 5 6 PIP306 NLTX1
TX1 40
3.3V PIU1040 PTB17/SPI1_SIN/UART0_TX/FTM_CLKIN1/FB_AD16/EWM_OU
41
68021-406HLF PIU1041 PTB18/FTM2_CH0/I2S0_TX_BCLK/FB_AD15/FTM2_QD_PHA
42
PIU1042 PTB19/FTM2_CH1/I2S0_TX_FS/FB_OE/FTM2_QD_PH
43
PIU1043 PTC0/ADC0_SE14/SPI0_PCS4/PDB0_EXTRG/USB_SOF_OUT/FB_ AD14
NLPWM0CH0
PWM_CH0 44
PIU1044 PTC1/LLWU_P6/ADC0_SE15/SPI0_PCS3/UART1_RTS/FTM0_CH0 /FB_AD13/I2S0_TXD0/LPUART0_RTS
NLPWM0CH1
PWM_CH1 45
PIU1045 PTC2/ADC0_SE4b/CMP1_IN0/SPI0_PCS2/UART1_CTS/FTM0_CH 1/FB_AD12/I2S0_TX_FS/LPUART0_CTS
NLPWM0CH2
PWM_CH2 46
PIU1046 PTC3/LLWU_P7/CMP1_IN1/SPI0_PCS1/UART1_RX/FTM0_CH2/C LKOUT/I2S0_TX_BCLK/LPUART0_RX
MK22FN128VLH10
U1D
NLPWM0CH3
PWM_CH3 49
PIU1049 PTC4/LLWU_P8/SPI0_PCS0/UART1_TX/FTM0_CH3/FB_AD11/CM P1_OUT/LPUART0_TX
NLSCLK2
SCLK2 50
PIU1050 PTC5/LLWU_P9/SPI0_SCK/LPTMR0_ALT2/I2S0_RXD0/FB_AD10 /CMP0_OUT/FTM0_CH2
NLMOSI2
MOSI2 51
PIU1051 PTC6/LLWU_P10/CMP0_IN0/SPI0_SOUT/PDB0_EXTRG/I2S0_RX _BCLK/FB_AD9/I2S0_MCLK
NLMISO2
MISO2 52
PIU1052 PTC7/CMP0_IN1/SPI0_SIN/USB_SOF_OUT/I2S0_RX_FS/FB_AD 8
NLMPU0INT
MPU_INT 53
PIU1053 PTC8/ADC1_SE4b/CMP0_IN2/FTM3_CH4/I2S0_MCLK/FB_AD
NLNCS2
NCS2 54
PIU1054 PTC9/ADC1_SE5b/CMP0_IN3/FTM3_CH5/I2S0_RX_BCLK/FB_AD 6/FTM2_FLT0
55
PIU1055 PTC10/ADC1_SE6b/I2C1_SCL/FTM3_CH6/I2S0_RX_FS/FB_AD
56
PIU1056 PTC11/LLWU_P11/ADC1_SE7b/I2C1_SDA/FTM3_CH7/FB_R
57
PIU1057 PTD0/LLWU_P12/SPI0_PCS0/UART2_RTS/FTM3_CH0/FB_ALE/F B_CS1/FB_TS/LPUART0_RTS
58
PIU1058 PTD1/ADC0_SE5b/SPI0_SCK/UART2_CTS/FTM3_CH1/FB_CS0/L PUART0_CTS
NLNCS1
NCS1 59
PIU1059 PTD2/LLWU_P13/SPI0_SOUT/UART2_RX/FTM3_CH2/FB_AD4/LP UART0_RX/I2C0_SCL
NLGDO0
GDO0 60
98
PIU1060 PTD3/SPI0_SIN/UART2_TX/FTM3_CH3/FB_AD3/LPUART0_TX/I 2C0_SDA
NLGDO2
GDO2 61
PIU1061 PTD4/LLWU_P14
D NLSCLK1
SCLK1 62 D
PIU1062 PTD5/SPI0_PCS2/UART0_CTS/FTM0_CH5/FB_AD1/EWM_OUT/SP I1_SCK
NLMOSI1
MOSI1 63
PIU1063 PTD6/LLWU_P15/ADC0_SE7b/SPI0_PCS3/UART0_RX/FTM0_CH6 /FB_AD0/FTM0_FLT0/SPI1_SOU
NLMISO1
MISO1 64
PIU1064 PTD7/UART0_TX/FTM0_CH7/FTM0_FLT1/SPI1_SIN
MK22FN128VLH10
1 2 3 4 5 6 7 8
99
A.5 Flight Controller Schematic
1 2 3 4 5 6 7 8
A.6
PIR4801 PIR4802
C_BLMA
GND
PIV103 Vin Vout PIV102
ESC Schematic
PIJ502 PIP201 PIP202
4
V1
COV1 C9
COC9 C6
COC6 3 P1
COP1
5
GND_EXTPIQ2805 1, 2, 3
PIQ2803
PIQ2802
PIQ2801
1
PIV10 MCP1702T-5002E/CB
NLGND0EXT
GND_EXT
PIP203
PIP205
PIP207
3
5
7
4
6
8
PIP204
PIP206
PIP208
NLKL250SWD0CLK
KL25_SWD_CLK
NLRST0TGTMCU
RST_TGTMCU
PIC102
PIC101
C1
COC1
Cap
PIC202
PIC201
C2
COC2
Cap
PIC302
PIC301
C3
COC3
Cap
PIC702
PIC701
C7
COC7
Cap
PIC1 02
PIC1 01
C11
COC11
Cap
PIC1202
PIC1201
C12
COC12
Cap
3
2
PIP103
PIP102
NLSCL
SCL
NLSDA
SDA
PIP209 9 10 PIP2010
100nF 100nF 100nF 100nF 100nF 100nF 1 PIP101
Q28
COQ28 614105150721
PSMN011-60MLX PIJ50Z2 PIJ50Z1 Header 5X2 Header 3
1 Phase A VP1
1 Phase B VP1
1 Phase C VP1
EXT LED
NLLED
LED
D1 D3 D4
VP1 COD1
PIQ105 VP1 COD3
PIQ205 VP1 COD4
PIQ305 PID601
5
5
1N4148WFL-G3-08
NLA0Pump
A_Pump 1N4148WFL-G3-08
NLB0Pump
B_Pump 1N4148WFL-G3-08
B PID101 PID102
SOD-123 4 Q1
COQ1 PID301 PID302
SOD-123 4 Q2
COQ2 PID401 PID402
SOD-123 4 Q3
COQ3 D6
COD6 B
PIQ104 PIQ204 PIQ304
PIC1402 PSMN011-60MLX PIC1502 PSMN011-60MLX PIC3202 PSMN011-60MLX LED3
C14
COC14 U3
COU3
NLGate0A0H
Gate_A_H
PIC3 02 PIQ1032 C15
COC15 U4
COU4
NLGate0B0H
Gate_B_H
PIC3402 PIQ2031 C32
COC32 U5
COU5
NLGate0C0H
Gate_C_H
PIC3502 PIQ3021 PID602
1, 2, 3
1, 2, 3
1, 2, 3
100nF PIC1401 4 1 C33
COC33 100nF PIC1501 4 1 C34
COC34 100nF PIC3201 4 1 C35
COC35 PIR4 01
PIU304 Vcc BST PIU301 PIU404 Vcc BST PIU401 PIU504 Vcc BST PIU501
8 100nF PIC3 01 NLOUT1
OUT1 8 100nF PIC3401 NLOUT2
OUT2 8 100nF PIC3501 NLOUT3
OUT3 R44
COR44
DRVH PIU308 DRVH PIU408 DRVH PIU508
SWN
7
PIU307
PIQ405 SWN
7
PIU407
PIQ605 SWN
7
PIU507
PIQ705 33
5
5
A_BLMH 3
PIU303 OD DRVL
5
PIU305 B_BLMH 3
PIU403 OD DRVL
5
PIU405 C_BLMH 3
PIU503 OD DRVL
5
PIU505 PIR4 02
A_BLML 2 6 NLGate0A0L
Gate_A_L 4 Q4
COQ4 B_BLML 2 6 NLGate0B0L
Gate_B_L 4 Q6
COQ6 C_BLML 2 6 NLGate0C0L
Gate_C_L 4 Q7
COQ7
PIU302 IN PGND PIU306 PIQ404
PSMN011-60MLX
PIU402 IN PGND PIU406 PIQ604
PSMN011-60MLX
PIU502 IN PGND PIU506 PIQ704
PSMN011-60MLX
ADP3110A
PIQ40321 ADP3110A
PIQ60321 ADP3110A
PIQ70321
1, 2, 3
1, 2, 3
1, 2, 3
A_BLMA R28
COR28 B_BLMA R37
COR37 C_BLMA R39
COR39
PIR2802 PIR2801 PIR3702 PIR3701 PIR3902 PIR3901
PIC10 2 PIR3 01 20k PIC3802 PIR40 1 20k PIC3902 PIR4101 20k
C10
COC10 R33
COR33 C38
COC38 R40
COR40 C39
COC39 R41
COR41
100pF PIC10 1 10K 100pF PIC3801 10K 100pF PIC3901 10K
PIR3 02 PIR40 2 PIR4102
100
D D
Title
Sensorless Brushless Motor Controller
Size Number Revision
A3 Rev 1
Date: 9/7/2015 Sheet of
File: C:\Users\..\ESC3.SchDoc Drawn By: Nathan Zimmerman
1 2 3 4 5 6 7 8
101
A.7 ESC Schematic
102
A.8 ESC Schematic
1 2 3 4 5 6 7 8
Reset Button
Lithium Charger
Lipo Protection & Power System 5V
NLBUTTON06
BUTTON_6 PISW603 3
SW6
COSW6
4
PISW604
A
5V
COU1
U1
5V PID102 PID10 3.3V LDO Reg
1
PISW601 2
PISW602
A
PIU104
4
VDD VBAT PIU103
3
PIQ301 PIQ401 Vreg 1825910-7
PIC201
PROG PIU105 5
PIR101
R1
COR1 PIC301
Backup Q1
COQ1
S
Q2
COQ2
SIQ302
Q3
G
COQ3
PMUX PID103 D1
COD1
Bat45C
3
MCP1702 3.3V Reg
2
3.3V
GND
C2
COC2 10K C3
COC3 PIQ103 PIQ102 PIQ202
PIR202 PIQ203
PIQ302
P PIQ303
PIQ403
P IQ403 PIQ402 PIV103 Vin Vout PIV102
Reverse
A.9
PIU101 CE VSS PIU102 UVLO COQ4
Q4
PIU302 PIC801
PIQ10 2MEG
PIQ201
G 10uF
PIC402399-3699-6-ND PIC602
C6 COV1
COC6 V1
PIV10 C7
COC7 10uF
1uF PIC50399-3699-6-ND
3.3V
1
MCP73812 C8
COC8 PIR201 1uF PIC702 2
U3
COU3
CR2
PIC802 100nF PIR502
R5
COR5
1MEG COS1
PIU301 BH-CR2-PC
PIR501
S1
PI 301 PI 304 PI 401 PI 40
RF Controller Schematic
PIS101 PIS102
4
SW-SPST
P3
COP3 P4
COP4
VCC
VCC
VCC
VCC
1-1735446-2 1-1735446-2
POT_0 POT_2
2 5 POT_1 2 5 POT_3
PIP302 OUT_1 OUT_2 PIP305 PIP402 OUT_1 OUT_2 PIP405
Reset Button Reset Button Reset Button Reset Button Reset Button
GND
GND
GND
GND
SW5
COSW5 SW3
COSW3 SW4
COSW4 SW1
COSW1 SW2
COSW2
NLBUTTON05
BUTTON_5 PISW503
3 4
PISW504
NLBUTTON03
BUTTON_3 3
PISW303
4
PISW304
NLBUTTON04
BUTTON_4 PISW403
3 4
PISW404
NLBUTTON01
BUTTON_1 PISW103
3 PISW104
4 NLBUTTON02
BUTTON_2 PISW203
3 4
PISW204
PI 30 PI 306 PI 403 PI 406
6
PISW501 1 2
PISW502 1
PISW301 2
PISW302 PISW4011 2
PISW402 PISW1011 PISW102 2 PISW2011 2
PISW202
D3
COD3 D4
COD4
POWER_LED PID301
NLPOWER0LED 1 2
PID302 R6
PIR601
COR6 33
PIR602 STATUS_LEDPID401
NLSTATUS0LED 1 2
PID402 R8
COR8
PIR801 33
PIR802 C1
COC1
PIC101 PIC102
LG R971-KN-1
D5
COD5
GND
LG R971-KN-1
D7
COD7 GND CC2500 2.4 GHz Transciever PIF102 22pF
2
EXTRA_LED
NLEXTRA0LED 1
PID501 2
PID502 R9
COR9
PIR901 33
PIR902
TX_LED
NLTX0LED 1
PID701 2
PID702 R10
COR10
PIR1001 33
PIR1002 3.3VC
U4
COU4 PIL401 3
PIF103 BP_N
DC
LG R971-KN-1
L4
COL4 P1
COP1
PIR302 R14
COR14
LEDS GND 6 13 NLRF0N 10nH 1 1PIP101
LG R971-KN-1
NLGDO0
GDO0 PIU406 GDO0(ATEST)
RF_N Balun NLSMA0IN
SMA_IN
R3
COR3 RN_N PIU4013NLRF0P UP PIF101 PIR1402 PIR1401
GND NLGDO2
GDO2 3 12 RF_P PIC10 2 10K
GND
GND
10K
PIU403 GDO2 RF_P PIU4012 C10
COC10
4
PIF104 BP_P
PIC1602 SMB PIP102
2
PIR301 NLCSN
CSN 7
PIU407 CSn
CC2500 PIL402 PIC10 1 1pF C16
COC16
PIC1601 1pF
USB_Slave L1
COL1 5V NLSCLK
SCLK 1
PIU401 SCLK
2.4 GHz
R16
COR16
PIF105 PIF106 F1
COF1
5
6
NLMOSI
MOSI 20
PIU4020 SI
17 BALUN_2_4_GHZ
PIL102 PIL101 RBIAS PIU4017 PIR1601 PIR1602
FB PIC901 PIC1 01 NLMISO
MISO 2
PIU402 SO(GDO1) 56K
C9
COC9 C11
COC11
USB Mini B
ED2992CT-ND
PIC902 100nF PIC1 02 10uF 3.3V
USB_1
COUSB01 8 9
PIU408 XOSC_Q1 AVDD PIU409
1 10 11
VBUS PIUSB0101 PIU4010 XOSC_Q2 AVDD PIU4011
2 NLU0N
U_N R17
COR17 33 USB_MCU_N 14
DM PIUSB0102 PIR1701 PIR1702 AVDD PIU4014
Shield
Shield
Shield
Shield
3 NLU0P
U_P R4
COR4 33 USB_MCU_P Y1
COY1 3.3V 15
DP PIUSB0103 PIR401 PIR402 AVDD PIU4015
GND
5
PIUSB0105 3.3VC
Kinetis SWD PIPIY101
C2COC26
6C26
02
1 3
PIY103
PIC2COC27
702
C27
4
PIU404
5
DVDD
D2
COD2 PIP201 1 2 PIP202
NLSWD0DIO0TGTMCU
SWD_DIO_TGTMCU PIC2618pF
01 4
PIY104
2
PIY102
PIC218pF
701 19
PIU4019 GND GND
16
PIU4016
C12
COC12 C13
COC13 C14
COC14 C15
COC15
Bat54A NLKL250SWD0CLK
KL25_SWD_CLK PIC1701 PIC1801 PIC2 01 PIC1202 100nF PIC1302 100nF PIC1402 100nF PIC1502 100nF
C PIP203 3 4 PIP204 C
C17
COC17 C18
COC18 C22
COC22 CC2500_2_4_ghz
PID203 PIP205
PIP207
PIP209
5
7
9
6
8
10
PIP206
PIP208
PIP2010
NLRST0TGTMCU
RST_TGTMCU
26MHz
PIC1702 100nF PIC1802 100nF PIC2 02 100nF
Header 5X2
3.3V
PIL302
L3
COL3
PIL301
Kinetis Bank A U2A
COU2A
COU2B
COU2C
COU2D Kinetis Bank B EXTAL+ R42
COR42
PIR4201
1M
PIR4202
NLEXTAL0
EXTAL- Kinetis Bank C Kinetis Bank D
PIC3 01 10nH PIC3401 3.3VC NLCMP0OUT
CMP_OUT PIU201
1
PTE0/CMP_OUT
U2B Y2
COY2 U2C U2D
C33
COC33 C34
COC34 2 17 1 3 33 49
PIU202 PTE1 PIU2017 PTE29/CMP5 PTA19 PTC4/LLWU_P8
PIC3 02 100nF PIC3402 10uF COC28
C28 PIC2802 3 PIU203 VDD
18
PIU2018 PTE30/CMP4
PPIY201
IC2COC29
902
C29
PIY203
C30 PIC30 2
COC30
PIU2033
34
PIU2034 PTA20
50
PIU2049
BUTTON_1 PIU2050
PTC5/CMP_OUT
100nF 4 19 35 51
BUTTON_2 PIU2051
PIU204 VSS PIU2019 PTE31 PIU2035 PTB0/LLWU_P5 PTC6/CMP0
PIC2801 NLUSB0MCU0P 5
USB_MCU_PPIU205
USB0_DP
20
PIU2020 PTE24
PIC218pF
901 4
PIY204
218pFPIC30 1
PIY202
POWER_LED 36
PIU2036 PTB1
52
BUTTON_3 PIU2052
PTC7/CMP1
3.3VC NLUSB0MCU0N 6
USB_MCU_NPIU206 21 3.3VC STATUS_LED 37 53
BUTTON_4 PIU2053
USB0_DM PIU2021 PTE25 PIU2037 PTB2 PTC8/TMP0_4
3.3VB 7 22
KL25_SWD_CLK PIU2022 12MHz EXTRA_LED 38 54
BUTTON_5 PIU2054
L6
COL6 PIU207 VOUT33 PTA0 PIU2038 PTB3 PTC9/TMP0_5
PIL602 PIL601
5V 8
PIU208 VREGIN
23
PIU2023 PTA1
PIR4302 TX_LED 39
PIU2039 PTB16
55
BUTTON_6 PIU2055
PTC10
10nH PIC1901 PIC20 1 POT_0
ADC_SE0 NLPOT00 9
PIU209 PTE20
24
PIU2024 PTA2
R43
COR43 40
PIU2040 PTB17
56
PIU2056 PTC11
C19
COC19 C20
COC20 POT_1
ADC_SE4 NLPOT01 10 SWD_DIO_TGTMCU 25 10k 41 HAD TO CHANGE CSN 57
10uF 100nF ADC_SE3 NLPOT02
PIU2010 PTE21 PIU2025 PTA3 PIU2041 PTB18 PIU2057 PTD0
PIC1902 PIC20 2 POT_2 11
PIU2011 PTE22
26
PIU2026 PTA4
PIR4301 RST_TGTMCU 42
PIU2042 PTB19 SPI0_SCK SCLK 58
PIU2058 PTD1
3.3VC POT_3
ADC_SE7 NLPOT03 12
PIU2012 PTE23
27
PIU2027 PTA5
PIC2102 ADC_SEL14 43
PIU2043 PTC0
SPI0_MOSI MOSI 59
PIU2059 PTD2
13 3.3VC 28 C21
COC21 ADC_SEL15 44 SPI0_MISO MISO 60
L2
COL2 PIU2013 VDDA PIU2028 PTA12 PIC2101 100nF PIU2044 PTC1/LLWU_P6/RTC_CLKIN PIU2060 PTD3
14 29 ADC_SEL11 45 GDO0 61
PIL202 PIL201 PIU2014 VREFH PIU2029 PTA13 PIU2045 PTC2 PIU2061 PTD4/LLWU_P14
PIC2502 FB PIC3102 PIC2302 15
PIU2015 VREFL
PIC2402 30
PIU2030 VDD
46
PIU2046 PTC3/LLWU_P7
GDO2 62
PIU2062 PTD5
103
C25
COC25 L5
COL5 C31
COC31 C23
COC23 16 C24
COC24 31 PIC3202 47 ADC_SEL07 63
1uF 1nF
PIU2016 VSSA 100nF
PIU2031 VSS C32
PIU2047 VSS PIU2063 PTD6/LLWU_P15
1uF PIC2501 PIC3101 PIC2301 PIC2401 NLEXTAL0
EXTAL+ 32 3.3VC COC32 48 64
PIL502 PIL501 PIU2032 PTA18 100nF
PIU2048 VDD PIU2064 PTD7
D FB MKL25Z64VLH4 PIC3201 D
MKL25Z64VLH4 MKL25Z64VLH4 MKL25Z64VLH4
P6
COP6 P5
COP5 Title
PIP601 1 PIP501 1
PIP602 2 PIP502 2
Size Number Revision
PIP603 3 PIP503 3
1
PIP604 4 PIP504 4 A3
Header 4 Header 4 Date: 10/4/2015 Sheet of
File: C:\Users\..\RF_Controller.SchDoc Drawn By: Kellen Carey
1 2 3 4 5 6 7 8
104
A.10 RF Controller Schematic
PAP500 COP5
COP1
PAP101 COP6 PAP601
A.11
PAP102
COC16 PAC1602 PAC1601
PAR1401
COR14
RF Controller Schematic
PAR1402 COR42
COQ2
PAR501 PAR502 PAR201 PAR202
COQ1 PAR1602
COL4
PAU4015 PAU4014 PAU4013 PAU4012 PAU401
PAC1401 PAC1501 PAC2702 PAC2701 PAC2802
PAC2502
PAC2402
PAC2902
PAC3002
PAC302
PAC202
PAC102
PAC902
PAC802
PAC702
PAC602
PAC1502
PAC1402
PAC1302
PAC1202
PAC1802
PAC1702
PAC2002
PAC2202
PAC3302
PAC3202
PAC1002
PAC3102
PAC2302
PAC2602
PAC2702
PAC2102
PAC1602 COL3 PAC3402 PAR4302 PAU203 PAU2031 PAU203 PAU209 PAU208 PAU207 PAU206 PAU205 PAU204 PAU203 PAU20 PAU201 PAU20 PAU2019 PAU2018 PAU2017 COC23 COC31 COL2 COL5
COC2
PAC301 PAC302 PAQ203 PAQ103 PAC801 PAU302 PAC2201
PAU4017
PAU4018
PAU4019
PAU4020
PAU4021 PAU409
PAU408
PAU407
PAU406
COU4
PAY104 PAY101 PAU301 COR43 PAC2102
PAU2034
PAU2035
PAU2036
PAU2037
PAU2015
PAU2014
PAU2013
PAU2012
PAC2302 PAC3102 PAL202 PAL502
PAC201 COC21 PAC2502 PAC2501
PAU103 PAU102 PAU101 COC8 COC22 PAC2202 PAU401 PAU402 PAU403 PAU40 PAU405 PAC2101
PAU2038
PAU2039
PAU2040
PAU2011
PAU2010
PAU209
PAC1101 PAC1102
PAC202 PAQ302 PAQ301 PAQ402 PAQ401 COC11 COC25
PAC2601 PAC2602 COC26 PAU2041
PAU2042
PAU2043
PAU208
PAU207
PAU206
PAC2001 PAC2002 COC20
PAC1701 PAC1801 PAU2044 PAU205
COU2 PAC2802
PAC702 PAU2049 PAU205 PAU2051 PAU205 PAU2053 PAU2054 PAU205 PAU2056 PAU2057 PAU2058 PAU2059 PAU206 PAU2061 PAU206 PAU2063 PAU2064 COC28
PAL302 PAR401
PAL202
PAL602
PAR4302
PAR302
PAR4202
PAL502
PAR1602
PAR1002
PAR902
PAR802
PAR602
PAR102
PAR202
PAR1402
PAL102
PAR502
PAL402
PAR1702
PAR402 PAL601
PAL301
PAL101
PAR301
PAR4201
PAL501
PAL201
PAR601
PAR801
PAR901
PAR1001
PAR201
PAR101
PAR501
PAR1601
PAL401
PAR4301
PAR1401
PAR1701
PAC501 PAC701
COC7
PAV103 COV1
PAC602
PAC601 PAC501 PAD103
PAC401
COD1
PAR301 PAR302
COL6
COC4
COC5 COC6
PAP3012 PAP401
PAP301 COR3
PAP3011 PAP302
PAP402
PAP3010 PAP303
PAP403
PAP309 PAP304
PAP404
PAP308 COP3 COP4 PAP405
PAP305
PAP307 PAP406
PAP306
PAP306 PAP407
PAP305 PAP408
PAP304 PAP409
PAP303 COR17 COR4
PAP4010
PAP501 PAP302
PAP301 COC9
PAC901 PAC902
PAR1702 PAR402
PAR1701 PAR401 PAP4011
PAP4012
PAP600
PAD203
COR6 COR8 COR9 COR10 COSW3
PAL101 PAL102 COD2
COSW1 COSW4 COSW6 COSW2 COSW5
COL1 PAD201 PAD202
PAR602 PAR802 PAR902 PAR1002
PASW104
PASW204
PASW304
PASW404
PASW504 PASW102 PASW404
PASW202
PASW302
PASW402
PASW502
PASW602 PASW402 PASW304 PASW302 PASW604 PASW602 PASW204 PASW202 PASW504 PASW502
COUSB01 PAUSB0106 PAUSB01 PAUSB012 PAUSB013 PAUSB014 PAUSB015 PAUSB0109
PAR601 COD3 PAR801 PAR901 PAR1001
COP2
105
1 2 3 4 5 6 7 8
COR5
R5 R6
COR6 10K
PIQ10
AOD4189
OC Tripped LED
PID10 Output On PIR902
10K
PIR901 PID303
PID301
PID403
PID401
1L_ExternPIP1203
1H_ExternPIP1205
3
5
4
6
PIP1204
PIP1206
NL3A0Extern
3A_Extern
NL3L0Extern
3L_Extern
10K 10K PIR302 COD1
D1
PIQ20 2A_ExternPIP1207
7 8 PIP1208
NL3H0Extern
3H_Extern
PIR502 PIR601 LED3 PIQ303COQ3 PIC401 PIC501
PIR802 C? Needs to be added
PID102 MC_Pump PIQ301 Q3 Q2
COQ2
Bat54A
C4
COC4
Bat54A
C5
COC5
NL2L0Extern
2L_ExternPIP1209
P12
COP12 9 10 PIP12010
A.12
PIQ201
3
R8
COR8 PIU103 PIU102 VPump PIR1301 PMOS-2 PIC402 10uF PIC502 10uF
100K 3.3V PIR10 1 R13
COR13 PIQ302 PIQ401 PIQ203 IRLML2246
Power Rails
1-
R15
1+
C27 U1B L1 5V
U1A
COU1A
COU1B PIC2701 100nF R12
COR12 47K
2N7002P
2N7002P,215
USB_Slave PIL102 PIL101
PIP102 2
PIP103 3
LM358 100K PIR1 02 6PIU106
2-
FB PIC101 PIC201 PIP104 4
PIU101 PIR1201 7 C1
COC1 C2
COC2
Shield
Shield
Shield
Shield
Feedback to MCU DNP MC78M05CDTGOS-ND 3 NLU0P
U_P R4
COR4 33 NLUSB0MCU0P
USB_MCU_P
COR18
R18 PIR1702 COR19
R19 COQ5
Q5 DP PIUSB0103 PIR401 PIR402
5 3.3V
ESC_I_FB PIR1802 PIR1801 PIR1901 PIR1902 GND PIUSB0105
Kinetis SWD
10K 10K 2 3
PID20 PID201
GND
PIC40 2 PIC1202 1 PIP301 PIQ504 PIQ503 PIV102 Vin Vout PIV103
PIQ603COQ6 COP2
P2
PIUSB016 PIUSB017 PIUSB018 PIUSB019
6
7
8
9
C40
COC40 OC_RESET PIQ601 Q6 C12
COC12 P3
COP3 PIC702 PMOS-2 PIC802 PIC902 PIC601 C6
COC6 D2
COD2 PIP201
1 2 PIP202
NLSWD0DIO0TGTMCU
SWD_DIO_TGTMCU
PIC40 1 PIR20 1 PIC1201 C7 C8 C9 R7
COR7
100nF Latch Release
PIQ602 100nF COC7
PIQ501 AOD4189 COC8 V1
COV1
PIV10 DPAK
COC9 10uF PIR702 PIR701
Bat54A PIP203 3 4 PIP204
NLKL250SWD0CLK
KL25_SWD_CLK
1
R20
COR20 PIC701 Cap PIC801 Cap PIC901 Cap PIC602
PID203
Verified
1 Phase A D7
COD7
VP1
1 Phase B D9
COD9
VP1
1 Phase C D8
COD8
VP1
Standoffs VBAT
PID703
PID702
PIQ704 PID903
PID902
PIQ804 PID803
PID802
PIQ904 NLNC10ST
NC1_ST
H1
COH1
PIH101
PID501 COD5
VP1 NLA0Pump
A_Pump VP1 NLB0Pump
B_Pump VP1 D5
PID701 PID901 PID801 stand_off
PIC1402 Bat54A PIR2102
R21
COR21
PIR2101
PIQ701
Q7
COQ7
PIC1502 Bat54A PIR2202
R22
COR22
PIR2201
PIQ801
Q8
COQ8
PIC3202 Bat54A PIR2302
R23
COR23 PIQ901
PIR2301
Q9
COQ9
NLNC20ST
NC2_ST
COH2
H2
PIH201
PID502 LED3
C14
COC14 U3
COU3 0 PIC3 02 PIQ703 NTD5804NT4G C15
COC15 U4
COU4 0 PIC3402 PIQ803 NTD5804NT4G C32
COC32 U5
COU5 0 PIC3502 PIQ903 NTD5804NT4G
stand_off
100nF PIC1401 4
PIU304 Vcc BST
1
PIU301 C33
COC33 100nF PIC1501 4
PIU404 Vcc BST
1
PIU401 C34
COC34 100nF PIC3201 4
PIU504 Vcc BST
1
PIU501 C35
COC35
H3
COH3 PIR4501
DRVH
8
PIU308 100nF PIC3 01 NLOUT1
OUT1 1
PIP901 1 DRVH
8
PIU408 100nF PIC3401 NLOUT2
OUT2 PIP1001 1 DRVH
8
PIU508 100nF PIC3501 NLOUT3
OUT3 PIP1101 1
NLNC30ST
NC3_STPIH301
R45
COR45
PIC1302 PIC3602 PIC3702 1K
A_BLMH_1 3
PIU303 OD
SWN
DRVL
7
PIU307
5
PIU305
R24
COR24
PIQ1304 COQ13
C13
COC13 P9
COP9 NLB0BLMH01
B_BLMH_1 3
PIU403 OD
SWN
DRVL
7
PIU407
5
PIU405
R25
COR25
PIQ10 4 C36
COC36 P10
COP10 NLC0BLMH01
C_BLMH_1 3
PIU503 OD
SWN
DRVL
7
PIU507
5
PIU505
R26
COR26
PIQ1 04 C37
COC37 P11
COP11 stand_off
COH4
H4
PIR4502
A_BLML_1 2 6 Q13 100nF PIC1301 NLB0BLML01
B_BLML_1 2 6 Q10
COQ10 100nF PIC3601 NLC0BLML01
C_BLML_1 2 6 Q11
COQ11 100nF PIC3701 NLNC40ST
NC4_ST
PIU302 IN PGND PIU306 PIR2402 PIR2401
PIQ1301 PIU402 IN PGND PIU406 PIR2502 PIR2501
PIQ1001 PIU502 IN PGND PIU506 PIR2602 PIR2601
PIQ1101 PIH401
0 0 0 stand_off
PIR2901 PIR30 1 ADP3110A
PIQ130 NTD5804NT4G PIR3101 PIR3201 ADP3110A
PIQ10 3 NTD5804NT4G PIR3401 PIR3501 ADP3110A
PIQ1 03 NTD5804NT4G
R29
COR29 R30
COR30 R31
COR31 R32
COR32 R34
COR34 R35
COR35
10K 10K A_BLMA_1 R27 COR27 A_FB R28
COR28 10K 10K NLB0BLMA01
B_BLMA_1 R36 COR36 B_FB R37
COR37 10K 10K NLC0BLMA01
C_BLMA_1 R38
COR38 NLC0FB
C_FB R39
COR39
PIR2702 PIR2701 PIR2802 PIR2801 PIR3602 PIR3601
PIR2902 PIR30 2 1k PIC10 2 PIR3 01 20k PIR3102 PIR3202 1k PIC3802 PIR40 1 PIR370220k PIR3701
PIR3402 PIR3502 PIR3802
1k
PIR3801
PIC3902 PIR4101 PIR3902
20k
PIR3901
C10
COC10 R33
COR33 C38
COC38 R40
COR40 C39
COC39 R41
COR41 P8
COP8
100pF PIC10 1 10K 100pF PIC3801 10K 100pF PIC3901 10K PIP801 GND
PIR3 02 PIR40 2 PIR4102
GND_CLIP
5016KCT-ND
C C
1
A_BLMH PIP403
3 4 PIP404
NLA0BLMH01
A_BLMH_1 PIP1302 2
B_BLMH PIP503
3 4 PIP504
B_BLMH_1
PIP1402 2
C_BLMH PIP603
3 4 PIP604
C_BLMH_1PIP1502 2
R47 100K
COR47
PIR4701
PIR4702
NLB0FB
B_FB PIC2801 PIC1 01 PIC2901 PIC30 1
A_BLMA PIP405 NLA0BLMA01
A_BLMA_1 B_BLMA PIP505 B_BLMA_1 C_BLMA PIP605 C_BLMA_1 NLNeutral
Neutral
5 6 PIP406 PIP1303 3 5 6 PIP506 PIP1403 3 5 6 PIP606 PIP1503 3 COR48 PIC2390uF
802 PIC390uF
1 02 PIC2390uF
902 PIC3390uF
02
R48 100K
PIR4801
PIR4802
C_FB
2
Header 3X2 Header 3 Header 3X2 Header 3 Header 3X2 Header 3
106
PIU209 PTE20 PIU2024 PTA2 PIU2040 PTB17 PIU2056 PTC11
C19
COC19 C20
COC20 10
PIU2010 PTE21
SWD_DIO_TGTMCU 25
PIU2025 PTA3
10k 2H_Extern 41
PIU2041 PTB18
PIR4 01 TMP0 NLA0BLML
A_BLML 57
PIU2057 PTD0
D PIC1902 10uF PIC20 2 100nF 11 26 PIR4301 RST_TGTMCU NLMC0Pump
MC_Pump 42 R44
COR44 TMP1 58
NLB0BLML PIU2058
B_BLML D
PIU2011 PTE22 PIU2026 PTA4 PIU2042 PTB19 PTD1
3.3V 12
PIU2012 PTE23
27
PIU2027 PTA5
PIC2102 ADC_SEL14 A_BLMA 43
PIU2043 PTC0
33 TMP2 NLC0BLML
C_BLML 59
PIU2059 PTD2
13 3.3V 28 C21
COC21 ADC_SEL15 B_BLMA 44 PIR4 02 TMP3 A_BLMH 60
NLA0BLMH PIU2060
L2
COL2 PIU2013 VDDA PIU2028 PTA12 PIU2044 PTC1/LLWU_P6/RTC_CLKIN PTD3
PIL202 PIL201
14
PIU2014 VREFH
29
PIU2029 PTA13
PIC2101 100nF ADC_SEL11 NLC0BLMA
C_BLMA 45
PIU2045 PTC2
61
PIU2061 PTD4/LLWU_P14
PIC2502 FB PIC2 02 PIC2302 15
PIU2015 VREFL
PIC2402 30
PIU2030 VDD
3H_Extern 46
PIU2046 PTC3/LLWU_P7
62
PIU2062 PTD5
C25
COC25 L3
COL3 C22
COC22 C23
COC23 16
PIU2016 VSSA
C24
COC24 31
PIU2031 VSS
PIC2602 47
PIU2047 VSS
ADC_SEL07 63
NLESC0I0FB PIU2063
ESC_I_FB
PTD6/LLWU_P15
1uF PIC2501 PIC2 01 1uF PIC2301 1nF PIC2401 100nF EXTAL+ 32 3.3V C26
COC26 48 OC_RESET 64
NLOC0RESET PIU2064
PIL302 PIL301 PIU2032 PTA18 PIU2048 VDD PTD7
FB MKL25Z64VLH4 PIC2601 100nF
MKL25Z64VLH4 MKL25Z64VLH4 MKL25Z64VLH4
1 2 3 4 5 6 7 8
A.13
PAH101 COC30 PAD101 PAD102
PAH301
PAQ704
COH1 PAD702 PAC3302 PAR1002
PAR2001 PAQ601 COR24
PAP401 PAP402 PAP1301 PAD703
PAQ1304
COP7 COD4 PAQ202 COP9
PAD401 PAD301
PAR102 PAD403 PAD303 COR9 COR15
PAU302 PAU307
COR27 PAR2702
COR46 PAR4601
COC14
PAC2902 PAU305
PAR101 PAR801
COU1
PAR1702 PAR1701 PAR1102 PAR1101 PAR1401 PAR1402 PAC4001 COC40
PAQ302 COQ3 PAQ402 COQ4
COP14 COR33 PAR2502 PAR2501
PAR2101
COP5 COC10
P A Q 1 0 3 PAQ10 1
PAQ804
COD6 COR44 PAD902 PAC3402 COR21
COR8 COR25
COR1 COR17 COR11 COR14
PAD601 PAD602 PAR4401 PAR4402 PAR3202 PAD903 COC34
COC16
PAC4002
COU2
PAU2064 PAU2063 PAU206 PAU2061 PAU206 PAU2059 PAU2058 PAU2057 PAU2056 PAU205 PAU2054 PAU2053 PAU205 PAU2051 PAU205 PAU2049 COC26
PAP501 PAP502 PAP1401 COR32 PAR3201 COD9 PAD901 PAC3401 COQ10
PAV104
PAR4501 PAR4502 PAC2001 PAC1602 COU4 COP10
COR45 PAC2601
COC20 PAP503 PAP504 PAP1402 PAP1001
PAQ1004
PAU201 PAU2048
PAC321098 2
PAU209 PAU2040
PAC1901
COC7
PAC701
COC2
PAC201 PAC202
PAR202
PAR201
PAR402
PAR401 PAC1902
COC22COC23
PAC2202 PAC2302
PAU2010
PAU2011
PAU2012
PAU2013
PAU2039
PAU2038
PAU2037
PAU2036
COR31 PAR3102 PAR3101 COC15
COR36 PAR3602 PAR3601 PAC1502 PAC1501 PAR3702 PAR3701COR37 PAR2202
PAQ801 COQ9
PAQ803 COC36
PAC3602
PAV101 PAV103 PAC601
PAU2014 PAU2035
PAC321098 1 PAUSB0106 PAUSB01 PAUSB01 2PAUSB01 3PAUSB01 4PAUSB01 5 PAUSB0109 COC17 COR42
PAC1701 PAC1702 PAR4201 PAR4202 PAC1802 PAC1801 PAC2402 PAC2401
COC18 COC24
PAQ504
PAU503 PAU506
COH2 PAUSB010 PAU504 PAU505 PAR2302
COY1 COC32
PAQ901 PAQ903 COC37
PAH201 PAUSB0107
COUSB01
PAUSB0108 PAY101 PAY102 PAP1209 PAP1207 PAP1205 PAP1203 PAP1201
COP12
PAP12010 PAP1208 PAP1206 PAP1204 PAP1202
COR38 PAR3802
COR48
PAR3801 PAC3202 PAC3201 PAR3902 PAR3901 COR39
PAR4801 PAR4802 PAC3901 PAC3902 PAR4102 PAR4101COR41
COC39
PAR2301
COR23
PAC3702 COH4
PAC3701
PAH401
107
108
APPENDIX B
impedance of a microstrip line where w is the width of the track, r is the relative
permittivity, t (not shown) is the copper weight, and h is the height of the
εr h
" 2 #
r + 1 r − 1 1 W
ef f = + · q + 0.04 1 −
2 2 12h
1+ W h
" #
t 4e
∆W = · ln 1/π 2
π 2
(t/h) + w/t+1.1
!
1 + 1/ r
∆W 0 = ∆W
2 (B.1)
W 0 = W + ∆W 0
120π
Zo = √ √ · ln 1+
2 · 2 · π · r + 1
r !
4h 14 + 8/ef f 4h 14 + 8/ef f 2 4h 2 1 + 1/ef f
· · 0+ ( ) · ( 0) + · π2
W0 11 W 11 W 2
109
b
a
εr h
a
k=
b
tanh( π·a
4·h
)
kl = π·b
tanh( 4·h )
√
kl0 = 1 − kl2
√
k0 = 1 − k2
Z π/2 (B.2)
1
K(k) = p dθ
0 1 − k · (sin(θ))2
2
r ·K(k0 )·K(kl)
1+ K(k)·K(kl0 )
ef f = K(k0 )·K(kl)
1+ K(k)·K(kl0 )
60π 1
Zo = √ · K(k) K(kl)
ef f +
K(k0 ) K(kl0 )