Page 10 of 20

Re: Adding MAVLINK support

Posted: Thu Mar 10, 2016 2:02 pm
by LTMNO
I have updated to this version... on both ends...
Glad to report that Cells are working. Diagram updated to reflect setup.

ersky9xProvR219h.zip
27-Feb-2016 15:52
Add option for Mavlink 'Copter/'Plane

APM_Mavlink_to_FrSky.zip
27-Feb-2016 15:52
Add extra info to Temp1 - 'Copter/'Plane?

Re: Adding MAVLINK support

Posted: Thu Mar 10, 2016 11:16 pm
by RCHH
From memory, when I ran this on the X8R, I grounded D4 to the ground on the Arduino bottom left, not via the X8R S.Port ground - and all worked as advertised ...

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 3:42 am
by LTMNO
RCHH wrote:From memory, when I ran this on the X8R, I grounded D4 to the ground on the Arduino bottom left, not via the X8R S.Port ground - and all worked as advertised ...
Its probably better doing it your way as you don't create a GND loop.
But that being said.. I had a servo wire connected to the S.Port and I just removed the (+) pin and shifted over the GND on one end. This way I can have more grabbing the X8R and the Arduino. This will stay on better then just one lead. I never soldered anything to the Arduino.

Image
There is an Telemetry Distribution Board on the Top to split out the Telemetry lines for other devices...

Image
Arduino had pins connected thru the back...

Image
2 Pins grabbing onto the X8R.

Its all working... if I experience no GND loop problems, I will keep it like this. If I remove the GND wire to S.Port then I just loose the Cells.
:D

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 6:42 am
by deuce
Hello,

I saw someone successfully implemented MAVLINK_to_FrSky mod (RCHH if im not mistake) utilizing D8R-XP receiver and 9XR-PRO. So I thought it might work base on what I have, unfortunately, it didn't. Here's what I have

MINI APM PRO, APM 2.6
D8R-II Plus RX
Ardruino Pro Mini w/ atmega328, 5v, 16m
- (flashed with APM_Mavlink_to_FrSky.zip
13-Feb-2016 20:56)

9XR-PRO
- (flashed with ersky9xProvR219e.zip
11-Feb-2016 18:14
Fix bug in 6-pos calibration
First test for Mavlink
Add Spanish language)

soldered and connected leds as follows...
https://goo.gl/photos/oRo1D6NRUCLfYMKs6
https://goo.gl/photos/4kpcgB1TDZbABu5r8

however, nodata is diplayed in the TX
https://goo.gl/photos/Q1AYvR2Tcc21VfKG7

is this even possible? or it only works with receivers that has SBus port?

Cromwel

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 9:27 am
by MikeB
Please flash the 'PRO with the most recent test version of the firmware (ersky9xProvR219i.zip). It is also worth updating the Pro Mini to the code from 27th Feb.
Also, in the Telemetry menu, did you set the "Usr. Proto" to ArduC?

Mike.

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 10:17 am
by deuce
Mike,

At first, I actually tried flashing both from your latest source codes and binaries but didn't got any results.

ersky9xProvR219i.zip
03-Mar-2016 23:26
Add extended MULTI protocol settings

APM_Mavlink_to_FrSky.zip
27-Feb-2016 15:52
Add extra info to Temp1 - 'Copter/'Plane?
(210.9 KiB) Downloaded 36 times

So I just thought the first/older source codes and binaries might work and it doesn't hurt if I try it anyway. Unless if I miss something.

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 11:02 am
by MikeB
In the Telemetry menu, did you set the "Usr. Proto" to ArduC (or ArduP)?
Have you configured the baudrate on the APM to 57600?

A couple of tests/checks:
1. Are you seeing a RSSI value (checks telemetry is being received from the receiver).
2. Set up a custom telemetry screen to include "TmOK". Does this show a value of 0, 1 or 2?

Mike.

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 11:53 am
by deuce
MikeB wrote:In the Telemetry menu, did you set the "Usr. Proto" to ArduC (or ArduP)?
Have you configured the baudrate on the APM to 57600?

