Arduino based shutter speed test device for film cameras

 Classic film cameras have a mechanical shutter that does not require battery power. However, shutters on film cameras that have not been used for many years may not work properly. The shutter speed tester checks that the shutter speed of the film camera is correct, and in this project we will look at the process of creating such a device based on the Arduino.


Arduino based shutter speed test device for film cameras

The shutter speed tester uses an Arduino as the main controller and a phototransistor as the light sensor to capture the light transmitted by the flashlight behind the camera body. The captured shutter speed is displayed on the SSD1306 OLED display.


The schematic diagram of the device and the connection diagram of its components are presented in the following images.


Arduino based shutter speed test device for film cameras

Arduino based shutter speed test device for film cameras

On a breadboard, the device might look like this.


Arduino based shutter speed test device for film cameras

Arduino based shutter speed test device for film cameras

The shutter speed checker code is shown below.



#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET     -1
#define SCREEN_ADDRESS 0x3C

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

#define RECEIVER_PIN A6
#define TIMEOUT 8000000
#define THRESHOLD 200
#define MIN_DURATION 500

unsigned long analogPulseIn(uint8_t pin, uint8_t state, unsigned long timeoutInMicros, int threshold = THRESHOLD) {

      unsigned long startTime = micros();

      while (true) {
        unsigned int value = analogRead(pin);
        if ((state == HIGH && value < threshold) || (state == LOW && value >= threshold)) {
          break;
        }
        if (micros() - startTime >= timeoutInMicros) {
          return 0;
        }
      }

      while (true) {
        unsigned int value = analogRead(pin);
        if ((state == HIGH && value >= threshold) || (state == LOW && value < threshold)) {
          break;
        }
        if (micros() - startTime >= timeoutInMicros) {
          return 0;
        }
      }

      unsigned long time0 = micros();

      while (true) {
        unsigned int value = analogRead(pin);
        if ((state == HIGH && value < threshold) || (state == LOW && value >= threshold)) {
          break;
        }
        if (micros() - startTime >= timeoutInMicros) {
          return 0;
        }
      }

      unsigned long endTime = micros();
      return (endTime - time0);
}


void displayInitialScreen() {
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,3);

  display.println("Shutter Speed Tester");
  display.display();
}

void displayDuration(unsigned long duration) {
  double msecs = duration / 1000.0;
  String text = String("Time: ") + msecs + String(" msecs");
  display.println(text);
  Serial.println(text);
}

void displaySpeed(unsigned long duration) {
  String text;
  if (duration >= 1000000.0) {
    double secs = duration / 1000000.0;
    text = String("Speed: ") + secs + String(" secs");
  } else {
    double speeed = 1000000.0 / duration;
    text = String("Speed: 1/") + speeed + String(" secs");
  }
  display.println(text);
  Serial.println(text);
}

void displayResult(unsigned long duration) {
  display.clearDisplay();
  displayDuration(duration);
  displaySpeed(duration);
  display.display();  
}

void setup() {
  pinMode(RECEIVER_PIN, INPUT);
  Serial.begin(9600);

  if(!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
    Serial.println("SSD1306 allocation failed");
    for(;;);
  }

  display.clearDisplay();
}

void loop() {
  displayInitialScreen();

  unsigned long duration = analogPulseIn(RECEIVER_PIN, HIGH, TIMEOUT);
  if (duration > MIN_DURATION) {
    displayResult(duration);
    delay(10000);
  }  

  display.clearDisplay();
}

How to use such a device? Place the camera on the table. Open the back cover of the camera. Place the shutter speed tester in front of the camera lens. Aim the phototransistor towards the camera lens. Place the flashlight behind the camera.


Arduino based shutter speed test device for film cameras

Aim the flashlight through the camera lens at the phototransistor of the shutter speed meter. Turn on the exposure tester. When the main screen is initialized, release the camera shutter. The exposure result will be displayed on the exposure tester screen.


Arduino based shutter speed test device for film cameras

If you want to use a different phototransistor, please read the technical documentation carefully and select the correct phototransistor. The SFH309-4 was also tested with good results without the need for circuit changes.

Previous Post Next Post

Contact Form