Servers by jDrones

[Not Quite Solved] TF-Luna (Or any Rangefinder ?) creating bad connection between Air and Ground units ( Mavlink ?)

@DonLakeFlyer , @ibrahimqazi ,@ppoirier Hi Experts,

I’m having massive issues getting TF-Luna data ( 3x Luna on I2C on Pixhawk ) to mission planner and Qgroundcontrol over Sik Radio(s) .
The TF-Luna’s are connected as Rangefinder 1 , 3, ,and 7 in Arducopter.
I tried 433 , 915 , and 2.4Ghz none of them work .They connect then disconnect all over again and when connected data is so slow that loading data in Mission Planner or Qgroundcontrol takes about 15 Minutes. .

I tried all different speeds for the Air Units and Ground Units and also on the Pixhawk board ( Serial 0 and 1 ).
No problems however over usb connection , not even on 9600 Baud.Data loads in seconds and Rangefinders 1,3, and 7 are visible and working Fast. ( In Radar Screen of Mission-planner , no data in sensor overview).

Tested the different Grounds and Airs connected to two PC’s and used TeraTerm to send a large file from one Pc to another and got speeds of 13000 Baud.
I can’t seem to reach this on Mavlink protocol .
see attached schema.

1 Like

Hello,

I had the setup still handy, so I hooked up the POC2

And tested on USB -direct, ESP-01 on WIFI with UDP and SIK on 915 Mhz
Here are the results

USB, a little slow on the refresh but I can get RADAR @ 16 Hz

ESP-01 on WIFI with UDP (@115 kBps) , about the same result

SIK on 915 Mhz (@57 kBPS) , a lot of latency and buffer overflows when trying to display,. Please note that I am using cheapest SIK with no handshake (CTS- RTS).
This screenshot was taken just after parameters received and it display once or twice beffore getting stucked and the frame rate was 0.3 HZ

Make sure the firmware on our devices are up to date so they can coerrectly transport MavLink messages.

Hi Again , PPoirier !,

Useful to see your data ! Thanks .

I see one big difference in our setups when i’m right ?. I don’t use an Arduino in between sensors and Pixhawk . I changed the I2C addresses of the TF-Luna’s and connected them all to the Pixhawks I2C port. But however i see the same effect !.

Regarding distance_sensor data i checked this on USB connection because up till now its not possible on 433Mhz ,915Mhz ,or 2,4 Ghz radio.
On Usb connection i see realtime changing of distance on all sensors and a lot more data (64Hz and 1592bps) ! then in your case . See Picture.


But even this total data being send is ~ 5000bps ( not that much ) and should be possible on Sik ?! .

This is already confirmed by setting the USB to Pixhawk link on the slowest possible speed of 9600 Baud.

So i started testing the real air speed of the 915Mhz @ 9600 PC to PC ( slowest ).


This was ~1090 Bytes/sec = ~8700bps =already enough for the data i’m sending.

On 115200 Baud i get a transfer rate of: ~100000bps
image

So…that’s the reason why i started this threat .

-I,m not suspecting air_speed is the problem anymore.
-I thought about using an Arduino or/and I2C multiplexer but am pretty sure now it will give me the same problems.

1- even on slow speed usb to Pixhawk , all works like charm real time.
2-on higher speed than Usb direct connection , it does not work on SIK.

What could be the cause of this ?. I suspect some kind of translation mixup from Mavdata to Air data and back ?. Or maybe my 3 sensors being seen as one when using SIK Radio ?. Realy need some help here .

The TFMINI S are on I2C bus with different addresses (the Arduino was used on the POC1) the difference in Hz is probably caused by processing power; the above tests are with a pixhawk

As I wrote before the 915 MHz SIK radio get flooded by distance messages this is why we switched to WIFI telemetry like the ESP01 demonstrated above

Hi Thank you again ,
So your saying even though air_speed is enough to send and receive all my data "

the Sik radio’s get flooded with data

