There are several way to build an affordable 3D scanner for your home. One way is to make photos (maybe even automatisied) from all sides of an object and let Autodesk 123D Catch do its magic. Another option is to use a depth camera like the Kinect and place your object on a rotating table and get depth images of all sides - great especially for a person scanner.

A cheap option is using a line laser which enlights on line on a object, get a camera image of that line and then rotate the object a bit and repeat - until you get the 3D form out of this slices when you have rotated the obect by 360 degree.

Francis Engelman build such a system as bachelor thesis at the media computing group of the RWTH Aachen - the so-called FabScan. It uses a basic webcam, an arduino for controlling a line laser and a stepper motor for a turntable.

One disadvantage was that it relies on a external computer for processing, which gives a hassle with different operating systems and so on.

Mario Lukas now made a big improvement of it in his thesis: The FabScan Pi uses a raspberry Pi (getting rid of the external computer and controlling the FabScan with a web browser), using the raspberry Pi camera as a better camera system and polishing the installation and usage process.

To build your own fabscan Pi you will need:

  • A raspberry Pi 2 and a camera (you could also reuse the webcam of the old FabScan, but the one for the raspberry is better) and a Micro SD card for the Pi
  • A line laser
  • A stepper motor, motor driver (a stepstick, Polulo A4988 will do, Silent stepstick is better)
  • A round plate mounted on the stepper motor, either with a Polulo Univeral Mounting Hub or a 3D printed one, as long as the plate holds stable on the motor axis
  • A box, almost anything will do as long its about 33cm*24cm*20cm or bigger. You don't have to use a fancy box, at the end a shoebox can also work (might only a bit unstable).

There are several ways to connect the components:

  • Use a standalone arduino, connect everthing with jumper wires and connect Pi and Arduino with a USB cable. Add a 12V power supply for arduino and stepper motor and a 5V supply for the Raspberry Pi
  • Use the Fabscan shield, getting rid of the jumper wires
  • Use the (upcoming) Fabscan Pi hat for the raspberry which will include an arduino, reducing the necessary power supplys to one 12V supply

In my case i went for the second option, adding two 230V connectors at the bottom of the FabScan Pi housing to hides both power supplys. If you don't have a fabscan shield at hand, you can just have a look at the board layout and make the connection with wires.

Apart from the box you will need some 3mm and 2mm screws, nuts and springs. For my housing i used 5 sheets of 3mm MDF, 30cm*60cm which i lasercutted and then painted black, using clasp and joints of a small box for the door and 2 sheets of golden paper for additional decoration - very importand for functionality :-)

If you want to make color scans, you might also want to add some RGB lights (WS2812b) for enlightment, something i didn't do yet, but basically they are just connected to 5V and ground of the arduino and their data input is attached to pin A1 of the arduino.

Oh, and votes for the contests are highly appreciated :-)

Step 1: First Test Upgrading the Old FabScan

Since we already had a FabScan at the Fablab Aachen (no wonder, since it belongs to the chair where these thesis are done :-) i first upgraded the old one. Just take a SD card and upload the newest image form Fabscan.org on the card, it's the same way as uploading the standard rasbian image on a sd card with the path to the fabscanpi_basic_jessie image instead to the rasbian image. On Raspberry.org are instructions for the different operating systems.

The camera of the raspberry is mounted on a small circle, which is then mounted with longer screws at the housing of the scanner. Springs between the camera plate and the scanner housing allow correcting the orientation of the camera.

The nice thing of the new system is that the raspberry pi uploads the program automatic to the arduino, no need to do something here, just connect the raspberry pi and arduino with an USB cable.

Step 2: Calibration, Usage and Basics

The FabScan Pi is then connected with a ethernet cable with your network. Typing its IP address in the browser allow you to control the FabScan. At the basis window you can browse old scans in the left folder or make a new scan with the button in the middle (on the left is a sharing button for downloading a scan if one is loaded).

The Laserline should go through the middle of the turntable, be as sharp (thin) as possible and should be vertical at the baseplate. While the camera looks vertical on to the backwall in one line with the turntables middle, the laserline should be at circa 57 degree to this camera direction.

Starting a new scan opens a preview window and some slider for control. At the beginning you might want to control the camera position: the slightly green crosshair in the preview window should horizontal at the middle of the turntable and vertical at the upper border of it, at least that worked for me :-)

To change the postion you can use the three spring mounted screws which hold camera plate and housing together.

After this you are ready to scan. The three paramter sheets control first the threshold for detecting the laserline and resolution of the scan, the other two sets are for RGB color leds etc. for a color scan.

Next i designed a new (smaller) housing. Some parameter like the angle between camera view and laser line can be changed in software, but to make things simple i reused the dimensions of the FabScan cube housing. A nice summery of the important dimensions can be found here.

