Open Flight Stabilizer Version 3.1 (FlightStab)

Updated January 20, 2018

This document is derived from the original document published by noobee along with input from RCGroups ckleanth and is currently maintained by JohnRB.

This document is for builds compiled 03/22/2014 and latter.

Attention - Users of Attitude Hold Mode

A user reported a problem where occasionally when Attitude Hold mode was enabled, the surfaces would immediately move to their limits.  He saw this problem both on an RX3S-V3 and an RX3SM.  The problem was eventually traced to slow RX connection time to the TX data stream and the fact that Attitude Hold was enabled when the Bind to the RX was performed.  This problem is not unique to OrangeRX devices and could happen with any brand of RX that supports fail safe and takes a long time to connect to the TX data stream.

OFS was ready to operate (Wag’s completed) before the RX connected to the TX.  This means that OFS used the fail safe values sent by the receiver while waiting for TX connection instead of the actual current TX control positions.  When the actual TX data started to be emitted by the RX, OFS thought that the aircraft position had changed and was attempting to make corrections.  An Inflight Calibration at this point corrects the problem but it could be far too late to prevent a crash.

Make sure when you bind your TX to the RX that Attitude Hold is not active and that your sticks are in the desired position along with any trim.  If you are using any of the mixing modes like Delta, V-Tail or Duck, Bind the RX again after any major trim changes.

Open FlightStab News

January 20, 2018

October 30, 2017

August 23, 2017

April 5, 2016

February 28, 2016

February 9, 2016

November 20, 2015

September 19, 2015

August 21, 2015

August 18, 2015

August 1, 2015

April 14, 2015

February 21, 2015

February 07, 2015

February 03, 2015

February 02, 2015

 

January 30, 2015

December 17, 2014

Changes since the September 1, 2014 release

Table of Contents

Open Flight Stabilizer Version 3.1 (FlightStab)

Open FlightStab News

Quick Links to Discussion and Files

Supported Devices

Programming Overview

Flashing the Firmware (for non Arduino-based boards)

Flashing with a 3.3V usbasp (highly recommended)

Flashing with a 5V usbasp when a 3.3V usbasp is not available

Flash using eXtreme Burner

Flashing the device (each time you want to upgrade the firmware)

Flash using avrdude

Flash using avrdude on NanoWii (which has the arduino/leonardo bootloader)

Optional: Flashing the AVRootloader

USB-Serial programming adapters

OrangeRX USB Firmware Kit for JR/Futaba Style Transmitter Module

FTDI USB-Serial programming adapter

Programming the firmware image to a bootloader-enabled device:

Flight Stabilizer Board Modifications

RX3S V3 Dual Aileron Support

Instructions for transmitters that support 2nd aileron on Channel 5 (Gear)

Instructions for transmitters that force 2nd aileron on Channel 6 (Aux)

Modification required for Dual Aileron Support for the Hobby King RX3SM DSMx

Modification required for the Hobby King MINI MWC

Modification for the Hobby King MINI MWC using External CPPM

Hobby King MINI MWC SBUS Connections

Modification for the Flip MWC 1.5

Connection/Pinout Tables

Basic Instructions

LED Status

RX and IMU Calibration on Startup

Stabilization modes

Trimming the aircraft

Reset Neutral Stick Position in air.

Mixer EPA Mode

CPPM Mode

S.BUS Serial Mode, SRXL Serial Mode and Spektrum Serial Mode

Mounting the device on your airframe

Stick Configuration Mode

Program Box Options and Stick Config Mode AIL/ELE toggles

Resetting the EEPROM

Programming Box Support - 16K (Recommended)

Flashing the TGY160A with AVRrootloader

Programming Box Support - 8K (16K Preferred)

Flashing the Aquastar/DLUX with AVRrootloader

Using the Aquastar/DLUX/TGY160A Programming Box

Tips

General guidelines for adjusting the PID gains

Wiring Connections

Adjusting the PID gains to have two RATE modes

What happens if there is a Power cycle in the air?

Programming your transmitter for adjusting the Master gain

Spektrum DX8

Spektrum DX18

