Lidar Rangefinder for Pixhawk Cube

We have i2c 1 MHz. :slight_smile: It will be later. :slight_smile: Now we need to decide with Ardupilot Team how to add IO and multiplexer. So far, we’ve done a complete refactoring of the RangeFinder parameters. 64 parameters on all the boards are few. now Ardupilot support already 21 sensor. We have not added one yet. RangeFinder: refactoring parameter management by 256shadesofgrey · Pull Request #8816 · ArduPilot/ardupilot · GitHub

Problem is with sensor distance reading time, it is more than 20 msec so if you go sequentially its less than 5 hz for a 10 sensor unit , making avoidance a little marginal

20 msec is an unavoidable evil. :slight_smile: The rest is solved by tackles and readiness. The conveyor works. :slight_smile: Ardupilot will not wait.

I had to upgrade to the Beta version of ArduCopter for my liar to work

…bben using the Leddar one units with GREAT success…good for about 40m outdoors


…have a 3D printed case… rock solid altitude hold even crossing various terrain media

ptegler

Choppedxs,

I have been trying to get that LIDAR unit to work on the 2.1 since it was released. Like you I have never been able to get it to work, either I2C or Serial. I have bitten the bullet and ordered the LW20/C, hoping it will work, and work well with the IR lock system.

Cheers

Thanks for that note dellphs. Its nice to know its not just me. Hopefully you can let me know how you get on with the new one. I will also check out the Leddarone although I may need better range then 40m. Thanks ptegler.

Paul,

I received and installed my new LW20/C. At first I was having the same problem. I went with a serial connection in Telemetry 2 on my Pixhawk 2.1 because I am using the I2C for the IR Lock camera. After fiddling with the setting for several hours I had an Epiphany…The Telem 2 port doesn’t support 11520, which the LW20 is factory set to. So I swapped from Telem 2 to Telem 1 and voila, everything started talking the way it should. I have to wait til next weekend to test fly it, hoping the precision loiter and land work well. Don’t know if this will help your issue, but I thought I would pass the info along.
Cheers!

Thanks for that info. I am trying to get response from lightware as to why their SF10C is not working with pixhawk and if it goes nowhere I will purchase LW20. Good to know it works.

Hi @dellphs and @choppedxs,

I also have a LW20/C on I2C with the Pixhawk 2.1 cube. I’m having the EXACT same problems as Paul had, where I get absolutely nothing on address 102, but on address 85 I get the constant 163 m and 122 m readings.

Have either of you managed to sort it out? It’s connected on my I2C2 bus, in parallel with my MS5525 airspeed sensor (I have tried with the airspeed sensor disconnected, but same problem).

Any help or direction would be appreciated. Thanks!

Update:

I have managed to get the LW20/C working, but only on the GPS1 port’s I2C bus (the “external” bus, as specified in the PH 2.1 manual). Why would it work on I2C 1, but not I2C 2?

I ended up giving up and plugging the rangefinder into a on board computer and logging it there as was not using it for flight. I wonder if it only worked on the first port as that has more power then second. I know if u have rfd900 they say to plug into port 1 not 2 due to power issues. Good to know it works though.

That is interesting, it’s very possible that it’s the power supply of port 2 that’s insufficient (I already have two I2C airspeed sensors on I2C 2). I did test the current consumption of the LiDAR on port 2, and it was a mere 0.1 mA, which is not even close to what the spec sheet says. I just assumed it was idle and therefore not consuming power.

@tridge is it possible that the power supply of I2C 2 is not sufficient for a LW20 unit in parallel with other sensors? If so, please consider suggesting the use of I2C 1 in the plane docs (I had to hack into the GPS connector to access it on PH 2.1 though):

http://ardupilot.org/plane/docs/common-lightware-lw20-lidar.html

Thanks for all the good work!

I could never get both a flow (IR) camera and LIDAR to work using I2C, that’s why I ended up going with the serial connection for the LIDAR. Power could be an issue, but you would have to measure the draw while under load to really know for sure. I had previously used the I2C splitter and pumped power into it that I know was up to the task (tethered power with an available capacity of 80 Amps), yet still couldn’t get to work.

That is interesting. I have experienced a different issue with the Benekewe TF02 LiDAR over serial, some real black magic $hit, maybe you can give a fresh perspective on it:

Up to now, I can’t connect the TF02 to pixhawk 2.1 though I do anything that is included in wiki and change PIX mode as well. Would you show me your Lidar setup. Appreciate any help.

I would avoid I2C at all costs. It is not very noise immune so it can make your vehicle intermittently flaky/unreliable. Particularly if your flight controller is using the sensor to make decisions. I2C was designed for inter-chip ( on a single pcb ) communication and not for running over wires between devices.

rmackay9

FRED_GOEDDERT

Oct 3

Fred,

I’ve investigated the LidarLite PWM driver not working under ChibiOS. I’m afraid to say that this is a known missing feature of ChibiOS. It’s on the to-do list to add support for RangeFinders that output PWM but it’s unlikely to be done for the 3.6.0 release. It’s possible we will resolve this in a later point release (i.e. 3.6.1, 3.6.2, etc). Until then I’m afraid the NuttX build is the one to stick with if the LidarLite PWM range finder is a required.

+++++++++

I have not tested if it is now working in ChibiOs as a PWM connection. Under NuttX it is.

Today I build a cable to connect one of my LidarLite v3 to PH 2.1 to the I2C 2 connector . But I am also using for power a UBEC (5V) with a 680uF capacitor.
FW=3.6.3 chibios. I got it working immediately but the value is always about 25cm to high.
It was accurate with PWM connection in Nuttx.
I can live with that and will get my other Helicopter a new cable too because PWM connection with Lidar Lite is still not working in chibiOS.
Never mind.

Hello,
I have an opened PR so we can use the offset( feature on the analog rangefinder) and apply it to other rangefinders