· As a perfect calibration is difficult to achieve, especially with a higher number of lasers, the correction step will help you correct the previous errors.

· Place your calibration object on the center of the table and click “quick scan”.

· When the scan is completed you will see a top view of it. Each color corresponds to a different laser.

· The goal is to superimpose as best as possible the different laser scans: select a laser in the combo box and rotate (left mouse button), scale (middle mouse button) and pan (right mouse button) the scan.

Congratulations , your calibration is done!

Dafuq is this interface ?

To be evolutive the software is designed around tasks and processes.

When you open the program you will see to the left a list of available tasks – you can drag them to the process list on the right then press the ‘Play’ icon at the bottom.

Here is a non-exhaustive list of the available tasks:

· Scan: scan an object

· Grab Pictures: take pictures of the object for use in a photogrammetry program

· Filter IQR: remove noise from the data with an interquartile range filter

· Filter median: remove noise from the data with a median filter

· Angle: merge laser scan by angle – smooth the scan and filter noise

· Bezier: smooth the data by fitting a Bezier curve

· Surface: smooth the data with a Laplace surface smooth

· Save ply: save a PLY file to use with MeshLab or any other point cloud software

· Save stl: save the STL file

Developer Corner : Evolution ? Own hardware ? Plugins ?

As mentionned the software is not linked to the Sardauscan build – it is made to be evolutive.

You can do almost whatever you want with plugins.

You have a magical algorithm?

Do a plugin for it !

You have a custom image acquisition hardware ?

Do a plugin !

You want to use your own hardware firmware for the table or the laser ?

Do a plugin !

You can look at the github repository, there are some plugins samples. It is really simple to code.

Hi everybody,
I have built the 3D-scanner and it works really good. Thank you for the great instructions!
I have a question which affects the calibration of the laser image:
What do the parameters "Min Width" and "Max Width" indicate?
Thanks for answering!

Thank you for all the hard work you put into this, I think it's great!

Before starting this project. I have a few questions.

In the US, the Hercules Twist is not really available any longer (you can get it for ~$45 ugh!). Are the CAD files available to re-work the mount for a different Webcam. I've seen a few in the Remixes but...

How important is the resolution? In your design you went with a 5MP 720p camera, would a higher resolution (say 12MP HD) camera still work?

I would like to have ago at building this 3d laser scanner but living in South Africa the part are difficult to find. Importing from ebay would be difficult and more expensive. Does anyone have a solution would be pleased to hear from them

Hi there! Liking the scanner so far, even if I have to properly use it yet..
It seems I'm facing some kind of a problem.. After some time my nano is connected and I've opened sardauscan.exe, the program slows down a lot, until it blocks and no other operation is possible for me..
I think it could be due to the board, since it seems the COM port is changing, but I've also tested it with the serial monitor of the Arduino IDE and it responds with no problem (I tested it as soon as the problem occured, without re-attaching the nano)..
I'm currently trying to leave the board connected and the program opened for some time, with not all the wiring connected at once (to see if there's something wrong with it)..
Do you have any idea on how to solve that? I hope I explained it well enough!

I should have thought of that before: it was the cable! Actually, maybe the cable and the port where I attached the nano.. Now, with another cable, it doesn't change port anymore, but if I change USB port it does as before.. Maybe the other port is defective, who knows..
I still have some problem with the scanning process though (a part from a bad accuracy.. the camera still sees too many dots): it seems my camera detects objects behind the plate.. maybe the dimensions are not accurate? I'll try that..

Hi guys...i need to know the scan area of this scanner...i have to scan a sphere of 30 cm diameter...it's possible..?if not if possible to change the asset of this scan for the use i need? it's only a problem of scan size or i have to change also the laser?

I am making my scanner adapting some pieces for a Microsoft HD lifecam, and a printed circular platform. I received the lasers but they are 9 mm and not focusable. It is safe to connect them directly to the arduino without a resistor? How long does the laser stay on?

Hi
I am new with arduino, and I don't know what am I doing wrong, but I can't upload the firmware. It says :

E:\3d print\Scanner\Sardauscan-master\Sardauscan-master\FirmWare\FirmWare.ino:2:26: fatal error: AccelStepper.h: No such file or directory

include < AccelStepper.h >

compilation terminated.

exit status 1
Error compilación en tarjeta Arduino Nano.

I tried to merge the two folders (firmware and Accelstepper), copy the accelstepper folder to firmware folder, copy only the accelstepper.h file to firmware folder, but nothing. same error. could anybody help me please? A step by step tutorial would be great. thanks

Im struggling to understand where X is measured from. Facing the camera it is from left to right, but measure from where to where exactly? Are negative and positive numbers used? The line in the Drawing on the x axis is that the measuring point? I tried to do a quick scan with what I thought was the correct calibration and the result was similar to an ink blot pattern . Help is appreciated . Thanks

all distance are in reference to the intersection of the rotation axle and the table.(ie center of the table).

the "quick scan" is a tool to quickly see if the lasers are correctly calibrated.
It is a simplified top view of the scan. each ink blot pattern is a scan by each laser. the goal is to have all these ink blot to match each other as best as possible.

