Introduction
This instructable will guide you to build a 3D scanner for less than $30, or even $12 if you already have a USB webcam.
Seeing the price tag and limitations of commercial scanners I decided to challenge myself to build my own. It had to be cheaper and easy for anybody to build one using a 3D printer.
Result
The "Sardauscan" is a laser scanner, comparable to other professional laser scanners but for less than 20-30 times the price, and it has twice the number of lasers.
My design principles were:
· Keep it simple
· Keep it low cost
· Make it evolutive
· Provide a complete solution
The scanner is completely open source and open hardware:
· The "Sardauscan" software is written in C# - the full source code is available.
· You can write plugins for your own hardware or for your tasks.
The software allows you to scan, smooth, build meshes and export to various formats.
How does it work?
The principle of a 3D laser scanner is simple.
· A picture of the object is taken without any lasers firing
· One laser is switched on and another picture is taken
· Computing the difference between the two images, a laser trace (profile of the object) is obtained
· By knowing the positions of the camera and laser you can derive the 3D coordinates of all the points on the profile
· You do the same for all the lasers, turn the table and repeat the process until the table has made a full revolution
And there you go, you have a complete point cloud representing your object.





























Made it using arduino uno (have included connections), the only thing I printed was the table quide mounts the rest I used marine ply and box tube. I used a Lifecam HD3000 because I found it difficult to get the original here in Australia, but I don't know if I need to alter anything in the software. Everything works great but I can't seem to get a proper scan, I could not get the stepper motor to turn at first so I had to use the alternate settings recommended in config.h. As you can see I am trying to to scan a simple jar but getting a wierd picture, I wish I could read more on 3D scanning and or Sardauscan to leard more about the settings. I have tried numerous setting have failed to improve the scan, I'm degining to think I am doing something basically wrong if any one can help I would appreciate it. Anyway thanks very much for your great design I hope you don't mind me tweaking it a little.
These type of scan is due to the fact that each laser give a different result.
you can go to the correction page : launch a quick scan.
there you can see a superposition of each laser scan (view from the top, one color for each laser).
if the scan does not superpose correctly (and by the look of the result it is the case).
that mean that the computation of this laser is not correct.
the cause can be
- wrong XYZ laser position in the Dimention page.
- Wrong laser aligment (not crossing exactly at the center of rotation, litle bit tilted, etc) => physical page
- camera tilted, rotated, pan, of wrong XYZ position, vertical center not crossing the center of rotation of the table, etc
I also realise that configuration/calibration with 4 laser is way way to complicated to archieve and very few can archieve a good calibration.
as soon as i have time, il will work on a semi or full automatic calibration. But it is not a easy task, especialy without any comunity help.
in the mean time,
you can try to use only one laser (by changing the configuration.h in the firmware). it is much easier to calibrate and understand what append.
When you become fluent with the change and calibration, you can add other laser, but be aware that the calibration difficulties are exponential with number of lasers.
ps: you can see here in the comments many usefull informations to help your calibration.
Regards John.
i can't solve your problem, the only think i can do is pointing you on some direction by guessing what append based on your comment.
I don"t know why opentk crash on your specific machine. perhaps you can ask them. ( http://www.opentk.com/forum/2 )
For the other software, you can maybee rewrite a firmware for the harduino to match the BQ cyclop one. (or adapt they firmware to match your hardware) and use they software. but he also use opengl (but not opentk). but i don't think it will be an easy task for a non programmer.
Hi, thanks for all the advice I have installed the sardauscan on another laptop and it runs, it sees the camera but not the arduino I want to test it but am confused with :-
Connect to your Arduino with your IDE
Type “Sardauscan” – the Arduino should answer “yes”
Try the stepper: type “T R 100” – your table should turn 100 steps
Try the laser: type “L 0 1” for the first (0) laser to fire (1) – the first laser should light up
Where and how do you type in the IDE to get the response
tools -> serial monitor (select the same baudrate as in your firmware: 115200, and the correct com port)
all the file in the github are the source code.
the "firmware" directory is the source for the arduino firmware (you use the arduino ide to compile it and upload it to the arduino)
the "sardauscan" directory are the source for the program. (you use visual studio express to compile it. but i've given a zip file with the program already compiled)
Have done that but still the same run debug and it comes up with attached file. I don' know much about this can you help.
Regards John.
sorry i can't access your doc file.
Sorry, I've scan it as JPEG and have attached it.
it seems that it is the opentk lib that cause problem. can you instal (or reinstall opengl)?
Regards John.
you open the /Sardauscan/3d Scan.sln file with visual studio.
You go to the menu and click "rebuild".
the program will be compiled in the subdirectory /sardauscan/bin/debug (or /sardauscan/bin/release depending on the target you choose)
So where do you get the table for this scanner? Can you print it? I've looked all through your instructable and couldn't find anything on making or installing the table.
you can use whatever you want, wood, plastic, etc.
i've seen people use a vinyl disk, personnaly i use a old round mirror paint in black.
Hi, great project but I have a problem,I have uploaded the firmware to the Arduino Uno and unzipped the 5 files and run sardauscan and it shows the GUI then says the program has had to close and that windows will try to find a solution and let me know ?. I am running windows 7. I was wondering what happens to all the files in the Sardauscan-Masters folder, can they be any ware ?. Thanking you in advance.
Regards John.
as is said earlier, somethimes there is a problem on some machine and i dunno why.
please be sure to have dot net 4.5 and the latest direcshow.
if it does not work with these, try to download visual studion express and rebuild the source code on your machine.
Thank you very much for your reply, I'll try
Hi ~ you mean reinstall the computer system?
and rebuild the source taken from github.
Hi! a good project.
I have a problem with Windows applications.
My Windows 7 pro and my webcam is the old model (trust). When I run Windows application error message "stop running Sardauscan program" and the application to stop. This is just a layout.
I have dotnet 4.6 and the latest directx11
it has something to do with the embed ressource of the gui, but i can't figure what.
hello, I have doubt, if it is normal that when you are scanning two images, one small and one large appear? I'm using two laser only, one at each end of the support.
I have these parameters, I have to change or you know why this happens?
So if one laser give you a wider object and the other give you a thinner object,
it is due to the fact that one (or two) laser dit not cross exactly at the center of the rotation table. (it can also be your camera)
if the difference is realy minimal between the 2 object, you can correct it in the "correction" page.
but if the difference is too big, you must recheck your build :
the camera and lasers must cross exactly at the rotation center of the table. and be vertical (no tilt)
i am sorry about that, i tried many time and calibrate it many time but still can not get the result. i dont know what is going on and how to fix it.
Also, in the tune section, i dont know how to change those value into a optimal value and get the better result.
your lasers must cross EXACTLY at the center of the table. and the line must be perfectly vertical.
for the ease use only one laser, it is much easyer: edit your configuration.h in the firmware and set for only one laser.
the size/position you give in the Dimention windows seems incorect.
maybe you invert the values of X and Y, maybee you set a X value instead of -X, etc...
I am really sorry about that i still can't fix the problem after change the position of x or y. The calibration still can not get the circle if i just quick scan it with the empty table. If i quick scan it with the calibration object, the matrix still not easy to superimpose. I have no idea what is going wrong.
it seem also that you have many scanning errors (all the floating points in your first image). the program don't see a clean red line.
you must have a clean red line in the black part of the tune page ( no isolated points).
To help you can increase the threshold in the tune page, reduce the camera exposition in the settings of the camera and focus your laser (by turning the little knom on the laser head) .
But i thing your main problem (by seeing your last picture) is the "moving/ non static background": your background is different by the time the laser is off and on.
i see many cause possible in the last image, laser relecting on stuff on your desk, pc with leds etc etc
As i don't see a clear laser off, laser on in your 4th image. the laser did't have time to totaly go off between 2 pictures. => you can increase the laser 'fade' delay in the settings (right icon in the title of the application, there is a entry for that. the unit is millisecond).
I used one laser instead of four lasers and get the much better quality of scanning ever, however, the shape of the scanning still not quite similar to the object and the printing on the ball are inverted. Do you know the reason and how to improve the shape and the correction?
Also, why i use one laser would much better than four lasers? are there any there correction or solution to get the better quality of scan? Thank you very much.
the shape is not correct because your laser does not cross exactly at the center of the table (venter of rotation) or you carmera center is not exactly at the center. (or your dimention is not correct).
the quality is better with one laser, for the same reason : error of each laser are added together, you must be very very precise in your build with 4 lasers.
As i see you pircture :
You cant expect to get a correct size(build dimention) and a perfect calibration, if your camera part and table part aren't event fixed together.
I suggest you print a 2020 to at least fix the 2 parts.
in the build dimention, or physical calibration 0,5mm difference give bad result. all the computation is wrong.... (with an error of 0.5mm error, 4 laser give you a equivalent of 2mm error)
Thanks for your reply
I see .I will keep trying with one laser first. But what do you mean that" I suggest you print a 2020 to at least fix the 2 parts"?
what are 2020 and 2 parts?
look your picture, you got 1 part (the turn table) and the second part (corner+lasers+camera)
you must fix them together with a 2020 profile. (you can print one if you don't have proper aluminium profile http://www.thingiverse.com/thing:280318 )
the size is in the instructable, the github or the thingiverse instruction page.
in your last photo, i see that the 2020 profile between the table and the other part (corener with laser and camera) is missing. it it almost impossible to get a good calibration like that. you touch just a little bit one of the part and the calibration is gone and the dimention change.
do you have the 2020 profile stl printing file for us to fit into it? Because it is quite hard to find a suitable 2020 profile to fit into the parts in a short time.