cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L4CD - readings dependent on target

dimitarkunchev
Associate II

Hi

I have been messing around with VL53L4CD for the last few months, and I recently realized that my readings differ significantly, depending on the target color/texture.

Here is my setup: The sensor is set on its side, and directly in front of it, at the 20cm mark, I place a few different gray-level cardboard boxes, ranging from black to white, mostly gloss-textured.

The sensor readings vary by about 10mm (222 shortest, 233 longest) depending on the box.

Performing offset calibration helps to have an accurate reading on a gray target, but the error persists for other colors.

I have tried performing cross-talk calibration, although I don't have a cover glass for this test, but that doesn't seem to help either.

My question is - do we have to know the target reflectivity in advance and calibrate for it? Am I wrong to expect more consistent readings against various targets?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

This behavior is the reason the accuracy spec is not better. 

Specular (mirror-like) targets are the worst. It's because if the target is normal to the sensor, the return signal is absolutely huge, and if the target is a few degrees tilted, the return signal is almost non-existent. Matte finish (or Lambertian) surfaces do not have similar issues.

The sensor is based on a statistical algo. After all, photons move at 3pico seconds per millimeter.  6 if you count the out-and-back nature of the ToF sensor. 

But an inexpensive sensor is not that fast. That leaves statistics.

The algo really wants 20Million photon strikes per second. If we have more, we turn off the SPADs (photon detectors). We can go as low as 0.5M or so and still be accurate to the spec sheet, but below that, the Sigma goes up quite a bit.

Too many photons is also a problem. There is a limit to how many SPADs we can turn off. 

So, a close specular target will saturate our sensor. And again, the accuracy suffers. 

The solution is to get the range and look at the number of photons (signal strength) and number of SPADs. Use these 3 pieces of information and see if you can create a tuning algo. 

- john

 

 


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

View solution in original post

7 REPLIES 7
John E KVAM
ST Employee

This behavior is the reason the accuracy spec is not better. 

Specular (mirror-like) targets are the worst. It's because if the target is normal to the sensor, the return signal is absolutely huge, and if the target is a few degrees tilted, the return signal is almost non-existent. Matte finish (or Lambertian) surfaces do not have similar issues.

The sensor is based on a statistical algo. After all, photons move at 3pico seconds per millimeter.  6 if you count the out-and-back nature of the ToF sensor. 

But an inexpensive sensor is not that fast. That leaves statistics.

The algo really wants 20Million photon strikes per second. If we have more, we turn off the SPADs (photon detectors). We can go as low as 0.5M or so and still be accurate to the spec sheet, but below that, the Sigma goes up quite a bit.

Too many photons is also a problem. There is a limit to how many SPADs we can turn off. 

So, a close specular target will saturate our sensor. And again, the accuracy suffers. 

The solution is to get the range and look at the number of photons (signal strength) and number of SPADs. Use these 3 pieces of information and see if you can create a tuning algo. 

- john

 

 


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.
dimitarkunchev
Associate II

Hi,

Thanks for the reply.

I have always thought the accuracy specified in the datasheet is part-to-part deviations, not target-to-target. Doesn't make sense, coming to think about it! What you say about the light travel time and the statistical nature of the algorithms does make a lot of sense. I had not thought about the time intervals the sensor has to work with. Helps a lot to understand the issue at hand.

I don't think it is about the specularity in this case - I retested it with mat surfaces (various papers) and it's still the same. Signal rate does change between targets between 2000 and 8000, depending on color, SPADs range between 80 and 200 quite randomly, ambient rate is around 300. I assume that's a good S/N ratio and condition.

What confuses me is that the reported sigma is 1mm with almost any target. But I suppose that's what it is.

Anyway, in my project, the target should be consistent enough, so I am pretty sure I can work around the limitations. My analysis indicates the deviations are repeatable, given identical targets and conditions, so that's OK. I don't have a large enough sample size to confirm consistency between sensors, but I'll need to calibrate them individually anyway.

Cheers

John E KVAM
ST Employee

Everything you have said makes sense. But I want to argue with the ambient rate of 300 being good. You obviously have a window office. Might want to collect some data away from that window. 

(I might be wrong 300 counts is low, but some of our code reports Killi counts. And if so 300 is getting really high. 

20M counts is what we are trying for. If your target is dull and farther away, you will have more SPADS. Bright, near targets can be as low as 4 SPADS. 

Signal per SPAD is a good way of comparing relative brightness of target.

- john


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.
dimitarkunchev
Associate II

Yes, you are correct about 300 being in a relatively well-lit office. That's ok - final use case is in dark vessel with AR about 20. These numbers are totals, not per SPAD.

I will think about all this, armed with the new information about the inner workings. I might be able to use the number of SPADs in some way, not sure yet.

Cheers

Hi John, 

I came across this post as I am running into a similar situation, and am wondering if you could provide me with some guidance. 

I am trying to use this sensor to detect distance with a variety of materials. I have came across similar issues as OP - I have found that different materials provide different levels of accuracy, and I haven't been able to pin point exactly why this is, or how to account for it. 

You recommended to OP to attempt to create a tuning algorithm using range, signal strength, and # of SPADs. 

I have some data that I have collected and am trying to find correlations between under-reporting and over-reporting from the true distance. I am trying to develop an understanding of the correlation in my data between these values, in order to start attempting to create a "corrective" algorithm. 

My question is - do you have any general sentiments regarding these values? For example - a high signal per spad value typically indicates high reflectivity, which could skew the range measurement lower than it's true measurement. Any advice here is appreciated. 

Furthermore, I am trying to achieve an accuracy of +-3mm across a range of materials ranging from distances 5 cm to 40 cm. It is okay in my case to have "profiles" for material (the material will be known). Does this seem unachievable to you? 

Thanks, 
Carter 

HI Carter, OP here

My two cents

I did some experiments a while back based on the original suggestion. Unfortunately, I couldn't improve the accuracy because there are just too many variables that affect the readings, in my case at least. To my surprise, the material itself is not that important, but the color is (wouldn't think infrared is affected). I had a set of large tubes (ranging from 5cm ot 50cm, every 1cm) cut for testing. Placed a board with the sensor at the top, and recorded the distance to the bottom. Haven't tried lots of different materials, but considering I had a different error with a black and a white sheet of paper, I quickly decided to go another direction. The good news is that the error was quite repeatable (~1mm diff between repeated tests with the same setup). I think in a controlled/known environment, you can calibrate against various objects and get very repeatable and accurate readings even without worrying about signal strength.

I could get away with using the delta between consecutive measurements, instead of an absolute reading, and that is way more reliable. So I haven't really pushed further for absolute accuracy.

By the way, these experiments helped me a lot in adjusting the geometry of the enclosure near the sensor and the IR filter. Initially, the sensor was over-ranging in close readings and under-ranging in larger distances. So keep that in mind as well.

I still am curious if one can get better accuracy, though!

Hi OP, 

Thanks for the response. I'm glad you were able to get this sensor to fit your needs, even if you had to divert course a bit. 

Unfortunately for me, I need this sensor to work with a plethora of materials. Based on  @John E KVAM 's comments, I have decided to try to create a machine learning model based off the data that I do have and try to create a corrective "fine tuning" algorithm that way. 

Hopefully it works... I will keep this post updated with my findings as they come. 

Carter