ps: i find easier to set the X value of the laser by setting the "angle" of the laser (just set the angle with the correct sign, and don't bother about each x/y value).

Thanks for the tip on the angle. I will try that. The ink blobs don't take on any shape and don't match each other. Shouldn't they take the shape of the object I'm scanning? They're random shapes and aren't the same even after a repeat scan.
Thanks

Hello Sardau/Ferretti,
I build your nice 3D scanner more or less according to your specs. You did a really good job in developing this. It took me a while to get all the components, primarily from China and in the meantime I printed all the 3D parts. Now its all put together and tested - it so far all (technically) looks and works well. I'm at the calibration and last physical adjustments and looking for some nice stuff to scan.

​Hi Ferretti,
I have built your 3d scanner and have gotten decent scans and calibrations but I'm having a problem with the scanned image looking like someone is grabbing the top of the model and pulling up, creating an almost cone shape of the scan plate and making the model have a kind of upward curve to it. I have tried playing with the numbers in the build dimensions but I can't seem to find the cause.
Any help would be great.

Thanks a lot!!!. My problem was that it was not dragging the process to the column on the right. Now if I'm going to try the scan of objects.
Thank you again for your quick help.
You are doing a great job, keeping alive the thread of responses.
Thank you.

Hello Friend Ferreti. I have finished the mounting of your wonderful 3D scanner. All my works, motor, laser, camera. The program allows me to turn on and turn off the laser, move the engine, see and adjust the camera, etc... My problem is that not allows me to scan objects. The version of your program that I have intalada, is the 004. As I have read in various places, I have to appear a menu with the options of scanning, but this is not so. Tea would appreciate help me. A greeting.

I was trying to convert this to Solidworks so that I could change the camera mount to fit another version. Opened the 123D design file and managed to convert it to Fusion 360 and from there to a step file that I imported to SW. Now when I look at all the parts I realise that the 123D Design file you included isn't the complete one? The arms for example are missing holes etc.

Any chance you could save the individual files as step or some other format that I could import?

One more question, I noticed in the upper and lower camera mount that you have made a round hole to fit over the 20x20 profile. Wouldn't it be better to make that cut to fit exactly in the profile instead with a nut on the back? That way you can rise or lower the camera as needed?

that was my first version,
but with the print precision and the tolerance of the part, the camera can be a little bit off center. (0.1 mm in the support can mean 1mm off at the center of the table: is a realy huge error)

Hi, I built this scanner a few months ago and the Arduino sketch worked very well. However, when I came back to it today it told me that invalid libraries found in the previous location where I installed them. Do I need to update something in order to get it fixed? Thanks.

I find this project very cool. I have printed all the parts last week. Before printed i testing motor, lasers with nano & uno in combination with serial monitor. All the stuf works well. I assembled and starting sardauscan.exe. The camera works, the icons of the lasers and turntable stay red. By clicking on one of this icons then the window for the com port coming on the screen. Every time i clicking on the little usb icon i see on my uno the tx en rx leds blinking. Baudrate also ok. With a nano just the same problems. Do you have any idea whats wrong.

it is hard to know. it is a problem i've investigate but didn't find the reason ( if some one know, i will be greatfull)

on some pc or with some arduino, the connection is painfull. the arduino don't respond in 5 sec. and the timeout trigger.

I dunno why, i think it is something in the c# serial class, but i don't know what.

the only workaround i've found is that you mus click on the usb icon several times, and finaly, magicaly the arduino respond under the 5 sec.

after that, the problem seems gone. when you restart the application, the software automaticaly try to reconnect to the previous com port. and at the restart the arduino respond under the 5 sec. (it is the same code for the 2 case)

if someone have a idea of the problem and how to correct it, it will be greatly apreciated.

you can use only one laser by configuring your firmware ( define num laser) .

or you can click on the little gear next to the "Scan" task, and choose there witch laser you want to use.
(if you edit in the left, you edit the default, on the right column, yopu only edit the config for the curent process).

I solved all previous problems just replacing the arduino nano with an arduino UNO ! (Chinese copy just 5€)
But i have i minor issue now, the problem is : the motor turns ok also in degrees but mounted under plate seems to not have enough power to rotate it smoothly. What can i do?

I am having trouble with turning the stepper motor. When i want to turn the motor the leds on the stepper driver flash and the stepper motor is vibrating but not turning. It goes maybe 1mm to the right and then 1mm to the left a lot of times. I have changed the step revolution and half step. Before i changed anything on the code it did not do anything. but when i change the halfstep to 4 it will vibrate like i have explained. When i change the step revolution nothing changes still vibrating.

the stepper motor is working i have tested it with some simple code and it turns.

There's no stepstick in this project, my friend. Just a simple ULN2003 style driver running at full current. The motor being rated for 5v is what limits the current.
Here's what is used by this project: http://www.ebay.com/itm/331848426074

If the motor is vibrating, the pinouts are different than the motor/driver board that Feretti used, and you just have to figure out the right sequence. You can do that in the firmware, or more easily (imho) by swapping the IN 1/2/3/4 pins until it works properly. It may be that just pins 2 & 3 need to be swapped. You can test your motor with a multimeter pretty easily.
I've got to run out, but if you don't figure it out, I can help later. ;-)

I have the same issue! I tried with another Nano, another motor, another driver but still it only vibrate...
And my other issue is: if i connect the nano with driver+motor the software connects to it
But if i connect also 1/4 lasers the sw can't connect anymore like there isn't enough power to make them work.
So i connected to the nano an external power 5v 1A (last two pins : VIN - GND) but still nothing.
Where i'm mistaking?

P.s. There is a link in the item description in ebay on how to operate and a a certain point it says:
The crucial things I learned from Stan's posting were:

The 28BYJ-48 needs to be operated in half-step mode, ie an 8 pulse sequence - the standard Arduino Stepper library can't do this.
The 28BYJ-48 coils need to be energised in the pin sequence 1,3,2,4, rather than the standard 1,2,3,4 sequence

I solved all previous problems just replacing the arduino nano with an arduino UNO ! (Chinese copy just 5€)
But i have i minor issue now, the problem is : the motor turns ok also in degrees but mounted under plate seems to not have enough power to rotate it smoothly. What can i do?

I've just finished getting this built, wired up and calibrated, but now I'm having problems with the scan software producing heavily warped scan data. Specifically, details that SHOULD be straight are coming out bent on the scan.

I'm VERY confused as to why it's coming out like this, since I spent almost an entire day painstakingly ensuring that the machine was calibrated and aligned properly. Without knowing how the scan data is assembled from the raw image, I'm not sure which setting to change or tweak to make to correct the issue (I had a look through the source, but image processing and machine vision isn't my area of expertise)

Actually, scanning with an individual laser produces the same distortion as seen in the 4-laser scan. The full scan just produces the illusion that it's misalignment since the extreme-right and extreme-left laser miss some details and leave voids in the point cloud.

http://i.imgur.com/Ikba66F.png <- Top-down view, Laser 0. You can see a dramatic bend on the left hand side and the right hand side doesn't line up with the bottommost edge.http://i.imgur.com/RMaM5rf.png <- Side view, Laser 0. The model is visibly and dramatically warped upwards in the centre (top of model isn't flat, lid ridge isn't flat, and there's a visible gap at the bottom-middle which I suspect is where the model meets the table)http://i.imgur.com/2Hg3gRl.png <- Top view, Laser 2. You can see the same bowing at the base as was visible on Laser 0.http://i.imgur.com/3V1LlH3.png <- Side view, Laser 2. It's somewhat harder to see from this shot due to the lines obscuring some details, but you can make out the lid ridge and how it's heavily bowed upwards, and that the top of the model isn't flat.

