VL53L1X API User Manual - Pololu

2y ago
1 Views
1 Downloads
882.81 KB
28 Pages
Last View : Today
Last Download : 3m ago
Upload by : Alexia Money
Transcription

UM2356User manualVL53L1X API user manualIntroductionThe VL53L1X is a long distance ranging Time-of-Flight sensor.The purpose of this user manual is to describe the set of functions to call to get ranging datausing the VL53L1X driver. Please refer to the VL53L1X datasheet.Figure 1. VL53L1X ranging sensor moduleMarch 2018DocID031478 Rev 11/28www.st.com28

ContentsUM2356Contents1VL53L1X system overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Ranging API function descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.1Autonomous ranging description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2Timing considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3API function call flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.42.52.63Calibration flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.3.2Ranging flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Mandatory ranging functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4.1Data init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4.2Static Init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4.3Start a measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4.4Waiting for a result: polling or interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4.5Get measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.4.6Clear source of interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.4.7Stop a measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Optional driver functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.5.1Wait for boot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.5.2Timing budget and inter-measurement period . . . . . . . . . . . . . . . . . . . . . 92.5.3Distance mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.5.4Limit check settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.5.5Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.5.6Region of Interest (ROI) setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.5.7Spad array coordinates versus scene . . . . . . . . . . . . . . . . . . . . . . . . . . 152.5.8Optical center coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.5.9VDDIO configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16RangingMeasurementData structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Calibration functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.12/282.3.1RefSPAD calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.1.1RefSPAD calibration function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.1.2RefSPAD calibration procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.1.3Getting RefSPAD calibration results . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.1.4Setting RefSPAD calibration data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19DocID031478 Rev 1

UM2356Contents3.23.3Offset calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.2.1Offset calibration function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.2.2Offset calibration procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.2.3Getting offset calibration results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.2.4Setting offset calibration data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20Crosstalk calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.3.1Cross talk calibration function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.3.2Cross talk calibration procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.3.3Crosstalk calibration distance characterization . . . . . . . . . . . . . . . . . . . 213.3.4Getting crosstalk calibration results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.3.5Setting crosstalk calibration data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.3.6Enable/Disable crosstalk compensation . . . . . . . . . . . . . . . . . . . . . . . . 234Driver errors and warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245Acronyms and abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27DocID031478 Rev 13/2828

VL53L1X system overview1UM2356VL53L1X system overviewThe VL53L1X system is composed of the VL53L1X module and a driver running on thehost.Figure 2. VL53L1X system,ŽƐƚ ŽƐƚ s ϱϯ ϭy LJƐƚĞŵs ϱϯ ϭy ƌŝǀĞƌ/Ϯ s ϱϯ ϭy ŵŽĚƵůĞST delivers a software driver, referred to as the “driver” in this document.This document describes the driver functions accessible to the host, to control the deviceand get the ranging data.The driver is an implementation of a set of functions for using the VL53L1X device. It makesminimal assumptions on the OS integration and services. As such, sequencing of actions,executing/threading model, platform adaptation, and device structure allocation are not partof the driver implementation but are left open to the software integrator.The sequencing of the function calls must follow a set of rules, defined in this document.4/28DocID031478 Rev 1