Spektrum DX6i or OrangeRX T-Six transmitter (using pseudo' 3-Position Switch)

OpenTX / Er9X

FrSky Taranis

OPTIONAL: Building the firmware image from source code

Building the Firmware via cmake (recommended)

Building the firmware via arduino IDE

TinyOS FTDI Programmer Modifications


Quick Links to Discussion and Files

Discussion

rcgroups thread http://www.rcgroups.com/forums/showthread.php?t=1794672

Files

The links below are to the latest version of Open FlightStab.  If you wish to obtain Hex files for older version, use the build images link.  Once that page opens, look near the right side of the page and you will find the text History.  Click on History and you will be presented with a list of all of the commits since the very beginning.  Search the list for the date of interest and then click on browse code and you will be presented with the Hex files altered on that date.

noobee’s Master branch release (last update March 22, 2014):

source code https://github.com/noobee/FlightStab/

build images https://github.com/noobee/FlightStab/tree/master/Builds

Download the whole repository as zip Noobee FlightStab Master zip

JohnRB’s Master branch release (updated clone of noobee’s):

source code https://github.com/John-RB/FlightStab

build images https://github.com/John-RB/FlightStab/tree/master/Builds

Download the whole repository as zip John-RB FlightStab Master zip

Notes:

noobee has been extremely busy doing his “real job”.  The most recent updates are at the JohnRB link.  If and when noobee has some free time, the JohnRB version will be merged back into the noobee Master Branch.  The master branch always is the Stable version of Open Flight Stabilizer. Any new mixes will appear as a branch and will be merged once the branch has matured and verified by flight tests.

There are a number of changes and support for new boards like the FLIP 1.5.

The pinout could have changed for some boards, so please check the manual again to confirm that your setup is fine.

Key Features

Supported Devices

 

RX3SM DSMx Bottom.jpg

RX3SM DSMx Top.jpg

With RF Deck                                                

RF Deck Removed

MINI MWC with RF Deck Removed.jpg

Flip_1_5 Board.jpg

Programming Overview

This section describes the layout of the ATMEGA flash memory and how it is utilized both with and without a Bootloader.  

Without Bootloader

Using the Bootloader

Flashing the Firmware (for non Arduino-based boards)

This section deals with flashing the Open Flight Stabilizer firmware onto your device. Two types of usbasp devices have been tested and these are described in USB-Serial programming adapters section.

The MINI MWC & Flip MWC 1.5 processors operates at 5V and must be flashed with a programmer configured for 5V operation.

The RX3S family of devices are best programmed using a programmer configured for 3.3V operation.

Flashing with a 3.3V usbasp (highly recommended)

Flashing with a 5V usbasp when a 3.3V usbasp is not available

Caution - doing things in an incorrect order can damage the ATmega168PA which will require replacement.  There is still a minor risk even if everything is done in the proper order as the signals from the usbasp will be 5V signals that the ATmega168PA will try to clamp to about 4V.  

Flash using eXtreme Burner

Setting up eXtremeBurner (first time)

        <CHIP>

                <NAME>ATmega168PA</NAME>

                <FLASH>16384</FLASH>

                <EEPROM>512</EEPROM>

                <SIG>0x000B941E</SIG>

                <PAGE>128</PAGE>

                <LFUSE layout="2">YES</LFUSE>

                <HFUSE layout="3">YES</HFUSE>

                <EFUSE layout="2">YES</EFUSE>

                <LOCK>YES</LOCK>

                <CALIB>YES</CALIB>

                <PLACEMENT>.\Images\Placements\ZIF_DIP_40.bmp</PLACEMENT>

        </CHIP>

        Checking and erasing the device before flashing for the first time

    lo=0xf7

    hi=0xdf

    ext=0xf9

    lock=0xfc

    lo=0xff

    hi=0xda

    ext=0xf9

    lock=0xff

Flashing the device (each time you want to upgrade the firmware)

Flash using avrdude

avrdude -C "C:\Program Files\arduino-1.0.3\hardware\tools\avr\etc\avrdude.conf" -c usbasp -p m168p -U flash:w:<filename>.hex

Flash using avrdude on NanoWii (which has the arduino/leonardo bootloader)

REM Trigger Programming Port

avrdude -p m32u4 -P COM7 -c avr109 -b 1200

REM Delay for 3 seconds

PING -n 4 127.0.0.1>nul

REM Program Flash

avrdude -p m32u4 -P COM5 -c avr109 -D -Uflash:w:%1:i

REM Delay for 3 seconds

PING -n 4 127.0.0.1>nul

You'll need to swap details in Blue/Red to suit your NanoWii.

How to find Trigger and Active Comports:

Save the above code after you have updated the COM port values to a Text file and rename to something handy for you, example NanoFlash.bat.

Open Explorer and type into address bar '%APPDATA%\Microsoft\Windows\SendTo' and put NanoFlash.bat in that folder.

If you are using Windows XP the above command may not work.  Your SendTo directory may be found at c:\Documents and Settings\your_user_name\SendTo.

How to use

Optional: Flashing the AVRootloader

It is possible to flash a bootloader via usbasp on the RX3S, MINI MWC, Flip MWC 1.5 and/or the Programming box. If the bootloader is installed, then flashing the main stabilizer firmware or Programming box does not require the usbasp. Instead, a USB-serial adapter may be connected to the AILR_OUT  channel of the stabilizer with RX3S devices, RUD_OUT channel with the RX3SM devices or the A0 connector on the MINI MWC or Flip MWC 1.5.  The Programming box may also be connected to this connector.  This is more convenient than opening up the device to upgrade the firmware via the usbasp ISP connector.

Steps to flash the bootloader using the USBASP (note: for RX3S, RX3SM, MINI MWC & Flip MWC 1.5 only):

.\FlightStab\AVRootloader\AVR\default\AVRootloader_MINI_MWC_A0.hex

 

Caution: Once the AVRootloader has been installed, the ISP connector should not be used again unless the AVRootloader is being replaced or updated.  If the ISP connector is used for programming, the AVRootloader will be erased.

Instructions for flashing the AVRootloader into the Programming box can be found in the Programming Box Support section.

USB-Serial programming adapters

Two different devices for flashing the firmware have been tested to date as described in the two sections that follow:

OrangeRX USB Firmware Kit for JR/Futaba Style Transmitter Module

     Programmer

     Cable

This device requires a device driver which can be obtained here: Device Driver

Install the device driver on your computer before connecting the device for the first time.

Current information on the Device Driver WEB site indicates that there are special install instructions for user of Windows 8, 8.1 and 10.  In addition, if the board you have uses an older version of the Prolific chip it might not even work with Windows 8 and above.  A tool is provided in the drive download package to check what chip is on the board you have.

The programmer is supplied as 2 PCB’s.  We will only use the PCB with the USB connector.  The cable listed above will plug into the socket on this PCB and the BEC from your ESC plugs into the 2 pins on the edge of the board.  Photo of components used shown below.

ORx USB Programmer Connection Annotated.jpg

Note the orientation of the BEC connector, the orange wire is not connected. The green LED indicates that the USB is connected and the blue LED indicates that the BEC is providing power.  Never connect your device to the programming cable unless both LED’s are on.

This device does not have a voltage switch.  It’s normal output is a 4V signal which is high enough to program 5V devices and the RX3S family of devices have current limiting resistors for the signal line on all of the 3 pin connectors and will not be damaged by this programmer.

FTDI USB-Serial programming adapter

This device requires a device driver which can be obtained here: Device Drivers

This device requires modification, the circuit mod follows:

https://docs.google.com/drawings/d/1WhYAdw_9QpfYJWmOuu2IhCJNw6rNNagTw_OZEqriTo8/pub?w=867&h=439

One source for this programmer is http://www.tinyosshop.com/index.php?route=product/product&product_id=600

Modifications to allow the TinyOS programmer to supply 5V power and 3.3V signals can be found at the end of this document in the “TinyOS FTDI Programmer Modificationssection.

Programming the firmware image to a bootloader-enabled device:


Flight Stabilizer Board Modifications

RX3S V3 Dual Aileron Support

Instructions for transmitters that support 2nd aileron on Channel 5 (Gear)

This modifications adds 1 wire to the bottom of the PCB to connect the JP4 TX pin to the GEAR pad which is used as the 2nd aileron input to the Atmel chip.  The wire should be held in place with small dabs of Hot Glue in several places.  

The needed modification is shown in the photo below.

Instructions for transmitters that force 2nd aileron on Channel 6 (Aux)

The first modification connects the Aux input (2nd Aileron) to the Atmel chip. Add a wire on the bottom of the PCB to connect the TX pin of JP4 to the AUX1 pad as shown in the photo below.  Again use several dabs of Hot Glue on the wire to hold it in place.

The second modification is to move the Mode/Gain control from channel 6 to channel 5.  You must also modify your transmitter setup to use channel 5 for Mode/Gain control.  

This change requires the removal of R24.  Then R24 can be installed such that one end connects to the original R24 pad closest to the to the center of the board with the resistor body covering the R24 silk screen.  Then connecting a wire to the free end of R24 to the pad labeled GEAR.  Cover the resistor and several places on the wire with a small amount of Hot Glue that is easily removed with alcohol.  

The other option is to remove and discard surface mount R24 and replace it with a discrete 10K resistor connected from the R24 pad closest to the center of the board and the pad labeled GEAR.  Again use several dabs of Hot Glue on the wire and resistor to hold them in place.  Both options are shown in the photos below, choose only 1 option.

Using surface mount R24 (resistor has not yet been moved in this photo)

Using a discrete 10K resistor (Photo supplied by user DepronMan)

Modification required for Dual Aileron Support for the Hobby King RX3SM DSMx

NOTE - This rework only applies to the DSMx version of the RX3SM 

This rework will remove the Gear Channel output from the end connector and reroute the gear signal to to Atmel processor as the second aileron (AILR) input for stabilization.  The output end connector label GEAR will now be used for the right Aileron servo signal.

The RF deck on the DSMx version of this device is soldered to the main PCB board and cannot be easily removed.  On the DSM2 version of this device the RF deck plugged into headers and was easily removable.

Before starting this rework make sure you have some 1K and 10K 0402 SMD parts on hand.  Mouser part numbers for these parts are:

        0402 1K ohm resistor - 667-ERJ-2GEJ102X

        0402 10K ohm resistor - 667-ERJ-2RKF1002X (only needed for device restoration)

The photo below shows the area to be reworked on an unmodified PCB

RX3SM DSMx Dual Aileron Rework Area PCB Bottom.jpg

The first step of the rework is to remove R25 and set it aside (if you can find it after removal).  This is a 10K resistor that will no longer be used but will be required if you ever decide to restore the board to the factory wiring.

The second step is to carefully remove R3 and then install it at the R25 location.  Hopefully you have a spare on hand in case R3 was lost in the removal process.

The third step is to add a short piece of insulated wire from the pad used for R3 that is closest to the center of the PCB to the switch pin that connects to R20.  It is much easier to solder to the switch pin than to the end of R20.

The last step is to add a short piece of insulated wire from the signal pin of the gear connector (near the other end of R3).

Reworked PCB

RX3SM DSMx Dual Aileron Rework PCB Bottom.jpg

Modification required for the Hobby King MINI MWC

This board was designed for MultiRotor use and does not support servos.  The reason for this is that the recommended power is a 2S LiPo connected to the A2 connector.  The center pin of all of the connectors are tied together on the PCB and with 7.4V connected to A2, all of the servo jacks will have 7.4V which may damage most servos.  Thus for Aircraft use with servos, a minor modification is required on the bottom of the PCB.  This modification will tie the output of the onboard 5V regulator to the center pins of all the connectors.  A2 is then connected to the 5V output of your BEC to power the MINI MWC and the connected servos.  The photo below depicts the modification required for all configurations of this board..

Modification for the Hobby King MINI MWC using External CPPM

This mode requires that an additional wire be added to the bottom of the PCB.  This wire does not interfere with other configurations so it may be left connect for all configurations.

The RF deck should be removed.  CPPM cable from RX connected to EXT CPPM connector in photo for end connectors shown above.  The CPPM cable can also supply 5V in which case nothing needs to be connected to A2.

Hobby King MINI MWC SBUS Connections

The SBUS signal must be connected, through an inverter, to the RXD signal of the UART connector shown in the photo below.  This requires a 1.25mm JST connector.  One source for this connector is here (link).  Other sources may be available.  The GND signal for the SBUS cable should be connected to GND on the UART connector.

In addition a cable with 5V and ground must also be connected to the A2 connector.  This is because the signal labeled 5V on the UART connector is not the 5V signal on the PCB, it is actually the input to the 5V regulator on the PCB.

Modification for the Flip MWC 1.5

This board has an onboard 5V regulator.  If you plan to use a 6V UBEC with 6V servos you can use the board without modification.  If you wish to use 5V BEC and 5V servos the board requires a minor modification.  

Modifications - Original Flip MWC 1.5

There are two adjacent pads on the PCB where you can place a short jumper or just a solder “blob” to bypass the 5V regulator.  Note that there are actually 3 pads in the circled area and the bottom 2 already have a solder “blob” from the factory.  All 3 pads need to be connected by a single solder “blob”.

Location of aircraft front and pads to bypass 5V regulator (red circle area).

Flip_1_5 Regulator Jumper.jpg

Closeup of pads before shorting

5V Regulator Enabled.jpg

Closeup of shorted pads (Solder Blob)

5V Regulator Disabled.jpg

Modifications - New Flip MWC 1.5

Some boards have a 0 Ohm resistor connecting the 2 bottom pads.  That resistor should be left in place with a solder “blob” added between the top of the 0 Ohm resistor and the open pad above it to bypass the 5V regulator.

Annotated New Flip_1_5 Regulator Jumper.jpg


Connection/Pinout Tables

This section describes the connections for each device and for each mix mode configuration.

Mix Mode

Description

RUDELE 1-AIL

Rudder + Elevator Tail (pitch and yaw). Single Aileron.

DELTA 1-AIL

Elevon Tail (pitch and roll). Single Aileron and Rudder.

VTAIL 1-AIL

Vee Tail (pitch and yaw). Single Aileron. No Rudder.

RUDELE 2-AIL

Rudder + Elevator Tail (pitch and yaw). Dual Ailerons (Flapperons).

DELTA 2-AIL

Elevons with “FLAPPERONEVATORs”. No Rudder.

RUD_IN is the LINKED input. RUD_VR is pitch gain on FLAPPERONEVATORs. Click here for description

VTAIL 2-AIL

V Tail with Flapperons.

DUCKERON

4 split wing control surfaces (pitch, roll, yaw and brake). Yaw by differential braking.

AILR_IN is the BRAKE input.

RUD 2-ELE 2-AIL

Rudder + Dual Ailerons and Dual Elevators

Legend

Cell Color

Pin Type

Blue

DIP Switch

Orange

Servo or RX Pin

Red

Output to Servo or ESC

Green

Input from RX


RX3S V1

RudEle

1-AIL

Delta

1-AIL

VTail

1-AIL

RudEle

2-AIL

Delta

2-AIL

VTail

2-AIL

Duck

Rud 2-ELE

2-AIL

RUD_SW

NOR ▶

REV ◀

NOR ▶

REV ◀

via CFG

via CFG

via CFG

N/A

ELE_SW

NOR ▶

NOR ▶

REV ◀

REV ◀

via CFG

via CFG

via CFG

N/A

AIL_SW (TxD)

N/A

AIL_OUT

AIL

DELTA-2

AIL

AIL-L

AIL-L

AIL-L

LEFT-1

N/A

ELE_OUT

ELE

DELTA-1

VTAIL-1

ELE

DELTA-1

VTAIL-1

LEFT-2

N/A

RUD_OUT

RUD

RUD

VTAIL-2

RUD

DELTA-2

VTAIL-2

RIGHT-2

N/A

AILR_OUT

MODE

MODE

MODE

AIL-R

AIL-R

AIL-R

RIGHT-1

N/A

1-WIRE

AIL_IN

AIL

AIL

AIL

AIL-L

AIL-L

AIL-L

AIL-L

N/A

ELE_IN

ELE

ELE

ELE

ELE

ELE

ELE

ELE

N/A

RUD_IN

RUD

RUD

RUD

RUD

LINKED

RUD

RUD

N/A

ISP ↑ pin (mosi)

MODE

MODE

MODE

MODE

N/A

ISP ↙ pin (miso)

AIL-R

AIL-R

AIL-R

BRAKE

N/A

LED flashes

2

3

4

5

6

7

8

9

RX3S V1 CPPM/Serial (SPEKTRUM/SBUS/SRXL)

RudEle

1-AIL

Delta

1-AIL

VTail

1-AIL

RudEle

2-AIL

Delta

2-AIL

VTail

2-AIL

Duck

Rud 2-ELE

2-AIL

RUD_SW

NOR ▶

REV ◀

NOR ▶

REV ◀

via CFG

via CFG

via CFG

via CFG

ELE_SW

NOR ▶

NOR ▶

REV ◀

REV ◀

via CFG

via CFG

via CFG

via CFG

AIL_SW (TxD)

AIL_OUT

AIL

DELTA-2

AIL

AIL-L

AIL-L

AIL-L

LEFT-1

AIL-L

ELE_OUT

ELE

DELTA-1

VTAIL-1

ELE

DELTA-1

VTAIL-1

LEFT-2

ELE-L

RUD_OUT

RUD

RUD

VTAIL-2

RUD

DELTA-2

VTAIL-2

RIGHT-2

RUD

AILR_OUT

AIL

AIL

AIL

AIL-R

AIL-R

AIL-R

RIGHT-1

AIL-R

1-WIRE

AIL_IN

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

ELE_IN

FLAP

FLAP

FLAP

FLAP

FLAP

FLAP

FLAP

ELE-R

RUD_IN

THR

THR

THR

THR

THR

THR

THR

THR

ISP ↑ pin (mosi)

ISP ↙ pin (miso)

RxD pin

serial

serial

serial

serial

serial

serial

serial

serial

LED flashes

2

3

4

5

6

7

8

9


RX3S V2/V3

RudEle

1-AIL

Delta

1-AIL

VTail

1-AIL

RudEle

2-AIL

Delta

2-AIL

VTail

2-AIL

Duck

Rud 2-ELE

2-AIL

AUX_SW (RxD)

N/A

RUD_SW

N/A

ELE_SW

NOR ▶

NOR ▶

NOR ▶

NOR ▶

REV ◀

REV ◀

REV ◀

N/A

AIL_SW (TxD)

NOR ▶

NOR ▶

NOR ▶

NOR ▶

N/A

VTAIL_SW

NOR ▶

NOR ▶

REV ◀

REV ◀

NOR ▶

REV ◀

NOR ▶

N/A

DELTA_SW

NOR ▶

REV ◀

NOR ▶

REV ◀

REV ◀

NOR ▶

NOR ▶

N/A

AIL_OUT

AIL

DELTA-2

AIL

AIL-L

AIL-L

AIL-L

LEFT-1

N/A

ELE_OUT

ELE

DELTA-1

VTAIL-1

ELE

DELTA-1

VTAIL-1

LEFT-2

N/A

RUD_OUT

RUD

RUD

VTAIL-2

RUD

DELTA-2

VTAIL-2

RIGHT-2

N/A

AILR_OUT

AIL

AIL

AIL

AIL-R

AIL-R

AIL-R

RIGHT-1

N/A

1-WIRE

AIL_IN

AIL

AIL

AIL

AIL-L

AIL-L

AIL-L

AIL

N/A

ELE_IN

ELE

ELE

ELE

ELE

ELE

ELE

ELE

N/A

RUD_IN

RUD

RUD

RUD

RUD

LINKED

RUD

RUD

N/A

AUX_IN

MODE

MODE

MODE

MODE

MODE

MODE

MODE

N/A

TxD pin

AIL-R

AIL-R

AIL-R

BRAKE

N/A

LED flashes

2

3

4

5

6

7

8

9

RX3S V2 CPPM/Serial (SPEKTRUM/SBUS/SRXL)

RudEle

1-AIL

Delta

1-AIL

VTail

1-AIL

RudEle

2-AIL

Delta

2-AIL

VTail

2-AIL

Duck

Rud 2-ELE

2-AIL

AUX_SW (RxD)

NOR ▶

NOR ▶

NOR ▶

NOR ▶

NOR ▶

NOR ▶

NOR ▶

NOR ▶

RUD_SW

ELE_SW

NOR ▶

NOR ▶

NOR ▶

NOR ▶

REV ◀

REV ◀

REV ◀

NOR ▶

AIL_SW (TxD)

VTAIL_SW

NOR ▶

NOR ▶

REV ◀

REV ◀

NOR ▶

REV ◀

NOR ▶

NOR ▶

DELTA_SW

NOR ▶

REV ◀

NOR ▶

REV ◀

REV ◀

NOR ▶

NOR ▶

NOR ▶

AIL_OUT

AIL

DELTA-2

AIL

AIL-L

AIL-L

AIL-L

LEFT-1

AIL-L

ELE_OUT

ELE

DELTA-1

VTAIL-1

ELE

DELTA-1

VTAIL-1

LEFT-2

ELE-L

RUD_OUT

RUD

RUD

VTAIL-2

RUD

DELTA-2

VTAIL-2

RIGHT-2

RUD

AILR_OUT

AIL

AIL

AIL

AIL-R

AIL-R

AIL-R

RIGHT-1

AIL-R

1-WIRE

AIL_IN

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

ELE_IN

FLP

FLP

FLP

FLP

FLP

FLP

FLP

ELE-R

RUD_IN

THR

THR

THR

THR

THR

THR

THR

THR

AUX_IN

AUX2

AUX2

AUX2

AUX2

AUX2

AUX2

AUX2

AUX2

TxD pin

RxD pin

serial

serial

serial

serial

serial

serial

serial

serial

LED flashes

2

3

4

5

6

7

8

9


RX3SM DSM2

RudEle

1-AIL

Delta

1-AIL

VTail

1-AIL

RudEle

2-AIL

Delta

2-AIL

VTail

2-AIL

Duck

Rud 2-ELE

2-AIL

GYRO/AUX_SW

RUD_SW

ELE_SW

AIL_SW (TxD)

VTAIL_SW (RxD)

NOR ▶

NOR ▶

REV ◀

DELTA_SW

NOR ▶

REV ◀

NOR ▶

AIL_OUT

AIL

DELTA-2

AIL

ELE_OUT

ELE

DELTA-1

VTAIL-1

RUD_OUT

RUD

RUD

VTAIL-2

1-WIRE

LED flashes

2

3

4

RX3SM DSMx

RudEle

1-AIL

Delta

1-AIL

VTail

1-AIL

RudEle

2-AIL

Delta

2-AIL

VTail

2-AIL

Duck

Rud 2-ELE

2-AIL

GYRO/AUX_SW

NOR ▶

NOR ▶

NOR ▶

NOR ▶

NOR ▶

NOR ▶

RUD_SW

ELE_SW

AIL_SW (TxD)

NOR ▶

NOR ▶

NOR ▶

NOR ▶

NOR ▶

NOR ▶

VTAIL_SW (RxD)

NOR ▶

NOR ▶

REV ◀

REV ◀

NOR ▶

REV ◀

DELTA_SW

NOR ▶

REV ◀

NOR ▶

REV ◀

REV ◀

NOR ▶

AIL_OUT

AIL

DELTA-2

AIL

AIL

DELTA-2

AIL

ELE_OUT

ELE

DELTA-1

VTAIL-1

ELE

DELTA-1

VTAIL-1

RUD_OUT

RUD

RUD

VTAIL-2

RUD

RUD

VTAIL-2

1-WIRE

GEAR/AILR_OUT

GEAR

GEAR

GEAR

AILR

AILR

AILR

LED flashes

2

3

4

5

3

4


MINI MWC CPPM/Serial (SPEKTRUM/SBUS/SRXL)

RudEle

1-AIL

Delta

1-AIL

VTail

1-AIL

RudEle

2-AIL

Delta

2-AIL

VTail

2-AIL

Duck

Rud 2-ELE

2-AIL

D11 (AILR_OUT)

AIL

AIL

AIL

AIL-R

AIL-R

AIL-R

RIGHT-1

AIL-R

D6 (RUD_OUT)

RUD

RUD

VTAIL-2

RUD

DELTA-2

VTAIL-2

RIGHT-2

RUD

D5 (ELE_OUT)

ELE

DELTA-1

VTAIL-1

ELE

DELTA-1

VTAIL-1

LEFT-2

ELE-L

A2 (AUX2_OUT)

AUX2

AUX2

AUX2

AUX2

AUX2

AUX2

AUX2

AUX2

D10 (AIL_OUT)

AIL

DELTA-2

AIL

AIL-L

AIL-L

AIL-L

LEFT-1

AIL-L

D9 (FLP_OUT)

FLP

FLP

FLP

FLP

FLP

FLP

FLP

ELE-R

D3 (THR_OUT)

THR

THR

THR

THR

THR

THR

THR

THR

A1 (CPPM_IN)

Ext CPPM

Ext CPPM

Ext CPPM

Ext CPPM

Ext CPPM

Ext CPPM

Ext CPPM

Ext  CPPM

A0

1-WIRE

LED flashes

2

3

4

5

6

7

8

9


FLIP 1.5

RudEle

1-AIL

Delta

1-AIL

VTail

1-AIL

RudEle

2-AIL

Delta

2-AIL

VTail

2-AIL

Duck

Rud 2-ELE

2-AIL

D11 (AILR_OUT)

AIL

AIL

AIL

AIL-R

AIL-R

AIL-R

RIGHT-1

AIL-R

D3 (RUD_OUT)

RUD

RUD

VTAIL-2

RUD

DELTA-2

VTAIL-2

RIGHT-2

RUD

D9 (ELE_OUT)

ELE

DELTA-1

VTAIL-1

ELE

DELTA-1

VTAIL-1

LEFT-2

ELE-L

D10 (AIL_OUT)

AIL

DELTA-2

AIL

AIL-L

AIL-L

AIL-L

LEFT-1

AIL-L

A2 (FLP_OUT)

ELE-R

A1 (THR_OUT)

D2 (THR/PPM)

D4 (AIL)

AIL

AIL

AIL

AIL-L

AIL-L

AIL-L

AIL

AIL-L

D5 (ELE)

RUD

RUD

RUD

RUD

LINKED

RUD

RUD

RUD

D6 (YAW)

ELE

ELE

ELE

ELE

ELE

ELE

ELE

ELE-L

D7 (AUX1)

AIL-R

AIL-R

AIL-R

BRAKE

AIL-R

D12 (AUX2)

MODE

MODE

MODE

MODE

MODE

MODE

MODE

MODE

A0

ELE-R

1-WIRE

LED flashes

2

3

4

5

6

7

8

9

FLIP 1.5 CPPM/Serial (SPEKTRUM/SBUS/SRXL)

RudEle

1-AIL

Delta

1-AIL

VTail

1-AIL

RudEle

2-AIL

Delta

2-AIL

VTail

2-AIL

Duck

Rud 2-ELE

2-AIL

D11 (AILR_OUT)

AIL

AIL

AIL

AIL-R

AIL-R

AIL-R

RIGHT-1

AIL-R

D3 (RUD_OUT)

RUD

RUD

VTAIL-2

RUD

DELTA-2

VTAIL-2

RIGHT-2

RUD

D9 (ELE_OUT)

ELE

DELTA-1

VTAIL-1

ELE

DELTA-1

VTAIL-1

LEFT-2

ELE-L

D10 (AIL_OUT)

AIL

DELTA-2

AIL

AIL-L

AIL-L

AIL-L

LEFT-1

AIL-L

A2 (FLP_OUT)

FLP

FLP

FLP

FLP

FLP

FLP

FLP

ELE-R

A1 (THR_OUT)

THR

THR

THR

THR

THR

THR

THR

THR

D12 (AUX2)

AUX2

AUX2

AUX2

AUX2

AUX2

AUX2

AUX2

AUX2

D2 (CPPM_IN)

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

RxD pin

serial

serial

serial

serial

serial

serial

serial

serial

A0

1-WIRE

LED flashes

2

3

4

5

6

7

8

9


NANO WII

RudEle

1-AIL

Delta

1-AIL

VTail

1-AIL

RudEle

2-AIL

Delta

2-AIL

VTail

2-AIL

Duck

Rud 2-ELE

2-AIL

D7

AIL-R

AIL-R

AIL-R

BRAKE

AIL-R

AUX

MODE

MODE

MODE

MODE

MODE

MODE

MODE

MODE

YAW

RUD

RUD

RUD

RUD

RUD

LINKED

RUD

RUD

PITCH

ELE

ELE

ELE

ELE

ELE

ELE

ELE

ELE-L

ROLL

AIL

AIL

AIL

AIL-L

AIL-L

AIL-L

AIL-L

AIL-L

A3

ELE-R

D13 (AILR_OUT)

AIL

DELTA-2

AIL

AIL-R

AIL-R

AIL-R

RIGHT-1

AIL-R

1-WIRE

D11 (RUD_OUT)

RUD

RUD

VTAIL-2

RUD

DELTA-2

VTAIL-2

RIGHT-2

RUD

D6 (FLP_OUT)

ELE-R

D5 (THR_OUT)

D10 (ELE_OUT)

ELE

DELTA-1

VTAIL-1

ELE

DELTA-1

VTAIL-1

LEFT-2

ELE-L

D9 (AIL_OUT)

AIL

AIL

AIL

AIL-L

AIL-L

AIL-L

LEFT-1

AIL-L

LED flashes

2

3

4

5

6

7

8

9

NANO WII CPPM/Serial (SPEKTRUM/SBUS/SRXL)

RudEle

1-AIL

Delta

1-AIL

VTail

1-AIL

RudEle

2-AIL

Delta

2-AIL

VTail

2-AIL

Duck

Rud 2-ELE

2-AIL

D7

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

AUX

YAW

PITCH

ROLL

D13 (AILR_OUT)

AIL

DELTA-2

AIL

AIL-R

AIL-R

AIL-R

RIGHT-1

AIL-R

1-WIRE

D11 (RUD_OUT)

RUD

RUD

VTAIL-2

RUD

DELTA-2

VTAIL-2

RIGHT-2

RUD

D6 (FLP_OUT)

FLP

FLP

FLP

FLP

FLP

FLP

FLP

ELE-R

D5 (THR_OUT)

THR

THR

THR

THR

THR

THR

THR

THR

D10 (ELE_OUT)

ELE

DELTA-1

VTAIL-1

ELE

DELTA-1

VTAIL-1

LEFT-2

ELE-L

D9 (AIL_OUT)

AIL

AIL

AIL

AIL-L

AIL-L

AIL-L

LEFT-1

AIL-L

RxD

serial

serial

serial

serial

serial

serial

serial

serial

LED flashes

2

3

4

5

6

7

8

9


A3 PRO (TBD TBD TBD)

RudEle

1-AIL

Delta

1-AIL

VTail

1-AIL

RudEle

2-AIL

Delta

2-AIL

VTail

2-AIL

Duck

Rud 2-ELE

2-AIL

AIL_SW

TBD

TBD

TBD

TBD

TBD

TBD

TBD

N/A

ELE_SW

TBD

TBD

TBD

TBD

TBD

TBD

TBD

N/A

RUD_SW

TBD

TBD

TBD

TBD

TBD

TBD

TBD

N/A

AILR_IN

AIL-R

AIL-R

AIL-R

BRAKE

N/A

AUX_IN

MODE

MODE

MODE

MODE

MODE

MODE

MODE

N/A

RUD_IN

RUD

RUD

RUD

RUD

RUD

LINKED

RUD

N/A

ELE_IN

ELE

ELE

ELE

ELE

ELE

ELE

ELE

N/A

AIL_IN

AIL

AIL

AIL

AIL-L

AIL-L

AIL-L

AIL-L

N/A

RUD_OUT

RUD

RUD

VTAIL-2

RUD

DELTA-2

VTAIL-2

RIGHT-2

N/A

1-WIRE

ELE_OUT

ELE

DELTA-1

VTAIL-1

ELE

DELTA-1

VTAIL-1

LEFT-2

N/A

AIL_OUT

AIL

AIL-L

AIL

AIL-L

AIL-L

AIL-L

LEFT-1

N/A

AILR_OUT

AIL

DELTA-2

AIL

AIL-R

AIL-R

AIL-R

RIGHT-1

N/A

LED flashes

2

3

4

5

6

7

8

9

A3 PRO CPPM/Serial (SPEKTRUM/SBUS/SRXL) (TBD TBD TBD TBD)

RudEle

1-AIL

Delta

1-AIL

VTail

1-AIL

RudEle

2-AIL

Delta

2-AIL

VTail

2-AIL

Duck

Rud 2-ELE

2-AIL

AIL_SW (RxD)

serial

serial

serial

serial

serial

serial

serial

serial

ELE_SW (TxD)

TBD

TBD

TBD

TBD

via CFG

via CFG

via CFG

via CFG

RUD_SW

TBD

TBD

TBD

TBD

via CFG

via CFG

via CFG

via CFG

AILR_IN

AUX_IN

AUX-2

AUX-2

AUX-2

AUX-2

AUX-2

AUX-2

AUX-2

AUX-2

RUD_IN

THR

THR

THR

THR

THR

THR

THR

THR

ELE_IN

FLP

FLP

FLP

FLP

FLP

FLP

FLP

ELE-R

AIL_IN

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

CPPM

RUD_OUT

RUD

RUD

VTAIL-2

RUD

DELTA-2

VTAIL-2

RIGHT-2

RUD

1-WIRE

ELE_OUT

ELE

DELTA-1

VTAIL-1

ELE

DELTA-1

VTAIL-1

LEFT-2

ELE-L

AIL_OUT

AIL

AIL-L

AIL

AIL-L

AIL-L

AIL-L

LEFT-1

AIL-L

AILR_OUT

AIL

DELTA-2

AIL

AIL-R

AIL-R

AIL-R

RIGHT-1

AIL-R

LED flashes

2

3

4

5

6

7

8


Basic Instructions

Before attempting to use any stabilization mode it is advisable to double check and make sure you can switch the gyro off from your transmitter.

For help Programming your transmitter for switching between modes and adjusting the Master gain (and switch the gyro off ) please see “Programming your transmitter for adjusting the Master gain” section.

For help adjusting PID gains please see “General guidelines for adjusting the PID gains” section.

 

Although numerous flights have been conducted using Flightstab it is impossible to capture all airframes with the default PID values . PID values do vary from aircraft to aircraft. PID values can only be viewed and altered with the programming box.

 

Therefore please use low VR POT gain and double check the correction direction (the gyro needs to oppose the movement/excitation).  Fly to a safe altitude and use low master gain and gradually increase to full watching for any signs of oscillation.

AUX Gain-Rate-Hold.png

The stick position also controls the gain to reduce the stabilizer from over correcting your controls during manoeuvres.

LED Status

There are 4 LED message slots. each slot is a series of flashes to indicate a condition. LONG flashes are 600ms pulses (600ms on and 600ms off), SHORT flashes are 200ms pulses and VERY_SHORT pulses are 30ms pulses. the number of pulses and duration of each pulse determines the message.

LED pulses

Message

2 LONG

WING mode = single aileron

3 LONG

WING mode = delta

4 LONG

WING mode = vtail

5 LONG

WING mode = dual ailerons (flaperons)

6 LONG

WING mode = delta dual ailerons

7 LONG

WING mode = vtail dual ailerons

8 LONG

WING mode = duckeron

9 LONG

WING mode = dual ailerons & dual elevators

1 SHORT

RX calibrating

2 SHORT

IMU calibrating

3 SHORT

both RX and IMU calibrating

4 SHORT

HOLD stabilization mode (otherwise RATE stabilization mode)

5 SHORT

device init error (gyro)

20 VERY SHORT

low SRAM

50 VERY SHORT

EEPROM has reset, power cycle device now

RX and IMU Calibration on Startup

After powering up, the device will try to calibrate the RX input and IMU sensor simultaneously.

During RX calibration, keep the AIL/ELE/RUD sticks in the neutral (centered) position. for flaperons, it does not matter if they are in the UP or DOWN position. once the device has detected that the sticks have been still for a period, it will record those readings as the neutral stick positions.

During IMU calibration, keep the plane still on the ground. it does not have to be wings level, it just has to be still. Once the device has detected that the IMU readings are stable, it will record those readings as the “zero” rotation rate values.

The LED will flash accordingly if the RX or IMU (or both) calibration is still in progress.

Stabilization will engage once both RX and IMU calibrations complete. You can tell it is the case by any one of the following:

If there is a power cycle in the air, the device will undergo calibration again. But it is unlikely for the plane or the TX to be still enough for calibration complete in the air successfully. However, the RX signals still pass through to the servos, allowing you to control and land the airplane, but without any stabilization.

Stabilization modes

The AUX1 channel determines if the plane is in RATE mode or HOLD mode.  These are the only two modes for Open FlightStab.  A pulse width of 1500us on the AUX1 channel is RATE mode with a gain of 0 which is effectively OFF.

Trimming the aircraft

It is possible to trim the aircraft while flying and have stabilization on, however there are some limitations.

One can trim the aircraft in the air if using “RATE stabilization Mode” however because while trimming you are in fact shifting the neutral stick position, as result this will affect the “Attitude HOLD Mode” and the gyro will try to return to the original neutral stick position.

 

Therefore please be careful if you intend to trim your aircraft with stabilization on. If you are not conformable with, it is advisable not to use Attitude HOLD mode.

Reset Neutral Stick Position in air.

The INFLIGHT CALIBRATION option is on by default. This option allows the user to reset the neutral stick position.  It may be disabled via Stick Configuration or the programming box.

INFLIGHT CALIBRATION is activated when 3 successive mode changes are detected with the time between mode changes being less that ½ second.  If you start in RATE mode, then you must toggle Hold, Rate, Hold with less than ½ second between mode switches (less than 1.5 seconds for total sequence).  If you start in HOLD mode, then you must toggle RATE,HOLD, RATE with less than ½ second between mode switches (less than 1.5 seconds for total sequence).

Mixer EPA Mode

There are 4 mixer EPA modes that controls the limits of all the servos.

Mixer EPA mode

Stabilizer servo output range

FULL (default)

1000-2000 us

NORMAL

1100-1900 us

TRACKING

start with 1250-1750 us, then track and never exceed RX input range

MAX

900-2100 us

With tracking mode, the servos will never be driven past the point that the RX would drive if there was no stabilization correction. This would prevent servo binding. Thus, if this feature has been enabled (default is disabled), you should “cycle” the sticks to the limits on the ground each time before flying for the device to learn the limits from the RX. Otherwise, it would apply a smaller correction than it could based only what it learned from the RX.

CPPM Mode

Some receivers support a mode known as Combined PPP (CPPM) which is a string of pulses lasting for the duration of one transmit frame.  The time between pulses represents the stick position for a channel.  This device supports CPPM mode, measuring the time for each channel by using these pulses.

CPPM reduces the number of connections to the RX and enables more channels (AUX2, THROTTLE and FLAP) on the CPPM enabled devices (for details please refer to the referenced links with the CPPM connection diagrams).

The RX3S V3 device has an integrated RX, which cannot be set to CPPM mode.

Note that the THROTTLE and FLAP channels are passed through and available through two pins since the RX is unlikely to output CPPM and individual channels at the same time. The throttle pass through is emitted out of RUD_IN pin.

The channel order can be changed by set using the programming box and changing the SERIALRX_ORDER parameter.

S.BUS Serial Mode, SRXL Serial Mode and Spektrum Serial Mode

These serial modes are much like CPPM in that only a single wire is required for all supported channels.  The difference is that, unlike CPPM that sends time based pulses, these modes actually send bytes of data containing counts that representing channel pulse widths.  Thus there is no measuring required, just decoding the counts.  No chance for error, the counts used by the stabilizer are the exact counts sent from the transmitter.

Spektrum Serial and SRXL Serial sends these counts as normal negative active 115,200 Baud RS-232 data that is easily decoded by the hardware in the stabilizer processor.

S.BUS Serial sends these counts as positive active 100,000 Baud RS-232 data that must be inverted before it can be decoded by the stabilizer processor. Thus an additional device, a Tarot FYTLZYX10 or equivalent is needed to invert the signal before sending it to the stabilizer processor.

S.BUS, SRXL and Spektrum Serial send data too fast for most analog servos.  The servo output frame rate can be set to a value between 0ms - 20m using the programming box SERVO_FRAME_RATE parameter.  A value of 0 sets the output frame rate to equal the input data rate.

The channel order can be changed by set using the programming box and changing the SERIALRX_ORDER parameter.

The programming box SPEKTRUM_LEVELS parameter can be set to 1024 or 2048 to match the Transmitter resolution.  

Mounting the device on your airframe

Stick Configuration Mode

1

2

3

4

5

6

7

8

9

Program Box Options and Stick Config Mode AIL/ELE toggles

The following table describes all the configurable parameters in the stabilizer. Some of them can be set up through the stick configuration mode described in the preceding section. All of them can be set up through the program box described later in the document (linked here).

CFG version 12

stick config

ELE toggle

stick config

AIL  toggle

WING_MODE

set WING mix mode

1 ele

DIPSW (default)

based on DIP switches

1 ail

RUDELE 1-AIL

override to RUD+ELE and 1-AIL

2 ail

DELTA 1-AIL

override to DELTA and 1-AIL

3 ail

VTAIL 1-AIL

override to VTAIL and 1-AIL

4 ail

RUDELE 2-AIL

override to RUD+ELE and 2-AIL

5 ail

DELTA 2-AIL

override to DELTA and 2-AIL

6 ail

VTAIL 2-AIL

override to VTAIL and 2-AIL

7 ail

DUCKERON

override to DUCKERON

8 ail

RUD 2-ELE 2-AIL

override to RUD+ 2-ELE and 2-AIL

9 ail

MIXER_EPA MODE

limit servo output range

2 ele

FULL (default)

1000-2000 us

1 ail

NORM

1100-1900 us

2 ail

TRACK

start with 1250-1750 us and never exceed RX input

3 ail

MAX

900-2100

4 ail

SERVO_FRAME_RATE

maximum allowable servo frame rate  (in 1/ms)

NA

NA

min = 0

max = 20

limit to 1/0ms (∞ Hz -- no max limit). use for digital servos

limit to 1/20ms (50Hz). use for analog servos

SERIALRX_ORDER

channel order with SERIALRX CPPM/Spektrum/SBUS

NA

NA

per-channel configurable

each channel in ch[12345678] refers to one of [RETA1a2F]

eg. ch[RETA1a2F] for Frsky, ch[TAER1a2F] for Spektrum

SPEKTRUM_LEVELS

spektrum serial 1024 or 2048 levels

NA

NA

1024

1024 levels (10 bits)

2048 (default)

2048 levels (11 bits)

MOUNT_ORIENT

mount device sideways on flat fuselage

3 ele

NORMAL (default)

mount device flat “normally”

1 ail

ROLL_90_LEFT

roll device 90 deg left and mount on left side

2 ail

ROLL_90_RIGHT

roll device 90 deg right and mount on right side

3 ail

ROTATE_90_LEFT

rotate normally mounted device left 90 degrees

4 ail

ROTATE_90_RIGHT

rotate normally mounted device right 90 degrees

5 ail

STICK_GAIN THROW

stick-position gain blends from max (1.0) to zero, over

4 ele

FULL (default)

full stick range

1 ail

HALF

half stick range (ie. no correction from ½ stick onwards)

2 ail

QUARTER

quarter stick range

3 ail

MAX STICK_ROTATE

set stick-controlled rotation rate at full stick

5 ele

VERY_LOW

0.25x

1 ail

LOW

0.5x

2 ail

MEDIUM (default)

1.0x

3 ail

HIGH

2.0x

4 ail

RATE STICK_ROTATE

allow stick-controlled rotation rate in RATE mode

6 ele

DISABLE (default)

disabled

1 ail

ENABLE

enabled

2 ail

INFLIGHT CALIBRATE

toggle RATE/HOLD 3x within 0.5s to calibrate

7 ele

DISABLE

disable inflight RX calibration

1 ail

ENABLE (default)

enable inflight RX calibration

2 ail

VR_GAIN

NA

NA

AIL/ELE/RUD

“POT” = use device POT setting (default)

-127 to 127 = override POT setting

RATE_PID

per-axis P, I, D parameters

NA

NA

Ail P/I/D

ROLL axis P/I/D in RATE mode (500/0/500 default)

Ele P/I/D

PITCH axis P/I/D in RATE mode (500/0/500 default)

Rud P/I/D

YAW axis P/I/D in RATE mode (500/0/500 default)

HOLD_PID

per-axis P, I, D parameters

NA

NA

Ail P/I/D

ROLL axis P/I/D in HOLD mode (500/500/500 default)

Ele P/I/D

PITCH axis P/I/D in HOLD mode (500/500/500 default)

Rud P/I/D

YAW axis P/I/D in HOLD mode (500/500/500 default)

LOW_PASS_FILTER

set gyro Digital Low Pass Filter Values

NA

NA

Highest

256Hz

188Hz

98Hz

42Hz

20Hz

10Hz

Lowest (default)

5Hz

EEPROM

EEPROM action

8 ele

Update Cfg

Write Config to EEPROM

2 ail

Erase Cfg

Erase Config in EEPROM  to Default

NA

Erase Stats

Erase 1/2/R Stats in EEPROM  to 0/0/0

NA

Resetting the EEPROM

To reset the EEPROM to default values, use a jumper to short the pin pairs for the device and then power up.

Device

Pin pair to apply jumper

RX3S & RX3SM

AILL_OUT and ELE_OUT

NanoWii, MINI MWC & Flip MWC 1.5

D6 and D5 (in the Motor Output group)

On reboot, the device will clear the EEPROM and flash the LED rapidly in 3 sec bursts, which indicates that you can now power off the device and remove the jumper. On the next power up, the EEPROM should start with the default “factory reset” values.

Normally, the plane will wiggle the surfaces 3 times to indicate that calibration has completed. If the EEPROM was reset to factory default (either on first boot or on jumper reset), the plane will wiggle the surfaces 9 times instead. This can be used to indicate a problem with EEPROM corruption when you do not expect the EEPROM to be reset.


Programming Box Support - 16K (Recommended)

(link)

FlightStab also supports configuration through the TGY160A programming box. Using the programming box is more convenient and will allow more options than both the 8K Programming box or using the stick configuration.

The steps to enable programming box support are:

Flashing the TGY160A with AVRrootloader

On the TGY160A, the CPU is hidden behind the LCD board, but the pads are exposed just above the 3rd and 4th buttons. The ISP pads have the following definitions (from left to right):

GND

29

VCC

17

16

15

GND

RESET

VCC

SCK

MISO

MOSI

After connecting the USBasp programmer to the program box via the ISP connector, the next step is to erase the chip and set the fuse for bootloader support.

Fuse

TGY160A

LOW

0xE6 or 0xEE

HIGH

0xDD

EXT

0xF8

LOCK

0xCC

DO NOT PROCEED if the values are unexpected.


Programming Box Support - 8K (16K Preferred)

(Aquastar link)

(dlux link)

FlightStab supports configuration through the Aquastar or DLUX programming boxes. Using the programming box is more convenient and will allow more options that using the stick configuration.

The steps to enable programming box support are:

Flashing the Aquastar/DLUX with AVRrootloader

On the Aquastar, the CPU is exposed, so it is highly recommended to use the HK chip adapter for the ISP cable to the USBasp. The ISP pads are also exposed on the PCB if you want to solder the signals instead.

On the DLUX, the CPU is hidden behind the LCD board, but the pads are exposed just above the 3rd and 4th buttons. The ISP pads have the following definitions (from left to right):

GND

29

VCC

17

16

15

GND

RESET

VCC

SCK

MISO

MOSI

After connecting the USBasp programmer to the program box via the ISP connector, the next step is to erase the chip and set the fuse for bootloader support.

 

Fuse

Aquastar

DLUX

LOW

0xAE

0xAE

HIGH

0xCF

0xCF

EXT

not used by ATMega8A

not used by ATMega8A

LOCK

0xFF

0xFC or 0xC0

On the Aquastar, the LOCK fuses are may not be set (0xFF).  If this is the case  you can read and save the flash image at this time in case you want to restore the factory functionality.

On the DLUX, the LOCK fuses ARE set (0xFC), so you can only erase the chip to proceed.

DO NOT PROCEED if the values are unexpected.

Use the AVRootloader instructions to flash the main programming box firmware image (including using the “one-wire” serial connection). The Aquastar firmware is at  .\Builds\201xxxxx_AQUASTAR.hex and the DLUX firmware is at .\Builds\201xxxxx_DLUX.hex.


Using the Aquastar/DLUX/TGY160A Programming Box

Connect the programming box to the FlightStab device. The RX3S devices uses AILR_OUT, the RX3SM device uses RUD_OUT and the MINI MWC and Flip 1.5 devices use A0 as the default channel. Power them on at the same time (or the RX3S after the program box). If the device recognizes the program box, the program box will display the recognized device ID on the status page. Press left/right to change pages and up/down to change sub-options within the page.

The status page (first page) has several items. The device ID, device version, and EEPROM statistics (1/2/R). 1 means the number of times the device detected an error and reset copy #1 of the config. 2 is the same for the redundant copy. R is the number of times both copies have been reset, usually as an outcome of the jumper-based EEPROM reset procedure or by choosing “erase cfg” through the program box.

The eeprom page (last page) has several actions. Update cfg justs updates the Flighstab device with the config that you modified with the program box. Erase cfg invalidates the config so that the device will default to “factory settings” on the next restart, as if this was the first time it was booting up. Erase stats erases the 1/2/R stats.



Tips

General guidelines for adjusting the PID gains

With Open flight stab it is suggested to use knobs to control for overall Master Gain, per-axis POT Gains and individual P, I, D parameters. For most cases, adjusting the master gain and the per-axis POT are usually sufficient for the majority of airframes tested. Master Gain is for the overall flight condition (when speed goes up or prop wash increases over control surfaces). Per-axis POT lets you control the relative correction for the pitch, roll and yaw axes (usually roll and pitch have to be turned down, and yaw turned up).

General guideline is:

- increase Master/Pot Gain if stabilization feels sluggish

- reduce  Master/Pot Gain if it feels too sensitive and the aircraft start to oscillate

The suggested method of adjusting Pot Gains is to set them at a low setting and gradually increase Master Gain until the latter reaches maximum. If the correction does not cause undulations increase Pot Gain and start again until the correction do cause undulations. Then slightly reduce Pot Gain on the offending axis to allow a safety margin. The aim is to use 100% Master Gain with Pot Gains on all axis adjusted to provide correction to your airframe with no undulations.

However sometimes one might want to adjust individual P, I, D parameters because the Pot Gain adjustment is too sensitive for a particular axis (for example roll axis on 3D airframes with large control surfaces).

Individual P, I, D parameters are roughly as follows:

P = Proportional is the major component and is similar to the master gain and POT gain in its effect. Higher P means more aggressive stabilization.

I = Integral and is used only in HOLD to correct any attitude drifts. This parameter accumulates errors in the heading and applies the opposite action, thus achieving "heading hold". Higher I mean stronger tendency to restore the heading.

D = Derivative is a lot more subtle and is used to help with overshoots in correction when P is high. But increasing D too high has the side effect of jittery correction (in theory) when the plane is subject to sudden gusts. Basically higher D means more tendency arrest P's effect but too high is bad.

Wiring Connections

Receivers are usually built so that the “vcc” and “gnd” line are common on all channels. Some receiver manufacturers utilise an edging on their products (like futaba, spektrum etc) that prevent you from inserting the servo plug the wrong way round. Depending if your receiver will allow a plug to be positioned along the signal line (for example FrSky D8R-XP) the proposed wiring configuration below will save you some wiring and is much neater. You can rearrange the male to male wires if the RX3S channel order does not match your receiver.

 

 

 Adjusting the PID gains to have two RATE modes

One can use the configuration programming box to change PID values on the gyro. A very simple representation of Flightstab code implements what is an effectively a PID controller that works individually on all axes. Generally the P gain affects stabilization correction and the I gain affects the Attitude HOLD. Therefore if one changes the I gain in Attitude HOLD one can effectively have two rate modes. However the two modes will be different; this is because of the RATE STICK_ROTATE parameter. This parameter is always enabled (and cannot be disabled) in Attitude HOLD but it is configurable and can be enabled or disabled in RATE mode. By default it is disabled in RATE mode

 

The effect of RATE STICK_ROTATE is that the gyro will take your stick demand from the tx and will stabilize based on that position. Obviously if you use expo then the stick position is not a linear function anymore. For example if you don’t have expo (so stick position and servo output from your tx is linear) and you have up elevator half way, the gyro will stabilize the elevator servo on that position. The control of the aircraft is then effectively "fly by wire" because your tx demands are fed into a yellow box and the output is purely function of the PID gains, The effect of this while flying can be described as if you use expo.

What happens if there is a Power cycle in the air?

If there is a power cycle in the air, the device will undergo calibration again. But it is unlikely for the plane or the TX to be stable enough for calibration complete in the air successfully. However, the RX signals still pass through to the servos, allowing you to control and land the airplane, but without any stabilization.

Programming your transmitter for adjusting the Master gain

Spektrum DX8

The following example describes how to retain AUX1 for Flaps and use the Flight Mode switch and Knob for gain control on channel 8 (AUX3).  Channel 8 from the RX must  be connected to AUX1 on the RX3S.

Note - this example is for use with standalone flight controllers.  To use this example with an RX3S V3 (integrated RX) flight controller which require the gain control to be on channel 6 (AUX1) replace all references to AUX3 with AUX1.

Using the FM three point switch and the Knob on DX8 for RX3S Rate/Off/Hold Control

The following describes how to configure the FM switch and the knob on a DX8 to be used for RX3S Gain Control. The instructions provided will place the RX3S in the off position when the FM switch is centered (FM1 region) or when the knob is set to -100%. FM2 range is operating within Rate mode and FM0 range is operating within Hold mode.

The Master gain for both Rate and Hold mode is variable and can be changed using the knob and the position of the knob sets the same value for master gain for both Rate and Hold mode. However at the moment the knob is operating -100% to 0%. The knob at position -100% sets the Master gain value to 0% whereas the knob at position 0% sets the Master gain value to 125%. The knob range from 0 to 100% sets the Master gain value to 125%.

1) Setup Servo Travel Screen

