is 1 frame / sec timelapse possible ? - page 4 - General Help and Assistance on using CHDK stable releases - CHDK Forum supplierdeeply

is 1 frame / sec timelapse possible ?

  • 38 Replies
  • 7372 Views
*

Offline lapser

  • *****
  • 1093
Re: is 1 frame / sec timelapse possible ?
« Reply #30 on: 10 / January / 2013, 01:23:54 »
Advertisements
CHDK has a script function called:
get_usb_power()

I could write it into the script that whenever you toggled the USB power from on to off (or vice versa) it would trigger a shot immediately. Would that work for you?

Here's the script:
Code: (lua) [Select]
--[[
@title USBLapse
--]]
--MUST BE IN CONTINUOUS MODE
nshot=1
print("Holding shoot_full")
press("shoot_full") -- continuous mode
print("Press <menu> to exit")
repeat
  set_shot_interval(1234567890) --takes one shot and waits for 2 weeks
  sleep(10)
  tick=get_shot_timing() -- shutter_open_tick_count
  if(tick0==nil)then tick0=tick end
  if (tick0~=tick)then
    print(nshot,tick-tick0) -- time from last shutter open to this shutter open
    tick0=tick
    nshot=nshot+1
  end
  repeat sleep(10) until get_usb_power(1)~=0
  repeat sleep(10) until get_usb_power(1)==0
until is_pressed("menu")
The new set_shot_interval(..) function delays the camera right before the shutter opens until the time from the last shot equals the interval. But an ongoing delay is aborted every time you call set_shot_interval(..), so it takes one shot each call. By setting the interval very long, you can use set_shot_interval(..) as an (almost) instantaneous shot trigger.

You just need to turn the usb power off and on to trigger the shot. Can you do that with your setup? I'm not sure this will work, but it's worth a try. Maybe one of the USB experts could help if it doesn't.
« Last Edit: 10 / January / 2013, 02:39:26 by lapser »
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: is 1 frame / sec timelapse possible ?
« Reply #31 on: 10 / January / 2013, 09:25:52 »

Code: (lua) [Select]
  repeat sleep(10) until get_usb_power(1)~=0
  repeat sleep(10) until get_usb_power(1)==0

This does the same thing :

Code: (lua) [Select]
repeat sleep(10) until get_usb_power(0) >0
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline lapser

  • *****
  • 1093
Re: is 1 frame / sec timelapse possible ?
« Reply #32 on: 10 / January / 2013, 12:50:59 »
This does the same thing :
Code: (lua) [Select]
repeat sleep(10) until get_usb_power(0) >0
Thanks. I didn't realize that it reset itself. Since it returns the pulse width, you could use it to give commands to the script as well.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

Re: is 1 frame / sec timelapse possible ?
« Reply #33 on: 10 / January / 2013, 13:10:52 »
Since it returns the pulse width, you could use it to give commands to the script as well.
Pulse width is in there for that exact reason - allowing different commands over a simple interface.  There is even a buffered version in case the pulses come in faster than the script can keep up.


I didn't realize that it reset itself.
I'll update the wiki description to point out that the value clears are it is read.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline tavis

  • *
  • 15
Re: is 1 frame / sec timelapse possible ?
« Reply #34 on: 11 / January / 2013, 13:55:12 »
Lapse :

I've already added the pulse detection to the script you gave me and it works perfectly.  Thanks again..

*

Offline lapser

  • *****
  • 1093
Re: is 1 frame / sec timelapse possible ?
« Reply #35 on: 11 / January / 2013, 16:33:42 »
I've already added the pulse detection to the script you gave me and it works perfectly.  Thanks again..
That's good to hear. I didn't anticipate using the new set_shot_interval(..) for synchronization, but I'm glad it worked.

The next step is to add shot metering. I'll let you know when I have that working automatically.

It might also be nice to take more than 1 shot per motor step, so it would pan more slowly in the video result. The script would shoot on the first and second step like it does now. It would time the step interval, and set the shot interval to 1/2 of the step interval (for 2 shots per step)

I already have an optional nshots input: set_shot_interval(interval, nshots)
nshots is the number of undelayed shots per interval. Since each shot is metered from the last shot, taking two quick shots ensures that the second shot is metered correctly, especially with longer intervals.

But I could also add a secondary interval for nshots, instead of 0. The shot interval would alternate between the main interval, and the secondary interval. It's simple to add, and it would allow you to alternate between an interval of 2 weeks for the sync shot, and 1 second for the shots in between. i.e.

nshots=2  -- or make it an input parameter
pulse_time= (measured time between last 2 pulses)
set_shot_interval(1234567890,nshots,nshots/pulse_time)
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos

*

Offline tavis

  • *
  • 15
Re: is 1 frame / sec timelapse possible ?
« Reply #36 on: 12 / January / 2013, 18:09:31 »
I'm not sure I have much use for all that extra funtionality of set_shot_interval.

Now my issue is variable shot timing. It might just be some mad feature-creap going on but I'm thinking of sending pulses down the usb cable to set the exact delay calculated by the arduino on the fly. 

The manually syncing works great but I frequenctly have to adjust the speed of the panning rig to keep up with the clouds and adjusting the delay on the fly is the only way of ensuring the sync.

here is my recent timelapse created with manual shutter syncing via your Tlapse0 script :

http://youtu.be/Mgiy_v01J8I

*

Offline lapser

  • *****
  • 1093
Re: is 1 frame / sec timelapse possible ?
« Reply #37 on: 14 / January / 2013, 02:30:50 »
Now my issue is variable shot timing. It might just be some mad feature-creap going on but I'm thinking of sending pulses down the usb cable to set the exact delay calculated by the arduino on the fly. 
The USBLapse.lua script should do variable timing. By using a very large delay in set_shot_interval, the script simply waits until a usb signal.
Quote
The manually syncing works great but I frequenctly have to adjust the speed of the panning rig to keep up with the clouds and adjusting the delay on the fly is the only way of ensuring the sync.
If you change the delay between shots, it also changes the playback speed. That may not be noticeable for small changes to keep up with clouds.

That's a really pretty cloud at sunset you captured. Good work.
EOS-M3_120f / SX50_100b / SX260_101a / G1X_100g / D20_100b
https://www.youtube.com/user/DrLapser/videos


Re: is 1 frame / sec timelapse possible ?
« Reply #38 on: 08 / September / 2013, 05:49:46 »
Hello, I'd like to use the USBLapse on my SX230hs (fw 1.01B) because i need to sincronize shoots with other infos i receive from an Arduino board.
I tried to run the script but, probably, the "set_shot_interval" isn't in the standard command set.

Can you help me?

Thanks in advance,
luca

 

Related Topics