My camera

#7 Supercharge your Field Camera with CHDK

Digital Single Lens Reflex (DSLR) cameras have loads of features that make it easier to take great photographs like the ability to take RAW images, use intervalometers, or take bracketed shots. The price and size of DSLRs, however, make them somewhat impractable for every field crew to carry one on every project. Instead, companies often send crews out with cheap and easily replaceable point and shoot cameras. Point and shoot cameras with some DLSR features are available, but are more expensive. Few companies are probably willing to pony up for an expensive point and shoot when the dust, weather, and grimy/slippery fingers combo on survey and excavation projects tends to destroy a lot of field cameras. I usually discover this when I go to turn on the camera and find that the shutter refuses to open and the lens extends at a 30 degree angle.


Picture of a broken point and shoot camera.
Figure 1. A broken lens, a typical kind of field damage. Picture from flickr user tanakawho.

Do you ever wish that you could supercharge your field camera with some of these advanced features? It turns out that if your camera is a Canon, you can. Let me introduce you to the Canon Hack Development Kit (CHDK). CHDK is a custom firmware (software that runs embedded on a device, think of the software in a car GPS or in a WiFi router) that can unlock these kinds of advanced features, as well as give you a way to program your camera using scripts to add your own custom features.

Installing CHDK

This tutorial shows how to install CHDK via the firmware update method. While the firmware update method is great for trying out CHDK, you will have to repeat Step #4 every time you turn the camera on to reload CHDK. If you would like to automatically load CHDK every time you turn on your camera, read here to find out how to install CHDK via the bootable SD Card method.

1. Figure out which firmware version your camera currently runs.

a. To do this, create a “ver.req” file and place the file on the root directory of your camera’s SD memory card.

i. Either plug your camera into a computer via USB or pop the SD card into a card reader that connects to your computer.

ii. Navigate to the root directory of the SD card using your file browser.

1. In Windows

a. Right-click anywhere in the file browser window and select “create new text file.”

2. In OSX

a. Create a new, blank text file using the textedit editor program.

b. Rename the file “ver.req”

i. Be sure the file is not named “ver.req.txt.”

b. Disconnect the camera or place the SD card back inside

Underside of camera, showing the SD card slot.
Figure 2. The SD card slot on my camera is located on the underside.

c. Start up your camera in “view/play” mode

i. Either start the camera by pressing the blue arrow icon button, or move the selector switch to the blue play icon and then press the “ON/OFF” button

The "PLAY/SHOOT" Toggle Switch
Figure 3. The switch to toggle between the “SHOOT” and “PLAY” modes. Your camera may have a similar switch or a “PLAY” button.

d. Hold down the “FUNC./SET” and “DISP” buttons

The FUNC/SET and DISP buttons
Figure 4. The “FUNC./SET” and “DISP.” buttons. Press these together to check you firmware version.

i. Some text showing camera information should appear on your screen; copy this down into a text file or onto a piece of paper

1. Your firmware version number should be in the following format “GM1.XXY.”

a. My camera, a Canon PowerShot A590IS, runs the GM1.00E firmware.

 My camera
Figure 5 . My camera, a Canon Powershot A590 IS.

2. Now that you know which firmware your camera runs, go to the CHDK download page and find the version of the CHDK software that matches both your camera model and the current firmware. For this tutorial, download the “complete” version of the stable 1.2.0 build that’s appropriate for your camera model and firmware.

3. Once you have downloaded the software, extract the zip file to the root directory of your SD card.

a. Connect your camera back via USB or eject the SD card from the camera and place it back into an SD card reader connected to your computer.

4. To load and run CHDK, make sure your camera is in “PLAY” mode, and turn the camera on.

a. Press the “MENU” button, then up until you see the option “Firm Update…”

The "Firm Update..." option.
Figure 6. The “Firm Update…” option.

b. Select the option “Firm Update…”

i. Use the “FUNC./SET” button to select “OK” and install CHDK.

Select "OK" to install CHDK.
Figure 7. Select “OK” to install CHDK.

ii. If successful you should see a brief CHDK splash logo appear.

