Linear 3D Scanner

To extend the 3D scanning that I have already done, I built a linear scanner intended to scan small objects like keys. I use a single stepper motor controlled linear stage, an Arduino Uno with a Pololu stepper controller, some Arduino code and some Python code. I use a Microsoft Lifecam and two inexpensive line lasers. Here are some pictures of the device that I built and tested.

Two line lasers project lines at angles on each side of the LifeCam. I have not calibrated the device yet, and assumed an angle of 45 degrees for each laser. I will use a series of plates of known thickness to determine line separation as a function of distance so that I can accurately map object height. The Arduino controls the Pololu by sending direction and step commands, and also monitors two end stops. I can probably adapt a RAMPS board used for a 3D printer to do this job, but for a single stepper motor, it was easier to just add a proto board to an Uno.

Here are links to the Arduino code and Python code that I wrote.

Linear3DScanner.py: Captures images of the scanned object and moves the stepper motor

Linear3D.py: Analyzes the saved images and finds the laser lines. Builds two point clouds.

Linear3DScanner.ino: Arduino code for an Uno to control a Pololu. Communicates with the Python code through the USB port.

Here is a video showing the analysis program finding the laser lines on the scanned object.

Here is an image of the resulting aligned point clouds. This comes from a scan of each side of a key. All point clouds were aligned using Meshlab.

snapshot01 So far I have not been successful generating a mesh based on this point cloud. I think I might need to dust the key with talc or paint it with flat white spray paint to collect more surface points. The idea of this exercise was to enable 3D printing a key copy. In my other recent post, you can see that using casting to copy a key is a faster and easier. I love building high tech stuff, so I had to make a linear scanner. This is what is called “triangulation scanning.” The concept is easy. I hope this blog will encourage others to try to build similar gear. Thanks for looking!

Advertisements

4 responses to “Linear 3D Scanner

  1. hello .i m Mehdi and i m a student . i m so impressive of your linaer3d scanner . i have the same project in my university . i stared now to learn on python codes an i thinks its difficult .if you have the time please can you help me in coding on python because i will do the same linear 3d scanner.

  2. hello. i m using the same function of your code in my python 2.7 it makes me error whats the version of python are you using ?? and thx

  3. Hello.please Mister can you explain me sum value in your code.
    first how did you get the value of resolution “scale1 = 0.1292” and this value refer to what distance same thing for “scale2 = 0.03175”
    and why do you compare X_center to 500 and 621 in the last your equation to get X Y Z which approach you use. I am waiting for your answer .Thinks for all

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s