vl6180x under a thick glass

Hello, I am developing a project with the vl6180x sensors. But I need to protect the sensors behind 8mm glass. When I read behind a 3mm glass, everything works fine, but when I use an 8mm glass the measurements do not go through the glass.

I’ve been going through the documentation, and I’ve seen an interesting parameter (SYSRANGE__RANGE_IGNORE_THRESHOLD). According to the documentation, I have understood that if the measurement is less than this threshold, it is discarded and the search continues deeper. In this way it would rule out the reflection on both sides of the crystal that can return incorrect measures.

I have tried many values of this threshold but the measurements never go through the glass. Have I misunderstood the use of this parameter?

Thanks in advance.

Check page i5 of the [application notes, that should point you in the right direction.

It’s also possible for the glass to be too thick, in that case there’s enough internal reflections in the glass to saturate the sensor and it just won’t work anymore. You might be forced to use thinner glass if you can’t overcome this in code.](https://cdn.sparkfun.com/datasheets/Sensors/Proximity/VL6180_ApplicationNote.pdf#[{“num”%3A80%2C"gen"%3A0}%2C{“name”%3A"XYZ"}%2C67%2C484%2Cnull])

Thank you Chris. But I can’t do the calibration, because the measurements don’t go through the glass and couldn’t reach the 100mm target.

Unfortunately it looks like your glass is too thick for the sensor to work through. Your only option would be too go with thinner glass.