Welcome! Log In Create A New Profile

Advanced

Limited but working , very cheap and simple 3d scanning for rep(str)rap

Posted by ckaos 
Limited but working , very cheap and simple 3d scanning for rep(str)rap
December 15, 2010 03:21AM
Hi everyone !
I recently worked on a small add-on for my repstrap , to give it some 3d scanning capability , using only a few cheap components, mainly IR photo-diodes and emitters, acting as a distance sensor : the advantage of this approach, is that is way easier to do than a webcam / laser line approach, and also less bulky, making it fit easily inside a reprap.

While it is far from perfect, here is an example result after just a few hours of soldering and configuration :

(scan of a simple lighter , 1mm resolution, no post process just raw data)
Some videos of the scanning process aswell :

http://www.youtube.com/watch?feature=player_embedded&v=4rjgbmP9kxk

The working principle is not complicated either :
  • after each movement, the signal from the photodiode is sent back via serial
  • that signal’s strengh (ie measure of distance) is then converted into height information
  • the X and Y component of each vertex building up the 3d point cloud are simply the respective x and y axis position at the time of the scan
  • after creating an additional vertex in the point cloud, you can just link it to the previous vertices for display (i’m currently using simple GL_LINES in opengl

There is still lots of work on this, but hey, it works ! smiling smiley
Of course this WILL be released in open source format, although for now i am not using the standard Reprap firmware and host software , but if anyone is interested, i would be glad to share info!

More info here should anyone be interested


Toiling away on a repstrap : [www.kaosat.net]
Re: Limited but working , very cheap and simple 3d scanning for rep(str)rap
December 19, 2010 04:15AM
I find your work very interesting and i'm a little surprised no one else has given it much attention on this forum.

Its the shear simplicity and lake of physical parts required that I like. There are a few similarities between what you are doing and Atomic force microscopy (AFM). Instead of a physical cantilever to generate the signal you are using your photo diodes.

There are two different modes used in AFM; constant force (or constant signal in your case), in which the probe height will adjust to keep a constant signal, and constant height, in which the probe moves at a constant height and the signal varies. So you are currently working in constant height mode.

As you can imagine, the further away away your photodiode is from the sample (the lighter in your case), the more noise there will be in the signal. However if you were to change to working in "constant signal" mode, in which the position of the Z axis is used to plot your data points, then you will always have the photodioide at an optimum distance from the surface. Unfortunately there is then the risk of crashing the print head into the object if there is a sudden change in elevation of the sample your scanning.. You would also be limited by the size of the photo diode. This is all getting a little off topic, but its something to consider if you were ever want to scan very tall objects with lots of geometry.

Anyway, back on topic, I would love to give your setup a try my self at some point. Is there any chance of getting a few photos of the current setup and a short list of the required software?

Cheers.


-------------------------------------------------------------------------------------------------
capolight.wordpress.com
Re: Limited but working , very cheap and simple 3d scanning for rep(str)rap
December 19, 2010 11:44AM
You could avoid the head crashing in software, and still improve resolution.

1. Do a constant-height scan, as now
2. Do a very close-up constant signal scan, using the data from the first scan to avoid running the head into the side of the lighter.
3. Since step 2 results in a partial scan (some areas can't be scanned) combine the data from both scans into the final result. Some areas will have lower resolution.

Or optionally, continue scanning when moving the head up to avoid collisions, to precisely locate the edges. Then there's no need for step 3.

This would allow you to have a higher resolution scan, as the head can be very close to the object without risk of running into it.


--
I'm building it with Baling Wire
Re: Limited but working , very cheap and simple 3d scanning for rep(str)rap
December 22, 2010 09:33AM
@Capo: Thanks a lot for your very interesting reply!

I read the wikipedia article on AFM you linked, and you are right, there are strong similarities in the general working principle ( the article is very interesting in its own right btw)
*You are also right about the amount of noise with a constant height method: this is even more significant if you use really cheap IR phototransistor/led combos like i did.
*Speed is also an issue for me, since my repstrap is very slow, so scanning takes quite a while
*on the other end of the reprap spectrum there might also be a problem with too fast machines: certain phototransistors (once again the cheap ones) have a slow rise and decay, making it impossible to do fast scans
*this is made worse by the lack of focusing and IR interference from ambient light (although , that last part can be easily circumvented).
*for the constant signal scan , jGilmore is completely right ! with the two pass method he mentioned, it would be possible to have the best of both worlds!



These are the electronic components being used :
  • Ir Photodiode (very cheap one, i had ordered them in bulk a while back for another project)
  • Matching IR Led
  • 10k resistor
  • 1 nF capacitor
  • i used an addition 100 ohm resistor + trimpot to adjust the IR Leds strength (way too strong by default, was giving very bad results )

A quick schematic (sorry about the quality)


the prototype itself: (as you can see, it is really small)

And how it fits on a repstrap: right side of the picture)


For the software part, i will need to clean things up a bit, but if you don't mind some very "experimental" smiling smiley software, i could put the current version online by the end of the week ? The host side is in python, and you need a opengl capable card.

@JGilmore!
Thanks a lot , that is exactly what would be needed to keep the advantages of both methods, the only downside i see, beside the one you mentioned, is the increased scan time, although that should not really be a problem on most machines !
cheers!

Edited 1 time(s). Last edit at 12/22/2010 09:34AM by ckaos.

Toiling away on a repstrap : [www.kaosat.net]
Re: Limited but working , very cheap and simple 3d scanning for rep(str)rap
December 22, 2010 04:45PM
Thanks for the update and photos ckaos.

Something else that may help to improve your resolution is to shroud the photo diode by sleeving it with some heat shrink tube. This should help reduce the amount of noise coming from the surrounding area.

I look forward to seeing your experimental software when ever you feel its ready. With a bit of luck, by the time you have a version out my second repstrap will be up and running so I can give it a try.

-Capo


-------------------------------------------------------------------------------------------------
capolight.wordpress.com
Re: Limited but working , very cheap and simple 3d scanning for rep(str)rap
December 30, 2010 11:39PM
Wow this looks like a great idea! I'm excited to see where this goes.
VDX
Re: Limited but working , very cheap and simple 3d scanning for rep(str)rap
January 28, 2011 01:01AM
... here is a nice setup for a mechanical scanning probe head capable of some microns accuracy: [www.brusselsprout.org]


Viktor
Re: Limited but working , very cheap and simple 3d scanning for rep(str)rap
March 04, 2011 03:41AM
So ,sorry everyone, been a while, way past my original schedule, and with lots of changes , but here is the software part !
[forums.reprap.org]

More news and details soon !


Toiling away on a repstrap : [www.kaosat.net]
Sorry, only registered users may post in this forum.

Click here to login