VL53L1X problem with the SW standby consumption after the initialisation sequence.
Hi all,
I'v developed a board with my microcontroller and one VL53L1X-SATEL - Breakout board that came with my X-NUCLEO-53L1A1 kit. I use a 3v battery for the board without regulator and 1K pull-up for the I2C line(100khz).
I use the VL53L1X ULD API files for the initialisation and the one shoot ranging measurement. After the initialisation (SetDistanceMode=short, SetTimingBudgetInMs = SetInterMeasurementInMs = 20mS) of the VL53L1X my CPU go to sleep mode and the current consumption is 6uA, every 30s my CPU wake up start measurement (StartRanging, CheckForDataReady, GetDistance, ClearInterrupt, StopRanging) consumption=14mA, the Distance value is ok and go to Sleep again.
All works like I expected, BUT every time I change the battery or I do a reset to my CPU, if there is no target in front of the VL53L1X, after the initialisation phase (sleep mode) the current consumption is 3mA (expected 6uA) and every 30s the CPU wake-up send a good distance measurement and go to sleep with 3mA again. If I put a target between 0 to 50cm during the initialisation phase (sleep mode), I get 6uA. I'v tried an initialisation with short&long distance and 20mS&100mS&500mS the problem continues: if no target then consumption in SW stanby is 3mA. If I force the HW stanby with the XSHUT pin the consumption returns to 6uA but I lose my configuration.
Kindly help me with this issue
Initialisation:
if(!VL53L1X_GetID() && (Event.Log[0]==0xEA)) { // Test if sensor = present
while(sensorState==0){
status = VL53L1X_BootState(VL53L1X_ADDR_I2C, &sensorState);
Event.timer_1mS = 2; while(Event.timer_1mS);
}
// This function must to be called to initialize the sensor with the default setting
status = VL53L1X_SensorInit(VL53L1X_ADDR_I2C);
status = VL53L1X_SetDistanceMode(VL53L1X_ADDR_I2C, 1); // 1=short, 2=long
status = VL53L1X_SetTimingBudgetInMs(VL53L1X_ADDR_I2C, 20); // mS
status = VL53L1X_SetInterMeasurementInMs(VL53L1X_ADDR_I2C, 20); // ms
}
One shoot Ranging (every 30s):
WAKE-UP...
status = VL53L1X_StartRanging(VL53L1X_ADDR_I2C);
dataReady = 0;
while (dataReady == 0){
status = VL53L1X_CheckForDataReady(VL53L1X_ADDR_I2C_1, &dataReady);
Event.timer_1mS = 2; while(Event.timer_1mS);
}
status = VL53L1X_GetRangeStatus(VL53L1X_ADDR_I2C_1, &RangeStatus);
status = VL53L1X_GetDistance(VL53L1X_ADDR_I2C_1, &Distance1);
status = VL53L1X_ClearInterrupt(VL53L1X_ADDR_I2C_1);
status = VL53L1X_StopRanging(VL53L1X_ADDR_I2C_1);
...SLEEP
