cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L5CX not measuring far distances

mreumer
Associate

I am using multiple VL53L5CX sensors to measure distances around a robot using the 4x4 resolution, target order closest and ranging in countinuous mode. When I'm measuring a distance close to the sensor ~500mm and then the object is suddenly removed so the distance becomes very far +3500mm, I get strange readings. The distance measured just freezes at the last measured distance, for example ~500mm and I get no weird target status exept for maybe a 10 in a few zones. Is there a way to detect this 'out of bounds' so I know to ignore the last reading and just set my measured distance to a certain out of bounds value?

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

(Sorry about the prior post - I pushed it to the wrong topic.)

The internal buffer does not get cleared at each range. So as you have seen, there is old data in the buffer.

To deal with this, one needs to check - Number of Targets.

Only look at the data if the Number of Targets is greater than zero.

So the code should be:

   if there is a target, and if that target status is (5, 6, 9 and possibly 12) then look at the data. 

But I'm guessing your code assumes a valid target, and is looking at stale data.

 

 


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'

View solution in original post

2 REPLIES 2
John E KVAM
ST Employee

I've not tried ranging on very large tanks. I did try it at night using a swimming pool but I had issues getting out over the water at tall heights.

That being said, the VL53L8 does have almost 3X the optical power of the VL53L5. I've always said with the L5, one can spot people to about 2.5M. But with the L8, one can spot people to 4M. If you have a really big tank, I see no reason the L8 won't work for you.

The 4x4 is also an interesting idea. The L5 gets it's best distance from the one zone that is perpendicular to the surface, But if you have a black liquid, I would be less concerned with too many photons doing the 'wrong' thing and giving you poor answers. It should work, but the accuracy of the distance might be a bit lower. 

You could try ranging with the 4x4 and if the distances were short, switch to the 8x8 for accuracy. 

If your tank were very large, you might consider using the L8 for the optical power, and if you don't get enough signal back, try the 4x4. 

There is not much you can do except test it. 


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'
John E KVAM
ST Employee

(Sorry about the prior post - I pushed it to the wrong topic.)

The internal buffer does not get cleared at each range. So as you have seen, there is old data in the buffer.

To deal with this, one needs to check - Number of Targets.

Only look at the data if the Number of Targets is greater than zero.

So the code should be:

   if there is a target, and if that target status is (5, 6, 9 and possibly 12) then look at the data. 

But I'm guessing your code assumes a valid target, and is looking at stale data.

 

 


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'