Skip to content

emilylinchan/tof-spatial-mapping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Embedded Spatial Mapping System (Time-of-Flight)

Overview

This project is an embedded spatial mapping system that uses a Time-of-Flight (ToF) sensor to generate a 3D representation of the surrounding environment.

The system integrates a microcontroller, stepper motors, and a ToF sensor to perform automated scanning. Distance measurements are collected in real time using embedded C with register-level control, transmitted to a PC via UART, and processed using Python to generate a 3D point cloud visualization.

The physical platform was implemented using a custom LEGO-based vehicle with motorized scanning and forward motion.


Full Documentation

For detailed system design, hardware setup, and implementation details:

📄 ToF-Documentation (PDF)


System Architecture

  • VL53L1X ToF Sensor → distance measurement
  • Stepper Motor (Scan Axis) → 360° vertical scanning (y–z plane)
  • Stepper Motor (Drive Axis) → forward motion (x-axis)
  • MSP432E401Y Microcontroller → control and data acquisition
  • UART Communication → data transfer to PC
  • Python Processing Pipeline → parsing, coordinate conversion, visualization

Hardware

  • MSP432E401Y Microcontroller
  • VL53L1X Time-of-Flight Sensor
  • 28BYJ-48 Stepper Motors with ULN2003 Drivers
  • Custom LEGO-based mobile platform

Software

Firmware (Microcontroller)

  • Language: C
  • Handles sensor communication, motor control, data acquisition, and UART transmission

PC-Side Processing

  • Language: Python
  • Libraries: PySerial, NumPy, Open3D

Data Processing Pipeline

  1. Collect distance measurements from the ToF sensor
  2. Transmit data via UART with start/end markers
  3. Parse incoming data in Python
  4. Convert polar measurements to Cartesian coordinates
  5. Combine multiple scans into a 3D point cloud
  6. Visualize using Open3D

Hardware Platform

Custom LEGO-based vehicle


Demo Results

Real Environment vs Generated 3D Map


References & Resources

Textbook

  • Embedded Systems: Introduction to ARM Cortex-M Microcontrollers (Valvano, 5th Edition)

Microcontroller Documentation (MSP432E401Y)

  • MSP432E4 SimpleLink Technical Reference Manual
  • MSP432E401Y Datasheet
  • MSP432E401Y User’s Guide
  • ARM Cortex-M3/M4F Instruction Set Manual

Sensor (VL53L1X Time-of-Flight)

  • VL53L1X Datasheet
  • VL53L1X API User Manual (UM2356)
  • VL53L1X Driver Documentation

Motor & Driver Components

  • VMA401 Stepper Motor Datasheet & User Manual
  • ULN2003 Driver Board Datasheet

About

An embedded 3D spatial mapping system using a Time-of-Flight sensor, stepper motors, and Python for point cloud visualization.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages