You are on page 1of 21

Stanford Unmanned Aerial Vehicle Enthusiasts Engineers and Entrepreneurs

 About
 Rules/Safety
 Wall
 Calendars
 Projects
 Education
 Members
 Contact

101 Guide for Fixed-Wing UAVs


Posted on October 14, 2014 by Steve Krukowski

This is a simple guide of what to buy, how to put it together and how to integrate a
Foam Fixed-Wing UAV. A UAV is composed of three parts: (1) an RC airframe, (2)
an autopilot board and software and (3) a Ground Control Station & Telemetry Link.
By the end of this project you will have successfully integrated all of this together,
and will be ready to go out to the field to perform Autonomous Flights.
Fixed-Wing 101 Guide
Contents
 1 Fixed-Wing 101 Guide
o 1.1 Hardware overview
o 1.2 APM and 3DR Radio Configuration/Communication
o 1.3 Ground Control Software
o 1.4 Aircraft Parameters
o 1.5 RC and APM Integration
o 1.6 Ardupilot Flight Modes
o 1.7 Li-Po Battery Fundamentals
o 1.8 APM Sensor Calibration
o 1.9 FBWA Mode Bench Test
o 1.10 Flight Plans
o 1.11 Geofences
o 1.12 Failsafe Modes
o 1.13 Log Files 
o 1.14 First Test Flight: MANUAL MODE
o 1.15 Test Flight: FBWA/STABILIZE/LOITER MODES
o 1.16 Test Flight: AUTO MODE
 2 Appendix 1:  RC Set-up and Wiring Diagram
 3 Appendix 2:  RC / MANUAL Flight Control Check
 4 Appendix 3:  FBWA Flight Control Check

Welcome to SUAVE Fixed-Wing 101! In this course, we will take you from zero
experience to completely autonomous fixed-wing UAV flights. Along the way, we
promise you will have a lot of fun!

This guide is exactly what its title proclaims: a guide. It is a recommended sequence
of tasks that will walk mentors and their students through the fundamentals of fixed-
wing operations using APM and ArduPlane. However, groups are encouraged to
deviate as mentors see fit. Furthermore, this guide does not purport to teach; that is
the role of the mentors and the ArduPlane documentation. However, each task links to
relevant information online.
Hardware overview
A)    Objective: Demonstrate understanding of the components that comprise a fixed-
wing UAV system.

B)    Tasks:

1. Identify and understand the purpose of each component of the ArduPlane


system, including: the Bixler 2 aircraft, receiver, transmitter, speed
controller, motor, propeller, servos, Li Po battery, APM, GPS/compass,
power module, airspeed sensor, Mission Planner.
2. Discuss the features of the APM 2.5/2.6 autopilot
3. Connect the R/C components together (without the APM) to see a
conventional R/C setup
4. Discuss and demonstrate proper response of flight controls to control inputs

C)    Discussion: Each component could merit a course of its own. Fortunately, the
R/C flying community is passionate and has produced many excellent resources
online. You will want to spend time learning about each component as you advance
with your own projects.

D)    Results:

1. Ailerons, rudder, and elevator should move to full deflection in the proper
direction in response to transmitter inputs (see Appendix 2). If not, check
receiver/transmitter pairing, transmitter servo reversing (if required), wiring,
power/charged battery.
2. The motor should respond to the full range of throttle inputs. If not, check
wiring, power, ESC.
3. The propeller should generate thrust in the proper direction (pull the plane
forward). If not, the propeller may be mounted backwards or any two motor
leads may need to be reversed.
E)    References:

RC Aircraft Components:  http://www.instructables.com/id/Beginners-Guide-to-
Connecting-Your-RC-Plane-Electr/?ALLSTEPS
APM: http://plane.ardupilot.com/wiki/common-apm25-and-26-overview/
http://plane.ardupilot.com/wiki/common-apm-board-leds/

APM and 3DR Radio Configuration/Communication


A)    Objective: Demonstrate proficiency in connecting the APM to a ground station
using both USB and 3DR telemetry radios

B)    Tasks:

