Xflighttech AUTOPILOT / TRIM Troubleshooting guide

Xflight Technologies LLC
AUTOPILOT / TRIM User & Installation Guide
Version 3.4
(Mini Pix Flight Controller)
July 2020
Xflighttech.com

Copyright © 2019 Xflight Technologies LLC, Florida, USA
2
A. Terms, Conditions and Warranty.
These products are only intended to be used in LSA Class Experimental Aircraft or Ultralights
(as defined by the FAA in the USA) under the full responsibility of the pilot. AHRS and
Autopilot components are intended to be used for informational purposes or to manipulate
secondary control surfaces only, allowing the pilot full manual control of the aircraft
See Appendix A for details
B. Setup and Connection:
1. Ensure the Display is firmly seated and connected via the HDMI connector
2. Connect the GPS antenna to the Flight Controller GPS/12C socket
3. Connect the Flight Controller micro USB Link to one of the Raspberry Pi (AUTOPILOT) USB
sockets
4. Connect the 5v DC power supply to the Raspberry Pi (AUTOPILOT) micro USB connector
(A backup power supply may be used and connected to the touchscreen micro USB connector)
5. Connect the Power Module to the Flight Controller and battery (via AP switch & fuse circuit)

Copyright © 2019 Xflight Technologies LLC, Florida, USA
3
6. Safety Enable should already be connected from the Flight Controller to the Raspberry Pi
(AUTOPILOT) GPIO pins 32 & 30
7. Servo Test Switch should already be installed in the Raspberry Pi (AUTOPILOT) GPIO pins 33 & 34
(this can be removed once calibration is complete)
8. Connect the Wi-Fi module to the TELEM1 port of the Flight Controller
9. Connect the TRIM system to the 5v power supply and to the Flight Controller
10. Connect the yoke trim switches to the TRIM System (see details in section F)
11. Make sure the SD card (AUTOPILOT software) is firmly seated inside the Raspberry Pi and the SD
card in the Flight Controller is also firmly seated (used for logging)
C. Installation Overview
Additional details in section F.
1. Mount the Flight Controller horizontally facing forward, sitting on a padded or foam base to
reduce vibration. (Adjustments for setting perfect level and for tail-wheel aircraft will be
covered later, under section G - Calibration).
2. Mount the GPS antenna on the dash or somewhere with line of sight to the sky, facing forward.
3. Connect the AUTOPILOT power supply and TRIM System power supply to the battery via a
separate switch and 10A fuse. Use a separate switch and fuse for the servo power circuits.
4. When installing the AUTOPILOT behind the instrument panel, it is necessary to ensure there is
an insulated layer between the touchscreen display surface and the metal panel for proper
operation. The plastic frame of the case makes for a good insulating layer.

Copyright © 2019 Xflight Technologies LLC, Florida, USA
4
D. Startup
1. Leave servos switched off until you are ready to use the Autopilot in flight. Always power up the
AUTOPILOT circuit first.
2. Make sure you are outside with a view to the sky. Upon startup the AUTOPILOT will connect to
the Flight Controller, maintaining a heartbeat (ignore the login prompt). If the Flight Controller is
not able to lock onto more than 5 satellites, the AUTOPILOT will keep trying, via a countdown. If
it still cannot get a good lock after the countdown, it will start up anyway, and you will be able
to see the satellite count for yourself. It will be red if below 6, otherwise green. A red cross will
appear if the satellite count is less than 5. (A flashing green light on the GPS antenna also
indicates satellites have been acquired). If the satellite count is zero you will need to restart.
3. Make sure the Flight Controller remains stable during startup. Once the AUTOPILOT has started
it will lock in the current GPS location, and use this as its Home reference.
4. If either the Flight Controller link is broken (loss of heartbeat) or the satellite count falls below 5,
you will see a large red cross appear on the display and the AUTOPILOT will disengage. The AHRS
is still working, but the flight data readings cannot necessarily be trusted. Once the AUTOPILOT
has reconnected, and/or the satellite count goes back up to 5 or above, the AUTOPILOT will
resume normal operation.

Copyright © 2019 Xflight Technologies LLC, Florida, USA
5
E. Operation:
When operating normally the display will provide a smooth indication of attitude as well as the
various flight data parameters detailed below.
1. AUTOPILOT ON/OFF
•Switches the AUTOPILOT ON in Manual flight mode, ready for an automated flight mode
to be set (i.e. STAB, CRUISE, NAV, HOME). This also enables the Servo PWM signals,
starts flight logging (and enables the Trim switches if applicable)
•Switches the AUTOPILOT OFF, switches back to Manual flight mode, setting all other
automated modes OFF. This also disables the Servo PWM signals, stops flight logging
2. STABILIZATION Mode (Wings Level) ON/OFF
•Seeks to maintain wings level. Altitude/pitch unaffected
3. CRUISE Mode (Heading & Altitude) ON/OFF
•Seeks to maintain current heading (Target) and current Altitude
•The minimum altitude is 500 feet AGL for this mode at the Home location. (If below 500
feet AGL at the Home location, the AUTOPILOT will climb to this minimum altitude when
in Cruise mode)
4. NAV Mode WAIT/ON/OFF
•Switches the AUTOPILOT into NAV WAIT (olive) mode, waiting for the mobile app to
upload and start a flight plan / mission

