cancel
Showing results for 
Search instead for 
Did you mean: 

VL53l1 signal rate function

vishnusf
Associate III

Hi,

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

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

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

If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

View solution in original post

3 REPLIES 3
John E KVAM
ST Employee

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

If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

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

Thank you

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 

 


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.