Introduction: TIC! One-button Time Lapse Camera Timer

This project is a one-button time-lapse camera timer initially developed for my Canon 400D Digital SLR camera but it should work with other cameras.

You can buy a remote switch for the Canon 400D, but that costs at least $35 and at the end of the day it is just a switch on the end of a cable. This project adds a nifty timer to the cable in the form of a PIC 12F675 (or PIC 12F629) micro-controller for about the same price - or less if you build it from scavenged parts as I did.

It can be used to take photographs at intervals from 1 to 65535 seconds (approximately 18 hours). It features:

- A single button to control all functions
- Audible feedback via a piezo speaker
- Visual feedback via a bi-color LED

Using one button to control the timer is surprisingly easy and makes it really cheap to build.

Step 1: Circuit

The latest circuit diagram, source code and hex file can be found on my TIC! Sourceforge project . The circuit diagram pdf is attached to this ible for convenience.

Attachments

Step 2: Parts List

Name    Description                                                                     Australian Supplier
U1          PIC 12F629 or 12F675                                                   Modtronix 12F675
Q1, Q2   NPN general purpose transistor (BC548, 2N2222 etc) Jaycar Cat No ZD2298
Q3, Q4   N-channel low power FET (2N7000 etc)                       Jaycar Cat No ZT2400
D1, D2    Red/Green bi-color LED (or individual LEDs)               Jaycar Cat No ZD0250
C1, C2    22 ηF polyester capacitor                                              Jaycar Cat No RG5085
C3          100 ηF polyester capacitor                                             Jaycar Cat No RG5125
R1, R2    1.2 kΩ 1/4 watt resistor
R3, R4    56 kΩ 1/4 watt resistor
R5, R9, R10, R11  120 Ω 1/4 watt resistor
R6, R12  27 kΩ 1/4 watt resistor
R7           2.2 kΩ 1/4 watt resistor
R8           3.3 kΩ 1/4 watt resistor
PZ1         Piezo electric speaker (not a buzzer)                         Jaycar Cat No AB3440
SW1        SPST momentary action switch                                 Jaycar Cat No SP0657
SW2        SPST toggle or slider switch                                     
BAT1, BAT2, BAT3 1.5V AA or AAA batteries, and holders
                2.5 mm stereo audio plug                                           Jaycar Cat No PP0103

other
box, hardware, wire, stereo audio cable, you know the sort of thing!

Step 3: Assembly

I built mine on matrix board (aka stripboard or veroboard). There are no critical part placements, so just whack the parts on and solder them together!

Once the unit is assembled, connect your programmer to the ICSP header and load the hex file into the PIC micro-controller. I used a PicKit2 programmer , but others will work just as well.

If you need to modify the source code , I used the free MikroC PIC compiler from MikroElectronika .

Step 4: How It Works

Shutter Release Output

The output from pin 2 of the PIC micro-controller (see circuit diagram) switches a Field Effect Transistor (FET) that connects the tip of the 2.5mm audio plug to ground in order to activate the camera's remote shutter function.

Half-Press Output

The output from pin 7 switches another FET that connects the ring of the audio plug to ground in order to activate the camera's shutter half-press function.

The PIC has been programmed to "half-press" the shutter button for 100 ms, then "full-press" the shutter button to take the shot, and then wait until the interval you have set expires before repeating the process. In this way, the "half-press" will wake the camera before taking each shot. Note that 100 ms is not long enough to perform the auto-focus function, so you need to set the lens to "Manual Focus" (i.e. switch the lens to the MF mark, not the AF mark). If you have the lens in AF mode then no photographs will be taken.

Audio Feedback

The circuit uses an astable multivibrator (i.e. an oscillator) comprising Q1 and Q2 (see circuit diagram) and associated components to generate the audible feedback tones via a piezo speaker (for example, Jaycar AB3440 ). Make sure you use a piezo transducer or speaker , not a buzzer . A buzzer makes a single tone when you apply a voltage; a transducer requires an alternating voltage and makes any tone you like. The piezo speaker takes its signal from the collectors of Q1 and Q2 so that it is activated with an alternating voltage. The PIC supplies power to the multivibrator via pin 3 to turn it on and off, and also sets the tone (high or low) by using pin 5 to either switch a resistor into the RC network controlling the pitch or by "floating" pin 5 (tri-state mode) so that it is effectively not in the circuit.

Visual Feedback

Visual feedback consists of D1/D2, which is really a single package containing a red and a green LED. The unit powers up in "set" mode, indicated by the LED glowing red.

Setting the Interval Between Shots

You select the time-lapse interval (in seconds) by pressing the button. The first press emits a low beep, indicating zero. Subsequent presses emit high beeps, which you count until you reach the next digit you want. Digits are entered as you would write them on paper, so 120 seconds would be entered as 1, then 2 then 0. To enter each digit all you have to do is wait for one second or more after you reach the desired number. You will know when one second has elapse when you hear a high/low beep (which is the closest I could get it to sing "OK"). If you overshoot the digit, just keep pressing until you hear the low beep indicating zero and start counting from 1 again.

Shoot Mode

Once the time-lapse interval has been entered, you switch into "shoot" mode by holding the button down for one second or more until you hear a high beep. The LED will extinguish but briefly flash green every time a shot is taken. Shooting begins as soon as you release the button. This has a useful side effect in that if you want to start your shooting at a particular time then just keep holding the button down whilst looking at your watch. It will give you "timing" beeps at one-second intervals so you can release the button to start shooting at a particular instant.

