Mavlink data displayed on Taranis, without converter

3689620635?profile=original

Having already got my OpenLRS set up to send Mavlink data back from my plane (using the gitsly OpenLRS branch), the next step was to get Mavlink data displayed on my Taranis.

The Taranis need inverted levels to serial pin in the module bay so I build an inverter from the schematic here. 

I saw this topic a while back: MAVLink data displayed on OpenTX (9X/9XR/etc) radio screen via OpenLRS, plus telemetry pass-thru to PC and assumed this would also work on Taranis. No such luck! There is no EXT=MAVLINK option for Taranis in the configurator. 

However I managed to get the OpenTX build environment set up on Ubuntu following the instructions here without too many difficulties. Then is was a matter of redirecting the telemetry bytes into the existing mavlink code, and displaying the Mavlink settings and telemetry screens rather than the Frsky ones. I was quite surprised when it all worked however!  The Mavlink serial is also available from the serial connector on the OpenLRS module so that can be connected to a PC or Android device.

In the original 9X Mavlink firmware it was not possible to select which telemetry protocol to use except by reflashing. I need a mixture of S.Port and Mavlink telemetry depending on which plane I'm flying so that didn't suit me too well. I added an option in the model menu telemetry options to use Mavlink rather than S.Port or Dbus, so each model can have it's Mavlink or Frsky telemetry received and displayed :) . 

I also thought it would be useful to have the radio read the flight modes as they are receiver over Mavlink, this wasn't too hard to incorporate either. I created sound files for each Arduplane mode and added code to play them on receipt of a new mode.

Something else I would like do is to copy the Mavlink data into the normal Frsky variables so that they can be used in the normal way, i.e. read out, used in Lua scripts and for vario sounds etc.. It's on the to-do list.

Hopefully this will be useful to some people out there, I will post the code after I get a chance to clean it up slightly as it is a bit of a hack! For now the binary and sound files are here (they need to be in the SOUNDS/en folder):

https://drive.google.com/folderview?id=0B4xnWmfKh4FrVFl4YlU1Zm9nQU0&usp=sharing

Cheers,
Sam

3689620752?profile=original3689620710?profile=original

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Hi

    I have tried setting it up, on openlrsng i set telemetry to "yes" and data buadrate to 19200.

    on APM i set serial1 to 19

    on you Opentx firmwere i set baudrate to 19200 and telemetry type mavlink, but when i flip the mavlink data pages i don't get any data and page 2 show "inv. mav type", i am using arduplane for now not copter (not sure if it matters).

    on openlrs tx module i used BC547 and 3 1kOhm resistors for signal inverter.

    when i connect the openlrs tx module with FTDI i can't connect not with missions planner and not with openlrs configurator.

    any ideas what i am doing wrong ??

    thanks

  • Ok, I have verified it works okay with OpenLRSng gitsly branch at 57000 and 115200 baud. Maybe you can try removing the bt module in case that is pulling the serial line down too far? You definitely have baud rate set correctly (under Radio Setup, below 'Units')?

    The new firmware is bigger because I included Lua and heli support.

  • Hi,

    Yes the baud rate in the radio menu needs to match what the LRS or APM is outputting.

    Are you able to connect to Mission Planner to verify that the serial link is working?

    I'm using Arduplane 3.1. 

  • By the way, for anyone wanting to compile from source the options I use are 

    make PCB=TARANIS HELI=YES LUA=YES EXT=FRSKY-MAVLINK

    My next goal is to copy all the mavlink telemetry data into the frsky telemetry variables consistent to how it is done in this project http://diydrones.com/forum/topics/amp-to-frsky-x8r-sport-converter

    That way the Lua scripts developed to display mavlink data using the frsky variables can work with the mavlink serial input.

    Cheers,

    Sam

  • My fault, there was an issue preventing 115200 baud from working. I have fixed it and added the new firmware here . The code is also available here https://github.com/samuelctabor/opentx

    Cheers,

    Sam

  • Are you able to configure your OpenLRS to output 57600 baud? I know that project is closed source so not sure if it's possible. 

    I can't get my OpenLRS to output 115200 baud right now so difficult to test the Taranis firmware,

    Just to check, did you build an inverter for the serial data? Taranis needs inverted levels.

  • @Dan Murray, Ah yes, forgot I took that picture while doing my Radian was in geostationary orbit. Either that or the indoor GPS lock reported negative altitude and it wrapped around . . . nah that can't be it, GPS altitudes are never wrong.

    @Artem, I did notice more packet loss than usual but I was only test flying it in the park where there is a lot of interference anyway. I think it is preferable (for me at least) to send the Mavlink as you can then have the option to use an Android device running Andropilot or Droidplanner through the same radio link without any other hardware on the plane. I know telemetry will reduce the distance and this will depend on the data rate, but I can't see how the protocol itself will make any difference so it should be possible to get similar performance by reducing the rate the Mavlink is sent at. I know that with 1W OpenLRS modules there were reports of Mavlink working at over 20km range. Obviously with these lower powered units that is probably not achievable, I will do some proper test flying soon and report how I get on. 

  • Nice Work.....

  • The problem with pure mavlink over openLRS ng even gitsly branch, is that it reduces the distance a lot. However, in AC3.2 someone implemented an older frsky telemetry nativelly right out of pixhawk. It works awesome with dtf uhf hardware set to frsky hub protocol and is received nativelly on taranis with just an inverter on the Tx side. Was not following arduplane though so cannot comment if this native frsky telemetry is actually available on it. Out of my tests (on a copter though) with gitsly branch and mavlink enabled I get about as much distance as my x8r-teensy setup, however with Kha's branch and just frsky telemetry I get almost 4km with just dipoles on both ends all other hardware being equal.
  • Excellent work !

This reply was deleted.