(Travel for Aux 3 has to be symmetrically extended to 125% on both servo travel ends)

2) Setup Switch Select Screen

(set F Mode : Aux3, the other switches depend on your model setup)

3) Setup Mixing Screen

(setup Mix 1)

(setup Mix 2)

(setup Mix 3)

Spektrum DX18

Using Left Paddle on DX18 for RX3S Rate/Off/Hold Control

The following describes how to configure the Left Paddle on a DX18 to be used for RX3S Gain Control.  The instructions provided will place the RX3S in the Off position when the paddle is centered.  Full paddle down is 100% Rate mode and Full paddle up is 100% Hold mode.  The gain for both Rate and Hold mode is variable from 0-100% with paddle center being 0%

 

  1. Place Transmitter in System Mode and select Channel Assign.

         Under 6. AUX1 make sure AUX 1 is selected7

  1. Then select NEXT to view Channel Input Config and make sure 6 AUX1: is set to LLv

  1. Save and exit System Mode.
  2. In Model Mode, select Servo Setup and verify that the Travels for AX1 are both set to 100.

Spektrum DX6i or OrangeRX T-Six transmitter (using pseudo' 3-Position Switch)

Using FLAP/GYRO switch as 'master' on/off switch; when ON it allows the ELEV D/R switch to select the stabilisation mode for RX3S Rate/Hold Control. You can't implement “in flight variable Master Gain Control” because there is no rotary knob.

The DX6i sadly lacks a 3-Position switch and a rotary knob, hence it is difficult to fully utilise RX3S Gain control and access all three modes - Heading Hold, Off and Rate mode currently available in Open Flight Stabilizer. However one can accomplish this using two switches and a bit of mixing creating a 'pseudo' 3-Position Switch. Note this guide also applies to the OrangeRX T-Six transmitter.

Setup settings as follows:

In the FLAPS menu, set:

FLAP ELEV

NORM< v7% (see note below) 0

LAND v 100 0

(NOTE: You may need to experiment with the NORM< v7% figure and adjust until there is no servo corrective movement when the switch is in the OFF position. This may be different on individual transmitters.)

In the MIX 1 menu, activate the mix and set:

FLAP> FLAP ACT

RATE D -100% U 0%

SW ELE D/R TRIM INH

In the MIX 2 menu, activate the mix and set:

FLAP> FLAP ACT

RATE D -100% U 0%

SW ELE D/R TRIM INH

The operation of the switches and modes activated are as follows:

FLAP/GYRO switch OFF = Stabilisation is off.

FLAP/GYRO switch ON, ELEV D/R switch OFF = Heading Hold mode.

FLAP/GYRO switch ON, ELEV D/R switch ON = Rate mode.

Summarizing in this setup we use the FLAP/GYRO switch as 'master' on/off switch; when ON it allows the ELEV D/R switch to select the stabilisation mode for RX3S Rate/Hold Control. When the FLAP/GYRO switch is OFF, the ELEV D/R switch has no effect on the stabiliser.

Note, The suggested method of adjusting Pot Gains is to set them at a low setting and gradually increase Master Gain until the latter reaches maximum. If the correction does not cause undulations increase Pot Gain and start again until the correction do cause undulations. Then slightly reduce Pot Gain on the offending axis to allow a safety margin. The aim is to use 100% Master Gain with Pot Gains on all axis adjusted to provide correction to your airframe with no undulations.

However using a DX6i you can't implement “in flight variable Master Gain Control” because there is no rotary knob on the DX6i. If the Pot Gain adjustment process becomes difficult one can quickly adjust Master Gain by adjusting the RATE % settings in the two MIX menus. To simulate a gradual increase of Master Gain one can set the RATE % settings low to begin with, and with trial and error gradually increase until the corrections cause undulations. Then reduce pot gain on the offending axis and start again.

OpenTX / Er9X

The following describes how to configure the ID switch and P3 knob on a Turnigy 9X/9XR/9XR Pro transmitter to be used for RX3S Gain Control using OpenTx. The mix for a FrSky Taranis is very similar, all you have to do is change the switch and knob source according to your transmitter). This example is a screenshot using companion9x and implements Master Gain Control on channel 10, however you may use any channel of your choice (normally on a PPM mode receiver like a FrSky D8R-XP Receiver this would be channels 1:8).