UM2356Ranging API function descriptions2Ranging API function descriptionsThis section give a functional description of the ranging and describes the API call flow thatshould be followed to perform a ranging measurement using the VL53L1X.2.1Autonomous ranging descriptionThe sensor performs the ranging continuously and autonomously with a programmableinter-measurement period.Ranging is done without involvement from the host which allows the host to be in a lowpower state. The host is only woken up upon measurement interrupts when a ranging isavailable.It is possible to set a threshold of distance and/or signal detection criteria, then an interruptis raised when the criteria is met.2.2Timing considerationsThe timing budget is defined as the programmed time needed by the sensor to perform andreport ranging measurement data. During this time, the VCSEL is pulsed. An interrupt israised or the date ready register is updated at the end of the timing budget.The inter-measurement period is defined as the programmed time between two consecutivemeasurements.Figure 3 shows the timing budget and inter-measurement period.The host can change the default timing budget and inter-measurement period by using adedicated driver function described in Section 2.5.2: Timing budget and inter-measurementperiod.The host can decide to change the timing budget to improve ranging accuracy or maximumdistance limits.Figure 3. VL53L1X autonomous ranging sequence and timings3RZHU 6XSSO\;6KXW*3,2 ,QWHUUXSW'ULYHU &RPPDQG6\VWHP 6WDWH6WDUW 5DQJLQJ6: 6WDQGE\*HW5DQJ ,QLW5DQJLQJ5DQJLQJ *HW5DQJ &OHDU ,QW ,QWHU 0HDVXUHPHQW7LPLQJ %XGJHW5DQJLQJ5DQJLQJ 6WRS 5DQJ ,QWHU 0HDVXUHPHQW6: 6WDQGE\7LPLQJ %XGJHW,QWHU 0HDVXUHPHQW 3HULRGDocID031478 Rev 15/2828

Ranging API function descriptions2.3UM2356API function call flowsThe VL53L1X driver is used in two use cases:2.3.1 Calibration flow for device calibration Ranging flow used at user applications levelCalibration flowCalibration flow is described in Figure 4.All API functions for calibration are described in Section 3: Calibration functions.Figure 4. VL53L1X calibration flowtĂŝƚ ĞǀŝĐĞ ŽŽƚĞĚ;Ϳ ĂƚĂ/Ŷŝƚ;Ϳ ĞLJ ƚĂƚŝĐ/Ŷŝƚ;Ϳ,ŽƐƚ ĐĂůůƐ ĚƌŝǀĞƌ ĨƵŶĐƚŝŽŶWĞƌĨŽƌŵZĞĨ ƉĂĚDĂŶĂŐĞŵĞŶƚ;Ϳ,ŽƐƚ ĐĂůůƐ KƉƚŝŽŶĂů ĚƌŝǀĞƌ ĨƵŶĐƚŝŽŶWĞƌĨŽƌŵKĨĨƐĞƚ ĂůŝďƌĂƚŝŽŶ;Ϳ,ŽƐƚ ĂĐƚŝŽŶWĞƌĨŽƌŵyƚĂůŬ ĂůŝďƌĂƚŝŽŶ;Ϳ'Ğƚ ĂůŝďƌĂƚŝŽŶ ĂƚĂ;Ϳ ĂǀĞ ƉĂƌƚ ĐĂůŝďƌĂƚŝŽŶ ĚĂƚĂ6/28DocID031478 Rev 1

