VL53L0X gives incorrect reading against shiny plastic

Hi All

I was hoping for some help or for some guidance on how I can fix a problem I am having with this sensor.
On the whole the sensor is giving very good readings but I am getting a problem when I am measuring against shiny black plastic. The reading is always around 30mm closer to where it should be. IE If the plastic is 200mm away from the sensor then the sensor is reading that it is 170mm away. If I just put a piece of paper on top of the plastic then the reading is correct. The reading is also correct if I use some black plastic which is dirty or has a matt finish.
Is there anyway I can calibrate this out of the sensor or any other way of doing it.
I am using an Arduino with the simplest code. IE

int laser = sensor.readRangeSingleMillimeters();



Have you tried the high accuracy mode on the sensor? Can you post pictures here that show your test setup?


Hi Nathan

Thank you for your reply. I am currently using the high accuracy mode but I have switched between different modes and values to see if that made a difference but problem still remained. I initially had the sensor attached via header pins to a PCB which was mounted in a box. That is when I found the problem so I setup a basic demo with the sensor on my desk plugged into an Arduino UNO.


Generally, I would expect a shiny black surface to return little of the IR signal that is emitted by the sensor. The field of vision of the sensor is fairly wide (about 25 degrees), so if there is another surface in the field that returns a stronger signal, it is likely the sensor would return a distance to that surface instead. If you post a picture that shows the object you are measuring, and the area around it, we can look for other sources of interference.


Hi Nathan

My test rig I have just has the plastic on the floor (see attached). There isn’t anything else around it so I don’t think it is reading something near it. In the picture I have a white piece of paper covering the plastic. With the paper the reading is perfect, without the paper it is ~30mm off. I have also tried reducing the distance to the plastic to a few 100mm and the problem is the same.

Thanks again for all your help on this one.

Yeah, I cannot see anything there that looks like it would interfere. It is possible something like a sonar sensor would give you a better result if you are trying to measure a flat sheet of hard plastic.


1 Like