Use an ESP32 and ToF Sensor to Build a Cheap LIDAR Platform

This €20 LIDAR system was designed using a NodeMCU ESP32, VL53L1X-based sensor module, stepper motor, and H-bridge driver.

Maker Owen Carter wondered if he could design a viable LIDAR-like scanner using off-the-shelf parts and some careful programming for just €20, which he managed to accomplish using an IR ToF sensor for scanning at close range. Carter explains, "The goal of this project is to prove the suitability of this sensor for a small-scale LIDAR scanner to be used in domestic automation; robot vacuum cleaners, security robots, monitoring systems and, in my case, a K9 'companion' robot I am working on as a long-term plan."

Carter's build is a relatively simple one, but ingenious nonetheless, and features a CJMCU-531 VL53L1X-based sensor module for imaging, a 5V geared unipolar stepper motor and H-bridge for the scanning mechanism, and a NodeMCU ESP32 to drive the system. For the software, Carter went with the SparkFun VL53L1X library, and the ArduinoJson library, which he states is easy to use for scanning, and the settings (and debugging) can be adjusted via the UI.

This scan of Carter's kitchen shows object placement after two minutes of data gathering at a range of four meters.

Although the LIDAR's maximum range is only four meters, its imaging is surprisingly detailed with object placement in any given room. As far as features go, the platform can be controlled using a smartphone and a UI app. The servo provides extra controls for manual motor movement, scanning, zeroing, and uses a sample graphical polar plot of the readings to simulate real LIDAR.

The platform also has an auto-scan function with wide and narrow ranges, options for setting the speed and range values for the sensors, and the motor can be powered off to save power and reduce heat. Carter has uploaded a detailed walkthrough of his project, as well as all the files, schematics, and code needed to get it up and running on GitHub.

Latest Articles