Arduino-Based Intervalometer v0.1

The World Most Simple Homemade Intervalometer Project and a Sample First Project.

A while back I stumbled across the incredibly cool Arduino project. After some thinking and research, I decided on a modest first project: an intervalometer for my Canon 350D. Timm Suess’s Intervaluino blog post was a big inspiration and a great starting point.

First Step: Buy some parts! A Bern company, had Arduino Duemilanove (USB) boards in stock for SFr49 each. And a local shop Pusterla had the other little bits (power switch, battery connection, solid wires, wiring board, male 3.5mm jack) required. The remaining bits were items I had about the house, namely an old business card box as a housing and an old hairband donated by my wife to hold everything together

Second Step: Assembly. I had three goals in mind with the construction step:

  • The intervalometer must be small. It should fit readily into my camera bag
  • The intervalometer should be somewhat robust. It needs to take a licking and keep on clicking.
  • The intervalometer must be easy to create and modify. Me being me, it is going to be modified at some point.

My initial attempt at wiring everything up relied upon a schematic from Timm Suess, and annotated by a friend, Lincoln Stoll. The problem was the relay was just not relaying for me. So I ripped it out and wired up the trigger directly to the Duemilanove. Reckless, maybe. But it worked.

(Larger Image)
And here it is all boxed up. The plastic is hard enough to resist rough treatment, yet soft enough that I can easily cut and drill into it. The hairband means I can tinker with the insides with no tools. And the clear case means I can see the lights. Green is power, and the orange LED blinks when the trigger should be pulled.

(Larger Image)
Third Step: Program the Intervalometer. The Arduino project home page has a simple IDE that can be downloaded for free. Windows, OSX and Linux are supported. The programming itself, for a limited fixed interval, is ridiculously easy.

  // Stu's Magic Intervalometer code
  int shutter_on   = 300;  //time to press shutter, set between 100 and 300
  int shutter_wait = 2500; //interval between button up & button down

  int outpin = 12;         //output for shutter relay from pin 11
  int ledPin =  13;        // LED connected to digital pin 13

  void setup() {
     pinMode(outpin, OUTPUT); //outpin gives output

  void loop(){
     digitalWrite(outpin, HIGH); //press the shutter
     digitalWrite(ledPin, HIGH); //turn ON orange LED
     delay(shutter_on);          //wait the shutter release time
     digitalWrite(outpin, LOW);  //release shutter
     digitalWrite(ledPin, LOW);  //turn OFF orange LED

     delay(shutter_wait);        //wait for next round

Once this is written, and after saving, it is quick and easy to connected the  Arduino to my Mac with a USB cable and upload the program.

Fourth Step: Capture the stuff that will be used as individual frames in a movie.  Our flat overlooks a park with a playground which seemed like a good subject.

  • Set up the Canon EOS 350D with f1.8 lens on a tripod looking out the window
  • Set image quality to low (1728 × 1152)
  • Manual focus lens, turn of auto-focus
  • Turn off post-shoot image view
  • Connect Intervalometer
  • Flip the switch!

After about an hour there were ~1000 shots.

Fifth Step: Process the stuff into a movie.  This is not as hard as it sounds, but the approach I took does require some familiarity with the command line.

  • Import photos from camera to MacBook Pro
  • Resize stuff to 1920×1080 (native wide screen HD video)
  • Rename stuff into a sequentially numbered series of files
  • Compile stuff into movie

Moving photos from a camera to computer is trivial.  Resizing 1000+ stuff is a bit trickier, as is renaming the files.  The original names are from the camera.  E.g.: IMG_9350.JPG.  To convert into a movie, we need them to start at 0.  E.g.: 0000.jpg.  To do this I wrote a small bash script for the task:

set -x

for photo in ./orig/*
newPhoto="$(printf "%04d" $id)"
sips -z 1080 1920 $
photo --out "$newPhoto.jpg"

Once the above script has run, the last thing to do is turn all the stuff into a video with FFmpeg. FFmpeg is a big, complicated program with a zillion options and features. Basically, the command below instructions FFmpeg to compile the stuff into a video at 25 frames per second with bit rate of 1024kbps using the h264 codec.

ffmpeg -i %04d.jpg -vcodec libx264 -f mp4 -b 1024k -r 25 -y playground.mp4 

What’s next?  I’ve been thinking about this a while and plan the following:

  • Securing the wiring to the Arduino board.  At the moment, when changing the battery or reprogramming the device, the wires can come out of the circuit board.
  • Add some big flashing lights.  I like teh blinky lights!
  • Find a more interesting subject to photograph
  • Use a shallow depth of field for interesting effects.  “The Sandpit”, also known as “A Day in the Life of New York City in Miniature”, by Sam O’Hare is kind of in the direction I’d like to go.
  • Add some sound or music