Skip to main content
This topic has been closed for replies.

2 replies

Visitor II
April 18, 2020

I didn't check your source code, but as you're displaying sub-mm values, you're obviously doing some post-processing.

So let me ask some simple questions:

  • Are you aware that you get a resolution of 1 mm/Bit? So a toggling of 1 mm is inevitable.
  • Are you aware that the precision stated is +/- 20 .. 25 mm (depending on ambient light conditions)?
  • Did you risk an eye on the datasheet - especially the measurement error plots?

I'd consider your results "better than to be expected". So what are you complaining about?

ST Employee
May 14, 2020

du00000001 is correct, although a bit abrupt.

The best accuracy can be obtained by increasing the ranging time. Does take more power, and more time, but 4 times the time, will give you twice the accuracy as a general rule.

I had one guy keep a running average to increase accuracy. If a new range deviated a lot then he assumed there was movement and he re-started the running average.

This way, you get re-activity and accuracy.

I've been guilty of wanting more accuracy out of the sensor as well. So your observation is not totally unfounded, but the speed of light is really fast and it is a inexpensive sensor.

  • john