DIY Budget 3D Scanner V3

54,277

617

30

Introduction: DIY Budget 3D Scanner V3

About: University student in Hong Kong, 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 me a message to share your i…

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 :))

Sensors Contest

Runner Up in the
Sensors Contest

Be the First to Share

    Recommendations

    • Recycled Speed Challenge

      Recycled Speed Challenge
    • Make it Move Contest 2020

      Make it Move Contest 2020
    • Stone, Concrete, Cement Challenge

      Stone, Concrete, Cement Challenge

    30 Discussions

    0
    Alowe104
    Alowe104

    Question 7 months ago

    Hey, i was wondering if you could post the electronics housing STL. if not, no worries!

    0
    SkeletU
    SkeletU

    8 months ago

    применённый датчик расстояния не подходит для данного проекта, поскольку не может служить измерительным инструментом. У него угол обзора 27 градусов и точность +-5%. А нужно максимум 5 градусов и +-1%. На том расстоянии что предлагают разрешающая способность будет близка к нулевой. Надо или ставить датчик плотную, чтобы максимально уменьшить измеряемую площадь и погрешность или применять другой датчик.
    https://docviewer.yandex.ru/view/0/?page=2&*=2umUy...
    Ссылка на лист данных сенсора.


    Пока проще сделать 100 фотографий и потом в программе модель из них.

    0
    ds3975
    ds3975

    10 months ago

    Hi guys
    I like this really much and will start doing it by myself. One question: didn't make it sense to have pictures from above (top)?
    For better 3d results

    0
    askjerry
    askjerry

    1 year ago

    I appreciate the work you put into this... but as I look through your Instructabe, I cannot find any samples of something you have scanned, or see any 3D printed objects from a scan. There are many types of 3D scanning methods, some work MUCH better than others. Without a sample of what can be done with your system the reader is left to build the entire project with the hopes it works well. can you please update this instructible to show hat the output looks like, if you had to do any manual post-processing, and how your finished product turned out?

    0
    tobychui
    tobychui

    Reply 1 year ago

    Hi! Please take a look at the attachment "trial-scan data.zip" in the last step of the instructable as well as the pdf for scanned & printed 3D objects images. The results aren't ideal (and to be honest, not as good as what you would have expected), but it is a good start for a future improvement. Please feel free to share more of your ideas or thoughts with us :))

    0
    RBergevoet
    RBergevoet

    1 year ago

    I think there is an error in the cost of the Arduino in your PDF document...

    0
    tobychui
    tobychui

    Reply 1 year ago

    All parts cost are referenced from RS Electronic, Hong Kong.
    You can check out the price at their site over here: https://hken.rs-online.com/web/p/processor-microco...
    Of course, you can always find some Arduino that are cheaper on ebay but we need the formal receipt for claiming any expenditure.

    2019-08-17_12-00-50.png2019-08-17_12-02-11.png
    1
    weish
    weish

    1 year ago

    i'm curious about the choice to use a time-of-flight sensor to generate a point cloud rather than using this same hardware setup to automate the capture of several hundred images to be processed via photogrammetry with a free program like colmap or meshroom. do you have any examples of the models you've generated using data captured with your setup?

    0
    tobychui
    tobychui

    Reply 1 year ago

    Hi! Thanks for your comment. Yes, we have included some of the example scan data in the "trial-scan data.zip" file in the last step of the instructable. Please feel free to take a look at them :)

    You did make a good point here. Indeed, we can use a camera + Raspberry Pi for doing 3D image capture instead of using ToF sensor. However, as this is our project for a competition which has a budget limit, we do not have that resources to buy a camera which has high enough resolution for 3D capturing. I strongly recommend you to try it out and see if that will works better (and if you did try it out, please kindly let me know the result as well as I am interested :)) ). If you need any help through out the process of building your own, feel free to find us on https://www.facebook.com/ImusLaboratory/.

    2
    tcurdt
    tcurdt

    Reply 1 year ago

    It's a shame you go through all the process of writing an instructable but then hide the most important outcome in a zip file. The mechanical parts are really not what is so very interesting in a 3D scanner. That's all pretty basic. The interesting part is getting a good result from the actual data.

    0
    BardP
    BardP

    Reply 1 year ago

    Well, looking at the results hidden in the files, the mechanical parts are what are currently most interesting here. The scan results from using the using ToF sensor contain too much errors to be useful in the current state. I do not know if this can be improved further, or if this really is the limitation of this approach.
    It will be very interesting to see the results of using a camera + Raspberry Pi for doing 3D image capture as mentioned above.
    This platform could also be useful as a starting point for a laser scanner.

    0
    tobychui
    tobychui

    Reply 1 year ago

    That is true. This method can only reach this kind of accuracy with the current sensor available on the market. We have tried a lot of methods like reading the sensor multiple times and average the reading, using Poisson Noise Filter and more. But that is what we can get at best.

    A camera (with high enough resolution) + Raspberry Pi for 3D scanning will definitely gives better results. But what I am expecting is that someone will propose (or invent) a kind of sensor that I can use to replace the ToF with error small enough for 3D scanning.

    0
    darrell.carothers
    darrell.carothers

    Question 1 year ago on Introduction

    Honestly, how hard would this be for a total beginner to build and program? I am just starting with Arduino boards and loading programs to the board has been challenging.

    0
    tobychui
    tobychui

    Answer 1 year ago

    I am sorry to say but it would be a hard project for a total beginner to build. Specially the 3D printed parts and code editing to fit your personal build.
    I guess it would be better for you to start with some easier projects and come back later when you got the experience of working with Arduino Programming, 3D printing, Stepper motor control and sensor input processing. Good luck :)

    0
    davewmc
    davewmc

    1 year ago

    This looks like an awesome project that I think I would like to do. I am using Fusion 360 with an Educational License (I can't afford the $2000 for Inventor). Fusion 360 will not open the .ipt files. Could you export them so that I could open them in Fusion 360 in case I need to edit them?

    0
    tobychui
    tobychui

    Reply 1 year ago

    May I know which file extension do Fusion uses? I will see if I can export them for you :)

    1
    davewmc
    davewmc

    Reply 1 year ago

    Fusion 360 is supposed to open .ipt files and a large number of other file types. After some research, I see that it is an issue with Inventor 2019, previous versions did not have a problem. Upon further research I find that I can download Inventor using an Educator License just like I did for Fusion 360. When I get home I will install Inventor on my desktop PC and try again. Thank you.