XY stage for dslr film scanner
Moderators: adafruit_support_bill, adafruit

XY stage for dslr film scanner

by pdesmidt on Thu Mar 08, 2012 11:38 am

Hi,

A bunch of us at the large format photography forum are working on a DIY film scanner. Right now, there's a big gap in quality and price between consumer film scanners, such as an Epson V700, and pro scanner, such as drum scanners (e.g. Aztek Premier) and pro flatbed (e.g. Screen Cezanne). In addition, pro scanners are getting dificult to keep running, as they often rely on old computer systems, and repairing the scanners is very expensive. As a result, some of us film enthusiasts are working on a film scanner, ideally one that can be scaled to various sizes, will give higher quality than a consumer flatbed, will be easy to build, and won't be too expensive. Our idea is to use a dslr with a macro lens to take many pictures of one frame of a negative. We'll then use software to combine the images.

Here's a picture of one of our prototypes:
Image

So far, our results have been pretty promising, although moving the negative to each position gets a little tedious. For example, using a macro lens at 1:1 with a DX camera requires 25 exposures to cover a 6x7cm negative.

Image

Image

Well, that's not so bad, but doing the same thing on a 4x5" or 8x10" negative would get a little old. Because of this, we'd like to automate the negative movement and picture taking process.

More specifically, we'd like to be able to control the system from a computer. Ideally, we would specify the negative size, and the system would automatically position the film, take an exposure, re-position the film...

To accomplish this, we're thinking of making a diy x-y stage using lead screws and stepper motors. The system would need to move a 6" (or so) 1/4" thick square of acrylic which the negative would be mounted on. Each step would require movement of between 5 and 15mm, depending on orientation of the negative and magnification.

To control this, we're considering using an arduino with a motor shield.

Would your starter pack for arduino, 2 stepper motors (200steps/rv, 12v 350ma), and one of your motor shields be a good place to start?
pdesmidt
 
Posts: 11
Joined: Thu Mar 08, 2012 11:18 am

Re: XY stage for dslr film scanner

by adafruit_support_bill on Thu Mar 08, 2012 12:19 pm

Nice project! Yes, the starter pack and motor shield would be a good place to start. Those 12v 200 step motors are a good match for the shield as well.
User avatar
adafruit_support_bill
 
Posts: 29218
Joined: Sat Feb 07, 2009 9:11 am

Re: XY stage for dslr film scanner

by pdesmidt on Tue Mar 20, 2012 11:07 am

I've been investigating this a little further, and I'm considering using a Microcarve MV3, a 3-axis cnc machine. See: http://www.microcarve.com/mcMV1.html This would allow me to scan up to 8x10" film.

The idea is to make a similar system to this: http://gigamacro.com/gigapixel-macro-imaging-system/

My system would be smaller and aimed at imaging backlit film.

An issue is that these types of machines use heavier motors than adafruit carries. Average specifications are along the lines of 285 oz bipolar, 3v, 3A, 200 spr, 2.2mH.
Stepper drivers are usually along the lines of: http://www.geckodrive.com/g540-digital- ... -p-39.html

Can a Arduino Uno be used to control something like a geckodrive g540? Normally, the CNC software does this, but such software adds a lot of expense and capabilities way beyond what is needed.
pdesmidt
 
Posts: 11
Joined: Thu Mar 08, 2012 11:18 am

Re: XY stage for dslr film scanner

by adafruit_support_bill on Tue Mar 20, 2012 11:35 am

Most of the Gecko drives have a similar digital interface to the g540 and others have driven them successfully with Arduinos.
User avatar
adafruit_support_bill
 
Posts: 29218
Joined: Sat Feb 07, 2009 9:11 am

Re: XY stage for dslr film scanner

by philba on Tue Mar 20, 2012 12:30 pm

Isn't there free software that can drive a gecko? I know people that have built CNC machines using old PCs to drive them. Though, using an arduino may be a nicer approach (quieter, more compact), assuming you can get all the control logic into it. But there is a fair amount of software needed to run the device and do what you want so it might be better to start with a PC.

I think you might be over-engineering the platform. Looking at the microcarve, I'm not sure you need very powerful motors. I believe the stronger motors are need for cutting. Since you will just be moving the camera or base, there will be little resistance other than from the lead screw, bearings and weight of the platform or camera. Dragging a spinning cutter through wood or metal is where most of the resistance is coming from.

Looking at your original device (which looks like a nice job, btw), it seems like an adaptation of that where you move the picture on an XY platform may be a better approach than the gantry design of the microcarve. The gantry design is nice because it minimizes the machine's footprint. However, it looks like the camera needs to sit fairly high and have an unobstructed view of the platform - the z axis on the microcarve looks like it might be a problem. You might look at cross or compound sliding tables for drill presses and such. They aren't that expensive though you would need to adapt them for use with steppers. This one gives 7.5x12" of travel. http://www.grizzly.com/products/6-x-18-1-2-Compound-Slide-Table/G87507 It might not be hard to make your own xy table out of lighter materials.
philba
 