The instructions provided will place the RX3S in the off position when the ID switch is centered (ID1 region) or when the knob is set to 0% (1500 us). ID0 range is operating within Rate mode and ID2 range is operating within Hold mode.

The Master gain for both Rate and Hold mode is variable and can be changed using the knob and the position of the knob sets the same value for master gain for both Rate and Hold mode. OpenTX/Er9X channel/servo range limits is 100%,  the knob is operating within -100% to 100%.

 


 

FrSky Taranis

Using Taranis Special Functions and Logical Switches to generate InFlight Calibration sequences

RCGroups user LEXM has developed some InFlight Calibration sequences for the Taranis.

He has published these in a document that can be found here.

I like to use the left slider for gain control on channel 5 with center being 0 gain (effectively Off), below center increasing Rate mode gain and above center increasing Hold mode gain.  I have used the information provided by LEXM to construct a Taranis InFlight Calibration sequence using the spring loaded Taranis switch (SH) for activation.

The setup I use is below:

Mixes

Taranis OFS Inflight Cal Mixes.jpg

Special Functions

Taranis OFS Inflight Cal Special Functions.jpg

Logical Switches

Taranis OFS Inflight Cal Logical Switches.jpg

The above sequence will generate 4 mode changes within about a 600ms period when switch SH is activated.  

