LiDar Lite V3 on I2C Pixhawk 2.1 Setup

I’ve wired up a lidarlite v3 with the capacitor and a separate BEC that shares the ground with the I2C bus ground. All parameters are as suggested for settings (type 15, 20cm min 4000cm max etc) and its showing me a reading under status SONARRANGE. My question is why would the number it shows be so far off from what the actual measurement is of it sitting on it’s landing gear pointing at the ground?

-It shows a readout of 9.5 on the status page when it’s about 17.5 cm from the ground.

-As I pick it up and move it 40 cm away further from the ground it reads about 10.2.

Are the units I am seeing in the status tab representative of the actual height in cm? If they are what can I do to adjust them?

This would be a junky diagram of what i have going on. Anybody see any issues with it?

Looks good to me. The SONARRANGE on the Status tab should be the measurement in cm.

The user manual does say that the measurement is nonlinear below 1 meter. Also @nghiajenius noted that it’s very noisy below 30cm (at least the V3HP version).

How does it do with longer ranges?

1 Like

Thanks for taking a look, appreciate it. I figured I’d throw the voltages in there too in case that may be an issue I’m not aware of. I just took it out today to hop around. On the HUD the altitude read 9 meters, sonar read 17.62. I took it up to 21 meters and it read 30-31. This is when it worked. 3/6 times i had to land and power cycle for the lidar to respond and come off of it’s ground height number which is 9.6. It was also giving me “BAD lidar health” when it did that. I understand it’s no good up close but i figured the numbers would be changing more if it was in CM as I went up to 9 and 21 meters. Is it possible it’s a bad unit or maybe I’m missing something else here? I’d connect it VIA PWM but I have all those ports used up already, i2c is my best bet.

if you want to try PWM it works with Nuttx only. Read the answer below I had from Randy 22 days ago.



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.

1 Like

Ah thank you, I didn’t know that. It seems like for the features I’d like to have I’ll need to stick with chibi. The reason I cant use the AUX ports right now is because I’m running ESC telemetry and they have to be on the AUX ports for the telemetry line to work in the serial port from my understanding.

I just noticed this note in the LidarLite V3 wiki for ardupilot.

It is important to ensure that the ground from the BEC is connected to the ground on the servo rail.

Does this mean I should have the 5.05V bec negative connected to one of the servo rail negative’s or is the I2C negative enough?

I’m not a hardware guy but I would have thought that having the I2C GND connected is enough.

1 Like

Right? Plus it’s also connected to the second power bus so I don’t think I need to worry about that. I was directed to contact Garmin by the company I bought it from, I’ll have to see what they say.

I seem to have a similar issue like you. The measurments are way off by a constant of 9,24. I’ve tried offset in the parameters but they do no difference whatsoever. I’ve verified the function of the Lidar lite v3 by connecting it to an arduino uno board and there it shows the distance very well.

Did you get any response from garmin?

Ok I did get a hold of them and they said the I2C connection on the current version of chibi is unreliable and exhibiting errors. They suggested PWM wiring as that is known to work which was not an option due to the version i need to run and the ports available on my build. The seller wound up letting me return it and I grabbed up a lightware sf11c. My guess is you can wait it out for a fix or try rolling back the version and going with a pwm setup.


Really? So they’re pointing the finger back at AP’s driver under chibiOS? It’s possible but if so then that’s the first I’ve heard of the issue.

@Max_Drougge, could you try it using Copter-3.6.0 under NuttX? If it works under NuttX but not under ChibiOS then that would point to the Garmin guys being correct.

@rmackay9 Yeah thats basically what I was told. I mean I couldnt get the offset to work on chibi but honestly it shouldnt need an offset if it’s a good lidar. I was just overall disappointed with the product.

my lidarlite V3 was made august 2018 and seemed to have a scaling issue in addition to an offset error. Just all around inaccurate with the unit I received.

I have a Pixhawk 4 which I am trying to use a Lidar Lite V3 HP with. I have used a few different FW versions after 3.6.1 which I believe there was a PR to fix the Lidar using I2C.
I have the same wiring as per the wiki page including the capacitor and resistors. I have tested the Lidar using an Arduino which worked perfectly.
My problem is that I have not seen anything in Ardupilot (ie sonarrange) to indicate that the Lidar is detected and working.

I am using a Pixhawk 4 with I2C connected to the Lidar without using the I2C bus (ie I am connecting it straight to the I2C port of the Pixhawk4)

Is there a firmware version that includes all the changes made to make the V3 HP work?
David K

any news on this topic?
Having the same problem

I got mine going. Tridge sent me a special build of ardupilot because the one we all have access to doesn’t actually look for any rangefinders on the I2C port. The build I have been sent is supposed to have this included in the public version…but it never worked until the moment I used this “special” build. Thats a bit frustrating.

Also, don’t buy the Pixhawk 4. Thats just a marketing name that Holybro registered. I would suggest any of the Cube devices as they are not copies but actual devices made by actual people who understand the system. They have Michael Oborn working for them now too.

Hope that helps (I kow this will because it worked so well for me!)
Thankyou Tridge for your help :slight_smile:

David K
UAV Engineer/Aerosmith

Yeah thats what garmin told me months ago. By the time I had figured out it was the build I had already spent a fortune upgrading to a lighware SF11C

what exactly the issue with I2C and DC grounding?

I just know it was crucial to wire in the capacitor like in the diagram on the wiki and make sure it has enough power. I had several issues caused by a bec that only put out 3 amps and wasn’t enough to drive the lidar and the flight computer/ radio receiver. Wiring the lidar to it’s own power supply eventually solved the issue of not receiving any numbers on the status readout under lidar. The separate 5v power source will take the place of the +5v lead out of the i2c cable but the second power sources ground will have to be shared with the i2c cable’s ground.