Servers by jDrones

Mavlink to FrSky S.Port Passthru Converter for LRS or PX4 Pro

(Eric Stockenstrom - zs6buj) #1

So my Orange RX / TX 1W LRS UHF units arrived about a month ago, and after a steep learning curve I eventually had it all working. All except my trusty Taranis display. After using FlightDeck, and then also yaapu’s excellent LUA script for a while, I found it very difficult being without quick and easy flight data. Since the ground Orange RX has a Mavlink serial port it’s easy enough to hook up (by cable or BT) a laptop or tablet and run your favourite GCS app, but I sure missed that Taranis screen!

There are some great Mavlink/Taranis converters around, like this excellent one published by athertop et al on GitHub, but they output native FrSky S.Port sensor telemetry. FlightDeck and yaapu’s script are designed for the FrSky DIY sensor number range 5000, or “Passthrough” protocol, implemented in Ardupilot 3.5 and later (but not in PX4 Pro to the best of my knowledge).

Long story short, and out of necessity, I’ve written Mavlink to Passthru converter firmware for the Teensy3.x, which works with FlightDeck and/or yaapu’s LUA script. Many thanks and acknowledgements to yaapu for his wise and insightful advice, also to florent for guidance on FlightDeck requirements, athertop for testing ideas and Craft and Theory for the Passthrough protocol.

The beta of the firmware is here

Feel free to use it at your own risk

The target board I used is the Teensy 3.2, but at a push the firmware should run on a cheap STM32F103C, if, for example, we forgo the debug serial and / or the auxiliary Mavlink port.

The MavlinToPassthru converter comes in two versions:

  1. For use on the air-side: Mavlink telemetry in, Passtru telemetry out into a suitable S.Port equipped FrSky receiver, like the XSR or XM+

Comment out this line // #define Emulation_Enabled

  1. For use on the ground-side, likely in the back bay of a Taranis (or Horus), to convert Mavlink out of the Orange RX / TX 1W into passthu telemetry for feeding into the S.Port pin of the Taranis. Mavlink is available on serial3 of the Teensy 3.2 for connection to a Bluetooth adapter (like the HC-06), or anything else.

Un-comment out this line /#define Emulation_Enabled

For the auxilliary mavlink port, un-comment this line #define Aux_Port_Enabled

Taranis Back Bay

In this image I use pin 8 for the S.Port. Default is pin 1.

Taranis Display

Ground side with Orange 1W and HC-06 BlueTooth

Air side with FrSky XSR receiver and Pixhawk

4 Likes
An Open Source Frsky Telemetry Script for the Horus X10,X12 and Taranis X9D,X9E and QX7 radios
An Open Source Frsky Telemetry Script for the Horus X10,X12 and Taranis X9D,X9E and QX7 radios
(Alex Apostoli) #2

very well done Eric, great job!

(Eric Stockenstrom - zs6buj) #3

Thanks Alex.

Paul mentioned that ground speed is fluctuating up to a few m/s while at rest. I’ll look at that this morning. I think I misunderstood vx, vy (vz) from APM, but should be easy to fix.

(Eric Stockenstrom - zs6buj) #4

Hi Alex

I downloaded your latest Taranis script. Love it. Your blog is also stunning, with all the detailed diagrams and useful information!

Spent some time fine-tuning my passthru converter, and it’s much faster now. Perhaps you could give it a try when you get a chance.

1 Like
(Travis Bridges) #5

WOW this is great this gives my idea hope. Would a setup like this be possible with your converter?

Right now, I have my modem set up this:

Would it be possible to instead set it up like:

Using the RFD900x PPM pass through, and get telemetry scripts running on the taranis?

Telemetry with PPM?
(Eric Stockenstrom - zs6buj) #6

Hello Travis

Welcome to our humble tread.

Yes, simply use the #define statements to set the Passthru converter to Air_Mode, and supply Mavlink at 57600 b/s.

Alternatively, don’t bother with the X8R, feed the converter S.Port output directly into the back of the Taranis if the ground RFD900x is nearby.

Your proposed solution will give you more flexibility to walk around though. If the X8R is too close to the Taranis it might misbehave.

(Travis Bridges) #7

Great news This worked well. All except for the X8R since it doesn’t support PPM. I used an XSR instead.

Thanks so much for this.

(Matthew ) #8

@thatsnailguy

Just so I am clear how you have that hooked up is the XSR will never be on the UAV but will also be on the ground close to the rfd and the RFD is sending PPM passthru to the RFD on the UAV? I have been looking how to do this for awhile and it seems as though you have figured it out. Why did you have to use a separate script when RFD900x already supports PPM passthru?

(Travis Bridges) #9

