The Davis Family Blog

|

Kickin' Back Since 2004

DIY Intervalometer

December 2nd, 2009 at 17:36
If you want to just want to see the time lapses, skip to the next video.  If  you want to see how it’s done, watch this one.

I’ve been having some fun–and actually learning cool stuff–with my Nerdkit lately and I wanted to build a project that used nothing but the parts in a normal Nerdkit. I came across some intervalometer projects for Nikon cameras and since I have a Nikon, I decided to go with it.  There were some cool Arduino projects that looked pretty easy, but I wanted to build it with my Nerdkit because I planned on building a permanent one, and I didn’t want to tie up my Arduino inside of it.  I did end up having to buy one part that wasn’t in my Nerdkit.  It was an infrared LED from Radio Shack.  (I think it was this one.)

First off, what is an intervalometer and why would I want one?  An intervalometer is basically just a timer for your camera.  It allows you to take cool time lapse videos of things like a flower blooming, a sun setting, or ice melting (cooler than it sounds).  My intervalometer also has a camera remote mode so I can use it to take family portraits without having to run to get into the frame or use it to take pictures with a slow shutter speed that are easily affected by camera shake.

My intervalometer can be set to 8 different settings with a dial.  It can wait 15 seconds, 30 seconds, or 1, 2, 3, 5, 10 and 15 minutes between pictures. In reality, it can be programmed to any length of time, but  My Nikon D3000 will only stay on in remote mode for a maximum of 15 minutes.

Time Lapse Setup

The Hardware
Like I said earlier, you can build this thing with only a Nerdkit and an IR LED.  The setup is fairly simple.  The hardest part is connecting the LCD and that’s not even required!  The trigger button connects to pin 28.  The IR LED connects to pin 27 and the indicator LED connects to pin 26.  The mode switch goes on pin 25.  The power switch connects between the battery clip and the ground.  I actually left it off when I built the circuit on the breadboard.  If you want to add the LCD, it should be hooked up according to the instructions in the Nerdkit guidebook.

Parts List
ATMega 168 Microcontroller – comes with the Nerdkit.  Others will probably work, but I only have experience with this MCU.
LCD and resistor I only included this to debug my code.  In the permanent project, I left the LCD off because it’s really not needed.
Potentiometer There is one included with the Nerdkit but it must be adjusted with a screwdriver.  In the final project, I used one that I salvaged out of some old headphones.
2 x Single Pole Double Throw switches Also included in the Nerdkit, but theirs are PERFECT for the breadboard and I didn’t want to give them up.  The two I used were the “Stereo-Mono” switches off of more headphones.
1 LED (any color) This can be any kind, any color.  It can be left off because it just indicates when the IR LED is flashing, but I find it’s pretty useful to know when/if your intervalometer is firing.
Tactile Switch (Push button) There is one that comes with the Nerdkit, but I used a different one that was smaller and less ugly :)
Crystal Oscillator Comes with the Nerdkit.  This piece is needed to be able to count the time accurately.
0.1uF capacitor Comes with the Nerdkit.  Used to even out the load.
Wire Any old wire will do.
9V Battery Gotta have juice!
9V Battery Clip Gotta get the juice to the board!
Voltage Regulator (7805) 9V will fry your microcontroller so you gotta step it down with a regulator.  Also included in your Nerdkit.
IR LED This is the only part I had to buy at Radio Shack.  I think I ended up spending like $1.59 on it and it came with an IR detector as well.  I used this one.
Perfboard (Optional) This is used to make a permanent intervalometer if you so desire.  I guess you could use this one, but I found one smaller and cheaper in the store.

Here is the schematic for the circuit.  I know absolutely nothing about schematics or Cadsoft Eagle, but I made one anyway.  I hope it is of use to someone.  There are probably errors on it, please let me know if you see one.

Intervalometer Schematic

Here’s what it looks like when it’s completed on the breadboard.

Overview

The Software
The software is the biggest program I’ve ever written (that’s not saying much).  It has a function called LED cycle that pulses the LED at 38KHz which is really important.  My first version of the program did not pulse correctly and the camera only picked up the signal VERY sporadically.  It has another function called click that spells out the pattern that your camera must see before it takes a picture.  Nikon’s pattern is kinda complex.  I got all the info on it from Big Mike.  There is a graph on that page that will tell you everything you need to know.  Emulating the pattern on the Nerdkit just took some simple math.  I also wrote a function that emulates the Canon IR remote, but I didn’t have a Canon camera to test it, so it might or might not work.
The intervalometer operates in two modes: remote and intervalometer.  I set the program up to wait for a button press.  Once you push the trigger button, it checks the mode switch.  If it is in remote, it takes a picture and waits for the next button press.  If it is in intervalometer, it polls the analog to digital convertor 100 times and averages them to find out where the potentiometer is set.  It then sets the interval accordingly and takes a picture.  Then it starts looping in a pattern of delay, snap a pic, delay, snap a pic.

You can download the source code here.

Putting together a video out of the time lapse can be done many different ways.  On Windows, you could use Windows Movie Maker or Adobe Premiere.  Mac users can use Final Cut Pro.  I put the two time lapses on this page together on my Linux laptop, so I used dvd-slideshow.  There’s a good tutorial on it here.

It’s kind of tricky getting the exposure just right to show off the sky and ground at the same time.  I’m still working on it.  This is the best time lapse I’ve gotten so far.

4 Responses to “DIY Intervalometer”

  1. walt Says:

    Cool Stuff! Here’s that timelapse video I was telling you about:
    http://www.vimeo.com/4038064

  2. Dave Nelson Says:

    Very cool! Good use of a Nerdkit.

  3. Jamie Craven Says:

    Hello I have a D3000 like yourself and love what you have done here as its perfect for creating a time-lapse, but my question is seeing as I own an apple mac pro with an IR sensor, is there a simple way that I can use my mac to transmit to the camera using your source code?

    I have to ask because I have no programming knowledge or experience and if you was able to do a tutorial on this as well I’m sure it would be to the advantage of many people.

    Many Thanks

    Jamie.

  4. Nikita Says:

    Hey, thanks for the post :) I think I am gonna try something like that with my arduino (which should simplify the development greatly) and D3000.

    @Jamie probably not, for one thing you need an IR transmitter not a receiver, to communicate with the camera. Something like that will do: http://www.shed.com/tutor/zephir.html But you will also have to write some custom code for it.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>