I tried adjusting the values listed in the build dimension area, but none of them helped the issue. The lasers are correctly focused and aligned both vertically and on the bed rotation centre.

in cm if i remember well (it is more than a year and a half that i've develop it).

for the values i've asked them to the hercule tech support.

try to change the focal length first , i think it must be a bit higher , maybee between .5 and .6

ps: my hd cam have also the "wide angle". but in reality, it is not a wide angle camera, it is a "wide screen resolution" : (a 16:9 resolution sensor) : the hercule marketting team don't seem to understand the difference ;)

Same with me. Tried the firmware trick, used external power. I also bought everything twice. Lasers are working.
How can I check the motor? What voltage can I put on pin IN1-4 to check it without arduino? (+5V?, ground?).
Thanks for your work. Awesome.

Thx for the awesome pack. Will build my own when T-Slot-Rails arrive. Just tried the Firmware, compiles flawlessly, right out of the box on Arduino IDE 1.6.6, tried to run Sardauscan binary on Win 10 64bit, also started up without problems. Everything what i am able to test right now is working. Thank you for this great development.

Yeah, read all of the comments and most are complaining about errors instead of looking by themselves and try it on other Machine / OS / IDE. sorry to say, but some need to do their homework before... will try to make an instruction on my blog (only in german, sorry). how to set it up. Tried to read the french pdf, however i don't speak french, most parts are self explaining. Will use it as basic for my (german) howto, if its ok...

So build is completed, first scans are... ok ugly, but one came out pretty well. Now i have to figure out what the best settings are. Is there a way to exclude 2 scanners from calibration, so that i only use 2 of them? Is there a description which settings, especially for the camera will make which changes? For example min and max width? what do they exactly do? And also the treshold?

One more Question: i have done the correction for all lasers, but there is much "jitter", also ist not possible to do the allignment in size, because the size adjustment of the different lasers is very coarse, is it possible to make the resize-change per mousewheel-move smaller?Maybe 1mm per mouse wheel movement or so? And is there a description for the different filters and their Settings?

"
20x20 profile ( can be printed : for exemple http://www.thingiverse.com/thing:280318)
....
2020 lengths of my build (but you can use whatever you want, just make sure the camera can see all the scan area)
2x 140mm
1x 120mm
1x 250mm"

I printed all plastic parts, i bought the lasers and the motor and i'm waiting for the micro arduino. I tryed the scanner with arduino UNO but the results are very bad (much lines but nothing body).The next week will arrive the Micro arduino and I'll try the exactly project, in the waiting who can send me a stl file for the plate (190 mm) with the support for the motor? thanks

Thanks Fabio for your reply and compliment for your work. For the calibration I must take the distance from the camera (I use a Microsoft Life Cam HD-3000) with the center of support mounted upon the motor or the distance from the camera with the object on the support ?
Another question , my lasers have a dial to adjust the beam width, and I have observed that with the laser light beam off the laser's intensity is less powerful than with the small bundle , which I have to use?
I hope I explained well, I'm Italian and I do not speak English well

In your wiring diagram is the top laser laser 0? and the bottom 3? I'm trying to figure out why my scanner will not function correctly I've double checked the build dimensions. the only thing I can think of it my lasers are firing in the right order. On the app when you manually turn the 4 lasers on is the one on the left laser 0? and the one on the right laser 3? or does the 4 lasers right to left on the app coincide with the lasers as they are seen right to left?

Hi- fantastic project, and have finally got mine up an running,
Getting really good quality , but although the camera is showing all of the object in the preview window , only the top half of the object is showing up when scanned, what am doing wrong- danny

Hi Ferretti good project!
But i don't understand one thing: with arduino you control the plate, the laser, but the camera is only connetted to the pc?!
In wich way the camera is sincronized with the arduino's action?
In wich way the camera choose the time to shot the photo? In wich way arduino comunicacates with pc and with the software that creates the scan?

The arduino is used to control the stepper motor that turns the table and to turn the lasers on and off, via commands from the PC.
So the software on the PC does the coordination of everything. It's not a standalone scanner.

The wiring diagram has shown on my pc from the download page just shows the wires but not from where they came. I now know they are from the lasers.
I found the full wiring diagram elsewhere and now your post shows the full wiring system.

Really enjoying this build got the brain working. this is not really a comment just trying to understand the wiring.
Can you assist me in that how do the laser wires connect to the arduino board.
I am sorry if this seems obvious to some but to me its not.

Just double checked the camera is not wide angle it's fixed focus 5MP 1280x720p just like the Hercules. I'm probably going to take the camera & board out of it's housing and make a new housing for it so it's not in the round one it currently is and in know it's straight.

That's what I figured thank you! I'll let you know how it turns out just ordered all the parts! I was wondering about printing a bed 200m diameter bed attached to your simple axis so when you place the bed & mount as one part on the stepper motor you know where the center is. thoughts?

sorry, "generic error in gdi+" is a totaly generic error in the graphic library of windows, it can be bitmap empty manipulation, wrong gdi pen/brush/ressource, insuficient graphic memory, etc... it can be anything, it don't help to understand a problem. the only way of finding the problem is to debug.

One more question please: I am using only one laser. The program takes the default number of images (I think they are 44 or something near that number). The laser every specific number of flushes (6) or doesn't switch-on or switches-on for a very short period and it doesn't show in the image. It is not the laser itself because it wouldn't happen every specific number. Is there anything else that I can look at so I can short out this problem?

if when you switch on a laser, and you send command to turn the table, your laser fade from time to time. it is because @ certain "angle" , your motor consume more power ( more coils used @ certain angle).

You can try the tips in the readme of the firmware, it's also help with the power lost during rotation.

In the instructions for the built calibration of the laser the dimensions x, y and z what are they referring too?
Are they distances of the laser from where? I have also notice that as I change the built height of the camera the value of the laser built angle changes. How these two are related?
I made a different mount for the camera and the laser so my setup might be a little different from the programs default.

Hi Ferretti,
Excellent project. I have almost finish my built but I have a question regarding the webcam. I will use a logitech c270 since I couldn't find the recommended one in a logical price. I want to mount the camera vertical because it is easier to mount it that way. That means that the images of the feed will be turned (x will be y and y will be x). Will it work as it is or I will have to change something in the software.

It will not work as the axis of rotation is not the same as it is intended. It don't work for know but

I'm trying to use a genius 1024p webcam , vertical, so i'm changing the code to allow the configuration of the orientation of the camera. It will be available in a future version ( when i find time).

in the mean time, you can do quick change in the code : Search for The Icamera proxy implementation (NetCameraProxy.cs), switch all width/height (for image and sensor). and replace this function by this one

Hi. The Arduino Sketch just worked. However I had to interact with it in order to turn on/off the laser as well as the step motor. May I ask is that what the sketch originally like? If I want it more automatically or intelligent, do I need to program by myself?
Thanks.

I built mine about a month ago, but didn't have the Hercules HD Twist Webcam, and was trying to use a Logitech camera to no avail.. I just couldn't get it to calibrate at all... (Even with 1 laser)

So I bought a real Hercules camera - $34.99 here in the US (the only one I found in the US on eBay) -- and we'll see if that fixes all my issues when it arrives. ;-) My guess is that the difference in lenses/focal length/etc between the two cameras is just too much for the software to account for. Or at least, to my extent of 'tweaking'.

I'll post some pics of my make - It currently has the Logitech camera zip-tied in place, but once the HD Twist arrives, it will be going in it's proper place, and hopefully calibration will be very quick afterwards. ;-)

the key to the calibration is to find the perfect center of rotation of the table. once you get it it become the center of your world.

All must pass there and be absolutely vertical. the line in the calibration camera preview, your lasers etc. Be aware that your camera can't have any tilt. roll or yaw.

the calibration object is perhaps not the best object. it is preferable to have a object with vertcal edge (to see if a laser is not perfectly vertical) and that you can easely recongie the orientation if you see it from above ( to see if one laser need a rotation)

for the calibration of the lasers, i use the thin crate in the calibration object.
i place it exatly at the center of the table,
i turn the table so the object so it is parralel to the camera.
then i light each laser and adjust it to pass exactly to these crate.
i repeat for each laser.
then i verify if all the laser are correct by ligthing them all together: you must have only one thin line.

Once you get that, enter the correct dimentions (verrrry precise).

then and only then you can go to the correction windows and move lightly until the laser contour in your quick scan match perfectly each other.

some tips in this page :
if one contour is smaller than the other, the corresponding laser does not pass exactly in the center.
if one contour is composed of several lines => the laser is not perfectly vertical.
if one laser need a rotation => the angle (or position) for this laser is probably wrong

I hope it's help.

ps: i know the calibration is realy realy hard, i've try several methode but i didn't find one that work 100%. I'm researching on a way to do a automatic calibration , but i'm stuck for now. perhaps someone in the community will help me to reach this goal. (i was hoping more support from the community, i didn't get any real help until now and i'm a little bit discouraged)

Thanks Ferretti - I hope I didn't come across as ungrateful - I'm very grateful for you sharing your scanner with the world! ;-) You've done an awesome job on this. ;-)

