Skip to content

Program to create a 3D scan of a room using the MSP432E401Y microcontroller.

Notifications You must be signed in to change notification settings

mohitc5/roomScanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D Indoor Mapping System

A firmware + hardware project that uses a Texas Instruments MSP432E401Y microcontroller, a VL53L1X Time-of-Flight sensor, and a 28BYJ-48 stepper motor to scan indoor spaces and generate 3D reconstructions. Data is processed on a PC using MATLAB visualization.


📌 Features

  • 128 distance measurements per 360° rotation using VL53L1X ToF sensor
  • Stepper motor control with 2.81° increments per step for precise scanning
  • I²C communication between MCU and sensor, UART @ 115200 baud to PC
  • MATLAB visualization pipeline to reconstruct 3D environments layer-by-layer
  • Cost-efficient build (~$300) using off-the-shelf components

🛠 Hardware Components

  • TI MSP432E401Y Microcontroller (receiver programmed in C & Assembly)
  • VL53L1X Time-of-Flight sensor (940 nm laser emitter/receiver)
  • 28BYJ-48 Stepper Motor + ULN2003 Driver
  • 3D Printed Mount for sensor and motor assembly
  • Power Supply:
    • MCU: 4.75–5.25 V (USB Micro-B)
    • ToF Sensor: 2.6–5.5 V
    • Motor: 5–12 V

⚙️ System Overview

  1. The stepper motor rotates the ToF sensor 360° while capturing 128 measurements per rotation.
  2. Sensor data (distance in mm) is preprocessed and sent to the microcontroller over I²C.
  3. The MCU relays data to the PC via UART (115200 baud).
  4. A MATLAB script converts polar measurements into XYZ coordinates and reconstructs the scan.
  5. The user shifts the device along the X-axis (default: 30 cm per step) to build full 3D models.

🖥 Software & Firmware

  • Firmware:
    • Written in C and Assembly for TI MSP432E401Y
    • Implements I²C sensor communication, UART serial output, and stepper motor control
  • MATLAB Script:
    • Serial communication with MCU
    • Real-time point cloud reconstruction with scatter3 and plot3
    • Adjustable displacement and scan depth

🚀 Example Output

A scanned hallway compared to the real environment:

MATLAB Scan Output Real Hallway
image image

🔧 How to Run

  1. Connect the MSP432E401Y to PC via USB.
  2. Upload firmware to MCU via Keil uVision.
  3. Open MATLAB and set the correct COM port in main.m.
  4. Run the script "2dx_studio_8c.c" → press Enter + PJ0 button on MCU to start scan.
  5. Move device along X-axis and repeat for each layer.
  6. View final 3D visualization in MATLAB.

About

Program to create a 3D scan of a room using the MSP432E401Y microcontroller.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors