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: 307495

Attachments:

Reply to This

Replies to This Discussion

I got the Teensy 3.1 from Sparkfun and it seamlessly working in parallel with the telemetry radio.Thanks to Rolf for his kind support

For all, make sure to use Smart port on the X8R receiver and not the SBus port.


Dear Rolf-

this is incredibly awesome! That's what I was looking for all the time...

More awesomeness would just be possible if the Sbus to PPM Sum also could be included because the processor should be up to the task (I am sorry- MY programming skills are not...) and it would save one more (unnecessary) component...

Anyways- thank you so much for giving us this great new functionality!

Components are already ordered ;-)

Kind regards
Roman

I think this should be ported to OpenLRSng. To have an LRS with native APM telemetry on my Taranis would be fantastic.

second that :)  2.4ghz is inherently inferior to 433mhz, I heard that oenLRSng on DTF UHF equipment can reach 6-7 miles telemetry on a simple dipole. I cannot confirm from personal experience, but the guy behind ghettostation (Guillaume S) claims getting such results regularly.  

This should be pretty easy to do. The OpenLRSng's has a "transparent serial bridge", so (aside from the possibly inverted signaling), it should be as simple as getting the OpelLRSng serial port into the Taranis from the Tx module. People were already doing this for the older frsky 'hub' protocol, as documented here: https://github.com/openLRSng/openLRSng/wiki/Telemetry-guide

This should be the same mod required for the newer telemetry protocol.

Well done, Rolf. This is brilliant work! Thank you for sharing it with us :)

Rana,

This is exactly what I am trying to do. It looks like you are using UART0. Did you have to make changes to the APM code? I would realy appreciate detailed info. I should have the Teency any day and hope to install it this weekend. Thanks.

Rolf, great project. Thank you.

The hardware mod should still be done yes, but the protocol still needs to be either FrSky or SmartPort, since those are the two options the Taranis understands. Therefore, the OpenLRSng RX (or TX, depending on transmission rates) will need to do a conversion of MAVlink telemetry to either FrSky or SmartPort. I think the SmartPort protocol hasn't been reverse engineered yet so the FrSky Hub protocol will probably be the best option.

jDrones have already published a firmware for their IO-Board that does exactly that, but you need a separate hardware board to get it going and it has only been used on 2.4 GHz FrSky receivers.

Igor,

Absolutely not did any change in the APM code. The serial port at the downside is hardwired to UART0. Its baud will automatically change to 115200bps when USB is used else it will be on user selectable baud if not used with USB.

Telemetry data out from the APM is not straight forward, Telemetry is only using UART0 wether the APM is airborne or it is connected to PC via USB. The only difference is that while APM is connected to PC, ATMega2560 reconfigure UART0 to baud 115200 bps else when the APM is airborne it configures the same UART0 to the baudrate selected by the user for telemetry, default is 57600 bps, I am trying to explain;

STATE WHEN APM CONNECTED TO PC VIA USB (STATE-1):
When APM is connected to the PC via USB then this state is sensed by (Failsafe & USB controller) chip ATMega32U2, which in turn makes it pin #5 high which is connected to the control input pins #1 (IN1) & pin #5 (IN2) of the chip TS5A23157 (ACTIVE) Dual 10-Ohm SPDT Analog Switch.

This state is also communicated to ATMega2560, which reconfigures the UART0 to baud 115200 bps by default. In this state the chip TS5A23157 (SPDT Analog Switch) connects UART0 of ATMega2560 (Pin #2, #3) to the UART1 of ATMega32U2 (Pin #8, #9). The code running inside ATMega32U2 directs the USB to serial connectivity to ATMega's UART0.

In the following Schematic and PCB screenshot, just focus on the highlighted connections.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

STATE WHEN APM IS AIRBORNE (STATE-2):
When APM is powered via ESC or power module the this state is also sensed by ATMega32U2 which makes it pin #5 low which is connected to the control input pins #1 (IN1) & pin #5 (IN2) of the chip TS5A23157 (ACTIVE) Dual 10-Ohm SPDT Analog Switch.

This state is also communicated to ATMega2560, which reconfigures the UART0 to user selected baud 57600bps by default.

In this state the chip TS5A23157 connects UART0 of ATMega2560 (Pin #2, #3) to the telemetry radio.

In the following Schematic and PCB screenshot, just focus on the highlighted connections.

The code from the original post of this thread in fact implements the SmartPort protocol. Using the teensy to do the mavlink to SmartPort protocol conversion, along with that hardware mod at the Tx should be enough to get telemetry on the taranis while using OpenLRSng.

I am just a few days away from announcing my Indiegogo campaign for the "MAVBoard" (http://diydrones.com/profiles/blogs/sneak-peak-at-mavboard-progress) which will support the hub protocol out of the box. If the Taranis ever becomes available again and I can actually get one ordered, I do plan to port this code over to it as well.

Thank you for explanation. I will try it this weekend. Just received Teensy.

Just thought of a neat mod that would work with this - height activated retracts.

Ideally you'd have an RC channel hooked too up to allow an override if your barometer has decided you're at -3m high or something but it shouldn't be too hard.

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service