A couple of tests/checks:
1. Are you seeing a RSSI value (checks telemetry is being received from the receiver).
2. Set up a custom telemetry screen to include "TmOK". Does this show a value of 0, 1 or 2?

Mike.
Mike,

Re-flashed 9XR-PRO and Adruino with your latest source-code and binaries. Unfortunately, I still got the same results.

UsrProto is set to 'ArduC'
APM baudrate has been set to '57600'
RSSI has a value of '0'
TmOK has a value of '0'

Cromwel

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 12:02 pm
by MikeB
Ignore MavLink for a moment, you are not receiving any telemetry from the receiver at all.
What Tx module do you have in the 9XR-PRO? From this we can check your settings and telemetry connectivity on the Tx.

Mike.

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 12:11 pm
by deuce
Mike,

Could it be that my tx module is not capable? Anyway, im using FrSky DJT w/ Telemetry tx module.

Cromwel

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 12:26 pm
by MikeB
The DJT will work fine.
How are you connecting the telemetry from the DJT to the 9XR-PRO?
There are two ways this is usually done.
1. Connect from the connections on the back of the module to the Futaba trainer socket, then set "FrSky Com Port" to 2 in the telemetry menu.
2. Modify the DJT to send telemetry on the bottom pin (pin 5) of the module connector, then set "FrSky Com Port" to 1 in the telemetry menu.

Mike.

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 12:38 pm
by deuce
Mike,

I think that's what I don't have. Im much geared on modifying the DJT module since it takes time before it gets to me if opt to purchase the cable. Can you please point me to any resource/link to do the necessary modification in the DJT module?

Cromwel

Edit: nvrmnd. just saw it in the 9XR-PRO manual. I'll keep you posted. Thanks!

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 2:03 pm
by MikeB
I assume you are reading "9XR Pro Introduction to the Hardware.pdf".
To get telemetry on the 'PRO you may just add the connection from the Tx pin to the bottom pin of the module connector (with the resistor in it). You don't need the Rx connection of the schottky diode to get started. The schottky doide is only needed if you are likely to put the DJT into a FrSky Taranis Tx.
The Rx connection is only needed if you need to set the internal alarms in the DJT.

Mike.

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 2:37 pm
by deuce
Mike,

Yes, so I just need 4700 Ohm resistor from the TX pin to the bottom pin of the module connector, noted. Hm... I have couple of 4000 Ohm resistor lying around. Would that be enough? Or it must be 4700 Ohms?

Cromwel

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 3:01 pm
by MikeB
4000 ohms will be OK.

Mike.

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 3:44 pm
by deuce
Mike,

My bad what I have is 500 ohm NOT 4000 ohm. I guess I'll have to wait till Monday before I can grab a few.

Cromwel

Re: Adding MAVLINK support

Posted: Fri Mar 11, 2016 5:02 pm
by MikeB
If you don't want to wait, it is safe to use TWO 500 ohm resistors in series for testing, and replace them with a 4K7 when you have one.

Mike.

Re: Adding MAVLINK support

Posted: Sun Mar 13, 2016 4:15 am
by weldmonkey
So does this only work on a Arduino Mini/Pro?

I thought someone had this working on Teensy, but I cant get it to load on my Teensy 3.2.

I have been playing around with this on a Teensy:
http://www.rcgroups.com/forums/showthread.php?t=2538011

Didnt show much on OpenTX (On a 9xr Pro), I am guessing because its geared more for the Taranis. I do get some Telemetry on the your latest ersky9x build:

RSSI
Voltage
Heading
Alt

I think thats about it, but I havent armed outside to see if Armed status message changes or if it shows GPS data.
Im pretty good with the lighting code, but thats simple. I am far from a programmer.

I look forward to this all working.

Re: Adding MAVLINK support

Posted: Sun Mar 13, 2016 9:22 am
by MikeB
I have only written code for the Arduino Pro/mini. I don't have a Teensy so I can't do anything with code on that.
The Arduino code is specific to the AVR processor.

I have tried to handle the data from the Teensy, but not having one means I can't test it.
You may be able to find what values are available by using the debug display, see this post:
viewtopic.php?f=7&t=8396&start=60#p110944.

Mike.

