About a month ago I encountered a broken VL6180X TOF sensor board that I was trying to use for my laser focusing project Laser Focus Assembly Completed.
The sensor wasn't even responding to I2C address queries which prompted me seek some help from the community Any known I2C issues with VL6180X TOF sensor. Gough Lui suggested that it was likely to be in the level translators for the SCL and SDA signals. The sensor itself runs on 2.8V from a local regulator but the I2C pins can interface to 3.3V or 5V levels set by the VIN pin.
Because this was a new purchase I decided to contact the seller rather than spending time to troubleshoot and possibly repair the board. The seller responded quickly and after going through some basic tests sent me a replacement board which worked. The seller did not want me to return the defective board.
After finishing my project I decided it would be worth taking a quick look at the defective board before throwing it away. I ran an I2C scanner program on an Arduino Uno and looked at the I2C signals before and after the translators.
Here are the signal at the input:
Here is the SCL signal before and after the translator 5V->2.8V:
Here is the SDA signal after the translator referenced to the SCL input:
It was fairly obvious that the SDA translator was broken. I had done a visual inspection of the board before to look for bad solder joints or shorts and nothing was apparent. I had used a DVM to check for shorts and continuity.
Here is a close up view of the defective board:
A close look at the level translators. SCL is on the left and SDA is on the right.
I noticed that the MOSFET in the SDA circuit appeared to have a crack in the body. I went to desolder the MOSFET and the body came off in two pieces so it definitely had been damaged in assembly. I guess these boards aren't tested post assembly. I don't keep a supply of SMD parts on hand and had to order a new BSS138 part which arrived today.
I replaced the part and ran a quick ranging test from 6 inches to 2 inches (measurements in mm). Everything worked!!
19:48:42.286 -> 147.80
19:48:43.288 -> 137.11
19:48:44.320 -> 119.14
19:48:45.316 -> 108.67
19:48:46.351 -> 98.19
19:48:47.352 -> 97.62
19:48:48.386 -> 86.70
19:48:49.382 -> 87.27
19:48:50.407 -> 86.92
19:48:51.440 -> 85.16
19:48:52.469 -> 76.69
19:48:53.465 -> 76.47
19:48:54.499 -> 66.81
19:48:55.500 -> 65.58
19:48:56.534 -> 53.23
19:48:57.528 -> 54.21
19:48:58.559 -> 53.51
19:48:59.593 -> 52.52
I now have a spare short range TOF sensor.