UM23562.3.2Ranging API function descriptionsRanging flowRanging flow is described in Figure 5.Figure 5. VL53L1X ranging flow ĞLJtĂŝƚ ĞǀŝĐĞ ŽŽƚĞĚ;Ϳ ,ŽƐƚ ĂĐƚŝŽŶ ĂƚĂ/Ŷŝƚ;Ϳ,ŽƐƚ ĐĂůůƐ ĚƌŝǀĞƌ ƚĂƚŝĐ/Ŷŝƚ;ͿĨƵŶĐƚŝŽŶ ĂƚĂ ƌĞƐƵůƚKƉƚŝŽŶĂů ĂŶĚͬŽƌ Ğƚ ĂůŝďƌĂƚŝŽŶ ƌŝǀĞƌ ŝŶƚĞƌŶĂů ĂĐƚŝŽŶĨƵŶĐƚŝŽŶƐ ĐĂůů,ŽƐƚ ĐĂůůƐ KƉƚŝŽŶĂů ƚĂƌƚDĞĂƐƵƌĞŵĞŶƚ;ͿĚƌŝǀĞƌ �,ŽƐƚ ƉŽůůŝŶŐ ŵŽĚĞ/ŶƚĞƌƌƵƉƚ ŵŽĚĞ ƌŝǀĞƌ ƉŽůůŝŶŐ ŵŽĚĞ'ĞƚDĞĂƐƵƌĞŵĞŶƚ ĂƚĂZĞĂĚLJ;ͿtĂŝƚDĞĂƐƵƌĞŵĞŶƚ ĂƚĂZĞĂĚLJ;Ϳ ŚĞĐŬƐ ŝŶƚĞƌƌƵƉƚ ƐƚĂƚƵƐWŽůůƐ ŽŶ ŝŶƚĞƌƌƵƉƚ ƐƚĂƚƵƐ/ŶƚĞƌƌƵƉƚ �Ŷƚ ĂƚĂ;Ϳ ĂƚĂ ůĞĂƌ/ŶƚĞƌƌƵƉƚ ŶĚ ƚĂƌƚDĞĂƐƵƌĞŵĞŶƚ;Ϳ ůĞĂƌƐ ŝŶƚĞƌƌƵƉƚŶĂďůĞƐ ŶĞdžƚ ƌĂŶŐŝŶŐ ŽŶƚŝŶƵĞ ͍ KEd/Eh ƚŽƉDĞĂƐƵƌĞŵĞŶƚ;ͿDocID031478 Rev 17/2828

Ranging API function descriptions2.4UM2356Mandatory ranging functionsThe following sections shows the API functions required to perform system initialization,before starting a measurement.2.4.1Data initThe VL53L1 DataInit() function is called once. It performs device initialization.It is called once and only once after the device is brought out of reset.2.4.2Static InitThe VL53L1 StaticInit() function allows loading of the device settings that arespecific for a given use case.2.4.3Start a measurementThe VL53L1 StartMeasurement() function must be called to start a measurement.2.4.4Waiting for a result: polling or interruptThere are three ways to know that ranging data are available:1.The host can call a polling function to wait until ranging data are available,The function VL53L1 WaitMeasurementDataReady() polls on the device interruptstatus until ranging data are ready.This function blocks all other operations on the host as long as the function is notcompleted, because an internal polling is performed.2.The host can poll on a function to ask if the ranging data are available,The host can poll on the function VL53L1 GetMeasurementDataReady() to know if newranging data are ready.This function does not block other operations. It is the preferred and recommended methodif the sensor is used in polling mode.3.The host can wait for a physical interruptAn alternative and preferred way to get the ranging status is to use the physical interruptoutput: by default, GPIO1 is pulled down when new ranging data are ready.This pin is an output pin only, there is no input interrupt pin on this device.2.4.5Get measurementThe Vl53L1 GetRangingMeasurementData() can be used to get ranging data.When calling this function to get the device ranging results, a structure calledVL53L1 RangingMeasurementData t is returned.This structure is described in Section 2.6: RangingMeasurementData structure.8/28DocID031478 Rev 1

UM23562.4.6Ranging API function descriptionsClear source of interruptThe interrupt must be cleared by calling the driver function:VL53L1 ClearInterruptAndStartMeasurement()after reading the ranging dataTo get consistent results, it is mandatory to call this function after getting the rangingmeasurement.If this function is not called, the next ranging will start and the results will be updated. But,the data ready status flag will not be updated, and the physical interrupt pin will not becleared.2.4.7Stop a measurementThe host can decide to stop the measurement by calling theVL53L1 StopMeasurement() function.If the stop request occurs during a range measurement, then the measurement is abortedimmediately.2.5Optional driver functions2.5.1Wait for bootThe VL53L1 WaitDeviceBooted() function ensures that the device is booted and ready.This function is optional. It is a blocking function because there is an internal polling. Thisfunction should not be blocking for more than 4 ms, assuming 400 kHz I2C and 2 ms latencyper transaction.2.5.2Timing budget and inter-measurement periodTiming budget is the time required by the sensor to perform one range measurement.The VL53L1 SetMeasurementTimingBudgetMicroSeconds() is the function to beused.The minimum and maximum timing budgets are [20 ms, 1000 ms]Example:Status VL53L1 66000 ); sets the timing budget to 66 ms.The function VL53L1 GetMeasurementTimingBudgetMicroSeconds() gets theprogrammed timing budget.The inter-measurement period is the delay between two ranging operations.An inter-measurement period can be programmed. When a ranging completes, the devicewaits for the end of the programmed inter-measurement period before resuming the nextranging. In the inter-measurement period, the sensor is in a low-power state.The VL53L1 SetInterMeasurementPeriodMilliSeconds() is the function to beused.DocID031478 Rev 19/2828

