cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L7CX

raphiec
Associate

I am having trouble with the VL53L7CX recording incorrect measurements after being powered on. Often times the distance if off consistently until I unplug it and plug it back in (The raspberry pi). Sometimes even that will not solve the problem. I have looked at the calibration function but it seems that it is only for cover glass and I use none. Has anyone had this issue and know how to solve it?

1 REPLY 1
John E KVAM
ST Employee

I could use a few more hints about what is going on, but that doesn't stop me from making guesses. 

I2C is an awful bus. It hangs a lot. So, if your wires are too long, or not properly shielded or there is too much noise in your system, you can stick the bus. Google "I2C bus stuck low". It's an absolutely classic problem. 

And you can check it with a voltmeter. When not in use the I2C lines are both high. If it's stuck, one of the lines will be pulled low. 

Toggling the I2C_RST should fix it. The discription in the datesheet is:

I2C_RST - Digital input
I2C interface reset pin, active high. Toggle this
pin from 0 to 1, then back to 0 to reset the I2C
slave. Connect to GND via 47 kΩ resistor.

Another thing to try is toggling the LPn pin. This shuts off the I2C interface.

The next thing to check is if the VCSEL (laser) light is actually firing. Use any camera EXCEPT an IPhone. (IPhones have a really good IR filter), if you do not see the red glow, then your sensor has stopped for some reason. Generally, this happens if the power is iffy. 

It's possible that the sensor has stopped ranging and the I2C interface is working just fine. In this case you will always get the same stale data. 

Try re-issuing the start command. If that doesn't work, you are going to have to shut down the sensor and re-boot. 

But generally, this is power or noise related. Again, better wires is the answer. 

I was using jumper wires on a demo. The only solution was to solder them. Best if you can get a 40-pin header, and solder to that. That way you get a good connection, and you can still remove the header if you need to.

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