cancel
Showing results for 
Search instead for 
Did you mean: 

How exactly do I read the histogram on VL53L8CH

koch
Associate

Hello Community, I am new here and new to this field as well. I am currently using the VL53L8CH Lidar Sensor which has a MZAI some GUI tool to access and save data logs along with some visualizations of the data.

I am currently doing some experimentation with the sensor and trying to understand the output data. I have the excel file through which I am accessing the CNH data.

1. What does the CNH data even mean, why are some values -ve in it, the CNH plot provided by the BUI doesnt show any -ve values but the graph there is all in the +ve axes?

 

My Experiment: Placing a flat white reflective square object at around 5 feet along with another larger flat white square object at 2 bins apart behind object 1 (considering the bin width to be around 222mm as the sensor is in 8x8 mode and the number of bins is 18 over the 4000mm range of the sensor).

 

My Findings: When I drew histograms/bar graphs of these CNH values for the zones that were illuminated for Object 1 (the smaller object at front), I saw that the histogram had its peak at around bin 10 and 11, which is around 2220 mm. But my object when placed showed distance in mm as ~1530mm.

Is the peak value in the histogram decided as the distance of the object?

Also how do I find the distance of the 2nd object which is popping up in the histogram? Just by the bin length but as bin size is 222mm, that would be a lot of margin of error.

2 REPLIES 2
John E KVAM
ST Employee

Ah, so close. 

Each bin is 3.75cm. There are actually 128 bins. The limitation of 18 is that we ran out of memory and could only send that many with 64 zones. If you want more bins, you can switch to 16 bins and get 4x more bins in each zone. 

Thats a good place to get started. 5 feet is about 150cm /3.75 = bin number 40. And you should be able to see it.

But you can also change which bin you start reporting. You can pull bins starting at 30 and only take 20 of them. You should see the shape. 

5 feet is too hard to work with, I'd move in to maybe 2feet and change your numbers accordingly. 

Each bin contains the number of photons gathered in that clock cycle after the VCSEL (laser) turns on. 

What you should see is one half-height bin, followed by a couple of full-height bins and then the number of counts going down as the laser turns off. (The light comes on a lot faster than it turns off.) 

When you run an experiment and get this classic shape, move your target a cm or so in an out and see what happens to that initial 'post'. Then introduce your second target 60cm behind your initial target. You will see that 'classic' shape repeated twice in your data. Then move the back target closer and see how the histograms merge together.

- john


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'

Hello Sir, thanks for the reply. I understand what you said but I have a doubt, particularly about 

"Each bin is 3.75cm. There are actually 128 bins. The limitation of 18 is that we ran out of memory and could only send that many with 64 zones. If you want more bins, you can switch to 16 bins and get 4x more bins in each zone. "

 

What do you mean when you say switch to 16 bins and get 4x more bins in a zone. How do I achieve that? 

 

Also, I had another question,

Lets say I get that there are two objects being detected in a zone XX, but the 'distance_mm_zXX' is shown only for the object who is creating signal peak at some bin in the Histogram for that zone. So if I wanted to find the distance of the other object which was giving a local maxima at some other bin, how will I do that, as like the accurate measurement from ToF and not approximation by calculating the bin_length* bin_number.

 

I also have a doubt to add, I am sorry sir, I am being shameless in asking these questions but I cannot rest until I find something.

When I saw the data that I got from the sensor by recording it into a csv through a software; I saw some CNH values to be negative, they also range widely sometimes. How can cnh values be negative and why are they then not reflected in the cnh plot functionality shown in the software. 

 

I would appreciate if you answer these questions but please take your time and I am sorry for causing you this trouble sir!

Have a good rest of your day!