Arduino Time-Lapse Controller




Introduction: Arduino Time-Lapse Controller

This project originally started out with a few simple parts thrown together to create a very simple time-lapse controller for a DSLR camera. After I was happy with the initial prototype, I wanted to make a final version which the programming of the "lapse time" was self contained into one single entity instead of relying on a computer to re-program and change the delay between shooting sessions.

After adding in a display, a couple of buttons, and a more complex program, the self contained Arduino powered Time-Lapse Controller was born!

I have tried to make the instructions as clear and user-friendly as possible, but if any questions arise, feel free to ask!

Step 1: Parts

- Arduino
- 7 Segment Display
- 220 Ohm Resistor x2
- 10K Ohm Resistor x2
- 470 Ohm Resistor
- Hookup wire
- NPN Transistor
- 3/32 Phone-jack
- hookup wire
- mounting surface (i.e. perfboard, breadboard, PCB)

Step 2: Wiring Up the 7 Segment Display

After a bit of research, I found some sample code for a 7 segment display here. Taking a closer look at the first example, I noticed that each segment of the display need to be wired to a sequential pin on the Arduino. In the case of the example, pins 2-9 with pin 2 being the "dot" on the display.

Keep in mind that each display's pinout is different and may differ from the display I used (from Radioshack), make sure to pay attention to its datasheet.

- Wire both GND pins of the display to GND on the Arduino with a 220 Ohm resistors
- Wire the display pins to sequential Arduino pins. In my case I used pins 3-9
- Wire the "dot" pin to the Arduino. For me, pin 2

Step 3: Wiring Up the Buttons

Using this as a reference, I wired up the two buttons

Follow the pictures in the above link and the one enclosed and it should be pretty easy to figure out.
- using 10K Ohm resistors and hookup wire I connected the buttons to pins 11 and 12.

Step 4: Wiring Up Shutter Control

After reading through rickadam's instructable on time lapse, I based my circuit off of his design.
A DSLR camera uses a 3/32 phono-jack to interface with this circuit, but this could easily be adapted to just about any camera

- Wire pin 1 of the phono-jack to Ardunio GND
- Wire the NPN transistor pin 1 to Arduino GND
- Wire 470 Ohm resistor from an open Arduino pin (in my case 13) to NPN transistor pin 2
- Wire pin 3 of phono-jack to pin 3 of the NPN transistor

(NOTE: the pin values given in this step are only used as identifiers and my not directly correspond with the values given on datasheets)

Step 5: Upload Blink and Create a Reference Sheet

My assumption is that the display I used and how it is wired up is different in comparison to your project. To make sure the final code runs properly, we need to change a few values within the program. To make that process easier, a reference sheet will be made.

- Open up Arduino's Blink example and change the value of "led" to one of your segment pins. Download and run the sketch to the Arduino.
- Change the value of "led" again to another pin, download and run
- Continue this process while documenting the location on the display each pin lights up. Reference the picture as an example.

Step 6: Modifying the Display Code to Fit Your Circuit

Open up the segment testing code and change "PIN" to the value of your lowest pin.

After uploading and running the code, the display should count down from 9 to 0. But instead your display will be showing a random collection of symbols

Using your reference sheet,  we will modify the existing code to be customized to your circuit.