Warning - Make sure that the stabilized controls are all at their center position before activation.  If the controls are not centered when activated the firmware will used the current position as center, not what you want.


OPTIONAL: Building the firmware image from source code

Building firmware from sources is optional, you can also use prebuilt firmware in .\FlightStab\Builds\*.hex

Building the Firmware via cmake (recommended)

cd ./Builds

rd /s .

(this step wipes out all files within the current directory. The Builds directory should be empty for the following commands to work)

cmake [-DTODAY=yyyymmdd] -G"MSYS Makefiles" ..

(-DTODAY is optional to override the system date. Do not enter the [ ] for example use either

cmake -G"MSYS Makefiles" ..

cmake -DTODAY=20130101 -G"MSYS Makefiles" ..

make [VERBOSE=1]

again do not use [ ] use either

make

make VERBOSE=1

Building the firmware via arduino IDE

NOTE that this method cannot be used with the current source because the generated image won't fit on the CPU. This method is kept for reference.

C:\users\<user>\My Documents\Arduino\Libraries\_Stub

C:\users\<user>\My Documents\Arduino\Libraries\I2Cdev

C:\users\<user>\My Documents\Arduino\Libraries\ITG3200

...


TinyOS FTDI Programmer Modifications

Modifications to supply 5V for the RX3S and 3.3V for the FTDI chip and RX3S signal pin.

Modification to the programmer is not difficult. It only requires 1 trace on the programmer to be cut and one wire added. This change places 5V from the USB port to the pad that was previously used for CTS (CTS is not needed in this application).  Photos below show where to cut the trace and add the wire.

I also constructed an adapter to connect the programmer to an RX3S. Photos of the adapter as well as a schematic are also attached.

Bottom View

Top View

Schematic

The jumper on the TinyOS board should be connected in the 3.3V position.

The adapter board also has a jumper to enable 5V power for the RX3S when a jumper is installed between pins 1 & 2.  When a powered RX3S is being programmed, place this jumper on pins 2 & 3.