100% found this document useful (1 vote)
246 views8 pages

Build A DIY Desktop 3d Scanner With Infinite Resol

The document describes how to build a DIY desktop 3D scanner using photogrammetry. It uses an Arduino, stepper motor, and infrared LED controlled by buttons on an LCD shield to automatically rotate and photograph an object placed on a turntable. As the object rotates, the infrared LED triggers the camera to take photos at intervals. The numerous photos from different angles are then processed with photogrammetry software to reconstruct a 3D model with high resolution, regardless of the object's size. Instructions are provided on equipment needed, assembly, use, and tips for capturing quality photos for accurate 3D reconstruction.

Uploaded by

Liam Burke
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
246 views8 pages

Build A DIY Desktop 3d Scanner With Infinite Resol

The document describes how to build a DIY desktop 3D scanner using photogrammetry. It uses an Arduino, stepper motor, and infrared LED controlled by buttons on an LCD shield to automatically rotate and photograph an object placed on a turntable. As the object rotates, the infrared LED triggers the camera to take photos at intervals. The numerous photos from different angles are then processed with photogrammetry software to reconstruct a 3D model with high resolution, regardless of the object's size. Instructions are provided on equipment needed, assembly, use, and tips for capturing quality photos for accurate 3D reconstruction.

Uploaded by

Liam Burke
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

technology workshop craft home food play outside costumes

Build a DIY Desktop 3d Scanner with infinite resolution.


by shapespeare on January 25, 2016

Table of Contents

Build a DIY Desktop 3d Scanner with infinite resolution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: Build a DIY Desktop 3d Scanner with infinite resolution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: How it works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2: Some tips on shooting for photogrammetry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 3: What you will need . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 4: Hooking it up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 5: Loading the firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 6: Making your scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 7: Process your scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Step 8: Where to take it from here . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

http://www.instructables.com/id/Build-a-DIY-Desktop-3d-Scanner-With-Infinite-Resol/
Intro: Build a DIY Desktop 3d Scanner with infinite resolution.
If you already have a camera then this project will cost less than $50 to complete. If you like to shop on AliExpress you can probably build it for around $30. If you like to
support your local middleman, more power too you, but it will cost a little more. The giant screw shown above was made from a regular drywall screw captured using this
scanner and a Nikon DSLR.

Desktop 3d scanning has made great leaps in recent years but it still has great limitations. Scanner hardware is built around a specific scan volume and resolution. You
can get decent results, but only if your object fits that sweet spot. If your object is too small, or too detailed or your scanner is just having a bad day your scan will look
like a potato. Luckily there is another approach. Photogrammetry uses a set of regular 2d photographs taken from all angles around an object. If a point on an object can
be seen in at least three pictures then its location can be triangulated and measured in three dimensions. By identifying and calculating the location of thousands, or even
millions of points the software can build up an extremely accurate reproduction. Unlike a hardware based scanner there are no size or resolution limitations to this
process. If you can photograph an object you can 3d scan it. It works from molecules to galaxies, or it would if they would ever approve my Hubble time.

The limiting factor with photogrammetry is the quality of the photographs and thus the skill of the photographer. Photos must be well exposed and in razor sharp focus.
They must also be spaced around the object so they capture every part to be scanned and they overlap enough that the software can figure out where each shot
belongs. With large objects this can be done manually with some practice, but it is virtually impossible to do it well with a small object. This scanner automates the
process.

Image Notes
1. A common drywall screw 3d scanned and blown up to Oldenberg size

Step 1: How it works


A high quality photogrammetry scan requires high quality photos of the subject from all angles. The easiest approach for scanning small things is to rotate the subject
while photographing it. This scanner uses a stepper motor controlled by an arduino board. The stepper turns the object by a fixed amount and then an infra red LED fires
off fiendishly clever series of blinks which mimics the camera's wireless remote. The camera being rather gullible and wishing to please takes the picture.

An lcd display shield with a set of buttons allows the user to control the arduino. Using the buttons the user can select the number of pictures to be taken per revolution.
The scanner can run in automatic mode where it takes a picture, advances the stepper and repeats until it has completed a whole revolution. There is also a manual
mode where each push of the button takes a picture, advances the stepper and waits. This is useful for scans where each picture needs to be framed and focused
manually.

Image Notes
1. It is impossible to get this regular a spacing doing it by hand
2. A common drywall screw

