cancel
Showing results for 
Search instead for 
Did you mean: 

VL53l1X - can I fix used number of SPAD's

MBaum.7
Associate III

I use a VL53l1X looking trough a oil layer of ca. 20 mm. When getting measured distance 3 times with GetResult(), it returns (example):

Status = 0, dist = 11, Ambient = 16, Signal = 20936, #ofSpads = 6

Status = 0, dist = 19, Ambient = 8, Signal = 18104, #ofSpads = 6

Status = 0, dist = 38, Ambient = 16, Signal = 15864, #ofSpads = 19

 

--> some 'magic' automatic changed the NrOfSpads from 6 to 19, which also affects the measured distance. When I set the NrOfSpads with VL53L1X_Status_t VL53L1X_SetROI(uint16_t X, uint16_t Y);, this only limits the maximal used NrOfSpads, but it's further possible that the sensor switches to a lower NrOfSpads autonomous.

 

How can I force the sensor to use a defined NrOfSpads?

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

Alas you cannot. 

The sensor does a Dynamic Spad Select (DSS) at the start of ranging. Ideally the senor wants a signal of 20M. So it adds SPADs if the signal is low and it turns some off it the signal is high. 

(It takes energy to reset or 'quench' a SPAD, so the object is to pick just the right amount. And despite the #ofSpads being an integer, there are some that are occluded and if you really dig into the code you can see a float.)

Try your experiment again changing from a black bit of paper to a piece of aluminum foil.  You will see the # of SPAD fluctuate to the extremes. 

I'm not sure what caused your SPAD count to change so much. But I'd have to guess it was a change of target reflectivity. And the reflectivity extremes lead to most of the error we see in the sensor. 


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'

View solution in original post

1 REPLY 1
John E KVAM
ST Employee

Alas you cannot. 

The sensor does a Dynamic Spad Select (DSS) at the start of ranging. Ideally the senor wants a signal of 20M. So it adds SPADs if the signal is low and it turns some off it the signal is high. 

(It takes energy to reset or 'quench' a SPAD, so the object is to pick just the right amount. And despite the #ofSpads being an integer, there are some that are occluded and if you really dig into the code you can see a float.)

Try your experiment again changing from a black bit of paper to a piece of aluminum foil.  You will see the # of SPAD fluctuate to the extremes. 

I'm not sure what caused your SPAD count to change so much. But I'd have to guess it was a change of target reflectivity. And the reflectivity extremes lead to most of the error we see in the sensor. 


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'