DIY 3D Laser Scanner Progress

IMG_2857

I made significant progress on my DIY 3D laser scanner. I am now controlling the rotating platform and a webcam directly from a Python script on my Windows 7, 64 bit machine. Making this work was NOT EASY.In a previous post, I was using an Arduino to drive the stepper motor controller. Using the PC directly probably makes more sense since I will do my image processing and mesh generation there anyway.

Here are the web sites you need to figure it out.

A Google Groups discussion about using C:\Windows\SysWOW64 INSTEAD OF C:\Windows\System32 to make external programs work correctly.

A Link to obtain inpout32.dll, which is required to successfully control the parallel port.

Some code example steps that work once the bits and pieces are actually in the right places. My posted question was never answered, but I finally figured it out myself.

A parallel port tester program that you can use to make sure you are communicating with your port. This was the first program that I made work successfully under Win 7 64 bit. Put inpout32.dll in the same directory as the executable and you should be able to read and write the parallel port pins. Note that the output changes occur in real time, but if you change the pin states with another program, you need to re-select the port to view the changes on the pins. You can change single pins to manipulate your stepper motor controller using this program. That will guide how you develop your Python script.

Also, I an new to Python programming. It is both case sensitive and indentation sensitive unlike other programming languages.

The mount for the line laser is 3D printed. I sketched it, drew it, and printed it in about an hour. This is a great example of rapid prototyping. I am very happy to have this capability at home.

Laser Mount

Here is a closer view of the rotating platform with the 3D printed line laser mount.

IMG_2858

I purchased my stepper motor controller on eBay. I happen to be using an older, 3 axis model. Many types will work. You just need to find out which parallel port pins control axis enable, axis direction, and axis step. Mine also has a built in relay, which I am using to trigger a webcam. I settled on using the Z axis since all the pins were within the set that is normally used for parallel port data output. Here is where I purchased my line lasers.

Here is a video showing the system in action. My next post will describe the image processing required to turn line images in to a mesh.

Here is a video showing the processed laser lines as the object rotates. You can see that I have some work to do yet…

Update 9 October

I switched to using a digital SLR and backing the line laser about 3 feet from the object so that I could get a thinner line. I have ordered some focus able line lasers. This movie shows the resulting laser scan.

Here is my first result that is starting to look something like a useful point cloud. This is based on 400 image collections for one full rotation (stepper motor at half steps). I generate x, y, z points in a long text file. With the extension .asc, Meshlab will open and display the points. It looks a bit like an elephant. I am making progress.

Elephant Scan

snapshot00

Advertisements

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