Introduction: DIY Budget 3D Scanner V3

About: Master student in Computer Science & Information Engineering, one of the developer of ArOZ Online Project. I love making something no one has thought of. If you like making things that seems not possible, send…

Hey guys, it has been a while I didn't publish any instructables. This time, I brought to you guys one of the project I made back in Feb 2019. The version 3 Budget 3D Scanner!

If you wonder where is the v1 and 2 goes, here they are:

https://www.instructables.com/id/Ultra-Low-Cost-3D...

So, lets get started!

Step 1: Prepare the Sketches

First of all, before making any prototype, you need a sketch. This is the sketch that I designed for this project, (And also for a competition in which I joined).

So, why DIY a 3D Scanner again?

First, 3D scanners are still expensive now and we think: Maybe we can make a better one this time with a better resolution and quality?

Moreover, in the previous build (v1 and v2), we do not develop our own algorithm to clear up those scanner data. This time, I have paired up with a programming genius and he help me to work on the post-processing script. More information in the software / post processing steps.

Step 2: 3D Modeling / Rendering

Next, we will need to make our design into a 3D model so we can 3D print it using a 3D printer. The software I used is Autodesk Inventor, but you can use whatever 3D modeling tool you used to. Here are some renders of the 3D models I designed (and tested).

Step 3: 3D Model (download)

All the stl files are included in this step. If you want the original ipt file in which you can edit with Autodesk Inventor, you can find them here:

https://github.com/tobychui/The-3D-Scanner-Project...

Please see the attached two image regarding the parts location with filename and how to connect them together.

Step 4: Z Pulley System

To move the scanner head up and down, you will need to build a pulley system. Here are some references model for building your own if you do not have any injection molded parts for build this system. However, as 3D printed parts are not that smooth by default (without acetone processing of course), I would recommend that you go with alternative solutions. Or otherwise, you can go with the models that I provided.

Tips: Adding some oil on the joints and connectors will help smooth out the motion.

Step 5: Scanner Head Assembly

So here comes the fun part. The scanner head is actually modular. What it means is that you can swap out the scanner head for another scanner by simply unscrewing two screws that hold the scanner module in place from the Moving block.

For your reference, I uploaded a blank head mount 3D model for you guy. But here is the point to be noted.

SCANNER MUST ALIGN 90 DEGREE FROM THE SLIDING TRACK

It means that it would be better to modify the file and print a mount that is 90 degree to the Z axis (aka up down axis) instead of just hot glue the scanner in place. This will greatly reduce the scanning accuracy if it is not correctly aligned. (Well, my friend Andy did made some software compensation algorithm in his model building script. But the result is not as good as correctly aligned sensor so please don't make the mistake I made before :) )

Step 6: Arduino and Electronics

Now, we can move on to the Arduino part. The Arduino part is kind of simple. What you need is an Arduino UNO and two stepper drivers. The one we are using are those cheap driver from ebay (due to competition budget limitation). The idea is that you drive two stepper motor in which one move the scanner head up and down with another one rotate the platform. You might also want to design and print an enclosure for the electronics. Here is some progress that I made during building my scanner.

Please reference the code for pin arrangement. If you are using VL53L1X ToF Sensor as the scanner head, please use firmware 2.2. If you are using SHARP GP2D12F Infrared distance sensor, please use the 2.3 version.


*** The firmware take in custom designed Gcode. See dev doc.pdf for more information.

Step 7: Finished Product (Hardware)

So now, your 3D scanner is finished!

To use it, plug the Arduino into your computer using a USB cable, start the serial monitor from Arduino IDE and enter G93 (Start Scanning). Wait for the scan procedure to complete and copy and paste the result into a txt file. The txt file can be used for further processing.

If you do not know anything about programming, this is the end of the Instructable. Congratulation!

But if you want to go a bit further into how the build a 3D model out of the scanned data, please continue to the next page.

Appendix: All Supported G-Code command
G28 → Sensor Home (Default)

G93 → Start Scanning

G94 → Calibration (Please put the calibration board in the center position of the scanner platform before using this command)

G95 → Sensor Home (Top), Moving the sensor to the top value preset)

G96 → Platform Check (Perform a full rotation as speed 60rpm)

G97 → Sensor Read (Get the current value from sensor)

DEFAULT → reply with “[info] Echo: ”

Step 8: Well, It Started to Get a Bit Complicated

For starters, here is how the 3D scanner works.

The rotating platform serve as the moving X-Y plane in which allow the scanner to scan position on the x-y plane.

The slider that move up and down help the scanner to scan the object in Z axis. Together, we will get 3 outputs. Lets denote it by a,b,c. To convert it x,y,z in which we usually used, we need to do some simple maths.

a := The distance read from the distance sensor

b:= The rotation angle of the platform

c:= the height of the sensor on the sliding platform

To convert a into distance (d), we can do the following. Denote the distance from the scanner head to the center of the rotating platform as r.

d = r - a

If your platform rotation is 0 degree, then that d is your location with (x,y) = (-d, 0). But if your platform is rotated, you can find the x,y rotation angle with some trigonometry as well. Denote the angle as Theta ( in degree).

Then, you get Theta = (steps rotated / total number of steps per rev ) * 360 degree

The rest of the math involve sin cos or tan which you should have known in high school. So lets us skip those parts :)

And the z location is even simpler. Just divide the height in steps by the steps to height ratio of your pulley system. (aka How many steps is needed to move the head upward / downward by 1 cm).

Step 9: Calibration Using Differentiation and Formula Deduction

So, this is not my expertise so I will leave this part to my friend's power point to explain how it works.

(Please see the image attached).

Step 10: Post Processing Software

So for easy to use and experiment, here is the python script that he wrote as a proof of concept.

https://github.com/tobychui/The-3D-Scanner-Project...

Original Github repo (A little messy with a wrong title):

https://github.com/tamyiuchau/Budget3dPrinter

Step 11: Thanks for Reading (and Other Materials)

Thanks for reading this instructable. If you want further information, feel free to ask in the comment section below or contact us via Github.

You can read more about the project by going through our power point presentation file and some trial scan data if you want to.

See you in the next instructable :))