DSLR Lightning Trigger 2

Lightning Drought

Back in September, I created a simple Arduino-based lightning trigger (original article).  I’ve been waiting since then for the chance to test the circuit in the field.  Yesterday provided the first real chance to test the circuit; unfortunately, I missed it.

Improving the Program

Even though I missed the event, I did decide to improve the program a little.  The major change, if it can be called major, addresses a weakness in the original program.  Originally, every event would attempt to trigger the shutter twice (once when the lightning occured and again when the brightness returned to normal).  To fix this I am removing the absolute value function from the brightness test.  Now, it will only trigger if the new brightness is brighter than the previous.

#include <multiCameraIrControl.h>
int shutterPin = 13;
int triggerPin = 0;
int threshold = 10;
int savedLightningValue = 0;
int currentLightningValue = 0;
int delayBetweenShots = 1000;
Nikon shutter(shutterPin);
void setup() {
  Serial.begin(9600);
  pinMode(shutterPin, OUTPUT);
  digitalWrite(shutterPin, LOW);
  savedLightningValue = currentLightningValue = analogRead(triggerPin);
}
void loop() {
  currentLightningValue = analogRead(triggerPin);
  Serial.println(savedLightningValue, DEC);
  if((currentLightningValue - savedLightningValue) > threshold) {
    Serial.println("Triggering shutter");
    shutter.shutterNow();
    delay(delayBetweenShots);
  }
  savedLightningValue = currentLightningValue;
}

Resources:

Other Posts in this series:

5 Comments

  1. Matthew McCutchen

    Chad,
    I’m replicating your project because like you, I have a huge interest in photography.
    I was wondering how you programmed your Nikon to receive the infared signals. I am currently using a Nikon D7000 (I think it should be supported on multiCameraIRControl). I’ve found a few websites indicating I could change a dial to remote control, but I’m not fully confident on that.
    Any help you might have would be greatly appreciated!
    Thank you for your time.
    Sincerely,
    Matt McCutchen

  2. This got me when I first tried it too. You have to set the release mode to the remote option. My D5000 has Single, Burst, 10s timer, Remote +2s, Remote.

  3. Tony McVeigh

    I know this is a while since Matthew McCutchen posted his question, but this design works perfectly with the D7000, code unaltered.

Leave a Reply