cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring short ranges with VL6180

KSkor.1
Associate III

Hi,

we are planning to use 3x VL6180 on same PCB to accurately (1mm) measure distances in a dark container. Our required range of measurement is 2 to 80mm. So far we got to around 0.5mm accuracy, but the problem is repeatability.

Exactly what i mean is that once we calibrate our sensors offset, the sensor works flawlessly, but once we change the distance and return to same one, we don't get same result every time, but +/- 2mm error.

Since speed of measurement and power consumption is not an issue, we disabled all the filters and set high convergence time.

Our parameters for the VL6180.

VL6180_UpscaleSetScaling(myDev, 1);

VL6180_RangeSetEceState(myDev, 0);

VL6180_FilterSetState(myDev, 0);

VL6180_RangeIgnoreSetEnable(myDev, 0);

VL6180_RangeSetMaxConvergenceTime(myDev, 63);

Maybe someone has more experience with this sensor and knows for a settings that would improve our readings??

Thank in advance.

4 REPLIES 4
John E KVAM
ST Employee

The high convergence time doesn't change anything. That's just the max amount of time you give the sensor to collect enough photons to get a measurement.

But once it gets enough photons it calculates an answer - generally in the 10ms range of time.

You would be better off to take a lot of measurements and average them.

Best results will be if you only have 1 target - or if all your targets are the same reflectivity.

That being said 1mm accuracy is really just beyond the ability of the sensor. Although at that distance and enough averaging, you should get close.

-john


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'
KWine
Senior

Just FYI, we have used multiple VL6180 on a single I2C bus. And to confirm John's point, our results for range jitter are generally 1.0 mm standard deviation for averaged measurements at a fixed (i.e., at 20 or 30 mm) target distance. So 1 mm accuracy is likely not possible with this sensor.

KSkor.1
Associate III

Hi, thanks for replies.

To further explain our application. We use 20 of this sensors on 1 bus to measure different point inside a container, and all surfaces have same reflectivity(textile). At the moment we take 80 measurements with each sensors, first use median averaging and then mode averaging. It takes 2s for each sensor to read, but we do achieve +/- 0.5mm accuracy and +/- 0.25mm repeatability, which is enough for our application. Our only problem is error in under 10mm range. At that range we get anything from 5 to 15mm, while actual distance is 5mm.

John E KVAM
ST Employee

The very short distances (less than 1cm) have always been an issue. It clearly states that in the datasheet.

My recommendation - if you can do it - is to move the sensor back up into your housing so at the logical zero distance, the sensor is actually 1cm back up into your device.

It does solve the problem, but not everyone has the space in their design.

Congratulations on getting the accuracy you need.

  • john


Our community relies on fruitful exchanges and good quality content. You can thank and reward helpful and positive contributions by marking them as 'Accept as Solution'. When marking a solution, make sure it answers your original question or issue that you raised.

ST Employees that act as moderators have the right to accept the solution, judging by their expertise. This helps other community members identify useful discussions and refrain from raising the same question. If you notice any false behavior or abuse of the action, do not hesitate to 'Report Inappropriate Content'