Skip to main content
Associate II
September 28, 2025
Question

VL53L8CX I2C with ESP32

  • September 28, 2025
  • 1 reply
  • 413 views

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

September 28, 2025

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.

Associate II
September 28, 2025

Hello,

Thank you for your answer.
So I used to work with ESP32-s3 and VL53L5CX (worked perfectly). Since the VL53L8CX was presented as the new 5CX I decided to give it a try for its extented capabilities.

1. I already have 4.7kohm resistors in between 3.3V and SDA ; and 3.3V and SCL.

 

2. I have tried 100kHz speed, no I2C device gets detected. I also tried to connect another device on the bus. Scan, it detects it. Then I add the VL53L8CX to the circuit and then nothing is detected anymore (instead of having 2 addresses detected).

3. Ok the address conflict might be a thing but then it should get detected when I only have this device on the I2C bus, which is not the case. 

 

4. I did not know about that, I will try to dig into that a bit yet I do not understand why there would voltage spikes on my GND circuit.

5. I am using official library but what do you mean about initialising the sensor ? I thought it was pure hardware (LPn to logic 1 etc) to initialise the sensor then it should appear when scanning for I2C devices. If it is not even detected, in my understanding, the library has nothing to do with the issue. Am I missing something ?