uBASIC Countdown Intervalometer Script for Canon Powershots Running CHDK

By , September 19, 2010 5:47 am

Several years ago I wrote a few simple intervalometer scripts for my old Canon Powershot SD400 cameras to record time-lapses. The scripts were very simple and worked reliably.

Recently, I started the process of making a script that is more powerful and feature packed. The latest time-lapse script version I call the Countdown Intervalometer because it lets you control the interval between shots, the total number of shots taken, and counts down to completion. As the script runs it will give you an estimated time remaining that is updated after every photo is taken. If you want to take perpetual photos, you can do that by setting the number of shots to zero and the script will run until your memory card is full.

The new script should work with most Canon cameras that can run CHDK - Canon Hack Development Kit. I am currently using a Canon Powershot SD780IS camera (also known as the IXUS 100 IS ) with CHDK and have had a blast making time-lapses. If you have enough memory space you can also capture CHDK RAW formatted DNG images with this intervalometer script too.

The intervalometer script can be downloaded here:

CHDK_Countdown_Intervalometer.zip

CHDK Menu

CHDK Menu

Steps to Load the Script

  1. Copy the file counter.bas to your CHDK/SCRIPTS folder on your SD memory card.

  2. Turn on your camera.

  3. Load up the CHDK menu and then select "Scripting parameters".

  4. In the Script Menu open the uBASIC script counter.bas by selecting "Load script from file...".

  5. Set the parameters for your time-lapse in the script menu. **Make sure the option "Save params" is enabled so CHDK will remember your settings when you restart your camera.

  6. Close the CHDK menus. With ALT mode active press the shutter button to start running the script. After the first photo is taken, the estimated time remaining will be displayed.

  7. To stop running the script press the shutter button again then turn off ALT mode.

When the script finishes you will see the following printed on the display:

Sequence Completed
10 Shots Taken in:
00:01:07 HH:MM:SS
*** FINISHED ***
Countdown Intervalometer>

CHDK Script Menu

CHDK Script Menu

In the CHDK Script menu there are two parameters you can change. The first is Interval in Sec and the second is Number of Shots. If you want to take pictures forever, or until your memory card is full set Number of Shots to zero.

Make sure the "Save params" option is enabled in the Script Parameters window. This option has to be turned on to remember the Countdown Intervalometer settings between camera reboots.

You can save your own intervalometer presets using the "Parameters set" feature in the Script Parameters window. This feature will allow you to save and recall previous Interval in Sec and Number of Shots settings. To move between the different parameter sets press the left / right navigation buttons on your camera.

If you are planning on recording a long duration time-lapse sequence you may find the Canon Powershot Accessory ACK-DC10 interesting. It is an AC power adapter that powers the camera. The way it works is that you install what looks like a dummy battery in your camera. This dummy battery module has a female barrel connector. You then plug in a male barrel connector from the wall power supply into the dummy battery through the flap in your camera battery door. Canon makes a variety of different wall power adapters for different Powershot Cameras. Stay away from the eBay clones of the ACK-DC10 as they are really low quality and the dummy battery module can have the internal barrel connector break off very easily!

 

Canon ACK-DC10 AC Adapter

 

B&H Photo sells the Canon ACK-DC10 AC Adapter for $51. USD

Amazon sells the Canon ACK-DC10 AC Adapter for $52. USD

Countdown Intervalometer

Countdown Intervalometer in action

Canon Powershot camera recording a time-lapse using the ACK-DC10 AC Adapter

Canon Powershot camera recording a time-lapse using the ACK-DC10 AC Adapter

LCD Monitor previewing the live video output from the camera.

LCD Monitor previewing the live video output from the camera.

If I am going to be recording a long duration time-lapse I like to use the live video output from the camera to watch what is going on. It is possible to use either the Mini-HDMI or analog composite video signals. In this case I used the composite video output cable and connected it to an easycap dc60+ usb video digitizer on my Mac and ran a QuickTime video recorder program to record the live preview.

After you have completed filming your time-lapse and the photos have transferred to your desktop computer you can then make an image sequence out of them.  You can do this in a video editing program or a compositing package like Adobe After Effects. Since the camera takes really high resolution photos you may also find that adding a slow zoom or pan in a compositing package can make the footage more interesting. There is enough detail in the photos to make a really crisp 1080p resolution video from your time-lapses.

