Countdown Intervalometer

Revision as of 12:18, April 21, 2014 by Hazelden (Talk | contribs)

588pages on
this wiki

480px|A screengrab of the Countdown Intervalometer in action.

About the Script

Countdown Intervalometer is an easy to use intervalometer script for CHDK. This script should work with most Canon cameras that run CHDK. Special care was taken to avoid using PROPCASE features that would cause compatibility problems with some cameras. This script was created by Andrew Hazelden.

Note: If you want to record longer timelapse sequences with your Canon Powershot camera you should look into getting an external wall power module. It is also possible to buy / make a larger external battery pack that will power your camera for days.


Download the Countdown Intervalometer script:


You can join the discussion on the Countdown Intervalometer script on the developer's Countdown Intervalometer blog page.

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.

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>

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.

If you want to take pictures as fast as possible set the camera to continuous photo mode and set the Interval in Sec parameter to zero.

Countdown Intervalometer Screenshots



Getting Longer Camera Runtime

If you want to run your Canon Powershot camera for a longer duration you can purchase an external power module (Like the Canon ACK-DC 10) for your camera that usually comes in the form of a "dummy battery" that goes in the camera and a wall power supply.

Another option is to insert the Canon Powershot video output cord into the camera's AV port. This will disable the LCD screen and save battery power.

Version History

Version 1.0 - Created Sept 16, 2010.

Version 1.1- Created Sept 19, 2010.

  • Added the perpetual intervalometer mode.

Source Code - counter.bas

rem Countdown Intervalometer v1.1
rem An intervalometer script that will take a specific number of photos.
rem If the Number of Shots is set to zero the intervalometer switches from
rem a countdown intervalometer mode over to a perpetual intervalometer mode
rem that will continue to take photos until your memory card is full or your
rem camera's battery runs out of power.
rem Version 1.1 updated Sept 19, 2010.
rem Added the perpetual intervalometer mode.
rem Version 1.0 Created by Andrew Hazelden on Sept 16, 2010.
rem E-mail:   Blog:
rem To download the latest version check out this blog post:

@title Countdown Intervalometer

rem i is the interval between photos in seconds.
@param i Interval in Sec
@default i 10

rem n is the number of shots to take.
@param n Number of Shots
@default n 99

rem e is elapsed photos taken.

rem r is the number of shots remaining.

rem get timelapse start time in ms

rem q is photo time elapsed temp counter in ms
rem v is actual time per photo in ms

rem check for perpetual photo mode if Number of Shots equals zero.
if n=0 then gosub "perpetual"
if n>0 then gosub "countdown"

rem get end time using

rem calculate total timelapse duration
p = (x-z)/1000

rem print total timelapse duration

rem s is seconds elapsed

rem m is minutes elapsed

rem h is hours elapsed

print "Sequence Complete."
print e, "Shots Taken in:"
print h;":";m;":";s, "HH:MM:SS"

rem time remaining subroutine

rem s is seconds remaining

rem m is minutes remaining

rem h is hours remaining

print "Est. Time Remaining:"
print h;":";m;":";s, "HH:MM:SS"


rem perpertual intervalometer mode

rem run the while loop forever.
while 1
	rem increase elapsed photo counter
	print "Shot:", e
	rem interval between photos delay
	sleep i*1000


rem countdown intervalometer mode

rem run the while loop until there are no shots remaining.
while r
	rem get the start time for this shot
    q = get_tick_count
	rem increase elapsed photo counter
	rem decrease shots remaining counter
	print "Shot:", e, " of ", n 
	rem If we are beyond the 1st shot call the "remaining" subroutine
	rem to display the time remaining.
	if e>1 then gosub "remaining"
	rem interval between photos delay
	if r>0 then sleep i*1000
	rem calculate time between photos in ms


Around Wikia's network

Random Wiki