- At the top of the program, locate this section of the code:
      byte seven_seg_digits[10][7] = { { 1,1,1,1,1,1,0 },  // = 0
                                                                 { 0,1,1,0,0,0,0 },  // = 1
                                                                 { 1,1,0,1,1,0,1 },  // = 2
                                                                 { 1,1,1,1,0,0,1 },  // = 3
                                                                 { 0,1,1,0,0,1,1 },  // = 4
                                                                 { 1,0,1,1,0,1,1 },  // = 5
                                                                 { 1,0,1,1,1,1,1 },  // = 6
                                                                 { 1,1,1,0,0,0,0 },  // = 7
                                                                 { 1,1,1,1,1,1,1 },  // = 8
                                                                 { 1,1,1,0,0,1,1 }   // = 9

We will be modifying the 1s and 0s in this section.

- Each row corresponds to the digit that will be displayed and set of data to properly display that digit. The data will be sent as 1s (on) and 0s (off)
- Each column correspond to the pin which the data will be written to. The left most number correlates the the lowest pin defined by "PIN" (in my case pin 3). Moving across the row to the right, the next value corresponds to the next pin value and so on and so on.

For example, in the case of my circuit:
- I would like to modify the code so that my circuit will properly display "4"
- Looking at my reference sheet, the following pins should be lit: 3,4,7,6
- Turning to the code, I will change the appropriate values:

                                  //Arduino pins: 3,4,5,6,7,8,9
byte seven_seg_digits[10][7] = { { 1,1,1,1,1,1,0 },  // = 0
                                                           { 0,1,1,0,0,0,0 },  // = 1
                                                           { 1,1,0,1,1,0,1 },  // = 2
                                                           { 1,1,1,1,0,0,1 },  // = 3
                                                           { 1,1,0,1,1,0,0 },  // = 4
                                                           { 1,0,1,1,0,1,1 },  // = 5
                                                           { 1,0,1,1,1,1,1 },  // = 6
                                                           { 1,1,1,0,0,0,0 },  // = 7
                                                           { 1,1,1,1,1,1,1 },  // = 8
                                                           { 1,1,1,0,0,1,1 }   // = 9
- Continue this process until all of the values have been changed. After downloading and running the program, the display should count down from 9 to 0. If not, change the appropriate values.

NOTE: If the "dot" is lighting up during any step of this process make sure the following things are true:
- "PIN" has been properly defined as the lowest value of your display pins, if the "dot" pin is the lowest make sure to use the next highest
- Make sure when wiring the display, the "dot" does not interrupt the sequential wiring of the display segment pins

Step 7: Modifying and Uploading the Final Code

We are now in the homestretch. Using the modifications made in the segment testing code, we will modify the final code so that your circuit will display the correct numbers.

- Copy the edited code from the previous step and replace it within the final code
- Change the pin value of "Bc" (cycle button)
- Change the pin value of "Ba" (accept button)
- Change the value "PIN" to the lowest display pin
- If you see fit, modify the function "lad" to your own custom animation to signify the accepting of the chosen value

After all of these changes are made, the final code should download and run smoothly.

Step 8: How to Use the Rig

How the program works:
- Upon first powering up the circuit, the display should eventually come on and display "0"
- Pressing the cycle button will increase the value by one and display a "1"
- Continuing to press the cycle button will increase the displayed value by one until the value of "9" is reached
- Once "9" is reached and the cycle button is pressed again, the next value will loop back to "0"
- Pressing the accept button will store that value in the Arduino's memory and a accept animation will be displayed
- This process will repeat for a total of 3 times, each digit corresponding to a value within the wanted time delay
- After the final digit is stored, a count down will start, after the countdown the camera will then take pictures at the interval you specified in the input process
(NOTE: If a mistake is made while inputting the digits, the reset button can be pressed and the program will restart)

For example:
say you wanted the interval between shots to be 1 minute and 35 seconds
- Plug in the camera via the phono-jack
- Power up the circuit
- Press the cycle button until the number 1 is displayed
- Press the accept button
- Press the cycle button until the number 3 is displayed
- Press the accept button
- Press the cycle button until the number 5 is displayed
- Press the accept button
- After the process is complete, a countdown will start, and then the camera will take pictures with an interval of 1 minute and 35 seconds

Step 9: Final Thoughts

It had been a while since I had completed a project like this so it felt good do be actually making again.

I still have some more ideas for the design, mainly on the programming side, such as displaying the number of pictures taken since the start of the session. Who knows what else may pop into my head.

To close, here is a small test done in my backyard.

Stay tuned for possible updates!


UPDATE (12-12-13):
I have updated the code and now the intervalometer can count the number of pictures taken. It is attached below. Also included is a full time-lapse video of myself and a friend building a computer. 

Arduino Contest

Finalist in the
Arduino Contest

3 People Made This Project!


  • Water Contest

    Water Contest
  • Creative Misuse Contest

    Creative Misuse Contest
  • Metalworking Contest

    Metalworking Contest

36 Discussions

Fall is here and my transistor would not turn off (close) at low temperature. Also it seemed to have trouble after a few hundred shots... Either way, after building two of these I finally just replaced the transistor with an optocoupler (817) recycled from an old monitor and a 220 Ohm resistor to protect the LED side from PIN13 power and threw it in the refrigerator overnight. So far so good. (I also changed the code to show thousands.) If it keeps working I may streamline the form factor and do a separate Instructable.

1 reply

Glad to hear about the improvements that you have made. I haven't "stress tested" my setup so I am glad that you have found some of the bugs, and solutions. Send me a link of the improved design when it is up.

Update - Finished connection to camera. A few unusual items - I found that on my Digital Rebel T3i that mic jack pin 3 (tip) to ground (base) is focus and pin 2 (middle) to ground (base) is shutter. The focus and shutter were independent. I added another push button for the focus and left it unattached to the shutter. Basically, I suggest shorting tip and middle to ground while jacked into your camera to see what does what before final wiring.

1 reply

With my given code, the interval can be set from 1 sec up to 10min 39sec (9min 99sec).

Hello, I'm putting together my stuff, i have one question. Step 4, what is that mmm.. button? and you labeled as they should be connected to pin 3 and 1. I don't get that part, PWM pins?

Thank you, nice project.

3 replies

The parts used in step 4 are as follows:

NPN Transistor

3/32 phone jack

470 ohm resistor

The third contact of the phone jack is connected to pin 13 of the arduino. Hopefully that answers any of your questions.

Thank you.

I mean the black square with a grey button. What is that? is that connected to the NPN?

Thank you.

I believe you are referring to the 3/32 phone jack. For more details no how it is connected, refer to the schematic in step 1.

For This Project/Circuit, which cable is used to connect NIkon D3200 camera ?

Is It Compatible With NikonD3200 Camera Model ?!!

1 reply

I am new to Arduino and this looks lie a really cool project to try for myself! A couple of questions:
- which NPN transistor are you using here? Radioshack has a whole bunch of them.
- I can't find this 2/32 phono jack anywhere online (including Radioshack) - is it known by a different name?
- can you please provide a schematic of this so that I can build the prototype on a breadboard first?

1 reply

1. Bipolar 200mA 40V NPN
2. That was an error on my part, it was supposed to measure 3/32
3. A schematic is now included in step 1

I am new to Arduino and this looks really cool to try for myself! A couple of questions:
- which NPN transistor are you using here? Radioshack has a whole bunch of them.
- I can't find this 2/32 phono jack anywhere online (including Radioshack) - is it known by a different name?
- can you please provide a schematic of this that I can build the prototype on a breadboard?

Awesome! I'm currently working on a motorized timelapse dolly. I found a thrown away giant Epson printer. The machined aluminum slider inside is perfect. Fantastic ible, I will probably be referencing it during my project.