Skip to content

Radiomaster-RC/SPI-GYRO

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banner

ExpressLRS RX with Gyro Support

This branch adds support for an external i2c gyroscope for various stabilization modes.

This is an experimental branch not ready for prime time.

Experiment at your own risk.

Todo List

  • Global servo output limits
  • LUA PID adjustment settings
  • LUA Input channel assignments
  • LUA Output channel assignments
  • Automatic subtrim detection
  • Scale corrections according to channel limits
  • Add generic mixer (gyro -> channel)
    • Preset for V-Tail mixing
    • Preset for Elevon mixing
    • Conditional mixing, i.e. nose wheel correction when gear down
  • Add gyro orientation configuration
  • Standardize and document gains across modes
  • Gyro mode: Rate
  • Gyro mode: Lock / Hold
  • Gyro mode: Safe
  • Gyro mode: Level
  • Gyro mode: Launch (Level + pitch up)
  • Gyro mode: Hover
  • Gyro mode: Knife Edge (Quart lock)

Setup

The gyro settings are available through the ExpressLRS Lua script.

Finding the settings menus

  1. First launch the ExpressLRS Lua script.
  2. Go to "Other Devices".
  3. Select your receiver.
  4. If your receiver is correctly flashed you will see gyro menu items.

Gyro Inputs

In the "Gyro Inputs" menu you can setup mappings between input channels to gyro functions.

The gyro input functions are:

  • Roll input
  • Pitch input
  • Yaw input
  • Mode - Selection of stabilization mode
  • Gain - Gyro Gain 0% - 100%

Gyro Outputs

In the "Gyro Outputs" menu you can setup mappings between gyro functions and PWM output channels.

The gyro output functions are:

  • Aileron output
  • Elevator output
  • Rudder output
  • Elevon output
  • V-Tail output

For each channel you can setup gyro output inversion. A typical setup is having two aileron servos where one of the output channels needs to be reversed.

Gyro Modes

A input channel configured for "Mode" in the "Gyro Inputs" menu can be used to select the active stabilization mode.

Rate Mode

This is the most basic gyro mode. Changes to the angular velocity in any direction will result in a correction.

Heading Hold / Heading Lock Mode

Not yet implemented.

SAFE Mode

In this mode the gyro will work to limit pitch and roll angles within the configured limits.

Level Mode

In this mode the gyro will work to keep the pitch and roll angles at zero when channel inputs are zero.

If the roll stick command is 50%, the gyro will attempt to keep the roll angle at 50% of the max roll angle.

Hover Mode

In this mode the gyro will add corrections to elevator and rudder channels in order to keep aircraft pointing directly upwards.

DIY Hardware

The test hardware currently used is a BetaFPV SuperP receiver with a GY-521 MPU-6050 I2C module.

receiver-with-gyroscope

Releases

No releases published

Packages

No packages published

Languages

  • C++ 43.8%
  • C 39.8%
  • Python 4.8%
  • JavaScript 4.4%
  • CSS 2.8%
  • HTML 2.0%
  • Other 2.4%