Fork me on GitHub

Project Notes

#422 VL53L0X/LaserTapeMeasure

Using a VL53L0X ranging sensor to make a short-range laser tape measure with an Arduino and Nokia 5110 display.

Build

Notes

The VL53L0X is a very small Time-of-Flight (ToF) ranging sensor.

It is quite widely available as a module, including from Adafruit - see their information page.

For this project I’m taking the module for a test drive and building a short-range tape measure with an Arduino and Nokia 5110 display.

Robojax has a nice video on YouTube (and information page) that gives a good introduction to the chip and module:

clip

There are a few board designs around, this is quite common. It squeezes everything including regulator into a very small form factor:

module_front module_back

Construction

The VL53L0X module just needs power and I²C connections. Because the module has an onboard regulator, it can take either 3.3V or 5V from the Arduino.

Breadboard

Schematic

Code

The LaserTapeMeasure.ino sketch implements a simple tape measure with measurements displayed on a Nokia 5110 LCD.

Libraries used:

Note: I first tried to use the Adafruit PCD8544 and GFX libraries, but that proved just too much for the mighty memory of the Atmega328.

Library Hack

Adafruit_VL53L0X_Customised.h is a slightly customised version of Adafruit_VL53L0X.h from the Adafruit library. The change simply makes the DeviceInfo instance variable public so I can use that data in the splash screen.

Test Drive

The startup screen actually prints the device name and version as reported by the VL53L0X chip itself:

LaserTapeMeasure_startup

Range-finding in action:

Build

The effective range I’m seeing (with default settings) is from about 2cm to 50cm.

The device supports 4 different ranging profiles, including high accuracy and long range (up to 2m). I haven’t investigated those yet - and they don’t appear to be directly supported by the Adafruit_VL53L0X C++ interface class (requires going under the hood of the API).

Credits and References

About LEAP#422 SensorsArduinoLCD

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

Project Source on GitHub Return to the LEAP Catalog
About LEAP

LEAP is my personal collection of electronics projects - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know or send a pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader