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


Reply to This

Replies to This Discussion

Yes,cutting the connection between VIN and VUSB makes it save to have the USB and SPort connected at the same time.

I cut the trace. Now the USB serial port is no longer an option. What do I need to do to be able to use the USB as a serial monitor again?

You must supply +5V to Vin on the Teensy from the S.Port.



I did that. My SPort connection looks like the one you have pictured above. When the X8R is powered up the SPort provides 5.25V to VIN. The GPS is connected to Tx2, Rx2, 3.3v, and GND.

The USB serial connection just disappeared fom the menu. Should the USB serial apperar, if the SPort provides sufficient voltage? If so, I'll put a 5V supply across VIN and GND, and see if the USB serial reappears. If it does reappear, then I need to do some investigating on the SPort. Currently I have a current sensor and voltage sensor on the SPort ahead of the Teensy. I wanted to get some data from other sensors to be sure I can read the SPort.

Thanks for the help.

Disregard my last. I just connected 5V from a BEC to VIN and the USB Serial port appeared. Now I have to figure where the 5V from the SPort went.


Hello Rolf,

can you tell me how to retrieve RCin of channel 3 from the MAVLINK Data?


Thanks Rolf for providing this great solution!

Most of the functions work well, and I find them very useful. There seem to be a few problems however.

1) GPS speed always shows 0 for some reason

2) GPS coordinates seem to be wrong. In particular my longitude is really off as you can see in the attached picture (i don't think -255 degrees even exists)

Do you have any idea how to fix it? GPS coordinates are especially important to me in case of a fly away.



Try updating Taranis FW, I had the same issue.

like this:

first declare an variable

uint16_t  ap_rc_ch3;

then you must request the APM to start sending this data, add in the loop function:

mavlink_msg_request_data_stream_pack(0xFF,0xBE,&msg,1,1,MAV_DATA_STREAM_RC_CHANNELS, MSG_RATE, START);
      len = mavlink_msg_to_send_buffer(buf, &msg);

then to receive the value for the RC channel,  add in the MavLink_receive function:

      ap_rc_ch3 = mavlink_msg_rc_channels_raw_get_chan3_raw(&msg);


Now the ap_rc_ch3 holds the value for RC channel 3 input

You can also get the scaled output (the output value from  APM) using:

      ap_rc_ch3 = mavlink_msg_rc_channels_raw_get_chan3_scaled(&msg);



My FW is the newest. I may try to reflash it again maybe. But it gave me no trouble so far, except this

try, I had exactly the same issue, after re-flash(in my case update) all working. 

hmm,,,, are you using ppm? if no (pwm) just do a Y connector from rx... :)

ppm... is a different thing,

if u are using an openLRSng you could assign one of the pins to output ch3 pwm value in addition to PPM on the other pin (actually any Ch). in this case no programming is necessary and can be done through GUI, than catch the pwm value on one of the teensy's pins (this takes off the work from apm to repack ch3 pwm into mavlink)

in case you have an X8R, now, haven't tried this, but in theory should work: connect ch3 to one of the pins on your teensy, there will be your PWM value.  <--- in theory haven't tried myself but can try tonight.  

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service