1. Connect the APM to the ground station using USB (115200 baud)
2. Connect the APM to the ground station using telemetry (57600 baud)
3. Adjust 3DR radio settings using Mission Planner
4. Discuss different options for powering the APM
5. Demonstrate firmware loading

C)    Discussion: How you power your APM is an important decision, as flawed
power systems can lead to brownouts and crashes. We will use be using 3DR power
modules.

You will not often need to adjust the settings for telemetry radios, but this can be
important at times. For example, when multiple aircraft are flying at once, each
aircraft’s telemetry radios must have different net IDs.

Knowing how to upgrade the firmware is important, because firmware updates are
relatively frequent. Re-flashing the firmware can also help fix erratic behavior.

D)    Results:

1. The APM should have a solid (motor armed) or single blinking (motor
disarmed) red LED, and a solid blue LED if the GPS is locked.
2. The GPS unit will have a solid red LED if powered, and a solid blue lock of
GPS locked.
3. When properly connected, Mission Planner should indicate “Connected”,
display the flight mode of the APM, and adjust the artificial horizon as the
APM is rotated. If not, check COM port and BAUD rate.
4. Each telemetry antenna should have a green LED. If telemetry cannot
connect, verify each antenna has the same net ID.

E)     References:

http://plane.ardupilot.com/wiki/common-using-the-3dr-radio-for-telemetry-with-apm-
and-px4/
http://plane.ardupilot.com/wiki/common-load-firmware-apm/

Ground Control Software


A)    Objective: Demonstrate familiarity with two common ground stations: Mission
Planner (PC) and APM Planner 2 (PC, Mac OS, Linux).

B)    Tasks:

1. Install Mission Planner or APM Planner 2


2. Identify and understand the purpose of each element of the Flight Display
symbology
3. Review each tab of Mission Planner
4. Demonstrate how to see and understand status variables
5. Discuss differences between different ground stations

C)    Mission Planner is the most common ground station in the 3DR/APM
community. Other ground stations exist (APM Planner 2, DroidPlanner, MAVProxy)
but may have different features.

D)    Results: A general familiarity with the GCS of your choosing

E)     References:
http://plane.ardupilot.com/wiki/common-mission-planner-ground-control-station/

Aircraft Parameters
A)    Objective: Demonstrate changing, loading, and saving parameters.

B)    Tasks:

1. See a list of available parameters in Mission Planner


2. Edit parameters
3. Upload/download parameters to and from the APM
4. Save and load parameter files to your computer

C)    Discussion: A long list of parameters dictates how the aircraft will behave: its
flight envelope, how it navigates, how it responds to failsafe conditions, and how it
interprets inputs from sensors. Learning the parameters is one of the complex parts of
APM but one of the most important.

D)    Results: Most parameter changes will take effect instantaneously, although a few
(like the baud rate) require rebooting. When uploading parameter files, you can verify
they took by re-downloading them afterward.

E)     References:

Parameter list: http://plane.ardupilot.com/wiki/arduplane-parameters/

RC and APM Integration


A)    Objective: Connect the R/C components to the APM, mount in the aircraft

B)    Tasks:

1. Connect all electronics, including the APM


2. Check flight control response in MANUAL mode
3. Complete radio calibration in Mission Planner
4. Discuss/demonstrate servo reversing
5. Arm/disarm the motor and discuss arming parameters
6. Check throttle response
7. Check flight mode changes using the transmitter

C)    Discussion: See Appendix 1 for a wiring diagram. Essentially, we are just
inserting the APM between the receiver and the servos. In MANUAL mode, APM
passes transmitter inputs straight through to the outputs. Doing a flight control check
in MANUAL is important to verify correct wiring. APM also provides a throttle
arming mechanism, which ensures the throttle is only armed when certain conditions
are met.

D)    Results:

1. Your aircraft must pass a flight control check in MANUAL (Appendix 2). If
channels appear to be mixed up, you probably have a wiring mistake. Also
confirm that transmitter servo reversing is configured where necessary.
2. There should be no throttle response when the motor is disarmed. If not,
check the ARMING parameters.
3. Throttle should respond across the full range when the motor is armed.
4. When you physically rotate the aircraft, the flight display should respond
appropriately. If it does not, ensure the APM is mounted facing forwards
and check the parameters for APM orientation.

