Mavlink data displayed on Taranis, without converter

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 Open... 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...

Cheers,
Sam

Views: 9459

Comment by Dan Murray on October 12, 2014 at 3:07pm

Nice work! But you should really try and stay below the 400ft max

;)

Comment by Rana on October 12, 2014 at 5:40pm

Excellent work !

Comment by Artem on October 12, 2014 at 6:14pm
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.
Comment by Balloon on October 12, 2014 at 7:03pm

Nice Work.....

Comment by Sam Tabor on October 13, 2014 at 10:46am

@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. 

Comment by maxouf91 on November 16, 2014 at 3:04pm

hello,

I'm trying to use your firmware on my taranis but it dont work.

My serial port is at 115200 baud for the telemetry, maybe it's the problem? ( its a custom zigzag firmware http://www.itluxembourg.lu/site/ )

I have flash my taranis in opentx compagnon with your firmware and i select "nk" for the telemetry

I see "invalid mavlink" on the radio.

thank you

Sorry for my english...

Comment by Sam Tabor on November 18, 2014 at 11:26am

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.

Comment by Sam Tabor on November 18, 2014 at 1:36pm

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

Comment by maxouf91 on November 18, 2014 at 3:05pm

Hi Sam,

Yes, I have build a inverter with a 2n222 in Taranis and a bt module, so i can check if the telemetry work or not with mission planner.
I tried with the same firmware that you (openlrsng) but I can not seem to run the telemetry.
I must try again with different setting.
No, i'm not able to configure output to 57600 baud witch this firmware.
I try your new firmware immediately

Thank you very much ;)

Comment by Sam Tabor on November 24, 2014 at 10:56am

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

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service