Posts: 387
Joined: Mon Dec 19, 2011 5:59 pm

Re: XY stage for dslr film scanner

by pdesmidt on Tue Mar 20, 2012 12:46 pm

Hi,

Thank you very much for the responses.

I would prefer to build an x-y stage for use on my existing prototype. This seems like it should be cheaper than buying a cnc machine. The problem I ran into is that linear stages tend to be even more expensive. For example, I could get two Velmex motorized slides. The problem is that the cost would be about the same as the cnc machine. Building a complete diy stage is challenging, especially without access to a lathe or mill. The motors on the x-y stages of the cnc machine are definitely overkill for this project, but they have been proven to work well with the system, and if all else fails, at least I'd have a cnc machine :).

The Grizzly x-y tables are nice. The challenge, which the cnc machine would also face, is making room for a very even light source.

The standard microcarve z axis has 4" of travel. 6" versions are available, and possibly even longer ones.
pdesmidt
 
Posts: 11
Joined: Thu Mar 08, 2012 11:18 am

Re: XY stage for dslr film scanner

by pdesmidt on Mon Mar 26, 2012 2:22 pm

Do stepper motors vibrate when they are energized but not actually stepping?
pdesmidt
 
Posts: 11
Joined: Thu Mar 08, 2012 11:18 am

Re: XY stage for dslr film scanner

by adafruit_support_bill on Mon Mar 26, 2012 6:44 pm

Do stepper motors vibrate when they are energized but not actually stepping?

They can. Especially if you are using PWM for your holding torque. But in a flat-bed system where all movement is in the horizontal plane, you should be able to de-energize the steppers for the exposure. You will probably also want to take into consideration the time it takes for any movement-generated structural oscillations to damp out.
User avatar
adafruit_support_bill
 
Posts: 29218
Joined: Sat Feb 07, 2009 9:11 am

Re: XY stage for dslr film scanner

by pdesmidt on Mon Mar 26, 2012 6:55 pm

That's good to know, thanks. It's time to get one and start playing around.
pdesmidt
 
Posts: 11
Joined: Thu Mar 08, 2012 11:18 am

Re: XY stage for dslr film scanner

by pdesmidt on Mon Jan 07, 2013 10:42 pm

So it's back to the project time. I have a nice batch of supplies that should be arriving from Adafruit this week, yay!

I'm trying to write a simple program using the Adafruit shield and stepper motors to work out a positioning system, but I haven't done any programming since the 1980s! As a result, I've been reading through tutorials. My favorites are the new Adafruit ones, especially since they allow downloading a PDF, as that makes printing easy.

For the test program, I'd like to use the system to position the negative carrier such that it takes nine exposures to cover the negative.

For example, lets consider a negative where we need 9 exposure to cover it, a checkerboard with 3 columns and rows.
The number and order of exposures would be as follows:

9|8|7
4|5|6
3|2|1

We'll assume that the carrier needs to move positive y and negative x to move from it's home position to where the first frame will be taken. It will then follow the pattern indicated by the grid.

I'm going to write the logic out in logicese, which I'm more familiar with than Arduino code.

Setup

1. Check if carrier is home. If not, move it home.
2. Int counter = 1

Loop

3. If counter = 1, then move X-motor R steps to the left, and Y-motor Q steps.
4. Delay.
5. If counter is <= 9, then expose
6. If counter = 1, 2, 7 or 8, then move X-motor S steps to the left.
7. If counter = 4 or 5, then move X-motor S steps to the right.
8. If counter = 3 or 6, then move Y-motor T steps.
9. counter = counter +1
10. If counter = 10, then move carrier home.

My first question is, what would be a good way to implement this? I could use an if/then statement for each condition, but that seems inelegant.

Second, in something like a "for" statement, can the test be a compound condition, something like "x==1||2||4||7"? My intention would be for that to mean: "If X equals 1 or 2 or 4 or 7, then..."
pdesmidt
 
Posts: 11
Joined: Thu Mar 08, 2012 11:18 am

Re: XY stage for dslr film scanner

by adafruit_support_bill on Tue Jan 08, 2013 6:39 am

A switch statement would be one way to go: http://arduino.cc/en/Reference/SwitchCase

Code: Select all | TOGGLE FULL SIZE
switch(frameNumber)
{
    case 1:
    case 2:
    case 7:
    case 8:
        // move X motor left
        break;
    case 4:
    case 5:
        // move X motor right
        break;
    case 3:
    case 6:
        // move y motor
        break;
    default:
        // shouldn't get here!
        break;
}
User avatar
adafruit_support_bill
 
Posts: 29218
Joined: Sat Feb 07, 2009 9:11 am

Re: XY stage for dslr film scanner

by pdesmidt on Tue Jan 08, 2013 10:48 am

Thanks!

[edit - moderator - use 'code' button when submitting code]