There are plug-ins for compositing packages that can remove flicker from time-lapse sequences. The flicker is caused by the auto exposure feature when the brightness changes between photos. This can happen when filming on partially cloudy days. There are a few paid and freeware plug-ins / utilities that do a high quality job. An expensive but high quality plug-in is called GenArts Sapphire.  The plug-in reseller, Tool Farm, has a list of a few other flicker removing plug-ins. Another option, to avoid flicker, is to lock in a fixed shutter setting by using CHDK Shutter Speed Overrides. I have written a previous article about how to change CHDK Shutter Speed Overrides.

For someone who wants an extremely simple set of scripts, in 2008 I wrote two simple CHDK time-lapse scripts that will run until your memory card is full or the battery runs out of power. timed.bas allows you to set the delay between photos in seconds. rapid.bas allows you to take photos quickly in rapid succession. rapid.bas works best on photos in single shot mode.

The older scripts are available here: CHDK_intervalometer_scripts.zip

User Generated Timelapse Movies

Here are a few links to time-lapse clips that I created using the countdown intervalometer script:

Interesting projects created by other artists using the Countdown Intervalometer script:

Note: If you have created your own time-lapse video using the Countdown Intervalometer script I invite you to send me a link to the video clip so I can add it to this page.

Print Friendly

flattr this!