Yes the XSR stays on the ground, the script on the teensy allows Mavlink Pass-through scripts like Yaapu and Flight Deck to run on the taranis.

The only link from ground to air is through the 900x.

(Matthew ) #10

That makes sense as to why you had the teensy. If these scripts were not needed you only need to hook up the xsr to the ppm pin on the rfd900 that is on the ground and setup that way. Might have to look into the yaapu script stuff looks very interesting for a quick down and dirty display. I was hoping you were using the teensy so somehow make s.bus work hahaha have a bunch of s.bus receivers but no PPM so I ordered a XSR.

(Matthew ) #11

@thatsnailguy

Could you share how you wired up this setup?

(Eric Stockenstrom - zs6buj) #12

Yep, sorry I missed that the X8R does not have PPM, but glad to hear it’s working for you now.

(Fnoop) #13

I missed this, this is great for those of us who have failed miserably to get a diode cable working. Thanks :slight_smile:

(Matthew ) #14

I am not much of a programmer nor know anything about the teensy, are there any instructions on how to upload this, and a connection diagram?

(Eric Stockenstrom - zs6buj) #15

Hi Mathew

To flash the firmware, first set up the Arduino IDE for the Teensy. You will find the details here

Then there is a lot more information here, including wiring

Setup will depend on your circumstances. You will want to set up in one of three modes, ground, air or relay… The wiki explains how each mode works. Select your mode by removing the appropriate slashes in the source code before compiling the firmware, then flash.

Read the information in the links and wiki a few times and it should all fall into place.

(Alex Apostoli) #16

Hi @Daniel_Rohde,
can you please describe what are you trying to achieve?

Which one of this 2 use cases match your setup?

  1. you have an FrSky tx/rx combo like an Horus + an X8R,X4R or R9
  2. you’re using a long range system such as DragonLink, ULRS or TBS or perhaps EZWifibroadcast

I understand that you have OpenTX 2.2.3, good, that is a requirement.
I read you have ardupilot but which version?

Option 1

Ardupilot sends telemetry packets down the radio link in native frsky format, for this to work

  • flash your flightcontroller with a recent ardupilot firmware
  • enable frsky passthrough telemetry on one of your serial ports by setting SERIALn_PROTOCOL = 10 where n is the number of your serial port, you do this with mission planner by going to full parameters or with QGroundControl in the telemetry setup page.
  • get yourself an inverting cable such as this one

Option 2

Ardupilot produces mavlink messages and these need to be converted to frsky telemetry either in the air or on the ground. The most common use case is on the ground where a teensy converts mavlink messages to frsky telemetry packets and feeds them into the Horus which displays them with the Yaapu Widget
For this to work you need

  • get a board supported by Eric’s firmware (Teensy, etc)
  • configure and compile the firmware for your board and use case (air/ground/relay)
  • wire according to the docs

enjoy your new system :slight_smile:

Alex

(Daniel Rohde) #17

Hello Alex I use a Horus X12 to a X8r in 2,4ghz area I would like to see the Yaapu script with all the details such as battery and so on and GPS, etc. I use a Pixhawk 2 with ardupilot 3.5.x I have the Tinsy like on the one picture connected to telemetry port 2 and installed the script as described on the remote control. My goal is that all statements of the script will work and no sensors lost message comes more Which HEX file exactly should I flashing yes from 0.9 -1.1x? and I have already mentioned open tx 2.2.3 on the run. Thank you for the excellent support p.s. a question still need I this Orange module what is mentioned or can be passed over the whole telemetry channel?

(Alex Apostoli) #18

Daniel,
with your setup you do not need a teensy, all you need is an inverting cable

The wiring is:

FC -> inverting cable -> X8R s.port

take a look at

http://ardupilot.org/copter/docs/common-frsky-telemetry.html#common-frsky-equipment
http://ardupilot.org/copter/docs/common-frsky-telemetry.html#diy-cable-for-x-receivers

(Daniel Rohde) #19

Oh my god :sweat_smile: The solution can sometimes be so easy :slight_smile: I’ve been experimenting with this thing for weeks and I thought I was too stupid :). Thank you and I will contact you if the components are there and have been successfully installed :slight_smile: A small question at the end, I can use this component with a Taranis X9D Plus? :slight_smile: because my buddies certainly want to have this great script as well :slight_smile: I wish you a nice day and thank you for the very fast answers that you have saved me a lot of work :slight_smile:

(Alex Apostoli) #20

Daniel, we all started from “the beginning” :slight_smile:

the script works on all FrSky radios: Taranis X9D, QX7, X-Lite and Horus
The setup is similar, take a look at the docs for further infos

cheers,
Alex