OpenTX - Application Note 26
APM Autopilot Set Up
The original project was to set up an APM autopilot in a Phantom FX-61 flying wing using a Spektrum DX7 radio. That project is described here.
This project is to replace the Spektrum radio with a Taranis Plus radio.
Much of the APM set up does not need to be changed and the complete set up is not described here. References, however, are made to the previous project where the required set up has already been done.
The connections are described in the Wiring Diagram. Note that the receiver has 8 channels and the receiver channel outputs are connected differently to the way the 7 channel receiver was connected. A FLVSS battery voltage sensor has also been added.
On the Taranis radio, to set up a 6 position switch as a mode switch, refer to Application Note 24.
Refer to Application Note 2 : ‘Timer – Use a Switch to Reset, Pause and Run’.
Refer to Application Note 7: ‘Use a Timer To Record Accumulated Flight Time’.
Refer to Application Note 3: ‘Throttle Disable with Sticky Throttle Option’.
Refer to Application Note 5: ‘Control Audio Volume With A Slider’.
Refer to Application Note 25: ‘Elevons For A Flying Wing’.
On the Taranis radio, switch SC is used to control the geofence as follows.
Switch SC↑ is geofence off.
Switch SC- is geofence enabled.
Switch SC↓ is geofence enabled and reset.
The geofence enable channel in the Taranis is channel 7.
When channel 7 = -100%, the geofence is disabled. When channel 7 = 0 or +100%, the geofence is enabled.
The mixer controls channel 7 as follows.
CV2 is as follows.
The geofence reset channel in the Taranis is channel 6.
When channel 6 = 0 or -100%, the geofence reset is disabled. When channel 6 =+100%, the geofence reset is enabled.
The mixer controls channel 6 as follows.
CV3 is as follows.
Geofence Audio Files
Create these audio files and transfer them to the SD card folder SOUNDS / en.
Use these special functions to play the geofence files. For this example, SF11 through SF13 are used.
Check Geofence Control
In each of the SC positions, check the channel 7 value, the channel 6 value and the audio announcement as described in this table
The modes programmed into the Taranis radio above must now be set up in the APM. The modes are summarized in this table.
Assigning modes to the mode numbers is done in Mission Planner on the ‘Config/Tuning’ page under ‘Flight Modes’. For each flight mode, select the mode name from the pull down menu. Press ‘Complete’ to write the modes into the APM.
For reference, all the possible modes are listed here.
Check that the mode switch selects the correct mode on the ‘Flight Data’ screen. Select each of the 6 switch positions and check the display on the artificial horizon displays the correct mode.
The accelerometers have been calibrated previously here under ‘Levelling Calibration’.
The compass has been set up previously here under ‘Compass Set Up’.
Manual Mode Calibration
Select manual mode using the 6 position switch.
Set the Taranis radio channel controls to correctly control each control surface. Reverse any channel in the radio if necessary. For elevons, set up these also in the radio. Refer to Application Note 25.
FBWA Mode Calibration
Select FBWA mode using the 6 position switch.
In Mission Planner, connect to the APM. On the Initial Setup Screen select Mandatory Hardware – Radio Calibration.
Move the throttle, roll, pitch and yaw sticks and check the control surfaces move in the correct direction. Reverse them as required.
Click ‘Calibrate Radio’.
Red range limit lines are shown on each of the channel graphs.
Follow the instructions to set the range of travel that each channel uses. Ensure the sticks move into all the corners to ensure correct calibration! Ensure each of the following channels is moved to their maximum and minimum ranges.
Radio 8 (Mode),
Radio 7 (Geofence enable), and
Radio 6 (Geofence reset).
Radio 5 is not used.
Press ‘Completed’ when complete to store the settings in the APM.
Now, roll and pitch the plane. Set the elevon config boxes to ensure the control surfaces move to oppose the roll and pitch. Reverse as required.
On the Taranis, on the Model Setup screen under ‘Internal RF’, ‘Failsafe mode’, select ‘No pulses’. This programs the X8R receiver to send no pulses to the APM when the receiver loses signal from the Taranis radio.
The APM responds to no pulses by entering Failsafe mode.
The APM failsafe parameters have been set up previously here under ‘Failsafe Set Up’
The PID parameters have been previously set up here under ‘PID Parameter Set Up
The optional hardware has been set up previously here under the following headings.
Optional Hardware - Power Module
Optional Hardware - 3DR Telemetry Radio
Optional Hardware - Airspeed Sensor
Optional Hardware - Stabilised Camera Gimbal
Optional Hardware - Steering Control
The Take Off parameters have been set up previously here under ‘Take Off Set Up’.
The Throttle Control parameters have been set up previously here under ‘Throttle Control Parameters’.
The Attitude Control parameters have been set up previously here under ‘Attitude Control Parameters’.
The TECS parameters have been set up previously here under ‘TECS Parameters’.
With the aircraft ready to fly, the next step is Autopilot Flight Preparation.