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

Attachments:

Reply to This

Replies to This Discussion

This project looks great. I have done similar for my antenna tracker some time ago, though I used a Arduino Pro Mini for sending the data rather than a Tiny. The protocol looks very similar, except I only used an 8 bit ID.

Mavlink to FrSky source on Github

Regarding FSK, I have been doing it previously with external modem ic's, but recently managed to get a software only modem working...

Diy antenna FSK info on Diydrones

It would definitely be possible to use the same  technique to do the demodulation on an 8 bit AVR if you added an external filter rather than a digital one.

regards

Andy

For those interested, I found that this set of code from Christian Swahn worked. I actually took what worked from his code and then interested it into the original code in the FrSkySPort file.

case 8: // First 2 cells
if(ap_cell_count > 0) {
offset = 0x00 | ((ap_cell_count & 0xF) 4); // Addition after Taranis 2.0.6
temp=((ap_voltage_battery/(ap_cell_count * 2)) & 0xFFF);
FrSkySPort_SendPackage(FR_ID_CELLS,(temp 20) | (temp 8) | offset); // Battery cell 0,1
break;
}
case 9: // Optional 3 and 4 Cells
if(ap_cell_count > 2) {
//offset = ap_cell_count > 3 ? 0x02: 0x01; // Original Code before Taranis 2.0.6
offset = 0x02 | ((ap_cell_count & 0xF)4);
temp=((ap_voltage_battery/(ap_cell_count * 2)) & 0xFFF);
FrSkySPort_SendPackage(FR_ID_CELLS,(temp 20) | (temp 8) | offset); // Battery cell 2,3
}
break;
case 10: // Optional 5 and 6 Cells
if(ap_cell_count > 4) {
//offset = ap_cell_count > 5 ? 0x04: 0x03; // Original Code before Taranis 2.0.6
offset = 0x04 | ((ap_cell_count & 0xF)4);
temp=((ap_voltage_battery/(ap_cell_count * 2)) & 0xFFF);
FrSkySPort_SendPackage(FR_ID_CELLS,(temp 20) | (temp 8) | offset); // Battery cell 2,3
}
break;

I never had an issue with Vfas so I'm not sure why others had a problem but the code change above in the original was what finally fixed it for me. I'm running firmware v2.0.8 on the Taranis and it's just fine now.

I would suggest that all those interested on this project should/must check the GitHub that Christian Swahn kindly shared here:

https://github.com/chsw/MavLink_FrSkySPort/releases/tag/1.4

Also, as a complimentary suggestion if some are also building custom Lua telemetry scripts, and if Christian won't mind, could also share them on the above GitHub.

Feel free to issue a pull requests if you find bugs or improves the code.

I pushed the lua telemetry screen i'm working on here:

https://github.com/chsw/MavLink_FrSkySPort/tree/master/Lua_Telemetr...

This is, however, a work in progress so your results may vary...

Just tried to push some items now, but I'm not sure that GitHub on my Mac managed to push some additional sounds.

I haven't received any request. At least I think so, this is actually the first time I use git...

that makes two :)

I believe I've managed.....

Would you mind putting a mention to this project on RCGroups on the thread about Lua Scripting ?

http://www.rcgroups.com/forums/showthread.php?t=2180477

This thing seems fantastic. So we can basically buy a Teensy3.1 and enjoy a telemetry link on the taranis directly from APM?

Is there a Pixhawk Teensy-less alternative?

Can anyone give me any insight as to what I am doing wrong here?


Arduino: 1.0.5-r2 (Windows 7), Board: "Teensy 3.1"
MavLink_FrSkySPort.ino: In function 'void setup()':
MavLink_FrSkySPort:121: error: 'FrSkySPort_Init' was not declared in this scope
MavLink_FrSkySPort.ino: In function 'void loop()':
MavLink_FrSkySPort:170: error: 'FrSkySPort_Process' was not declared in this scope

Well hard to tell u would have to get the Pixhawk to change the Telemetry output to what the X8R could understand! and then wire it correctly!

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service