And yes, my Logitech camera is a widescreen 1080P camera... So that's probably a huge part of the issue... I could get a scan that had somewhat of a representation of the scanned object on part of the scan, but even then, there was lots of 'noise' in the scans, resulting in the scan not looking like much of anything. (Some was from the background, some was kinda random, etc. Nothing super-consistent.)

So even though I don't have it working right just yet, here's a couple of things that I've learned so far that may help others... ;-)
1) I used plastic '2020 Extrusions' that I printed on my Delta. And no matter how strong they seem to a human (Me), I discovered that they have quite a bit of torsional flex to them. This isn't so good for this project (at least for the 'legs' - as they flex quite a bit.
2) As you've said, it's hard to calibrate, even with just 1 laser. I think a big part of it is somewhat obvious -- Let's be honest - We're using 3D printed PLASTIC parts, so they are not that rigid. Moving one of the lasers even a tiny bit tends to knock everything out a little bit. So I'm pretty sure that's one of the reasons it's so hard to get it calibrated. I'm thinking of possibilities to stiffen it up a bit, and maybe even 'engineering' a screw-style adjuster for find adjustment of the lasers... We'll see if I come up with anything worthwhile on that. ;-) I'll share it if I do! All of my parts are printed in PLA, so they're pretty tough, but again, this is just plastic. ;-)

So PLEASE don't take my comments as negative or criticism of you or this design - I personally feel that it's a stroke of GENIUS! And I'm pretty confident that once I receive the Hercules Twist camera (that you designed this for) that I will be able to calibrate it. ;-) And at that point, I'll look into buying some real Aluminum 2020 rails as soon as I have the money. I'm sure it will only get even more accurate at that time...

Concerning the noise in the scan :
play with the exposition of you camera (camera settings) and the threshold (tune page) until you get a beautifull red profile of your object in the preview window. (the min and max havn't much impact)

be aware that the laser detection is made on the red layer. so a red object is difficult to analyse. a black one too. be aware that shiny object relect on himself the laser introducing some noise.

another important tips, is to scan in a place where the light don't change. personnaly my scanner is under my desk ;)

for the table a black mat paint is optimal.

For the noise there are also several noise reduction filter (median filter, iqr, "angle" that helps). you can also use a better mesh reconstruction program as meshlab. there are several pointcloud cleaning tool.

Even if you don't have the good calibration and/or camera, you can scan with another technique.
You can use the "Grab Picture" task to take several pictures of a object (with a clean background). and use a photogammetry program to recompose the object ( like 123d catch for exemple).

ps: for the strengt, i made the choice to make the design in many small part so poeple print on a small printer and can scale the build by choosing the size of the 20x20 to match they needs, but the cost of this decision is the rigidity.

Ok, the Hercules Twist came in, and I was able to at least get some recognizable scans! ;-)
My camera is up too high to scan objects bigger than about 2" round as the bottom gets cut off in the camera. So I'll have to shorten my "Z" axis by about 20mm or so...
But is is very encouraging to see a scan come out that resembles what you are actually scanning. ;-) I'll add a couple of snapshots to my Make. ;-)
Getting closer... but I may not have time to work on it again until next week as I'll be away for the weekend. ;-)