Ranging API function descriptionsUM2356Example:Status VL53L1 000 ); sets the inter-measurement period to 1 s.The function VL53L1 GetInterMeasurementPeriodMilliSeconds() gets theprogrammed inter-measurement period.Note:If the inter-measurement period is shorter than the timing budget, once the devicecompletes the ranging, the next ranging starts immediately.Note:The timing budget and inter-measurement period should not be called when the sensor isranging. The user has to stop the ranging, change these parameters, and restart ranging.2.5.3Distance modeDistance mode is a parameter provided to optimize the internal settings and tunings to getthe best ranging performances depending on the ranging distance required by theapplication and the ambient light conditions.The benefit of changing the distance mode is detailed in Table 1: Distance modesTable 1. Distance modesPossible distance modesMaximum distanceShortUp to 1.3 mMediumUp to 3 mLong (default)Up to 4 mBenefit / commentsBetter ambient immunityMaximum distanceThe function to use is VL53L1 SetDistanceMode().The user can call VL53L1 GetDistanceMode() to get the programmed distance mode.2.5.4Limit check settingsThe driver uses two parameters to qualify the ranging measurement: signal and sigma.If signal or sigma are outside the limits, the ranging is flagged as invalid (note thatRangeStatus is different than zero).Applicable limits are: Sigma: VL53L1X CHECKENABLE SIGMA FINAL RANGESigma is expressed in mm and is the estimation of the standard deviation of themeasurement. Signal: VL53L1X CHECKENABLE SIGNAL RATE FINAL RANGEThe signal rate measurement, expressed in MCPS, represents the amplitude of the signalreflected from the target and detected by the device.10/28DocID031478 Rev 1

UM2356Ranging API function descriptionsTable 2 gives the default limit states and values.Table 2. Default limit states and valuesLimit IDDefault limit stateDefault limit valueAssociated RangeStatusSigmaEnabled15 mm1SignalEnabled1 Mcps2If the user disables the limit checks, the ranging values will no longer be filtered and anincorrect measurement could be returned by the sensor. In this case, RangeStatus 1 and 2will never be reported.Changing limit default settings should be done with care, as the side effects can beimportant.The limit change effects on the standard deviation and maximum ranging distances areshown in Table 3.Table 3. Signal and sigma limit change effectsLimit IDSigmaSignalActionEffect onstandard deviationEffect on maximumranging distanceIncrease limit- Decrease limit -Increase limit -Decrease limit- VL53L1X SetLimitCheckEnable() and VL53L1X GetLimitCheckEnable() areused to enable/disable a limit.The limit value is set using VL53L1X SetLimitCheckValue() andVL53L1X GetLimitCheckValue().One example of the signal limit setting is to enable a signal check and set the limit to 0.4 MCps:Status VL53L1X SetLimitCheckEnable(&VL53L1Dev,VL53L1X CHECKENABLE SIGNAL RATE FINAL RANGE, 1);Status VL53L1X SetLimitCheckValue(&VL53L1Dev,VL53L1X CHECKENABLE SIGNAL RATE FINAL RANGE, 0.40*65536);DocID031478 Rev 111/2828

