Better Iterm resetting
[betaflight.git] / docs / Rx.md
bloba331e7dcfc9a574750a5ad7360171d401303a247
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 ## Parallel PWM Receivers
13 8 channel support, 1 channel per input pin.  On some platforms using parallel input will disable the use of serial ports
14 and SoftSerial making it hard to use telemetry or GPS features.
16 ## PPM Receivers
18 PPM is sometimes known as PPM SUM or CPPM.
20 12 channels via a single input pin, not as accurate or jitter free as methods that use serial communications, but readily available.
22 These receivers are reported working:
24 FrSky D4R-II
25 http://www.frsky-rc.com/product/pro.php?pro_id=24
27 Graupner GR24
28 http://www.graupner.de/en/products/33512/product.aspx
30 R615X Spektrum/JR DSM2/DSMX Compatible 6Ch 2.4GHz Receiver w/CPPM
31 http://orangerx.com/2014/05/20/r615x-spektrumjr-dsm2dsmx-compatible-6ch-2-4ghz-receiver-wcppm-2/
33 FrSky D8R-XP 8ch telemetry receiver, or CPPM and RSSI enabled receiver
34 http://www.frsky-rc.com/product/pro.php?pro_id=21
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/shop/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 * 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.
54 * 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.
56 These receivers are reported working:
58 FrSky X4RSB 3/16ch Telemetry Receiver
59 http://www.frsky-rc.com/product/pro.php?pro_id=135
61 FrSky X8R 8/16ch Telemetry Receiver
62 http://www.frsky-rc.com/product/pro.php?pro_id=105
64 Futaba R2008SB 2.4GHz S-FHSS
65 http://www.futaba-rc.com/systems/futk8100-8j/
68 #### OpenTX S.BUS configuration
70 If using OpenTX set the transmitter module to D16 mode and ALSO select CH1-16 on the transmitter before binding to allow reception
71 of all 16 channels. 
73 OpenTX 2.09, which is shipped on some Taranis X9D Plus transmitters, has a bug - [issue:1701](https://github.com/opentx/opentx/issues/1701).
74 The bug prevents use of all 16 channels.  Upgrade to the latest OpenTX version to allow correct reception of all 16 channels,
75 without the fix you are limited to 8 channels regardless of the CH1-16/D16 settings.
79 ### XBUS
81 The firmware currently supports the MODE B version of the XBus protocol.
82 Make sure to set your TX to use "MODE B" for XBUS in the TX menus!
83 See here for info on JR's XBUS protocol: http://www.jrpropo.com/english/propo/XBus/
85 These receivers are reported working:
87 XG14 14ch DMSS System w/RG731BX XBus Receiver
88 http://www.jramericas.com/233794/JRP00631/
90 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.
91 To use this receiver you must power it with 3V from the hardware, and then connect the serial line as other serial RX receivers.
92 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.
93 Receiver name: Align DMSS RJ01 (HER15001)
95 ### SUMD
97 16 channels via serial currently supported.
99 These receivers are reported working:
101 GR-24 receiver HoTT
102 http://www.graupner.de/en/products/33512/product.aspx
104 Graupner receiver GR-12SH+ HoTT
105 http://www.graupner.de/en/products/870ade17-ace8-427f-943b-657040579906/33565/product.aspx
107 ### SUMH
109 8 channels via serial currently supported.
111 SUMH is a legacy Graupner protocol.  Graupner have issued a firmware updates for many recivers that lets them use SUMD instead.
113 ## MultiWii serial protocol (MSP)
115 Allows you to use MSP commands as the RC input.  Only 8 channel support to maintain compatibility with MSP.
117 ## Configuration
119 There are 3 features that control receiver mode:
122 RX_PPM
123 RX_SERIAL
124 RX_PARALLEL_PWM
125 RX_MSP
128 Only one receiver feature can be enabled at a time.
130 ### RX signal-loss detection
132 The software has signal loss detection which is always enabled.  Signal loss detection is used for safety and failsafe reasons.
134 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.
136 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.
138 Signal loss can be detected when:
140 1. no rx data is received (due to radio reception, recevier configuration or cabling issues).
141 2. using Serial RX and receiver indicates failsafe condition.
142 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`.
144 ### RX loss configuration
146 The `rxfail` cli command is used to configure per-channel rx-loss behaviour.
147 You can use the `rxfail` command to change this behaviour.
148 A flight channel can either be AUTOMATIC or HOLD, an AUX channel can either be SET or HOLD.  
150 * AUTOMATIC - Flight channels are set to safe values (low throttle, mid position for yaw/pitch/roll).
151 * HOLD - Channel holds the last value.
152 * SET - Channel is set to a specific configured value. 
154 The default mode is AUTOMATIC for flight channels and HOLD for AUX channels. 
156 The rxfail command can be used in conjunction with mode ranges to trigger various actions.
158 The `rxfail` command takes 2 or 3 arguments.
159 * Index of channel (See below)
160 * Mode ('a' = AUTOMATIC, 'h' = HOLD, 's' = SET)
161 * A value to use when in SET mode.
163 Channels are always specified in the same order, regardless of your channel mapping.
165 * Roll is 0
166 * Pitch is 1
167 * Yaw is 2
168 * Throttle is 3.
169 * Aux channels are 4 onwards.
171 Examples:
173 To make Throttle channel have an automatic value when RX loss is detected:
175 `rxfail 3 a`
177 To make AUX4 have a value of 2000 when RX loss is detected:
179 `rxfail 7 s 2000`
181 To make AUX8 hold it's value when RX loss is detected:
183 `rxfail 11 h`
185 WARNING: Always make sure you test the behavior is as expected after configuring rxfail settings!
187 #### `rx_min_usec`
189 The lowest channel value considered valid.  e.g. PWM/PPM pulse length 
191 #### `rx_max_usec`
193 The highest channel value considered valid.  e.g. PWM/PPM pulse length 
195 ### Serial RX
197 See the Serial chapter for some some RX configuration examples.
199 To setup spectrum on the Naze32 or clones in the GUI:
200 1. Start on the "Ports" tab make sure that UART2 has serial RX.  If not set the checkbox, save and reboot.
201 2. Move to the "Configuration" page and in the upper lefthand corner choose Serial RX as the receiver type.
202 3. Below that choose the type of serial receiver that you are using.  Save and reboot.
204 Using CLI:
205 For Serial RX enable `RX_SERIAL` and set the `serialrx_provider` CLI setting as follows.
207 | Serial RX Provider | Value |
208 | ------------------ | ----- |
209 | SPEKTRUM1024       | 0     |
210 | SPEKTRUM2048       | 1     |
211 | SBUS               | 2     |
212 | SUMD               | 3     |
213 | SUMH               | 4     |
214 | XBUS_MODE_B        | 5     |
215 | XBUS_MODE_B_RJ01   | 6     |
217 ### PPM/PWM input filtering.
219 Hardware input filtering can be enabled if you are experiencing interference on the signal sent via your PWM/PPM RX.
221 Use the `input_filtering_mode` CLI setting to select a mode.
223 | Value | Meaning   |
224 | ----- | --------- |
225 | 0     | Disabled  |
226 | 1     | Enabled   |
228 ## Receiver configuration.
230 ### FrSky D4R-II
232 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.
234 ### Graupner GR-24 PWM
236 Set failsafe on the throttle channel in the receiver settings (via transmitter menu) to a value below `rx_min_usec` using channel mode FAILSAFE.
237 This is the prefered way, since this is *much faster* detected by the FC then a channel that sends no pulses (OFF).
239 __NOTE:__
240 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. 
241 Do __NOT USE__ the mode indicated with FAILSAFE instead, as this combination is NOT handled correctly by the FC.
243 ## Receiver Channel Range Configuration.
245 If you have a transmitter/receiver, that output a non-standard pulse range (i.e. 1070-1930 as some Spektrum receivers)
246 you could use rx channel range configuration to map actual range of your transmitter to 1000-2000 as expected by Cleanflight.
248 The low and high value of a channel range are often referred to as 'End-points'.  e.g. 'End-point adjustments / EPA'.
250 All attempts should be made to configure your transmitter/receiver to use the range 1000-2000 *before* using this feature
251 as you will have less preceise control if it is used.
253 To do this you should figure out what range your transmitter outputs and use these values for rx range configuration.
254 You can do this in a few simple steps:
256 If you have used rc range configuration previously you should reset it to prevent it from altering rc input. Do so
257 by entering the following command in CLI:
259 rxrange reset
260 save
263 Now reboot your FC, connect the configurator, go to the `Receiver` tab move sticks on your transmitter and note min and
264 max values of first 4 channels. Take caution as you can accidentally arm your craft. Best way is to move one channel at 
265 a time.
267 Go to CLI and set the min and max values with the following command:
269 rxrange <channel_number> <min> <max>
272 For example, if you have the range 1070-1930 for the first channel you should use `rxrange 0 1070 1930` in
273 the CLI. Be sure to enter the `save` command to save the settings.
275 After configuring channel ranges use the sub-trim on your transmitter to set the middle point of pitch, roll, yaw and throttle.
278 You can also use rxrange to reverse the direction of an input channel, e.g. `rxrange 0 2000 1000`.