I bought all of the pieces and wired it all up and the stepper motor does not turn when I give the command to The lasers turn on, and it replies yes when I say sardauscan. is it the stepper motor itself? Or do you think it is the program?

there are 2 solutions:
1) use another power source for the stepper driver.
2) (from Mark Benson)
"If anyone else is having problems with a BYJ48 stepper not doing anything, change the HALFSTEP value to 4 & REVOLUTION_STEP to 2048 in configuration.h."

Hi, I am doing a research based on your project. As for the programming step, I downloaded the two libraries required, the configuration file and SerialCommand file and imported them into Arduino IDE. When I uploaded the firmware.ino and tried to compile it, it could not recognize anything from the library. Is there anything I did wrong?

and how is the camera connected to the circuit? I know it is a USB driving camera.

Hi, I've tryed to make it one. I've assembled all the plastic parts, I've wired all the cables as in the picture and have bought (just for use as scanner) a Microsoft HD3000 webcam (fortunately only 16 euros in Amazon) and finally I've setted the sizes in the software.
The result of my scanning is very very different from the reality. It's just a set of points and lines placed randomly.
Wich is my problem? Are there videos or guides to set the right parameters? I'm really sad and a bit angry for this issue...
Thanks

Hey, I'm having trouble finding a place to buy the HD flex camera. Is there a different camera I can use, or can someone point out a place for me to get one? Thanks! Can't wait to get this thing working.

you must be very precise to do the calibration, follow the instructable procedure. : there are tons of informations in the comment too.
Also use only one laser, it is easyer to understand where your calibration is wrong.

my goal was to made the simpliest and most cheap scanner. a scanner don't need any other hardware to work.

the Horus/cyclop was released in the same time. i've not used they firmware. i've considered try to make the firmware compatible to take advantage of the auto-calibration of the cyclop software. but i found the firmware way way too complex for the simple task of rotating a table and light some laser. (a contrario : the code of they cyclop software, is clean, celver and elegant)

make sure to go to the tune page, you must have a clean red line in the last picture. (additionnaly you can check if your laser focis is set thi the thinnest in the scanner surface range. you can also reduce the exposition in the camera settings, it's help a lot)

if you are sure that your build and physical calibration are correct, try the correction page.

use the "laser" or "angle" task to help reduce the artifacts of laser mis-alignment, position detection errors.

Where are the legs? and the piece that connects the camera to the scanner table? 123D crashes every time I try to delete anything. I suggest you use openscad or sketch up. Its much better software with industry standard export options for professional cad software.

no need to apologize, just most people use programs that can export to all cad software. If you plan on sharing cad software with other people you might want to consider other software. If you are a student you can get 3 year licenses for free with autodesk. There are also many free cad programs like sketchup which allow for easier collaboration in the sense that the majority of designers use software that is not compatible with 123D.

Hi, I achieved this project. at this time I have some issues with calibration, but after reading all your comments I think I will make it work properly . I know it takes time but I would really appreciate a PDF manual for sardauscan software. Anyway I begin to have a more precise idea how to use settings correctly .
thanks again for this great project.

Thanks Ferretti for an amazing project, i can see you have put a great amount of time into it even down to the smoothed corners on the stl's, 3 days of print and build time got me up and running using recycled builders level lasers and a uno

1 of my computers crashes trying to run Sardauscan in windows 7, its a compaq atom quad core with Intel 82945G graphics and no opengl, Prusa's problem I think.

The calibration is still confusing me along with a few other questions, please help.

1:- which direction should the turntable turn looking down onto the table ?

2:- which position are the lasers in laser, left to right or right to left ? (a colour code on the picture in the software would be nice)

3:- where is x in the x,y,z build dimensions? (another simple graphic please)

4:- why when i input 30 degrees into the laser position does it change when i try to enter anything else ?

5:- should there be no tilt at all on the camera?

6:- why does my point cloud look like it exploded

I wish there was a simple build PDF instead of trawling multiple websites gleaning small bits of info on each.

Thanks again for bringing this to the public for free and I'm wishing you good Karma

you need net 4.5 and opengl 2.1 to make the software work ( it use opentk a opengl wrapper and sadly it need opengl2.1 even if you only use opengl 1.0 functions).

1/ the table must turn clockwise while it scan .

2/ when you face the camera, the laser is 1 to 4 from left to right. (i will surely add color on laser in each interface in a future version)

3/ all the position ares from the center of the table. the x direction in from left to right when you look from the camera to the center of the table. the y is from bottom to up and Z is from the center of the table to the camera.

4/ it is due to the fact that the angle is only there for ease of definition, the program work with x y z position. when you enter 30° it convert that to x-y-z position, and the value displayed they are converted from x y-z to angle : there are some minor precision error. thets why the 30° is usualy displayed as 29.xxxxx or so.

5/ no, absolutely no tilt is allowed in the current state of implementation.

6/ it is difficult to say without seeing a image. but if separate laser scan does not match each other : it is a problem of calibration (build size or physical misaligment). if the lines are noisy. it is a laser detection problem. for that it is the "tune" interface (and the camera settings). try to play with the thresold value to get a good continuous line.( you can also change the camera exposure in the settings).

i wish i had time to do the PDF or some videos for the build, but sadly there is only 24h in a day and i don't have enough time. If i see that the scanner become popular, i will certainly make a wiki as soon as i find time.
I was hoping that i get some help from the community, but i get almost none so far, and it is a huge work for one person alone ( i barely have the time to respond to every questions i get).

Hi Feretti - if you find time to start a Wiki page, I'd be glad to contribute to it. Like you, I don't have tons of time, but can spend a few minutes here and there helping to build it up a little bit at a time... ;-)

i'm in contact with the guys from smatfriendz. they are the guys behind the smartrap and smartcore printer, they are enthousiast maker and they are completely in the same opensource mind as me. ( http://www.thingiverse.com/smartfriendz/designs )

they will certainly sold the scanner parts as a kit and help me make the scanner more accessible by doing a manual and support.

Did you have remove the plugins directory (subdirectory in your sardauscan instalation) ?

the stack trace tell me that's a ressource that can be load, but i dunno why it only append to you.
according to google, it seem to be a program with mixed net 2.0 and net 4.0 :

can you try to recompile the code (with visual studio express) and tell me exactly where it crash (more information you can give)

If you cant, i can't help you.

