Garmin LIDAR-Lite v4 LED - Distance Measurement Sensor

I have the LidarLite V4 hooked up to an Artemis Red Board with a QWIIC cable. I am using the example code that came with the library.

I am still a idiot with all this stuff. How do we put it into High Accuracy Mode?

I am looking at the Garmin Manual, and it says something about 0xEB and the intial value is 0x14.

I have no idea what that means or where to edit that in an Arduino program.

Also, I have this thing siting still on my desk pointing at a wall 40 cm away (using a tape measure). But I am getting readings of 45 - 46 cm. What gives? I was expecting something a lot more accurate than that.

The manual say this about high accuracy mode:

0x01 to 0xFF: Enable high accuracy mode. The value is used as the number of distance measurements to accumulate and average before returning them to the user.

I take that to mean the higher you set this value too, the more samples get averaged and that makes the final answer more accurate. Since 0x14 is the default, making that smaller would decrease accuracy and making it larger would increase accuracy. Unfortunately we don’t have examples for changing the accuracy, you’re going to need to write your own code to do that.

Also, I have this thing siting still on my desk pointing at a wall 40 cm away (using a tape measure). But I am getting readings of 45 - 46 cm. What gives? I was expecting something a lot more accurate than that.

Where are you measuring from, the back plate of the LIDAR or the lens? I’m not sure what Garmin uses as a zero point, my guess is it’s the lens and you’re measuring from the back of the unit. You might find that accuracy improves the further the object is from the LIDAR.

Does it become more accurate if you move the module a further distance away?

Also, sending the value 0xEB to the module would be done through an I2C write function. http://www.ti.com/lit/an/slva704/slva704.pdf, TI’s description of this process is lengthy but helpful. It is an advanced topic so fear not if it is difficult. We can’t directly advise software functions like this unless we wrote it, unfortunately.

Thanks.

I was measuring form the front (lens) side of the unit. And the unit isn’t 5cm thick, so it is still off if I claim that it is measuring from the back.

To make things worse, I was testing the longer range accuracy and ran into problems. The unit is set up on a table 284cm away from the wall that it is pointing at. The wall is a normal interior wall. It is painted drywall, nothing weird. When I turned on the arduino and checked the Serial Monitor, its telling me that the wall is only 32cm away. What? Come on. So I put the unit up on a brick to make sure it wasn’t slightly tilted and catching the table. Same result. 32cm. Next I had one of my kids stand between the unit and the wall. And now the serial monitor is kicking out results that make some sense. As my kid moves closer to the unit, the values go down. As he moves towards the wall, the values go up. But when he step out of the path of the “lidar” unit, the readings go back to 32cm. I put a big piece of cardboard on the wall just to make sure there wasn’t any classified “stealth” paint on the walls that was messing me up. Nope.

Oh and also, I bought TWO of these Lidar v4 units and they both act the same way.

I thought these were supposed to have a range of 10 meters.

https://youtu.be/nGWtL_FtSic

It reads distance up to 2.5m and then “starts over”.

What is going on?

Any ideas.

I have tried every distance sensor I can find. Are there ANY distance sensors that can measure distances of around 12 feet with a consistent accuracy of +/- 1 inch?

It seems to me you’re reading only one byte from 0x01 register. The first byte covers distance 0-256cm and the second byte (high byte) the rest. They have to be added together to get correct readings beyond 256cm.