E)     References:

http://plane.ardupilot.com/wiki/arduplane-setup/connecting-your-rc-gear/
http://plane.ardupilot.com/wiki/arduplane-setup/first-time-apm-setup/
http://plane.ardupilot.com/wiki/arming-throttle/

Ardupilot Flight Modes


A)    Objective: Demonstrate knowledge of ArduPlane flight modes, and competency
in switching flight modes from the transmitter and ground station.

B)    Tasks:

1. Review list of ArduPlane flight modes


2. Discuss how to see the active mode in Mission Planner
3. Configure Flight Mode parameters
4. Configure transmitter switch for toggling flight modes
5. Switch flight modes with transmitter
6. Switch flight modes with ground station

C)    Discussion: ArduPlane can operate in a variety of flight modes, ranging from a
MANUAL mode in which R/C inputs are passed straight through, to a full AUTO
mode that requires no human input. Operators can switch flight modes using either a
switch on their transmitter or the ground station. It is vital to plan ahead and ensure
your ground station and transmitter are configured properly for the modes you want to
use.

D)    Results:

1. When using Mission Planner, the “Set Mode” button should result in an
instant flight mode change. The new mode will appear in the lower right
corner of the HUD and you may receiver a verbal announcement.
2. When using the transmitter, adjusting your mode switch should cause the
flight mode to change to whatever you have specified in the FLTMODE1-6
parameters. If not, verify the FLTMODE_CH parameter and your
transmitter setup.

E)     References:

http://plane.ardupilot.com/wiki/flying/flight-modes/

Li-Po Battery Fundamentals


A)    Objective: Demonstrate the safe handling and charging of Li-Po batteries.

B)    Tasks:

1. Discuss Li-Po battery safety


2. Charge a Li-Po battery using a balance charger
3. Discuss and demonstrate Mission Planner’s battery monitor

C)    Discussion: The tremendous advances in R/C flying in the past decade are
largely due to advances in battery technology. However, Li-Po batteries can be
dangerous if handled improperly (do a YouTube search for Li-Po fire). It is vital to
learn about Li-Po safety, take care of your batteries, and use a balance charger.

D)    Results: A charged battery with no fireworks!

E)     References:

http://www.rchelicopterfun.com/rc-lipo-batteries.html

APM Sensor Calibration


A)    Objective: Demonstrate configuration and calibration of the APM and optional
hardware.

B)    Tasks:

1. Calibrate the compass using Mission Planner


2. Calibrate the accelerometers using Mission Planner
3. Enable the airspeed sensor using Mission Planner (if available)
4. Set APM orientation using Mission Planner
5. Test the GPS

C)    Discussion: Most of APM’s sensors need to be configured or calibrated in


Mission Planner before flight. Failing to calibrate these sensors may result in
unpredictable behavior and crashes.
D)    Results:

1. Each component should pass the Mission Planner test


2. After calibration, the Mission Planner Flight Display and heading should
match the aircraft’s physical orientation

E)     References:

http://plane.ardupilot.com/wiki/airspeed-3/

FBWA Mode Bench Test


A)    Objective: Demonstrate how to test that the aircraft is properly configured for
AUTO flights

B)    Tasks:

1. Test the plane’s response to orientation changes while in FBWA


2. Ensure proper control response to manual inputs while in FBWA

C)    Discussion: We have already validated that our aircraft responds properly to
MANUAL inputs; now we must ensure the autopilot is giving proper directions to the
plane. One way to check this is through a bench test in Fly-by-Wire A (FBWA) mode.
In this mode, the APM will attempt to return the aircraft back to level.

D)    Results:

1. The aircraft must pass the FBWA flight control check in Appendix 3. If the
aircraft passes the MANUAL check but not the FBWA check, recalibrate
your radio in mission planner and ensure servo reversing is activated where
necessary.

E)     References:

These tests are described in the “Ground Checks” portion of this


page:http://plane.ardupilot.com/wiki/roll-pitch-controller-tuning/
 

