Hi

I am trying to set up a LidarLite sensor from PulsedLight.

I set it up according to the wiki (new sensor, manufactured Feb 2015, interfaced with a Pixhawk)

http://copter.ardupilot.com/wiki/common-optional-hardware/common-ra...

In the wiki it points to the Flight Data Screen to test the sensor,

but I only get zero as reading in this window.

But if I check in the terminal,

I can see that the sensor is working (see attached file),

so is it working ok? Is the wiki wrong?

Thanks a lot,

Felix

Views: 9979

Attachments:

Reply to This

Replies to This Discussion

yes - the sensor has to be connected to AUX5 and AUX6 for PWM

Youtube SetUp Video

Thanks for the quick replies.

I have watched that video during my installation as well.

We are coming here close to midnight soon. I will let you know what I find tomorrow.

Thanks a lot

Fred

Sorry Fred for not getting back to your question earlier.
Yes as Felix already said, my mistake was to connect to the wrong output. Having corrected this along with the parameters set as described in the Wiki the Lidar works fine now.

And btw a BIG thank you to UAV Store and Felix for patiently helping me on my user error- that's what I call customer service!

Hi Felix

Sorry coming back to you so late.

Tonight I have tried with my second Pixhawk setup ( both trad. Helicopters)

and it worked by the first attempt.

Same setup, same cable, same LIDAR.

Still have to find  the reason why it did not work with the other  unit.

I herewith thank you very much for you help and time.

Fred

@ Felix and others:

I'm using a Lidar-Lite v2 connected via I2C, and I'm trying to make sense of the readings. It seems to me that there is a scaling being applied. I'm seeing similar readings in Copter 3.3 as well as 3.4-dev

Ruler (cm) Lidar (meters?) Lidar to cm (/100) Difference Scaling?
30 1.12 112 82 3.7333333333
60 2.3 230 170 3.8333333333
90 3.15 315 225 3.5
120 4.17 417 297 3.475
150 5.18 518 368 3.4533333333
180 6.23 623 443 3.4611111111
215 7.35 735 520 3.4186046512

The data certainly doesn't correlate well to the accurate, linear results Felix showed in his testing.

RNGFND_TYPE: 4

RNGFND_OFFSET: 0

RNGFND_FUNCTION: 0 / Linear (only required for analog I believe)

RNGFND_RMETRIC: 0 (only required for analog)

RNGFND_SCALING: 1 ((only required for analog)

Any idea what's going on here? I'm going to continue testing, as well as try PWM shortly.  Thanks!

Interesting. I am flying a LidarLite V1 on PWM with AC 3.3.2.
Measurements are pretty exact and I don't want to miss it anymore
I also tested a LidarLite V2 on I2C with the same Pixhawk running AC3.3.2 with similar (correct) measurements.
I have also set
RNGFND_SCALING = 1
RNGFND_OFFSET = 0
as you did.

Thanks for the details Stephan, 

I've just rewired my Lidar Lite to connect via PWM. Here's where things get baffling:

sonarvoltage reads what appears to be proper voltage levels to distance: IE: 0.80 v for 80cm. This looks great - however:

sonarrange for that value is reading 2.52. You would think I've got RNGFND_SCALING set to a value other than "1", but it's set correctly. Just as with i2c, there's some sort of scaling factor being applied - but I don't know what or where. I'm currently testing this on the Copter 3.3 release and have just reset default parameters and only set up the necessary Lidar params. 

I can set RNGFND_SCALING to somewhere around 0.33 and get more approximate values for closer distances , but the scaling factor doesn't seem totally linear.

I don't have a second Lidar, but I do have a second copter I will test this with to rule out something strange with this Pixhawk.

So I've connected this Lidar to another copter I have, currently running 3.4-dev. Using PWM, I see sonarvoltage and sonarrange both correlate well to actual distances.

So it seems the problem resides with my original Pixhawk, on a 3DR Iris+. I can't think what would cause the unusual scaling issue, especially over both i2c and PWM, and different versions of firmware with parameters restored to defaults before configuring.

I'll leave this here, just in case anyone else experiences this bizarre issue.

how do you supply the 5V to the Lidar sensor?
Can you maybe double check that the power supply is ok?

Felix, good thought - The 5V supply is looking clean, coming from a BEC. I think I just discovered the fix, posting below.

Problem Solved:

After considering the strange Lidar readings I was getting, even in PWM where sonnarrange did not match sonarvoltage were not from the following:

  • Bad Lidar-Lite (Works fine on other copter)
  • Bad Params (reset to defaults)
  • Bad Firmware (Tried different builds of 3.3 and 3.4)
  • Bad I2C/PWM (Same values on both)
  • Bad 5V supply (tested okay)

The issue was some sort of non-editable parameter and/or corruption in the Pixhawk's EEPROM.

To Resolve the issue:

I installed the firmware for APM:Plane, then reinstalled APM:Copter. By changing the vehicle type, the Pixhawk resets it's EEPROM.

Then I reloaded my parameters back in, and using PWM, my sonarrange and sonarvoltage values correlate now.

Definitely a weird one - I'll remember this fix for any other explainable issues. 

And just like that, I'm having the problem again. This time on the new copter using PWM (where data initially looked good on first boot).

Pretty dumb-founded on this one. I also switched to APM:Plane, where I'm seeing the same issue.

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service