cancel
Showing results for 
Search instead for 
Did you mean: 

TOF data varies every half hour

Vraj_patel
Associate

We have TOF data collected every half hour, but we are surprised by the results, as the TOF data is not consistent each time.

4 REPLIES 4
Anne BIGOT
ST Employee

Hello

Can you please let us know with Hardware and which SW package you are using ?

 


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'
John_Kvam
Senior

Vraj - 

Because the ToF uses a laser people expect mm accuracy. Unfortunately this is a still a sub 10 dollar part - maybe a little more, but it's still amazingly inexpensive. 

Because the sensor is so inexpensive, and low power, the clock speed is not all that high, and the speed of light is really fast. So the sensor has to use statistics. And some variability is expected. 

Have a look at the datasheet. It will tell you the expected results.

But I'm guessing that if you only take a measurement once every half hour, it's temperature that is getting you. 

As the temperature changes, the sensor adjusts, but only about 2 degrees C per range. But on a fall day, the temp can change more that that in a half hour. 

So you can stop the sensor and go through the init procedure again, then take a measurement. But I suspect that if you just took 3 measurements keeping the last one, you would do better.

You did not say which sensor you have. Choices are VL53L0, L1, L1X, L3, L4CD, L4CX, L5, L7 or L8 so it's hard to tell you more. 

Try taking 3 measurement when you want a range and compare that to your expected outcome. Should be better. 

But you are still going to vary by a few mm either way. 

- john

If this or any post solves your issue, please mark them as "Accept as Solution". It really helps the next guy.
And if you notice anything wrong do not hesitate to "Report Inappropriate Content".
I am a recently retired ST Employee. My former username was John E KVAM.

Hi John,

We are using VL53L1 ToF sensors, and I have attached JPEG images that show the placement of the four sensors. Currently, we are experiencing an issue where the measured distance values exhibit noticeable variation over time. The graph illustrates these readings in inches, based on data collected over a period of one month.
Additionally, we are running a script that controls all four VL53L1X ToF sensors through an I2C multiplexer, reads their individual distance measurements, and calculates the minimum usable clearance (available space) based on the sensor angles.
Here, I have attached the graph PDF and the Python test file for your reference.
Could you please help identify the possible reasons for these fluctuations and suggest how we can achieve more stable and consistent measurement data?

Thanks
John_Kvam
Senior

I'm impressed. Cool idea. 

So lets talk accuracy. Generally the sensor claims +/- 3%, but below 10 or 15 cm, that breaks down and you get something like +/- 5mm. Do check the datasheet. 

But you are seeing something more than that. 

So by giving a quick glance at your code I see that you are NOT setting a timing budget or Inter-measurement period. 

that means the sensors are emitting continuously, and although the sensors done generally interfere with each other there are limits, and you found them. With 4 sensors emitting inside a box, that box is too full of light. 

So this is what I think you can do...

Start one up, take 3 measurements, then shut it down. Evaluate the results. I'm thinking the last range will be best, but an average of the last two might be better. You can either shut it down by dropping the XShut line (which requires a re-init) or you can issue the stop command, which will retain all your setting and just re-issue the start when you want to go again. 

then repeat for the other sensors. 

By NOT interfering with each other, you will do better. 

Consider changing the timing budget to something like 100ms if you can afford the power and time. 

That will give you the best shot at a great answer. 

 

If this or any post solves your issue, please mark them as "Accept as Solution". It really helps the next guy.
And if you notice anything wrong do not hesitate to "Report Inappropriate Content".
I am a recently retired ST Employee. My former username was John E KVAM.