Which Lidar are you using? I got the output range data from my Lidar successfully, my problem is the plane did not use range data during landing process.
I have rechecked the connectors, BEC voltage in PWM pins & tried the setup with firmware versions : APM:Copter V3.4.6 & APM Copter V3.3.3 but not getting the Sonar Range or Sonar Voltage values.
Attached is the log file generated from Mission Planner for your reference.
My drone type is a quadcopter and firmware is APM:Copter V3.5.0-rc6 (efab409b)
You mentioned, that you used I2C port, did you directly connected your Lidar Lite V3 with I2c or did you create a new connector with Capacitor and BEC connections?
@ak1801 Iam using it directly connected through I2C port, no BEC. Till now I can read the data successfully. You must notice that there are some changing of parameters in V3.5.0 from older firmwares.
@FireFly - Thanks for your response. Yesterday I tried directly connecting LidarLite V3 through I2C, unfortunately it didn’t work. I tried with RNGFND_TYPE = 3. Even tried setting it to 4 & 15, but no luck. Any other parameter change am I missing?
As mentioned in forums & docs, after making the connections I tried to test I2C using NSH console - using commands:
ll40ls info i2c ll40ls test i2c
but it said ll40ls command not found.
Can you share what are you getting after running these commands?
Just to make sure : Have you connected the Lidar on I2C and set rangefinder type to 15 ?
If you have an Arduino or a Raspberry Pi you can check if it works on I2C with the Garmin libraries
Note - I am connecting the lidar directly to pixhawk using I2C (without adding the capacitor but it is recommended as per the official manual)
I am now gonna try the new connections using PWM and will post the findings.
Currently, I am experimenting with both I2C and PWM. I read on the Ardupilot site that there were some bugs encountered with I2C for earlier versions of Lidar Lite and since V3 is currently supported in beta version only, I want to be handy with both the approaches.
Also, I would like to compare the results from both the ways to have a better understanding.
Cool then, keep us updated with the results,
I am curious to see how the 10 microsec/cm pulse width conversion will be handled compared to directly sending the values on the I2C
Thanks… Just wondering - are you getting Sonar Voltage with I2C?
I am only getting Sonar Range, not Sonar Voltage with I2C but I am getting both the values with PWM approach(added a 470 Ohm resistor).