Lightware LW20/c Range Issue


I am using a lightware LW20/c rangefinder on a Y6 hexacopter and I am experiencing range issues.

FC: mRobotics x2.1 - arducopter 3.7.0dev (problem occurs with 3.6.9 as well)
Rangefinder connection: Serial 4 - 115200 baud
Lightware LW20/c firmware: 1.6.4

The sensor works appropriately up to ~7.4m while flying, thereafter it quite consistently displays a reading of 1m. While testing on the ground, the unit works well over 7.4m (rated to ~100m) and only shows 1m when aimed towards the sky, or to a target over 100m away. I was able to get readings up to over 18m while attempting to fly over shaded areas of the grass, but this was not consistent at all. Could the sun-lit ground be reducing the range on this sensor over one order of magnitude?

I have been waiting for a response from Lightware’s support for almost 2 weeks now, thinking the issue may be with the sensor itself, or that they might know what the issue is. Due to the extremely delayed response, I decided I would see if anyone here has experienced this and if they may have any ideas.

Here are some relevant parameters:
RNGFND1_TYPE: 8 (LightWareSerial)
RNGFND1_MAX_CM: 9500 (tried 15000 as well)
SERIAL4_PROTOCOL: 9 (Rangefinder)

I will upload two screenshots showing the issue through RFND.Dist, as well as one log. Any help/insight would be greatly appreciated.


1 Like

That is a strange issue. Not sure if it matters, but how are you powering the unit? I have had the LW20/C behave strangely when it was not powered off of an external BEC (refusing to initialize, errant readings, etc).

Not saying this is the cause of your issue, but worth looking at

1 Like

Hi Chase,

I am extremely sorry that your request was not answered sooner. Could you let me know how you attempted to contact us?

As for your issue, there are a number of things that can cause the LW20 to report lower readings when attached to a drone.

Primarily we see parts of the drone itself (landing legs, etc) interfering with the LW20. Can you confirm that there is reasonable space around the front of the LW20?

Brian is correct in saying that power issues can affect the readings of the LW20, trying to power it through a separate 5V line would eliminate any issues there.

We have seen some LW20s that are slightly too sensitive and can be adversely affected by sunlight, could you detach the LW20 from the drone and see if pointing it at sunny areas shows any issues?

One other point is that we have seen the aluminium housing be bent far enough out of shape to cause a misalignment between the laser and receiver, if this is the case we will handle a repair for you.

1 Like

BRiskas - Thanks for the idea. I thought the same, and this was one of the first things I tried. Unfortunately, supplying the unit with its own power source did not change anything.

RobGowans - Thanks for the assistance. There is reasonable space provided for the sensor. The sensor is mounted on a boom, with at least 1.5 inches of horizontal clearance in all directions. Other sensors are being mounted in the same location with no ill effects. Could vibrations cause an issue like this? There is no vibration dampening at the moment. I was able to get 1m readings a few times on the ground by pointing the sensor towards some somewhat far-off sunny locations, but generally, I am not able to replicate this on the ground. I do not believe the aluminum housing is bent, unless this is not obvious when looking at it. The sensor is rather new and has not (yet) been damaged.

I had another project take priority, but was finally able to conduct some more testing this afternoon and found a couple of interesting things. First, I switched the serial baud rate to 19200 (from 115200). Apparently LW20/c units manufactured prior to mid-2018 use 19200 (mine is labeled as manufactured from 12/2018). This substantially reduced the erroneous behavior of the unit. In fact, out of 3 flights only 1 showed any erroneous altitudes, and the number of incorrect readings went down by about 90%. With this improvement, I figured I would try to change the communication protocol from serial to I2C. This produced a flight with the same general issue, but in addition to giving me two erroneous readings of 1m, it also gave me one reading of 264m, and one of 654m. It is an inverted erroneous reading compared to serial. I will include a graph showing the I2C flight. Also, I forgot to mention: before this testing I lowered the refresh rate to the lowest level (from 388 down to 48) and seemed to get only an extra 1.5m of altitude before the sensor would show 1m. This testing was all conducted using that lowest refresh rate. I will be conducting some more testing soon - any more ideas are appreciated.