––Heading RCADev

 

HOME

PHANTOM UAV

VACUUM FORMING

OPENTX

CONTACT ME

 

PIXHAWK PHANTOM UAV – Autopilot Configuration

 

Autopilot Configuration

  Mission planner

  Pixhawk Firmware

  Taranis Radio Set Up

  ESC Calibration

  Accelerometer Calibration

  Compass Calibration

  Radio Calibration

  Flight Modes Configuration

  Plane Failsafe

  Elevon Configuration

  Basic Tuning - PID Parameter Set Up

  Arming

  Advanced Failsafe Configuration 

  Sensor Testing

  Battery Capacity Setting

  Throttle Control Parameters

  Terrain Parameters

  Optional Hardware – Power Module

  Optional Hardware – SiK Telemetry Radio

  Optional Hardware – Airspeed Sensor

  Optional Hardware - Camera Gimbal – Servo Controlled

  Tuning - Autotune

 

Previous Page -  Aircraft Layout and Operation                  

Next Page – Taranis Transmitter Configuration

 

Divider

Autopilot Configuration

Mission Planner

Install Mission Planner using instructions here.

Reference http://ardupilot.org/plane/docs/common-install-mission-planner.html#run-the-installation-utility

 

On PC tgs005, connect to the pixhawk via USB using COM 3 with baud rate 57600.

Mission Planner Installation Record.

Date

Version

02-10-16

Mission Planner v1.3.41

10-07-17

Mission Planner v1.3.48

20-08-17

Mission Planner v1.3.49

08-01-18

Mission Planner v1.3.52

Pixhawk Firmware

Load the Arduplane firmware into the pixhawk using instructions here.

Reference http://ardupilot.org/plane/docs/common-loading-firmware-onto-pixhawk.html

Arduplane Firmware Installation Record.

Date

Version

29-09-16

Arduplane v3.7.0

10-07-17

Arduplane v3.7.1

03-09-17

Arduplane v3.8.0

08-01-18

Arduplane v3.8.3

09-01-18

Arduplane v3.8.4

Changes from Arduplane 3.7 to 3.8

For reference to changes between Auduplane versions 3.7 and 3.8 refer here.

- For servo and elevon set up, refer here.

- Manual control of the control surfaces were checked and confirmed OK.

- Control surface movement in FBWA mode was checked and confirmed to be OK.

- After changing to v3.8, the analog airspeed sensor ARSPD_TYPE is confirmed as 2.

- THR_MAX confirmed to still be 100%.

Taranis Radio Set Up

Reference “Taranis Radio Set Up” at http://rcadev.info/OpenTX%2055%20Application%20Note%2026.htm

Refer here for description of how I have set up the Taranis radio.

ESC Calibration

Reference http://ardupilot.org/plane/docs/guide-esc-calibration.html#guide-esc-calibration

 

The ESC I use is a Turnigy Plush 40A

To calibrate the ESC, I connected the ESC throttle signal cable directly into the receiver channel 3, temporarily bypassing the pixhawk.

I then turned on the transmitter, set the throttle stick to maximum and connected power to the ESC. The ESC beeped once every couple of seconds, indicating it had recorded throttle maximum.

I then set the throttle stick to minimum. The ESC beeped with four short beeps to indicate the number of cells of the battery, then one long one to indicate the throttle minimum had been recorded.

I checked the throttle range by increasing the throttle stick up to maximum and confirming the motor speed increased to maximum.

Accelerometer Calibration

Perform the accelerometer calibration using instructions here.

Reference http://ardupilot.org/plane/docs/common-accelerometer-calibration.html

Accelerometer Calibration Log

Date

Notes

08-16

Calibration Successful

Compass Calibration

Calibrate the compass(es) using instructions here.

Reference http://ardupilot.org/plane/docs/common-compass-calibration-in-mission-planner.html

 

Live Calibration was used for compasses #1 and #2. This is the compass calibration screen after calibration showing the offsets for each compass.

(Note: Onboard Mag Calibration was not successful, even with relaxed fitness!)

 

 

Note that Compass #2 (on the Pixhawk board) is not used because inconsistencies between the 2 compasses prevented arming.

Radio Calibration

Perform the radio calibration using instructions here.

Reference http://ardupilot.org/plane/docs/common-radio-control-calibration.html

Channel 1 = Ailerons, Channel 2 = Elevator, Channels 3 = Throttle, Channel 4 = Rudder, Channel 8 = Flight Mode.

 

This shows the result of the calibration.

 

 

The channel ranges are then shown in a table.

 

 

Flight Modes Configuration

Set up the flight modes using instructions here.

Reference http://ardupilot.org/plane/docs/common-rc-transmitter-flight-mode-configuration.html

 

I have selected the following flight modes.

 

Plane Failsafe

