diff --git a/.wordlist.txt b/.wordlist.txt index 591de7c8f..20fe0724e 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -1,578 +1,588 @@ +aat AAT +accelerometer ACCST ACK +Acknowledgement Aeris AFHDS -AIO -AIOs Agha +AGL +AIO Aion +AIOs AirPort +alloted Analytics +ange +Arduino +Ardupilot ArduPilot +ASpd Atto Axisflying -BETAFPV -BLE -BLHeli -Bayck +barcode Bardwell +Baro +Batt Baudrate -BetaFPV +Bayck +betaflight Betaflight BetaflightPassthrough +BetaFPV +BETAFPV +Bidirectionality +bitrate Blackbox +BLE +BLHeli +bluetooth BluetoothLE Bolded +bootloader Bootloaders +Börner BoxPro +brainer Bri'ish -Börner +brushless +btn +bugfixes +callout +CalOPPA CCPA +ChaserP +chipset +chipsets +Choppage CLI CLK +commanderguy +comms COMs -CPPM -CRAZYBEEF -CRC -CRSF -CRSFShot -CRServoF -CalOPPA -ChaserP -Choppage +config Configs +configurator Configurator Configurator's +counsel +counterflow +counterintuitive +CPPM +CRAZYBEEF CrazyF +crc +CRC Crossband +CRServoF +CRSF +CRSFShot +Ctrl +ctzsnooze CubeProgrammer Cura +cybersquatting +DaBit +DAC +dBm DBR +de +deadbot +Deadbot +DeadBot +deadbyte +degC +Deja +Denks +desolder +desync +dev +Dev +devs DFU +Disnator +DisplayPort +distro's +DivisionRc DIY DJI +DK +DLink DMA DMX +dodecatillion +downlink +dropdown DSHOT +DTR DVDA DX -DaBit -Denks -Dev -Deadbot -deadbot -DeadBot -Disnator -DisplayPort -DivisionRc -DK -DLink +Dxx +edgetx +EdgeTX EEA +EGT EL +Elevon +elrs ELRS EMAX +Emuflight +env EP +EPW +ER6GV ESC ESCs ESPnow +Espressif +esptool ESPxxxx +ethernet ETX -EdgeTX -Espressif +exe +expresslrs ExpressLRS ExpressLRS's +facebook +failsafe +Failsafe FAILSAFE +failsafed +failsafes +failsafing +faq FC FCs +febbyeka FEC +feedforward +FelipeCris FENIX FET FHSS -FLRC -FPV -FSK -FTDI -FW -Failsafe Flite +FLRC +flybarless +Flybarless FlySky FlySky's -Flybarless Flywoo +fontawesome Foxeer -FrSky +fpv +FPV Freestylers FreqCorrection +FrSky +FSK +FTDI +fullres +FullRes +FW GCS GDPR GemX GEPRC GH +github GND GPIO -GSoD +GPLv +GPSLogger Graupner +groundspeed +GSoD +GV GX -HD -HDZero -HGLRC HackRF -HappyModel Happymodel +HappyModel +HD +HDZero Headtracking Heatsink +heggy +heggy_fpv Heli HelloRadio -HiYOUNGER +HGLRC HiYounger -HoTT +HiYOUNGER +hotspot Hotspot -IPEX +HoTT +html +http +https +HV +iFlight ImmersionRC ImpulseRC +IMU +iNav Init +injunctive +integrations +intermediary +io +IPEX Ironman +Iryl +ish JHEMCU +jitter JLCPCB +json +JSON JST Jullibach +jurg +jurgelenas Jye's JyeSmith +kB +kilobits +klutvott +Lanham LBT LDO +leaderboard LEDs -LNA -LNAs -LQ -LQI -LiPo +licensable +licensors +LinkFlow LinkStatistics LinkStats -LinkFlow Linux +LiPo +LLC +LNA +LNAs LoRa +LQ +LQI +LSM +LSM6Dxx +lua Lua +Lvl +LVT +mA +macOS +MacOS +mainboard +Malagoli +MatchTX +Matek +MatekSys MAVLink +maybenikhil MCU MCUs +md MDL +MERCHANTABILITY MFD +Mhz MHz -MOSFET -MSP -MX -MacOS -Malagoli -Matek -MatekSys Microbeast +microcontroller +Microvario +mingw +misconfigured MK Mobula ModelMatch +MOSFET +MPU +MPU6050 +mrscythe +MSL +MSP +multicopter Multicopter Multicopters MultiGP -NDA -NPN -NRST +multirotor +mustardtiger +MUSTARDTIGER +mW +MX Namimno NamimnoRC +nano Nano +nd +NDA +nerding Niklas NoSync -OFDM -OLED -OSD -OSDs -OTA +NPN +NRST +octocat +OEM +OFDM Olaussen +OLED +omnidirectional OneBit +ong +onwards +OpenCollective +openocd +OpenOCD OpenTX OpenTX's -PCBs -PID -PIO -PIO's -PLA -PRs -PWM +OpenVTX +OSC +OSC's +OSD +OSDs +OTA +overvoltage Padcom Pairan +params +passthrough Passthrough Pawe -Pinout +PCBs +pdf +pF +phillips +phobos +PID pinio +pinout +Pinout +pinouts +pio +PIO +PIO's +pitmode +PitMode +PLA +platformio PlatformIO PolicyMaker PolicyMaker’s +pos +pre +preflashed +preliminarily +PRs PuTTY -PitMode +PWM +Pwr QGC -QX +QGroundControl QuadKopters +QX +RadioMaster +radiomistress +RainSun +rapidFIRE +Rapidfire RDP +README +rebranded +Redpine +reflash +reflashing +remarketing +Remarketing +Repartitioner +replug +repo +Repo +repost +repurpose +repurposed +repurposes retransmission RFMD RGB +RockIP +Rotorflight +Rox RQly RSNR RSS +rssi RSSI RST RTN RTTTL +Runcam +runtime +rx +RXes RXI RXLOSS -RXes RXs -RadioMaster -RainSun -Rapidfire -Redpine -Remarketing -Repartitioner -Repo -Rox -Runcam +Saad +sats +Sauer SBUS +Schalonsus +Schottky SD SDG SDR +Seba +selectable +Semtech +setpoint +Severability SG -SIYI +SiK Sirius +SIYI +Skystars +SkyZone +Slickshot SMA +SmartAudio +SmartPort SMD SNR +sourceforge +spammy +Spektrum SPH SPI -Schalonsus SPRacing +spuriously +Squadding +src SRXL SSID +SteadyView +Stefanski +SteveCEvans +stl STL +stlink STLink STM +StonedDawg +SubGHz SUMD +SunjunKim +SuperD +SuperG +SuperP +SuperP SWCLK SWDIO SX -SYS sync sync'd -Saad -Schottky -Seba -Semtech -SkyZone -Skystars -Slickshot -SmartPort -SmartAudio -Spektrum -SteadyView -Stefanski -SteveCEvans -StonedDawg -SubGHz -SunjunKim -SuperD -SuperP -SuperG +SYS +sysID +sysIDs +Taranis +Taufik TCXO TeamRace TeamRacing +TEK +Telem +th +Thingiverse +timeframes +TitanDynamics TLite +Tlm +toc +toolchain +TORTIOUS TQLY +trojan TTGo +tx TX's +txbp TXes TXs -Taranis -Taufik -Telem -Thingiverse -TitanDynamics -Tlm +txt UART UARTs +UAV +UAVfutures UDP +UDRP UFL UI UID -USB's +unambiguously Unbricking +uncomment Uncommented +uninversion +uninverted +Unisens +unmodded +unpowered +unrooted +unselected +unstaged +unticked +uplink Uplink +url +USB's +USD +USPTO +V14 +V16 +Vantac +vario +Vario +Vario VBAT VCC VDD +Velocidrone +venv +Vergara VIN VM VMain +Voigt +vrx VRX VSCode VSCode's +VSpeak VTX -Vantac -Velocidrone -Vergara -Voigt -V16 -V14 +VTXes +Vu Walksnail -WebSocket Webflasher +webpage +WebSocket WebUI +wez Wifi +wirelessly Wirelessly +www +X-Band XO -XT +xpress XR +Xrossband +XT +XXXXXX +Yaapu Yagin Yarillo YeOldePirate -Zepto -ZoFPV -aat -accelerometer -alloted -ange -barcode -betaflight -bitrate -bluetooth -bootloader -brainer -brushless -btn -bugfixes -callout -chipset -chipsets -commanderguy -comms -config -configurator -counterflow -counterintuitive -crc -ctzsnooze -dBm -de -deadbyte -degC -desolder -desync -devs -dev -distro's -dodecatillion -downlink -dropdown -edgetx -elrs -ethernet -exe -expresslrs -facebook -failsafe -failsafed -failsafes -failsafing -faq -febbyeka -flybarless -fontawesome -fullres -FullRes -github -hotspot -html -http -https -iFlight -iNav -integrations -io -ish -json -jitter -jurgelenas -kB -kilobits -klutvott -leaderboard -lua -mA -mW -mainboard -maybenikhil -md -microcontroller -mingw -misconfigured -mrscythe -multicopter -multirotor -nano -nerding -octocat -omnidirectional -ong -openocd -OpenOCD -fpv -heggy -overvoltage -pF -params -passthrough -pdf -phillips -phobos -pinout -pinouts -pos -pre -preflashed -rapidFIRE -rebranded -reflash -reflashing -remarketing -replug -repo -repurpose -repurposes -rssi -runtime -rx -sats -selectable -sourceforge -spammy -stl -stlink -th -toc -toolchain -tx -txbp -txt -uncomment -uninversion -uninverted -unmodded -unpowered -unrooted -unstaged -unselected -uplink -url -vrx -webpage -wirelessly -www -xpress +YGE youtube ystem -Severability -Acknowledgement -TORTIOUS -MERCHANTABILITY -licensable -licensors -trojan -repost -MSL -Unisens -Vario -YGE -Vario -EPW -SuperP -OEM -GPSLogger -Microvario -TEK -LVT -VSpeak -AGL -Baro -groundspeed -Batt -onwards -JSON -MatchTX -feedforward -setpoint -unticked -sysID -sysIDs -Lvl -Pwr -pitmode -HV -DAC -Bidirectionality -VTXes -OpenVTX -Xrossband -Arduino -repurposed -env -venv -pio -platformio -src -Mhz -Ctrl -esptool -Deja -Vu -Iryl -FelipeCris -LLC -jurg -Sauer -radiomistress -preliminarily -nd -OSC -OSC's -OpenCollective -GPLv -QGroundControl -Yaapu -DTR -macOS -XXXXXX -SiK -wez -USD -timeframes -README -USPTO -Squadding -UAV -UAVfutures -Ardupilot -Emuflight -ASpd -EGT -MUSTARDTIGER -RockIP -UDRP -Lanham -cybersquatting -mustardtiger -intermediary -spuriously -unambiguously -injunctive -counsel -Rotorflight -X-Band -heggy_fpv +Zepto +ZoFPV diff --git a/docs/assets/images/gyro/BetaFPV-Super-P-MPU6050.jpg b/docs/assets/images/gyro/BetaFPV-Super-P-MPU6050.jpg new file mode 100644 index 000000000..f2a101518 Binary files /dev/null and b/docs/assets/images/gyro/BetaFPV-Super-P-MPU6050.jpg differ diff --git a/docs/assets/images/gyro/RadioMaster-ER6GV-MPU6050.png b/docs/assets/images/gyro/RadioMaster-ER6GV-MPU6050.png new file mode 100644 index 000000000..087a7b8cb Binary files /dev/null and b/docs/assets/images/gyro/RadioMaster-ER6GV-MPU6050.png differ diff --git a/docs/hardware/gyro-receiver-mod.md b/docs/hardware/gyro-receiver-mod.md new file mode 100644 index 000000000..2e432c303 --- /dev/null +++ b/docs/hardware/gyro-receiver-mod.md @@ -0,0 +1,134 @@ +--- +template: main.html +description: A guide on how to add an IMU / gyro to an ExpressLRS receiver. +--- + +![Hardware-Banner](https://raw.githubusercontent.com/ExpressLRS/ExpressLRS-Hardware/master/img/hardware.png) + +## Overview + +ExpressLRS receivers that are equipped with an _inertial measurement unit_ (IMU) / gyro can provide stabilization for aircraft without a flight controller. See [Gyro](../software/gyro.md) for details. + +This guide explains how to attach a DIY board to an existing receiver. + +## Supported hardware + +### IMU / gyro boards: + +- MPU6050: very common, supports 5V. +- LSM6Dxx: not that common. Only supports 3.3V and will need a voltage regulator. + +### Receivers + +Any supported receiver based on the ESP32 chip, with an accessible I2C or SPI bus. Example: BetaFPV Super-P, RadioMaster ER6, ER8, even ER6GV (via PWM pins). + +??? Info "Finding supported ESP32 receivers. (click/tap to expand)" + In the [official targets list](https://github.com/ExpressLRS/Targets/blob/master/targets.json), the field `"platform": "esp32"` indicates that the receiver is based on an ESP32 chip. + + If the receiver has PWM pins or multiple UART pads, those may be remapped as I2C or SPI pins. + +## Receiver configuration + +=== "WebUI" + + TK + +=== "Target file" + + TK + +## Wiring + + +=== "I2C" + + - The `SCL` pad on the IMU board must be connected to the `SCL` pin on the receiver. + - The `SDA` pad on the IMU board must be connected to the `SDA` pin on the receiver. + - The `VCC` pad on the IMU board must be connected to a `+` pin on the receiver. + - The `GND` pad on the IMU board must be connected to a `-` pin on the receiver. + +=== "SPI" + + TK + +### Wiring examples + +
+ ![TX Binding Tab](../assets/images/gyro/BetaFPV-Super-P-MPU6050.jpg) +
BetaFPV Super-P with MPU6050 over I2C
+
+ +
+ ![TX Binding Tab](../assets/images/gyro/RadioMaster-ER6GV-MPU6050.png) +
RadioMaster ER6GV with MPU6050 over I2C via PWM pins
+
+ +## Testing + +=== "WebUI" + + Start the WebUI on the receiver and go to the `Gyro` tab. + + Image TK + +=== "Lua script" + + TK + +=== "Serial console" + + The IMU detection and gyro initialization is logged to the serial monitor. + + 1. Connect the receiver equipped with the IMU board to a computer, using an FTDI adapter (USB/Serial converter). + 2. Open a serial monitor at 115200 baud. + Example: `sudo minicom --device /dev/ttyUSB0 --baudrate 115200` + 3. Restart the receiver to capture the gyro initialization. + Example output: + ``` + [...] + Starting wire on SCL 18, SDA 23 + SPI: gpio_sck :-1, gpio_miso: -1, gpio_mosi: -1, gpio_nss: -1, gpio_int -1 + Initializing PWM output: ch: 0, pin: 14 + Initializing PWM output: ch: 0, pin: 1 + Initializing PWM output: ch: 0, pin: 3 + Initializing PWM output: ch: 3, pin: 15 + > Starting I2C Gyro on SCL 2, SDA 4 + > Detecting MPU6050 (Address 0x68) + > Gyro Id returned = 0x38 + > Gyro Init + > Gyro Config Load + > Gyro Config: version 9 + Detected baro: SPL06 + UID=(11, 22, 33, 44, 55, 66) ModelId=255 + Primary Domain ISM2G4, 80 channels, sync=40 + Hal Init + SX1280 Reset + SX1280 Ready! + SX1280 Begin + RFAMP_hal Init + Use TX pin: 26 + Read Vers sx1280 #1: 43447 + Enabling DCDC regulator + SetPower: 21 + Config LoRa hwTimer Init + > RxPratameters.registerParameters(): Setting up GYRO LUA + > RxPratameters.registerParameters(): GYRO LUA Done + > Gyro Start + > Gyro AHRS Start + [...] + ``` + + TK + +## Troubleshooting + +??? faq "If the gyro is enabled, why is status not OK?" + - Check the gyro [**orientation settings**](../software/gyro.md#orientation-settings), and [**level calibration**](../software/gyro.md#level-calibration). + - Check the [**endpoint calibration**](../software/gyro.md#endpoint-calibration). + - If using a DIY board, check that it is connected to the correct I2C or SPI port. (Example: DIY receivers with an integrated vario may use a distinct I2C bus for the vario and the gyro.) + +??? faq "Why do Aileron and Elevator functions seem coupled?" + In **Auto-Level** mode, assuming that sticks are centered, if the elevator moves when the aircraft banks, or the ailerons move when the aircraft pitches up or down, the physical **orientation** of the IMU might not be aligned on the aircraft axes of rotation. See known limitations in [Orientation settings](../software/gyro.md#orientation-settings). + +??? faq "Two PWM channels are not working!" + When the debugging options are used, the pins used by the debug UART are disconnected. Build the firmware again without the `-DDEBUG_LOG` or `-DDEBUG_RCVR_LINKSTATS` options. diff --git a/docs/quick-start/webui.md b/docs/quick-start/webui.md index b32b9344a..cb6b82f4f 100644 --- a/docs/quick-start/webui.md +++ b/docs/quick-start/webui.md @@ -312,6 +312,10 @@ ExpressLRS 4.0 improves upon this with a new layout allowing for more sections o ![Import/Export Tab](../assets/images/webui/import-export.png) + ### Gyro Tab + + This tab allows users to configure receivers with an _inertial measurement unit_ (IMU) / gyro to stabilize aircraft without a flight controller. See [Gyro](../software/gyro.md) for more information. + ### WiFi Tab This tab lets you change the device' WiFi network connectivity and how it will behave when it is in WiFi mode. diff --git a/docs/software/gyro.md b/docs/software/gyro.md new file mode 100644 index 000000000..3c7d46ed2 --- /dev/null +++ b/docs/software/gyro.md @@ -0,0 +1,566 @@ +--- +template: main.html +description: Use an ExpressLRS receiver as a stabilizer for aircraft without a flight controller. +--- + +![Software Banner](https://raw.githubusercontent.com/ExpressLRS/ExpressLRS-Hardware/master/img/software.png) + +## Overview + +ExpressLRS receivers that are equipped with an _inertial measurement unit_ (IMU) / gyro can provide stabilization for aircraft without a flight controller. A DIY gyro can also be added to some receivers, see [Gyro Receiver Mod](../hardware/gyro-receiver-mod.md) for details. + +!!! Note + Use the ExpressLRS Product Finder to list supported receivers with a gyro! https://www.expresslrs.org/product-finder/?search=gyro&classification=receiver + +When a receiver acts as a gyro, it doesn't only output the channel values that it receives from the transmitter. Instead, the receiver _computes_ adequate output values based on: + +- the channel values sent by the transmitter (i.e. the position of the sticks) +- the aircraft attitude, as measured by the IMU +- the **gyro mode** currently active +- a **gyro gain** calculated for each axis and each _gyro mode_ + +How those parameters are balanced can be controlled by: + +- the [**stick priority**](#stick-priority) setting +- the adjustable [**gyro gain**](#gyro-functions) value +- the [**rate gain multiplier**](#gain-multiplier) setting +- the **gain** settings that are configurable for each axis in each _gyro mode_ (see [Gyro mode tuning](#gyro-mode-tuning)) + +This guide explains how to configure the receiver, and what to expect from each of the available _gyro modes_. + +## Main setup + +### Enable gyro + +When the gyro is disabled, the receiver works normally without Gyro functionality. + +=== "WebUI" + + Start the WebUI on the receiver and go to the `Gyro` tab. In the `Main Setup` panel, check `Enable Gyro`. Once enabled, the `Status` panel should indicate that the **gyro state** is OK. + + If the gyro state is not OK, see [Gyro state](#gyro-state) first, or [Troubleshooting](../../hardware/gyro-receiver-mod/#testing) if needed. + + Image TK + +=== "Lua script" + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + + Enable Gyro On + ``` + +### Gyro mode switch map + +Define which gyro [**modes**](#gyro-mode-tuning) are activated by the **gyro mode** channel. + +The number of positions of the gyro mode switch is defined by the **switch type** settings. (Choose between a 2, 3, 4, 5, and 6-position gyro mode switch.) + +=== "WebUI" + + Start the WebUI on the receiver and go to the `Gyro` tab. In the `Main Setup` panel, select the desired type, and modes for each of the channel positions. + + Image TK + +=== "Lua script" + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + > Main Setup + > Gyro Mode Switch + + Switch Pos. 3 + -- Functions -- + Position 1 Off + Position 2 Rate + Position 3 Auto-Level + ``` + +## Status + +=== "WebUI" + + Start the WebUI on the receiver and go to the `Gyro` tab. The information is displayed in the `Status` panel. + + Image TK + +=== "Lua script" + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + + Enable Gyro On + v1.19 / 9 !Orient. + IMU MPU6050 re=0;ie=0 + ``` + +### IMU type + +Displays the name of the sensor, along with some debugging information. + +### Gyro state + +Indicates when the sensor was detected and initialized correctly. Also indicates when the [**orientation settings**](#orientation-settings), and the [**level calibration**](#level-calibration) are missing. + +### Link + +_Applies to the WebUI only._ + +Indicates whether the receiver is connected to the transmitter. + +!!! Note + The [**endpoint calibration**](#endpoint-calibration) wizard requires a connection to the transmitter. + +!!! Info + ExpressLRS versions that provide Gyro support allow the receiver to start the WiFi while connected to the transmitter. + + While the receiver is connected to the transmitter, open the ExpressLRS Lua script, in `Other devices` select your receiver. Then `Enable Web Config` to start the Wifi, and access the WebUI as you usually do. + +### Orientation settings + +In order to interpret the measurements from the IMU, the gyro needs to know its orientation in the aircraft. + +For best results, the **orientation settings** should be updated every time the receiver position in the aircraft has changed. + +??? Warning "Only some gyro orientations are supported. (click/tap to expand)" + Currently, the gyro **must be oriented along the axes of rotation of the aircraft**. + + Example: if the gyro is aligned with the receiver, the receiver can be installed upside-down or sideways, but _oblique_ positions are unsupported. + +=== "WebUI" + + Start the WebUI on the receiver and go to the `Gyro` tab. In the `Status` panel, press `Orientation Wizard`. + + Image TK + +=== "Lua script" + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + > Calibration + > Orientation + + [Detect Orientation] + Level Lbl Up(Z+) + Nose down WRONG + ``` + +### Level calibration + +In order to interpret the measurements from the IMU accurately, the gyro needs to be calibrated in a level position. + +=== "WebUI" + + Start the WebUI on the receiver and go to the `Gyro` tab. In the `Status` panel, press `Level Cal`. + + Image TK + +=== "Lua script" + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + > Calibration + + [Level Calibration] + ``` + +### Live attitude view + +Allows to confirm that the gyro [**orientation**](#orientation) settings, and that the [**level calibration**](#level-calibration) are correct by rendering the measurements performed by the IMU. + +=== "WebUI" + + Start the WebUI on the receiver and go to the `Gyro` tab. + + Image TK + +=== "EdgeTX telemetry" + + !!! Note + Requires a [connection to the transmitter](#link), but does not require the receiver to be in WiFi mode. + + The receiver emits three telemetry sensors that reflect the IMU measurements: `Ptch`, `Roll`, and `Yaw`. + + First discover sensors if needed. On the transmitter, in the Model settings, navigate to `Telemetry` > `Sensors` > `Discover new`. + + Then in Model settings, navigate go to `Display`, add the sensors to a `Screen`, then exit the model setings. + + Use the TELE button to display the screen. The motion of the aircraft along each axis should be reflected on the telemetry screen. + + !!! Info + If you find that the values are not updated often enough, you can increase the [Telemetry ratio](../../quick-start/transmitters/lua-howto/#packet-rate-and-telemetry-ratio). Setting higher telemetry ratios (like `1:8`, `1:4`, `1:2`) increases the frequency of updates. + + Image TK + +=== "EdgeTX widget" + + !!! Note + Requires a [connection to the transmitter](#link) and a custom Lua script, but does not require the receiver to be in WiFi mode. + + The receiver emits three telemetry sensors that reflect the IMU measurements: `Ptch`, `Roll`, and `Yaw`. + + Some community EdgeTX widgets allow to visualize the attitude of the aircraft based on those telemetry sensors. + + Example: https://github.com/qsiguy/EdgeTX-Widgets/tree/main/AttIndV2 + + !!! Info + If you find that the values are not updated often enough, you can increase the [Telemetry ratio](../../quick-start/transmitters/lua-howto/#packet-rate-and-telemetry-ratio). Setting higher telemetry ratios (like `1:8`, `1:4`, `1:2`) increases the frequency of updates. + +## Channel functions and limits + +### Channel functions + +#### Quick setup + +The _quick setup_ allows to quickly pre-populate a list of channels for a few typical aircraft configurations. That initial setup can then be adjusted manually if necessary. + +=== "WebUI" + + Start the WebUI on the receiver and go to the `Gyro` tab. In the `Channel Functions & Limits` panel, press the `Quick setup` button to start the wizard. + + Image TK + +=== "Lua script" + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + > Main Setup + > Quick setup + + Wing type -> 2-Ail + Tail type -> V-Tail + [Apply] + ``` + +#### Manual setup + +=== "WebUI" + + Start the WebUI on the receiver and go to the `Gyro` tab. The `Channel Functions & Limits` panel allow to define and configure channel functions. + + Image TK + +=== "Lua script" + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + > Main Setup + > Channel Functions + + Channel -> 1 + Function Aileron + ``` + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + > Main Setup + > Channel Functions + + Channel -> 4 + Function VTail_Inv + ``` + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + > Main Setup + > Channel Functions + + Channel -> 9 + Function Gain + ``` + +#### Settings + +- **Channel**: both the incoming channel (from the transmitter) and the output channel (on the PWM receiver pins). _The transmitter setup and receiver setup must match. Mixing channels on the receiver is not possible._ +- **Function**: the [**gyro function**](#gyro-functions) assigned to that channel output. +- **Primary**: when multiple channels are assigned the same _function_, the value of the **primary** channel will be taken into account by the gyro to calculate the output. +- **Invert**: whether the output of the channel should be inverted. +- **Min/Mid/Max**: center value and limits of the PWM output (in milliseconds). + +#### Gyro functions + +- **Aileron**, **Elevator**, **Rudder** outputs +- **Elevon** output (`Elevon`, `Elevon R`): Elevator + Aileron mix (left and right) +- **V-Tail** output (`V-Tail`, `V-Tail R`): Elevator + Rudder mix (left and right) +- **Gyro Mode**: incoming channel that commands the [**gyro mode** switch](#gyro-mode-switch-map). +- **Gyro Gain**: incoming channel that defines the **gyro gain** value. + +??? Tip "Elevon/V-Tail configuration advice (click/tap to expand)" + First assign the `V-Tail`/`Elevon` function and make sure that the gyro operates the _elevator_ in the correct direction for both surfaces. Use the **invert** setting if necessary. + + Then assign the `V-Tail R`/`Elevon R` function to correct the _rudder/aileron_ direction on the channel that needs it. + + +### Channel calibration + +Records the center value and maximum range of the incoming channels, so that the gyro outputs don't risk damaging mechanical links. + +=== "WebUI" + + Start the WebUI on the receiver and go to the `Gyro` tab. In the `Channel Functions & Limits` panel press the `CHANNEL CAL` button. + + First center the sticks and `CAPTURE CENTERS`. Then move the sticks across the totality of their range and `FINISH CALIBRATION`. + + Images TK + +=== "Lua script" + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + > Main Setup + + [Channel Calibration] + ``` + +## Gyro mode tuning + +=== "WebUI" + + Start the WebUI on the receiver and go to the `Gyro` tab. The `Gyro Mode Tuning` panel displays the tuning parameters for each gyro mode. + + Image TK + +=== "Lua script" + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + > Gyro Modes + > Tuning + + Mode -> Rate + Stck priority 100% + Gain mult. 1x + -- Gains -- + Roll gain 30 + Pitch gain 40 + Yaw gain 50 + ``` + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + > Gyro Modes + > Tuning + + Mode -> Auto-Level + Use Rate On + -- Angles -- + Pitch limit 40 deg + Roll limit 70 deg + -- Trims -- + Pitch trim 0 deg (+Up) + Roll trim 0 deg (+Lft) + -- Gains -- + Roll gain 30 + Pitch gain 40 + Yaw gain 50 + ``` + +### Rate Mode + +_Also known as: wind rejection mode, stabilized mode_ + +The gyro corrects movements of the aircraft that are not the result of stick inputs. + +### Gain multiplier + +The **rate gain multiplier** adjusts the sensitivity of the gyro in **rate mode**, in order to allow the **gyro gain** to provide a meaningful adjusting range (see [Channel functions](#channel-functions)). A value of `1x` is usually a good starting point. + +If your gyro is too sensitive even when the **gyro gain** is low, it could be useful to lower the sensitivity (`0.5x`). On the contrary, if you reach 100% of the **gyro gain**, it may be useful to increase the sensitivity (`1.5x`, `2x`). + +!!! Note + Always start testing with a low **gyro gain**. + + - EDF and fast aircraft can benefit from a low **rate gain multiplier**: `0.5x` + - Slow aircraft, on the contrary, might require a higher multiplier: `1.5x` or `2x` + - For testing on the bench, you might need to increase the **rate gain multiplier** in order to see the surfaces move! (`2x`) + +#### Stick Priority + +A variable gain that depends on the stick deflection. The gyro gain decreases as the stick deflection increases. The **stick priority** value defines at which point of the stick travel the gyro gain reaches zero. + +By default, **stick priority** value is `100%`. At stick center, gyro gain is fully applied, and starts declining as the stick deflection increases. When the stick reaches 50% of its travel, the gyro gain has been reduced by half, and at full stick deflection (`100%` of travel) the gyro gain is zero. + +When stick priority is set to `75%`, the gyro gain is still applied fully when the stick is centered. It is reduced by half when the stick reaches `37.5%` of its travel, and reaches zero when the stick reaches `75%` of its travel. + +#### Gains + +Define how much of the maximum output travel the gyro should use. With higher gains, the gyro deflects the surfaces more, up to `100%` of their maximum travel. A value of `35%` is a good starting point. + +### Envelope Mode + +_Also known as: max angle envelope protection, horizon mode_ + +The gyro behaves like in **Rate mode**, but will keep the aircraft within the configured pitching and banking limits. + +#### Use Rate + +Combines Envelope with **Rate mode** behavior for wind rejection. When disabled, the gyro only activates when the **angle limits** are reached. + +#### Limit Pitch/Roll + +The maximum pitching and banking angles, in degrees. + +#### Gains + +Define how much of the maximum output travel the gyro should use. With higher gains, the gyro will bring the aircraft back within the pitching and banking limits more aggressively. A value of `35%` is a good starting point. + +### Auto-level Mode + +_Also know as: level mode, angle mode, angle demand_ + +The gyro keeps the aircraft flying level when the sticks are centered. It also prevents pitching or banking past the **angle limits**. + +Move the stick 50% of the maximum travel, the aircraft will bank/pitch 50% of the **angle limit**. + +Example: if **limit roll** is set to `70deg`, and the aileron stick is half way out, the aircraft will fly at a `35deg` banking angle. + +#### Use Rate + +Combines Auto-Level with **Rate mode** behavior for wind rejection. + +#### Trims + +Ensure that the aircraft is flying level when the sticks are centered. + +On the _pitch_ axis, positive(+) brings the nose up, negative (-) brings nose down. On the _roll_ axis, positive(+) causes banking to the left. + +#### Limit Pitch/Roll + +The maximum pitching and banking angles, in degrees. + +#### Gains + +Define how much of the maximum output travel the gyro should use. With higher gains, the gyro will bring the aircraft to level more aggressively when the sticks are released. A value of `35%` is a good starting point. + +### Launch + +The gyro keeps the aircraft climbing at a set pitching angle, and a level banking angle when the sticks are centered. + +#### Use Rate + +Combines Launch with **Rate mode** behavior for wind rejection. + +#### Trims + +Ensure that the aircraft is climbing at a set pitching angle, and a level banking angle when the sticks are centered. + +On the _pitch_ axis, positive(+) brings the nose up, negative (-) brings nose down. On the _roll_ axis, positive(+) causes banking to the left. + +#### Gains + +Define how much of the maximum output travel the gyro should use. With higher gains, the gyro will bring the aircraft to a stable climb more aggressively when the sticks are released. A value of `35%` is a good starting point. + +### Hover + +The gyro keeps the aircraft flying in a vertical hover position when the sticks are centered. + +#### Use Rate + +Combines Hover with **Rate mode** behavior for wind rejection. + +#### Gains + +Define how much of the maximum output travel the gyro should use. With higher gains, the gyro will bring the aircraft to hover more aggressively when the sticks are released. A value of `35%` is a good starting point. + +## Advanced (PIDs) + +TK + +=== "WebUI" + + Start the WebUI on the receiver and go to the `Gyro` tab. The `Advanced (PIDs)` panel displays the tuning parameters for each gyro mode. + + Image TK + +=== "Lua script" + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + > Gyro Modes + > Advanced (PIDs) + + Mode group -> Rate + Axis -> Roll + P gain 35 (x0.01) + I gain 0 (x0.01) + D gain 10 (x0.01) + ``` + + ``` + ExpressLRS + > Other devices + [RM ER6-GV+IMU] + > Gyro + > Gyro Modes + > Advanced (PIDs) + + Mode group -> AHRS + P gain 20 (x0.1) + I gain 0 (x0.1) + LPF freq. 1Hz + ``` + +### Rate + +TK + +#### P gain +#### I gain +#### D gain + +### Level + +_Applies to the following **gyro modes**: Envelope, Auto-Level, Launch, Hover._ + +TK + +#### P gain +#### I gain +#### D gain + +### AHRS + +The Artificial Horizon Reference System (AHRS)... TK + +#### P gain +#### I gain +#### Low-pass filter (LPF) diff --git a/mkdocs.yml b/mkdocs.yml index 2d63622d8..d15bdbc01 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -303,6 +303,7 @@ nav: - AirPort: software/airport.md - Dynamic Transmit Power: software/dynamic-transmit-power.md - Gemini: software/gemini.md + - Gyro: software/gyro.md - Loan Model: software/loan-model.md - MAVLink: software/mavlink.md - MFD Crossbow Tracker Integration: software/mfd-crossbow.md @@ -317,14 +318,15 @@ nav: - RX Testing: software/testing/rx-scoreboard.md - Unit Testing: software/testing/unit-testing.md - Hardware: + - Crystal Oscillator (XO) Frequency Error: hardware/crystal-frequency-error.md + - Gyro Receiver Mod: hardware/gyro-receiver-mod.md - Hardware Selection: hardware/hardware-selection.md - - R9M Inverter Mod: hardware/inverter-mod.md + - PWM Receivers: hardware/pwm-receivers.md - R9M Fan Mod: hardware/fan-mod.md - - Troubleshooting the X9D(+): hardware/x9d-troubleshooting.md - - Crystal Oscillator (XO) Frequency Error: hardware/crystal-frequency-error.md + - R9M Inverter Mod: hardware/inverter-mod.md - SMD Antenna: hardware/smd-antenna.md - - PWM Receivers: hardware/pwm-receivers.md - SPI Receivers: hardware/spi-receivers.md + - Troubleshooting the X9D(+): hardware/x9d-troubleshooting.md - ESP Backpacks: - Backpack Info: hardware/backpack/esp-backpack.md - Tx Backpack Setup: hardware/backpack/backpack-tx-setup.md diff --git a/wordlist.dic b/wordlist.dic index 249d773e1..f26bdac6a 100644 Binary files a/wordlist.dic and b/wordlist.dic differ