cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L0x

zhy
Associate II

 Hi,

the rear background exceeds 2 meters, and there are no obstacles in front of the sensor. The measurement data is unstable, and the reading sometimes reaches 0 and sometimes reaches 115.

 

zhy_0-1761185641250.png

zhy_1-1761186162004.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

dear John_Kvam,

    removed the front glass, and the situation improved, but it wasn't completely resolved. I used continuous mode, which sometimes triggered interruptions.

According to the program, Thresh_Low and Thresh_high should not exceed 255, correct?

                  thanks a lot

 

View solution in original post

2 REPLIES 2
John_Kvam
Senior

The sensor is going to average all the photons it receives and give you that answer. And it appears you are getting photons. 

Could it be that you have a coverglass and have not done the coverglass calibration?

If so the number of photons returned from the glass (distance 0) are averaging with your target (2M) and you are getting a distance somewhere in between. If the count from the glass equaled the number from the target you would get half the correct distance. 

Easy way to tell if this is the problem is to remove the glass and range. 

Or you could do the crosstalk cal and see what you get. 

The other thing I notice is your numbers are too high. 

Spad count should be less than 256. 

Signal rates are from 0.5MCPS to 20 MCPS or maybe higher, so your 34816 needs some explanation. 

Floating point numbers in this chip are sent as integers, with an implied fractional part. Something like a 4-byte integer but maybe 7 bits of fraction. (One needs to check the user manual (or code) to see where the engineer set the 'decimal point'. They are all different.)

So, divide the integer by 2 raised to the power of the fractional bits being sure to typecast the math as a float.

Float = return_value/256.0

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.

dear John_Kvam,

    removed the front glass, and the situation improved, but it wasn't completely resolved. I used continuous mode, which sometimes triggered interruptions.

According to the program, Thresh_Low and Thresh_high should not exceed 255, correct?

                  thanks a lot