Ranging API function descriptions2.5.5UM2356ThresholdsThe device can be configured to operate in distance and/or signal threshold detection mode.The ranging data is reported to the host when the pre-configured criteria are matched.Detection modeDetection mode allows selection of the filtering conditions: 0: no filter (default value, standard ranging mode) 1: filter on distance criteria onlyDistance detection mode, based on thresholds:Distance detection mode (through the CrossMode parameter) defines the distance criteria: 0: below a certain distance: "threshold low"–If object distance distance low or no object found: no report–If object distance distance low and object found: report1: beyond a certain distance: "threshold high"–If object distance distance high or no object found: no report–If object distance distance high and object found: report2: out of a distance range (min/max), "out of window"–Distance low detected distance distance high: no report–Distance low detected distance distance high: report3: Within a distance range (min/max), "inside window"–Distance low detected distance distance high: no report–Distance low detected distance distance high: reportDistance low is the minimum configured distance in millimeters.Distance high is the maximum configured distance in millimeters.No targetThis is an alternate detection mode. In the standard use case, if no target is detected, noranging is reported. Using no target detection mode (setting IntrNoTarget to 1) allows aninterrupt to be generated when no target is present.API functionVL53L1 SetThresholdConfig() is the function to use.The VL53L1 DetectionConfig t structure contains all parameters to be set.12/28DocID031478 Rev 1

UM2356Ranging API function descriptionsExample:Detectionconfig.DetectionMode 1Detectionconfig.Distance.CrossMode 3Detectionconfig.IntrNoTarget 0Detectionconfig.Distance.High 1000Detectionconfig.Distance.Low 100Status VL53L1 SetThresholdConfig(&VL53L1Dev, &detectionConfig );This function is used to program the device to report ranging only when an object isdetected within 10 cm and 1 m (as in this example).The function VL53L1 GetThresholdConfig() allows the programmed report thresholdconfiguration to be obatined.2.5.6Region of Interest (ROI) settingThe receiving SPAD array of the sensor includes 16x16 SPADs which cover the full field ofview (FoV). It is possible to program a smaller region of interest (ROI), with a smallernumber of SPADs, to reduce the FoV.To set a ROI different than the default 16x16 one, the user can call theVL53L1 SetUserROI() function.The ROI is a square or rectangle defined by two corners: top left and bottom right.Four coordinates are used to localize these two corners on the full SPAD array: TopLeftX TopLeftY BotRightX BotRightYThese coordinates are part of the VL53L1 UserRoi t structure.The user has to define the ROI coordinate values in the structure, and call the driverfunction to apply the ROI change.The minimum ROI size is 4x4.An example of an ROI setting is given in Figure 6.DocID031478 Rev 113/2828

Ranging API function descriptionsUM23567RS/HIW %RW5LJKW Ϭ ϭ Ϯ ϯ ϰ ϱ ϲ ϳ ϴ ϵ ϭϬ ϭϭ ϭϮ ϭϯ ϭϰ ϭϱ ϭϬ z y/ Figure 6. VL53L1X ROI setting y y/ %RW5LJKW; 7RS/HIW;Ϭ ϭ Ϯ ϯ ϰ ϱ ϲ ϳ ϴ ϵ ϭϬ ϭϭ ϭϮ ϭϯ ϭϰ ϭϱThe VL53L1 UserRoi t structure contains the coordinates of an ROI: TopLeftX: 8 bit integer that gives the top left x coordinate [0;15] TopLeftY: 8 bit integer that gives the top left y coordinate [0;15] BotRightX: 8 bit integer that gives the bottom right x coordinate [0;15] BotRightY: 8 bit integer that gives the bottom right x coordinate [0;15]Example to set one ROI (based on Figure 6):VL53L1 UserRoi t roiConfig;roiConfig.TopLeftX 9;roiConfig.TopLeftY 13;roiConfig.BotRightX 14;roiConfig.BotRightY 10;status VL53L1 SetUserROI(&VL53L1Dev, &roiConfig);14/28DocID031478 Rev 1

