The 3D digitizer (laser scanner)

If I was going to be in the business of reproducing parts for manufacture, I needed some process to bring those into the world of 3D solid modeling. I had done some initial searching for 3D digitizing devices, and there are lots of them on the market. They are all too expensive, and each has some sort of limitation that makes them better suited for one process over another. The desktop scanners were wimpy, and could not accommodate the cast iron parts I intended to reproduce. So, like everything else in my life, if I want it bad enough, I build it myself.

dscn2214

The scanner uses two basic pieces of technology to reproduce parts in 3D, a laser and a digital camera. A high grade auto-focusing digital web cam, capable of capturing 1200×1600 pixels is used to capture video data, and a 5mW laser, either red or green, to project a straight line across the part, which can later be extracted into 3D digital data.

dscn22081

The setup uses two calibration cards with pattern of black dots. The calibration cards are positioned carefully at a 90 degrees to each other and perpendicular to the scanner base. During the calibration phase, the digital camera takes an initial snapshot of the cards and attempts to position electronic markers at the center of each dot. If the computer can successfully locate all 25 dots, the calibration is complete. This calibration is key to reproducing accurate digital scans, because once the computer locates all of the dots on the image, it can correctly compensate for lens distortion, parallax, and scale regardless of the position of the camera. This also means I can reposition the camera as needed to improve the capture quality, and still achieve high accuracy scans.

Once the setup is calibrated, a part is placed in front of the calibration cards, and is ready for scanning. A laser line is projected over the part and onto the calibration cards. The camera settings are then adjusted to pick up on the laser only, and the background appears black. What appears to the camera is essentially a pair of straight lines (the laser on the calibration cards) and a distorted portion as the laser passes over the part. The computer first locates the two straight lines, which can be used to define a plane in 3D space (the scanning plane). The intersection of the two lines is the origin (zero, or along the Z axis). The computer can then measure the radius from the zero point to the scanned portion of the object to extract it’s position in along the plane, and ultimately it’s location in 3D space. It does all this in real time as the laser is passed over the part, and can quickly scan large objects at medium resolution in less than a minute. The scan speed is all dependent on the type of camera used, and in my case, I can achieve 20 frames per second (20 line scans per second) at 800×600 pixels, and 5 scans per second at 1200×1600 pixels.

I had worked with the system for about a month to get comfortable with all of the nuances of camera position and the motion of the laser. I used this information to build a basic model of the system, with some of the constraints defined. What I found to be most critical in testing was the vertical position of the laser relative to the camera. In order to produce an intersection plane from which quality 3D data can be extracted, the laser had to intersect at a minimum of 10 degrees above or below the camera. I created a model of the intersection scheme, which worked best when the laser was a minimum of 5″ above or below the camera.

sw_scanner_sidesw_scanner_iso

I positioned the camera and the laser on opposite sides of an extruded aluminum post, because I wanted to be able to freely repositioned laser above or below the camera depending on the part to be scanned. I offset both the camera and the laser towards the center of the post so they were on the same vertical plane in order to minimize the potential for shadow areas cast from the laser, and designed enough clearance so the laser and camera could be repositioned up and down the post without interfering with one another.

The Camera

dscn2218

I machined a block of plastic to clamp the camera body, and tossed the original camera base. The original base for the camera was unstable and incredibly stupid; the result of too much design, and not enough practicality. Of course it was never designed for my application, so I can’t complain about a little rework. My plastic block was simple and stable, and positioned the camera correctly for my application, while allowing me to pivot it up and down.

The Automated Laser Module

dscn2217

The laser module was automated using a bipolar stepping motor salvaged from an old Epson flatbed photo scanner (the older ones had much better quality parts). I machined a plastic block to accomodate the stepper motor, a bronze bushing, and a delrin rod which housed the laser module. The mechanism was then brought to life using an Arduino microcontroller and an EasyStepper module from Sparkfun electronics (www.sparkfun.com). With a little tuning, the laser was made to pass slowly and smoothly over the part, with no interaction on my part. All I had to do was click a button on my computer, and the laser began moving automatically.

