VL53L4CD: Measurement and Consumption Issues
- September 19, 2024
- 1 reply
- 2019 views
We are having issues with the VL53L4CD Time of Flight Sensor.
The sensor works properly after initialization, but after some measurements it starts having problems.
It either stops ranging or returns a ranging result similar or equal to the previous one, while returning data ready TRUE and ranging OK (Results status 0).
Here's a description of what happens when the sensor still ranges but gives wrong results (second case):
- We take an initial ranging (distance from an object)
- We move the sensor away from the object
- We ask for a ranging: the result is similar or equal to the initial measure.
- Now we move the sensor away again
- We ask for a new ranging: the result is the one we expect after the first movement.
Some detailed info:
- The sensor initialization is copied from the "ranging basics" example attached with the drivers.
- We changed the interrupt to active high by changing the value of register 0x30 in VL53L4CD_DEFAULT_CONFIGURATION (VL53L4CD_api.c)
- We set timing budget to 50ms and intermeasurement time to 0
This is pseudocode for our sampling function, very similar to the "ranging basic" example:
1. Wait 5ms
2. VL53L4CD_StartRanging
3. Wait 90ms
4. VL53L4CD_CheckForDataReady
5. If DataReady
5.1. VL53L4CD_ClearInterrupt
5.2. VL53L4CD_GetResult
6. VL53L4CD_ClearInterrupt
7. VL53L4CD_StopRanging
Between two samplings (call to the sampling function) the sensor is NOT reinitialized with VL53L4CD_SensorInit.
I also attach power profiling screenshots of the two situations (sensor stops ranging and sensor gives incorrect measurements).
Best Regards,
Claudio
