fix for CRSF not being present. (#11951)
[betaflight.git] / docs / Rx.md
blob75fbda24179cc8be823ef3e67e55d609f28ff604
1 # Receivers (RX)
3 A receiver is used to receive radio control signals from your transmitter and convert them into signals that the flight controller can understand.
5 There are 3 basic types of receivers:
7 1. Parallel PWM Receivers
8 2. PPM Receivers
9 3. Serial Receivers
11 As of 2016 the recommendation for new purchases is a Serial or PPM based receiver.  Avoid Parallel PWM recievers (1 wire per channel).  This is due to the amount of IO pins parallel PWM based receivers use.  Some new FC's do not support parallel PWM. 
13 ## Parallel PWM Receivers
15 8 channel support, 1 channel per input pin.  On some platforms using parallel input will disable the use of serial ports
16 and SoftSerial making it hard to use telemetry or GPS features.
18 ## PPM Receivers
20 PPM is sometimes known as PPM SUM or CPPM.
22 12 channels via a single input pin, not as accurate or jitter free as methods that use serial communications, but readily available.
24 These receivers are reported working:
26 * [FrSky D4R-II](http://www.frsky-rc.com/product/pro.php?pro_id=24)
27 * [Graupner GR24](http://www.graupner.de/en/products/33512/product.aspx)
28 * [R615X Spektrum/JR DSM2/DSMX Compatible 6Ch 2.4GHz Receiver w/CPPM](http://www.hobbyking.com/hobbyking/store/__46632__OrangeRx_R615X_DSM2_DSMX_Compatible_6Ch_2_4GHz_Receiver_w_CPPM.html)
29 * [FrSky D8R-XP 8ch telemetry receiver, or CPPM and RSSI enabled receiver](http://www.frsky-rc.com/product/pro.php?pro_id=21)
30 * [FrSky X4R and FrSky X4RSB](http://www.frsky-rc.com/download/view.php?sort=&down=158&file=X4R-X4RSB) when flashed with CPPM firmware and bound with jumper between signal pins 2 and 3
31 * All FrSky S.Bus enabled devices when connected with [S.Bus CPPM converter cable](http://www.frsky-rc.com/product/pro.php?pro_id=112). Without jumper this converter cable uses 21ms frame size (Channels 1-8). When jumper is in place, it uses 28ms frame and channels 1-12 are available
32 * FlySky/Turnigy FS-iA4B, FS-iA6B, FS-iA10 receivers all provide 8channels if the tx is sending them. (FS-i6 and FS-i10 transmitters). Use setting rx-setup/ppm to enable.
36 ## Serial Receivers
38 ### Spektrum
40 8 channels via serial currently supported.
42 These receivers are reported working:
44 Lemon Rx DSMX Compatible PPM 8-Channel Receiver + Lemon DSMX Compatible Satellite with Failsafe
45 http://www.lemon-rx.com/index.php?route=product/product&product_id=118
48 ### S.BUS
50 16 channels via serial currently supported.  See below how to set up your transmitter.
52 * You probably need an inverter between the receiver output and the flight controller. However, some flight controllers have this built in (the main port on CC3D, for example), and doesn't need one.
53 * Some OpenLRS receivers produce a non-inverted SBUS signal. It is possible to switch SBUS inversion off using CLI command `set sbus_inversion = OFF` when using an F3 based flight controller.
54 * Softserial ports cannot be used with SBUS because it runs at too high of a bitrate (1Mbps).  Refer to the chapter specific to your board to determine which port(s) may be used.
55 * You will need to configure the channel mapping in the GUI (Receiver tab) or CLI (`map` command). Note that channels above 8 are mapped "straight", with no remapping.
57 These receivers are reported working:
59 FrSky X4RSB 3/16ch Telemetry Receiver
60 http://www.frsky-rc.com/product/pro.php?pro_id=135
62 FrSky X8R 8/16ch Telemetry Receiver
63 http://www.frsky-rc.com/product/pro.php?pro_id=105
65 Futaba R2008SB 2.4GHz S-FHSS
66 http://www.futaba-rc.com/systems/futk8100-8j/
69 #### OpenTX S.BUS configuration
71 If using OpenTX set the transmitter module to D16 mode and ALSO select CH1-16 on the transmitter before binding to allow reception
72 of all 16 channels. 
74 OpenTX 2.09, which is shipped on some Taranis X9D Plus transmitters, has a bug - [issue:1701](https://github.com/opentx/opentx/issues/1701).
75 The bug prevents use of all 16 channels.  Upgrade to the latest OpenTX version to allow correct reception of all 16 channels,
76 without the fix you are limited to 8 channels regardless of the CH1-16/D16 settings.
78 ### SRXL (formerly XBUS) 
80 (Serial Receiver Link Protocol)
81 SRXL is an open data transfer protocol which allows to transport control data from a rc receiver to another device like a flybarless system 
82 by only using one single line. This protocol has been established by SRXL.org based on the idea to create a freely available and unified protocol 
83 that manufacturers can easily implement to their receivers and devices that process receiver data. The protocol does not describe an exact definition of 
84 how the data must be processed. It only describes a framework in which receiver data can be packed. Each manufacturer can have his own ID, which must be 
85 attached to the beginning of each data set, so that the device using this data can correctly identify and process the payload of the dataset.
87 Supported receivers:
89 #### Multiplex:
90 All receivers with SRXL (also FLEXX receivers)
92 ####Gaupner / SJ HOTT:
93 All receiver with SUMD support
95 #### Spektrum:
96 AR7700 / AR9020 receiver 
98 #### JR:
99 JR X-BUS
100 Make sure to set your TX to use "MODE B" for XBUS in the TX menus!
101 See here for info on JR's XBUS protocol: http://www.jrpropo.com/english/propo/XBus/
102 These receivers are reported working:
104 XG14 14ch DMSS System w/RG731BX XBus Receiver
105 http://www.jramericas.com/233794/JRP00631/
107 #### Jeti:
108 Receivers with UDI output
110 ### XBUS MODE B RJ01
112 There exist a remote receiver made for small BNF-models like the Align T-Rex 150 helicopter. The code also supports using the Align DMSS RJ01 receiver directly with the cleanflight software.
113 To use this receiver you must power it with 3V from the hardware, and then connect the serial line as other serial RX receivers.
114 In order for this receiver to work, you need to specify the XBUS_MODE_B_RJ01 for serialrx_provider. Note that you need to set your radio mode for XBUS "MODE B" also for this receiver to work.
115 Receiver name: Align DMSS RJ01 (HER15001)
117 ### SUMD
119 16 channels via serial currently supported.
121 These receivers are reported working:
123 GR-24 receiver HoTT
124 http://www.graupner.de/en/products/33512/product.aspx
126 Graupner receiver GR-12SH+ HoTT
127 http://www.graupner.de/en/products/870ade17-ace8-427f-943b-657040579906/33565/product.aspx
129 ### SUMH
131 8 channels via serial currently supported.
133 SUMH is a legacy Graupner protocol.  Graupner have issued a firmware updates for many recivers that lets them use SUMD instead.
135 ### IBUS
137 10 channels via serial currently supported.
139 IBUS is the FlySky digital serial protocol and is available with the FS-IA4B, FS-IA6B and
140 FS-IA10 receivers. The Turnigy TGY-IA6B and TGY-IA10 are the same
141 devices with a different label, therefore they also work.
143 If you are using a 6ch tx such as the FS-I6 or TGY-I6 then you must flash a 10ch
144 firmware on the tx to make use of these extra channels.
146 These receivers are reported working (all gives 10 channels serial):
148 - FlySky/Turnigy FS-iA4B 4-Channel Receiver (http://www.flysky-cn.com/products_detail/productId=46.html)
149 - FlySky/Turnigy FS-iA6B 6-Channel Receiver (http://www.flysky-cn.com/products_detail/&productId=51.html)
150 - FlySky/Turnigy FS-iA10 10-Channel Receiver (http://www.flysky-cn.com/products_detail/productId=53.html)
151 - FlySky/Turnigy FS-iA10B 10-Channel Receiver (http://www.flysky-cn.com/products_detail/productId=52.html)
153 #### Combine flysky ibus telemetry and serial rx on the same FC serial port
154   
155   Connect Flysky FS-iA6B receiver like this:
156 ```   
157     +---------+
158     | FS-iA6B |
159     |         |
160     | Ser RX  |---|<---\       +------------+
161     |         |        |       | FC         |
162     | Sensor  |--#==#--*-------| SerialTX   |
163     +---------+                +------------+
166 Use a diode with cathode to receiver serial rx output (for example 1N4148),
167 the anode is connected to the FC serial _TX_ pin, and also via a 
168 resistor (10KOhm) to the receiver ibus sensor port.
170 Note (2018-07-27): In some cases, the value of the series resistor may be too large, and going down to 1K[ohm] may provide a good result.
172 Enable with cli:
173 ```  
174     serial 1 1088 115200 57600 115200 115200
175     feature RX_SERIAL
176     set serialrx_provider = IBUS
177     save
181 ### Jeti EX Bus
183 It supports 16 channels with a transfer rate of 100Hz. The HS option (High Speed) is currently not supported.
184 The receiver must be configured in the device manager to EX Bus and connected to a free FC serial _TX_ pin.
185 For more information on the wiring and setup see [this document](resources/How.to.setup.your.RX.and.FC.for.Jeti.Ex-Bus.pdf).
188 ## MultiWii serial protocol (MSP)
190 Allows you to use MSP commands as the RC input.  Only 8 channel support to maintain compatibility with MSP.
192 ## Configuration
194 There are 3 features that control receiver mode:
197 RX_PPM
198 RX_SERIAL
199 RX_PARALLEL_PWM
200 RX_MSP
203 Only one receiver feature can be enabled at a time.
205 ### RX signal-loss detection
207 The software has signal loss detection which is always enabled.  Signal loss detection is used for safety and failsafe reasons.
209 The `rx_min_usec` and `rx_max_usec` settings helps detect when your RX stops sending any data, enters failsafe mode or when the RX looses signal.
211 By default, when the signal loss is detected the FC will set pitch/roll/yaw to the value configured for `mid_rc`. The throttle will be set to the value configured for `rx_min_usec` or `mid_rc` if using 3D feature.
213 Signal loss can be detected when:
215 1. no rx data is received (due to radio reception, recevier configuration or cabling issues).
216 2. using Serial RX and receiver indicates failsafe condition.
217 3. using any of the first 4 stick channels do not have a value in the range specified by `rx_min_usec` and `rx_max_usec`.
219 ### RX loss configuration
221 The `rxfail` cli command is used to configure per-channel rx-loss behaviour.
222 You can use the `rxfail` command to change this behaviour.
223 A flight channel can either be AUTOMATIC or HOLD, an AUX channel can either be SET or HOLD.  
225 * AUTOMATIC - Flight channels are set to safe values (low throttle, mid position for yaw/pitch/roll).
226 * HOLD - Channel holds the last value.
227 * SET - Channel is set to a specific configured value. 
229 The default mode is AUTOMATIC for flight channels and HOLD for AUX channels. 
231 The rxfail command can be used in conjunction with mode ranges to trigger various actions.
233 The `rxfail` command takes 2 or 3 arguments.
234 * Index of channel (See below)
235 * Mode ('a' = AUTOMATIC, 'h' = HOLD, 's' = SET)
236 * A value to use when in SET mode.
238 Channels are always specified in the same order, regardless of your channel mapping.
240 * Roll is 0
241 * Pitch is 1
242 * Yaw is 2
243 * Throttle is 3.
244 * Aux channels are 4 onwards.
246 Examples:
248 To make Throttle channel have an automatic value when RX loss is detected:
250 `rxfail 3 a`
252 To make AUX4 have a value of 2000 when RX loss is detected:
254 `rxfail 7 s 2000`
256 To make AUX8 hold it's value when RX loss is detected:
258 `rxfail 11 h`
260 WARNING: Always make sure you test the behavior is as expected after configuring rxfail settings!
262 #### `rx_min_usec`
264 The lowest channel value considered valid.  e.g. PWM/PPM pulse length 
266 #### `rx_max_usec`
268 The highest channel value considered valid.  e.g. PWM/PPM pulse length 
270 ### Serial RX
272 See the Serial chapter for some some RX configuration examples.
274 To setup spectrum on the Naze32 or clones in the GUI:
275 1. Start on the "Ports" tab make sure that UART2 has serial RX.  If not set the checkbox, save and reboot.
276 2. Move to the "Configuration" page and in the upper lefthand corner choose Serial RX as the receiver type.
277 3. Below that choose the type of serial receiver that you are using.  Save and reboot.
279 Using CLI:
280 For Serial RX enable `RX_SERIAL` and set the `serialrx_provider` CLI setting as follows.
282 | Serial RX Provider | Value |
283 | ------------------ | ----- |
284 | SPEKTRUM1024       | 0     |
285 | SPEKTRUM2048       | 1     |
286 | SBUS               | 2     |
287 | SUMD               | 3     |
288 | SUMH               | 4     |
289 | XBUS_MODE_B        | 5     |
290 | XBUS_MODE_B_RJ01   | 6     |
291 | IBUS               | 7     |
292 | JETIEXBUS          | 8     |
294 ### PPM/PWM input filtering.
296 Hardware input filtering can be enabled if you are experiencing interference on the signal sent via your PWM/PPM RX.
298 Use the `input_filtering_mode` CLI setting to select a mode.
300 | Value | Meaning   |
301 | ----- | --------- |
302 | OFF   | Disabled  |
303 | ON    | Enabled   |
305 ## Receiver configuration.
307 ### FrSky D4R-II
309 Set the RX for 'No Pulses'.  Turn OFF TX and RX, Turn ON RX.  Press and release F/S button on RX.  Turn off RX.
311 ### Graupner GR-24 PWM
313 Set failsafe on the throttle channel in the receiver settings (via transmitter menu) to a value below `rx_min_usec` using channel mode FAILSAFE.
314 This is the prefered way, since this is *much faster* detected by the FC then a channel that sends no pulses (OFF).
316 __NOTE:__
317 One or more control channels may be set to OFF to signal a failsafe condition to the FC, all other channels *must* be set to either HOLD or OFF. 
318 Do __NOT USE__ the mode indicated with FAILSAFE instead, as this combination is NOT handled correctly by the FC.
320 ## Receiver Channel Range Configuration.
322 The channels defined in CleanFlight are as follows:
324 | Channel number | Channel name |
325 | ----- | --------- |
326 | 0     | Roll |
327 | 1     | Pitch |
328 | 2     | Yaw |
329 | 3     | Throttle |
331 If you have a transmitter/receiver, that output a non-standard pulse range (i.e. 1070-1930 as some Spektrum receivers)
332 you could use rx channel range configuration to map actual range of your transmitter to 1000-2000 as expected by Cleanflight.
334 The low and high value of a channel range are often referred to as 'End-points'.  e.g. 'End-point adjustments / EPA'.
336 All attempts should be made to configure your transmitter/receiver to use the range 1000-2000 *before* using this feature
337 as you will have less preceise control if it is used.
339 To do this you should figure out what range your transmitter outputs and use these values for rx range configuration.
340 You can do this in a few simple steps:
342 If you have used rc range configuration previously you should reset it to prevent it from altering rc input. Do so
343 by entering the following command in CLI:
345 rxrange reset
346 save
349 Now reboot your FC, connect the configurator, go to the `Receiver` tab move sticks on your transmitter and note min and
350 max values of first 4 channels. Take caution as you can accidentally arm your craft. Best way is to move one channel at 
351 a time.
353 Go to CLI and set the min and max values with the following command:
355 rxrange <channel_number> <min> <max>
358 For example, if you have the range 1070-1930 for the first channel you should use `rxrange 0 1070 1930` in
359 the CLI. Be sure to enter the `save` command to save the settings.
361 After configuring channel ranges use the sub-trim on your transmitter to set the middle point of pitch, roll, yaw and throttle.
364 You can also use rxrange to reverse the direction of an input channel, e.g. `rxrange 0 2000 1000`.
366 ## Disabling the OpenTx/EdgeTx ADC Filter
368 OpenTx and EdgeTx both enable an `ADC filter` by default.  Betaflight users should turn this off.
370 The `ADC filter` converts what would otherwise be smooth changes in channel values into a series of steps, where each step is about 1% of the full stick travel.  It is intended to reduce 'chatter' when the Rx is connected to a *servo, so that the servo only changes position when a meaningful change has occurred.  It is not intended for use with flight controllers.
372 When the `ADC Filter` is active, Betaflight does not receive the most recent position of the gimabl with each new RC packet.  Instead, the Rx repeatedly provides the same data, until a moving-averaged smoothed estimate of gimbal position has increased by about 1% of full stick resolution.  
374 Betaflight needs a non-delayed, smooth and continuous representation of the stick travel to give the PID system a smooth target setpoint value.  Our RC Smoothing is based on the assumption that every packet is unique and that each is a new representation of the most recent position of the gimbal.  Feedforward is calculated from the packet-to-packet position difference, and absolutely relies on smooth and regular updates in measured gimbal position.
376 When active with Betaflight firmware, the `ADC filter` causes:
377 - delay (from the moving averaging)
378 - sustained transient impacts
379 - steps in setpoint
380 - spikes and noise in feedforward, with reduced feedforward precision
381 - spikes in motor control signals that may cause noticeable jerking in HD video
383 This is why, whenever an OpenTx or EdgeTx user is using Betaflight, the OpenTx/EdgeTx `ADC Filter` **MUST** be disabled, for accurate smooth flight control.
385 The user only has to find the `ADC Filter` checkbox in the Hardware tab of the Global Settings for their radio, and ensure it is un-checked.  For example, with the Frsky Taranis X9D+ pre 2019 model:
387  * Turn on your radio.
388  * Hold Menu to access Global Settings.
389  * Click the Page button 5 times to go to page 6 (HARDWARE).
390  * Scroll down and select ADC filter.
391  * Click Enter to disable the ADC filter as it's enabled by default.
392  * Click Exit (twice) to return to the startup screen.