Set up the failsafe parameters using instructions here.

Reference http://ardupilot.org/plane/docs/apms-failsafe-function.html

 

The failsafe parameters are described here.

Battery Failsafe

 

Parameter

Default

Value

Set

Value

 

Units

 

Comments

FS_BATT_MAH

0

0

mAh

Battery capacity remaining at or below to trigger failsafe. RTL if triggered.

0 = disabled,

FS_BATT_VOLTAGE

0

0

Volts

Battery voltage at or below to trigger failsafe. RTL if triggered.

0 = disabled

 

If FS_BATT_MAH is enabled, ensure BATT_CAPACITY is set correctly. Refer here.

I have chosen to disable both battery failsafe triggers.

Ground Control Station Failsafe

 

Parameter

Default

Value

Set

Value

 

Units

 

Comments

FS_GCS_ENABLE

0

0

---

Ground Control Station telemetry failsafe.

0 = disabled, 1 = heartbeat, 2 = heartbeat & RSSI, 3 = heartbeat & Auto mode.

 

I have chosen to disable the GCS failsafe trigger.

Failsafe Action

 

Parameter

Default

Value

Set

Value

 

Units

 

Comments

FS_LONG_ACTN

0

1

---

Action to take on long failsafe event.

0 = continue, 1 = RTL, 2 = glide, 3 = deploy parachute

FS_LONG_TIMEOUT

5

5

Seconds

Failsafe event must be present for this time before implementing ‘Long Action’.

FS_SHORT_ACTN

0

0

---

Action to take on short failsafe event.

0 = circle or no change if mode is Auto, Guided or Loiter,

1 = circle, 2 = FBWA

FS_SHORT_TIMEOUT

1.5

1.5

Seconds

Failsafe event must be present for this time before implementing ‘Short Action’.

 

Note that FS_LONG_ACTN has been changed from the default to RTL (Return To Launch).

Throttle Failsafe

 

Parameter

Default

Value

Set

Value

 

Units

 

Comments

THR_FAILSAFE

1

1

---

Throttle failsafe.

0 = disabled, 1 = enabled.

THR_FS_VALUE

950

950

uS

The PWM value on channel 3 (throttle) below which throttle failsafe triggers.

 

The THR_FAILSAFE parameter must be enabled to enable throttle failsafe. Also, the receiver throttle channel must be configured so that when it loses signal, the throttle PWM value is below the THR_FS_VALUE value.

Elevon Configuration

Configure the elevon control using instructions here.

Reference http://ardupilot.org/plane/docs/guide-elevon-plane.html

 

To fly the plane manually before the pixhawk was installed, the elevon mix was done in the transmitter. When the pixhawk was installed and the old style of elevon mixing was used, in the manual modes the elevon channels were passed straight through to the elevon servos. However, to make use of the new style elevon mixing in the pixhawk, the Taranis must deliver one channel for aileron and one for elevator with no mixing.

New Style Elevon Mixing (ELEVON_OUTPUT output)

Set up the transmitter with no elevon mixing, aileron on channel one and elevator on channel two. (Throttle is channel three.)

I set my pixhawk parameters as follows.

 

Parameter

Value

Comments

SERVO1_FUNCTION

77

Left elevon

SERVO2_FUNCTION

78

Right elevon

SERVO3_FUNCTION

70

Throttle

SERVO4_FUNCTION

0

Disabled

SERVO1_REVERSED

1

Left elevon reversed

SERVO2_REVERSED

0

Right elevon normal

SERVO3_REVERSED

0

Throttle normal

 

In the Taranis transmitter, channel direction was set as follows.

 

Parameter

Dir

Comments

Aileron (ch 1)

Nor

 

Elevator (ch 2)

Rev

 

Throttle (ch 3)

Nor

 

 

In the pixhawk, the trim parameters are set as follows.

 

Parameter

Default Value

Set Value

Comments

SERVO1_TRIM

1500

1500

 

SERVO2_TRIM

1500

1500

 

SERVO3_TRIM

1100

1100

 

 

The servo throw parameters were changed as follows.

 

Parameter

Default Value

Set Value

Comments

SERVO1_MIN

1100

988

 

SERVO1_MAX

1900

2012

 

SERVO2_MIN

1100

988

 

SERVO2_MAX

1900

2012

 

SERVO3_MIN

1100

988

 

SERVO3_MAX

1900

2012

 

 

The mixing parameters in the pixhawk are set as follows.

 

Parameter

Default Value

Set Value

Comments

MIXING_GAIN

0.5

0.5

 

MIXING_OFFSET

0

0

 

 

With all the settings above, the aileron and elevator work correctly in manual mode.

Also, in FBWA mode, the elevons work correctly to correct aircraft roll and pitch.

Basic Tuning - PID Parameter Set Up

