2023-05-16 02:54 AM
Hi,
We are currently in a project where we want to use the VL53L0X chip for ranging. And the example code with PC application seems to work quite good. the next step is to create a PoC using our own system (where we are now).
I am currently reading up on the sensor guidelines, API documentation and code examples and can't really explain the return values of the 'VL53L0X_GetRangingMeasurementData' function.
According to the documentation it returns the following:
RangeMilliMeter
RangeDMaxMilliMeter:
SignalRateRtnMegaCps
AmbientRateRtnMegaCps
EffectiveSpadRtnCount
RangeStatus:
I can explain the 'RangeMilliMeter', 'RangeDMaxMilliMeter' and 'RangeStatus' variables but the other ones i dont fully understand.
The code example says the following:
SignalRateRtnMegaCps:
/*!< Return signal rate (MCPS)\n these is a 16.16 fix point
* value, which is effectively a measure of target
* reflectance.
*/
AmbientRateRtnMegaCps
/*!< Return ambient rate (MCPS)\n these is a 16.16 fix point
* value, which is effectively a measure of the ambien
* t light.
*/
EffectiveSpadRtnCount;
/*!< Return the effective SPAD count for the return signal.
* To obtain Real value it should be divided by 256
*/
Is there documentation available explaining the effective/acceptable ranges of these variables and their functionality.
Wit kind regards,
Richard
Solved! Go to Solution.
2023-05-18 03:56 AM
Hi Richrd
Megacps which means mege counts per seconds, it's a light energy unit. we use photonic counts number to indicate the light strength as we based on SPAD.
EffectiveSpadRtnCount which means the SPAD number this frame are using, normally if target is far from sensor, sensor will enable all the available SPADs, if target distace is short, system may use less SPADS.
SignalRateRtnMegaCps is signal energy indicator which shows how many photons bounce back from target to sensor. Normally short distance or high reflectance target will give high SignalRateRtnMegaCps vlaue. vice versa.
AmbientRateRtnMegaCps is noise energy indicator. there may some 940nm light in the surrounding, which means noise to TOF sensor, and this value indicate how much the noise it. if AMB is very high, then the maximum ranging distance will drop and accuracy will decrease.
Br
Zhiyuan.Han
2023-05-18 03:56 AM
Hi Richrd
Megacps which means mege counts per seconds, it's a light energy unit. we use photonic counts number to indicate the light strength as we based on SPAD.
EffectiveSpadRtnCount which means the SPAD number this frame are using, normally if target is far from sensor, sensor will enable all the available SPADs, if target distace is short, system may use less SPADS.
SignalRateRtnMegaCps is signal energy indicator which shows how many photons bounce back from target to sensor. Normally short distance or high reflectance target will give high SignalRateRtnMegaCps vlaue. vice versa.
AmbientRateRtnMegaCps is noise energy indicator. there may some 940nm light in the surrounding, which means noise to TOF sensor, and this value indicate how much the noise it. if AMB is very high, then the maximum ranging distance will drop and accuracy will decrease.
Br
Zhiyuan.Han
2023-05-22 11:14 PM
Hi Zhiyuan,
Thanks you for your explanation of these values, however i am not quite sure what to do with them. is there a guideline as how to use these values?
As it looks to me these values are indicative mostly and can only tell the user if the sensor is performing as expected but i dont know what kind of values to expect and where to draw thresholds for response actions.
Is there a way to determine what these values should be for a given condition or distance?
Kind regards,
Richard
2023-06-04 11:51 PM
Hi Zhiyuan,
Thanks you for your explanation of these values, however i am not quite sure what to do with them. is there a guideline as how to use these values?
As it looks to me these values are indicative mostly and can only tell the user if the sensor is performing as expected but i dont know what kind of values to expect and where to draw thresholds for response actions.
Is there a way to determine what these values should be for a given condition or distance?
Kind regards,
Richard
2023-06-05 03:42 AM
Hi Richard
I suggest you follow the user manual for more detail, in simply, normally we suggest keep the ranging value with range status ==0, and discard other range status data.
VL53L0X API User_Manual.fm (st.com)
Br
Zhiyuan.Han
2023-11-07 11:38 PM
Hi ST,
I am currently actively debugging and working with the sensor and it shows correct measurement data when i set the profile to 'Long range' example (settings from the 'um2039' User manual).
however the sensor response for RangeDMaxMilliMeter: always show a value around 1200 which should be around 2000, is there another settings which i need to do before the profile is actively set to long range?
Measurement data is now also correctly measured until about 1200mm but higher results in invalid measurements.
below are my settings as they are performed in the code:
2023-11-08 02:47 AM
Hi ST,
I am currently actively debugging and working with the sensor and it shows correct measurement data when i set the profile to 'Long range' example (settings from the 'um2039' User manual).
however the sensor response for RangeDMaxMilliMeter: always show a value around 1200 which should be around 2000, is there another settings which i need to do before the profile is actively set to long range?
Measurement data is now also correctly measured until about 1200mm but higher results in invalid measurements.
below are my settings as they are performed in the code:
2023-11-08 05:08 AM
Dmax is the most mis-understood range result.
But say you had a lot of ambient light - and saw basically nothing. Dmax says "in these light conditions, I could only 'see' this far." Which means if you DMAX was 1.2 meters and you had no target the sensor could guarentee that there was nothing up to 1.2 meters.
If you have a target DMAX is kind of meaningless.
The intent was for a autofocus application. With no data to go on, where whould you start the focus operation.
Just start at DMAX and see if the camera can use it's algo to focus. But you don't have to search for focus points below DMAX.
-john
2023-11-08 06:31 AM
HI John,
Thank you for your reply, i was under the impression that DMAX was the max amount of distance the sensor could detect with the given settings. (e.g. for long range profile this would then be higher).
Then ill change the softwares implementation of DMAX.
furthermore, our problem turned out to be a HW issue with our cover glass, without it and the above code/settings the sensor can measure beyond the 1,2m.
I was expecting DMAX to show a value of about 2000 so that threw me off in searching the problem.
Kind regards,
Richard