Flight Plans
A)    Objective: Demonstrate creating, uploading, downloading, loading and saving of
flight plans.

B)    Tasks:

1. Create a flight plan in Mission Planner


2. Upload a flight plan to the APM
3. Download a flight plan from the APM
4. Save and load a flight plan to/from the computer
5. Discuss how to set and check the home location
6. Discuss rally points

C)    Discussion: The APM holds one flight plan in memory at a time. Flight plans can
be created and edited in a ground station, then uploaded to the APM. The APM also
has a home location, which is set upon GPS lock. This point is used for RTL (return to
land) mode. Operators can also define rally points instead of using the home location.
In the event of an RTL, the plane will fly to the nearest rally point instead of the home
location.

D)    Results:

1. You can verify a flight plan uploaded by immediately re-downloading it.


2. You can have a technically valid flight plan that contains human errors, like
flying into terrain or obstacles. Your ultimate test of your flight plan will
come through flying!

E)     References:

http://plane.ardupilot.com/wiki/common-rally-points/
http://plane.ardupilot.com/wiki/common-planning-a-mission-with-waypoints-and-
events/

 
Geofences
A)    Objective: Demonstrate how to create, enable, and use a geofence.

B)    Tasks:

1. Create a geofence in Mission Planner


2. Upload and download a geofence to/from the APM
3. Save/load a geofence to/from the computer
4. Discuss geofence parameters
5. Demonstrate use of a transmitter switch to enable/disable the geofence

C)    Discussion: A geofence is a user-defined polygon that surrounds your flying


area. If the aircraft breaches the fence, it will engage in a behavior defined by the
FENCE_ACTION parameter. By default, the aircraft will return to a user-defined
geofence return point. This theoretically means you will never have a flyaway,
because the plane will “bounce” off the fence. This mode can cause problems,
however (for example, if you inadvertently fly with an incorrect geofence).

D)    Results:

1. You can verify a geofence uploaded by immediately re-downloading it.


2. If you have a transmitter switch configured to enable/disable the geofence,
toggling the switch should result in Mission Planner announcements that the
fence is enabled/disabled. If not, check your transmitter settings and the
FENCE_CHANNEL parameter.
3. You should get no fence breach indications on the ground while inside your
fence.
4. If you enable the geofence while outside the fence, you should see a “Fence
Breach” message and the aircraft should enter GUIDED mode. If not, verify
the fence is actually enabled and check the FENCE_ACTION parameter.

E)     References:

http://plane.ardupilot.com/wiki/geofencing-3/
 

Failsafe Modes
A)    Objective: Demonstrate familiarity with the radio, GCS, and battery failsafe
modes.

B)    Tasks:

1. Discuss the radio, GCS, and battery failsafe modes


2. Review the parameters related to each
3. Simulate a radio failure on the bench and watch the response

C)    Discussion: Failsafe modes activate when something has gone wrong—for
example, your plane loses contact with the radio transmitter or the ground station or
has a low battery. You can define how your aircraft will respond in these cases by
defining failsafe responses through the appropriate parameters. Unfortunately, the
ArduPlane documentation is mostly wrong (this is currently under revision; see the
links below). One way to test failsafe responses is on the bench, by turning off the
transmitter and watching how the APM responds.

D)    Results: Bench testing failsafe modes is difficult, because you will not be able to
monitor things like throttle and altitude response. However, you can at least monitor
the flight modes that the APM enters after a radio loss delay of
FS_SHORT_TIMEOUT and then FS_LONG_TIMEOUT. You should ensure these
modes behave as you desire. The battery failsafe will always cause the aircraft to enter
RTL.

E)     References:

http://plane.ardupilot.com/wiki/arduplane-setup/apms-failsafe-function/ caution: this
page describes the types of failsafes, but many particulars are wrong. For more
information, see:
 https://groups.google.com/forum/#!searchin/drones-
discuss/failsafe$20concerns/drones-discuss/X-LfJxdF3_g/Rtfsw7Yk3fcJ
Log Files 
A)    Objective: Demonstrate multiple ways of using logs to review aircraft
performance and troubleshoot problems.