The default tuning parameters are shown here.

 

The modified settings are as follows

 Parameter

Default Value

New Value

Notes

Servo Pitch PID –P

0.60

0.60

 

Servo Roll PID – P

0.60

0.60

 

Throttle Cruise

45.0

55.0

Autopilot cruise throttle value

 

For refining of these settings, see Tuning - Autotune here.

Arming

Configure autopilot arming using instructions here.

Reference http://ardupilot.org/plane/docs/arming-throttle.html

 

After power up, all servo values and throttle are kept at minimum values until the safety button is pushed.

I have set arming parameters as follows.

 

Parameter

Default Value

Set Value

Comments

ARMING_ACCTHRESH

0.75

0.75

Accelerometer error threshold used to determine inconsistent accelerometers.

ARMING _CHECK

0

1

Bitmask of checks required to pass before allowing arming.

0: none

1: all

2: barometer

4: compass

8: GPS lock

16: inertial sensors – accelerometers and gyros

32: not used

64: RC failsafe

128: board voltage

256: battery level

512: airspeed

1024: logging available

2048: hardware safety switch

4096: GPS configuration

ARMING_MIN_VOLT

0

0

Minimum voltage on 1st battery to arm. 0 disables check.

ARMING_MIN_VOLT2

0

0

Minimum voltage on 2nd battery to arm. 0 disables check.

ARMING_REQUIRE

1

1

0: disabled. Aircraft is armed on power up!.

1: THR_MIN PWM when disarmed

2: 0 PWM when disarmed

ARMING_RUDDER

1

1

Arming using full right rudder for several seconds.

0: disabled

1: enabled

 

All checks are required for the aircraft to be armed.

The hardware switch must be pressed for at least three seconds to enable the servos before the motor can be armed.

Arming the motor is done by holding the rudder fully right for at least three seconds.

Advanced Failsafe Configuration

Set up the advanced failsafe configuration using instructions here.

Reference http://ardupilot.org/plane/docs/advanced-failsafe-configuration.html

 

The advanced failsafe system allows complex series of action when a failsafe event occurs.

 

Parameter

Default Value

Set Value

Comments

AFS_ENABLE

0

0

0: disabled

1: enabled

 

The advanced failsafe system is disabled.

Sensor Testing

Sensor testing can be performed using instructions here.

Reference http://ardupilot.org/plane/docs/common-sensor-testing.html

 

To display the graph of sensor data, tick the tuning box at the bottom of the page. To display a list of all possible sensor data, double click the left mouse button anywhere on the tuning graph. The following

 

Sensor(s)

Parameter

Comments

Artificial horizon

 

OK

Roll

roll

OK

Pitch

pitch

OK

Yaw

yaw

OK

Altitude

alt

OK

Air speed

airspeed

 

Acceleration – x axis (back, forward)

ax

OK

Acceleration – y axis (up, down)

ay

OK

Acceleration – z axis (left, right)

az

OK

Compass 1 field strength

magfield

OK. See graph below.

Compass 2 field strength

magfield2

OK. See graph below.

 

Magnetic field strength graph of compasses 1 & 2.

Moving a magnet close to the remote compass increases magfield to over 2000.

Moving a magnet close to the onboard compass increases magfield2 to over 4000.

 

Battery Capacity Setting

In Mission Planner on the Software Config / Tuning screen, under Parameter List or Parameter Tree, set the battery capacity.

 

 

Parameter

Default

Value

Set

Value

 

Units

 

Comments

BATT_CAPACITY

3300

3000

mAh

Capacity of the battery when fully charged.

 

I use a 3000mAh 4S battery.

Throttle Control Parameters

These are the default throttle parameters. These values are not changed.

 

 

The throttle setting for normal flight TRIM_THROTTLE is set to 55%. This throttle setting is used when there is no airspeed sensor.

 

Terrain Parameters

Reference http://ardupilot.org/plane/docs/common-terrain-following.html?highlight=terrain

The default terrain parameters are shown here.

 

 

TERRAIN_ENABLE is changed to 0 i.e. saving terrain data is disabled.

Optional Hardware – Power Module

Reference http://ardupilot.org/plane/docs/common-power-module-configuration-in-mission-planner.html#common-power-module-configuration-in-mission-planner

Battery Voltage Calibration

Battery voltage measured using a digital multimeter on the battery charge lead pins. Measured value 15.56V.

The sensor type was set to ‘Other’ and the 15.56 was entered in the ‘Measured battery voltage’ in the Calibration box. This recalculated the ‘Voltage divider (Calced)’ parameter. The ‘Battery voltage (Calced)’ then showed 15.56V.

Current Calibration

Using a current meter, the motor was run at 9.69 Amps. While it was running, the measured current was entered. This adjusted the ‘Ampers per volt’ to 23.08521 and the ‘Current (Calced)’ then displayed about 9.70A .. close enough allowing for small fluctuations.

 

