Intervalometer Speed on SX260 - Can someone help? - General Discussion and Assistance - CHDK Forum supplierdeeply

Intervalometer Speed on SX260 - Can someone help?

  • 40 Replies
  • 15340 Views
Intervalometer Speed on SX260 - Can someone help?
« on: 20 / November / 2012, 21:21:53 »
Advertisements
Hi,

I'm doing some aerial mapping with a small UAV, I already did a lot of mapping but in a real plane. I have a sx260HD and installed CHDK on it, all good but I want it to take 1 or maybe a frame every  1,5 seconds , in continuous mode I can get almost 2,5fps but its battery and memory consuming and fixed fist pic exposure. Anyway, the best I can do with ultra intervalometer is taking two sequential pictures and a picture after this.. like X-X---X and the patter repeats X-X---X  but I need something more linear and the best I can get is 1 frame every 3 seconds...  I tried many combinations and no luck. In normal mode I can take 1 frame every 1,5 seconds but not with the script...

Is there something I can do or even try?

Thanks

Re: Intervalometer Speed on SX260 - Can someone help?
« Reply #1 on: 20 / November / 2012, 21:28:32 »
The ultraintervalometer is ultra only because its author grabbed the name first.

For your application, what you want is a script that locks  the focus out at infinity and then shoots in a tight loop resetting exposure before each shot.  A fast SD card will help a bit here.   Best you will probably get is 1.5 to 2 seconds per shot though.  If that works for your application then I can probably point you to a better script.



« Last Edit: 20 / November / 2012, 23:18:08 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Intervalometer Speed on SX260 - Can someone help?
« Reply #2 on: 21 / November / 2012, 10:31:08 »
Hi, it's exactly the application that I need. 1.5 to 2 seconds per shot is perfect. Yes, I have a fast SD, its a sandisk ultra 32gb.

Please point me to a good script that can do this.

Thanks

Re: Intervalometer Speed on SX260 - Can someone help?
« Reply #3 on: 21 / November / 2012, 11:17:03 »
This is about as simple as it gets.  Tight loop of shoot() commands with the focus locked.  Save with a .lua extension ( eg:  uav.lua).

Focus locks when the script starts so make sure the camera is pointed into the distance.  You could change the initial sleep to sleep(30000) at the start to allow your UAV time to take off before focusing.   

Code: [Select]
--[[
@title UAV Shooter
--]]

sleep(2000)

press("shoot_half")
repeat sleep(100) until get_shooting() == true
release("shoot_half")
repeat sleep(100) until get_shooting() == false

set_aflock(1)

repeat
    shoot()
    set_backlight(0)
until false

If you want more accuracy in the shooting interval and can live with a slower frame rate we can modify the shooting loop so that it always starts after a defined interval.  But that's probably going to need to be more than 2 seconds.
« Last Edit: 21 / November / 2012, 12:23:13 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Intervalometer Speed on SX260 - Can someone help?
« Reply #4 on: 21 / November / 2012, 13:28:29 »
This is about as simple as it gets.  Tight loop of shoot() commands with the focus locked.  Save with a .lua extension ( eg:  uav.lua).
 
If you want more accuracy in the shooting interval and can live with a slower frame rate we can modify the shooting loop so that it always starts after a defined interval.  But that's probably going to need to be more than 2 seconds.

Hi, thanks! Tried here but I'm getting an error when I start the script.

Code: [Select]
***STARTED***
:16: 'until'expected (to close 'repeat' at line 14) near '<eof>'

And if isn't asking too much, can you create another version of this script with the slower frame rate? Thanks!


Re: Intervalometer Speed on SX260 - Can someone help?
« Reply #5 on: 21 / November / 2012, 14:09:01 »
Hi, thanks! Tried here but I'm getting an error when I start the script.
Code: [Select]
***STARTED***
:16: 'until'expected (to close 'repeat' at line 14) near '<eof>'
Something is wrong with the last line of the script.  Either you failed to copy the whole script and the last line is missing or your might need to put an additional blank line at the end of the file.

