Skip to main content
Associate II
August 23, 2024
Solved

VL53l1 signal rate function

  • August 23, 2024
  • 1 reply
  • 1126 views

Hi,

I am looking to print only the signalrate in MCPS of the VL53L1. What should I do?

Best answer by John E KVAM

Do your range. When the range is complete, call:

VL53L1_Error VL53L1_GetRangingMeasurementData(VL53L1_DEV Dev,
    VL53L1_RangingMeasurementData_t *pRangingMeasurementData);
It will return a data structure with the distance and an:
    FixPoint1616_t SignalRateRtnMegaCps;
        /*!< Return signal rate (MCPS)\n these is a 16.16 fix point
         *  value, which is effectively a measure of target
         *   reflectance.
         */
But that is not enough. You really need the signal per second per SPAD. 
and we change the number of SPADs we use depending on the return strength.
You also get:
    uint16_t EffectiveSpadRtnCount;
So divide the SignalRateRtnMegaCps byEffectiveSpadRtnCount and you will get a good measure of your signal return. 
- john

1 reply

John E KVAM
John E KVAMBest answer
ST Employee
August 26, 2024

Do your range. When the range is complete, call:

VL53L1_Error VL53L1_GetRangingMeasurementData(VL53L1_DEV Dev,
    VL53L1_RangingMeasurementData_t *pRangingMeasurementData);
It will return a data structure with the distance and an:
    FixPoint1616_t SignalRateRtnMegaCps;
        /*!< Return signal rate (MCPS)\n these is a 16.16 fix point
         *  value, which is effectively a measure of target
         *   reflectance.
         */
But that is not enough. You really need the signal per second per SPAD. 
and we change the number of SPADs we use depending on the return strength.
You also get:
    uint16_t EffectiveSpadRtnCount;
So divide the SignalRateRtnMegaCps byEffectiveSpadRtnCount and you will get a good measure of your signal return. 
- john
vishnusfAuthor
Associate II
August 26, 2024

What is the difference between getsignarate and getsignalrateperspad could u please elaborate?

Thank you

John E KVAM
ST Employee
August 26, 2024

We care about the total signal rate. We can use as little as 0.5M counts per second, but would really like to see 20M counts, and can deal with more - but it's a waste of power. So we alter the number of photon detectors we use. The SPAD (Single Photon Avalanche Diode) array is adjustable from 4 to 256. (Some SPADs are occluded, so it's not an integer number).

So a relatively dull target can return 20Mcounts with 216 SPADs and a bright target can return the same 20Mcounts but it does it by using only 15 SPADs. 

If you want to compare the brightness of your targets you need to get Signal per SPAD. This is the only way to compare the reflectivity of your targets. 

- john