VL6180X Time-of-Flight Distance Sensor - magnetic levitation

I. recently purchased one e VL6180X Time-of-Flight Distance Sensor Carrier, because I wan to try it with this magnetic levitation device that I made:

My intention is to put it on the bottom of the electromagnet. Is there any hint or issue that I should take into account? (I will protect it with foam, leaving a “hole” for the readings.



Hi, Jose.

Your levitation device looks pretty cool! We have not tried using one of those sensors close to a magnet, so unfortunately, we do not have any advice. If you try it though, please let us know how it goes!


Hello Claire,

I am back to try this levitation project wiht the VL6180 module.
I’ve seen that other libraries have there is the posibility to “activate” a high speed mode" (for examle with the vl53xx series)

Is there any way to do the same thing with the VL6180?

Thank you

Hi, Jose.

The VL6180X has a few settings that can affect the speed of its measurements, and we recommend reading the datasheet to get a good understanding of these. If you are using our library, we do not provide dedicated functions to change those settings, but you can work with the registers directly, and there is an example of how to do this in the InterleavedContinuous example.

The main register setting that affects speed is SYSRANGE__MAX_CONVERGENCE_TIME, which defaults to about 50 ms. If you decrease that to a much lower value, you might also want to reduce READOUT__AVERAGING_SAMPLE_PERIOD so that it does not cut into the measurement time too much.