VL53L0X freezes

I have the VL53L0X sensor connected to the Circuit Playground Express. I’m using a sketch that just performs continuous reads and outputs distance values to the serial monitor in mm. When I upload the sketch, the sensor usually reports accurate reads for about 10 seconds, then it either just hangs – with no output to the monitor – or it continuously reports the same value over and over.


First, I would try to touch-up your soldering. Most of your pins seem to have to much solder, which can result in cold solder joints. The Adafruit Guide to Excellent Soldering is a useful reference for that.

Are you using our Arduino library for the VL53L0X? Can you try using our example programs from that library?


OK, I’ve re-soldered all the pins. I’m getting the same behavior with the Adafruit VL53L0X library (works great for 10-20 seconds then freezes). Running the “Continuous” sketch from the Pololu library I get about 1 second’s worth of output, all with values of 8190, then it freezes.

I am concerned that your sensor’s behavior might be caused by a poor electrical connection. How are you testing the sensor, and are you certain that you are not disturbing any of the connections while the sketch is running? Are you moving things around or is everything stationary? Can you send me a picture of the new solder joints?


Everything is complete stationary when testing. I just re-ran a test with the Pololu library and it ran flawlessly for about 3 minutes…then it froze. Now it’s just giving me the 8190s. Here’s a pic of the re-soldered joints:

How repeatable is the VL53L0X sensor’s behavior with the improved soldering? Does it alway operate normally for three minutes before it starts returning 8190, or does its operating time change each time you restart the sketch?

Do you have a standard Arduino (like an Uno) that you could try testing your sensor with? There is possibly an issue with using our library on your board since we have not tested it with many Arduinos other than the ATmega328P and ATMega32U4-based ones.


The results are very inconsistent. Sometimes it works briefly, sometimes not at all. Sometimes it outputs 8190s, sometimes it outputs 65435s. I don’t have a standard Arduino – I guess I can get one. But I’m testing it with the Adafruit library as well, which I would assume is compatible with the Adafruit Circuit Playground Express. Do you not think that the fact it works intermittently is an indication of a bad VL53L0X unit?

We have not seen a failure mode like this before with the VL53L0X sensor, so it still seems more likely that this is a connection issue. I would try to rule that out by trying different wires and locations on the breadboard and by looking at the signals with an oscilloscope to get a better understanding of what is going on.

If that does not provide any insight, please email us at support@pololu.com with your order information.


Quick update: I bought an Uno and now the sensor is working like a champ. Thank you for your help!

1 Like