36 Responses to “uBASIC Countdown Intervalometer Script for Canon Powershots Running CHDK”

  1. arlene says:

    Thanks Andrew
    I was going mad trying to find a script that worked with my IXUS 800 IS.
    Yours is the first.
    We are building a "mail-order" pool over Christmas break, and I wanted to record the progress.
    We will be shooting 1 picture/minute over 10 hours/day. I ordered an AC adapter and a large card.
    Yours is also the first post I've found that shows the options in picture form. Most of the directions given are cryptic and aimed at people who work with programming regularly.
    Thank you for taking the time to share your experience....

  2. B says:

    I'm using this script and it's working out well so far, but it's taking Raw photos and I don't need any Raw photos. I have it set to take a shot every 899 seconds, but for some reason it's taking a raw about twice a minute and filling up my memory card too quickly. Can't figure out how to disable this. Help? Thanks!

  3. Andrew says:

    Hi B.
    To turn off RAW, open the CHDK ALT menu. Then select the Raw Parameters menu. Disable the Save RAW item.

  4. Peter says:

    Hi Andrew,

    Thanks for the script and for the really generous detailed documentation!

    I am setting up a time lapse so I can document a very slow moving kinetic sculpture I made.

    It is working very well, set to take take one pic every 378 seconds. However, I'm noticing it takes 2 pictures, with the 2nd happening about 10 to 15 seconds after the first.

    No big deal, but it eats up the memory twice as fast, and I'd like to figure out what is going on. Ever seen anything like this?

    I'm using a SD780IS with the latest CHDK build. I am using a cheap E-bay power supply (ordered it before I read your advice). Perhaps it is noisy and contributes?

    I am also quite new to CHDK and could very well be overlooking some setting or other.

    Once again, thanks for the great documentation, with pictures and everything! It is very helpful and much appreciated.

    -Peter

  5. jonny says:

    Hi, Great bit of script. Many thanks for your time to make it. I do have one question though.... Is there a way of saving the settings when changing the parameters? For instance I wish to take a shot every 300 seconds and I need someone else to set up the camera for me. At the moment, every time the camera is turned on/off, the default values come up which unfortunaly are a problem...? Your thoughts?

    Cheers again!!

  6. Andrew says:

    Hi Peter.

    A possible cause for the 2nd picture could be if the Canon custom timer feature is enabled. Does the status counter text "Shot: 1 of 99" update when the 2nd picture is taken 10 seconds after the initial timer goes off?

  7. Andrew says:

    Jonny,

    It sounds like you need to enable the "Save params" option in the CHDK Scripting Window menu. This will save the settings you set for the current script and remember them between power on/off cycles.

    Also you may find the "Parameters set" useful in the Scripting window as it allows you to store multiple presets for intervals and numbers of shots. You can switch between parameter sets by hitting the right / left cursor buttons.

  8. Isaac says:

    Thank you so much, this is an awesome resource.
    I'm doing a time-lapse of the build out for my friends new taco restaurant.
    If you ever come to San Francisco- tacos are on the house!

  9. Andrew says:

    Hi Isaac.

    Thanks for your feedback.

    I'm happy to hear people are using my CHDK Countdown Intervalometer Script to create time-lapses. Would it be possible for you to send me a link to your time-lapse video when the construction project is finished? I am interested in showcasing time-lapses created by people with the Countdown Intervalometer Script on the main blog page.

    Regards,
    Andrew Hazelden

    P.S. What is the name of the new taco restaurant?

  10. [...] flying at 35 kilometers per hour. I used a Canon Powershot SD780IS camera with CHDK and the countdown intervalometer script to trigger the photos. A set of three vertical aerial photos taken with an [...]

  11. [...] with an EasyStar Model airplane using a Canon PowerShot SD780IS camera and CHDK. I used the CHDK countdown intervalometer script to trigger the photos every 2 seconds with a 1/1500 sec shutter speed [...]

  12. [...] used the CHDK Countdown intervalometer script to take the photos. To manually control the exposure I used a CHDK shutter speed override with a [...]

  13. Donald says:

    Hi,

    I have Canon A 470. I have put CHDK on the SD card, and also the newer intervalometer on as well. I have gone down the menu and firmware now appears and clicked to allow it to update, which it did. I do not get a CHDK menu though, can you help please. I am new to this and appreciate your program and your help.

    Regards,
    Don

  14. Andrew says:

    Hi Donald.

    When you download the CHDK firmware there is a readme.txt file that provides CHDK instructions for your specific camera model. Here is a snippet from the readme.txt file for your camera:

    - To enter CHDK's alternate menu system, press your "Shortcut" button. A small "" will appear at the bottom of your screen. Whenever is showing you may now press your camera's "Menu" button to enter CHDK's new menus. To exit mode and return to your camera's normal operation just press your "Shortcut" button again. The settings that you apply in CHDK's menus will now be applied when using the camera normally (while not in mode). The only time you will use mode for actually taking pictures is if you run an automated CHDK script to take your photos for you. If you want to use your "Shortcut" button's normal function just press and hold it down a little longer. Some cameras allow you to reconfigure your CHDK "" toggle button in the CHDK "Miscellaneous Stuff" menu in case you don't like it being the "Shortcut" button.

    - If you would like to have CHDK auto-load every time you power on your camera, then go into CHDK's menu system. (Press "Shortcut" to enter mode, then your "Menu" button to enter CHDK's menus.) Scroll to the bottom of the main CHDK menu to the "Debug Parameters" option.

    - Enter the "Debug" menu and scroll to "Make Card Bootable...". Press your "Set" button.

    - Now remove your SD card and slide its little "write protect" tab to the locked position. Insert the card back in your camera. Now when you power-up your camera CHDK will automatically load. If you want to turn off CHDK's auto-loading feature just take out the SD card and put the write-protect tab back to the unlocked position. Don't worry about using the card either way. CHDK is designed to work with a locked card in this manner and all photos taken will be written to the card even when it is locked/write-protected.

  15. Donald Winding says:

    Thanks so much! It works!
    Regards,
    Don

  16. [...] sequence was shot at dusk using a Canon Powershot SD780IS camera with CHDK and the Countdown Intervalometer [...]

  17. [...] shoots grow each day! It was recorded using CHDK on a Canon Powershot SD780IS Camera with the Countdown Intervalometer script and a Canon ACK-DC10 AC wall power [...]

  18. [...] To capture the time-lapse sequence a Canon Powershot SD780IS camera was used with CHDK and the Countdown Intervalometer script. The audio track was recorded [...]

  19. [...] Canon Powershot cameras running CHDK. When shooting high resolution photos I use my own custom uBasic countdown intervalometer script to take photos continuously during the flight. I've experimented with forward-looking, side [...]

  20. Paul Thompson says:

    Hi Andrew

    Thanks for the intervalometer script. I have loaded it into my Canon S3Is but no matter how low I set the INTERVAL it seems to take about 7sec between shots. Can I fix this?

    Thanks

    Paul

  21. Andrew Hazelden says:

    Hi Paul.

    My guess is you have the image review mode enabled in the Canon Menu. Try disabling that option and set the "Interval in Sec" to zero.

  22. Paul Thompson says:

    You're right! I turned off camera review and the script works beautifully! Thanks again for the script--and the help. Now as an elder newbie I can start timelapsing, one of the things I wanted to do with CHDK.
    I also want to do HDR; that'll be next.

    Many thanks

    Paul

  23. [...] Today was a great day for a model airplane flight above Indian Harbour, Nova Scotia. The photos were taken using an EasyStar model airplane + a Canon Powershot camera using CHDK and the uBASIC Countdown Intervalometer script. [...]

  24. Jon says:

    Thanks for the informative site and the script does work brilliantly with my sx230 HD. I will do a few tweaks to the code later to get the timing just right for this camera but a big thank you.

  25. Yoda says:

    Hello, great tut.

    Tell me is there application for Windows/Linux to see camera? Also to save images direct to computer?

    Thank you.

  26. Andrew Hazelden says:

    Hi Yoda.

    You might find the CHDK PTP desktop program useful for controlling your CHDK camera using USB from Windows and Linux:

    CHDK Wiki PTP Extension

    CHDK Forums - PTP Interface

    mweerden.net PTP page

  27. Dan says:

    Hi,
    I just figured out that CHDK exists for my S95, so cool. I've tried your code and it words really nice. I've tried a few long shoots but the battery died. Do you by chance have code that would turn off the LCD after a little bit to save battery life?
    RE: CHDK Countdown Intervalometer

  28. Andrew Hazelden says:

    Hi Dan.

    While it is possible to modify the script to turn OFF the camera's LCD screen backlight after each photo you will get the best results by inserting the AV plug into your camera. The camera detects the presence of the AV jack and will totally disable the electronics used to drive the LCD screen, and save more power than just disabling the LCD backlight.

    If you want to explore longer duration timelapses an external power supply is something you would would do well to get. The external power supply for your camera is called a Canon ACK-DC40 AC Adapter Kit. The module is available from Canon, Amazon, ebay, and at stores like Adorama.

  29. Dan says:

    Andrew - Thanks for the reply!

    I've plugged in my AV cable as you suggested and started a time test. If that works out and extends the battery life significantly, then my two batteries maybe all I need. (I'm primarily interested in the power for time-lapse night sky photography. I did some while in Hawaii last year and was pleasantly surprised. With your CHDK code and the AV cable I may be good.) If you are interested, I can update this note with the results from my testings. Thanks Again!

  30. Dan says:

    Hi - I tested with both my fully charged batteries and it maybe added 15 minutes of battery life (over the previous 2 hour life). Strange, I would have expected a lot more. I guess the display mA drain is substantially less in comparison to the processing, shutter, etc. I guess I'll try the power adapter....

    https://vimeo.com/ivanovichfilms/videos
    The night shots (where you see stars) were taken with my S95. I set it for to take the most (10 shots) pictures using the timer. Since it was dark, it took like a minute to process each picture before taking the next. So every 10 minutes I carefully press the shutter again to get 10 more pictures. I was surprised how well they turned out. Now with CHDK it will run unattended!

  31. Doug says:

    Hi, I have a canon sd400 with CHDK installed. I have installed a a few different Intervalometer scripts and have a problem with the camera not actually taking or saving the pic. I currently have your Intervalometer installed with the same problem. The counter says it is taking pics, but none are saved. I dont think it is actually taking a pic, it makes a different noise when a pic isn't taken. the normal shutter sound is heard when it is working right. Thanks for any help.

  32. Andrew Hazelden says:

    Hi Doug.

    There is a chance you might have enabled the RAW image saving mode (and possibly dark frame subtraction too) in CHDK and that could be why your camera isn't saving any image.

    Try opening the CHDK "alt" menus. Then open the RAW Parameters menu. Was the "Save RAW" option enabled?

  33. Doug says:

    Thanks Andrew, the "Save RAW" was enabled. It works!

  34. Doug says:

    Hi, I finally got the script working with a portable dc power supply for time lapse shots. I only have a 1 gb card, any idea on how large sd card I can use in the powershot sd400? I have a micro 4gb in a adapter but it wouldn't work. Don't know if 4gb is too big, or using the adapter was the problem. I have a 32gb SDHC, that didn't work either. I'm hoping at least a 2gb will work, but don't have one yet. Thanks

  35. Andrew Hazelden says:

    In the past I always used a 2GB SD card with my Canon SD400 camera. I don't believe the SD400 can handle SDHC memory cards.

  36. Dave says:

    Hi Andrew, I have an SX280 (1.02c) and want the Timelapse for aerial Quad shooting (looking down).
    I tested your time-lapse, but need to close the camera after shooting (before landing).
    I also used the kap-uav script (in the CHDK forum) - but I have a problem with the Battery time life.
    What are the best setting in order to save maximum Battery life ? or any other suggestions.
    Dave

Leave a Reply

Note: Comments will have spelling errors corrected before they are posted. If you have a specific question please provide your email address so I can send you a direct reply.