Code: Select all | TOGGLE FULL SIZE
//DSLR XY Test Software V1
//
// X-motor hooked up to Adafruit Motor Shield M1+2
// Y-motor hooked up to M3+4
// Instead of taking an exposure, the program will
// print a message to the IDE Serial Monitor
//
// Image capture will go in the following order:
// 9|8|7
// 4|5|6
// 3|2|1

#include <AFMotor.h> //Load Adafruit Motor Library

AF_Stepper Stepper1(48,1); //X-axis stepper
AF_Stepper Stepper2(200,2); //Y-axis stepper

int framenumber=0; //Frame Number Counter

void setup()

{
Serial.begin(9600); //start serial communication
Serial.print("9 frame positioning test.");

Stepper1.setSpeed(40); //A guess
Stepper2.setSpeed(40); //Ditto

//if carrier isn't home, then move it home.

Stepper1.step(400,FORWARD,SINGLE); //Move carrier left such that
//it's one frame to the right
//of the initial capture area.
//This is another guess.

Stepper2.step(400,FORWARD,SINGLE); //Move carrier to the starting
//capture row.


}

void loop()

{
framenumber=framenumber+1;

switch(framenumber)
{
case 1:framenumber==1;

Stepper1.step(50,FORWARD,SINGLE); //move carrier to next capture area
Stepper1.release(); //de-energize stepper 1 to minimize vibration
Stepper2.release(); //de-energize stepper 2 to minimize vibration
delay(1000); //pause 1 second.
Serial.println(framenumber); //sends the framenumber to the Serial Monitor
//Eventually this'll fire the camera shutter.
break;

case 2:framenumber==2;

Stepper1.step(50,FORWARD,SINGLE); //move carrier to next capture area
Stepper1.release(); //de-energize stepper 1 to minimize vibration
Stepper2.release(); //de-energize stepper 2 to minimize vibration
delay(1000); //pause 1 second.
Serial.println(framenumber); //sends the framenumber to the Serial Monitor
//Eventually this'll fire the camera shutter.
break;

case 3:framenumber==3;

Stepper1.step(50,FORWARD,SINGLE); //move carrier to next capture area
Stepper1.release(); //de-energize stepper 1 to minimize vibration
Stepper2.release(); //de-energize stepper 2 to minimize vibration
delay(1000); //pause 1 second.
Serial.println(framenumber); //sends the framenumber to the Serial Monitor
//Eventually this'll fire the camera shutter.
break;

case 4:framenumber==4;

Stepper2.step(80,FORWARD,SINGLE); //move carrier up to the next row
Stepper2.release();
delay(1000);
Serial.println(framenumber);
break;

case 5:framenumber==5;

Stepper1.step(50,BACKWARD,SINGLE);
Stepper1.release();
delay(1000);
Serial.println(framenumber);
break;

case 6:framenumber==6;

Stepper1.step(50,BACKWARD,SINGLE);
Stepper1.release();
delay(1000);
Serial.println(framenumber);
break;

case 7:framenumber==7;

Stepper2.step(80,FORWARD,SINGLE); //move carrier up to the next row
Stepper2.release();
delay(1000);
Serial.println(framenumber);
break;

case 8:framenumber==8;

Stepper1.step(50,FORWARD,SINGLE); //move carrier to next capture area
Stepper1.release(); //de-energize stepper 1 to minimize vibration
Stepper2.release(); //de-energize stepper 2 to minimize vibration
delay(1000); //pause 1 second.
Serial.println(framenumber); //sends the framenumber to the Serial Monitor
//Eventually this'll fire the camera shutter.
break;

case 9:framenumber==9;

Stepper1.step(50,FORWARD,SINGLE); //move carrier to next capture area
Stepper1.release(); //de-energize stepper 1 to minimize vibration
Stepper2.release(); //de-energize stepper 2 to minimize vibration
delay(1000); //pause 1 second.
Serial.println(framenumber); //sends the framenumber to the Serial Monitor
//Eventually this'll fire the camera shutter.
break;

case 10:framenumber==10;

Stepper1.step(500,BACKWARD,SINGLE); //start moving carrier home
Stepper2.step(560,BACKWARD,SINGLE);
Serial.print("Done!");

}
}
pdesmidt
 
Posts: 11
Joined: Thu Mar 08, 2012 11:18 am

Re: XY stage for dslr film scanner

by pdesmidt on Sat Mar 02, 2013 4:38 pm

pdesmidt
 
Posts: 11
Joined: Thu Mar 08, 2012 11:18 am

Re: XY stage for dslr film scanner

by pdesmidt on Sat Aug 31, 2013 4:47 pm

pdesmidt
 
Posts: 11
Joined: Thu Mar 08, 2012 11:18 am

Re: XY stage for dslr film scanner

by adafruit_support_bill on Sun Sep 01, 2013 5:12 am

Looking good! How is the output from it?
User avatar
adafruit_support_bill
 
Posts: 29218
Joined: Sat Feb 07, 2009 9:11 am