VL53L0X I2C Communication

I am currently working on integrating a ToF (Time of Flight) sensor to the Dash and I am using the Adafruit VL53L0X. My current issue is that I am getting a timeout error when the sensor is connected to the Dash (continuously printing to Serial 65535) which I assume is because the Dash is not reading any data from the sensor. I have also connected the sensor to an Arduino Uno and it is working fine. When connected to the Arduino, I am getting readings of 4.5V from SDA and 4.6V from SCL (Positive probe of volt meter was on SDA or SCL while the negative probe was on GND). I double checked the voltage coming from VIN and that was 5V.
When connected to the Dash, I am getting readings of 2V from SDA and 1.7V from SCL. Again, I double checked the voltage coming from VIN and that was also at 5V

(Note: I am using the Pololu library rather than the Adafruit library. See VL53L0X fails PerformRefCalibration - adafruit industries for a similar error).

My pinout is:

Dash VL53L0X board
------- -------------
VIN - VIN
GND - GND
SDA - SDA
SCL - SCL

Arduino Uno VL53L0X board
----------- -------------
A5(3.3V) - VIN
GND - GND
A4 - SDA
A5 - SCL

So, do I need to use a level shifter to increase the voltage on the SDA and SCL lines? I have tried using pull up resistors and that didn’t work either. I am very new to working with electronics so any help would be greatly appreciated!

Update:

So I got the sensor working… And I am extremely embarrassed by my mistake… I’ll explain how I found it,
I was testing the voltages again from each of the lines on both the Arduino and the Dash. The readings were as follows:

Arduino
GND->SDA 1.31V
GND->SCL 1.78V
VIN->SDA 3.48V
VIN->SCL 3.14V

Dash
GND->SDA 3.68V
GND->SCL 3.14V
VIN->SDA 1.13V
VIN->SCL 1.13V

From here I realized that the values were pretty much reversed from one another. I took another closer look at the diagram and saw that I had swapped the SDA and SCL pins going from the Dash to the sensor. So as soon as I swapped them back correctly, everything was working exactly the same as the Arduino.

Lesson learned: Double check that all the jumpers are going to the right pins :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.