Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds section for Serial2 #422

Merged
merged 2 commits into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/assets/images/Serial2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/Serial2-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/Serial2-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 41 additions & 1 deletion docs/software/serial-protocols.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ ExpressLRS receivers can communicate using a variety of serial protocols:
- SUMD
- DJI RS2 Pro (Modified SBUS with pre-configured limits)
- HoTT Telemetry
- Tramp
- SmartAudio

## Receiver Protocol Selection

Expand Down Expand Up @@ -59,6 +61,43 @@ When connected to the receiver with the transmitter, enter the ExpressLRS Lua sc
![output mapping serial](../assets/screenshots/receiver-serial.png)
</figure>

## Second Serial Interface on ESP32 PWM receivers

Starting with firmware version 3.5 an additional serial interface (Serial2) can be assigned on any featured PWM Output to run any of the available serial protocols. Both serial interfaces can be be used simultaneously. This enables setups like running a CRSF wing stabilization unit and HoTT telemetry, Tramp or SmartAudio at the same time. Serial2 can also be used to simplify the wiring of e.g. an SBUS connection on receivers which have the first serial interface on separate connectors (e.g. RM receivers with JST connectors).

### Assigning Serial2 TX vs Serial2 RX and Serial2 TX

Most of the supported serial protocols are uni-directional (only sending data) or are bi-directional (sending and receiving data) on one single wire (half duplex). For those protocols it is only necessary to assign a TX pin. True (full duplex) serial protocols require the assignment of RX and TX. The following list shows the configuration requirements for the supported protocols:

- CRSF and MAVLINK: require Serial2 TX and additionally Serial2 RX if the device returns data (e.g. telemetry)
- all others: require Serial2 TX only

### Configuring Serial2

Serial2 is best configured using the WebUI but can also be configured using the LUA script.

Open the WebUI as described in section "How to get to the Web UI" and scroll down to the PWM Output table. Any PWM Output with the blue Serial2 feature tag can be used to assign Serial2 TX or Serial2 RX.

<figure markdown>
![Feature Flags](../assets/images/Serial2-1.png)
</figure>

Assign Serial2 TX. If necessary for the serial protocol you intend to run assign Serial2 RX also. In this example we want to run a protocol that only requires Serial2 TX (see above section). Choose Serial2 TX using the Mode drop down list on the desired PWM Output.

<figure markdown>
![Mode selection](../assets/images/Serial2-2.png)
</figure>

Scroll down a little further. A new line named Serial2 protocol is now available to choose the desired protocol.

<figure markdown>
![Serial2 Protocol](../assets/images/Serial2-3.png)
</figure>

Save the configuration using the SAVE button at the bottom of the page.

Restart the receiver and connect your serial device to the configured PWM Output.

## SUMD Notes

SUMD is the Graupner HoTT bus protocol used to transmit multiple channel data over a single serial line. It transports up to 16 full res channels at a rate of 100Hz and is mainly used to provide digital channel data to Flybarless Control Systems for helicopters and older Flight Controllers.
Expand Down Expand Up @@ -170,12 +209,13 @@ If an adapter cable is required depends on the platform the receiver is based on

ESP32 based receivers with Serial on dedicated PWM servo connectors like the BetaFPV SuperP 14ch:

- No adapter cable is required. HoTT sensors can be directly connected to the PWM servo connector dedicated for Serial TX.
- No adapter cable is required. HoTT sensors can be directly connected to the PWM servo connector of any of the PWM pins configured for Serial2 TX (see above section).

ESP32 based receivers with Serial on the JST connector.

- RadioMaster ER6x/ER8x need a JST to JR adapter. The JST pigtail RadioMaster included in the package can be used.
- Caveat: the SuperP 14ch also has a JST connector but it can't be used as a Serial port, see the first ESP32 category.
- Alternatively use any of the PWM pins configured for Serial2 (see above section 2).

<figure markdown>
![RM ER6 and ER8](../assets/images/HoTT-TLM-P5.png)
Expand Down