cancel
Showing results for 
Search instead for 
Did you mean: 

How to make the VL53L8CH to get data with 64 zones with 18 bins at 15 Hz?

Licx
Associate III

Currently I connected the X-NUCLEO-53L8A1 to F401RE, and I notice that on the web page of VL53L8CH, the sensor can get the data with 64 zones with 18 bins at 15 Hz. But when I use the VL53L8CH with the Example_12_cnh_data which use VL53LMZ_ULD_API, I found that when I set the cnh config to get the data with 64 resolution, 16 bins, and 15Hz, the fps I get from the serial port is only 3.6Hz, not 15Hz. Is there any way to improve the FPS of the code?

13 REPLIES 13
RogerM
ST Employee

The data format implemented in the encoded_frame module is not something ST is documenting as it is treated as a "private" method to communicate between the EVK and the GUI. We don't have any libraries to share to read this datastream from the EVK.

However, having said that the format is very simple, and you are welcome to adopt it in your own code if you wish.
It sends data as binary blocks formatted as follows:
- a few text characters as a block header.
- a byte that contains a <block_type> value.
- a binary block of data.
- a crc value.
- a few text characters to mark the end of the block.

On the frame rate that you see (7.5fps) have you confirmed that the STM32 is able to capture at a higher rate if only minimal data is uploaded to the host, for instance just the print the frame number to the serial port...so the limiting factor is the upload to the host?

Licx
Associate III

Thanks for your reply, I also think the limiting factor is the upload to the host.

Licx
Associate III

Besides, as shown in the figure is a ball, the depth difference of one pixel is less than 3.7mm. But as shown in the histogram, the depth difference is more than 15mm. I would like to know if this is caused by noise or some other reasons?

his.pngdepth.png

 

RogerM
ST Employee

Sorry, I am not entirely sure what is expected in the screen shots.
But I can make a few general comments.
The basic histogram bin width in terms of difference-of-target-range-per-bin is about 37mm per bin.  So it is very hard to determine accurate ranges just by inspection of the histogram bins. 
On the other hand the "target range" zone output from the sensor uses quite sophisticated algorithms to extract target ranges from the histogram data -- so I would expect these to always give more accurate ranges.
On the the topic of "noise" in the histogram. The noise we see is just in amplitude, primarily caused by ambient light. We don't see any noise in the time / range dimension, i.e. no significant jitter in timing from frame to frame.
Hope this clarifies these points.