1

I am trying to connect my Garmin LIDAR Lite v3 sensor to my Raspberry Pi 3B+ via i2c interface. However i2cdetect on the command line returns dashes for every address.

I'll try my best to clearly define my current progress.

RASPBERRY PI:

Raspbian Stretch With Desktop
    Version: June 2018
    Kernel Version: 4.14
I2C Configuration:
    Installed i2ctools.
    i2c activated in raspi-config
    boot/config.txt file shows i2c_arm=on
Connections
    Currently connecting gpio pin 3 (SDA) to the blue wire, pin 5 (SCL) to the green wire.
    gpio pin 4 (5V source) to red wire, pin 6 (GND) to black wire. 

Pin layout on Pi: https://www.raspberrypi-spy.co.uk/2012/06/simple-guide-to-the-rpi-gpio-header-and-pins/#prettyPhoto/0/

LIDAR Lite v3:

Observations:
    Connected (w 10v470uF capacitor instead of recommended 680uF) according to https://i.stack.imgur.com/LaNj9.png
    Faint red light flashing (can be seen in a crack next to where the colored wires are plugged into LIDAR)
    Red and black wires are supplied 4.95V
    Blue and green wires are supplied 3.26V 
    Capacitor polarity is correct

Here an image of set-up: https://drive.google.com/file/d/1oF645dk09v5GRPeecGbqQOj3-Qm11i8B/view?usp=sharing

When I run "i2cdetect -y 1", I get dashes for all addresses: https://drive.google.com/file/d/1csh1fjeKv_HbvK-B8JfrbbANgB9CXFdv/view?usp=sharing I should be getting a result for the LIDAR Lite address 0x62

What I've tried:

Reinstalling Raspbian image.
Downgrading kernel (which caused my pi to not start up)
Using Bus 0 (may have not set it up correctly)
running i2cdetect with -r and -q flags instead
external 5v power source (my flashing red light turns into a steady red light)
Removing the capacitor
I get the same result every time. There is a possibility that my LIDAR Lite is broken. However, it is an expensive piece of equipment and would like to make sure I exhausted all potential fixes.

Here are some extra images of my wiring. RPi: https://drive.google.com/file/d/1sQFHfUe47wVfkuCW_w15IdsQj9IRb06Z/view?usp=sharing Breadboard+Capacitor: https://drive.google.com/file/d/1TYUvaMEXo6l7QUFGCtJapu06RPNz67kc/view?usp=sharing LidarLitev3: https://drive.google.com/file/d/1LE0W02lPsnpR3-cD00G9x3Mn6G5Vjesb/view?usp=sharing

  • Maybe it's an artifact of the picture, but it looks like the green wire is going to pin 7 rather than pin 5. – NomadMaker Jul 5 '18 at 18:42
  • Yeah the picture is a little unclear. It is going into 5. – ZooHe17 Jul 6 '18 at 12:53
1

It is possible to make it work with the PI3 B+. It turns out that there is a new mode implemented in the i2c_bcm2835 driver, which is used by default on the PI3 B+, and which now supports a "repeated start". However, the lidar lite v3 does not handle this, and it keeps returning 0x00 with every read. So what you can do is restore the old i2c driver called i2c_bcm2708. You can do this by editing the config.txt file found inside your boot partition. There add a line:

dtoverlay=i2c-bcm2708

Save and reboot, and now "lsmod" should not list "i2c_bcm2835" anymore. However, don't let yourself be fooled by i2cdetect, because in my case it did not show the 0x62 device address. However, when talking to the device using 0x62 it did respond okay and gave correct distance measurements. So it really works.

0

It turns out the LIDAR Lite v3 (LLv3) is most likely broken. I tested on the Arduino through a well documented process and got the same result. I am sending it back for an upgrade to the LIDAR Lite v3HP instead. I have some advice for future users of this sensor:

  1. Do not use the Lidar Lite v3 and Raspberry Pi 3B+ together Until patches to the kernel are released, there are i2c interfacing bugs between the two. The pi allows for something called repeated starts while the older LLv3 does not accept this. This may result in some pretty nasty bugs -- data inaccuracies, corrupted data, and start-up issues. Garmin's newer LIDAR sensor the LIDAR Lite v3HP allows for repeated starts.
  2. Research before buying sensors Make sure the sensors you buy work with the device. Look for step-by-step documentation. Also, it is not always the case, but try to buy sensors from the same time period (a year or so) as the device. In my case the sensor was made 2 years before my device, which cause in failure.

Good Luck with all of your projects!

UPDATE: The Lidar Lite v3HP works flawlessly with the RPi3B+, all of my code was for LLv3 worked for the HP as well

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.