UM23562.5.7Ranging API function descriptionsSpad array coordinates versus sceneFigure 7 shows the coordinates of an object in the SPAD array compared to the location inthe FoV.Figure 7. VL53L1X coordinates vs scene2.5.8Optical center coordinatesDue to assembly tolerances, the optical center of the device can vary. The optical center ofthe device is measured for each part. The optical center coordinates are stored in the deviceNVM.The user has access to the optical center coordinates by calling:VL53L1 GetCalibrationData(). The returned structure VL53L1 CalibrationData tcontains a substructure VL53L1 optical centre t which contains the two coordinates(expressed in the SPAD number): x centre y centreThe host can use these two coordinates to better align the ROI to the optical center.DocID031478 Rev 115/2828

Ranging API function descriptions2.5.9UM2356VDDIO configurationAs described in the datasheet, the user can select two modes for a VDDIO value of 1V8 or2V8 modes.The selection of the mode is made directly in the code though a compilation key calledUSE I2C 2V8k.If this compilation key is defined, the system will go into 2V8 mode, otherwise, it will be keptin the default 1V8 mode.2.6RangingMeasurementData structureThe VL53L1 RangingMeasurementData t structure is composed of:16/28 TimeStamp: not implemented, please ignore it. StreamCount: this 8-bit integer counter increments at each range. The value starts at0, increments to 255, and then increments from 128 to 255. RangingQualityLevel: not implemented, please ignore it. SignalRateRtnMegaCps: this value is the return signal rate in MegaCountPer Second(MCPS). It is a 16.16 fix point value.To obtain a real value it should be divided by65536. AmbientRateRtnMegaCps: this value is the return ambient rate (in MCPS). It is a16.16 fix point value, which is effectively a measure of the infrared light. To obtain a realvalue it should be divided by 65536. EffectiveSpadRtnCount: this 16 bit integer returns the effective SPAD count for thecurrent ranging. To obtain a real value it should be divided by 256. SigmaMilliMeter: this 16.16 fix point value is an estimation of the standard deviation ofthe current ranging, expressed in millimeters. To obtain a real value it should be dividedby 65536. RangeMilliMeter: this 16 bit integer give the range distance in millimeters. RangeFractionalPart: not implemented, please ignore it. RangeStatus: this 8 bit integer gives the range status for the current measurement. Avalue of 0 means the ranging is valid (refer to Table 4).DocID031478 Rev 1

UM2356Ranging API function descriptionsTable 4. Range statusValueRangeStatus string0VL53L1 RANGESTATUS RANGE VALID1VL53L1 RANGESTATUS SIGMA FAIL2VL53L1 RANGESTATUS SIGNAL FAIL4CommentRanging measurement is validRaised if sigma estimator check is above theinternal defined thresholdRaised if signal value is below the internaldefined thresholdVL53L1 RANGESTATUS OUTOFBOUNDSRaised when phase is out of boundsFAIL5VL53L1 RANGESTATUS HARDWARE FAIL Raised in case of HW or VCSEL failure7VL53L1 RANGESTATUS WRAP TARGETWrapped target, not matching phasesFAIL814VL53L1 RANGESTATUS PROCESSINGFAILInternal algorithm underflow or overflowVL53L1 RANGESTATUS RANGE INVALID The reported range is invalidDocID031478 Rev 117/2828

