cancel
Showing results for 
Search instead for 
Did you mean: 

ToF inaccuracy

karlacha
Associate II

Hi,

 

I was doing a distance test on the VL53L4CX sensor using ESP32 and the ST example codes on Arduino. I'm getting  inconsistent offset errors across the range. The setup is a brine tank with salt inside it. Any ideas on this?

 

Thank you.

6 REPLIES 6
John E KVAM
ST Employee

When looking at water (briny or not) you have a problem with light penetrating the liquid, being slowed down, hitting the bottom of the tank and reflecting. If the liquid is deeper than about 15 cm, or if you paint the bottom with a non-reflective coating, this effect goes away.

Could you run the experiment again putting more than 15cm of water in the bucket?

Looking at your data, I'm going to guess you added some liquid to a bucket, then lifted your sensor and took measurement. So, the bottom might have an 'offset' effect. Both sensors over-range by about the same amount (except at 600 - that data point is an outlier. 

I going to guess that maybe you did NOT do an offset calibration before you started. That might account for all your numbers being low.

JohnEKVAM_0-1718900391639.png

Try doing an offest cal on your sensors - see what it tells you. If you get 20mm of offset, I'd say the numbers looks as good as they can. (Just update your data by the offset amount and have another look.)

I'm not sure I can explain the data point at 600 though. Experimental error. 

Try it again with a deeper pool of water, and doing the calibration. Then we can re-visit the numbers.

- 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.

Thank you, John. Our measurements are taken only during after fill so it's totally dry. I took another test using two similar hardware and here are the results.

karlacha_0-1719327269539.png

 

John E KVAM
ST Employee

there are lots of reasons to under-range. Coverglass being the main culprit. But OVER-ranging - especially by this much is a completely new one on me. Is it possible that you are using crosstalk correction but have removed the coverglass? It's really all I can think of. Or somehow you did the offset correction and got the sign wrong direction?

To be off by 100+ is basically impossible. 

Could it be that your target is small and the 18-degree FoV is seeing something in the background that is getting averaged in? (The diameter of the target should be at least 1/3 of your max distance. So at 600mm, the diameter should be at least 20cm. 

Can you add a picture of your setup? Something is really odd.

- 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.

Hi John,

 

It's a 600-m deep tank. It has a little salt in it with no water. I'm suspending the unit with a fishing line so I could reel in every 10 cm. The Pentair unit is just for reference.

 

Thanks

I also didn't apply any correction since I'm just using the example code. I tried removing the glass cover too and it didn't affect the readings.

It has to be something with the property of the salt that we are not understanding. 

Could you take that same set up and prove that it works acceptably when looking into some sort of bucket.

Then add 10cm or so of salt. 

You should get 10cm less distance. Do you?

940nm light can do unexpected things. It sees right through pasta for instance. It doesn't detect it all. Same with Gummy Bears. But salt sure looks reflective.

If it's the property of salt, then we are going to need a look-up table. Basically, what you have several posts ago.

It's just this range number really means that depth. 

This is not the first time someone wanted to know how much salt is in a tank, but I am not privy to how it was done. 

Sorry I cannot be more helpful 


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.