Nikon Intervalometer

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
zunayed
 
Posts: 1
Joined: Sun Feb 27, 2011 11:26 am

Nikon Intervalometer

Post by zunayed »

Hi guys,

I came across Ladyada's tutorial on IR sensors http://www.ladyada.net/learn/sensors/ir.html and decided to have a go trying to make the intervalometer with my arduino. I bought a PNA4602 from the adafruit site and also a IR led (940nm, 1.2V forward voltage, 100ma foward current) from radioshack.

For some reason the tutorial replaced the word nikon with canon everywhere... The remote they used to get the signals is a nikon. The camera is a nikon. In the comments for the code they even mention canon D50 which is a older nikon camera model. Any who

I set up their sensor and measured my remote and got pretty much the same values as Ladyada did. I uploaded the code to the arduino and connected up the LED to pin 13 and a 1k resistor and ground and started outputing the pulses. It wouldn't work and eventually I set up another arduino with the sensor and ran both at the same time. I discovered my arduino wasn't properly outputting to the IR LED the correct pulses.

Heres what the sensor was reading:


NIKON REMOTE ML-13
Received:
OFF ON
47520 usec, 2000 usec
27260 usec, 420 usec
1520 usec, 440 usec
3480 usec, 420 usec

61940 usec, 1980 usec
27260 usec, 420 usec
1520 usec, 420 usec
3480 usec, 440 usec



My IR LED + Ladyada code

Received:
OFF ON
16868 usec, 2640 usec
26500 usec, 560 usec
1480 usec, 560 usec
3440 usec, 560 usec

63820 usec, 2520 usec
26520 usec, 560 usec
1480 usec, 560 usec
3440 usec, 560 usec

So its taking more time sending the pulses and I can't figure out why. Any suggestions? Thanks.

Here is the code i'm uploading to the arduino mega - its identical to the code on Ladaydas site

Code: Select all

// This sketch will send out a canon D50 trigger signal (probably works with most canons)
// See the full tutorial at http://www.ladyada.net/learn/sensors/ir.html
// this code is public domain, please enjoy!
 
int IRledPin =  13;    // LED connected to digital pin 13
 
// The setup() method runs once, when the sketch starts
 
void setup()   {                
  // initialize the IR digital pin as an output:
  pinMode(IRledPin, OUTPUT);      
 
  Serial.begin(9600);
}
 
void loop()                     
{
  Serial.println("Sending IR signal");
 
  SendCanonCode();
 
  delay(10*1000);  // wait one minute (60 seconds * 1000 milliseconds)
}
 
// This procedure sends a 38KHz pulse to the IRledPin 
// for a certain # of microseconds. We'll use this whenever we need to send codes
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(IRledPin, HIGH);  // this takes about 3 microseconds to happen
   delayMicroseconds(10);         // hang out for 10 microseconds
   digitalWrite(IRledPin, LOW);   // this also takes about 3 microseconds
   delayMicroseconds(10);         // hang out for 10 microseconds
 
   // so 26 microseconds altogether
   microsecs -= 26;
  }
 
  sei();  // this turns them back on
}
 
void SendCanonCode() {
  // This is the code for my particular Canon, 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);
}

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Nikon Intervalometer

Post by adafruit »

thats right, we have two cameras but confused which one was being used here. its updated to say nikon

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”