After voltage and current calibration, the power module parameters are shown here.

 

Mission Planner Alert on Low Battery

The ‘MP Alert on low Battery’ checkbox was checked with the following parameters.

 

What voltage do want to warn at ?

14.2V

What percentage do you want to warn at?

40%

Optional Hardware – SiK Telemetry Radio

Set up the telemetry radio using instructions here.

Reference http://ardupilot.org/plane/docs/common-sik-telemetry-radio.html

 

In Mission Planner, the baud rate was set to 57600 and COM6 was selected. ‘Connect’ was clicked, the link established and the ‘Flight Data’ page showed the current status. Select ’Initial Setup’, then ‘Optional Hardware’, then ‘Sik Radio’.

In the top right corner, disconnect the MAVLink, the click ‘Load Settings’.

The ‘Sik Radio’ set up screen is shown as follows with the default settings.

 

 

For advanced Configuration, refer here

http://ardupilot.org/plane/docs/common-3dr-radio-advanced-configuration-and-technical-information.html

Optional Hardware – Airspeed Sensor

Reference http://ardupilot.org/plane/docs/airspeed.html

 

In Mission Planner, tick the ‘Use Airspeed’ box.

 

 

The default airspeed parameters are shown here.

 

 

These default values are not changed.

Airspeed Sensor Tuning

Parameter ARSPD_AUTOCAL is set to 1 temporarily during the first flight to calibrate the airspeed sensor.

The default value of ARSPD_OFFSET is 2058.929 and the default value of ARSPD_RATIO is 1.9936.

A couple of ten minute flights in manual mode were then made.

After auto calibration, the new value of ARSPD_OFFSET became 2083.669 and the new value of ARSPD_RATIO became 2.100493.

The value of ARSPD_AUTOCAL was then set back to 0.

Optional Hardware – Stabilised Camera Gimbal – Servo Controlled

Configure the servo controlled gimbal using instructions here.

Reference http://ardupilot.org/plane/docs/common-camera-gimbal.html

 

Camera Platform

An aluminium vibration absorbing platform was first made to mount the gimbal on. The base of the platform is screwed into nylon threaded standoffs glued into the foam. The vibration dampening balls have a rated load of 100g each.

 

image053

Initially the camera was mounted on a balsa wood wedge which held the camera at an angle of 24°. In the camera’s image, the horizon is just below the top of the frame and the ground occupies most of the frame.

 

The gimbal was also made from aluminium and mounted on the platform.

 

Gimbal   RD32 on Gimbal

 

 

RD32 Front on Gimbal

 

 

The camera is attached with double sided foam tape.

 

The complete assembly is very rigid and presents a low surface area to air flow.

 

I originally used digital servos as shown in the photos but these have been replaced with analog servos. The digital servos caused jerky movements of the gimbal. The servos now used are type Hitec HS-65MG, with metal gears.

 

 

The weight of the complete assembly including the camera is 159 gm.

 

 

The tilt and roll servos are connected as shown in this diagram.

 

(Note that the connection diagram shown in the

http://ardupilot.org/plane/docs/common-camera-gimbal.html

page is incorrect! Tilt is shown there connected to output 1. It should be output 3.)

 

 

On Mission Planner, the gimbal was configured as shown here.

 

Important Gimbal Design Notes

 

RD32 on Top Gimbal    RD32 Side on Gimbal

To prevent unwanted vibration and gear wear, follow these guidelines.

  1. Ensure the camera weight is balanced around the tilt servo axis.
  2. Ensure the weight on the roll servo is also balanced along the servo axis.
  3. Ensure the centre of gravity of the assembly is placed over the centre of the platform.

These features minimise secondary vibrations arising in the assembly.

 Field Of View

If the camera is horizontal, the horizon is across the middle of the picture and the top half is sky. I set the tilt angle to about 24° so that the camera’s field of view had the horizon just below the top of the frame and the rest of the frame is filled with the ground in front of the aircraft.

 

RD32 Side Tilted on Gimbal

Police Paddocks

 

Field of view with the camera tilted down 24°.

 

A video showing the gimbal operation is here :

http://www.youtube.com/watch?feature=player_detailpage&v=0HGa-9Ns_Nw

 

Tuning – Autotune

Reference http://ardupilot.org/plane/docs/automatic-tuning-with-autotune.html?highlight=autotune

After the first flight, the PID parameters can be refined by performing an autotune. Basically the procedure involves selecting autotune mode and flying while making rapid roll and pitch changes separately. At least 20 rapid changes are needed for roll and for pitch.

 

 

Divider

 

Previous Page -  Aircraft Layout and Operation              

Next Page – Taranis Transmitter Configuration

 

Footer RCADev