2022-11-10 04:19 PM
I'm using the VL53LX API 1.2.8 to interface with the VL53L4CD in firmware and I implemented a tuner page in my android app to visualize it.
So far I have this thing ranging pretty well with +/- 1mm accuracy. Not bad!
I'm measuring a permanent grey 3D printed PLA object with a 10x5mm flat face that can move 10-45mm in front of the sensor.
My only issue is that when I start/stop ranging, it starts off on the correct distance (object not moving) and then after ~1min it starts drifting up +2-3mm. However, it tends to cap out there. So, if I'm reading 45 it will climb up to ~48 and settle. If I start/stop again it will repeat.
Is this due to temperature drift or something else? Is there anything to lessen this? I would think that if it was temperature then start/stopping would not cause it to jump back to reading 45mm right off the bat but instead leave off at the last drift value.
Project details:
Electrical:
-I2C at 100kHz
-VCC 2.8V
Typical Operation:
-Follows the UM2923 - VL53L4CX API ranging flow (field)
-Host polling, checking for Data Ready (~10ms intervals)
Boot up:
-Toggle XSHUT with delays between
-Wait Device Boot
-DataInit
-Set power level to 30 from 60
-Set Phase Cal Patch set to 2
-Set Offset Mode to PERVCSEL
-Set ROI to 4x4 TopLeftX:6, TopLeftY:9, BottomRightX:9, BottomRrightY:6
-Set Calibration Data
-Set distance mode to Medium (all though this is default)
Calibration:
-Ref SPAD
-XTALK (not really required since no glass but seem to help)
-VL53LX_PerformOffsetPerVcselCalibration(45mm)
-Store Cal data
Thanks,
Andrew
2022-11-14 08:20 AM
Andrew -
The VCSEL does generate heat - and it's effency is affected by that heat. As the temperature rises,there is a VHV (Very High Voltage) calibration that goes on. It will adjust. But it does not have a very fine resolution. So if you warmed the sensor you might see a drift of a few mm, then a snap back as the temp compensation kicks in, then slow drift leaving you with a sort of saw-tooth pattern.
I suppose if you wanted to get the best accuracy, you might find some way to hold the chip at a known temperature.
In fact, if you had a handy way to do this is might be an interesting experiment.
Nicely done on your app. Looks pretty cool.
2022-11-14 07:24 PM
Thanks, I've been working on this thing for a year now.
Unfortunately, I have no control over the sensor temperature in this project.
Is the VHV doing the same thing as the VL53L4CD_StartTemperatureUpdate() function in the low power driver or how do those differ if not?
Also what triggers the VHV to start a calibration and what's the threshold?