http://www.instructables.com/id/Build-a-DIY-Desktop-3d-Scanner-With-Infinite-Resol/
Step 2: Some tips on shooting for photogrammetry
When photogrammetry software detects a feature in a photograph it tries to find that feature in other photos and records its location in all the shots it appears. If the
feature is part of the object which is rotating we get good data. If the feature detected is on the background and is not moving while the rest of the object is it can cause a
implosion of the time space continuum, at least as far as your software is concerned. There are two solutions. One is to move the camera around the object so the
background stays in sync with the movement. This works well for large objects but it is much more difficult to automate. The easier solution is to keep the background
featureless. This is easy to do for small objects. https://www.thingiverse.com/thing:548006 holds a sheet of regular paper like a photo studio sweep which presents a
seamless white background. Combine this with proper lighting and you are well on your way to featureless backgrounds. Another tip is to over expose your images by a
stop or two. This allows you the capture more detail in the shadows of an object while simultaneously burning out the background so any remaining background features
vanish in the blazing white.

Image Notes
1. Sharp focus here
2. blurred here. Amazing how shallow DOF is with a macro lens

Step 3: What you will need


An arduino. Any arduino will work. I used a mega because it has pins which aren't covered by the LCD shield which makes it easier to wire.

A SainSmart 1602 LCD Shield which provides a display and a bunch of buttons to control the scanner.

A stepper motor driver (I am using an Easy Driver) This allows the Arduino to drive the stepper motor. Any stepper driver should work because we are not asking much
of it except to drive the stepper which is what they do for a living after all.

A NEMA 17 stepper motor which turns the scan subject. With a larger stepper motor (with an appropriate driver and power supply) this scanner could be could scaled
up scan parts of that giant robot you found in the junk yard.

A 950nm IR led which fires the camera. You could probably salvage one from an old tv remote if you are the kind of person who finds that sort of thing entertaining.

Some type of power source for the arduino and stepper motor. A 9v wall wart works fine, a 9v battery works in a pinch but the battery needs to be fresh. The stepper
won't work when powered solely by a USB port.

I have attached 3d printable files for the case I made. <sarcasm>It is extremely elegant and sure to make the rounds of Pinterest due to its beauty and innovative style.
Although it would be foolhardy to attempt to equal a design this classic please feel free to come up with your own, lesser, homage.</sarcasm> and let me know if you do
because I would love a nicer looking case.

http://www.instructables.com/id/Build-a-DIY-Desktop-3d-Scanner-With-Infinite-Resol/
Image Notes Image Notes
1. NEMA 17 stepper 1. Space for heat sink. The driver probably won't need it, but better safe than sorry
2. 3d printed adapter to hold our subject 2. More elegant engineering. It has a certain pragmatic immediacy which speaks
to the designer's indifference.

File Downloads

scanner case bot.stl (12 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'scanner case bot.stl']

scanner case top.stl (66 KB)


[NOTE: When saving, if you see .tmp as the file ext, rename it to 'scanner case top.stl']
Step 4: Hooking it up
Hooking the pieces up is pretty straightforward provided you have the eyes and fingers of a 10 year old. If you don't perhaps you can find one to help you, or at least lend
you their eyes and fingers. The plan shows the pins I used in the firmware, but this is very simple and you can switch them around to whatever works best for you. The
EasyDriver board is mounted on the lid of the case so it gets better ventilation. I had planned to put a heat sink on it, but it doesn't seem to need it. We aren't pushing the
stepper very hard. Astute observers may notice that we are powering the EasyDriver off of the unregulated power terminal of the Arduino. Probably not the best practice,
but unlikely to cause the time-space continuum to implode because we aren't drawing much power. Similarly I included a ballast resistor on the LED just because
everyone who knows more than me says I should. Since the LED only sends out brief pulses it doesn't have much time to cook itself under the whopping 5v the board is
putting out, but follow your own conscience here. A 9v wall wart is the best power supply, but a fresh 9v battery works too, but it won't last long. If everything else is
working except the stepper check the battery because the arduino will work on a partially drained battery, the EasyDriver will not..

Image Notes
1. EasyDriver or BigEasyDriver or any other driver you happen to have lying
around
2. 950nm IR LED
3. 950nm IR LED which you have painstakingly harvested from a disused novelty
Image Notes
universal remote.
1. SainSmart 1602 LCD Shield
4. Arduino of your choice
2. Big easy driver board
5. NEMA 17 stepper or other stepper you have wrested from the guts of your
precious dot matrix printer.

http://www.instructables.com/id/Build-a-DIY-Desktop-3d-Scanner-With-Infinite-Resol/
Image Notes
1. IR led flashes secret messages to camera.
2. elegant engineering sure to win design awards
3. Silly camera thinks it is talking to a remote control. Little does it know . . .

Step 5: Loading the firmware


Download the firmware sketch and open it in the Arduino IDE. The firmware is configured by default to work with Nikon cameras. If you are using a different brand you will
need to change the configuration on line 47. The scanner implements Sebastian Setz's Multi Camera IR Control library so it can work with almost any brand of camera
which works with an IR remote. If you are using a Leica or a Hassablad you can probably afford to hire Mr. Setz to write the driver for you.

The controls are as follows:

SELECT: Start/Stop automatic scan.

