I have recently purchased a Garmin LiDAR- Lite V4. I am using it with an Adafruit Feather M4 Express with 5Vi for the sensor coming from and Adafruit AP3602A boost pump. I also have a 470uF capacitor on Vi. I am using a simple Circuit Python script to test the sensor and print the distance into the REPL (see below). Unfortunately I get a repeated error “Measurement failure”
I have read the instructions from Garmin but can’t quite seem to pick up what I have done wrong. If anyone has any experience with this sensor please let me know if you can pick anything out.
I appreciate your help.
Cheers
SlowJim
‘’'import time
import busio
import board
import adafruit_lidarlite
i2c = busio.I2C(board.SCL, board.SDA)
sensor = adafruit_lidarlite.LIDARLite(i2c)
while True:
try:
print(sensor.distance)
except RuntimeError as e:
# If we get a reading error, just print it and keep truckin’
print(e)
time.sleep(0.5)’’’
Are you 100% sure the Lidar lite is 5V and not 3.3V? I’m pretty sure that the last thing in the manual says quite plainly the device is NOT 5V tolerant. You may have damaged the sensor. Copied verbatim from the datasheet:
Can I use a microcontroller with 5 V signaling?
The LIDAR-Lite v4 LED device is tolerant to only 3.3 V. If you need to use a 5 V system, such as the Arduino Uno, you must use a logic level converter to protect the I/O drivers in the LIDAR-Lite v4 LED device. Garmin does not endorse or recommend using a microcontroller with 5 V signaling.
The sensor requires 5V power as per the Garmin documentation and the information on the various sales web sites. I am taking this from the USB pin on the Feather. The logic is 3V from the pins. The i2c pins have not been exposed to 5V.
Hi James, Can you send through some photos of the setup? Perhaps the pins are not connected in the correct configuration. The other thing I can think of is do you need the sensor to be calibrated?