Basically besides the laser line/camera-turntable angle i reused height of camera and laser, the diameter of the turntable (14 cm diameter) and the distance to the backwall of the turntable (a 0.5mm gap). The distance of camera to turntable's middle is in the new housing actually smaller (about 24 cm) than within the cube.

Step 3: Lasercut MDF, Painting Black

The parts in the Scänner.svg are cutted with a laser cutter out of 3mm MDF, but any box in similar dimensions will also do.

They are then painted black - which has the advantage that diffuse light is minimized, but the camera will not recognize the laserline on the back wall - at this position the surface has to be more reflective, i added at here later a stripe of white tape. Additional the bendable parts of the side walls (where the bunch of short parellel lines are) are taped on the inside before painting to make them opaque.

Bending the MDF can be improved (a.k.a. breaking minimized) by moistening the MDF before bending. The additional thickness of the color will also upgrade all connections to press-fit conenction, which only work when force is applied... not the brightest idea of myself. I should have colored it after mounting.

Step 4: Mounting the Turntable and the Laser

The turntable is mounted with polulo mount on the stepper motor, which is mounted before on the base plate. The laser is pressed inside few layers of MDF, which are screwed together. On its bottom magnets are glued with double sides tape and hidden behind black colored tape. A metall plate is then glued on the base plate and also hidden behind tape, which holds the laser magnetic on its place.

Altough this is complete useless for normal scans, it can be funny: By changing the angle between laserline and camera line you will get a distorting mirror effect for the scans.

Step 5: Camera Mount

The same camera mount as used before for the Cube version:

The ring is big enough to add later a small WS2812b neopixel ring. The camera is mounted with 2mm screws on the plate, while 3mm screws with springs are used as connection between mount and housing.

Step 6: Completing the Housing

First both larger sheets for the side walls are glued together (actually i did this before painting, which allows me to fixate this additional with tape inside). Then the border is stuck on the front side (deeper cut-outs on the base plate), and the top side is added. Thereafter, the side walls can be mounted.

The lid itself lays loose on top, while the front opening is assembled with clasp and joints from a box. The screws were to long and had to be shortened.

Step 7: Electronics and Testing

The raspberry and arduino are then screwed on the backside of the bottom plate, both connected with a usb cable, powered by a 12V supply(arduino) and a 5V supply (raspberry). On the arduino is a fabscan shield, which connects arduino, stepstick driver, stepper motor and laser with the arduino. Both powersupplys are plugged into two connected 230V sockets for only one outgoing power line. Apart of the two boards, a bunch of hot glue holds everything on its place.

At this point the FabScan Pi is functional, just a few decorations are missing.

Step 8: Decoration

Since the black box is a bit boring, i added some very useful decorations. Just lasercutted some designs from my favorite fonts (Bodoni, Soft Ornaments Three, Foundry Ornaments demo...) out of golden paper. To prevent them from flying away while cutting i glued them on a sheet of cartoon , with a layer of clear tape between to allow the paper pieces to be removed from this carrier cartoon after cutting. Which luckely worked well.

The cutted out rests of the paper could be also used as position help for glueing the parts at the right positions.

Step 9: Final Testing

Finally: Seems to work :-)

Just need to transform the pointcloud into a STL-file which is at the moment not done automatically by the Pi.

Step 10: From Pointcloud to Stl

For transforming the pointcloud into a printables STL-file i use MeshLab (at least until it is integrated into the FabScan software :-): Just download the .ply file from the Pi to your computer (right button in the FabScan browser window), and import it as a mesh in MeshLab. Then use several steps in the filter menu:

First in "Normals, Curvatures and Orientation" select "Compute normals for point sets". In the appearing window just press "Apply", no need to change some setting.

Then transform it into a surface by using "Surface Recunstruction: Poisson" in the submenu "Point set". Again, i justed applied the upcoming window instead of optimizing the values.

As a last step under "Cleaning and Repairing" you can find the "Merge Close Vertices" tool, where you can change some paramters or just press apply again.

You can now export the mesh as an stl file (again with no special settings apart from the from MeshLab suggested ones), and print the resulting object with your favorite 3D printer.

Step 11: A Simpler Housing - Work in Progress

The housing looks good and works, but of course a simpler version might be better if you just want to build your own scanner. The here included svg file allows to cut the housing out of 5 sheets 25cm*33cm of 3mm MDF, including mountings for the rotating table, the laser could be mounted with or without motor. In both cases no Polulo mounts are necessary anymore.

Only one type of screw is required (including camera and Pi): 16mm long 3mm hex screw. And small pieces of a spring for the camera mount.

