2019-12-10 01:15 AM
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,
2019-12-10 09:41 AM
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.
2019-12-10 04:18 PM
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.
2019-12-10 06:34 PM
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.
2019-12-11 07:48 AM
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.
2019-12-11 07:04 PM
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