2026-03-15 4:23 AM - last edited on 2026-03-15 6:59 AM by Peter BENSCH
Hello,
I have a question about the distance values returned by the VL53L8CX across the 16 cells in 4*4 mode.
I performed repeated measurement with my sensor facing the ground, both with and without a glass cover.
I noticed significant discrepancies between the distance values of the different cells, even though the target is a flat ground plane.
By repeating the measurements and plotting the 16 cell distances as bar graphs, I observed a consistent pattern.
Graphs 1 and 2 were taken consecutively at 30 Hz.
Graph 3 was taken with the sensor farther from the ground, while still facing it.
From this pattern, it seems clear that the sensor was not perfectly parallel to the ground plane during the measurements. However, I am surprised by the magnitude of the difference between the highest and lowest cells.
I have read in several posts that the VL53L8CX may return the perpendicular distance to the target plane rather than the radial distance along each cell’s line of sight. I would like to better understand how the reported distance is actually computed.
My questions are:
Does each cell return the radial distance along its own optical axis, or is some geometric compensation already applied internally?
If the sensor is slightly pitched or rolled relative to a flat plane, how should the returned values be interpreted?
If I want to compute the true perpendicular distance from the sensor to the plane, what is the correct way to do it from the VL53L8CX measurements?
Any clarification on the internal processing of the distance output would be very helpful.
Thank you for your help.
Thomas
Solved! Go to Solution.
2026-03-15 9:48 AM
Getting that sensor to be exactly parallel with your target is really hard - as your data shows.
And be a little careful with accuracy. The sensor is not going to give you exactly the same number of millimeters even if you did get it exactly right. Within a couple of percentage points is the as good as it gets.
Consider only the first plot. You can fit a straight line between each of the columns 0,4,8,12 and 1,5,9,13 etc.
You can also do the columns 0,1,2,3 and 4,5,6,7 etc.
Note the corners (0,3,11,15) are the most problematic. These zones get a little less light and maybe don't fit the lines exactly. They will be close - just not perfect.
And if you are going to plot the data, play around with Excel a bit. It really can make a surface plane out of the data and it might be easier to see.
So, to your questions:
Does each cell return the radial distance along its own optical axis, or is some geometric compensation already applied internally?
If the sensor is slightly pitched or rolled relative to a flat plane, how should the returned values be interpreted?
If I want to compute the true perpendicular distance from the sensor to the plane, what is the correct way to do it from the VL53L8CX measurements?
I'm particularly good at missing the point of the question sometimes, so if anyone else wants to chime in, please do.
- john
2026-03-15 9:48 AM
Getting that sensor to be exactly parallel with your target is really hard - as your data shows.
And be a little careful with accuracy. The sensor is not going to give you exactly the same number of millimeters even if you did get it exactly right. Within a couple of percentage points is the as good as it gets.
Consider only the first plot. You can fit a straight line between each of the columns 0,4,8,12 and 1,5,9,13 etc.
You can also do the columns 0,1,2,3 and 4,5,6,7 etc.
Note the corners (0,3,11,15) are the most problematic. These zones get a little less light and maybe don't fit the lines exactly. They will be close - just not perfect.
And if you are going to plot the data, play around with Excel a bit. It really can make a surface plane out of the data and it might be easier to see.
So, to your questions:
Does each cell return the radial distance along its own optical axis, or is some geometric compensation already applied internally?
If the sensor is slightly pitched or rolled relative to a flat plane, how should the returned values be interpreted?
If I want to compute the true perpendicular distance from the sensor to the plane, what is the correct way to do it from the VL53L8CX measurements?
I'm particularly good at missing the point of the question sometimes, so if anyone else wants to chime in, please do.
- john
2026-03-15 10:25 AM
Hello John,
Thank you for your answer.
Sorry if my original question was not clear enough. Let me clarify what I am trying to do.
First of all, I perfectly understand what you explained in 1.1 and 3.1.
However, in my application I do not want to mechanically force the sensor to be perfectly parallel to the ground. The sensor is mounted in a system that can be slightly tilted, and I know that tilt from an IMU. More precisely, I know the roll (alpha) and pitch (beta) of the VL53L8CX with respect to the ground.
So my actual question is the following:
If the VL53L8CX is slightly rolled and pitched relative to a flat ground plane, and I know α\alphaα and β\betaβ, how can I use those angles to correct the 16 zone measurements so that I recover the perpendicular distance from the sensor to the ground plane?
In other words, I am not trying to physically realign the sensor. I am trying to compensate for its known orientation in software.
A small sketch of the setup is attached below:
a VL53L8CX
an IMU rigidly mounted in the same system
known pitch and roll relative to the ground
ground assumed to be approximately planar
How can I use my pitch and roll to correct these distance so after the calculations I have all 16 values roughly equal ?
Thomas
2026-03-16 2:37 AM
Hi
As you may already got the answer from John, we have the radial-to-perpendicular inside the low-level firmware. so the radial distance was converted to the perpendicular distance, if you let the sensor perfectly parallel to the ground, then you will get all the zone distance roughly equal to the perpendicular distance.
you can try to disable the R2P with below command, then you can get the radial distance of each zone.
Once you disable the R2P, each zone will report the radial distance, normally the shortest distance zone is the one light axis perpendicular to the ground.
Br
Zhiyuan.Han