LEFT: Manual mode. Trigger exposure and advance one unit clockwise.

RIGHT: Step one unit clockwise without triggering camera.

DOWN: Step one unit counter clockwise without triggering camera.

UP: Cycle through options for number of exposures per revolution.

Don't ask me why I laid it out like this. It made sense at the time. The sketch is pretty simple so it should be easy for you to customize if you need to.

http://www.instructables.com/id/Build-a-DIY-Desktop-3d-Scanner-With-Infinite-Resol/
Image Notes
1. I thought this was cool but it didn't scan well.

File Downloads

scanner_firmware.zip (5 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'scanner_firmware.zip']
Step 6: Making your scan
Lighting is critical for photogrammetry. I use 3-4 JANSJÖ desk lamps from Ikea to light the subject. These lamps are very easy to position, and put out a lot of light. They
have small heads which makes it easy to light small subjects. They are LEDs so they put out very little heat. You can improvise diffusers with regular paper and tape and
not worry about setting the secret laboratory on fire. Plus they are $10 each! I also sometimes use a cheap LED ring light on the camera lens which provides nice diffuse
light, but since it is attached to the filter ring of the lens it tends to get in the way with macro shots where the subject is almost touching the lens.

I use a $25 macro rail from Amazon to aid in positioning the camera. It is about a rigid as an overcooked raman (surely that is the proper singular form) Provided the
macro rail doesn't actually collapse under the weight of your terribly expensive and impressive camera (and don't blame me if it does) and assuming your aren't holding
your photo session in the middle of a hurricane the noodle like flexibility doesn't really matter much because you aren't actually touching the camera when you make the
exposure.

Frame your subject so it fills the picture as much as possible. Make sure as much of the image is in focus as possible. After you finish a revolution reposition the camera
vertically. Shoot as many revolutions as you think you need to capture the object.

http://www.instructables.com/id/Build-a-DIY-Desktop-3d-Scanner-With-Infinite-Resol/
Image Notes
1. The carved wooden goblet from the 3dPrintingToday scanner challenge.
2. 4 revolutions totaling 248 aligned photos

Step 7: Process your scan


You currently have many choices for Photogrammetry software, but there are a few options which clearly lead the pack:

Agisoft Photoscan is the best commercial package which is remotely affordable. The $180 standard version is adequate for this type of scanning. Be warned that
photogrammetry is very computationally intensive so it (and you) will be happiest running on the most powerful machine you can muster. If you are running your
grandma's 486 and are pissed that Microsoft no longer supports XP this will end poorly for you.

Autodesk Memento is a close runner up. It sometimes does better than Agisoft if you have low quality photos, or not many of them. It has better tools for processing after
the scan is made, but less control of the scan itself. Memento is cloud based which is nice if you have an old slow computer, but can be annoying if you get the feeling
you could process your scan faster on your hampster powered Babbage engine. It is currently free, but may not always be so.

123d Catch is Autodesk's consumer level photogrammetry package. It has the advantage that you can manually align photos which can help salvage a bad scan with not
enough overlap between the shots. But the number of photos you can upload is limited so that makes it difficult to scan something very detailed. And just because you
can manually align photos does not mean that it is an amusing way to spend your spare time.

Image Notes
1. how many polygons can dance on the head of a screw?

Step 8: Where to take it from here


So make yourself a scanner. Take out a second mortgage on the secret lair and buy a really expensive and impressive camera, or at least a decent point and shoot with
a macro mode. Find a innocent looking dead bug, scan it and use it as the basis for your army of giant robotic monsters, scheduled to take over the world any day now.

If you want to learn more about photogrammetry and 3d printing check out the "3dPrintingToday Podcast", available on iTunes and wherever fine podcasts are given
away. We talked about the creation of this scanner in show #111. We talk about awesome 3d printing tips and tricks and stuff in all 125 (and counting) episodes.

http://www.instructables.com/id/Build-a-DIY-Desktop-3d-Scanner-With-Infinite-Resol/
Image Notes
1. Evil robot monster ready to take over the world if I could just get a decent scan of it.

Related Instructables

Printer scanner DIY 3D scanner Sense Scanner Build a 30$


DIY Digital Light -RED based on Holder for laser Scanner
Caliper EASY Kinect 3D
GREEN BLUE structured light MacBook Pro by Scanner! by by Sardau
Micrometer and stereo
by arkfusion Aminimal toddie123
Comparator by vision in Python
iectyx3c language by
hesamh

Advertisements

Comments
1 comments Add Comment

tomatoskins says: Jan 26, 2016. 4:46 PM REPLY


This is so cool to see this process! How did you create you screw after you scanned it in? It looks like it was made out of wood.

http://www.instructables.com/id/Build-a-DIY-Desktop-3d-Scanner-With-Infinite-Resol/

You might also like