Green Island
Some views from the ground
of rectreation zone
'Green Island'
KAP Wind Maps
Web-Map-based project
for local win measurement
www.RoboHobby.com
How to use photo camera Canon A570 IS
with CHDK
for KAP (Kite Aerial Photography)
Detailed Illustrated Guide for Beginers
Recently we bought small digital camera Canon A570 IS.
Yes, I know this is not the latest model, but:
1) it is small, not heavy (160gr)
That means it is easy to take-off such a light-weight camera using not too big kite
2) it is cheap (something about 110- 150 USD).
That means your sorrow will not be so deep in case of possible crash.
3) it is compact, it is easy to put it in your rucksack
Most interesting thing is digital processor inside the photo camera.
It looks like there is ARM7 inside there.
And it is possible to update firmware and install non-official software,
which works like alternative operation system - CHDK.
CHDK (Canon Hacker's Development Kit) is a small resident program,
which can add some very funny new features to your Canon camera.
It works for a lot of Canon cameras, in particular it works good with Canon A570IS.
For me the most interesting thing is scripting language,
which allow to program many functions of the camera.
There is timer there and you can program the camera for doing serial shots.
For example - it is possible to do 300 shots with 5 seconds interval.
This make Canon camera with CHDK usable in KAP (kite aerial photography).
In this article I am going to share my experience in this subject - how to download and use CHDK.
How to create good big kite (Flow Form Kite), how to create 'Picavet suspension'
and how to make special container for photo camera from candy box.
It is funny, but removing SD card from this camera looks strange.
This is pretty tricking process for people with firm nails and strong nerve system.
First you should move switch in one direction, then you should move cover
in perpendicular direction. :-)
Then, as usual, you should push SD card (again, using nail) and finally the card kicks out.
See:
Where to get CHDK
I used for my experriments version a570-101a-0.7.4-555.zip
You can download latest version from
http://mighty-hoernsche.de/chdk/
For example, you can use 'allbest-a570-101a-50.zip' .
What is in this zip file?
Usually you can see two files:
- one 'bin' file (DISKBOOT.BIN) and
- one 'fir' file (PS.FIR).
Now it is time to describe the process of putting this firmware update to your camera.
Yes, I know, that there are a lot of user guides about this subject in the Internet,
but for me it was not too easy to find detailed description what and how to do.
There are so many buttons on this camera and you should do so many manipulation
to create and run CHDK scripts, that I decided to create this article just to help other
people to do all these.
That was the reason why I wrote this guide 'for most stupid dummies, like me'
:-) .
Note (!) the order of the steps is important!
0) You should unzip these two files and put them to SD card.
(Usually I use 2Gb SD card)
There should be only two files on your SD card:
DISKBOOT.BIN
PS.FIR
1) It is supposed that your camera is turned off now
:-)
2) Insert this SD card to your Canon A570 IS.
3) Move indicator images/preview (Mode Switch) to position 'images' (move it down)
4) Turn on your camera
5) Press 'Menu' button
6) Using key 'down' go to menu item 'Firmware update'
7) Press OK ('FUNK.SET' button in A570IS)
8) Choose 'Firm Update' and press key 'FUNK.SET'
9) Cofirm your choice, using 'Right' button and then 'FUNK.SET' button
10) You should see for a short time (2 sec) small blue screen with notification
something like: 'new version is installed'
(!) From this moment firmware is created directory system
in your SD card in the Canon.
) Now you can turn off your Canon and remove your SD card from photo camera
and put it to your PCs card reader.
Code examples for KAP in uBASIC programming language:
----------------------
rem www.RoboHobby.com
rem CHDK UBASIC script for Canon A570 IS
rem for Kite Aerial Photography (KAP)
rem Interval shooting
@title www.RoboHobby.com KAP Shooting
@param b Total number of shots
@default b 300
@param c Seconds between shots
@default c 5
t=c*1000
for i=1 to b
sleep t
print "shot #=",i
shoot
next i
end
----------------------
Version with zoom:
This version moves zoom in most wide position.
Script is useful in case if you like to use your zoom and tend to forget to
move it to wide position before KAP.
RoboHobby_Wide.BAS
Also this script shows usage of 'gosub' key word:
-----------------
rem www.RoboHobby.com
rem CHDK UBASIC script for Canon A570 IS
rem for Kite Aerial Photography (KAP)
rem Interval shooting, Zoom=wide
@title www.RoboHobby.com KAP Wide
@param a Total number of shots
@default a 500
@param b Seconds between shots
@default b 5
@param c Zoom steps
@default c 7
t=b*1000
gosub "zoom_out"
gosub "do_kap_shoot"
print "End of Script"
end
:do_kap_shoot
for i=1 to a
sleep t
print "image #=",i
shoot
next i
return
:zoom_in
for n=1 to c
click"zoom_in"
print "zoom_in=",n
sleep 1000
next n
return
:zoom_out
for n=1 to c
click "zoom_out"
print "zoom_out=",n
sleep 1000
next n
return
) Put this script file to SD card in directory SCRIPS:
/CHDK/SCRIPS
(!) Now you have SD card, ready to be used for KAP.
) Insert SD card to the camera
And repeat steps from 1) to 10) - Update firmware.
(!) Do NOT do step 0) (!!!)
) Set up uBASIC script
) Press 'Menu' button
) Choose 'Scripting Parameters'
) Choose script you want - select script file:
) Move 'Mode Switch' to Up position
) Press 'Alt' button (key 'Print' in A570IS) button and turn your camera into 'Alt' mode
) Press on 'Start Script' button (key 'Shutter Button' on A570IS)
) Script starts to run:
) You see some prints (In my case the script will print number of shots:
) Now you can set your camera in special container or put in some other place,
from which you want to do automatic serial shots:
For example you can fly your camera, using kite and do shots, like this:
Or you can place a camera somewhere in a cover place in a forest and do
'spy snaps' of forest enimals, like this:
Is it possible to use Canon with CHDK in hobby robotics?
If there is pretty good microprocessor inside my Canon A570 IS ( Digic III processor) -
is it possible to use it as a brain for some robotics things?
What do we need for conversion 'camera-to-robot's brain'.
1) There must be communication between the processor and external boards
(motor driver boards, boards with sensors, etc.)
2) There must be image analyzing procedures.
(I'm afraid that this part is impossible to implement in uBASIC.
I suppose we should use C language for this.
Camera can receive binary information, using USB socket.
But what about output connection?
How we can send info from the camera to motors, sensors, etc.?
For implementation of communication we can use camera LEDs.
There are several LEDs on camera, which we can turn on/off from Basic script.
We can use this fact for sending info from the camera to external World.
See code examples (some simple tests):
----------------------
RoboHobby_LEDs.BAS
rem www.RoboHobby.com
rem CHDK UBASIC script for Canon A570 IS
rem for Hobby Robotics
rem Show All LEDs
rem Up_Green_LED=4
rem Down_Yellow_LED=5
rem Up_Orange_LED=7
rem Blue_LED=8
rem Red_Front_LED=9
@title www.RoboHobby.com All LEDs Test
@param a Delay (msec)
@default a 500
@param b Number of test circles
@default b 5
for i=1 to b
l=4
gosub "led_test"
l=5
gosub "led_test"
l=7
gosub "led_test"
l=8
gosub "led_test"
l=9
gosub "led_test"
next i
end
:led_test
print "LED=",l
for x=1 to 10
set_led l 1
sleep a
set_led l 0
sleep a
next x
return
-----------------------
RoboHobby_LED_Test.BAS
rem www.RoboHobby.com
rem CHDK UBASIC script for Canon A570 IS
rem for Hobby Robotics
rem Test LEDs
rem Up_Green=4
rem Down_Yellow=5
rem Up_Orange=7
rem Blue=8
rem Red_Front=9
@title www.RoboHobby.com LED Test
@param a Delay (msec)
@default a 10
@param b Number of Circles
@default b 8
@param c LED Number
@default c 8
print "LED=",c
for i=1 to b
gosub "led_test"
next i
end
:led_test
rem for x=1 to 5
set_led c 1
sleep a
set_led c 0
sleep a
rem next x
return