Copyright © 2019 Xflight Technologies LLC, Florida, USA
6
•Once the flight plan / mission has been uploaded and started will switch to ON (Green)
and start to execute the mission
•OFF (red) switches NAV mode off and returns to MANUAL flight mode
5. HOME Mode ON/OFF
•Return to Home location or RTL (Return To Land), at current altitude
•The aircraft will turn on to a heading back to the Home location with a maximum bank
angle of 20 degrees (configurable). When within 1mile (configurable) of the location it
will perform a 1-mile left hand (configurable) loiter circle and remain overhead the
Home location until the mode is deselected.
•This button will flash green/blue when within two miles of Home location
6. Bank angle graduations: 0, 30, 45, 60 degrees
7. Current heading (continuously displayed, regardless of mode)
8. Target Track (to Home location when in Home mode or Cruise track when in Cruise mode)
9. Ground distance to Home location in miles (continuously displayed, regardless of mode)
10. AUTOPILOT Status
•This displays current Flight Controller status - STANDBY/ACTIVE, current AUTOPILOT
mode and if at Home location
•STANDBY: Aircraft is on the ground, ready for flight
•ACTIVE: System is active, and aircraft may already be in flight
11. GPS Altitude above mean sea level (AMSL) in feet (continuously displayed, regardless of mode)
12. Groundspeed in miles per hour (continuously displayed, regardless of mode)
13. Number of satellites locked on. If this drops below 5, you will see a large red cross appear on the
display and the AUTOPILOT will disengage (the flight data readings and AHRS will continue to
update but cannot necessarily be trusted). Once the satellite count goes back up to 5 or above,
the AUTOPILOT will be available again
14. When on the ground touching the center yellow reference plane will calibrate the AHRS to
straight & level (AP OFF mode)
15. TRIM System
•A single press of a yoke switch will move the selected control surface a small amount
•Continuously pressing a yoke switch will continuously move the selected control surface
•Simultaneously pressing two opposing yoke switches (pitch up & pitch down or roll left
& roll right) will centralize the selected control surface

Copyright © 2019 Xflight Technologies LLC, Florida, USA
7
F. Physical Installation
Wire AUTOPILOT and servo power circuits separately with their own fuse and switch:
AUTOPILOT, Flight Controller Power Module
and touchscreen (and optional TRIM system)
Switch and 5A fuse (or 10A w/ TRIM system)
Pitch and Roll Servos
Switch and fuse as per servo requirements
A backup power supply may be used and connected to the touchscreen micro USB connector.
1. AUTOPILOT
The optimal location for the AUTOPILOT is behind the instrument panel. (Make sure to leave
sufficient room for the USB connections).
The rectangular cut-out required will be approx. 3 inches x 2 1/4 inches (76mm x 57mm).
Metal instrument panels will require an insulated layer between the touchscreen display surface
and the panel for proper operation. The plastic frame of the case provided makes for a good
insulating layer. Simply remove the 4 screws, mount the AUTOPILOT behind the instrument panel
with the frame in place, and secure the AUTOPILOT with the screws from the front of the instrument
panel.
Overall dimensions of the AUTOPILOT (Raspberry Pi) + Screen are approx. 4” (102mm) x 3” (76mm) x
1.5” (38mm)

Copyright © 2019 Xflight Technologies LLC, Florida, USA
8
2. Flight Controller
The Flight Controller needs to be close to the AUTOPILOT and the GPS antenna which is typically
mounted on the dashboard. Mount the Flight Controller horizontally and flat facing forward,
sitting on a padded or foam base (provided) to reduce vibration, and make sure it cannot move
in flight.
The GPS antenna needs to be installed facing forward as it also has a built-in compass and must
have a good line of sight to the sky. Satellite reception is good through glass, plastic, wood,
fabric, etc., but not through conducting surfaces such as metal.
The Flight Controller (Mini Pix) dimensions are 1.5” (38mm) square x 0.5” (12.7mm)
The GPS antenna dimensions are 1.25” (31.75mm) square x 0.5” (12.7mm)

