cancel
Showing results for 
Search instead for 
Did you mean: 

Varying data output of Vl53L1X

vishnusf
Associate III

Hi,

I am using Vl53L1x for a custom application. When i block the sensor with a black tape, i see that the data from getdistance or get signal rate function drops (increases for signal rate functn) after 1 min drastically. For example on blocking the sensor using get distance function the data initially shows reading of500-600, then drops to 300 range values and after 40 sec it drops to 200 and then to 90-100 after 1 min. I would like to know the reason for such drop and is it possible to obtain consistent reading range.

 

Thank u

1 ACCEPTED SOLUTION

Accepted Solutions
John E KVAM
ST Employee

The sensor has no memory. Nothing you have done before will affect the next range. So, if you are getting a time lag it's because the data you have in a serial buffer is not getting plotted on your PC in a timely manner. 

Python is notorious for this. Your PC is just not sucking the data up as fast as it's being input, and the PC serial buffer is huge. Python is pretty impressive, but no one said it was fast. 

Try pySerial Flush. Might fix you right up.

So what happens with black tape?

If you do a sloppy job of taping and a few photons can hit the tape and return, you will get a very low signal rate and a  distance very near zero.

if you do a great job, then no photons come back and you get a 'low signal' RangeStatus.

But you will also get an extremely low ambient count so you might be able to tell you have a tape situation. 

Try putting a coverglass over the sensor and then put the tape over the glass. 

that way you will get a lot of photons back - and you can tell it's tape. 

- 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

1 REPLY 1
John E KVAM
ST Employee

The sensor has no memory. Nothing you have done before will affect the next range. So, if you are getting a time lag it's because the data you have in a serial buffer is not getting plotted on your PC in a timely manner. 

Python is notorious for this. Your PC is just not sucking the data up as fast as it's being input, and the PC serial buffer is huge. Python is pretty impressive, but no one said it was fast. 

Try pySerial Flush. Might fix you right up.

So what happens with black tape?

If you do a sloppy job of taping and a few photons can hit the tape and return, you will get a very low signal rate and a  distance very near zero.

if you do a great job, then no photons come back and you get a 'low signal' RangeStatus.

But you will also get an extremely low ambient count so you might be able to tell you have a tape situation. 

Try putting a coverglass over the sensor and then put the tape over the glass. 

that way you will get a lot of photons back - and you can tell it's tape. 

- 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.