2024-04-08 08:03 PM
I‘ve seen that on the datasheet of VL53L8CH it says
Highly configurable CNH in order to meet user expectations
– 64 zones with 18 bins at 15 Hz
– 32 zones with 36 bins at 15 Hz
– 16 zones with 48 bins at 25 Hz
My question is how can I configure the frame rate of the CNH data output and how can I estimate the real data output frame rate?
Solved! Go to Solution.
2024-04-11 07:02 AM
The CNH does send a LOT of data. And how you configure your I2C or SPI is a limiting factor. If using I2C, configure it to 1MB - otherwise you really have no chance.
Better yet, go with the SPI interface if you can.
Using the Evaluation kit, log some data. then look into the Excel output file and see how much is in there. It's huge.
2024-04-09 07:04 AM
Frame rate and number of bins are different parameters.
How many bins you get is a matter of memory size. 64 zones times 18 bins is just the amount of memory we have to dedicate to getting you data. You can select to output half the number of zones - and double the number of bins for instance.
So, you are trading zones for bins.
As one range is being read out, another is being collected. So, to get the max frame rate, we cannot stop. Nor can we store more data from a given range.
And then there is data speed. ONce you start reading out the data, we will not over-write it. If you are slow extracting the data the sensor will grind to a halt waiting for you.
If you have a really fast communication path (SPI) then the frame rate is limited by the sensor.
8x8 zones is 15 frames and 4x4 zones is 60 frames max. That's running in continuous mode.
If you set up for 8x8 zones - even if you only read out a few of these zones, you cannot go faster.
So, the trick is to figure out how much data you are asking for; and knowing your read-out speed. I2C maxes out at 1Mbit for instance, but lots of people run it at 400Kbits.
As a practical matter it might just be easier to run it and see. Most MCUs have a timing function.
Good luck,
- john
2024-04-10 06:02 PM
I think I've understood that finally it is the readout speed that is limiting the frame rate.Thank you for your help!
2024-04-11 01:10 AM
Using the GUI, it is possible to change the CNH refresh frequency through the System settings widget via the RangingPeriod parameter (as explained in the User Manual)
In the STM32 code (STSW-IMG043_F401 available on st.com), the frame rate is programmed in the mz_ai_main.c file within the vl53lmz_configure() function through the vl53lmz_set_ranging_frequency_hz() API
2024-04-11 05:10 AM
By chaging the ranging peroid the frame rate of ranging datas improves obviously, but CNH output cannot reach the same frame . Is it because the I2C that the software is using like John E KVAM said above,that is the communication speed is limiting the frame rate rather than the settings?
2024-04-11 07:02 AM
The CNH does send a LOT of data. And how you configure your I2C or SPI is a limiting factor. If using I2C, configure it to 1MB - otherwise you really have no chance.
Better yet, go with the SPI interface if you can.
Using the Evaluation kit, log some data. then look into the Excel output file and see how much is in there. It's huge.