Main Content

Time of Flight modules, some experiments

ToF, introduced some years ago, are still quite new for most of the community. A couple of VL53LOX-V2 were tested.

Using the famous HC-SR04 ultrasonic distance sensor is quite common, while using of Time-of-Flight modules up to now is not. Well, as soon as you get one, you will download the library and run the “Single” sketch and be happy when it works. In case you got more of them you might want to compare them simultaneously. And there comes the problem: they all are configured as I2C devices at adress 0x29 which can not be modified. Even if your microcontroller had more than one I2C port you can address only one module at a time. That is where the multiplexer comes into the game. I used a CMOS CD4052 which was introduced in 1980. It has two inputs A and B to select the channel, and it works bidirectional what is necessary for I2C communication. The wiring is a bit complicated because the pins of the CD4052 are ordered in a crazy manner. Just try to follow the colored lines.”

Link to article