cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L5CX. Regarding this sensor. Does The output obtained by invoking the function vl53l5cx_get_ranging_data() contain the raw data or does it contain data that are processed by some patented algorithm?

VNava.1
Associate III
 
7 REPLIES 7
John E KVAM
ST Employee

for the L5, the range is calculated on the chip. The data you get is a combination of the distances and signal strengths for all the targets in all the zones. By parsing the data structure you can find it directly. I'm sorry it's not easier to extract, but you can in fact, just print out the information you want from the return array.

Go over the examples to see how this is done.


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.
VNava.1
Associate III

Hello John,

thanks once again for your availability. Unfortunately, I did not understand your advice. With the function I mentioned earlier I get the ranging data inside a VL53L5CX_ResultsData structure with different fields. Among these fields there is the field distance, expressed in mm, that interests me most. I guess this value is not the raw data captured by the sensor but that it has undergone some processing. What I would like to understand is if the sensor is able to provide the raw data from which it started to calculate the distance value expressed in mm. Or is the distance in mm the rawest data that can be obtained with the ULD API of the VL53L5CX?

From your answer, I understand that the raw data can be extracted by parsing the entire data structure. Are you referring to the VL53L5CX_ResultsData structure? Which example should I refer to?

John E KVAM
ST Employee

The sensor works by creating a histogram. Each bin of the histogram contains the number of photons gathered during that clock cycle. But this histogram is not available. There are hundreds of bins and 64 zones, so the histogram data is large to export.

The VL53L5CX_ResultsData structure is the 'rawest' data that is output. It contains the distance to a couple of targets, the signal strengths and other stuff.

There is a VL53L5_example_ranging.c file that should show you how to extract the range data from the vl53l5_range_data_t *range structure.


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.
AlexCloned
Senior

 I am facing a similar interest in obtaining raw data. Nowadays our app goes fine with L5 sensor, wich is a really, really great sensor. However we face some challenging situations when ambient noise is 2000 - 4000 Klux. It works indoor, but sometimes close enough to windows, performance is badly degraded. 

 Imagine that you were able to set up a ROI, dinamically, of very few zones, say four zones 2x2. Then, that raw data might be a much more limited quantity of bytes (like in L1 or L0?) and could be transmitted through I2C to the host MCU for post-processing. What's the gain?

 You could obtain raw data from a very limited amount of zones that are reporting a non-ok error code due to ambient light. My guess is that those histograms' bins of noisy zones still have some information to be extracted depending on the app. Information that is not easily obtained from the error codes.

John E KVAM
ST Employee

high ambient light has been a problem from the beginning. The problem is two-fold. The first issue is eye-safety. We really cannot turn up the laser power much, as it would exceed the limits of a Class 1 laser.

The other issue is SPAD saturation. Once all the SPADs have triggered due to high ambient, there is no room left to detect the returning signal. Sort of like a signal to noise ratio issue.

We continue to work on the problem and we do have a test chip that works better. But it's not out yet and I cannot promise anything.

Dynamic ROIs are a bit much for the sensor. It's pretty complex as it is.

We have solutions in the pipe, but we will have to wait and see which option is the best.

Again, I cannot promise anything however.

But I'll add your name to the request list, but it is a very popular request.

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

Where is this file found? --vl53l5_example_ranging.c

John E KVAM
ST Employee

In the API, there is a library of functions to use, but there is also some example code to get you started. This code assumes you are using a NucleoF401RE, which comes with our P-Nucleo-53L5A1 evaluaiton kit.

So just dig through the API and you will find it.


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.