EN RU

How I take 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.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#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/

    2015-07-30 10:00:00      photo arduino macro microcontroller