Calibration functions3UM2356Calibration functionsTo benefit from the full performance of the device, the VL53L1X driver includes calibrationfunctions that should be run once at the customer production line.Calibration procedures have to be run to compensate the part-to-part parameters and thepresence of the cover glass that may affect the device performance.Calibration data stored in the host have to be loaded into theVL53L1X at each startup usinga dedicated driver function.Three calibrations are needed: RefSPAD, offset, and crosstalk.The order the calibration functions are called is important: RefSPAD should be called first,offset second, and crosstalk third.The three calibration functions can be done sequentially one after another, or individually.When run individually, the previous step data have to be loaded before running the currentcalibration.3.1RefSPAD calibrationThe number of SPADs is calibrated during the final module test at ST. This part-to-part valueis stored in the NVM and automatically loaded into the device during boot.This calibration allows adjustment of the number of SPADs to optimize the device dynamic.However, adding a cover glass on top of the module may affect this calibration. Werecommend that the customer performs this calibration again in the final product application.The same algorithm running at FMT is applied when this function is called. The algorithmsearches through the three possible types of SPAD:1.Non attenuated SPAD2.SPAD attenuated by a factor of 53.SPAD attenuated by a factor of 10The number and type of SPAD is selected to avoid internal signal saturation.3.1.1RefSPAD calibration functionA dedicated function is available for this operation:VL53L1 PerformRefSpadManagement(&VL53L1Dev)Note:18/28This function must be called first in the calibration procedure.DocID031478 Rev 1

UM23563.1.2Calibration functionsRefSPAD calibration procedureThe user has to ensure that there are no targets closer than 5 cm from the sensor during thecalibration.It is better to perform this calibration in low IR light conditions (indoor).The time to perform this calibration is only few milliseconds.The VL53L1 PerformRefSpadManagement function has to be called after theVL53L1 DataInit() and VL53L1 StaticInit() functions are called. Refer toFigure 4: VL53L1X calibration flow.When the calibration function is called, the RefSPAD calibration is performed and the newRefSPAD parameters are applied at the end.3.1.3Getting RefSPAD calibration resultsThe function VL53L1 GetCalibrationData() allows all calibration data to be obtained.The returned structure VL53L1 CalibrationData t also contains a substructure calledVL53L1 customer nvm managed t which contains the eight RefSPAD calibrationparameters: ref spad man num requested ref spads: this value is between 5 and 44. It givesthe number of SPADs selected. ref spad man ref location: this value can be –non attenuated SPAD–SPAD attenuated by a factor of 5–SPAD attenuated by a factor of 10Six additional parameters gives the good SPAD maps for the location selected.After factory calibration, these calibration data have to be stored in the host memory andloaded at each device start up to avoid redoing the calibration. Either the user stores theentire structure VL53L1 CalibrationData t or stores the eight parameters (to save memoryspace).3.1.4Setting RefSPAD calibration dataAt each start up, after a hard reset, the user can load the RefSPAD calibration data from thehost memory. The VL53L1 SetCalibrationData() has to be called after theVL53L1 DataInit() and VL53L1 StaticInit() functions are called. Refer toFigure 5: VL53L1X ranging flowIf the user has optimized the calibration data storage during the calibration, it isrecommended to get the entire calibration structure by callingVL53L1 GetCalibrationData(), modifying the eight parameters described inSection 3.1.3: Getting RefSPAD calibration results, and callingVL53L1 SetCalibrationData().DocID031478 Rev 119/2828

Calibration functions3.2UM2356Offset calibrationSoldering the device on the customer board or adding a cover glass can introduce an offsetin the ranging distance. This part-to-part offset has to be measured and compensatedduring the offset calibration.3.2.1Offset calibration functionA dedicated function is available for this operation:VL53L1 nceMilliMeter)The argument of the function is the offset calibration distance in millimeters.Note:Offset calibration has to be performed before crosstalk calibration and after RefSPADoptimization is done (calibration done or RefSPAD parameters loaded).3.2.2Offset calibration procedureThe customer has to use a calibrated chart, placed at a given distance(CalDistanceMilliMeter) to perform the offset calibration.Details of the recommended setup are given in Table 5.Table 5. Offset calibration set upChartChart distance(CalDistanceMilliMeter)Ambient conditionsGray target(17 % reflectance at 940 nm)Recommended value: 140 mmDark(no IR contribution)When the calibration function is called, the offset calibration is performed and the offsetcorrection is applied at the end.3.2.3Getting offset calibration resultsThe function VL53L1 GetCalibrationData() allows all calibration data to be obtained.The returned structure VL53L1 CalibrationData t also contains a substructure calledVL53L1 customer nvm managed t which contains the main offset calibration result:algo part to part range offset mm.3.2.4Setting offset calibration dataThe customer can load the offset calibration data after the VL53L1 DataInit() andVL53L1 StaticInit() functions are called, by usingVL53L1 SetCalibrationData().However, it is better to call VL53L1 GetCalibrationData(), modify the parameterdescribed in Section 3.2.3: Getting offset calibration results(algo part to part range offset mm) and call VL53L1 SetCalibrationData().20/28DocID031478 Rev 1