Copyright © 2019 Xflight Technologies LLC, Florida, USA
9
3. AUTOPILOT / TRIM and Flight Controller Wiring
The Flight Controller, AUTOPILOT and TRIM System all need to be on a separate switched and fused
(5A) circuit to the servo(s) circuit. They need to be powered up at the same time. The AUTOPILOT /
TRIM circuit always needs to be switched on before the servo(s) circuit.
The Trim switch wiring is also shown here. There is a common ground wire and one wire each for
pitch up, pitch down, roll up and roll down switches. The wires are labelled accordingly.

Copyright © 2019 Xflight Technologies LLC, Florida, USA
10
The Safety Enable will already be connected, but for your reference this connects the AUTOPILOT
(Raspberry Pi) pin 32 (GPIO 12 signal) and pin 30 (Ground) to the Flight Controller (Mini Pix) via the special
cable provided (opto-isolator switch):

Copyright © 2019 Xflight Technologies LLC, Florida, USA
11
4. SERVO Considerations
This AUTOPILOT is designed to work for trim tabs (or secondary control surfaces) that are relatively
small in area, sufficient to control surfaces for Experimental LSA class aircraft or Ultralights.
The PWM servos (high torque) will need to be selected such that they have adequate torque to
move these control surfaces in flight against the expected air flow loads.
As previously stated, the power to the servos needs to be on a separate circuit than the AUTOPILOT,
with their own switch and fuse. Servo power supplies or regulators should be physically close to the
servo in order to ensure minimal voltage drop.
It is recommended that each individual servo power connection be separately fused. This will also
assist in easy enabling and disabling of individual servos when it comes to flight testing.
Servo Wiring:
Flight Controller ESC Output 1
Elevator Signal
Orange/White Signal on Top
Red (power, middle) do NOT use (cut wire)
Brown/Black Ground on Bottom
Flight Controller ESC Output 2
Aileron Signal
Orange/White Signal on Top
Red (power, middle) do NOT use (cut wire)
Brown/Black Ground on Bottom
The servos use a separate fused power circuit, so the red servo power wire from the Mini Pix Flight
Controller needs to be cut. Depending on whether you are using an external servo power supply, or
the Xflight Technologies Servo Regulator with or without the Differential Drivers, the servos need to
be connected as per the options shown below:

Copyright © 2019 Xflight Technologies LLC, Florida, USA
12
Option 1: Xflight Servo Voltage Regulator
Option 2: Xflight Servo Voltage Regulator with Differential Drivers

Copyright © 2019 Xflight Technologies LLC, Florida, USA
13
Option 3: External Servo Power Supply
Have a separate fuse for each servo. This will also facilitate disabling one or the other when
performing calibration tests for pitch and roll separately.
If you are planning to have more than one servo per axis, e.g. for differential aileron movement,
then a Y-cable will need to be used to split the signal to both servos.
It is recommended that shielded cable be used for the servo signal wiring (with the shield connected
to ground). Differential drivers are strongly recommended for cable runs greater than 10 feet
(available from xflighttech.com).

Copyright © 2019 Xflight Technologies LLC, Florida, USA
14
Overall Layout

Copyright © 2019 Xflight Technologies LLC, Florida, USA
15
G. AHRS / COMPASS Calibration
Basic calibration for straight and level is achieved by touching the central reference plane and
waiting a few seconds (this only works on the ground when not moving in AP OFF mode)
For tailwheel aircraft make sure that the tail is lifted up, so the aircraft is straight and level to the
horizon, as it would be flying.
Full calibration, if needed, and parameter modification can be done by connecting to the Flight
Controller (Mini Pix) with Mission Planner either wirelessly or by connecting to USB
1. The AUTOPILOT uses the RadioLink MiniPix as its Flight Controller, running opensource
ArduPlane software.
Configurations are made using the ArduPilot Mission Planner application available as a free
download from here: http://firmware.ardupilot.org/Tools/MissionPlanner/MissionPlanner-
latest.msi
2. Note that you must have the Microsoft .NET framework already installed, this is usually installed
by default on the latest Windows OS. It can be downloaded here:
https://dotnet.microsoft.com/download/dotnet-framework/net462
3. Mission Planner installation:
Once you have downloaded the Mission Planner software, double click the executable or .msi
file, and install on your PC. Allow the device driver to be installed by your operating system.
4. Connect to the Flight Controller either by Wi-Fi or USB:
a. Wi-Fi Option:
i. Connect your PC or Laptop to the Flight Controller Wi-Fi module, by accessing
your device’s Wi-Fi settings, select:
SSID: PixRacer
Password: pixracer
ii. Start Mission Planner, this will then connect to the Flight Controller
automatically
b. USB Option:
i. Start the Mission Planner application. Remove the USB cable connecting the
AUTOPILOT to the Flight Controller and connect the PC running Mission Planner
to the Flight Controller.
ii. You will now need to see which COM port your PC is using for Mission Planner.
The COM port should appear in the Mission Planner <CONNECT> drop-down
box or you can go into your PC settings/device manager and look for the
STMicroelectronics device. E.g. STMicroeletronics Virtual COM port (COM4)

