cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L1X - Using SPAD for 3D Topology

HKara.4
Associate II

Hello St Community,

We would like to use the VL53L1X to get a series of measurements in a 4X4 SPAD array to graph the 3D Topology of an object. We have already set the ROI and FOV. I was wondering how we could do this? Are there any relevant code examples?

Thank you,

5 REPLIES 5
John E KVAM
ST Employee

The document you want to get from the ST Website is UM2555 - "VL53L1X ultra lite driver multiple zone implementation"

It pretty much describes everything you need to do.

Use the UltraLite driver - STSW-IMG009 . It has everything you need and nothing extra. (Also on the ST web site, search for STSW-IMG009)

​The trick is to set the ROI, take a range, then move the ROI to the left, right, up and down until you get a series of ranges.

Set up the 4x4, and run continuously.

While one range is running, switch the mid point of the ROI and continue.

If you start in the upper left with your first range, then move the center one SPAD to the right, you will get 13 ranges horizontally,

Then you can move one SPAD down and do it again.

You will end up with a 13x13 array of ranges.

Please note this is NOT fast. It's going to take 13x13xTiming Budget, and if you are really interested in the best accuracy you are going to need a good 50ms per range. Which would be 8 seconds!!

If you need it faster, use fewer regions, or a shorter timing budget.

Now this is going to take a little work to get right. You need to do an offset calibration for all 13x13 ROI's. Load the new offset at the same time you change the ROI center. You will have to get the offset right before you start on your target object. Store the offset calibration on your MCU for next time.

And although I think the sensor is pretty good, it's just a little myopic. Some of the light from outside the region will influence your ranging distance. This has the effect of a little 'blur'. 

The 4x4 RegionOfInterest gives a 5 degree Field of View, but as you are only moving 1 element to the right, those 5 degree FoVs sort of smooth your data.

But it won't take too long to try it, and you might be very pleasantly surprised.

You will get 13x13 data points over the 20x20 degree FoV. (The 27 degree FoV is a diagonal measurement.)

So each data point will represent a 2x2 degree area.

Good Luck, and if you are so inclined you an publish your code on this site.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question. It helps the next guy.
HKara.4
Associate II

Thank you @John E KVAM​  for the quick & detailed response. Very happy to see our question answered so quickly. We will dive into this and keep you and others in the community posted on our findings.

HKara.4
Associate II

Hello @John E KVAM​  just to be clear. We are unable to just have a mode where the sensor measures each SPAD in a 4X4 area. Then we would have 16 measurements that we could graph. Basically we want to put a ball on a table - use the TOF to take a "flash" measurement and send 16 distances in an order.

John E KVAM
ST Employee

​Ham - I sure wish I could do that. And we can - but in our next sensor that due out in another year.

The current processor in the VL53L1X just isn't big enough.

On the VL53L1X you only get one zone per range.

So you are 'stuck' with looking in one area, taking a range, switching the area and taking another range.

a 4x4 grid would take 16 ranges X15ms (shortest timing budget) which is about 4 ranges per second.


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question. It helps the next guy.
HKara.4
Associate II

Hello John,

As you can probably guess this current method will drain too much power from our device (wireless). Can you email me ham@lidbot.com and we can keep in touch as you prepare the next version? We would be happy to be early testers of your next iteration.

Thank you for your answers.

Ham