Quote
And if isn't asking too much, can you create another version of this script with the slower frame rate? Thanks!
How slow ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline lapser

  • *****
  • 1093
Re: Intervalometer Speed on SX260 - Can someone help?
« Reply #6 on: 21 / November / 2012, 14:26:40 »
http://chdk.setepontos.com/index.php?topic=8972.msg93572#msg93572

Try the script attached to the above post. It's still preliminary, but it should work on your camera, since I also have the sx260.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: Intervalometer Speed on SX260 - Can someone help?
« Reply #7 on: 21 / November / 2012, 15:14:15 »
And if isn't asking too much, can you create another version of this script with the slower frame rate? Thanks!
This will sync up the shots.  On my A1200 it really only works well down to 3 seconds per shot.  At 2 seconds it gets behind - the camera can't set exposure and shoot much faster, even with focus locked. We could probably try for 2.5 second sync on some cameras - small code change required if so.

Code: [Select]
--[[
@title UAV Shooter 2.4
@param s interval (sec)
@default s 3
--]]

function restore()
    set_backlight(1)
    set_aflock(0)
end

sleep(2000)
if( get_mode() ==false ) then
   set_record(1)
   while ( get_mode() == false ) do
      sleep(100)
   end
end
press("shoot_half")
repeat sleep(100) until get_shooting() == true
release("shoot_half")
repeat sleep(100) until get_shooting() == false
set_aflock(1)
interval=s*1000
nextshot=get_tick_count()
repeat
    nextshot=nextshot+interval
    shoot()
   print ( "nextshot", nextshot, get_tick_count())
    while ( nextshot > get_tick_count()) do
     set_backlight(0)
     sleep(500)
    end
until false
 
« Last Edit: 21 / November / 2012, 15:15:59 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


Re: Intervalometer Speed on SX260 - Can someone help?
« Reply #8 on: 22 / November / 2012, 09:59:37 »
waterwiz,

Both your this last script and the lapser one (from the other topic) worked pretty well. Can you please lower the intervall for something like 1.9 seconds? With lapser script I can get 1 pic every 1.9 seconds. I tried to figure this out in your (waterwiz) script but no luck.

Since I will do some UAV with the camera pointing to the ground. the two thing I need:

1) the delay for start so It can take the first picture when its already flying.  <-- both scripts already have but Lapser script it has to focus and exposure before anything, so I don't know how to use it in UAV since my focus will be infinite. Any ideas?
2) waterwiz, I saw this on the other topic: "I was meaning to add something to set the focus to infinity" do you have already this one code? It sure will be very usefull for me since I will always use focus to infinity+lock.
3) the shutdown - I have this script from conservation drones that has the shutdown, how can I integrate a shutdown after X minutes of X pictures on your script (waterwiz and Lapser)  :) The script below is too slow for me, 1 pic every 4 seconds...

Code: [Select]
rem By Alan Sanchez
rem Based on Keoeeit's intervaloper script
rem ***Mission Parameters***
@title UAV Mapper
@param a Delay Start (Min)
@default a 0
@param b Delay Start (Sec)
@default b 20
@param c Number of Shots
@default c 50
@param d Interval (Min)
@default d 0
@param e Interval (Sec)
@default e 0
@param f Interval (1/10 Sec)
@default f 5
@param g Endless? No=0 Yes=1
@default g 0

rem Wait - calculate wait time in milliseconds.
w=a*60000+b*1000
rem Time - calculate interval time in milliseconds.
t=d*60000+e*1000+f*100
rem safety constants
if c<1 then let c=1
if t<100 then let t=100
if g<0 then let g=0
if g>1 then let g=1
if w<0 then let w=0
goto "initialize"


:initialize
  if w>0 then gosub "delaystart"
  goto "UAVMapper"
 

:UAVMapper
  print "UAVMapper mission beginning"
  for n=1 to c
  sleep t
  press "shoot_half"
  sleep 1000
  press "shoot_full"
  sleep 1000
  release "shoot_full"
  sleep 100
  release "shoot_half"
  next n
  if g=1 then goto "interval" else goto "terminate"
 