ps: please be more exaustive in your response, it is realy time consuming to have to ask information 3-4 times to get the full response. if everybody do half response like you, i will never be able to help anyone.

the part that crash is part on the winforms framework, it crash when the windows icon is read from the ressource. I can"t do anything about it as it is dotnet that manage that. So the only explanation i see is that there is something different on your system. (the same exe work on many other user computer ).

I can't reproduce the problem, i can't debug on your machine, so sorry you are on your own. try to rebuild the source and debug yourself i can't do it myself.

Reading the posts below, for removing lasers simply click on the Scan task Settings -> Laser Selection and you will see all 4 lasers starting from 0 to 3, in my design I kept only 0 and 3, rest of it remove it.

I have several questions for Ferretti, first of all I saw that last images from this is from a previous version maybe 003, I saw this after Y field for lasers which is not updatable any more, because lasers should be at the same height with the camera you said, and adding new fields such as FADE_DELAY.

Any how after playing some time with your software, of course on another laptop, I see that at tune tab there are 3 parameters that are directly involved in laser points reading, what are they meaning, also value for height of your table is 150, from where did you measure it, and so on.

Also what is the meaning for all task, what does each other, something like tutorial for using patterns in Repetier-Host program.

Where do I find a description of most important fields meaning to help me configure the 3d scanner, because you made this only for a fix design, but if I want to customize I will lose another time until I find the perfect match.

the y of the laser is not important because it is a straight vertical line. so if your laser is a bit upper or lower, the line is the same. So i fix it to simplify the build calibration part.

With the (mutch faster) new version of image capture, the time for the laser to fade off and on is becoming critical : Fade_Delay is for configuring this delay. lower Fade_delay => scan is quicker, but there is a risk that the laser is not completly on or off when the next picture is taken.
All the other delays in the settings are for the host/firmware communication/actions

for the laser tune :
Min and Max are the minimum and maximum width of the laser. if at a certain height your laser is wider or thinner, it is ignored.
Theshord is the minimum value of red intensity for the laser, it is the most important tune value.

Table Diameter and heigth in the settings are the build volume: they are used to clip noise outside the cylinder.

ther many different types of task : to help to quickly identify a type of tasks they are identified with a combinaison of 3 icons the left icon is a icon for the input type.
the middle icon is for the function (or type of task).
the right icon is for the result or output type.

input/output type are (left/right icon)
"nothing" like the scan,
"scanlines" like "IQR" for example
"Meshes" like imput of "save STL"

Here is a quick description of the tasks
input task :
"grab picture" : you select a directory and it will take a picture at each rotation (if you want to use photogametry program like 123 catch)
Scan ... Start a scan

Smooth :
Angle : merge (average) all scan line within a angle range.
Laser : merge (average) laser X to all nearest laser Y (y is all laser other than X)
Bezier : do a besier aprowimation of each scan lines.
Surface : make a smooth by a simplified Laplace algorithm on the surface.

Color:
Texture Adjust : adjust the brigthness, contrast and gamma of the texture.

IO
Load Sar load a sar file
Save xxx Save a xxx file.

the output file type
PLY and XYZ are there if you prefere to use a better program for the pointcloud , like meshlab or another.
STL / OBJ for you slicing program (the obj can also be imported in most of the 3d software like blender, 3dsmax )

Concerning settings of tasks:

If you edit the settings by clicking in the left column => you edit the default settings

if you edit the settings of a task in the right column => you edit the settings only for the current process.

Custom build :
the most important values are present in the interface: it is the size of the build.
If you whant to customise : keep in mind the center of the table is the center of the world;
the only thing you must take care of is that all the laser, camera must point to the center of the turn table with no tilt.
All the size is relative to the center of the table.

Rem: another important value for wide angle camera is the focal height/width of the camera sensor. i must find a way to edit these settings and to keep it for a specific hardware. it is in my todo list, just next the calibration improvement (i wait community feedback, idea, help for that)

it is the precision parameter in the scan task settings :
1 => 15° rotation (but it was 15, the angle between lasers for debug purpose, i will change it to 5° or so)
100 => minimum rotation of the turntable.

Thanks again to the explanations, but unfortunately also with the correct distances
I can not do any kind of calibration.
Actually I did not clear it may be a problem of laser or light or the object of calibration.
The last attempt I wanted to do is to start with 1 or 2 laser but even here I can not understand the concept, I disable physically or by those who do not use software can tell the program to use only 2? (Configuration.h).
Also by the various post I noticed that no one has experienced this type of problem or at least it would seem easily overcome ....
It took less time in the assembly and calibration of my 3drag that It seemed to be impossible with all the variations of temperature, material, zero, heated plate, nozzle, engine belts and switch ...

when i see you "Calibrazione" image, you lasers don't seems to cross exatly at the center of the table.
(and not perfectly perpendifular to the table)

if you are certain they are well centered, there is a problem in your build size. (the center of the table does not correspond to the center computed from your build)

generaly speaking when you see in "correction" interface :
all color must superpose as close as possible.

a smaller or bigger color than the others => the corresponding laser is off the center.

many different contour for one color => the corresponding laser is not perpendicular to the table (or you camera).

rem :

each square in the correction preview window is 10x10 mm

you can try to put something bigger, with vertical contours like a mug, a box, etc (not red, it may help reduce noise) centered on the table for the "correction" part. it don't have to be the calibration object.