UM23563.3Calibration functionsCrosstalk calibrationCrosstalk (xtalk) is defined as the amount of the return signal received on the sensing arraywhich is due to VCSEL light reflection inside the protective window (cover glass) added ontop of the module for aesthetic and protective reasons.Depending on the cover glass quality, the amount of the return signal can be significant andcan affect the sensor performance. The VL53L1X has a built-in correction that allows for thiscrosstalk

VL53L1X API user manual Introduction The VL53L1X is a long distance ranging Time-of-Flight sensor. . Sigma is expressed in mm and is the estimation of the standard deviation of the measurement. Signal: VL53L1X_CHECKENABLE_SIGNAL_RATE_FINAL_RANGE The signal rate measurement, expr

Related Documents:

api 20 e rapid 20e api 20 ne api campy api nh api staph api 20 strep api coryne api listeriaapi 20 c aux api 20 a rapid id 32 a api 50 ch api 50 chb/e 50 chl reagents to be ordered. strips ref microorganisms suspension inoculum transfer medium i

Latest API exams,latest API-571 dumps,API-571 pdf,API-571 vce,API-571 dumps,API-571 exam questions,API-571 new questions,API-571 actual tests,API-571 practice tests,API-571 real exam questions Created Date

3 API Industry Guide on API Design Apiary - Apiary jump-started the modern API design movement by making API definitions more than just about API documentation, allowing API designers to define APIs in the machine-readable API definition format API blueprint, then mock, share, and publish

FireEye's Endpoint Security Policy API provides a rich API to allow users to explore functions within the API. The Policy API Tool allows users to add remove and list policy exceptions quickly as well as list create policies for the tool. Overview To get started with the API you will need to create an API user or API Admin to access the API.

May 01, 2014 · API RP 580 API RP 580—Risk-Based Inspection API RP 581 API RP 581—Risk-Based Inspection Technology API RP 941 API RP 941—Steels for Hydrogen Service at Elevated Temperatures and Pressures in Petroleum Refineries and Petrochemical Plants API RP1 API Recommended Practices. API

API RP 4G Section 3 API RP 54 Section 9.3.17 API RP 54 Section 9.3.18 API RP 54 Section 9.7 API RP 54 Section 9.2.1 API RP 54 Section 9.3.8 API RP 54 Section 9.3 API RP 54 Section 5.5.1 API RP

Division 1 & 2, ANSI B16.5, API RP 14E, API RP 14C and API RP 14J, API RP 520 Part 1 & 2, API 521, API 526, API 2000, API 1104 and NACE MR-01-75 Select the appropriate ANSI / API pressure/temperature ratings for pipe flanges, valves, and fittings Analyze piping systems so as to determine piping “spec breaks”

with an illustration of a sword and the main road located to the west of Sutton 6 7 Part of Thomas Jeffrey’s 1771 map of Yorkshire 6 8 Locations of the geophysical survey grid and the excavation trench 7 9 Results of the electrical earth resistance survey of the area across Old London Road, Towton 8 10 Results of geophysical survey shown superimposed over an aerial photograph 9 11 Electrical .