I’m cheap and skint, yet I want to do timelapse photography with my DSLR. Unfortnately that requires spending some cash on an intervalometer for time lapse photography which will set me back a sizeable chunk of cash. Or I could get a remote or get the trigger system then create a delay mechanism to do the timelapse. But again it’d cost a few quid to even get a remote…
Thankfully I already have an Arduino board and a bag of Infrared emitter diodes which I was wondering what I could use them for. So I had a quick scout round the interweb and saw various projects where people had written programs to allow Arduino to work as a TV remote etc.. and I stumbled up on this site: http://www.bigmike.it/ircontrol/ which listed the very IR timing sequence and frequency I would need to trigger my camera. I’m guessing you can find other sequences/ frequencies for other bits of hardware too.
There is no point in me writing up a circuit diagram or parts list for this as you just need an IR diode and an Arduino board. Oh and check that your camera has an Infrared remote port on it or else this is pointless!
The sketch
You will see that basically we blink an IR LED for a set time, wait and repeat to create our signal. The only complicated bits are working out the delays to create the pulse cycle/ wave. Turns out Arduino isn’t so hot at measuring delays in Microseconds so we need to give it a hand keeping track using the micros() function – so we just create a counter to do this and specify an end time for it to count up to.
/* LUCKYLARRY.CO.UK - IR Remote control for Nikon using Arduino Mimics the infrared signal to trigger the remote for any Nikon camera which can use the ML-L1 and ML-L3 remotes. Can be used as an intervalometer for time lapse photography. The IR sequence I used is originally taken from: http://www.bigmike.it/ircontrol/ You should be able to use my pulse methods to alter to suit other cameras/ hardware. micros() is an Arduino function that calls the time in Microseconds since your program first ran. Arduino doesn't reliably work with microseconds so we work our timings by taking the current reading and then adding our delay on to the end of it rather than rely on the in built timer. */ int pinIRLED = 13; // assign the Infrared emitter/ diode to pin 13 void setup() { pinMode(pinIRLED, OUTPUT); // set the pin as an output } // sets the pulse of the IR signal. void pulseON(int pulseTime) { unsigned long endPulse = micros() + pulseTime; // create the microseconds to pulse for while( micros() < endPulse) { digitalWrite(pinIRLED, HIGH); // turn IR on delayMicroseconds(13); // half the clock cycle for 38Khz (26.32×10-6s) - e.g. the 'on' part of our wave digitalWrite(pinIRLED, LOW); // turn IR off delayMicroseconds(13); // delay for the other half of the cycle to generate wave/ oscillation } } void pulseOFF(unsigned long startDelay) { unsigned long endDelay = micros() + startDelay; // create the microseconds to delay for while(micros() < endDelay); } void takePicture() { for (int i=0; i < 2; i++) { pulseON(2000); // pulse for 2000 uS (Microseconds) pulseOFF(27850); // turn pulse off for 27850 us pulseON(390); // and so on pulseOFF(1580); pulseON(410); pulseOFF(3580); pulseON(400); pulseOFF(63200); } // loop the signal twice. } void loop() { takePicture(); // take the picture delay(5000); // delay in milliseconds which allows us to do timelapse photography - 1 second = 1000 milliseconds }
Ok, so one other thing when using your camera and thats a quick modification to the remote timer, if like mine your infrared camera remote port is set to be active for less than a minute then you’ll need to edit the settings accordingly – just check your owner manual. For me it’s in the menu screen, custom setting menu, then option 30: Remote on duration.
Now I just got to take some cool timelapse stuff like my friends here:
Which also reminds me to look into CHDK and my Canon Powershot A530 and see what I can do there.
This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.
- Arduino: motion triggered camera
- Arduino + Processing: 3D Sensor Data Visualisation
- Arduino: (Very) Basic motion tracking with 2 PIR sensors
- Arduino + Processing: Make a Radar Screen to Visualise Sensor Data from SRF-05 – Part 2: Visualising the Data
- Arduino + Processing: Make a Radar Screen to Visualise Sensor Data from SRF-05 – Part 1: Setting up the Circuit and Outputting Values
- Arduino: Basic Persistance of Vision
- larryBot – versions 0.1 to 0.5 lessons learned
- Arduino + Processing: Getting values from SRF05 ultrasound sensor & serial port
- Arduino: Sonic range finder with SRF05
- Arduino: Control a DC motor with potentiometer and multiple power supplies










Thanks for sharing this! Works great with my D60.
No problem John. I reckon that this can also be used to build some sort of trip wire system which might be quite handy
Hey Larry I tried to make the interval-o-meter but mine doesnt seem to work at all. I bought an IR diode that has a continuous forward current of 150mA. Also I have a D60.
Any help would be most appreciated. Thanks.
Hmm strange. I use lower power diodes. Check the wavelength emitted from the diode should be around 940nm and the frequency your D60 expects should be the same as mine.
I also found I had to point it directly to the cameras IR sensor oh and make sure your cameras set to remote shutter release mode (which I forgot).
For debugging, try switching the IR diode for a normal LED to see easier if its flashing, its a good check of your code.
If you’re in the UK, I could always post you one of my IR leds to see if its that since they’re cheap and I have surplus – I have broken a few when working with this
. Could also be that your higher power diode isn’t getting the power from the Arduino board since they output 40mA per I/O pin and yours needs up to 150mA. (mine uses about 50mA)
I just tried this with my Nikon D50 and it works great!
Sweet!