Re: Adding MAVLINK support

Posted: Mon Mar 14, 2016 12:34 pm
by weldmonkey
Thanks Mike, I will keep toying with it. If I come up with anything I will share it. If I get a few extra bucks Ill send you one.

Thanks for all you do sir

Re: Adding MAVLINK support

Posted: Mon Mar 14, 2016 4:16 pm
by deuce
Mike,

After soldering a 4700 resistor as per your instruction, looks like the latest source code and binaries works like a charm.

https://goo.gl/photos/M95xq1rn4xao1ZuS6
https://goo.gl/photos/Upez42UoCQsfsTGv5
https://goo.gl/photos/7Y8RoakLWymAvfWD8

Thanks!

Cromwel

Re: Adding MAVLINK support

Posted: Wed Mar 16, 2016 5:34 pm
by MikeB
I've posted new test versions of ersky9x, and the Arduino code. These should support airspeed, although I'm not sure whether the units will display correctly.

Mike.

Re: Adding MAVLINK support

Posted: Wed Mar 16, 2016 9:38 pm
by tomismrkolj1
Tnx for new verison Mike.
I will try it over the weekned if the weather gets better.
There is so much wind lately...

tomi

Re: Adding MAVLINK support

Posted: Wed Mar 16, 2016 10:11 pm
by conicio
Thank you very much for your excellent work and kind support Mike. Uploaded to the Mini Pro.
May I use the same config with a pixhawk? And, if possible, how do I have to connect?
Thanks a lot

edit: After flashing r219j I'm unable to USB connect to my mac. Even if I set the SD off the eeprom doesn't mount as a disk
re-edit: even if i get out the SD card it won't connect

Re: Adding MAVLINK support

Posted: Fri Mar 18, 2016 3:58 pm
by tomismrkolj1
Hi,

i tried new firmware version on mini pro 16k and 9xrpro. Airspeed does not work. Value Aspd stays at 0 all the time, eventhough apm shows normal airspeed fluctuation (1.3 to 1.8 m/s) through Mission Planner. Other telemetry displays normally on 9xr pro display, so mini pro does work.

tomi

Re: Adding MAVLINK support

Posted: Fri Mar 18, 2016 4:43 pm
by MikeB
conicio wrote:Thank you very much for your excellent work and kind support Mike. Uploaded to the Mini Pro.
May I use the same config with a pixhawk? And, if possible, how do I have to connect?
Thanks a lot

edit: After flashing r219j I'm unable to USB connect to my mac. Even if I set the SD off the eeprom doesn't mount as a disk
re-edit: even if i get out the SD card it won't connect
I don't know anything about the pixhawk. If it sends normal MavLink data then it is likely to work.

Did you update the bootloader when you flashed r219j? If not, then nothing should have changed regarding the bootloader connection over USB.

Mike.

Re: Adding MAVLINK support

Posted: Fri Mar 18, 2016 4:44 pm
by MikeB
tomismrkolj1 wrote:i tried new firmware version on mini pro 16k and 9xrpro. Airspeed does not work. Value Aspd stays at 0 all the time, eventhough apm shows normal airspeed fluctuation (1.3 to 1.8 m/s) through Mission Planner. Other telemetry displays normally on 9xr pro display, so mini pro does work.
Are you using hub or SPort?

Mike.

Re: Adding MAVLINK support

Posted: Fri Mar 18, 2016 6:30 pm
by tomismrkolj1
I am using SPort of x8r.

tomi

Re: Adding MAVLINK support

Posted: Fri Mar 18, 2016 6:39 pm
by MikeB
The Arduino code is now on Github:
https://github.com/MikeBland/APM_Mavlink_to_FrSky.

I may have a divide by 100 that is not needed in the SPort code. It could well be that 1.8m/s is being sent as 1, the divided by 100, so you see 0.
The code on Github has this /100 removed, but I haven't built/tested this yet.

Mike.

Re: Adding MAVLINK support

Posted: Fri Mar 18, 2016 7:45 pm
by tomismrkolj1
Hi,

tested the new code from github. Aspd still 0 on S.port x8r, mini pro 16, 9xr pro.

tomi