"?. I’m not expert enough to understand this ?! . Is it a hardware issue ? in your opinion ?
As mentioned , i also used 2.4Ghz and had the same issue .

Adding the hardware handshake CTS-RTS would probably help but my radios don’t have these pins exposed.

As for WIFI, I flashed ESP-01 according to WIKI https://ardupilot.org/copter/docs/common-esp8266-telemetry.html
and it works OK

So , it could be a SIK radio problem . A translation issue i mean. My 2.4Ghz is based on 3DR Radio. You took the 3DR/SIK Radio part out of the equation.

As demonstrated above, I could get some Distance messages from SIK before it got jammed by traffic overload.

The ESP-01 solution is pretty cheap as you can get a pair of radios and programmer for less than 10$ And it works up to 400 Meter

Hi ,
Thanks for discussing this , really appreciate it.
I did an other test USB 9600 Baud…no problem at all , fast loading and response of the TF’s in mission planner. (will upload a video link ).
So it’s not too much data being send that causes the problem ( edit -I was wrong here ! see below-to much measurements :face_with_monocle: ) , speed is most certainly not the problem.

I agree with you another way of sending the data (NOT SIK ) would overcome my problem probably.
I would however rather have this problem where Sik /3DR radio is not able to send this data solved.

In this way i can use my long range 915Mhz as i would like it. And use it for my Mavlink controller in near future.

So this is where the help is needed i think .getting existing hardware working ?.

If you have the V2 release, you can try to implement hardware handshake using the RTS-CTS
I am pretty confident that this will make the radio work much better as the handshake prevents buffers overload.

Other options would be reducing the distance message rate as as you can see, it generate a lot of data.

Hi I do have a 433Mhz , V2 lying around .
I will test it with RTS-CTS.!

EDIT- No change in result when using RTS-CTS
EDIT-2 - With a little help i got a luna on 40Hz and 10Hz ( one active on drone ) this made no difference also. (EDIT-3- Luna did not stay on 40Hz or 10 Hz cannot save settings )

Up next , direct serial connection Pix- > PC

Direct serial works
Did you enabled CTS-RTS on serial port?
Please confirm that firmware on radio is up to date

Yes tested with CTS-RTS as mentioned above , it did not solve the issue.
I’m running V2.0

So there is a way to reduce the data the Luna’s send over Mavlink Sik Radio
It’s in the planner Tab of mission planner under sensor rate.

Mine was 8 = 64Hz , reduced it for test to 1 = 8Hz.
8Hz is still 8x100 measurements /sec/Luna.!!
Other sensors like esc’s in my case are also affected by changing this setting .

Reducing the 100Hz of the Luna’s to about 10Hz could be an option to not block Mavlink traffic.
But it’s a shame to compromise on what the Luna’s are capable of just to un-block the Mavlink data stream.

I tested a direct serial connection between Pixhawk Telemetry 1 and PC-Mission-planner.
To my surprise this gave the same results as Sik Radio.

So one could say , the Luna’s just produce to much data for Mavlink Telemetry ports apart from the Serial0 (don’t know why other then less devices active).

As a solution i would like an option where one could set amount of packets being sent per sensor or some kind of divider "send 1 of 100 (rangefinder) measurements ".

Any help here on that ?.

Could you test your setup on sensor rate 8 ? on USB . ( planner TAB in mission planner ).
Ill think you get an easy 64Hz there,

Yes, and it is on a serial port … sensor rate set to 9 and fluctuating between 60 - 72 :wink:

1 Like

@ppoirier , Is this Wifi -Serial or Cable PC-serial ?

Câble, because you wrote it didn’t work

@ppoirier,
Something’s coming i found the (my) solution !.
I already send 2 Luna data with lightning speed over 915Mhz Sik Radio. :slight_smile: Its surprising and cant explain it completely.

Oh… interesting !
Standing by for more :slight_smile:

Servers by jDrones