How I Took Photos of Water Crown

We can see water crown right after a water drop hits the water. So we have to take picture right after a water drop hits the water. It takes me about 20 milliseconds.

To do it in auto mode I use my camera with flash and Arduino. I use LDR and laser pointer to capture a water drop and IR led to trigger camera. The main thing is you have to capture a water drop while fooling down.

My algorithm is very simple, I have read data from LDR in infinite loop and when value was less then N (depending on light in room) I wait for M milliseconds (depending on distance to plate) and send signal to take a picture.

First version of my “catcher” in second version I haven’t used IR-led instead of that I bought IR remote control and connect it to arduino because IR-led works fine with Nikon D80 but not with D750.

#define ldrPin 0
#define ledPin 12
#define sPin 13

void setup() {
  Serial.begin(9600);
  //pinMode(ldrPin, INPUT);
  pinMode(ledPin, OUTPUT);
}

void loop() {
  int val = analogRead(ldrPin);
  if (val < 150) {
    digitalWrite(sPin, HIGH);
    delay(25);
    sendNikonCode();
    Serial.print(val);
    Serial.println(" take picture");
    digitalWrite(sPin, LOW);
    delay(5000);
  }
  Serial.println(val);
}

void pulseIR(long microsecs) {
  // we'll count down from the number of microseconds we are told to wait

  cli();  // this turns off any background interrupts

  while (microsecs > 0) {
    // 38 kHz is about 13 microseconds high and 13 microseconds low
   digitalWrite(ledPin, HIGH);  // this takes about 3 microseconds to happen
   delayMicroseconds(10);         // hang out for 10 microseconds, you can also change this to 9 if its not working
   digitalWrite(ledPin, LOW);   // this also takes about 3 microseconds
   delayMicroseconds(10);         // hang out for 10 microseconds, you can also change this to 9 if its not working

   // so 26 microseconds altogether
   microsecs -= 26;
  }

  sei();  // this turns them back on
}

void sendNikonCode() {
  // This is the code for my particular Nikon, for others use the tutorial
  // to 'grab' the proper code from the remote

  pulseIR(2080);
  delay(27);
  pulseIR(440);
  delayMicroseconds(1500);
  pulseIR(460);
  delayMicroseconds(3440);
  pulseIR(480);


  delay(65); // wait 65 milliseconds before sending it again

  pulseIR(2000);
  delay(27);
  pulseIR(440);
  delayMicroseconds(1500);
  pulseIR(460);
  delayMicroseconds(3440);
  pulseIR(480);
}

code of triggering camera was taken from http://sebastian.setz.name/arduino/my-libraries/multi-camera-ir-control/