To use only one laser, you can edit the firmware configuration.h file(#define LASER_COUNT 1 ) to return only one laser. or click on the gear of the scan task in the software and select only one laser there.

ps2: i 've calibrate my 3drag in 4 weeks, to get the resolution and speed i wanted, good job if your calibrate yours in less time ;)

Thanks ! Unfortunately, I tried to start with measures defined by the images that I saw on the various projects.
I try with the reference measurements that you provided me, thanks again.
The measure "x" as is taken? (from the center of the laser axis y?)
Regards Paul

Excellent project, unfortunately I can not in any way to make the calibration of the laser.
Light is essential but also perfectly following the directions on how to get the calibration results.
There is a video that allows you to follow the procedure?
I post the link with some pictures (zip) of my tests.http://paololab.altervista.org/alterpages/files/Scanner3D.zip
I hope to complete a scan ....
Thank you anyway for your kindness.
Hello, Ciao

I think your build dimension isn't correct.
-> 31mm for y seems very low to me (i have 65-75mm).
-> -25° for the laser 0 and 250mm for the z seems incorect. as with 270mm for z i have almost -30°. (and your Z for the laser 0 is more than the z of your camera)

Don't forget to set the size of all the lasers ?.

you must have all the laser to superpose in the correction page (you can rotate,pan,zoom with the mouse, but the lasers must be almost correct before).

Well, I've got EVERYTHING almost sorted out. However, I'm using the Arduino Micro instead of the Nano. Which apparently doesn't reset when the serial connection is opened. I'm guessing the Arduino Nano does reset, because that appears to be the only time the firmware version is printed. And I think that's the only thing preventing my scanner from working. Everything looks right running it in Serial Monitor.

I'm trying to modify the firmware to detect a serial close and reprint the version number when it opens again, but so far, no luck.

the configxml is located in [user]\document\sardauscan but you don't need to edit the config.xml directly ( if not present the program will create it, when he start)

try to extract the binary (only) in a new directory where everyone has full access. and try there. if you get the same error, look in your event log, maybee there is a error that will help resolve the issue on your computer.

After installing VS2013 and build the solution, when I click on Start, I get next messages:

'Sardauscan.vshost.exe' (CLR v4.0.30319: Sardauscan.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
A first chance exception of type 'System.AccessViolationException' occurred in OpenTK.dll
An unhandled exception of type 'System.AccessViolationException' occurred in OpenTK.dll
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

The program '[2184] Sardauscan.vshost.exe' has exited with code 0 (0x0).

------ Discover test started ------
Test run will use DLL(s) built for framework Framework45 and platform X86. Following DLL(s) will not be part of run:
OpenCVPluggin.dll is built for Framework Framework45 and Platform X64.
SamplePlugin.dll is built for Framework Framework40 and Platform X64.

Could be this the cause for not running sardauscan on my laptop?, and if yes what should I do.
Mention that I use WIN 7 on 32 bit with an integrated graphics card Intel Chipset 965

I don't think so : it's the compile of the sample pluggin. there is a mismatch between the build of the opencvpluggin and sample plugin. you can remove them from the solution if you wish. they are not necessary.

to be sure remove the files in the plugin subdirectory of you laptop. but i don't think it is that.

202 Meters (ABS) = $18.70 + $32.04 in parts = 50.74. (actual costs so far)
I will be adding in quick connectors for the lasers, some wire and other minor parts.
Current cost includes bearings; but not connectors and wire.
113 hours to produce all of the parts on an XYZ Da Vinci 1.0 printer.
Producing 90% fill @ .1 layer on slow speed.
Modification from 200mm 20/20 to 195mm due to print volume issue.
I am closely tracking the whole project for cost and time.

I have everything printed and it seems I am missing the connection from the corner to the camera holder. I'm sure this is a silly oversight on my part but I really cant figure out what piece goes into the camera holder part. Anyone have some pictures or insight?

Just wondering what print settings people are using. I printed with .3mm layers and 90% on ABS. It's ok but does look as good as other people's pictures. I am logging all of the costs so far. I am at $30.27 (without including the cost of the filament). My printer has the settings of .1 .2 .3 .4 layers, slow med fast print, and density. In ABS are there any recommendations or should this be PLA?

I am about 80% complete with printing parts and getting the shipment of parts in. (Still missing the Stepper Motor). It must be on a separate boat from china. The price of Hercules WebCam has nearly doubled in 2 weeks to 29$ or so. Is any web cam workable? if (720P). So far no real road blocks. I am hoping to have all of the pieces complete and parts in by next Friday.

No issue, I will continue trying.
I looked into the source code provided to get an idea, how it is working.
In firmware I could not find the code, which instructs the stepper library to turn or the lasers to switch on.
On Visual C side I could not yet get an idea, how your scanner can combine the result from 4 scanners into one result.
Maybe i can get a clue soon.

it is not realy 4 scanner, it is 4 times the same with different laser position.

the principe is take a picture all laser off, light one laser.
then the image processor make a "difference" of the 2 images. then it determine wich position per line correspond to the center of the laser (2D) .
then a pixel locator do the geometry from camera field of vision and laser position (or laser plane). it give a " semi profile" in 3D relative to center of table.
in the code it give me a "ScanLine",it is like a collection of point on a" meridian".
i do it for each laser, then i rotate the table and continue.

a "ScanData" is a collection of "ScanLines". if you take all the points in all the scanlines, it give you the pointcloud.

all the other task, do simple things on points (smooth, average, filter ets,).

on the firmware side, it is realy simple, search for the "stepper" variable to see how i use it, the on/of laser is just a DigitalWrite on the laser corresponding pin.

Shortly after opening the program It crahes especially when I press the button to calibrate the computer displays a message that says "The program stopped working windows will close it".
I thought it was a problem with my the laptop so concerned with the desk top but the result was the same, both are running Win7 and Iam using v.003 version.
I'm not very skilled with the open source thing so I apologize in advance.
Thanks

Hello:
I have reinstalled the two apps and though I could not test it thoroughly what little I've done still gives me the same message (well in spanish but the traslation is as Follows)
"Sardauscan has stopped working"
"Windows will close the program ·"
As soon as I can do more testing should I communicate.
Thank you very much and eventhough not get it to work yet, I'm convinced it's the best design I've seen.
best regards

Today I tried it a little and no longer the program hangs, plus I was able to select my camera and see that works. but above all it no longer hangs.
As soon as I have more time I finish assembling it and start calibration.
Greetings.

Software and Firmware compile well, and can be uploaded to the nano (clone). I work under Windoze in VMWARE box on a Mac and hope to get the Software compiled under Mono to run on the Mac.

The wiring Diagram is a bit off, or my Arduino clone I need to connect the lasers to D13 and A0, A1, A2 instead of what looks like D13 and A1,A2,A3 in the diagram. Once corrected, I can switch all 4 lasers on and off.

Also, my Stepper motor did not make a single move until I applied the Mark Benson patch "HALFSTEP value to 4 & REVOLUTION_STEP to 2048 in configuration.h"

Okay I have a silly question. How do you start a scan? I have my electronics all wired up, my lasers fire, the table rotates (I had to use the settings recommended by Mark Benson "HALFSTEP value to 4 & REVOLUTION_STEP to 2048 in configuration.h"), I can see through the camera, I can do the physical calibration, the correction matrix, and I have double checked the build dimensions, I just can't figure out how to actually start a scan. I'm using V0.0.0.3 of the software if it makes a difference. Thank you in advance!

Thank you. I knew it was going to be something obvious. It took me 20 minutes to figure out how to get the horizontal line in the physical calibration oriented properly. I was about to give up when I though "maybe I can move the line" of course it was the most obvious.
I can't thank you enough for sharing this amazing project. I'm going to my local maker space today to show off my scanner and I'm going to try to convince someone there to make one too.

I did try changing that a few times, thinking it would fix the stuttering I was seeing in the stepper movement. Didn't seem to make any difference, but I think that is an issue in the gearbox when turning slowly. If the setting is there to ensure the lasers remain on then I guess it wouldn't affect the stepper movement... (I don't have any lasers attached at the moment - still waiting for parts to arrive)

these setting is just there to ensure the motor stop at a position where it didn't use too much current.
Whitout this, when the motor step beween steps, it consume power and the laser wasn't brith enough.
I didn't whant to disable the motor at each snapshot, and i found that 0.3° is already a good precision, so i move by 2 steps at a time.

I was thinking that the outputs driving the lasers need transistors as they probably draw a bit more current than the outputs are rated for. That might fix the dimming issue. I'll have to wait until my lasers turn up to try it.

there are little instruction in the calibration part of the interface.

i've lready explained here but basicaly you put it on the center of the table, and you amnualy allign all laser and the camera to cross at the center of the table (the thin line in the piece is to get your laser vertical).

then you go to the 3rd page and move/rotate/scale the scan from each laser in the "correction matrix" interface. it is a top view of the scans, each laser has his own color. all the laser scan must superpose each other as much as possible. the better you do that, the better the result scan.

hard to tell, the precision depend of your build, your calibration, the camera resolution, spread of lasers, the surface your scanning, the light environnement, the task you use in your process. etc etc etc. All these can infuence the result.

So i can't give numbers. but i can tell you that every one who says it get a "x micron" precision with this type of scanner is a lyar ;) cause perfect calibration and perfect condition is impossible.

but if it is the size that matter to you, you can add a "scale" task in your process to correct the size of the output to compensate the errors inherent of your configuration/build/calibration.

But be aware that it is not a professionnal scanner, with industial or chirugical build precision.
it is build by you with your precision.

it is strange.i will look at it.
it seems to me that you got very stange values in your config.xml file you have 111759 for a XY or Z position for a laser or your camera, the maximum is 5meter.
Can you send it to me in private message ( user/document/sardauscan/config.xml).

in the mean time, you can edit your values via a 'settings' button in the caption bar to edit the config.xml file (next to minimise):
try to put your XYZ for your camera and laser there first (in mm, relative to center of the table).

This project is amazing! I have been wanting to get a scanner for awhile now, but I haven't found any that would fit in my budget. At the moment excluding the cost of plastic and the M3 and M4 hardware my total cost is about $60.00. I could have saved probably $15-20 by shopping around more but I was so anxious I order the parts as soon as I found them.I have already printed the parts and I am just waiting for the items from China to arrive and I haven't figured out what I want to use for my table. I do have a few questions.

1) Can you make an STL of a scan available to see what the output looks like?
2) How does the calibration object work? I assume the software uses it for calibration but I am not sure.
3) Is the software capable of scanning an object multiple times and combining the point clouds? By this I mean can I scan an object standing up and then lay it on its side and scan again, or would I need to save the point clouds and combine them in some other software?

