The only ways I had found to do this are to buy an expensive testing machine, or to pay someone to use that machine they've bought, or the "sound card shutter tester" along with Audacity, which seems pretty kludgy and takes too much human effort.
But with Arduino, I knew I could make something on my own.
So I got an infrared emitter and sensor pair from SparkFun and I wired them up like this:
I wrote this simple Arduino sketch:
#define receiverPin 12 // input from the ir receiver.
unsigned long duration; // time shutter is open
void setup()
{
pinMode(receiverPin, INPUT);
Serial.begin(9600);
}
void loop()
{
//digitalWrite(ledPin, !digitalRead(receiverPin)) ;
duration = pulseIn(receiverPin, LOW);
if(duration != 0 )
{
Serial.println(duration);
}
}
And here is is set up to use:
I put the emitter on one side of the lens, the sensor on the other, and trip the shutter. The serial console shows me the open duration in microseconds, which I compare to what it should be.
Now I can see how accurate the shutter is, and I can adjust the exposure if necessary. (Or even send the equipment out for repair or adjustment.)
No comments:
Post a Comment