cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L8CX: measurements on flat ground: large variation between cell

thomasboutant
Associate II

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.

 
 

VL53L8 measurements.jpg

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:

  1. Does each cell return the radial distance along its own optical axis, or is some geometric compensation already applied internally?

  2. If the sensor is slightly pitched or rolled relative to a flat plane, how should the returned values be interpreted?

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

 

 

 

 




1 ACCEPTED SOLUTION

Accepted Solutions
John_Kvam
Senior II

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:

  1. Does each cell return the radial distance along its own optical axis, or is some geometric compensation already applied internally?

    1. The Radial-to-perpendicular conversion has already been applied. If you get the sensor exactly perpendicular to the wall, you will get the same number in all zones - within reason. 
  2. If the sensor is slightly pitched or rolled relative to a flat plane, how should the returned values be interpreted?

    1. If you want to do the geometry you can work out the angle. In you first plot, top row you have a difference between 841 and 823. So, a 45-degree triangle has one leg of 841 and the other of 823. 
    2. You want to twist the sensor, so the one leg is shortened by 9 and the other increased by 9. My math is rusty, but a tilt of 8 degrees should do it. 
  3. 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?

    1. This is already done for you. Just tilt the sensor until all your zones have the same number. 

I'm particularly good at missing the point of the question sometimes, so if anyone else wants to chime in, please do.

- john

If this or any post solves your issue, please mark them as "Accept as Solution". It really helps the next guy.
And if you notice anything wrong do not hesitate to "Report Inappropriate Content".
I am a recently retired ST Employee. My former username was John E KVAM.

View solution in original post

3 REPLIES 3
John_Kvam
Senior II

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:

  1. Does each cell return the radial distance along its own optical axis, or is some geometric compensation already applied internally?

    1. The Radial-to-perpendicular conversion has already been applied. If you get the sensor exactly perpendicular to the wall, you will get the same number in all zones - within reason. 
  2. If the sensor is slightly pitched or rolled relative to a flat plane, how should the returned values be interpreted?

    1. If you want to do the geometry you can work out the angle. In you first plot, top row you have a difference between 841 and 823. So, a 45-degree triangle has one leg of 841 and the other of 823. 
    2. You want to twist the sensor, so the one leg is shortened by 9 and the other increased by 9. My math is rusty, but a tilt of 8 degrees should do it. 
  3. 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?

    1. This is already done for you. Just tilt the sensor until all your zones have the same number. 

I'm particularly good at missing the point of the question sometimes, so if anyone else wants to chime in, please do.

- john

If this or any post solves your issue, please mark them as "Accept as Solution". It really helps the next guy.
And if you notice anything wrong do not hesitate to "Report Inappropriate Content".
I am a recently retired ST Employee. My former username was John E KVAM.

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 ?


 

setup.png
Thomas

Zhiyuan.Han
ST Employee

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.  

  • uint8_t disable_rad2perp = 1;
  • status = vl53l8cx_dci_replace_data(&Dev,Dev.temp_buffer, 0xE0C4, 8, (uint8_t*)&disable_rad2perp, 1, 0x07);

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

 


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.