The initial design used a microstepping motor and a direct belt drive with a small gear reduction. Even with the reduction, the motor must turn VERY slowly in order to move the laser slow enough for high quality scans at high resolution. The microstepping action if the Sparkfun microcontrollers made this motion suprisingly smooth, and the results were very good, but I wanted to try a worm gear mechanism in order to reduce the speed a little more.

dscn2213

I salvaged a complete worm gear assembly from an HP printer I had in my garage. The assembly was originally used to move the cartridge up and down at the end of a print cycle (for cartridge cleaning or replacement). I took the worm gear and motor out of the assembly, and custom machined a new housing in plastic. I also took the time to provide a place for the Arduino board, and the Stepper module. The mechanism is mechanically superior to my earlier design, but I made a gruesome error, and didn’t pay enough attention to my stepper motor. My salvaged stepper motor, it turns out, uses 5 wires instead of 4. Subtle, I know, but the internal wiring is very different from 4 wires, and 5 wires indicates a unipolar stepper which cannot be driven correctly by a bipolar stepper driver (like the sparkfun). While it does work, it doesn’t work very well, and the motion is weak and jerky when compared to the belt drive system. I would like to find a bipolar motor replacement, but it is tough to find an exact drop in replacement. This likely means a redesign in the future, but a lesson learned nonetheless.

The post for both the camera and the laser was mounted to a rail on the base, which allowed me to reposition both closer to the part for detailed scans of smaller parts. I have a second set of calibration cards which rescale everything, and allows my to achieve higher resolution scans on smaller parts.

The Table

dscn2220

One thing I had noticed on my initial test setup, was the sensitivity of the system to vibration and shake. This scanning method relies on an optical camera to pick up subtle details as small as 0.020″ (the thickness of four sheets paper), which means that subtle motion can corrupt the scan data, and result in poor quality scans. A good design required a stable connection between the camera, calibrations cards, and the parts. I needed a stable base on which I could build the scanner.

While browsing Ebay for a suitable stable table, I found a great deal on an electronically isolated anti-vibration table. The table top floats on 4 independant isolators (air springs with some electronic damping control) and electronically adjusts itself to compensate for external vibration. The table is good enough to isolate scanning electron microscopes from normal building vibrations, so I figured it would be good enough for me. Probably overkill, but I’m never one to pass up a good dela and I love high end industrial surplus. Even if it is 600 miles away. I drove down to the San Francisco bay area and picked up my  300lb table, and hauled it home as a solid foundation for my scanner.

The table had an added bonus of 700+ drilled and tapped 1/4″ holes on it stainless steel surface plate at 1″ increments. A perfect fit for my 80/20 series  (www.8020.net) extruded aluminum fabrication materials. I custom machined some angles and t-slot connectors to save some money, and bolted everything together, which made for an incredibly stable vibration free system.

The Results

laser_scan_pic

This is a test scan of my exhaust manifold. With everything stable and situated, I can read the casting part number right off the scan. The scan is fully automated, and takes only a click to initiate. The more repeat scans I do of the same surface, the better the surface detail and accuracy, as each new scan is averaged with previous scans to improve the data quality.

Each cast number is .250″ tall, and .050″ deep. The scanner is set up to accommodate parts up to 12″ diameter, and 18″ tall, so to be able to read the detail at that scale excellent; any better, and I would be picking up casting surface defects, that I really don’t need to see. I can recalibrate the entire scanner to pick up double the detail at 1/2 the size (for 6″ diameter parts) as needed. Comparable desktop commercial scanning systems, such as the $15000 Roland are limited to 10″ diameter parts at similar resolution, and they don’t even come with a 300lb stainless steel vibration isolation table. Weenie machines made of plastic, which would be crushed by the weight of my castings. They scan doilies. I scan parts.

High grade commercial scanning units such as those from Faro and Minolta are prohibatively expensive ($50,000+) which was why i didn’t buy one in the first place. My entire installation required significantly less investment than any of the available alternatives, and the results are comperable. I also have room to improve my machine, by updating the camera and laser module, and can can add additional features not provided by commercial units, such as photographic image maping and automated turntable operation. I also built it, and know exacly how to fix it.

I can’t say the same about the other machines.

WordPress Themes