Skip to content

Vision and instrumentation

3D LiDAR scanner

A single-point LiDAR sensor on two axes that sweeps a scene point by point and rebuilds it as a depth image and as a 3D point cloud. It was my professional residency project at CICESE, Technology Transfer Unit Tepic.

See the code on GitHub

The problem

Inspecting industrial machinery and reporting faults means seeing its shape in three dimensions. A commercial scanning LiDAR is expensive; a single-point sensor, moved well, can produce a useful point cloud.

How it works

  1. A servo tilts the sensor (Y axis) and a stepper motor turns it (X axis).
  2. At each position the TFmini-S measures one distance.
  3. The ESP32 sends each row of distances over the serial port.
  4. A Python program builds the matrix, saves it as CSV and draws it in grayscale: lighter is closer.
  5. Another program turns that matrix into an interactive point cloud.

The sweep runs in a zigzag: at the end of each row the motor reverses so it never goes back to the start.

The mechanics

There were two prototypes, both 3D printed. The first used two servos: easy to build but not precise enough for a fine sweep. The second keeps the servo for tilt and uses a geared stepper motor for rotation, which gives small, repeatable steps.

The sensor

Range0.1 m to 12 m
Accuracy±6 cm up to 6 m; ±1% from 6 m to 12 m
Resolution1 cm
Field of view2°
Sample rate1 to 1000 Hz
Serial port115200 baud

Where it stands

  • The ESP32 scanner works and produces 128 × 64 point scans.
  • On the FPGA, the design with the serial port synthesizes, loads on the board and is read from Python. Reading the sensor was not solved: the data arrived out of sync.
  • After the residency I wrote a VHDL sensor reader that passes its simulation.

Technologies

  • ESP32
  • C++
  • TFmini-S
  • Stepper motor
  • Servo
  • Python
  • PYNQ-Z1 FPGA
  • VHDL
  • 3D printing

Gallery

Photos of this project are coming soon.

Are you interested in any of this?

Write to me and we'll talk it over.

Write to me