B)    Tasks:

1. Load .tlog files generated by Mission Planner


2. Save and review flash logs
3. Play back logs in Mission Planner
4. Analyze logs using graphs in Mission Planner
5. Create a Google Earth KMZ plot from a log using Mission Planner

C)    Discussion: UAVs seldom perform as expected on their first flights. They require
tuning, calibration, and troubleshooting. Log files are an essential tool for this process.
APM stores a great deal of data from each flight, which can be used to optimize flight
performance or troubleshoot. Note that APM uses two types of logs: telemetry logs
and flash logs. Mission Planner currently supports both, but APM Planner only
supports flash logs.

D)    Results: You should be able to access post-flight .tlogs, generate and review
graphs of status variables, and generate Google Earth KMZ data.

E)     References:

http://plane.ardupilot.com/wiki/common-mission-planner-telemetry-logs/
http://plane.ardupilot.com/wiki/common-diagnosing-problems-using-logs/

First Test Flight: MANUAL MODE


A)    Objective: Ensure your aircraft and R/C gear are properly configured by test
flying in MANUAL.

B)    Tasks:

1. Test/adjust weight and balance of flight-ready aircraft


2. Conduct preflight checks of all systems
3. Fly the aircraft in MANUAL mode
4. Monitor flight using Mission Planner
5. Review logs post-flight

C)    Discussion: The most basic flight test for a fixed-wing aircraft is in MANUAL
mode, because the APM should simply be passing control inputs through (note that
failsafe modes and the geofence continue to operate, if enabled). Crashes at this point
may mean human error, weight/balance issues, trim problems, or mechanical failures.

D)    Results: This should feel like an ordinary R/C airplane flight, as the APM’s auto
modes aren’t used. However, the ground station operator should be able to monitor
basic parameters like airspeed, altitude, bank angle, and ground track. The team
should ensure their aircraft is correctly balanced and trimmed. After the flight, each
team member should obtain a copy of the .tlog for review.

E)     References: N/A

Test Flight: FBWA/STABILIZE/LOITER MODES


A)    Objective: Test APM control of the aircraft using FBWA, STABILIZE, and/or
LOITER modes

B)    Tasks:

1. Test flight controller response in FBWA or STABILIZE


2. View tuning screen in Mission Planner to check commanded/actual pitch
and roll response
3. Test flight controller and navigation response in LOITER
4. Discuss PID tuning and AUTOTUNE mode

C)    Discussion: These flight modes will give you a feel for how well the APM can
fly the aircraft. To fly properly, the APM’s PID controllers and navigation controller
must be tuned manually or using the AUTOTUNE mode. An improperly tuned
aircraft may respond sluggishly, overshoot commanded bank/pitch angles, or oscillate.
Flight logs or Mission Planner’s tuning screen can graphically illustrate how the
aircraft’s actual response compares to the pitch/roll angles commanded by the APM.
Operators should ensure the aircraft is responding properly in these modes before
moving on to full AUTO flights.

D)    Results: Using the tuning screen in Mission Planner, the ground station operator
can monitor the difference between the nav controller’s commanded pitch and roll
with the aircraft’s actual pitch and roll. If there is a difference, this probably indicates
a tuning problem. If tuning is really bad, the aircraft may be difficult or impossible to
control (for example, if the nav controller commands 45-degree banks but the aircraft
only banks 10 degrees).  In a perfectly tuned aircraft the roll and commanded roll
response should look identical, and the pitch and commanded pitch should look
identical. For this flight the tuning does not need to be perfect, but the aircraft should
be controllable in FBWA. In LOITER, the aircraft should fly a stable orbit around a
fixed point on the ground. ArduPlane includes an AUTOTUNE feature that will
automatically tune the PID values based on how the plane responds to your control
inputs.

E)     References:

http://plane.ardupilot.com/wiki/roll-pitch-controller-tuning/
http://plane.ardupilot.com/wiki/tecs-total-energy-control-system-for-speed-height-
tuning-guide/
http://plane.ardupilot.com/wiki/calibrating-an-airspeed-sensor/

