LW20/C Laser altimeter

As a side note, Copter-3.6.7 includes a change that should improve the lw20’s ability to decide whether it should be in I2C or Serial mode.

Just as a note for anyone looking at this in future. It appears that only serial communication is broken in ArduCopter 3.6.6, the I2C still works there.

Rob. I am using the LW20 successfully with copter 3.6.6 on NutX, however I added a time delay relay between the lidar and the pixhawk that allowed the lidar to be powered on roughly 5 seconds after the pixhawk is powered. The lidar is powered separately from a 5V BEC.

Hi All,

I am using the LW-20B right out of the box. I am connecting it to a px4v2 board and my i2c values are all messed up. They are nowhere near correct. Should upgrading the firmware solve this @RobGowans ?

Hi Evan,

Can you describe the values you are seeing?

We also have a guide here that goes through updating and enabling an extra Pixhawk compatability mode here: https://github.com/LightWare-Optoelectronics/pixhawk-guide

Hi Rob,

I followed everything in that guide. And now it works just fine!

Thank you so much!!

Evan

Good to hear! Thanks for letting me know.

I think you should take out the 100 meters max range from the setup guide and put a much more realistic 60 meters. I tested it on any kind of surface, from tarmac to grass, from white walls to black, from absorbing superficies to reflective and 60 meters is what sf20 lidar can realistically read. I have 2 of them and both are giving same 60 meters performance.
I write this because people, like me, could think their unit is defective and under performs :slight_smile:

If someone had better result please share setup.

I have LW20/B and I had the same problem of 0.0 Sonar Range using I2C on a Pixhawk 2.1 with APM 3.6.9. I got the FTDI and upgraded the FW to 1.8.1. I think it was originally 1.6.0 (?). I changed Pixhawk compatibility mode to on. It seemed like all of that was successful. When I try the Lightware Terminal using the FTDI the operate function it shows the sensor working properly.

I cut off the FTDI and put the Pixhawk connector back on, but I still have zero sonar range,

Hi Thomas,

I have confirmed that the LW20/B (1.8.0) is compatible with Pixhawk 2.1 Ardupilot 3.6.9 (ChibiOS).

Can you confirm you have set the RNGFND_ADDR to 102 and the RNGFND_TYPE to 7 (LightWareI2C)?

It is also possible that there is a power draw issue. Can you try powering your LW20 with an external 5V power supply?

Yes. The esettings are as indicated. From reading this forum, I was led to believe that the power draw theory had been debunked. I’ll try that.

I added a 5 volt BEC to power the sensor. Now I only have the yellow and white connected to Pixhawk I2C and black and red to 5 volt power. I checked and there is continuity from the black lead to I2C ground.

Still zero Sonar Range.

Hi Thomas,

Is it possible for you to try the NuttX version of Ardupilot 3.6.9? I’ve been speaking with and Ardupilot developer about possible issues with the ChibiOS version.

It works with Serial 4. I don’t think that’s going to be helpful since I ultimately intend to use it with a Pixhawk mini using I2C. Also intend to use it with Hereflow sensor which will require 3.7.0. I’ll try it. How do I get the NuttX version 3.6.9?

Hi Thomas,

The NuttX version of ArduCopter 3.6.9 for Pixhawk 2.1 can be downloaded here: http://firmware.ardupilot.org/Copter/stable/PX4/ArduCopter-v3.px4

We have found (and fixed) a bug in the LW20 Serial driver that can lead to the reported distance dropping to 1m if the lidar goes out of range. This only happens if the serial interface is being used, if the I2C interface is used there is no problem.

Really sorry about this bug and a fix will go out with Copter-3.6.11 which we plan to start beta testing no later than next Monday.

1 Like

That change is usefull for SF11 too? I have in analog port.

1 Like

Hi @cala2,

The issue is only with the Lightware serial driver so no change if the lidar is connected using I2C or analog.

1 Like

Hi~ @RobGowans
i want to use mutil-lightware by i2c bus,
LW20/C version is 1.6.4 i2c addr 105
SF20 version is default addr 102 and ArduCopter V4.1.0 , pixhawk4 mini
i use single SF20 or single LW20/C is work.
but use SF20 and LW20/C at the same time, sometime is work ,sometime isn’t work.
I have Connected pixhawk4 mini RC_IN port +5v to i2c bus, ensure sufficient current,
Do you have any suggestions? thanks~

1 Like

Hi @WangLouis,

Please can you forward this query to support@lightwarelidar.com

They will run with some troubleshooting steps with you there.