Measure distance with ST’s VL53L1X distance sensor
Creating “color” images is not new. Microsoft’s Kinect sensor introduced developers to getting spatial information: a trick which STM now make manageable via their laser-based distance sensor monoliths which are ideally suited to drone landing sensors, distance-sensitive ignitors and other trinkets.
All in one…
Unlike the sensor used in the Kinect, ST’s sensor is “one-dimensional”. The optical window at the top of the chip acts as viewfinder and emitter, while distance to “objects” in front of the detector is returned as a one-dimensional value (think: something is 50cm away from me). Furthermore, the use of LASER technology makes the system almost completely independent of the target material – the color-related problems known from classic IR components should not occur here.Host-Sensor connectivity is accomplished via the I2C bus: sadly, ST does not expose an address selector, thereby limiting you to one sensor per bus controller. The actual communication protocol is described in a seperate document: as ST loves to change its URL schemes, simply google for UM2356 to find it. Furthermore, a driver written in C is made available to aid implementors.
While current consumption is moderate in the range of less than 20mA when active, users must be aware of the maximum supply voltage of 3V5. This makes integrating the system into 5V I2C busses difficult – a level shifter made up of two FETs is a workaround (see directionalLevelShifter and application-note).
The inclusion of gigabit ethernet raised quite a few eyebrows: after all, the actual SOC is not able to provide more than about 480 Mbits of total bandwidth to all of the peripheral devices. In practice, this limitation shows up doing iperf runs: