2024-09-16 03:03 PM - edited 2024-09-16 07:10 PM
Firstly, on behalf of our company, I would like to appreciate the great products that have been delivered by STM through the years, wish STM well and prosper.
#----------------------------------------------------------------------------------------------------
Recently we are working on using the VL53L5CX TOF for our ML project.
Settings in fw :
I2C speed : 1MHz
Resolution : 8x8
Ranging Frequency : 2Hz
Ranging Mode : Continuous
Target Order : Closest
Sharpener Percentage : 20%
MCU : ESP-32
Platform : Arduino IDE
With Cover Glass
Room environment, curtains are opened
Graphing software : Processing Grapher
Constraints :
- Sensor will be installed on ceiling, facing the ground, around a distance of 2.5m to 3m
- Must use all 8x8 SPAD sensors
- Sharpener value should be around 20%, since we are planning to use all the SPAD, as the sharpener increases, edge values readings become vague
#----------------------------------------------------------------------------------------------------
Case 1 : Facing the ceiling, steady
Observation : Takes some time for the outlier values to return to normal value
Case 2 : Waved my hand once above the TOF
Observation : Some outlier values appear (purple blue around 0mm) after my hand are no longer on the TOF
Case 3 : With my hands 20cm on top of the TOF, steady
Observation : Values are fluctuating
Case 4 : TOF facing the pillows, steady
Observation :
We have also tried to have the TOF installed on the ceiling and facing the chairs & table etc, but the output are fluctuating as well.
#----------------------------------------------------------------------------------------------------
For Case 1 & 2, why do the outlier values take a long time to return to the normal reading position?
-> How do we have those outlier value returned to the normal position quick?
Our doubt is that, with case 3 & 4, since everything in the scenario is steady (not moving).
->Why is the output of the values fluctuating?
Our understanding to the sensor is that, if the TOF is facing/ sensing an area with non-moving/steady objects, it should return stable values, and values should not be fluctuating. Is it related to the settings in the fw?
We have tried to calibrate the sensors with the proposed setting by STM, i.e :
Also tried with and without the cover glass, but the fluctuation persists.
Stable values would be really helpful for building the ML model when collecting the data.
We look forward to the discussion. Thank you.
Cheers
Will
Solved! Go to Solution.
2024-09-16 06:17 PM
No. In autonomous mode you integrate for maybe 10ms then go to sleep for a 490ms then range again for 10ms. That way you get 2 measures per second but don't spend the power.
Continuous ranging means integrating until its time to start another range. Probably not what you want.
In all cases the L8 is a better sensor. Shift to it if you can.
There are 64 zones and in theory each zone can return 4 targets. But in practice two targets is kind of the practical limit.
If you look down on a bed, some zones will see the bed, some will see the floor. Some zones will see both the bed and the floor.
I generally sort by closest. In most cases closest is strongest as near targets return more photons than do far ones.
But say your floor were particularly reflective and the bedding was not. Possible to have the floor be stronger.
If you go through the structure (and you configure your platform.h to specify 2 targets) you will see them in each of the 64 zones.
- john
2024-09-16 03:15 PM
Number 1 - go immediately to the VL53L8. Same price, Same FoV, better performance. (We improved the optical elements - but also changed a lot of other things as well.)
The fluctuations are due to the fact that under the covers we do 4, 4x4 sub ranges and stitch them together. And with fast movement the 4 sub-ranges don't line up.
Number 2 - Doing 2Hz continuous, means you are integrating for a full 1/2 second.
Don't do this.
Instead change the mode to Autonomous and integrate for something reasonable. 10ms is more than enough.
You might even like 5ms better. Try this even before going to the L8.
I recommend both of these, but just try #2 and see if it solves your issues.
- john
2024-09-16 05:16 PM
Thank you for the reply John.
We did tried different frequencies from 2 - 15. But seems the fluctuations persists.
We chose 2Hz because of a slower retrieve rate, the fluctuations would be reduced since value changes less frequently. (But still fluctuates)
#----------------------------------------------------------------------------------------------------
Regarding the 10ms and 5ms you recommended, do you mean :
10Hz and 5Hz?
Period : 10ms = 0.01s, frequency is 100Hz, but seems it is not correct because 15Hz is the max freq. for 8x8
However I have changed the fw setting to what you recommended : Autonomous mode and 10Hz (I assume).
Read for 10 seconds, the sensor is placed steadily and is facing the ceiling, no moving objects is in the FOV.
-> Seems there are lots of fluctuations going on
#----------------------------------------------------------------------------------------------------
Other than that, regarding the target order, how does one choose the best ?
Since all the 8x8 values are retrieved from the [1,1] to [8,8] (assume the SPAD to be a 8x8 matrix), how does the target order affect these values?
#----------------------------------------------------------------------------------------------------
Lastly, regarding the VL53L8, would it give more stable values, and less outlier values? Thank you.
The sensor will be used on ceiling and facing the floor, no direct sunlight shining at the sensor.
Cheers
Will
2024-09-16 06:17 PM
No. In autonomous mode you integrate for maybe 10ms then go to sleep for a 490ms then range again for 10ms. That way you get 2 measures per second but don't spend the power.
Continuous ranging means integrating until its time to start another range. Probably not what you want.
In all cases the L8 is a better sensor. Shift to it if you can.
There are 64 zones and in theory each zone can return 4 targets. But in practice two targets is kind of the practical limit.
If you look down on a bed, some zones will see the bed, some will see the floor. Some zones will see both the bed and the floor.
I generally sort by closest. In most cases closest is strongest as near targets return more photons than do far ones.
But say your floor were particularly reflective and the bedding was not. Possible to have the floor be stronger.
If you go through the structure (and you configure your platform.h to specify 2 targets) you will see them in each of the 64 zones.
- john