How to connect Lidar Lite v3 to Pixhawk PWM?

Has anyone been able to see data in mission planner after connecting the Lidar Lite v3 to Pixhawk using PWM? I set RNGFND_TYPE = 5; RNGFND_MAX_CM=4000; RNGFND_MIN_CM=20.

As I’ve asked you in Gitter, why are using PWM instead of I2C?

I can’t help much here, other than:

Garmin Lidar Lite v3 works fine in I2C mode.
In order to make it work on a QuadCopter , you need 3.5 rc2 and set the rangefinder type as 15
Once you reboot you will be able to see the numbers with Mission Planner by looking at the rangefinder configuration menu or on the status under ‘‘sonardistance’’.

I am currently flying PX4 OpticalFlow & Lidar Lite in a GPS denied environment and it works like a charm.

were you able to have stable hovering? I am working on indoor as well and I am having issue with getting the quadcopter to have stable hovering. Therefore, I am going with APM. @ppoirier could you give some info about your connect wise using I2C. You must have I2C hub as Px4Flow also uses I2C.

I am connecting to PWM as I will connect the Px4Flow to I2C.

Lidar work great in I2C. I made a simple hub using perfboard and straight header connectors, and hooked the Clock & Data lines to 2.5k pullup resistors to Vcc

Hi, has anyone able to do this using PWM in PixHawk?

Hello ppoirier,

Can you please send a connection diagram?
In addition, is it possible to connect the Px4Flow or any other device to the I2C (using a hub)?

Thank you very much
Rotem

Here a simple hub you can build using 2 x 2,2 kilo- ohm resistors & 1 x 600 (or more ) micro-farad 10 volts electrolytic capacitor

Hello ppoirier,

Thank you very much, I will try it…

Is it working well with the external compass ('Using I2C HUB)?

Regards
Rotem

Yes it should be, as long as all the I2C devices have non conflicting devices address, they can share the data line.

After different attempts, connecting a Lidar Lite v3 (Date of Mnfg: 10/2016) using PWM on a Pixhawk has been unsuccessful. I have soldered the 470 Ohm resistor according to the ardupilot docs. Params were changed in Mission Planner 1.3.48 (Arducopter 3.5.0-rc8). Although the wires are different between the Arducopter docs and [Garmin’s datasheet] (https://static.garmin.com/pumac/LIDAR_Lite_v3_Operation_Manual_and_Technical_Specifications.pdf), this has been accounted for.

Are there any other steps not mentioned above to get this setup working?

I have the same problem with lidar V3 and Pixhawk 2.

1 Like

Hi,

my lidar is showing wrong height. Sometimes it is 0.35m , other times 0.57 m when it actually should say 0.2 m.

When turning off and on sometimes it gets fixed, other times it doesnt.

Also, there is significant variance when the quad is sitting on the ground, around ± 10cm variance.
Is this normal?

RNGFND_ADDR = 15
RNGFND_GAIN = 0.5
RNGFND_MAX_CM = 4000
RNGFND_MIN_CM = 10
RNGFND_PIN = -1
RNGFND_TYPE = 3

Hello,

@ppoirier, why did you create this board?
Did you have bad results with the official 680 uF capacitor?
I am trying to do the same thing through I2C but I have lot of variance and an offset of about 20 cm…

Even if I change parameter RNGFND_OFFSET, I got not good result.

Thanks for sharing your work and have a nice day!

This board is a DIY I2C hub, because I need to share the bus with the px4flow
According to my experiment , minimum reading distance is 24cm

This link has all the information needed to know: https://www.lambdrive.com/depot/Robotics/Controller/Firmware/ArduPilot/LIDAR-Lite.html

Thanks for your response @ppoirier!

I have also followed this link and even with all these parameters and beyond one meter, I always have about 20 cm offset.
It is nothing for a drone and I can fly with that but I wanted the precision that the product page was showing.

After, I found a github page about zeroing Lidar Lite product. I will give it a try as soon as possible…
My last question is, what did you get in precision with your Lidar?

Have a nice day and thanks again for your help!

Cool,
Keep us updated with this zeroing procedure (please show the link).
I have to admit that I never really challenge the precision of the Lidar, I am just checking with the usual 2 Meter test (grab the quad and raise 2m up to check correlation with altimeter)

hey
do you guys have any idea how to permanently change the i2c address of the lidar lite v3?
thanks :slight_smile:

Procedure on p5 of manual https://static.garmin.com/pumac/LIDAR_Lite_v3_Operation_Manual_and_Technical_Specifications.pdf