Description

This is a device that allows the user to perform several 2D scans used to create a 3D mesh of their surroundings. It features a VL531X time of flight (ToF) sensor, a ULN2003 stepper motor, the MSP432E401Y microcontroller, and Python. The ToF sensor measures the distance between itself and a point on an object far away. Each measurement is passed on from the ToF sensor to the microcontroller via I2C communication and then passed on to Python via UART communication. This measurement is used to determine the x and y components of the point. The ToF sensor is mounted on top of the stepper motor to provide a 360° scan and complete a single plane of the render. The device is manually moved forward before each scan in order to account for the change in the z-axis. Finally, all the scans are combined to create and display a 3D mesh which is all done through the Python script.

Images

Top view of the device (closed)
Top view of the device (open)
Circuit diagram
Output in python console showing current scan info
3D render of the hallway in the demo taken at 1 degrees and 5 scans

Video Demo

Notes

This is an embedded systems project I worked on as part of my ENGINEER 2DX4 (microcontrollers) course at McMaster during my 2nd year. It was my first experience working with microcontrollers and building embedded systems so I had a lot of learning to do. At first it was overwhelming, but eventually I got the hang of it and by the end of the semester I had a ton of ideas I wanted to bring to life (like my Spotiplayer project). The course definitely evoked my hidden interest in microcontroller projects and now I’m just trying to learn more from the internet, books, or friends that have a lot more experience with the subject.

The course itself is new to the Electrical/Computer Engineering program at McMaster (came out last year) so the syllabus is still going through a very experimental phase. That and the fact I took the course during COVID when school was pushed online definitely made some of the content challenging and even unnecessary. Regardless, I’m glad that it was implemented early into the stream to introduce students like me, who’ve never worked with microcontrollers, to the field.

I’m also happy with the end result of the device itself. Since the course ended, I have made a few touch ups to the code, making it more clean and flexible, although I haven’t done any major changes to the device’s appearance. At the time I was prioritizing function over form, and hence the device ended up in a shoebox… Either way, make sure to come back for an update on the device’s appearance and some other changes I have in mind.

Visit my GitHub repo for the project’s code and more information.