The CHDK splash icon.
Figure 8. The CHDK splash icon should appear after a successful installation.

1. Now switch to the “SHOOT” mode by toggling the switch away from “PLAY” on the back of the camera  or hitting the shutter button.

5. Congratulations! You have just installed CHDK!

Using CHDK

The hard work of installing CHDK is done. Now you can start playing with the new features or even begin programming your own custom scripts to add even more features.

1. To access the CHDK menu, press the “ALT” button.

The "ALT" button
Figure 9. The “ALT” button on my camera. Your camera may vary, but the “ALT” button is usually the one with the blue “print” icon above it.

a. If pressing “ALT” doesn’t make the CHDK menu appear, remember that, unless you installed CHDK using the bootable SD card method, you will have to repeat Step #4 of the installing CHDK process to load CHDK if you recently turned off your camera.

b. If you press “ALT” once, it will show the currently selected script

i. To enable the script, such as the intervalometer script, press the shutter button fully once

ii. Press the shutter button fully again to end a script running.

c. Press “ALT” then “MENU” to access the CHDK menu.

The CHDK Menu
Figure 10 . The CHDK menu appears when you press “ALT” + “MENU.”

i. Here you enable the camera settings, change video recording parameters, enable RAW image capture, enable edge overlay mode (so you can see an outline of your previous shot so you can create more seamless panoramic shots), enable “Zebra” lines so you can see which areas of the image are under/overexposed, and the script menu, where you can pick from a number of useful preloaded scripts or import your own.

2. For now, select the “Script (program your camera)” menu option.

Select the "Script" menu option
Figure 11 . Select the “Script” menu option.

a. Select “Load Script from File…”

"Load Script from File..."
Figure 12 . Choose the “Load Script from File…” option.

i. The default folder for CHDK scripts is “A\CHDK\SCRIPTS”

ii. CHDK comes with a number of preloaded scripts, some examples are:

1. HDR

a. High dynamic range

2. Interval

a. Intervalometer

3. Motion

a. Motion detection

4. Shoot

a. Timer delayed single shot

5. You can do basic script editing by running the EDI.lua script in the “editor/edi.lua” directory.

a. You can enter characters and modify variables using the arrow keys, but this is much easier to do with a text editor on a computer.

b. For now, highlight “Interval.bas” or “Interval.lua” and use the “FUNC./SET” button to select it.

Default CHDK scripts
Figure 13 . Examples of the default CHDK scripts.

3. Now back in the Script menu, you should see a new section called “Intervalometer” at the bottom.

a. Use the arrow keys to set any number of seconds next to the “= interval (sec)” text.

i. For now, choose “3.”

ii. Press the “Menu” key to exit the menu.

Set the interval  for 3 seconds.
Figure 14 . Set the interval for 3 seconds.

b. You should see the text “Intervalometer” at the bottom left of the screen.

Display shows currently selected script
Figure 15 . The name of the currently selected script is highlighted in blue.

i. If not press the “ALT” key once

ii. Hit the shutter button to start running the script

1. The camera will now take a picture every 3 seconds (or whatever value you chose) until the shutter button is depressed again to end the script.

4. Now that you know how to run scripts in CHDK, experiment with a few more scripts, like Motion Detection, or Shoot, which takes a single picture after a specified time delay. I particularly like Shoot as I find it way easier to use for group shots than the built in 15 second timer.

a. You can download more scripts from the CHDK scripting forum, as well as learn how to create your own scripts in this tutorial.

5. Don’t forget to experiment with the other CHDK settings, like RAW/DNG (digital negative) capture or zebra lines to begin taking more advanced and better field photos.

a. See more about these and other features in the CHDK manual.

6. While there isn’t a version of CHDK for Digital Single Lens Reflex (SLR) cameras, there is a similar custom firmware project called “Magic Lantern” that can also add some new features to the Canon 5D Mark II, 550D/T2i cameras that you can read more about on the Magic Lantern Wiki.

As always, please leave any comments using the form below. Happy shooting!

Leave a Reply

Your email address will not be published. Required fields are marked *

8 − six =