But that's just the spoiler, because it's still work in progress. E.g. getting rid of the front door and just open the lid will additionally simplify things.

<p>Any tips for The laser module?</p>
<p>Just a line laser, if you find one with is &quot;eye safe&quot; it will be better (also other color might be better), the used red line laser is just the best to get (we normally shop by watterott, but just check your electronic supplier if he has a diode line laser with as less power as possible)</p>
<p>can we use another raspberry pi instead of an aurdino board ?</p>
<p>Not sure if its still relevant: The Pi has some issues with real time I/O, thats why it is used instead of directly using the Pi I/Os, you will have the same problems with the second one.</p>
<p>If I needed to increase the size to scan objects 15 x 15 x 15 inches is that possible with this design?</p>
<p>Shouldn't be a problem, just enlarge the whole setup (well, better use now the &quot;official&quot; box design at fabscan.org, because it's simpler and smaller). And one moment we thought about making a person scanner out of it (completly useless because of laser and long scanning time) and a micro version for scanning tiny things. Only problem might be the camera lens. Try it out :-)</p>
<p>Has anyone used the new Raspberry Pi 3 for this yet?</p>
<p>Yes, as far as i know Mario used it with the raspberry pi (needed some fixes first to get the camera running)</p>
Jessie firmware for raspberry pi is asking for fabscan pi login and password to enter . please let me inow of what they are
<p>Sorry for the late answer: Should be the basic pi as username and raspberry as password</p>
<p>Really great idea. Having invested in a 3D printer but am still part of the 'mold by hand' a scaner would be most useful.. especially when working in organic shapes.<br>Looking around my 'lab' I already have a RPi B and a RPi camera.<br>Could one use the RPi B+ rather than purchase a new RPi 2.<br><br>Also the Hat with built in Arduino looks to be great. Do you have an idea of when this might be available.<br><br>I have seen oter designs that use 2 lasers and switch between them. Would this give better accuracy?<br>Many thanks<br>Dave</p>
<p>The Fabscan Pi hat is now available at watterott.com</p>
<p>Good writing !</p><p>Is it possible to use two cameras, to have the top of the object and less &quot;holes&quot; ?</p>
<p>Would be an option (but currently not support). Another option (to get rid of the problem of a secondary camera on the pi) is motorizing the camera/laser in z-Direction (or even better in a half circle from the current position to the position directly above the object), but that will make the whole build more complex and expensive.</p>
<p>How big of an object can it scan?</p>
<p>The original Fabscan with a slightly larger distance from camera to object could at least scan objects 9 cm height and 6 cm diameter. I didn't scan something that big yet but it should be similar, maybe a little less, so with 8 cm height and 5 cm diameter you would be on the safe side.</p>
<p>Can I export .stl files after scanning?</p>
<p>At the moment you get a point cloud, which you import e.g. in MeshLab and then process it to an printable stl:</p><p>Filters -&gt; Compute Normals for Point Set, then </p><p>Filters -&gt; Point Set -&gt; Surface Reconstruction Poisson</p><p>Filter -&gt; Cleaning and Reparing -&gt; Merge Close Vertices</p><p>File -&gt; Export as (stl)</p><p>Done.</p>
I want to make a 3D scanner which can directly give .stl gives for printing. Are there any DIY forums of this type?
<p>From what I understand about 3D scanning, you get a point cloud after registering all the viewpoints to become a point cloud object. After that the point cloud is turned into a mesh of triangles to define the surface of the object. At that point, it can be saved as an .stl, and imported to any 3D software to manipulate. </p><p>If there's a program that can take a scan and make an .stl file within the program, let people know. I've only learned the basics so far.</p>
<p>Correct. I use MeshLab for this purpose (not that i'm know more than the basics myself). I will try to make an additional step explaining the postprocessing this weekend. </p>
<p>Well, the whole FabScan idea is open source, and on http://www.fabscan.org/ is a community forum to improve it further. Input is welcome - and getting the processed stl file directly out of the Raspberry is already on the wishlist for future versions as far as i know ^^.</p>
Yeah but it's still in development stage. Are there any other complete open source 3D scanners? What about freelss?
This is almost exactly what I have been trying to make. I even have most of the components already but didn't realize someone had done most of the work. awesome!
<p>Yes, all thanks to Mario Lukas. It's now really easy to build it and scan with it.</p>
<p>Thank you! Good work!</p>

About This Instructable




Bio: ... found out that the FabLab Aachen has a Laser cutter and a PCB mill (and other fun stuff of course), decided to stay there for ... More »
More by janth:Color-changing Laser Cut Jewelery Acrylic Description Sheet With LED Acrylic Rainbow Flowers 
Add instructable to: