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.
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!