1) yes i will upload a STL, not edited with any other programs ( used task scan => merge by angle => surface mooth=> save stl)

2) the calibration is one of the problem i didn't solve completely, i'm trying to make it easier.
For the moment there are 3 different interface in the soft,
=> one to enter the size of your build,
=> one help you to align your lasers ( you place a object on the middle of the table, you manualy align your camera and your laser to superpose each other in the center of the table)
=> as the previous step is never perfect, i've added a third interface, that allow you to tweak the scan of each laser: in the interface you can rotate/translate/scale each laser result to supperpose them.

2.5) i've try ICP to match automaticaly the point cloud of each laser, but it was not concluent.

3) no you can't (for now ? dunno yet, maybee if i found a better technique than ICP). but you can "scan" => "save " and import in other soft like meshlab to do whatever you want.

to check if your motor is well wired,
try it in the arduino serial monitor window (set the same baudrate that the one in your configuration.h, #define SERIAL_BAUD 115200)

try to send for exemple "T R 200" to see if your table is rotating. if it is not turning, your wiring is probably wrong (did you forget to set the 5V/GRND from arduino to stepper controller? it append to me ;) )

Would you be willing to update the BOM to include the 3D printed parts so we know how many of each to make without checking the pictures? Also, could you include instructions for setting everything up? It doesn't have to be detailed. I'm just not sure how to start with the project.

i just put one, but i didn't have any installer, copy the zip content in a directory where you have admin rights ( it create sub durectory). all the user file are in the [user]/documents/sardauscan/...

Do you plan on releasing a compiled version of the software when you are satisfied with the stability of the program?
I'd love to play with it but don't have a compiler for C#.
I promise not to complain if it catches my computer on fire. :-)

yes it will be available but i have many thinks to make ( increase the stability, find better noise filter, better data smoothing, better mesh construction, rework the interface, make calibration Helper/tester and find a way to load/save process with task settings, etc)

the firmware is realy minimal and basic:
it only respond to command for lasers and rotation (ex "L 0 1" to set the laser 0 pin to HIGH, "T R 200" to rotate the table from 200 step).
I can post it but has nearly zero interest without the application.

Show Some Love

We're sure Ferretti would love to see what you've printed. Please document your print and share a Make with the community.

To post a Make simply visit this Thing again and click I Made One to start uploading your photo. It’s even easier to post a Make via the Thingiverse Mobile app (available via Google Play and Apple App Store).

Show Some Love - Tip Ferretti

Step 1:Select Tip Amount

Say thanks and help Ferretti continue
to share amazing Things with the Thingiverse community.

Select Tip Amount

Step 2:Checkout

You'll need a PayPal account to tip Ferretti.
Click the button below and you will be redirected to PayPal.
Once the payment is complete, you'll be brought back to Thingiverse.