This is my first instructable, hope it goes well.
In This a tutorial for an Intervalometer for Canon DSLRs. In this Instructable you can build your own Intervalometer. Here with this design you can choose from Hours to Seconds in the range of 999 : 999 : 999 (H : M : S), and It will start clicking at intervals you set. This is a simple and yet easy to make, and yes this is accurate.
For connecting it to the camera I have used an 3.5mm Audio Cable (M2M), and to the camera I connected it through 2.5mm(F2M) converter. There are couple of LEDs to Indicate Actions like power on(red) and clicks(blue). You could use direct 2.5mm Aux Cable (M2M). I used an ATmega8 microcontroller, So you must have an AVR ISP programmer to download the HEX file to the ATmega8, OR you could use Arduino as an ISP to program your ATmega8.
If you have not worked on AVR before, then start from step 1. Otherwise you can avoid these steps and jump direclty to step 4 (prototyping step).
It is interfaced with an 16x2 LCD and 4 buttons. It is simple and easy to use. So arrange for the list of materials mentioned below,
List of Components:
1. ATmega8(28 pin) (ATMega8 Base Reqd) - 1
2. 4 MHz Crystal Oscillator - 1
3. 16x2 LCD - 1
4. Push Buttons (1 small, 4 large) - 5
5. Switch(small) - 1
6. 3.5/2.5 mm Jack(F) - 1
7. 3.5/2.5mm Aux Cable(M2M) - 1
NOTE: (3.5(F) to 2.5(M) mm connector is reqd if 3.5 mm cable jack is used) - 1
8. LM7805 Regulator - 1
1.5/2K or (5K Trimmer / POT) - 1
10K - 1
1uF/10uF - 1
22pF - 2
14. Connecting Wires
15. General PCB
16. AVR ISP programmer / Arduino as ISP.
Let's Start !!
Step 1: Basic AVR Setup
First lets right a program for an LED blinking.
(Follow the Schematic in Pics.)
1. AVR Studio 4 & WinAvr --> http://mycomsats.com/blogs/download-atmel-avr-studio-4-free/
2. Latest AVR Studio --> http://www.atmel.in/tools/ATMELSTUDIO.aspx
I am using AVR studio 4.
After opening the software,
Close the project wizard. goto project and select new project, project wizard opens again.
1. Select AVR GCC, Type in your Project name & give a name to the .c file, then Click Next.
2. Select Avr Simulator and look for ATmega8 and select, then click on finish.
3. Now we can Start programming.
4. Now save, Add all header files if not added. Then Right Click on ledblink.c and select compile or use alt + F7.
5. Rectify if any errors, you may ignore any warnings. Now Right Click on ledblink.c and select build or use F7.
6. If Success, you'll get 0 errors, Warnings if any.
7. Now Click on Play or goto Debug->Start Debugging.
at PORTB Register.
Now to download the program to the microcontroller.
1. If you are using AVR ISP ->
Download Khazama AVR Programmer - > http://khazama.com/project/programmer/
Open HEX file in Khazama -> Auto Program.
(Just "Auto Program" after you select HEX FILE, No need to SET any bits for ATmega8)
- > If you choose any AVR ISP programmer, you must get a guide with it just follow it.
- > http://arduino.cc/en/Tutorial/ArduinoISP
(easy to understand) - > http://arduino.cc/en/Tutorial/ArduinoToBreadboard
(HEX file can be found in your project folder->Default folder->LEDblink.hex)
connect these pins, its this simple.
3. After Successful programming you must see the LED Blinking.
Congrats !! You have completed Step1.
Step 2: LCD Interfacing
I have defined a header file called mylcd.h for usage. You can download it.
-> Image ->
The LCD that I have used JHD 162A, Its a 16x2 LCD.
Test with the sample code & follow the mylcd header files. It has function to write data to LCD.
Don't foget to include header file in project.
Congrats ! You just completed step2.
Step 3: Button Detection Programming
Have a look at the schematic first. - > http://imageshack.us/photo/my-images/841/4kf1.jpg...
Logic to Detect.
1. First set DDR register to input. i.e., '0', Eg DDRB = 0x0F;
// First 4 pins (1111 -> F) are set as output pins.
// The remaining pins (0000 -> 0) are set as input pins.
2. To read a key/button, we first need to set the input pins to High and then pull it to low by connecting the other end of key/button to ground. So when ever a key is pressed, It gets connected to ground. The voltage across that particular pin goes from +5v to 0v. This change in voltage detects the key press.
7 6 5 4 3 2 1 0
1 1 1 1 0 0 0 0 - > F0 in hexadecimal
PB.0 = 0, O/P pin PB.5 = 1, I/P Pin
PB.1= 0, O/P pin PB.6 = 1, I/P Pin
PB.2= 0, O/P pin PB.7 = 1, I/P Pin
PB.3= 0, O/P pin PB.8 = 1, I/P Pin
DDRB = 0x0F; //Lower Higher 4pins(0000) are directed as input pins.
PORTB = 0xFF; //Setting Input pins as high to detect a key press.
I have defined this as an header file in my program.
mybutton.h -> https://docs.google.com/document/d/1MLIU19IGr1liBq...
Congrats ! You Completed step3, Now lets prototype and build it.
Step 4: Prototyping on Bread Board
Codes Download Link:
Download the entire RAR file. It contains the code, all required header files and complete HEX file. This project is ready to Burn on your AVR.
If you choose to start right from scratch, then you better include all header files that is included in this project.
It has been tested and works 100% Accurate.
Take a look at the snaps for any references, I have encased it in a small box to get the feel of a remote.
All The Best ! Do build it. Start with TimeLapse.
i.e., For a 24fps Video you will set 5s interval and click 24 pics, For a 30fps Video you will take 30 pics. (Time Consumed will be 24 pics * 5s = 120 Seconds or 30 pics * 5s = 150 Seconds )
* For TL of 10s ->> (if interval = 5s), PICS =24*10 or 30*10 = 240 or 300 pics, (at 24fps or 30fps respectively)
i.e., For a 24fps Video you will to set 10s interval and click 240 pics, For a 30fps Video you will take 300 pics. (Time Consumed will be 240 pics* 5s = 1200 seconds or 300 pics *5s = 1500 Seconds )
* For TL of 1min ->>(if interval = 5s), PICS = 24*60 or 30*60 = 1440 or 1800 pics, (at 24fps or 30fps respectively)
i.e., For a 24fps Video you will to set 10s interval and click 1440 pics, For a 30fps Video you will take 1800 pics. (Time Consumed will be 1440 pics * 5s = 7200 seconds or 1800 pics * 5s = 9000 Seconds )
Time Consumption (s) = 24 * (Video Duration Reqd ()) * (Interval Set in s), Applies to min and hrs also.
At 30 fps, pics to be clicked, PICS = 30 * (Video Duration Reqd(s)), Applies to min and hrs also.
Time Consumption(s) = 30 * (Video Duration Reqd(s)) * (Interval Set in s), Applies to min and hrs also.