VL53L1x hardware power down

Hi, for an application we need the sensor has a minimal current consumption. My idea was to use the XSHUT pin to set the sensor to a Hardware Standby mode and once per minute to activate the sensor for a measurement and after this standby again.
The problem I have observed is that everytime the sensor reactivates I must do the initialization but then I saw the measurement is not ok, at first startup I have a correct value of 200 mm and after standby and activation I get values like 170-174 mm so there’s something wrong. Does someone has a recipe or solution to use the standby mode of the sensor?

I just tried it using ST’s ultralight driver and I don’t see any issues, but in my system XSHUT is held low for the first 2 seconds when power is applied, so I don’t really have a startup condition where XSHUT has never been asserted low. Are you waiting for the sensor to boot after raising XSHUT? What timing budget are you using? I’m using 500 mS.

Hi, marpan70.

I do seem to remember seeing the kind of behavior you described with our library before, where the first reading after powering up is inaccurate. That hasn’t been an issue for most of the applications we’ve tested these sensors in, since we’ve usually used it in continuous mode, but it sounds like I might need to look into it some more, especially if that doesn’t happen with ST’s code. Have you been able to test with either the full or “ultra lite” API? Does changing any settings or delays as jlo mentioned make any difference?

Kevin

Hi Kevin,
I use the full API for this project. I’ve tried to change some settings and add a delay of 100-200 ms after XSHUT is made high and the sensor comes up. Can you tell me what is the primary function of XSHUT, is it allowed to use it as a hardware standby mode? I can’t find this clearly in the datasheet of ST.
Again, what I do is put the voltage at the Pololu board at the same moment as my Adafruit Feather 32U4 and after initialization and the first measurement (with correct value) I put the sensor in hardware standby mode by XSHUT to LOW. Then every minute I reactivate the sensor by XSHUT to HIGH do a measurement and then in standby mode again. WIthout a new initialization I get no measurement value and with intizialization I get a wrong measurement value. This repeats every time I reactivate the sensor.

XSHUT is a shutdown pin; it puts the chip in standby but also resets it, so as you’ve found, you need to reinitialize it after releasing XSHUT.

Sorry, I didn’t realize you were already using the ST API. If you do need to get this working with XSHUT and continue to have trouble with the first reading, I suggest posting a question on ST’s community site; they should be better able to help you with their software.

Alternatively, have you considered leaving the sensor initialized and not using the XSHUT pin to put it in standby, but only taking readings when you need to (e.g. with single-shot mode)? Table 16 in the datasheet seems to indicate that software standby should only consume slightly more current than hardware standby:
image

Please note that if you are using our carrier board, its current consumption will likely be dominated by the regulator on the board (although it might be an option to bypass it if you already have a suitable logic supply).

Kevin