DSLR cameras capture incredible photos, and they can store thousands of images on a micro SD card no bigger than a fingernail. Modern smartphone cameras can take and save high-quality images as well, but users can’t select the appropriate lens for a situation and control the aperture, shutter speed, and ISO setting directly. Features like these give skilled DSLR users the ability to set up a shot to their exact specifications. These cameras are also compatible with a wide variety of accessories like intervalometers, which release the camera’s shutter at controlled intervals.

If you’ve ever seen a video with stars moving across the night sky, or a seed germinating and growing into a young plant, then you have seen an intervalometer in action. This style of photography is called time-lapse. Still images taken from a DSLR and intervalometer can be imported into video editing programs to make stunning time-lapse videos.

On many cameras, a versatile 2.5 mm stereo jack forms the intervalometer interface, with plug sections corresponding to ground (base), auto-focus (middle/ring), and shutter release (tip). To remotely trigger the device, the photographer connects the camera’s ground to the shutter release. These cameras provide the perfect platform for hacking with an Arduino or similar dev board. We successfully tested our Arduino Nano intervalometer on a Canon T2i DSLR, but we’re confident that this device would pair easily with many other DSLRs.

Intervalometer Build

For this build, you’ll need the following parts:

  • Arduino Nano, or the dev board of your choice
  • 4-position DIP switch
  • PC817 opto-isolator
  • Resistor (see below)
  • Double coin cell (or other 6V) battery pack
  • 2.5 mm wired stereo plug
  • 3D-printed base
  • Zip-ties
  • Hot glue
  • Hookup wire

We chose the ubiquitous Arduino Nano for its impressive control, along with a 4-position DIP switch that functions as the user interface. It’s tempting to take the easy route by hooking the Arduino output to the shutter release pin or using a transistor arrangement, but to fully isolate the camera’s electronics, I used a PC817 opto-isolator. Opto-isolators work much like relays, but instead of mechanical switching, the control hardware (the Arduino in this case) powers an LED inside the chip. The emitted light then switches an entirely isolated circuit (the camera) via a phototransistor. See below for an image of the completed circuit design.

Arduino DSLR Intervalometer - Wiring Diagram

The coin cell battery pack includes a switch to control power input. Fritzing diagram by Jeremy S. Cook.

You’ll need to place a small resistor between the Arduino output (digital pin 3) and the opto-isolator to avoid overpowering its internal LED. We used a roughly 50 ohm resistor, but one in the 100-200 ohm range should also work well. Also, we linked the input switches – which conveniently fit into the Nano’s pin spacing – to ground. Linking the switches to ground allows us to use the microcontroller’s internal resistor to hold the inputs high until the switch closes, therefore avoiding any “floating” inputs before or after we activate the switches.

You can lay out this design on a basic breadboard, but to make it durable and portable, we designed a 3D-printed base for the intervalometer, which is available here. Next, we use hot glue to adhere the Nano to the top and the dual CR-2032 battery pack to the bottom. We add a zip-tie for extra support.

Here’s one important note: one side of the build features a pair of rectangular cutouts, designed to add the opto-isolater—via more hot glue—and the shutter release cable to the camera. After soldering the appropriate cables to the opto-isolator, use another zip-tie to secure the cable in place and eliminate any strain.

Programming the Intervalometer

You can find the Arduino code for this build here. The code operates as follows:

  • The program checks the state of pins 9 through 12, using INPUT_PULLUP to take advantage of the internal resistors, as we noted earlier.
  • If any pin is LOW, indicating an on state, it then triggers the shutter for 0.1 seconds.
  • The program remains off for a period dictated by the actual switch readings. As programmed, pin 9 gives a 5 second delay, pin 10 gives a 10 second delay, pin 11 gives a 30 second delay, and pin 12 gives a 60 second delay. Each pin adds to the next, so for example, if pins 9 and 12 are switched on, you’ll experience a delay of 65 seconds between each shot. More precisely, this would be 65.1 seconds, accounting for the 0.1 second trigger open time.
  • If you want a longer or shorter interval, you can change the delay time for each one of the DIP switches in the delay() functions in lines 39 to 42. The delay time is in milliseconds.

Operating the Intervalometer

Arduino DSLR Intervalometer - Connected to the Camera

Image: Jeremy S. Cook

With the programming complete, you’re almost ready to plug the device into your camera and start shooting. One last step: to focus on your subject, turn off the auto-focus on your lens. The auto-focus setting can cause some issues when only using the release pin in this manner, but you likely won’t need to auto-focus between shots when shooting a time-lapse sequence anyway.

Going Further

The Arduino Nano intervalometer makes for a compact device, one that’s easy to (gently) toss into your camera bag for impromptu time-lapse sequences. Using an Arduino in this way gives you a wide range of camera control options. You may choose to change the timing sequence around or change how long the shutter stays open in “bulb” mode. You can even add a sensor to detect light, noise, or other types of stimulus, giving the Arduino Nano intervalometer abilities way beyond a simple timing mechanism.

Zach Wendt and Jeremy S. Cook are engineers who cover emerging technology. Zach, with Arrow Electronics, has a background in consumer product development. Jeremy writes for a variety of technical publications and has worked in manufacturing automation. Go to Arrow Electronics to learn more about Arduino products here.