cancel
Showing results for 
Search instead for 
Did you mean: 

VL6180X unstable range results

Jan Wustrau
Associate III

Hi,

Readings from my VL6180X sensor are very unstable. They vary about +-8 mm from measure to measure.

I tried with Nucleo board and official api, and also with Arduino board and Sparkfun code. 2,8V power supply is from linear regulator, measured object is solid white at distance 50 mm.

I tried to supply it from battery instead of usb, nothing helps.

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

There are three big variables.

  • The size of the target,
  • the Distance to the target
  • the reflectivity of the target.
  • The amount of ambient light - usually Sunlight

These will affect your ability to range, and I'm guessing one of them, or maybe more is your issue.

To get some idea of what is going on, chooses a white sheet of paper - it's 88% reflective.

You should get good numbers from it.

And after each range you can ask for the signal strength, and the ambient rate.

Is the strengh high and the ambient low?

Then use your hand - it's about 50% reflective and most hands are about the same size.

you should be able to see it - to about 70cm.

If you have $50 to spend, invest in the P-NUCLEO-6180A2 development board.

Use that system to get the right answer. It has a logging function that will tell you what is going on.

And if that system works and yours does not, you might figure out what is going wrong using the log data.

  • 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

There are three big variables.

  • The size of the target,
  • the Distance to the target
  • the reflectivity of the target.
  • The amount of ambient light - usually Sunlight

These will affect your ability to range, and I'm guessing one of them, or maybe more is your issue.

To get some idea of what is going on, chooses a white sheet of paper - it's 88% reflective.

You should get good numbers from it.

And after each range you can ask for the signal strength, and the ambient rate.

Is the strengh high and the ambient low?

Then use your hand - it's about 50% reflective and most hands are about the same size.

you should be able to see it - to about 70cm.

If you have $50 to spend, invest in the P-NUCLEO-6180A2 development board.

Use that system to get the right answer. It has a logging function that will tell you what is going on.

And if that system works and yours does not, you might figure out what is going wrong using the log data.

  • 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.
Jan Wustrau
Associate III

I tried it with white paper, in open air (als = 20, distance = 50 mm) and also closed together in black box (als = 0, distance = 35 mm).

Now i connected sensor to your gui app, please find results below (als = 0, distance = 35 mm).

RangeSmoothed looks very good - this is what i want. With small mean function it will be enough for me.

I have read, that TrueRange is read from register 0x62 and smoothed is raw result read from 0x64 (without cross talk compensation). Is it right?

Maybe problem is in cross talk settings? Now i don't have any glass cover, but i also tried with it before (of course with proper calibration).

0693W00000BcN6lQAF.png0693W00000BcN6bQAF.png

John E KVAM
ST Employee

If you don't have a cover glass, and you don't have an obstruction, then you don't have crosstalk. Cross talk is a condition where photons short-circuit the system and reflect back to the receiver without going out into the world.

Photons are really fast. 6.7pico secons per mm round trip. You cannot get that kind of a measurement in a tiny, inexpensive chip. (A pico second is a millionth of a millionth of a second.) Heck you can't to that with an expensive scope.

So we use statistics. And what you are seeing is the variability in those statistics.

If I told you that you would be getting 134mm +/- 1.5 I think you would be happy. Your results are actually better than our datasheet says they will be.

(By only looking at one target refectivity, you results are fine.)

If you have the time to take a lot of measurements, you can average them together as you have done with your smoothed line. But the sensor can do that too. By using a longer TimingBudget, you are gaining accuracy. 4X the TimingBudget generally equals 2X the accuracy.


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.