Test Flight: AUTO MODE


>
A)    Objective: Test APM control of the aircraft in AUTO mode.

B)    Tasks:

1. Create and upload a flight plan in Mission Planner


2. Takeoff in MANUAL and activate the flight plan by engaging AUTO mode
3. Monitor the aircraft’s progress along the waypoint route
4. Review telemetry logs

C)    Discussion: A properly tuned aircraft should be able to properly execute a flight
plan in AUTO mode. On the other hand, do not proceed to this step until the aircraft
flies reasonably well in FBWA. Also, when designing flight plans, keep in mind the
old axiom “garbage in, garbage out.” APM has powerful flight planning tools, but that
also means that human error in the flight plan can result in unpredictable behavior or
crashes. You will also most likely find that your aircraft requires continued tuning and
optimization to achieve peak performance.

D)    Results: When you switch to AUTO, the aircraft should fly the loaded sequence
of waypoints, then Return to Launch site (RTL) and enter LOITER. If the aircraft
undershoots or overshoots points, you can tune the navigation system. If the aircraft
does not fly as expected, review your flight plan and ensure that the aircraft still flies
as expected in FBWA mode.

E)     References:

http://plane.ardupilot.com/wiki/navigation-tuning/

Congratulations! If you’ve made it this far, you have achieved a tremendous feat; you
have taken a foam kit and a few electrical components and turned them into a
completely autonomous fixed-wing UAV. You have touched on most of the major
components of the APM ecosystem, which will give you a great foundation for your
future projects.

Appendix 1:  RC Set-up and Wiring Diagram


 

STANDARD 6-CHANNEL SETUP:

1. Ailerons
2. Elevator
3. ESC
4. Rudder
5. Geofence enable/disable
6. Mode selector switch

APM 2 Wiring Diagram (you will not have any of the components at the top) *

 
* NOTE: This diagram is for the APM 2.5, which has an internal compass. The APM
2.6 uses an external compass mounted co-located with the GPS unit, so there will be a
second lead DF13 connector going from the GPS “Compass” port to the APM.

Appendix 2:  RC / MANUAL Flight Control


Check
Left control stick:

Up/Down        – Throttle

Left/Right       – Rudder

Right control stick:

Up/Down        – Elevator

Left/Right       – Aileron

Left stick to the left:               rudder should move left

Left stick to the right:             rudder should move right

Left stick up:                           throttle should advance

Left stick down:                     throttle should go down

Right stick to the left:             left aileron goes up, right aileron goes down

Right stick to the right:           right aileron goes up, left aileron goes down
Right stick up:                         elevator goes down

Right stick down:                   elevator goes up

If any axis moves the wrong flight control, then the servo leads are mixed up (the
wrong lead is plugged into the wrong channel). They may be wrong between the
receiver and the APM, or between the APM and the servos.

If any axis responds backwards, that channel needs to be reversed on the transmitter.
You will also need to select the appropriate servo reversing checkbox in Mission
Planner, or else auto flight modes will apply reversed control inputs.

Appendix 3:  FBWA Flight Control Check


A ground check in Fly-By-Wire A (FBWA) will ensure the APM is giving the
appropriate signals to the aircraft servos. If any flight control surface responds
incorrectly on the ground, you can expect a crash when you switch to an auto mode in
the air.

Engage FBWA mode using the transmitter switch or Mission Planner

1.  Hold the aircraft level and conduct the MANUAL Flight Control Check
from Appendix 2. The aircraft should respond exactly as it did in
MANUAL.
2. Now you will physically rotate the aircraft in the roll axis and pitch axis.
For each movement, the APM will try to return the aircraft to straight and
level flight.

Physically roll the aircraft left

Right aileron should go up, left aileron should go down


The rudder should move slightly right

Physically roll the aircraft right

Left aileron should go up, right aileron should go down

The rudder should move slightly left

Physically pitch the aircraft up

The elevator should go down

Physically pitch the aircraft down

The elevator should go up

 
Posted in Uncategorized.

Ref : http://uav.stanford.edu/101-guide-for-fixed-wing-uavs/

You might also like