:delaystart
  n=(a*60)+b
  for m=1 to n
  q=n-m
  print "Intvl Begins:", q/60; "min", q%60; "sec"
  sleep 930
  next m
  return


:terminate
  print "UAVMapper mission completed"
  print "shutting down"
  release "shoot_full"
  shut_down
« Last Edit: 22 / November / 2012, 10:27:55 by alkasber »

Re: Intervalometer Speed on SX260 - Can someone help?
« Reply #9 on: 22 / November / 2012, 11:10:14 »
Both your this last script and the lapser one (from the other topic) worked pretty well.
Let me know if you plan to use lapser's script and I'll leave this thread to him.  No sense in both of us working on this separately.

Quote
Can you please lower the interval for something like 1.9 seconds? With lapser script I can get 1 pic every 1.9 seconds. I tried to figure this out in your (waterwiz) script but no luck.
I implemented the complete setup parameter list from the script you posted so you can now specify repeat rate down to the millisecond.  I also changed the printout so that it tells you how far each shot is ahead/behind that rate. 

* Be aware that part of the way lapser's script gets  a short cycle time is to not make an exposure reading before every shot.  I can add that but I'm not sure that's what you want with a UAV ?

Quote
the delay for start so It can take the first picture when its already flying.
Done - its now programmable via a setup value.

Quote
Set the focus to infinity" do you have already this one code? It sure will be very usefull for me since I will always use focus to infinity+lock.
Right now it will focus once after the startup delay completes.  If the UAV is flying at that point then that should work for you ?  I've had trouble with setting focus in a script with some cameras.  However, we can give it a try if you like.

Quote
3) the shutdown - I have this script from conservation drones that has the shutdown, how can I integrate a shutdown after X minutes of X pictures on your script
Done.  As a refinement,  when it finishes shooting the camera switches to Playback mode.  If you have the Canon lens retract time set to zero seconds it will thus secure the lens for landing.

A couple of other notes :
1) If you start the script when the camera is in Playback mode,  it will wait until your initial delay is up before it goes to shooting mode and extending the lens.  Useful for protecting the camera if you have a "short flight" and "bounce".
2) If you set the script for autostart in the Script menu, then all you need to do when you are readly to launch your UAV is press the Playback button once.  (see note 1 above)
3) I added a parameter to allow you to override the backlight disable so that you can see the timing messages during testing.

Code: [Select]
--[[
@title UAV Shooter 3.4
@param a Delay Start (Min)
@default a 0
@param b Delay Start (Sec)
@default b 20
@param c Number of Shots
@default c 50
@param d Interval (Min)
@default d 0
@param e Interval (Sec)
@default e 2
@param f Interval (1/10 Sec)
@default f 5
@param g Endless? No=0 Yes=1
@default g 0
@param l LCD off? Yes=0 No=1
@default l 0
--]]

function restore()
    set_aflock(0)
    set_record(0)
    set_backlight(0)
end

interval=d*60000+e*1000+f*100
wait=a*60000+b*1000
shotcount=0
set_console_layout(1,1,40,13)

print("startup delay - LCD off")
sleep(1000)
set_backlight(l)
sleep(wait)

print("running")
if( get_mode() ==false ) then
   set_record(1)
   while ( get_mode() == false ) do
      sleep(100)
   end
end
press("shoot_half")
repeat sleep(100) until get_shooting() == true
release("shoot_half")
repeat sleep(100) until get_shooting() == false
set_aflock(1)

print("focus locked")
nextshot=get_tick_count()
starttime=nextshot
repeat
    shotcount=shotcount+1
    print ( "shot", shotcount, "at", ((get_tick_count()-starttime)/1000),"sec. Err=", (nextshot-get_tick_count()), "mSec" )
    nextshot=nextshot+interval
    shoot()
    while ( nextshot > get_tick_count()) do
      set_backlight(l)
      sleep(100)
    end
until ( (g==0) and (shotcount >= c))
restore()




Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics