cancel
Showing results for 
Search instead for 
Did you mean: 

VL6180X range measurement scaling

tonisvain
Associate

Hi

From a the VL6180 documentation i found that there is a scaling factor.
As i read from it, the default is 3 and this means that the response are in mm (1mm resolution)
If it is changed to 2, the result will have a resolution of 2/3 mm ect. 

But in the VL6180X documentation, there is no mention of the range scaling anywhere.
Is is just omitted from the documentation for some reason or is the functionality not there?

I'm looking for a TOF sensor to range between 5 and 30mm. Sub mm resolution would be great, even if noisy. i need to measure relative displacement within this range.
Or if you have a recommendation for another small package size sensor that is better, i'm all ears.


Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

alas it doesn't work that way. Setting he scaling to 3 means we get the range in mm, divide by 3 and hand you the result. Then you multiply the value by three to get the final range. You end up with worse resolution, but you can range farther.

Your best bet is to use the VL53L4CX. It uses histograms and they are proving to be a better way to go. It also collects photons for the entire time you allow. (The 6180 ranges until it gets enough photons, making it faster, but less accurate.)

You will get a far more consistent answer. 

But there is phase error. If you do a Stop/Start the phase will be ever so slightly different. And that will lead to a difference of one or two mm. Only way around it that I can see is to range on a known target and do a mini offset calibration every time you start. 

At that point you have eliminated most of the error. The rest is statistical in nature, so just take more ranges and average I suppose.

And one last thing.. As the sensor heats up, the distance will change. But every 2 degrees C we recalibrate the VHV (very high voltage) circuit, and you become more accurate again. This will lead to a 'saw tooth' sort of plot over time. 

Best bet here is a massive heat absorbing ground plane to slow that cycle. Unless you have a better idea.

- john


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

View solution in original post

3 REPLIES 3
John E KVAM
ST Employee

When we invented the VL6180 we never imagined it would work this well. So the distance return was an 8-bit byte, limiting us to 255mm or 25cm. But we found in testing we could go to 60cm. So we invented that scaling bit as a hack to get around our short-sightedness.

The VL6180 is going end-of-life as we can no longer buy the bits we need to make it. So I would not use that one.

The replacement is VL53L4CD or VL53L4CX (CD limited to 1.3M, CX works to 6M).

CX is slightly more accurate which is why I mention it. It's can do that 5-30mm you desire. 

But be careful. We do not promise mm accuracy. You can come close but if you really need mm accuracy, you are going to be disappointed. 

Buy the P-Nucleo-53L4A2 and try it. (It's only $56) Prove it meets your needs before you get too far along. The code will plot the results on your PC and you can see it in action.

 

- john


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.

Thank you for the response.

So can the resolution be set to 1/3mm for either of the sensors or is the functionality omitted and only 1mm resolution is available?
Why I'm asking is that I can aggregate the results and take an average. The fractions might be noisy, but it might help me get a better reading. (less "staircasing")
I know that the absolute measurement might not be accurate even to a mm, but I'm interested in the absolute position measurement anyway. The object measured has a hard limit where it sits most of the time. i just need to measure its relative travel from one move to another. The exact distance itself is not critical.

The more i read, the more I think, it might not be the correct sensor type for the task, but it seems to be the only one that fits my constraints.
Anyway I'll give it the old collage try.

Thanks.

alas it doesn't work that way. Setting he scaling to 3 means we get the range in mm, divide by 3 and hand you the result. Then you multiply the value by three to get the final range. You end up with worse resolution, but you can range farther.

Your best bet is to use the VL53L4CX. It uses histograms and they are proving to be a better way to go. It also collects photons for the entire time you allow. (The 6180 ranges until it gets enough photons, making it faster, but less accurate.)

You will get a far more consistent answer. 

But there is phase error. If you do a Stop/Start the phase will be ever so slightly different. And that will lead to a difference of one or two mm. Only way around it that I can see is to range on a known target and do a mini offset calibration every time you start. 

At that point you have eliminated most of the error. The rest is statistical in nature, so just take more ranges and average I suppose.

And one last thing.. As the sensor heats up, the distance will change. But every 2 degrees C we recalibrate the VHV (very high voltage) circuit, and you become more accurate again. This will lead to a 'saw tooth' sort of plot over time. 

Best bet here is a massive heat absorbing ground plane to slow that cycle. Unless you have a better idea.

- john


If this or any post solves your issue, please mark them as 'Accept as Solution' It really helps. And if you notice anything wrong do not hesitate to 'Report Inappropriate Content'. Someone will review it.