Hi all,

I just bought an FrSky Taranis for my quad copter and needed to get the Mavlink data up on the Taranis LCD telemetry display. So here is my solution using a Teensy3.1 as a converter between MavLink and the S.Port on FrSky X8R.

See attached file below...

Views: 307022

Attachments:

Reply to This

Replies to This Discussion

Thanks!

I'm going to cut the VIN/VUSB just in case! :)

Hi-

Perhaps this code could additionally be implemented in the Teensy to save the additional Arduino?
http://openrcforums.com/forum/viewtopic.php?f=84&t=4539

Have a nice weekend

Rolf, have you thought about putting the files on a Git repo? Would make updates and mods easier.

Rolf, thank you very much for fixing the code. The coordinates now work for me! (Toronto, Canada). The speed still displays 0 (SPD 0), but the coordinates were far more important for me (for quad recovery in case of a fly away).

Hey guys simple solution to power the APM from USB is to simply push the plug in at an angle so the TX or RX do not connect.

Alternatively, just cut the tx and rx on the USB

This is really cool. Thanks so much for creating this and all the helpful posts. I just received my Teensy today and hope to tinker with it this weekend. Took a couple of images of the board with my digital microscope here at work for anyone to use as reference, etc...

(stitched images, 50x magnification)

Attachments:

I've got my Teensy to work! ...thank you Rolf and others ;)

I've noticed one small issue. The Teensy does not always kick in after plugging main battery. Often, after I plug in main battery, I have to disconnect and reconnect Teensy from S.Port or disconnect and reconnect X8R from APM (I'm using CPPM converter).

Also, the X8R has A1 built in analog voltage sensor providing the voltage that powers the X8R. So in case where Teensy is powered from X8R A2 is always same as A1.

A2 is coming from Teensy analog port A0, if this port is not connected then you will get a random value as A2.

else if connected you will have 0V = 0 to 3.3V = 255 these values are then scaled at the Taranis to show a representation of the voltage.

I understand. All I'm saying is that voltage on A1 and A2 is going to show the same value if Teensy is powered from X8R. 

Any thoughts on the power-on issue I'm seeing? Almost always, after powering the main battery I have to unplug and replug Teensy from X8R to start it working. If I don't is seems "dead" ... no LED won't blink at all.

Hello Rolf.

Thanks for a great job, I'm very impressed.
I have taken the liberty to change some of the code so Fuel can be read as a percentage.
I do not know if it has use to anyone other then me, but I like to see how much I have left in the battery. 

In "MavLink_FrSkySPort"

// Message # 1 SYS_STATUS
uint16_t ap_voltage_battery = 0; // 1000 = 1V
int16_t ap_current_battery = 0; // 10 = 1A
int16_t ap_battery_remaining = 0; // new

***

ap_voltage_battery = Get_Volt_Average(mavlink_msg_sys_status_get_voltage_battery(&msg)); // 1 = 1mV
ap_current_battery = Get_Current_Average(mavlink_msg_sys_status_get_current_battery(&msg)); // 1=10mA
ap_battery_remaining = mavlink_msg_sys_status_get_battery_remaining(&msg); // new

if(ap_battery_remaining<=0) // new
{
ap_battery_remaining=0; // new
}

***

In "FrSkySPort"

case 19:
FrSkySPort_SendPackage(FR_ID_FUEL,ap_battery_remaining); //new, the other line with FR_ID_FUEL is deleted
break;

It works with me, and I do not think it affects any of the other code.

This weekend I bought a Teensy 3.1 from the Arduino booth at the maker faire I was flying drones on :)

Yesterday I wired it to my OpenRLSng but failed to get telemetry info on my Taranis. So I just wanted to check some things:

  1. The Teensy flashes every second while it is starting up and is solidly lit when active so it seems, is this the correct behaviour?
  2. What is the baud rate the Teensy outputs the SmartPort telemetry? I guessed it was 57600 and setup my OpenRLSng TX accordingly.
  3. I also have a MinimOSD connected to my APM and with the Teensy connected too I see the OSD values update at a much higher rate than normally, is this because the Teensy "pulls" the telemetry faster?
  4. I setup my OpenLRSng RX with the telemetry function set to "yes" (options are no/yes/SmartPort/FrSky). I figured that Teensy already speaks SmartPort and therefore it should be transmitted verbatim, right?
  5. I have the signal inverter mod done on my OpenLRSng TX module as per these instructions. Do I still need this?

I have made across-post of this on the OpenLRSng thread at RCGroups too and will share the answers. Thanks!

very cool, i have been meaning to get my LRS project going... thanks for posting

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service