Friday 26 September 2014

How to make an ATtiny85-powered programmable intervalometer for Canon DSLR?

Remember that intervalometer I mentioned some time ago? Well, I made one for myself and since it's been working great for the last couple of weeks, I decided to share how I made it. If you'd like to build one yourself and shoot photos like this one:

or videos like this one (I strongly recommend downloading it as vimeo dramatically reduced its quality and frame rate - 60FPS was cut down to 30FPS):

01092014 Full HD 60FPS from Let Zweindaut on Vimeo.


, you will need:
  1. Perf board/stripboard:
  2. 8 Pin DIL IC Socket for the ATtiny85:
  3. 3.5mm stereo audio jack:
  4. NPN Transistor:
  5. 1MΩ resistor:
  6. Power source (in my case - a double AAA battery pack):
  7. Some sort of internally isolated enlosure (completely optional):


After you have all components prepared, you can start soldering, following the schematic:




I did it in following order, but it's completely up to you:
  1. I decided to start with the DIL socket:

  2. Next up, audio jack. Before you start soldering, let's take a closer look at this part:

    I am using only the shutter pin, but you can get creative and use the focus pin as well if you plan to focus automatically. The idea behind the build will remain similar.


  3. Followed by a transistor:

    Notice how transistor's collector is connected to the shutter pin, emitter to the ground pin (through a bridge) and base is not connected to anything yet. If you're having trouble telling which pin is the collector and which is the emmiter, take a look at this website.
  4. Resistor. This part connects transistor's base to ATtiny85's operational pin (in my case 0).

  5. Power source:

  6. And a ground reference (very sloppy, I know...):
  7. And it's finished!

Now, let's program it!

The program I'm using is just a slightly modified version of Arduino's sample Blink program. I added the initial delay, which will give you those few extra seconds before the shutter closes for the first time (I usually use that time to switch the camera's display off). My code looks like this:

int operationalPin = 0; // microcontroller's pin to be used
int initialDelay = 10000; // defines when the first photo should be taken, expressed in milliseconds
int shutterCloseTime = 100; // defines for how long the shutter should be closed, expressed in milliseconds
int gapBetweenShots = 3000; // defines the gap between every photo, expressed in milliseconds

void setup()
{
pinMode(operationalPin, OUTPUT);
delay(initialDelay); // initial delay
}

void loop()
{
digitalWrite(operationalPin, HIGH); // shutter closes
delay(shutterCloseTime); // keeping the shutter closed
digitalWrite(operationalPin, LOW); // shutter opens
delay(gapBetweenShots); // keeping the sutter open
}


The process of programming the ATtiny85 (actually getting the compiled code on the chip) is not covered here, but if you have an Arduino or a Teensy 3.1, you can take a look at an article I wrote some time ago on how to do it (it's here).

This concludes my tutorial, I hope it will prove useful to somebody. If you think it can be improved or have your own ideas for modifications, plese let me know in the comments section. If you'd like to share your intervalometer photos/videos, I *strongly* encourage you to do so!

Thanks and have a nice weekend!

No comments:

Post a Comment