loading

I always wanted to shoot some lightnings but never knew how.

So I set down and made this Arduino DSLR Lightning Catcher.
The idea is to constantly mesure the ambient light and when sensing a spike in the light taking a shoot.

Step 1: The Need List

A DSLR camera
An Arduino board
2 X 220ohm resistor
A small PL conector (like the headphone only a bit smaller)
1 X 3-cord cable
1 Optoisolator
1 Potentiometer
A Led (optional)
1 Photocell

* Notice that in the diagram i forgot to put a resistor from the photocell to ground, do it as written below.

Step 2: Making the Cord

The PL connector connect to the camera's remote jack, the other side of the cable goes to the bread board.
To make a shoot you need to short two of the cables comming from the camera :
Automatic Camera Shutter Switch by DIY Hacks and How Tos

Step 3: Conacting the Potentiometer

The potentiometer is there to set the level of senstivity for light spikes.
Connect the left pin to ground, connect right pin to 5v, connect mid pin to Analog 5 (A5) on the arduino

Step 4: Photo Cell

The photocell is the part sensing the light, so when finaly setting the scene for shooting it is best to point it to the view as seen from the lens.

Connect one pin to Analog 0 (A0) on the arduino and also to a 220ohm resistor (pull down) and to the ground.
Connect second pin to 5v

Step 5: OptoIsolator

The Optoisolator is like a Realy, switching a circuit on while reciving power from another circuit only it is
made with IR led and IR reciver resistor so like the relay the two circuits never connect only faster then electromagnets.

Connect the Base to Arduino's pin 10 and the Emitter through a 220ohm resistor to GND.
Connect the Anode to the Camera's GND and the Cathode to Camera Shutter.

Step 6: The Code

So, as I written earlier, the code is constanly mesuring the light levels and calculating its avrage calling it ambient,
But when sensing a sodden spike in the mesuring takes a shoot

// Lightning Catcher for Arduino <br>// Written by Uria Dubinsky
// www.udpic.co.il
#define poten A5                    // Potentiometer Analog pin no. 5, for setting sensetivity
#define seLight A0              // Light Sensor Analog pin no. 0
#define shoot 10                    // Optisolator Digital pin no. 10 for making the shoot
int ambient =0;                    // integer for the ambient light avrage keeping
int sensitiv, lastSens;      // sensitiv integer for keeping the sensetivity levels value, lastSens integer for keeping the last light metring value
void setup () {
  Serial.begin (9600);
  pinMode (poten, INPUT);              // Setting the pins modes
  pinMode (seLight, INPUT);
  pinMode (shoot, OUTPUT);
  
  digitalWrite (shoot, LOW);      // Making sure the shoot pin is LOW
  ambient = analogRead (seLight);        // insert a first ambient value
}
void loop () {
    lastSens = analogRead (seLight);        // Analog reading the light sensor
    if (isSpike (lastSens) == false) {        // Compering the ambient value for a spike in the light (through the isSpike function)
      ambient = ((ambient + lastSens) / 2);    // If there is no spike enters the value to the ambient avrage
    }
    else {
        digitalWrite (shoot, HIGH);                  // If there is a spike in the light making the shoot
        delay (20);
        digitalWrite (shoot, LOW);
    }
}
boolean isSpike (int sensRead) {              // Function recive the value of the last light mesuring and return true for a spike and false for non
  sensitiv = analogRead (poten);
  if (sensRead <= ambient+sensitiv ) return false; else return true;
}
<p>I can't seem to get this to work. Code seems ok. Have I misinterpreted the wiring descriptions? See image</p>
Describe what's not working, It doesn't shoot? shoot but not in time? doesn't do anything?
<p>Dos not shoot. I thought maybe I had interpreted your instructions incorrectly on the resistor from the photocell but if this is correct then I have reason to suspect the photocell. I will change it and let you know. Thanks.</p>
<p>many thanks for your project I will be trying to make it in the future. how did you get the value of the pull down resistor to 220 ohm?</p>
<p>This is how it looks out of the breadboard, everything remained the same only i used the arduino pro mini</p>
Very cool. Ive always wanted to shoot lightning. This is very easy design. Good job!
<p>This is awesome! Do you have any examples of photos taken this way? I would love to see them :D</p>
<p>Well im still awaits a lightnings storm but i did have some tests using a flsh light </p>

About This Instructable

13,457views

75favorites

License:

More by udubinsky:ENC28J60 Using Ethernet With Arduino Electro Double Pie Face Showdown  Never Forget It on - Energy Saver 
Add instructable to: