Shopping Cart (0)

uBASIC Countdown Intervalometer Script for Canon Powershots Running CHDK

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.

Script Download

The intervalometer script can be downloaded here:



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:

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.

  1. 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. 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. Hi B.
    To turn off RAW, open the CHDK ALT menu. Then select the Raw Parameters menu. Disable the Save RAW item.

  4. 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.


  5. 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. 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. 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. 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. 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.

    Andrew Hazelden

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

  10. 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.


  11. 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.

  12. 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?



  13. 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.

  14. 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


  15. 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.

  16. Hello, great tut.

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

    Thank you.

  17. 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

  18. 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.

  19. 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!

  20. 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….

    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!

  21. 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.

  22. 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?

  23. 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

  24. 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.

  25. 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.

  26. Any news on updates to CHDK especially the intervalometer? How often to you post your blog? I think I subscribe to it.

    Fall cheers from Gabriola Island


  27. Hi Dave.

    There are a few different ways you could handle closing the camera. One idea would be to tie into the intervalometer’s counter variable and use a script command to have the camera power down when a specific number of photos have been taken. This could be done by editing the counter.bas script and inserting the UBASIC command “shut_down” at line 69 just before the “end” command is run.

    The other option would be to tie into the CHDK USB remote trigger system (possibly with an external accessory like a Gentles brand ( ) RC PPM controlled switch accessory and modify the intervalometer script so the USB trigger acts as a signal to turn off the camera.

    You could look at the UBASIC wiki ( ) for tips on checking for USB power triggers such as the “get_usb_power” command.

    As far as battery life goes, your Canon Powershot camera should be able to take 600+ photos with a single battery charge. The best way to disable the screen is to plug an external video connector into a Powershot. That said, turning off the display doesn’t usually save that much power if you are still taking photos regularly. How long does your battery last?

    One solution to battery life problems would be to buy an ACK-DC40 wall power kit for your SX280 camera and use the dummy battery module to externally power the camera off a single cell 3.7 volt “electric model airplane” style LiPo battery. You can literally power the camera for days if you wanted by running off an array of external LiPo batteries that are wired in parallel to provide 3.7 volt output to the camera.


  28. Hi Paul.

    Are there specific features you would like to see added to the intervalometer script?

    I usually write about 3-5 blog posts a month. Lately they have been on computer graphics and electronics. There haven’t been a lot of CHDK related posts in a while simply due to the fact I haven’t been out flying model airplanes or creating Canon Powershot based timelapses this summer.

    My latest “camera modding” project has been to tie into Canon DSLRs by electrically wiring a microcontroller into a Canon DSLR battery grip so I have full control over the trigger and shutter speed controls. I hope to write a blog post on this project soon as it has been useful at creating fully spherical 360×180 degree HDRI based panoramas.

  29. Hello,
    I am getting the new canon sx60 today!
    Do you know if your timelapse script will work?
    I assume it will, if it works in sx50.

  30. Great script. I have been using it on an old SD200 and it works…most of the time. The one issue I noticed is if I set an interval of 60 seconds or longer, then the camera will hang/freeze after 10 to 20 shots. Also, after running the script a few times, the OSD for the script only appears when the picture is taken – not visible while waiting for next image. Do you think these are camera specific, or could there be some conflicts with CHDK settings or native Canon settings?

  31. Hi Steve.
    Part of the delay with long exposures could be related to an internal dark noise subtraction feature kicking in on the camera. It’s kind of hard to know without having experience with that exact model of Powershot camera.

    As far as settings go, do you have review mode turned OFF in the native canon camera settings? That is usually a good thing to do if you are taking a series of pictures as it makes for more accurate timing in the intervalometer.

  32. Thanks Andrew,
    I think the freezing/hanging was from the native Canon power saving settings. After disabling them, it does not seem to hang any more.
    I’ve played with the review mode settings but that does not seem to change anything with the OSD readout generated by your intervalometer script. I will keep exploring…

Comments are closed.