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...
Rolf, IT WORKS!
The data was being passed. I finally saw how it was being reinitialized. Once I corrected that the data appeared in the Taranis as expected.
I did some playing around with sending data to the SPort when I couldn't get the live data working. What I noticed was that the ground speed displayed on the Tx was not a 1 for 1 representation of the data I sent. If I sent 25 the Tx showed 23, 50 ->49, 100->101, and 200->202. Have you seen this in your testing?
Thanks for your help in getting this working, and thanks again for making your code available so I could do this.
I found the problem, it was in my code . I have updated the file for the Teensy on the main page or you can get it here. Thank's for pointing this out for me
Taranis is showing the Speed (FR_ID_SPEED) in knot and is using the following code for this:
frskyData.hub.gpsSpeed_bp = (frskyData.hub.gpsSpeed_bp * 46) / 25/1000;
46/25 = 1.84
This must be a fault in the taranis code. To convert m/s to knot the factor is 1m/s = 1.94384449 knot and not 1.84
In my code i have converted to km/h
Hey rolf, do you have paypal, i wanted to donate $1 for everyone who buys a teensy or pre setup, someone ordered a bunch at once and i have made $13 in postage savings so i thought who better than you the creator?
So far i have sold 13 to 10 different peopleon ebay and else where
No, thank's ... it's very kind of you but i'm just happy to see that so many people likes the application.
Don't miss to change to the updated code ( Mavlink_FrSkySPort_1.3.zip) , there was a problem with GPS coordinates for the western part of the globe, this is now corrected.
okay, ill check it out, is there a charity you would like me to donate to maybe?
Excellent thread, many things have been clarified, but guess I'm just bit dense so let me re-confirm one two things.
My objective (if possible) is to have Teensy, minimOSD and 3DR radio at the same time connected.
And I want to do it safely.
1) According to Rana, it is possible to run Teensy, minimOSD and 3DR radio all in parallel. Is that correct? Does this setup need any modifications i.e. cut TX on minimOSD as suggested by Rolf?
2) Am I going to blow Teensy when I connect my APM to PC via USB while Teensy is connected to APM telemetry port?
This said by Rolf made me nervous, although I'm not sure if it applies to my scenario "Yes,cutting the connection between VIN and VUSB makes it save to have the USB and SPort connected at the same time." .... "You must supply +5V to Vin on the Teensy from the S.Port." ... or does this issue exist when one is trying to connect GPS to S.Port only? (which I'm not)
1. If you are using Teensy, minimOSD and 3DR Radio only the 3DR Radio shall have the TX connected to the APM
2. If the connection VIN to VUSB on the Teensy is not cut, you must be careful how you power the Teensy, normally S.Port is supplying power to the Teensy. if VIN/VUSB is not cut you will have 2 Power sources and if these are not the same voltage you will drain or source current and possibly destroy the Teensy or the USB.
I don't understand your comment about GPS to S.Port. Normally the S.Port from Teensy is connected to FrSky receiver to get the telemetry to the Taranis Tx and the FrSky receiver is powering the Teensy.
Also be aware of that if you are connecting the USB to the ATM you will not get any Telemetry data out from it cause they share the same serial port.
"1. If you are using Teensy, minimOSD and 3DR Radio only the 3DR Radio shall have the TX connected to the APM"
Got it. That makes sense, thank you.
"2. If the connection VIN to VUSB on the Teensy is not cut, you must be careful how you power the Teensy, normally S.Port is supplying power to the Teensy. if VIN/VUSB is not cut you will have 2 Power sources and if these are not the same voltage you will drain or source current and possibly destroy the Teensy or the USB."
Can you elaborate a bit more where the other power source is coming from? One is from S.Port. On APM side there's only RX, TX and GND. Actually in my case, as you advised, it's going to be RX and GND ... I'm not sure I understand where the 2nd power is comng from?
"I don't understand your comment about GPS to S.Port. Normally the S.Port from Teensy is connected to FrSky receiver to get the telemetry to the Taranis Tx and the FrSky receiver is powering the Teensy."
Disregard. This was from one of the discussions between you and other member here connecting GPS to S.Port ... I guess it's irrelevant in my scenario.
"Also be aware of that if you are connecting the USB to the ATM you will not get any Telemetry data out from it cause they share the same serial port."
The teensy is getting the power from the S.Port at the FrSky receiver
the other power comes from the USB connector if connected and VIN/VUSB not cutted.
Ah, I was not clear. I was talking about USB on APM wondering when I plug the APM to USB whether there may be an issue in blowing something on Teensy.
...all clear now, thank you. ...back to assembly line ;)
I've done just that, but didn't get data out of the telemetry port. Wanted to be able to quick test code changes in the teensy, so eventually just powered apm and attachments via battery, plugged teensy into USB and of course had the teensy still connected to the X8R S.Port, and everything worked fine. NOTE: the trace on the teensy is cut so USB is not powering it.
But simply powering the APM via USB will not.