cancel
Showing results for 
Search instead for 
Did you mean: 

VL53L8CX I2C with ESP32

thomasboutant
Visitor

Hello,

I wanted to share about the VL53L8CX sensor and it's I2C.
I have been using a lot of VL53L sensors (5CX, 1X) and now the 8CX.

It always used to work super easily but with the VL53L8CX I cannot seem to make it work. 

Running an I2C scan doesn't detect anything.
I am using an integration board from Aliexpress so I don't know if the problem comes from it but I have seen many posts of people having (I2C) issues with this VL53L8CX and I have not yet seen a solution.

My wiring to ESP32-S3 is : 

VIN = 3.3V

GND to GND.

SDA to SDA 

SCL to SCL

LPn driven high by GPIO (I tried to wired it directly to 3.3V also)

NCS to GND. (I have tried with and without a resistor)
SPI_I2C_N to GND. (I have tried with and without a resistor)

 

I do not know if the problem comes with this integration board which I cannot find proper documentation of but otherwise I can only see the board from POLULU which is not as good because it does not allow to use the glass cover. 

Any help would be appreciated.Thanks

1 REPLY 1

Great question — I’ve worked with VL53L sensor modules and ESP32, so here’s what I found works best:

 

When using the VL53L8CX with ESP32 over I2C, the key points to check are:

 

1. Pull-up Resistors: ESP32’s internal pull-ups are often too weak for some sensors. Use external 4.7 kΩ or 10 kΩ pull-ups on SDA & SCL lines to 3.3V to help signal integrity, especially when longer wires or multiple devices are involved.

 

 

2. I2C Speed / Clock Stretching: Try lowering the I2C clock speed (e.g. to 100 kHz) instead of the default 400 kHz. Some VL53L sensors may not respond well to faster speeds, especially during measurement cycles where they stretch the clock.

 

 

3. Address Conflict / Multiplexing: If you have multiple sensors or other I2C peripherals, make sure the VL53L8CX has the correct address or use an I2C multiplexer. Address collisions are a common source of “no response” errors.

 

 

4. Power & Ground Stability: Ensure stable 3.3V supply with decoupling capacitors close to the sensor. Ground loops and noise can break communication.

 

 

5. Library / Initialization Sequence: Use the official ST-provided or well-tested libraries for VL53L8CX. Initialize the sensor only after I2C bus begins. Also check for return status codes after init — if initialization fails, don’t proceed further.