Copyright © 2019 Xflight Technologies LLC, Florida, USA
16
iii. The top right corner of the Mission Planner will show a <CONNECT> button.
First select the COM port previously identified from the drop-down box, specify
115200 baud rate and hit <CONNECT>. Once connected it will download the
Flight Controller parameters and the connection icon will turn green.
c. Once connected the Flight Controller parameters will be read, and available to
view/modify (the first time connecting will take longer as all the parameters are
downloaded).

Copyright © 2019 Xflight Technologies LLC, Florida, USA
17
AHRS Calibration
For tailwheel aircraft make sure that the tail is lifted up, so the aircraft is straight and level to the
horizon, as it would be flying.
When on the ground touching the center yellow reference plane will calibrate the AHRS to
straight & level (AP OFF mode).
This can also be done from the Mission Planner. Make sure the aircraft is straight and level.
Use the top left navigation buttons and select <INITIAL SETUP> and select <Accel Calibration>.
Hit the <Calibrate Level> button. This will automatically update the AHRS_TRIM_X and
AHRS_TRIM_Y parameters for you. Navigate to <FLIGHT DATA> and you should see a properly
leveled AHRS display.
These parameters can also be edited directly:
Use the top left navigation buttons and select <CONFIG/TUNING> to view the parameters. Then
use the left option list to select <Full Parameter Tree>. Under the AHRS section you will find the
AHRS_TRIM parameters (see screenshot). These fine tune the AHRS to straight and level (as the
Flight Controller may not be installed perfectly flat). Once you make a change be sure to click
the <Write Params> button on the right to save the changes to the Flight Controller. The
Mission Planner AHRS display under <Flight Data> will update in real-time as these parameters
are written. Make sure this appears straight and level, with the red reference plane at the
horizon. It is also advisable to take a backup copy of all parameters with <Save to file>. It is

Copyright © 2019 Xflight Technologies LLC, Florida, USA
18
important to ensure the AHRS is straight and level when the aircraft is trimmed and flying
straight and level.
For tailwheel aircraft make sure that the tail is lifted up, so the aircraft is straight and level to the
horizon, as it would be flying.
AHRS_TRIM_X
Roll angle tuning in radians* (positive to roll the AHRS reference plane left)
AHRS_TRIM_Y
Pitch angle tuning in radians* (positive to pitch the AHRS reference plane down
*note 0.01 radians is approx. 0.6 degrees.
If the Flight Controller needs to be installed in a different orientation than flat and pointing
straight ahead, this can be accommodated by appropriately setting the AHRS_ORIENTATION
parameter.

Copyright © 2019 Xflight Technologies LLC, Florida, USA
19
Compass / Accelerometer Calibration
Compasses
The Compasses have been calibrated, however fine adjustments can be made manually in order to
ensure the direction is properly indicated in your aircraft, depending on proximity of metal in the
airframe and other effects. The full automated calibration process will also be explained.
The AHRS uses 2 compasses and the GPS. Compass #1 is inside the externally mounted GPS antenna,
and Compass #2 is inside the Flight Controller.
Under the COMPASS section you will find the COMPASS_OFS parameters (see screenshot). These can be
manually modified to fine tune the compass heading. Once you make a change be sure to click the
<Write Params> button on the right to save the changes to the Flight Controller. The Mission Planner
heading display under <Flight Data> will update in real-time as these parameters are written. It is also
advisable to take a backup copy of all parameters with <Save to file>.
COMPASS_OFS_X
Offset for Compass 1 in X direction in mGauss
COMPASS_OFS_Y
Offset for Compass 1 in Y direction in mGauss
COMPASS_OFS_Z
Offset for Compass 1 in Z direction in mGauss
COMPASS_OFS2_X
Offset for Compass 2 in X direction in mGauss
COMPASS_OFS2_Y
Offset for Compass 2 in Y direction in mGauss
COMPASS_OFS2_Z
Offset for Compass 2 in Z direction in mGauss

Copyright © 2019 Xflight Technologies LLC, Florida, USA
20
Compasses can also be enabled / disabled in the parameters:
You can perform the full compass and accelerometer calibration process prior to installation if desired,
by selecting <INITIAL SETUP> from the navigation buttons, then follow the setup wizard prompts under
>> Mandatory Hardware.
Select <Compass>, then for a simple calibration select <Pixhawk/PX4> and follow the prompts. Ensure
the GPS antenna and Flight Controller are taped together when performing this and oriented in the
same direction (the GPS antenna has a built-in compass).
For a more comprehensive calibration select <Live Calibration>, and follow the prompts, moving the
flight controller / external compass around as directed.
This manual suits for next models
1
Table of contents