LIDAR-Lite 3 Laser Rangefinder question

When I use LIDAR-Lite 3 Laser Rangefinder, I keep encountering the range finding value that the sequence window cannot output. The following file is the picture of my problem

. How can solve the problem?

Hello @josh0222 and welcome to the RobotShop forum!

I think this will help you out

https://learn.sparkfun.com/tutorials/lidar-lite-v3-hookup-guide/troubleshooting

Let us know how it goes :grinning:

1 Like

I have replaced all the cables and electronic components. And simply using this program(see following website) to test lidarlite’s ranging function, it still presents the same problem. So I am wondering if it is possible that lidarlite is damaged?

Hi josh,

Did you try adding the pull-up resistors and decoupling capacitor?

I connected it according to the lidarlite part of the wiring diagram below. It uses decoupling capacitors but no resistors.

You could try adding 4.7K external pullups to 5V for the SCL and SDA lines.

Also, please check this topic

If the Lidar Lite still does not work using an external power supply please create a support ticket with your order or invoice number and a link to this topic.

Regards

I have a question. I use the 12C code and connection method. In the operation manual, the 12C connection method does not require an external resistor. It is PWM that requires an external resistor. In addition, I did not have additional resistors when I was operating, but it worked successfully. I started to encounter this problem after a certain operation, so I was wondering if the wiring was broken. The following link is my previous arduinoLidarScanner arduino code.txt (1.7 KB) code, you can refer to it.

If the input voltage is only 4.5V, does lidarlite fail to work? Does the input voltage have to be 5V?

The I2C connection could benefit from pull up resistors, you can read more about this here:
https://learn.sparkfun.com/tutorials/i2c/all#i2c-at-the-hardware-level

I started to encounter this problem after a certain operation, so I was wondering if the wiring was broken

Did you change the hardware in any way? Or just the code?
I2C is a sensitive protocol so there might be a problem with the connection
Have you checked the continuity?

Does the input voltage have to be 5V?

LIDAR-Lite v3 units require between 4.5V to 5.5V of DC power to operate and can draw up to 135 mA of current during continuous operation (105 mA at idle).

It should be said that I first use this code to achieve the scanning function (such as txt attachment). The first few times the operation was still very smooth, but after a certain operation, it started to encounter the problem of incorrect output. So I changed the cable first, and then used the code on github to independently test the lidarlite ranging function, but it couldn’t solve the problem. So I wonder if there is a problem with lidarlite. Because the code should be executable in theory, there is no error when compiling.
LidarScanner arduino code.txt (1.7 KB)

So I also have to confirm whether the current is operating at 135mA?

By the way, how should the 4.7K pull-up resistor be added to the wiring diagram, in series or in parallel?

Add the pullups the same way as the capacitor to the gnd wire, but to the green and blue wires.
AFAIK , the Arduino Uno has pullups onboard for I2C (my Mega2560 has). If you have a multimeter, you can check the resistance between SCL and 5V / SDA and 5V.

2 Likes

So I also have to confirm whether the current is operating at 135mA?

If the unit had worked previously the problem is not the power source so it is not necessary. It is probably a connection problem.

how should the 4.7K pull-up resistor

If you have an Arduino Uno that already has built-in pullup resistors (you might have to enable them)

digitalWrite(SDA, 1);
digitalWrite(SCL, 1);

However, these internal resistors might be too “weak”, that is why it is advised to add 4.7K external pullups to 5V for the SCL and SDA lines.

image
image

1 Like

Is the 4.7k pullups resistor added like the following picture?

Where should these two lines of definition be added to my code?
digitalWrite(SDA, 1);
digitalWrite(SCL, 1);

code.txt (475 Bytes)

Sometimes when compiling my code, there will be an error in orange in the figure below. Will this affect the operation?

Yes, like this:

PS: Sorry for my really bad drawing :sweat_smile:

You can add it to void setup()

The errors don’t seem to be related but you can try searching for those packages to avoid getting those messages

https://forum.arduino.cc/index.php?topic=461880.15