Not signed in (Sign In)

Categories

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

  1.  
    As a result of the recent CHDK script for dummies thread, I've thought that it could be a good idea to share my intervalometer script here. There's nothing new in it, you can find all the information needed to write it in the CHDK wiki page. But it took me some time to find it out, and I've thought that it could help others beginning with CHDK scripts.
    I'm using a Powershot A570IS with the CHDK Allbest build v51. That's important because some points in the script are DIGIC III specific (but adapting it to DIGIC II cams would be easy).

    This is the script that I'm using:


    @title KAP vpiorno 3.3
    @param a Interval (Secs)
    @default a 10
    @param b Secs until 1st shoot
    @default b 20
    @param c Turn off display (0=no, 1=yes)
    @default c 1

    t=get_tick_count
    if a<10 then a=10
    d=a*1000
    if b<15 then b=15
    s=t+((b-(15/10))*1000)

    rem Blue LED blinking to check if script is running
    for x=1 to 8
    set_led 9 1
    sleep 50
    set_led 9 0
    sleep 50
    next x

    rem Turning off LCD display
    get_prop 105 e
    if c<>0 & e<>2 then
    for n=0 to (2-e)
    click "display"
    next n
    endif

    goto "shoot"

    :shoot
    if get_tick_count<s then goto "shoot"
    s=s+d
    shoot
    goto "shoot"

    end


    When I wrote the script, I had three points in mind to deal with. First, I wanted a good synchronization between shooting and servo movements (controlled by aurico or camremote). The first intervalometer script I used employed the “sleep” function to time shoots. This works shooting, “sleeping” for x seconds, and shooting again. The problem with this approach is that the interval between shots is not x, but x plus shooting time. And shooting time isn't negligible, and even worst, isn't always the same. You can check this, as I did, running one of this scripts with your cam pointed to a stopwatch. You'll see an accumulated delay that will cause that some shoots take place during servo movements. To avoid that, I used the get_tick_count function, which allows shooting at precise intervals defined by the internal camera clock. My intervalometer now passes the stopwatch test!

    Other point I was trying to solve was finding an easy way to turn off the LCD display. As you know, when CHDK is loaded, camera buttons don't play its normal functions. So, if you want to turn off the LCD to save batteries during flight, you have to do it first and then load CHDK and script blindly, which is a bit inconvenient. In my script, I get the LCD state with the get_prop function, and then I turn it off with the click display function. The value for the get_prop function is specific for digic III cams, you need to change it for digic II.

    Finally, I use the set_led function to let one of the leds blink (the blue one, in my case). This way I can be sure that the script is running. This led is bright enough to see it blinking under sunlight, if you look the camera closely.

    As you can see, there's nothing in my script that you couldn't do in other ways, but I find it very convenient to use. I hope some of you could find this useful.
  2.  
    Very useful Vicente - and extremely instructive. Many thanks!
  3.  
    Thanks for that. Will try it out.
    Michael.
    •  
      CommentAuthorbroox
    • CommentTimeNov 7th 2008
     
    Very interesting stuff about the tick count. thanks, Vicente!
    •  
      CommentAuthortoadstone
    • CommentTimeNov 7th 2008
     
    Thanks for that Vincente, very very useful for me. I knew about the timing issue from reading the wiki but it has not really been an issue with what I've been doing up to now but may be in the future. What is a real bonus is the LCD shut down. This is a cracking feature as it will save power without doubt. Using my A640 it was easy just to close the moveable LCD screen itself. but on my G7 the LCD screen is fixed.

    BTW the trend of camera manufacturers starting to use fixed LCD screens is a pain. To my mind one of the creative features allowed by the digital camera is the ability to position the camera in awkward situations and still be able to see and take a picture. By fixing that feature they are in effect stifling that spontaneous creativity. For KAP it is not an issue as we are unable to view anyway but I use the same cameras underground and it does become an issue. I get round it by using a small viewing screen but its just more gear to hawk around.
    •  
      CommentAuthorWicherd
    • CommentTimeNov 8th 2008 edited
     
    Off topic: ever considered a small mirror...

    On topic: great script!!
  4.  
    I'm glad you liked the script.

    @Wicherd: I can't understand your off topic comment. I'm limited by my english, I'm afraid. What should be the role of that little mirror?
    •  
      CommentAuthorbenedict
    • CommentTimeNov 8th 2008
     
    Peter, one other feature of articulated LCDs is that when they're folded flat with the screen facing in, practically all of them power off. I don't know how many times I accidentally left the LCD on with my previous camera. With this one, as long as I fold the screen in, I'm not having to power the LCD. One set of batteries can last me two straight days of shooting in that configuration. If camera makers are moving away from the articulated screen, I'd prefer they have a slide switch that would let you REALLY disable the LCD rather than just having a bit in software.

    Tom

    P.S. Vicente, I think Wicherd was saying you could use a mirror to see the LCD if the camera was in an awkward location.
    • CommentAuthorMichael L
    • CommentTimeNov 8th 2008
     
    Fantastic script, Vincente! I would have used this yesterday, if I had it! Now I have it for the next time I need it. Thanks very much for sharing it!

    I will be using this in very low wind conditions with my SD870 and gent360 on a Brooxes AutoKAP rig. Until recently, I used the gent360 with an infrared capable Pentax Optio. Now the gent360 will continue to rotate my servo and pause, and the intervalometer will trigger the SD870 at the appropriate time.

    If you want to shoot at intervals of less than 10 seconds, the statement: if a<10 then a=10 needs to be edited. I have changed it to: if a<5 then a=5, and also changed the default interval to 5.

    The display off part of the script doesn't work with the SD870, since this camera doesn't have a dedicated display button. There is a way to make it work by adding some statements into the shoot loop in the script, and I have tried it, but the LCD comes on for a split second between shots. I can't believe that turning the LCD on and off hundreds of times each KAP session could be good for the camera, so I think I'll just continue to use the plug in the AV jack.

    The blinking LED also doesn't work with the SD870, probably because of differences between the A series cameras and the SD cameras. I set the camera's shutter sound to its loudest, which lets me know that the camera is taking photos. This feature also seems to use very little battery power.
  5.  
    Michael, I'm afraid that reducing the shooting interval to 5 seconds is not so easy. Even removing or changing the if a<10 then a=10 statement, the shortest interval I've achieved is 6,2 secs. I don't know why, perhaps it is related with the time needed to shot, process the image and save it to the card. Perhaps this could be reduced with some research and work. I haven't tried it hard until now, since I don't need it.

    Tom, thank you for clarifying the mirror issue. It wasn't a language problem, it was a paying attention one. Sorry for the silly question, Wicherd.
    • CommentAuthorMichael L
    • CommentTimeNov 9th 2008
     
    Vicente, I just did a test of 20 shots and they are 5 seconds apart according to the EXIF data, which rounds to the closest second only. I just tried to synchronize it with my gent360, which I thought was rotating my pan servo at 5 second intervals. It looks like the servo interval is more like 4.25 seconds. When I try to modify the script to set a 4.25 second triggering interval, the camera freezes.
    •  
      CommentAuthorbroox
    • CommentTimeNov 9th 2008
     
    I can understand everyone's eagerness to use the programming power of CHDK to trigger a camera that is being rotated by another device, but doesn't it make more sense to simply trigger the camera by the device that rotates it?

    AuRiCo (with a gentLED-CHDK) can do it; gent360-CHDK can do it.

    Why not just hook it up and not worry about synchronization? The weight differential is insignificant.

    http://www.brooxes.com/
  6.  
    Michael, you're right. With the help of the CHDK forum I've solved my 6 seconds limit problem. I'm a bit ashamed, it was something really silly: just setting the review time to "Off" in the camera menu. Now I can get intervals under 4 seconds.

    Regarding a 4.25 seconds interval, I don´t know how you have modified the script, but one possibility is that I think that CHDK scripts only admit integer variables. Try the following code. It works in my camera, and I get intervals around 4.25 seconds.


    @title ms intervalometer
    @param a Interval (ms)
    @default a 4250

    t=get_tick_count

    goto "shoot"

    :shoot
    if get_tick_count<t then goto "shoot"
    t=t+a
    shoot
    goto "shoot"

    end


    Broox, you're wright, probably all this scripting effort is a bit exagerated. But I enjoy it. Those who don't like spending time in this kind of things will be happier following your advice and shooting with their control systems.
    •  
      CommentAuthorWicherd
    • CommentTimeNov 10th 2008
     
    Vincente, there are no silly questions. Only silly answers.
    In addition to Brooks' comment: Camremote is also capable of triggering after rotating / tilting the camera.
    •  
      CommentAuthortgran
    • CommentTimeNov 10th 2008
     
    Just an aside on Brooks comment. I sometimes wish the Gent-360 had a longer delay between pan and shoot or simply took the picture just prior to rotating. My light rigs have a torsion mode that seems to last a little longer than the delay. I don't see the script as an easy solution (synchronizing sounds like a lot of work) -- just saying this might be a reason some people want a bit more control in separating the two.

    Thanks for the "display off" discussion!
    • CommentAuthorMichael L
    • CommentTimeNov 10th 2008
     
    Thanks Vicente! The milliseconds interval did the trick. The camera and the servo turned by the gent360 are quite well synchronized now, at least over 20 iterations, at 4300 ms.

    Brooks, I may end up ordering a gent360-CHDK at some point, but if I can make this work with what I already have, I can put the $50 into my "send Michael to Tahiti fund."

    I could easily do this with my CAMremote which controls my pan and tilt rig and can send a USB pulse to my CHDK enabled camera, but I don't really want to unplug and then replug servos and power source in the field when my kite is already airborne. Now that I have a lightweight carbon frame for my 8 foot Rok, I really only use my BEAK if the wind speed is < 3 mph or so, too little to lift my heavier setup.
    •  
      CommentAuthorskyware
    • CommentTimeNov 10th 2008
     
    Hi Folks,
    CHDK allows a min intervall of ~ 3 secs (in the needed KAP resolution) even I was also able to shoot 2 secs intervals in low res for time-lap videos.
    (and this minimum time depends on several circumstances - speed of card, manual Focus set or set to infinity ......)

    But Broox's proposal ist the only right one:
    let the control device do the shutter for you !!! then your camera is totally sychronized
    Additional to the devices Broox told you, there is also another solution:

    The new AuRiCo also supports direct connection of a USB cable to control the shutter via CHDK (works down to 2 secs)

    Interested ?
    ask me ( engels.p@-online.de ) or Broox .....
    • CommentAuthorronskap
    • CommentTimeOct 4th 2011 edited
     
    Hi Vicente,

    I have been using your script very successfully in both a PowerShot 540 and 590 for several years. I am having trouble getting the LCD to turn off using this script in my Power Shot SD790 IS. The script operates as it should taking images and storing them. The “Icons” do shut off but the review image is still ON. I have tried turning “Review” to OFF in the menu with no change. I’ve downloaded CHDK “ixus90_sd790-100e-0.9.9-1352-full_BETA.zip” on to a 2GB Card.

    I believe the processor is DIGIC III.

    Firmware version (via ver.req):

    P-ID: 3174 NT D
    GM 1.00 E
    E18
    Aug 5 2008

    Do you ( or anyone ) have any recommendations for turning off the LCD through the script?

    Thank you, Ron
    • CommentAuthorronskap
    • CommentTimeOct 6th 2011
     
    Good news, I found the command “set_backlight 0” on the chdk wiki page. This will shut off the LCD to save energy during long flights :-)

    .....ready to fly now.

    Ron