cancel
Showing results for 
Search instead for 
Did you mean: 

How to use VL53L3 histogram feature?

charles23
Associate III

I understand the VL53L3 can detect multiple objects, and I think it puts ToF information into different buckets. Where can I find more information about this? app notes, register set, driver software, evaluation code? So far I can only see the data sheet DS13204 which does not have this information.

7 REPLIES 7
John E KVAM
ST Employee

ON ST.com search for VL53L3, and 'get software'. We supply the software so you don't have to write very much code.

You will get to:

STSW-IMG015

VL53L3CX API (Application Programming Interface)

And the users manual is in the with the code delivery.

To answer your specific question, there is a function called something like 'GetExtraInformation' or something like that.


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.
Eleon BORLINI
ST Employee

Hi @charles23​ ,

did you get the useful information you needed?

-Eleon

charles23
Associate III

Thanks for the pointer. Indeed, in the sample application the call to VL53LX_GetMultiRangingData(Dev, pMultiRangingData) returns an array of RangeData objects (up to 4), each with range and status. That is probably adequate.

I see there is a call VL53LX_GetAdditionalData() which returns an object that has a member of type VL53LX_histogram_bin_data_t, which in turn has a member of type int32_t bin_data[VL53LX_HISTOGRAM_BUFFER_SIZE] (where VL53LX_HISTOGRAM_BUFFER_SIZE = 24). So I guess there is a lot more going on under the hood.

That said, insight into what is going on would be interesting and possibly useful...

John E KVAM
ST Employee

A histogram adds up all the photons received within a given clock.

So if you look at the histogram data, you can tell how long it took the light to go out and come back in.

A lot of work is required analyze the histogram, as the laser does not turn on and off instantaneously.

But if you feel like doing a lot of work that we have already done for you, you can have a go at the histogram data yourself.

It's somewhat confusing as buried in the histogram data is the ambient light signature, but every other histogram array is fairly straight forward.

  • john


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

John, are you saying that continuous readings of histogram data alternate between ambient and target histograms? Is there any way to distinguish between them?

EDIT: Seems like `AdditionalData.VL53LX_p_006.number_of_ambient_bins` is a good marker of whether its an ambient measurement.

dscdsc
Senior

DELETED

John E KVAM
ST Employee

Everything you need is on ST.com

Go to st.com/TimeofFlight and find the sensor you want.

then click on "tools and software:".

For the L3 we have a linux Kernel driver (please don't use this if you're not a linux person).

and we have the bare driver. Use this for running in linux user space.

there is example code that runs on the ST Nucleo boards and lots and lots of documentation.

  • john

If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.