The last time-lapse interval that you set is remembered across power-ups in the onboard EEPROM. To use the previously set interval, just press and hold the button after power up and "shoot" mode starts with that interval.

Suspend Shoot Mode

To suspend shooting, tap the button for less than one second. The LED will glow red to indicate "set" mode. You can resume shooting using the existing interval by holding the button down for more than one second.

Battery Life

As the unit is not normally beeping or making an LED glow, it uses very little current so the batteries should last quite a long time. Remember to turn off the camera's LCD display to make the camera battery last longer.

Step 5: How to Use TIC!

You can watch a short YouTube video showing how to use TIC! and see the resulting video , or just follow the steps below:

1. Connect the TIC! shutter control output to the camera's 2.5 mm remote control socket.

2. Turn on the camera.

3. Ensure that the camera's "Auto Power Off" function is disabled.

4. Frame and focus on the subject.

5. Slide the Auto Focus (AF) switch on the camera lens to Manual Focus (MF).

6. Turn off the camera's LCD display to save power.

7. Turn on the camera timer. The LED will glow RED to indicate "set" mode.

8. Use the button to enter the desired shooting interval in seconds (see "How To" below). The important thing to remember is that the first press of the button means "zero" - so start counting at zero not one!

9. Press and hold the button for 1 second to enter "shoot" mode. The RED LED will extinguish to indicate "shoot" mode. The first photo will be taken immediately upon entering "shoot" mode and at each selected interval thereafter. The LED will briefly glow GREEN when each photograph is taken.

10. When the camera has taken enough shots, upload all the pictures from the camera to a directory on your PC. The easiest way to convert a bunch of JPG pictures into a movie is to use the Linux mencoder program. For example, if your pictures are called xxx.jpg, then to convert a series of portrait shots use:

mencoder "mf://*.jpg" -mf fps=25:type=jpg -o yourmovie.avi -ovc lavc -lavcopts vcodec=mpeg4 -vf scale=720:480,rotate=2

To convert a series of landscape shots use:

mencoder "mf://*.jpg" -mf fps=25:type=jpg -o yourmovie.avi -ovc lavc -lavcopts vcodec=mpeg4 -vf scale=720:480


HOW TO ...

To select a shooting interval of 120 seconds

- Turning on the camera timer causes a high/low beep (means READY)
    The RED light on means "set" mode (i.e. waiting for you to set a shooting interval)
    Now you enter the digits (120) just as you would write them on paper...

- To enter the first digit (1):
    Short button press causes a low beep (means 0) ... think "0"
    Short button press causes a high beep (means +1) ... think "1"
    Waiting for more than 1 second causes a high/low beep (means OK)
    Interval is now 1 second

- To enter the next digit (2):
    Short button press causes a low beep (means 0) ... think "0"
    Short button press causes a high beep (means +1) ... think "1"
    Short button press causes a high beep (means +1) ... think "2"
    Waiting for more than 1 second causes a high/low beep (means OK)
    Interval is now 12 seconds (i.e the "2" is appended to the "1" giving "12")

- To enter the next digit (0):
    Short button press causes a low beep (means 0) ... think "0"
    Waiting for more than 1 second causes a high/low beep (means OK)
    Interval is now 120 seconds (i.e. the "0" is appended to the "12" giving "120")

- To exit "set" mode and enter "shoot" mode:
    Long button press causes a high beep, and the RED light goes off which means "shoot" mode.

To exit "shoot" mode and set a different shooting interval

    Short button press causes a high/low beep (means OK), and RED light on means "set" mode entered.
    Enter a new shooting interval as shown above

To suspend shooting and resume with the same interval later

    Short button press causes a high/low beep (means OK), RED light on means "set" mode entered.
    Wait until you want to resume shooting (finish beer etc)
    Long button press causes a high beep for every second that the button is held down. You can use this audible timing signal to synchronise with your watch in order to resume shooting at a particular time.
    Release button causes no beep, and the RED light goes off meaning "shoot" mode entered.

To use the shooting interval that you last set

- Turning on the camera timer causes a high/low beep (means READY), RED light on means "set" mode

- Long button press causes a high beep, and the RED light goes off meaning "shoot" mode has now been entered using the last set interval. The last interval you set is remembered in the onboard EEPROM across power-ups.


NOTES

- If when setting an interval you overshoot the digit you wanted just keep doing short button presses until you hear a low beep (which means 0) and begin counting each subsequent press until you reach the desired digit.

- If you forget where you are up to when setting an interval, simply turn the camera timer off and on and begin setting the interval again. Alternatively, enter "shoot" mode (long press) and then enter "set" mode again (long press).

- If you attempt to enter "shoot" mode with a shooting interval of 0, you will hear three low beeps to indicate that this is invalid and you will remain in "set" mode (RED light on).

- No attempt is made to validate the interval you enter. For example, if you enter 99999, which is greater than the maximum of 65535, then interval set will be some number between 0 and 65535 - all of which will be accepted but perhaps not what you expected.

- The last shooting interval that you use is remembered in the onboard EEPROM across power-ups, so if you have a favourite shooting interval then you need only set it once.

Step 6: Example Video

I've put example time lapse movies taken with my camera on YouTube...

Clouds at sunset - 4 hours of shots at 15 second intervals.


Candle burning
- 20 minutes of shots at 5 second intervals.

Microcontroller Contest

Participated in the
Microcontroller Contest